added users - administration tools
This commit is contained in:
parent
a33618ad11
commit
9a4d199a8f
|
|
@ -0,0 +1,2 @@
|
|||
// Place all the behaviors and hooks related to the matching controller here.
|
||||
// All this logic will automatically be available in application.js.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Place all the styles related to the matching controller here.
|
||||
They will automatically be included in application.css.
|
||||
*/
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
class Admin::UsersController < ApplicationController
|
||||
def index; end
|
||||
|
||||
def show; end
|
||||
|
||||
def new; end
|
||||
|
||||
def create; end
|
||||
|
||||
def edit; end
|
||||
|
||||
def update; end
|
||||
|
||||
def destroy; end
|
||||
end
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
module Admin::UsersHelper
|
||||
end
|
||||
|
|
@ -5,12 +5,12 @@ module SidemenuHelper
|
|||
def build_side_menu
|
||||
ret = nav_link('Home', '/', '', 'fa-home')
|
||||
ret += divider
|
||||
ret += heading('Nazwa')
|
||||
submenu = ['other components:', ['Buttons', '/', '/'],
|
||||
ret += heading('Admin')
|
||||
submenu = ['other components:', ['Zarządzanie', '/admin/users', '/admin/users'],
|
||||
['Cards', '/home/index', '/home/index']]
|
||||
ret += nav_link_submenu(['Components', 'fa-cog', 'Comp'],
|
||||
ret += nav_link_submenu(['Użytkownicy', 'fa-users', 'Users'],
|
||||
submenu,
|
||||
['/', '/home/index'])
|
||||
['/admin/users', '/home/index'])
|
||||
ret.html_safe
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Admin::Users#create</h1>
|
||||
<p>Find me in app/views/admin/users/create.html.erb</p>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Admin::Users#destroy</h1>
|
||||
<p>Find me in app/views/admin/users/destroy.html.erb</p>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Admin::Users#edit</h1>
|
||||
<p>Find me in app/views/admin/users/edit.html.erb</p>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Admin::Users#index</h1>
|
||||
<p>Find me in app/views/admin/users/index.html.erb</p>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Admin::Users#new</h1>
|
||||
<p>Find me in app/views/admin/users/new.html.erb</p>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Admin::Users#show</h1>
|
||||
<p>Find me in app/views/admin/users/show.html.erb</p>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Admin::Users#update</h1>
|
||||
<p>Find me in app/views/admin/users/update.html.erb</p>
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
Rails.application.routes.draw do
|
||||
namespace :admin do
|
||||
resources :users
|
||||
end
|
||||
devise_for :users
|
||||
get 'home/index'
|
||||
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
require 'test_helper'
|
||||
|
||||
class Admin::UsersControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get index" do
|
||||
get admin_users_index_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get show" do
|
||||
get admin_users_show_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get admin_users_new_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get create" do
|
||||
get admin_users_create_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get admin_users_edit_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get update" do
|
||||
get admin_users_update_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get destroy" do
|
||||
get admin_users_destroy_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Reference in New Issue