mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +02:00
105842700-statuses_and_domains
This commit is contained in:
parent
a2f390aa0f
commit
404e52faf6
3 changed files with 57 additions and 1 deletions
30
app/views/registrant/registrants/partials/_domains.haml
Normal file
30
app/views/registrant/registrants/partials/_domains.haml
Normal file
|
@ -0,0 +1,30 @@
|
|||
- domains = contact.all_domains(page: params[:domain_page], per: 20, params: params)
|
||||
#contacts.panel.panel-default
|
||||
.panel-heading
|
||||
.pull-left
|
||||
= t(:domains)
|
||||
.pull-right
|
||||
= form_tag request.path, method: :get do
|
||||
= select_tag :domain_filter, options_for_select(%w(Registrant AdminDomainContact TechDomainContact), selected: params[:domain_filter]),
|
||||
include_blank: true, class: 'form-control2 selectize2'
|
||||
%button.btn.btn-primary
|
||||
%span.glyphicon.glyphicon-search
|
||||
.clearfix
|
||||
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar), :registrar_name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:valid_to), :valid_to
|
||||
%th{class: 'col-xs-3'}= t(:roles)
|
||||
%tbody
|
||||
- domains.each do |x|
|
||||
%tr
|
||||
%td= link_to(x.name, [:registrant, x])
|
||||
%td= link_to(x.registrar, [:registrant, x.registrar])
|
||||
%td= l(x.valid_to, format: :short)
|
||||
%td= x.roles.join(", ")
|
||||
|
||||
= paginate domains, param_name: :domain_page
|
21
app/views/registrant/registrants/partials/_statuses.haml
Normal file
21
app/views/registrant/registrants/partials/_statuses.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
- panel_class = contact.errors.messages[:statuses] ? 'panel-danger' : 'panel-default'
|
||||
#contact_statuses.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
= t(:statuses)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-6'}= t(:status)
|
||||
%th{class: 'col-xs-6'}= t(:notes)
|
||||
%tbody
|
||||
- contact.statuses.each do |status|
|
||||
%tr
|
||||
%td= status
|
||||
%td= contact.status_notes[status]
|
||||
|
||||
- if contact.errors.messages[:statuses]
|
||||
%tfoot
|
||||
- @domain.errors.messages[:statuses].each do |s|
|
||||
%tr
|
||||
%td{colspan: 4}= s
|
|
@ -73,3 +73,8 @@
|
|||
|
||||
%dt= t(:country)
|
||||
%dd= @contact.country
|
||||
|
||||
.row
|
||||
.col-md-12= render 'registrant/registrants/partials/statuses', contact: @contact
|
||||
.row
|
||||
.col-md-12= render 'registrant/registrants/partials/domains', contact: @contact
|
Loading…
Add table
Add a link
Reference in a new issue