mirror of
https://github.com/internetee/registry.git
synced 2025-05-29 17:10:08 +02:00
Merge branch '108869472-objects_archive' into staging
This commit is contained in:
commit
b20a0ae2b2
3 changed files with 27 additions and 17 deletions
|
@ -9,12 +9,12 @@ class Admin::DomainVersionsController < AdminController
|
||||||
search_params = params[:q].deep_dup
|
search_params = params[:q].deep_dup
|
||||||
|
|
||||||
if search_params[:registrant]
|
if search_params[:registrant]
|
||||||
registrant = Contact.find_by(name: search_params[:registrant])
|
registrant = Contact.find_by(name: search_params[:registrant].strip)
|
||||||
search_params.delete(:registrant)
|
search_params.delete(:registrant)
|
||||||
end
|
end
|
||||||
|
|
||||||
if search_params[:registrar]
|
if search_params[:registrar]
|
||||||
registrar = Registrar.find_by(name: search_params[:registrar])
|
registrar = Registrar.find_by(name: search_params[:registrar].strip)
|
||||||
search_params.delete(:registrar)
|
search_params.delete(:registrar)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag :action
|
= label_tag :action
|
||||||
= select_tag '[q][event]', options_for_select([['Update', 'update'], ['Destroy', 'destroy']], params[:q][:event]), { include_blank:true, multiple: false, placeholder: t(:choose), class: 'form-control js-combobox' }
|
= select_tag '[q][event]', options_for_select([['Update', 'update'], ['Destroy', 'destroy'], ['Create', 'create']], params[:q][:event]), { include_blank:true, multiple: false, placeholder: t(:choose), class: 'form-control js-combobox' }
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag t(:results_per_page)
|
= label_tag t(:results_per_page)
|
||||||
|
@ -62,15 +62,18 @@
|
||||||
= t(:action)
|
= t(:action)
|
||||||
%tbody
|
%tbody
|
||||||
- @versions.each do |version|
|
- @versions.each do |version|
|
||||||
- if version.reify
|
- if version
|
||||||
|
- contact = Contact.new(version.object.to_h)
|
||||||
|
- version.object_changes.to_h.each{|k,v| contact[k]=v.last}
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(version.reify.name, admin_contact_version_path(version.id))
|
%td= link_to(contact.name, admin_contact_version_path(version.id))
|
||||||
%td= version.reify.code
|
%td= contact.code
|
||||||
%td= ident_for(version.reify)
|
%td= ident_for(contact)
|
||||||
%td= version.reify.phone
|
%td= contact.phone
|
||||||
%td
|
%td
|
||||||
- if version.reify.registrar
|
- if contact.registrar
|
||||||
= link_to(version.reify.registrar, admin_registrar_path(version.reify.registrar))
|
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
|
||||||
%td= l(version.created_at, format: :short)
|
%td= l(version.created_at, format: :short)
|
||||||
%td= version.event
|
%td= version.event
|
||||||
|
|
||||||
|
@ -79,6 +82,8 @@
|
||||||
.col-md-6
|
.col-md-6
|
||||||
= paginate @versions
|
= paginate @versions
|
||||||
.col-md-6.text-right
|
.col-md-6.text-right
|
||||||
|
.pagination
|
||||||
|
= t(:result_count, count: @versions.total_count)
|
||||||
|
|
||||||
|
|
||||||
:coffee
|
:coffee
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag :action
|
= label_tag :action
|
||||||
= select_tag '[q][event]', options_for_select([['Update', 'update'], ['Destroy', 'destroy']], params[:q][:event]), { include_blank:true, multiple: false, placeholder: t(:choose), class: 'form-control js-combobox' }
|
= select_tag '[q][event]', options_for_select([['Update', 'update'], ['Destroy', 'destroy'], ['Create', 'create']], params[:q][:event]), { include_blank:true, multiple: false, placeholder: t(:choose), class: 'form-control js-combobox' }
|
||||||
.row
|
.row
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.col-md-3
|
.col-md-3
|
||||||
|
@ -55,15 +55,18 @@
|
||||||
= t(:action)
|
= t(:action)
|
||||||
%tbody
|
%tbody
|
||||||
- @versions.each do |version|
|
- @versions.each do |version|
|
||||||
- if version.reify
|
- if version
|
||||||
|
- domain = Domain.new(version.object.to_h)
|
||||||
|
- version.object_changes.to_h.each{|k,v| domain[k]=v.last}
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(version.reify.name, admin_domain_version_path(version.id))
|
%td= link_to(domain.name, admin_domain_version_path(version.id))
|
||||||
%td
|
%td
|
||||||
- if version.reify.registrant
|
- if domain.registrant
|
||||||
= link_to(version.reify.registrant, admin_registrant_path(version.reify.registrant))
|
= domain.registrant
|
||||||
%td
|
%td
|
||||||
- if version.reify.registrar
|
- if domain.registrar
|
||||||
= link_to(version.reify.registrar, admin_registrar_path(version.reify.registrar))
|
= link_to(domain.registrar, admin_registrar_path(domain.registrar))
|
||||||
%td= l(version.created_at, format: :short)
|
%td= l(version.created_at, format: :short)
|
||||||
%td= version.event
|
%td= version.event
|
||||||
|
|
||||||
|
@ -72,6 +75,8 @@
|
||||||
.col-md-6
|
.col-md-6
|
||||||
= paginate @versions
|
= paginate @versions
|
||||||
.col-md-6.text-right
|
.col-md-6.text-right
|
||||||
|
.pagination
|
||||||
|
= t(:result_count, count: @versions.total_count)
|
||||||
|
|
||||||
|
|
||||||
:coffee
|
:coffee
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue