Rename admin users controller/route
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Started out as a simple helper page to list LDAP users, but turning into proper user management now.
This commit is contained in:
parent
b530ad2f0f
commit
1a2482434c
@ -1,4 +1,4 @@
|
||||
class Admin::LdapUsersController < Admin::BaseController
|
||||
class Admin::UsersController < Admin::BaseController
|
||||
before_action :set_current_section
|
||||
|
||||
def index
|
||||
@ -15,6 +15,6 @@ class Admin::LdapUsersController < Admin::BaseController
|
||||
private
|
||||
|
||||
def set_current_section
|
||||
@current_section = :ldap_users
|
||||
@current_section = :users
|
||||
end
|
||||
end
|
@ -1,2 +0,0 @@
|
||||
module LdapUsersHelper
|
||||
end
|
2
app/helpers/users_helper.rb
Normal file
2
app/helpers/users_helper.rb
Normal file
@ -0,0 +1,2 @@
|
||||
module UsersHelper
|
||||
end
|
@ -1,4 +1,4 @@
|
||||
<%= render HeaderComponent.new(title: "LDAP Users: #{@ou}") %>
|
||||
<%= render HeaderComponent.new(title: "Users: #{@ou}") %>
|
||||
|
||||
<%= render MainSimpleComponent.new do %>
|
||||
<section>
|
||||
@ -22,7 +22,7 @@
|
||||
<ul>
|
||||
<% @orgs.each do |org| %>
|
||||
<li class="inline-block">
|
||||
<%= link_to org[:ou], admin_ldap_users_path(ou: org[:ou]), class: "ks-text-link" %>
|
||||
<%= link_to org[:ou], admin_users_path(ou: org[:ou]), class: "ks-text-link" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
@ -1,7 +1,7 @@
|
||||
<%= link_to "Dashboard", admin_root_path,
|
||||
class: main_nav_class(@current_section, :dashboard) %>
|
||||
<%= link_to "Users", admin_ldap_users_path,
|
||||
class: main_nav_class(@current_section, :ldap_users) %>
|
||||
<%= link_to "Users", admin_users_path,
|
||||
class: main_nav_class(@current_section, :users) %>
|
||||
<%= link_to "Invitations", admin_invitations_path,
|
||||
class: main_nav_class(@current_section, :invitations) %>
|
||||
<%= link_to "Donations", admin_donations_path,
|
||||
|
@ -39,7 +39,7 @@ Rails.application.routes.draw do
|
||||
|
||||
namespace :admin do
|
||||
root to: 'dashboard#index'
|
||||
get 'ldap_users', to: 'ldap_users#index'
|
||||
resources 'users', only: ['index']
|
||||
get 'invitations', to: 'invitations#index'
|
||||
resources :donations
|
||||
get 'lightning', to: 'lightning#index'
|
||||
|
Loading…
x
Reference in New Issue
Block a user