internetee/registry

View on GitHub
app/views/admin/domains/index.html.erb

Summary

Maintainability
Test Coverage
<div class="page-header">
    <h1><%= t '.header' %></h1>
</div>

<div class="row">
    <div class="col-md-12">
        <%= render 'search_form' %>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <div class="table-responsive">
            <table class="table table-hover table-bordered table-condensed">
                <thead>
                    <tr>
                        <th class="col-xs-2"><%= sort_link(@q, 'name') %></th>
                        <th class="col-xs-2"><%= sort_link(@q, 'registrant_name', Registrant.model_name.human) %></th>
                        <th class="col-xs-2"><%= sort_link(@q, 'valid_to', t(:valid_to)) %></th>
                        <th class="col-xs-2"><%= sort_link(@q, 'registrar_name', Registrar.model_name.human) %></th>
                    </tr>
                </thead>

                <tbody>
                    <%= render partial: 'domain', collection: @domains %>
                </tbody>
            </table>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-6">
        <%= paginate @domains %>
    </div>

    <div class="col-md-6 text-right">
        <div class="pagination">
            <%= t(:result_count, count: @domains.total_count) %>
        </div>
    </div>
</div>