internetee/registry

View on GitHub
app/views/admin/registrars/show.html.erb

Summary

Maintainability
Test Coverage
<% registrar = RegistrarPresenter.new(registrar: @registrar, view: self) %>

<ol class="breadcrumb">
    <li><%= link_to t('admin.registrars.index.header'), admin_registrars_path %></li>
</ol>

<div class="page-header">
    <div class="row">
        <div class="col-md-6">
            <h1>
                <%= @registrar.name %>
                <% if @registrar.test_registrar? %>
                    <span class="text-danger"> (test)</span>
                <% end %>
            </h1>
        </div>

        <div class="col-md-6 text-right">
            <%= link_to t('.edit_btn'), edit_admin_registrar_path(@registrar),
                        class: 'btn btn-primary' %>
            <%= link_to t('.delete_btn'), admin_registrar_path(@registrar),
                        method: :delete,
                        data: { confirm: t('.delete_btn_confirm') },
                        class: 'btn btn-default' %>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-6">
        <%= render 'admin/registrars/show/details', registrar: @registrar %>
    </div>
    <div class="col-md-6">
        <%= render 'admin/registrars/show/contacts', registrar: @registrar %>
        <%= render 'admin/registrars/show/billing', registrar: @registrar %>
        <%= render 'admin/registrars/show/preferences', registrar: registrar %>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <%= render 'admin/registrars/show/api_users', registrar: @registrar %>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <%= render 'admin/registrars/show/white_ips', registrar: @registrar %>
    </div>
</div>