mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Add api user button to registrar view
This commit is contained in:
parent
b1714f4b1f
commit
920b3e71e0
4 changed files with 14 additions and 5 deletions
|
@ -8,7 +8,8 @@ class Admin::ApiUsersController < AdminController
|
|||
end
|
||||
|
||||
def new
|
||||
@api_user = ApiUser.new
|
||||
@registrar = Registrar.find_by(id: params[:registrar_id])
|
||||
@api_user = ApiUser.new(registrar: @registrar)
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
%dt= t(:password)
|
||||
%dd= @api_user.password
|
||||
|
||||
%dt= t(:registrar)
|
||||
%dd= link_to(@api_user.registrar, admin_registrar_path(@api_user.registrar))
|
||||
|
||||
%dt= t(:active)
|
||||
%dd= @api_user.active
|
||||
.row
|
||||
|
|
|
@ -57,7 +57,11 @@
|
|||
.col-md-12
|
||||
#epp-users.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left
|
||||
= t(:api_users)
|
||||
.pull-right
|
||||
= link_to(t('create_new_api_user'), new_admin_registrar_api_user_path(@registrar), class: 'btn btn-primary btn-xs')
|
||||
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
|
|
|
@ -107,6 +107,7 @@ Rails.application.routes.draw do
|
|||
|
||||
resources :settings
|
||||
resources :registrars do
|
||||
resources :api_users
|
||||
collection do
|
||||
get :search
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue