mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Domain info under history
This commit is contained in:
parent
401a193c8f
commit
c4f6ad0bd9
6 changed files with 43 additions and 67 deletions
|
@ -99,7 +99,12 @@ class Domain < ActiveRecord::Base
|
|||
def make_snapshot
|
||||
{
|
||||
name: name,
|
||||
status: status
|
||||
status: status,
|
||||
period: period,
|
||||
period_unit: period_unit,
|
||||
registrar_id: registrar.try(:id),
|
||||
valid_to: valid_to,
|
||||
valid_from: valid_from
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
%tr.clickable{"data-target" => "#accordion-#{index}", "data-toggle" => "collapse"}
|
||||
%td=version.whodunnit #contact.name if contact
|
||||
%td=version.event #contact.ident if contact
|
||||
%td=version.created_at #contact.email if contact
|
||||
|
||||
%tr
|
||||
%td{colspan: "3"}
|
||||
.collapse{ id: "accordion-#{index}" }
|
||||
.row
|
||||
.col-md-6
|
||||
%dl.dl-horizontal
|
||||
%dt= t('shared.name')
|
||||
%dd= domain.name
|
||||
%dt= t('shared.status')
|
||||
%dd= domain.status
|
||||
%dt= t('shared.valid_from')
|
||||
%dd= domain.valid_from
|
||||
%dt= t('shared.valid_to')
|
||||
%dd= domain.valid_to
|
||||
%dt= t('shared.period')
|
||||
%dd= domain.period
|
||||
%dt= t('shared.period_unit')
|
||||
%dd= domain.period_unit
|
||||
%dt= t('shared.status')
|
||||
%dd= domain.status
|
||||
.col-md-6
|
||||
%dl.dl-horizontal
|
||||
- if domain.nameservers
|
||||
- domain.nameservers.each do |ns|
|
||||
%dt= t('shared.hostname')
|
||||
%dd= ns.hostname
|
||||
%dt= t('shared.ipv4')
|
||||
%dd= ns.ipv4
|
||||
- if domain.domain_statuses
|
||||
- domain.domain_statuses.each do |ds|
|
||||
%dt= t('shared.value')
|
||||
%dd= ds.value
|
||||
%dt= t('shared.description')
|
||||
%dd= ds.description
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
- if domain.owner_contact
|
||||
%h2= t('shared.contacts')
|
||||
= render 'admin/contact_versions/history', contact: domain.owner_contact
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
- if domain.domain_contacts
|
||||
.row
|
||||
- if domain.tech_contacts
|
||||
- domain.tech_contacts.each do |contact|
|
||||
= render 'admin/contact_versions/history', contact: contact
|
||||
- if domain.admin_contacts
|
||||
- domain.admin_contacts.each do |contact|
|
||||
= render 'admin/contact_versions/history', contact: contact
|
|
@ -1,3 +1,18 @@
|
|||
%td{ class: changes.include?(:domain) ? 'edit-highlight' : 'no-highlight' }
|
||||
- if children[:domain]
|
||||
%p{:style => "font-size:x-small;"}
|
||||
= children[:domain][:period]
|
||||
= children[:domain][:period_unit] if children[:domain][:period]
|
||||
- if children[:domain][:valid_to] && children[:domain][:valid_from]
|
||||
= ","
|
||||
= l(children[:domain][:valid_from], format: :date) + '-' + l(children[:domain][:valid_to], format: :date)
|
||||
- if children[:domain].try(:[], :registrar_id)
|
||||
= ","
|
||||
= Registrar.find(children[:domain][:registrar_id]).try(:name)
|
||||
- if children[:domain][:status]
|
||||
= ',' + children[:domain][:status]
|
||||
|
||||
|
||||
%td{ class: changes.include?(:owner_contact) ? 'edit-highlight' : 'no-highlight' }
|
||||
- if children[:owner_contact]
|
||||
%p{:style => "font-size:x-small;"}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
%table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-2'}= t(:'shared.domain_info')
|
||||
%th{class: 'col-xs-2'}= t(:'shared.owner_contact')
|
||||
%th{class: 'col-xs-2'}= t(:'shared.admin_contacts')
|
||||
%th{class: 'col-xs-2'}= t(:'shared.tech_contacts')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue