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
|
before_action :set_current_section
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@ -15,6 +15,6 @@ class Admin::LdapUsersController < Admin::BaseController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def set_current_section
|
def set_current_section
|
||||||
@current_section = :ldap_users
|
@current_section = :users
|
||||||
end
|
end
|
||||||
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 %>
|
<%= render MainSimpleComponent.new do %>
|
||||||
<section>
|
<section>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<% @orgs.each do |org| %>
|
<% @orgs.each do |org| %>
|
||||||
<li class="inline-block">
|
<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>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
@ -1,7 +1,7 @@
|
|||||||
<%= link_to "Dashboard", admin_root_path,
|
<%= link_to "Dashboard", admin_root_path,
|
||||||
class: main_nav_class(@current_section, :dashboard) %>
|
class: main_nav_class(@current_section, :dashboard) %>
|
||||||
<%= link_to "Users", admin_ldap_users_path,
|
<%= link_to "Users", admin_users_path,
|
||||||
class: main_nav_class(@current_section, :ldap_users) %>
|
class: main_nav_class(@current_section, :users) %>
|
||||||
<%= link_to "Invitations", admin_invitations_path,
|
<%= link_to "Invitations", admin_invitations_path,
|
||||||
class: main_nav_class(@current_section, :invitations) %>
|
class: main_nav_class(@current_section, :invitations) %>
|
||||||
<%= link_to "Donations", admin_donations_path,
|
<%= link_to "Donations", admin_donations_path,
|
||||||
|
@ -39,7 +39,7 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
root to: 'dashboard#index'
|
root to: 'dashboard#index'
|
||||||
get 'ldap_users', to: 'ldap_users#index'
|
resources 'users', only: ['index']
|
||||||
get 'invitations', to: 'invitations#index'
|
get 'invitations', to: 'invitations#index'
|
||||||
resources :donations
|
resources :donations
|
||||||
get 'lightning', to: 'lightning#index'
|
get 'lightning', to: 'lightning#index'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user