mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Nest API users under registrar in admin area
This commit is contained in:
parent
c680b688e4
commit
de6934625c
10 changed files with 65 additions and 62 deletions
|
@ -1,4 +1,4 @@
|
|||
= form_for([:admin, @registrar, @api_user], html: {class: 'form-horizontal', autocomplete: 'off'}) do |f|
|
||||
= form_for([:admin, @api_user.registrar, @api_user], html: {class: 'form-horizontal', autocomplete: 'off'}) do |f|
|
||||
= render 'shared/full_errors', object: @api_user
|
||||
|
||||
.row
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:back_to_api_user), [:admin, @api_user], class: 'btn btn-default')
|
||||
= link_to(t(:back_to_api_user), admin_registrar_api_user_path(@api_user.registrar, @api_user), class: 'btn btn-default')
|
||||
= render 'shared/title', name: "#{t(:edit)}: #{@api_user.username}"
|
||||
|
||||
= render 'form'
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
%tbody
|
||||
- @api_users.each do |api_user|
|
||||
%tr
|
||||
%td= link_to api_user, [:admin, api_user]
|
||||
%td= link_to api_user, admin_registrar_api_user_path(api_user.registrar, api_user)
|
||||
%td= link_to api_user.registrar, [:admin, api_user.registrar]
|
||||
%td= api_user.active
|
||||
.row
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:edit), edit_admin_api_user_path(@api_user), class: 'btn btn-default')
|
||||
= link_to(t(:delete), admin_api_user_path(@api_user),
|
||||
= link_to(t(:edit), edit_admin_registrar_api_user_path(@api_user.registrar, @api_user), class: 'btn btn-default')
|
||||
= link_to(t(:delete), admin_registrar_api_user_path(@api_user.registrar, @api_user),
|
||||
method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger')
|
||||
= render 'shared/title', name: @api_user.username
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue