mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
story#115762063 - add links to just domain version view
This commit is contained in:
parent
ffe2ddd02c
commit
306819eeaf
1 changed files with 36 additions and 22 deletions
|
@ -2,12 +2,13 @@
|
|||
|
||||
- if @version
|
||||
- children = HashWithIndifferentAccess.new(@version.children)
|
||||
- nameservers = Nameserver.where(id: children[:nameservers])
|
||||
- tech_contacts = Contact.where(id: children[:tech_contacts])
|
||||
- admin_contacts = Contact.where(id: children[:admin_contacts])
|
||||
- registrant = Contact.where(id: children[:registrant])
|
||||
- nameservers = Nameserver.all_versions_for(children[:nameservers], @version.created_at)
|
||||
- tech_contacts = Contact.all_versions_for(children[:tech_contacts], @version.created_at)
|
||||
- admin_contacts = Contact.all_versions_for(children[:admin_contacts], @version.created_at)
|
||||
- registrant = Contact.all_versions_for(children[:registrant], @version.created_at)
|
||||
- event = @version.event
|
||||
- creator = plain_username(@version.terminator)
|
||||
- domain = @version.reify
|
||||
|
||||
|
||||
.row
|
||||
|
@ -22,35 +23,46 @@
|
|||
%dl.dl-horizontal
|
||||
%dt= t(:name)
|
||||
%dd= link_to(@version.reify.name, admin_domain_path(@version.item_id))
|
||||
|
||||
%dt= t(:statuses)
|
||||
%dd
|
||||
%dd{class: @version.object_changes.to_h["statuses"] && "text-warning"}
|
||||
- if @version.reify.statuses.present?
|
||||
- @version.reify.statuses.each do |s|
|
||||
= s
|
||||
|
||||
%dt= t(:registrant)
|
||||
%dd
|
||||
%dd{class: @version.object_changes.to_h["registrant_id"] && "text-warning"}
|
||||
- registrant.each do |r|
|
||||
= r[:name]
|
||||
= r[:phone]
|
||||
= r[:email]
|
||||
= r[:code]
|
||||
%br
|
||||
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
|
||||
= link_to link, target: "contact_#{r.id}" do
|
||||
= r[:name]
|
||||
= r[:phone]
|
||||
= r[:email]
|
||||
= r[:code]
|
||||
%br
|
||||
|
||||
%dt= t(:admin_contacts)
|
||||
%dd
|
||||
- admin_contacts.each do |r|
|
||||
= r[:name]
|
||||
= r[:phone]
|
||||
= r[:email]
|
||||
= r[:code]
|
||||
%br
|
||||
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
|
||||
= link_to link, target: "contact_#{r.id}" do
|
||||
= r[:name]
|
||||
= r[:phone]
|
||||
= r[:email]
|
||||
= r[:code]
|
||||
%br
|
||||
|
||||
%dt= t(:tech_contacts)
|
||||
%dd
|
||||
- tech_contacts.each do |r|
|
||||
= r[:name]
|
||||
= r[:phone]
|
||||
= r[:email]
|
||||
= r[:code]
|
||||
%br
|
||||
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
|
||||
= link_to link, target: "contact_#{r.id}" do
|
||||
= r[:name]
|
||||
= r[:phone]
|
||||
= r[:email]
|
||||
= r[:code]
|
||||
%br
|
||||
|
||||
%dt= t(:nameservers)
|
||||
%dd
|
||||
- nameservers.each do |ns|
|
||||
|
@ -59,7 +71,9 @@
|
|||
= ns[:ipv6]
|
||||
%br
|
||||
%dt= t(:registrar)
|
||||
%dd= @version.reify.registrar.name
|
||||
%dd{class: @version.object_changes.to_h["registrar_id"] && "text-warning"}
|
||||
= link_to admin_registrar_path(domain.registrar), target: "registrar_#{domain.registrar.id}" do
|
||||
= @version.reify.registrar.name
|
||||
%span{:style => "padding-right:10px; padding-top:40px; float: right; bottom: 10px;"}
|
||||
- if @version.previous
|
||||
= link_to(t(:previous),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue