mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Refactor EPP users to API users
This commit is contained in:
parent
b8494993ea
commit
c91c9c8ebf
44 changed files with 154 additions and 150 deletions
|
@ -1,9 +1,9 @@
|
|||
= form_for([:admin, @epp_user]) do |f|
|
||||
- if @epp_user.errors.any?
|
||||
- @epp_user.errors.each do |attr, err|
|
||||
= form_for([:admin, @api_user]) do |f|
|
||||
- if @api_user.errors.any?
|
||||
- @api_user.errors.each do |attr, err|
|
||||
= err
|
||||
%br
|
||||
- if @epp_user.errors.any?
|
||||
- if @api_user.errors.any?
|
||||
%hr
|
||||
|
||||
.row
|
||||
|
@ -23,7 +23,7 @@
|
|||
= f.hidden_field(:registrar_id, class: 'js-registrar-id')
|
||||
.form-group
|
||||
.checkbox
|
||||
%label{for: 'epp_user_active'}
|
||||
%label{for: 'api_user_active'}
|
||||
= f.check_box(:active)
|
||||
= t('active')
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
.row
|
||||
.col-sm-6
|
||||
%h2.text-center-xs
|
||||
= "#{t('edit_epp_user')}"
|
||||
= "#{t('edit_api_user')}"
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('back_to_epp_user'), [:admin, @epp_user], class: 'btn btn-default')
|
||||
= link_to(t('back_to_api_user'), [:admin, @api_user], class: 'btn btn-default')
|
||||
%hr
|
||||
= render 'form'
|
|
@ -1,9 +1,9 @@
|
|||
.row
|
||||
.col-sm-6
|
||||
%h2.text-center-xs= t('epp_users')
|
||||
%h2.text-center-xs= t('api_users')
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('create_new_epp_user'), new_admin_epp_user_path, class: 'btn btn-primary')
|
||||
= link_to(t('create_new_api_user'), new_admin_api_user_path, class: 'btn btn-primary')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -18,11 +18,11 @@
|
|||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'active', t('active'))
|
||||
%tbody
|
||||
- @epp_users.each do |x|
|
||||
- @api_users.each do |x|
|
||||
%tr
|
||||
%td= link_to(x, [:admin, x])
|
||||
%td= link_to(x.registrar, [:admin, x.registrar])
|
||||
%td= x.active
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @epp_users
|
||||
= paginate @api_users
|
3
app/views/admin/api_users/new.haml
Normal file
3
app/views/admin/api_users/new.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
%h2= t('create_new_api_user')
|
||||
%hr
|
||||
= render 'form'
|
|
@ -1,18 +1,18 @@
|
|||
.row
|
||||
.col-sm-6
|
||||
%h2.text-center-xs
|
||||
= "#{t('epp_user_details')}"
|
||||
= "#{t('api_user_details')}"
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('edit'), edit_admin_epp_user_path(@epp_user), class: 'btn btn-primary')
|
||||
= link_to(t('delete'), admin_epp_user_path(@epp_user), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
|
||||
= link_to(t('edit'), edit_admin_api_user_path(@api_user), class: 'btn btn-primary')
|
||||
= link_to(t('delete'), admin_api_user_path(@api_user), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-danger')
|
||||
|
||||
%hr
|
||||
- if @epp_user.errors.any?
|
||||
- @epp_user.errors.each do |attr, err|
|
||||
- if @api_user.errors.any?
|
||||
- @api_user.errors.each do |attr, err|
|
||||
= err
|
||||
%br
|
||||
- if @epp_user.errors.any?
|
||||
- if @api_user.errors.any?
|
||||
%hr
|
||||
.row
|
||||
.col-md-6
|
||||
|
@ -22,13 +22,13 @@
|
|||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t('username')
|
||||
%dd= @epp_user.username
|
||||
%dd= @api_user.username
|
||||
|
||||
%dt= t('password')
|
||||
%dd= @epp_user.password
|
||||
%dd= @api_user.password
|
||||
|
||||
%dt= t('active')
|
||||
%dd= @epp_user.active
|
||||
%dd= @api_user.active
|
||||
|
||||
.col-md-6
|
||||
.panel.panel-default
|
||||
|
@ -37,7 +37,7 @@
|
|||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t('csr')
|
||||
%dd= @epp_user.csr
|
||||
%dd= @api_user.csr
|
||||
|
||||
%dt= t('crt')
|
||||
%dd= @epp_user.crt
|
||||
%dd= @api_user.crt
|
|
@ -1,3 +0,0 @@
|
|||
%h2= t('create_new_epp_user')
|
||||
%hr
|
||||
= render 'form'
|
|
@ -49,7 +49,7 @@
|
|||
.col-md-12
|
||||
#epp-users.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
= t('epp_users')
|
||||
= t('api_users')
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
|
@ -57,7 +57,7 @@
|
|||
%th{class: 'col-xs-6'}= t('username')
|
||||
%th{class: 'col-xs-6'}= t('active')
|
||||
%tbody
|
||||
- @registrar.epp_users.each do |x|
|
||||
- @registrar.api_users.each do |x|
|
||||
%tr
|
||||
%td= link_to(x, [:admin, x])
|
||||
%td= x.active
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue