mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
108869472-modification_for_archive
This commit is contained in:
parent
55c6bac1d8
commit
014c466c47
5 changed files with 24 additions and 17 deletions
|
@ -9,12 +9,12 @@ class Admin::DomainVersionsController < AdminController
|
|||
search_params = params[:q].deep_dup
|
||||
|
||||
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)
|
||||
end
|
||||
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
.col-md-3
|
||||
.form-group
|
||||
= 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
|
||||
.form-group
|
||||
= label_tag t(:results_per_page)
|
||||
|
@ -62,15 +62,18 @@
|
|||
= t(:action)
|
||||
%tbody
|
||||
- @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
|
||||
%td= link_to(version.reify.name, admin_contact_version_path(version.id))
|
||||
%td= version.reify.code
|
||||
%td= ident_for(version.reify)
|
||||
%td= version.reify.phone
|
||||
%td= link_to(contact.name, admin_contact_version_path(version.id))
|
||||
%td= contact.code
|
||||
%td= ident_for(contact)
|
||||
%td= contact.phone
|
||||
%td
|
||||
- if version.reify.registrar
|
||||
= link_to(version.reify.registrar, admin_registrar_path(version.reify.registrar))
|
||||
- if contact.registrar
|
||||
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
|
||||
%td= l(version.created_at, format: :short)
|
||||
%td= version.event
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
= render 'shared/title', name: @version.reify.name
|
||||
- contact = Contact.new(@version.object.to_h)
|
||||
- @version.object_changes.to_h.each{|k,v| contact[k]=v.last}
|
||||
|
||||
- contact = @version.reify
|
||||
= render 'shared/title', name: contact.name
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
.col-md-3
|
||||
.form-group
|
||||
= 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
|
||||
.col-md-3
|
||||
.col-md-3
|
||||
|
@ -55,7 +55,10 @@
|
|||
= t(:action)
|
||||
%tbody
|
||||
- @versions.each do |version|
|
||||
- if domain = version.reify
|
||||
- if version
|
||||
- domain = Domain.new(version.object.to_h)
|
||||
- version.object_changes.to_h.each{|k,v| domain[k]=v.last}
|
||||
|
||||
%tr
|
||||
%td= link_to(domain.name, admin_domain_version_path(version.id))
|
||||
%td
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
= render 'shared/title', name: @version.reify.name
|
||||
|
||||
- if @version
|
||||
- children = HashWithIndifferentAccess.new(@version.children)
|
||||
- nameservers = Nameserver.where(id: children[:nameservers])
|
||||
|
@ -8,8 +6,10 @@
|
|||
- registrant = Contact.where(id: children[:registrant])
|
||||
- event = @version.event
|
||||
- creator = plain_username(@version.terminator)
|
||||
- domain = @version.reify
|
||||
- domain = Domain.new(@version.object.to_h)
|
||||
- @version.object_changes.to_h.each{|k,v| domain[k]=v.last}
|
||||
|
||||
= render 'shared/title', name: domain.name
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue