Use standard header for registrar API users in admin area

This commit is contained in:
Artur Beljajev 2019-12-09 21:56:44 +02:00
parent 4d60985138
commit a28a4ebb34
6 changed files with 59 additions and 14 deletions

View file

@ -1,5 +1,14 @@
<% content_for :actions do %> <ol class="breadcrumb">
<%= link_to(t(:back_to_api_user), admin_registrar_api_user_path(@api_user.registrar, @api_user), class: 'btn btn-default') %> <li><%= link_to t('admin.registrars.index.header'), admin_registrars_path %></li>
<% end %> <li><%= link_to @api_user.registrar, admin_registrar_path(@api_user.registrar) %></li>
<%= render 'shared/title', name: "#{t(:edit)}: #{@api_user.username}" %> <li><%= t 'admin.registrars.show.api_users.header' %></li>
<li><%= link_to @api_user.username, admin_registrar_api_user_path(@api_user.registrar,
@api_user) %></li>
<li><%= t '.header' %></li>
</ol>
<div class="page-header">
<h1><%= t '.header' %></h1>
</div>
<%= render 'form' %> <%= render 'form' %>

View file

@ -1,4 +1,6 @@
<%= render 'shared/title', name: t('.title') %> <div class="page-header">
<h1><%= t '.header' %></h1>
</div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="table-responsive"> <div class="table-responsive">

View file

@ -1,2 +1,11 @@
<%= render 'shared/title', name: t('.title') %> <ol class="breadcrumb">
<li><%= link_to t('admin.registrars.index.header'), admin_registrars_path %></li>
<li><%= link_to @api_user.registrar, admin_registrar_path(@api_user.registrar) %></li>
<li><%= t '.header' %></li>
</ol>
<div class="page-header">
<h1><%= t '.header' %></h1>
</div>
<%= render 'form' %> <%= render 'form' %>

View file

@ -1,8 +1,29 @@
<% content_for :actions do %> <ol class="breadcrumb">
<%= link_to(t(:edit), edit_admin_registrar_api_user_path(@api_user.registrar, @api_user), class: 'btn btn-default') %> <li><%= link_to t('admin.registrars.index.header'), admin_registrars_path %></li>
<%= 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') %> <li><%= link_to @api_user.registrar, admin_registrar_path(@api_user.registrar) %></li>
<% end %> <li><%= t 'admin.registrars.show.api_users.header' %></li>
<%= render 'shared/title', name: @api_user.username %> <li><%= @api_user.username %></li>
</ol>
<div class="page-header">
<div class="row">
<div class="col-sm-8">
<h1><%= @api_user.username %></h1>
</div>
<div class="col-sm-4 text-right">
<%= link_to t('.edit_btn'), edit_admin_registrar_api_user_path(@api_user.registrar,
@api_user),
class: 'btn btn-default' %>
<%= link_to t('.delete_btn'), admin_registrar_api_user_path(@api_user.registrar,
@api_user),
method: :delete,
data: { confirm: t(:are_you_sure) },
class: 'btn btn-danger' %>
</div>
</div>
</div>
<% if @api_user.errors.any? %> <% if @api_user.errors.any? %>
<% @api_user.errors.each do |attr, err| %> <% @api_user.errors.each do |attr, err| %>
<%= err %> <%= err %>

View file

@ -2,15 +2,20 @@ en:
admin: admin:
api_users: api_users:
index: index:
title: API users header: API users
active: Active active: Active
show: show:
active: Active active: Active
subject: Subject subject: Subject
edit_btn: Edit
delete_btn: Delete
new: new:
title: New API user header: New API user
edit:
header: Edit API user
form: form:
active: Active active: Active

View file

@ -277,7 +277,6 @@ en:
certificate_signing_req: 'Certificate signing request' certificate_signing_req: 'Certificate signing request'
csr: 'CSR' csr: 'CSR'
crt: 'CRT' crt: 'CRT'
back_to_api_user: 'Back to API user'
dnskey: 'DNS key' dnskey: 'DNS key'
dnskeys: 'DNS Keys' dnskeys: 'DNS Keys'