mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Reformat
This commit is contained in:
parent
e010fdbc00
commit
c91c12ab30
3 changed files with 81 additions and 82 deletions
|
@ -1,5 +1,6 @@
|
||||||
<%= form_for([:admin, @api_user.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 %>
|
<%= render 'shared/full_errors', object: @api_user %>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -10,6 +11,7 @@
|
||||||
<%= f.text_field :username, required: true, autofocus: true, class: 'form-control' %>
|
<%= f.text_field :username, required: true, autofocus: true, class: 'form-control' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-4 control-label">
|
<div class="col-md-4 control-label">
|
||||||
<%= f.label :plain_text_password, nil, class: 'required' %>
|
<%= f.label :plain_text_password, nil, class: 'required' %>
|
||||||
|
@ -18,6 +20,7 @@
|
||||||
<%= f.text_field :plain_text_password, required: true, class: 'form-control' %>
|
<%= f.text_field :plain_text_password, required: true, class: 'form-control' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-4 control-label">
|
<div class="col-md-4 control-label">
|
||||||
<%= f.label :identity_code %>
|
<%= f.label :identity_code %>
|
||||||
|
@ -26,10 +29,12 @@
|
||||||
<%= f.text_field(:identity_code, class: 'form-control') %>
|
<%= f.text_field(:identity_code, class: 'form-control') %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-4 control-label">
|
<div class="col-md-4 control-label">
|
||||||
<%= f.label :role, nil, class: 'required' %>
|
<%= f.label :role, nil, class: 'required' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<%= select_tag 'api_user[roles][]', options_for_select(ApiUser::ROLES.map { |x| [x, x] }, @api_user.roles.try(:first)), class: 'form-control selectize' %>
|
<%= select_tag 'api_user[roles][]', options_for_select(ApiUser::ROLES.map { |x| [x, x] }, @api_user.roles.try(:first)), class: 'form-control selectize' %>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
@ -42,10 +47,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 text-right">
|
<div class="col-md-8 text-right">
|
||||||
<%= button_tag(t(:save), class: 'btn btn-primary') %>
|
<%= button_tag(t(:save), class: 'btn btn-primary') %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,42 +1,41 @@
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><%= t '.header' %></h1>
|
<h1><%= t '.header' %></h1>
|
||||||
</div>
|
</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">
|
||||||
<table class="table table-hover table-bordered table-condensed">
|
<table class="table table-hover table-bordered table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
|
||||||
<th class="col-xs-2">
|
|
||||||
<%= sort_link(@q, 'username') %>
|
|
||||||
</th>
|
|
||||||
<th class="col-xs-2">
|
|
||||||
<%= sort_link(@q, 'registrar_name', t(:registrar_name)) %>
|
|
||||||
</th>
|
|
||||||
<th class="col-xs-2">
|
|
||||||
<%= sort_link(@q, 'active', t('.active')) %>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<% @api_users.each do |api_user| %>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<th class="col-xs-2">
|
||||||
<%= link_to api_user, admin_registrar_api_user_path(api_user.registrar, api_user) %>
|
<%= sort_link(@q, 'username') %>
|
||||||
</td>
|
</th>
|
||||||
<td>
|
<th class="col-xs-2">
|
||||||
<%= link_to api_user.registrar, [:admin, api_user.registrar] %>
|
<%= sort_link(@q, 'registrar_name', t(:registrar_name)) %>
|
||||||
</td>
|
</th>
|
||||||
<td>
|
<th class="col-xs-2">
|
||||||
<%= api_user.active %>
|
<%= sort_link(@q, 'active', t('.active')) %>
|
||||||
</td>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<% @api_users.each do |api_user| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= link_to api_user,
|
||||||
|
admin_registrar_api_user_path(api_user.registrar,
|
||||||
|
api_user) %></td>
|
||||||
|
<td><%= link_to api_user.registrar, [:admin, api_user.registrar] %></td>
|
||||||
|
<td><%= api_user.active %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= paginate @api_users %>
|
<%= paginate @api_users %>
|
||||||
|
|
|
@ -32,43 +32,29 @@
|
||||||
<%= t(:general) %>
|
<%= t(:general) %>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>
|
<dt><%= t(:username) %></dt>
|
||||||
<%= t(:username) %>
|
<dd><%= @api_user.username %></dd>
|
||||||
</dt>
|
|
||||||
<dd>
|
<dt><%= t(:password) %></dt>
|
||||||
<%= @api_user.username %>
|
<dd><%= @api_user.plain_text_password %></dd>
|
||||||
</dd>
|
|
||||||
<dt>
|
<dt><%= t(:registrar_name) %></dt>
|
||||||
<%= t(:password) %>
|
<dd><%= link_to(@api_user.registrar, admin_registrar_path(@api_user.registrar)) %></dd>
|
||||||
</dt>
|
|
||||||
<dd>
|
<dt><%= t(:role) %></dt>
|
||||||
<%= @api_user.plain_text_password %>
|
<dd><%= @api_user.roles.join(', ') %></dd>
|
||||||
</dd>
|
|
||||||
<dt>
|
<dt><%= t('.active') %></dt>
|
||||||
<%= t(:registrar_name) %>
|
<dd><%= @api_user.active %></dd>
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
<%= link_to(@api_user.registrar, admin_registrar_path(@api_user.registrar)) %>
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<%= t(:role) %>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
<%= @api_user.roles.join(', ') %>
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<%= t('.active') %>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
<%= @api_user.active %>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
@ -81,40 +67,46 @@
|
||||||
<%= link_to(t(:upload_csr), new_admin_api_user_certificate_path(@api_user), class: 'btn btn-primary btn-xs') %>
|
<%= link_to(t(:upload_csr), new_admin_api_user_certificate_path(@api_user), class: 'btn btn-primary btn-xs') %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-hover table-bordered table-condensed">
|
<table class="table table-hover table-bordered table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-xs-10">
|
<th class="col-xs-10">
|
||||||
<%= t('.subject') %>
|
<%= t('.subject') %>
|
||||||
</th>
|
</th>
|
||||||
<th class="col-xs-2">
|
<th class="col-xs-2">
|
||||||
<%= t(:status) %>
|
<%= t(:status) %>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @api_user.certificates.each do |x| %>
|
<% @api_user.certificates.each do |x| %>
|
||||||
<% if x.csr %>
|
<% if x.csr %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to(x.parsed_csr.try(:subject), admin_api_user_certificate_path(@api_user, x)) %>
|
<%= link_to(x.parsed_csr.try(:subject),
|
||||||
</td>
|
admin_api_user_certificate_path(@api_user,
|
||||||
<td>
|
x)) %>
|
||||||
<%= x.status %>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<%= x.status %>
|
||||||
<% elsif x.crt %>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>
|
<% elsif x.crt %>
|
||||||
<%= link_to(x.parsed_crt.try(:subject), admin_api_user_certificate_path(@api_user, x)) %>
|
<tr>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<%= link_to(x.parsed_crt.try(:subject),
|
||||||
<%= x.status %>
|
admin_api_user_certificate_path(@api_user,
|
||||||
</td>
|
x)) %>
|
||||||
</tr>
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= x.status %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue