internetee/registry

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

Summary

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

<%= render 'application/pagination' %>

<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-3">
                            <%= sort_link(@q, 'username') %>
                        </th>
                        <th class="col-xs-3">
                            <%= sort_link(@q, 'registrar_name', Registrar.model_name.human) %>
                        </th>
                        <th class="col-xs-3">
                            <%= sort_link(@q, 'active', ApiUser.human_attribute_name(:active)) %>
                        </th>
                        <th class="col-xs-1">
                            Test status
                        </th>
                    </tr>
                </thead>

                <tbody>
                    <%= render partial: 'api_user', collection: @api_users %>
                </tbody>
            </table>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-6">
        <%= paginate @api_users %>
    </div>
    <div class="col-md-6 text-right">
        <div class="pagination">
            <%= t(:result_count, count: @q.result.count) %>
        </div>
    </div>
</div>