mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Convert HAML to ERB
This commit is contained in:
parent
de6934625c
commit
4d60985138
10 changed files with 211 additions and 131 deletions
111
app/views/admin/api_users/show.html.erb
Normal file
111
app/views/admin/api_users/show.html.erb
Normal file
|
@ -0,0 +1,111 @@
|
|||
<% content_for :actions do %>
|
||||
<%= 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') %>
|
||||
<% end %>
|
||||
<%= render 'shared/title', name: @api_user.username %>
|
||||
<% if @api_user.errors.any? %>
|
||||
<% @api_user.errors.each do |attr, err| %>
|
||||
<%= err %>
|
||||
<br/>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @api_user.errors.any? %>
|
||||
<hr/>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<%= t(:general) %>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
<%= t(:username) %>
|
||||
</dt>
|
||||
<dd>
|
||||
<%= @api_user.username %>
|
||||
</dd>
|
||||
<dt>
|
||||
<%= t(:password) %>
|
||||
</dt>
|
||||
<dd>
|
||||
<%= @api_user.plain_text_password %>
|
||||
</dd>
|
||||
<dt>
|
||||
<%= t(:registrar_name) %>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading clearfix">
|
||||
<div class="pull-left">
|
||||
<%= t(:certificates) %>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<%= link_to(t(:upload_crt), new_admin_api_user_certificate_path(@api_user, crt: true), 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 class="table-responsive">
|
||||
<table class="table table-hover table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-10">
|
||||
<%= t('.subject') %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= t(:status) %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @api_user.certificates.each do |x| %>
|
||||
<% if x.csr %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to(x.parsed_csr.try(:subject), admin_api_user_certificate_path(@api_user, x)) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= x.status %>
|
||||
</td>
|
||||
</tr>
|
||||
<% elsif x.crt %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to(x.parsed_crt.try(:subject), admin_api_user_certificate_path(@api_user, x)) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= x.status %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue