mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Pagination for domains
This commit is contained in:
parent
8531e50474
commit
11319b6f36
6 changed files with 29 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
class Admin::DomainsController < ApplicationController
|
||||
def index
|
||||
@domains = Domain.all
|
||||
@domains = Domain.order(:name).page(params[:page])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,6 @@ class Domain < ActiveRecord::Base
|
|||
# TODO most inputs should be trimmed before validatation, probably some global logic?
|
||||
|
||||
include EppErrors
|
||||
|
||||
EPP_ATTR_MAP = {
|
||||
owner_contact: 'registrant',
|
||||
name_dirty: 'name',
|
||||
|
|
|
@ -22,3 +22,6 @@
|
|||
%td= link_to(x.owner_contact, root_path)
|
||||
%td= l(x.valid_to, format: :short)
|
||||
%td= link_to(t('shared.edit'), edit_admin_domain_path(x), class: 'btn btn-primary btn-xs')
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @domains
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue