mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 17:23:34 +02:00
Merge remote-tracking branch 'origin/108869472-objects_archive' into story/115762063--show-historical-nested
# Conflicts: # app/views/admin/domain_versions/_version.haml # app/views/admin/domain_versions/index.haml
This commit is contained in:
commit
5a582d872d
2 changed files with 0 additions and 155 deletions
|
@ -1,111 +0,0 @@
|
|||
- statuses_link ||= false
|
||||
- version ||= false
|
||||
- domain ||= false
|
||||
- pending_user ||= false
|
||||
|
||||
- if domain.present?
|
||||
- if version # normal history
|
||||
- children = HashWithIndifferentAccess.new(version.children)
|
||||
- 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)
|
||||
- else # pending history
|
||||
- nameservers = domain.nameservers
|
||||
- tech_contacts = domain.tech_contacts
|
||||
- admin_contacts = domain.admin_contacts
|
||||
- registrant = [domain.registrant]
|
||||
- creator = pending_user.try(:username)
|
||||
- event = 'pending'
|
||||
|
||||
%td
|
||||
%p.nowrap
|
||||
= l(domain.updated_at, format: :shorts)
|
||||
- if statuses_link
|
||||
%br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id])
|
||||
|
||||
%p.text-right
|
||||
= event
|
||||
%br
|
||||
= creator
|
||||
|
||||
%td{class: version && version.object_changes.to_h["statuses"] && "warning"}
|
||||
%p
|
||||
- if domain.statuses.present?
|
||||
- domain.statuses.each do |s|
|
||||
= s
|
||||
- if domain.status_notes.present?
|
||||
- notes = domain.status_notes[s]
|
||||
- if notes
|
||||
%br
|
||||
%i= notes
|
||||
%br
|
||||
- if domain.pending_json.present?
|
||||
%p
|
||||
= link_to t(:pending_epp), '#', class: 'js-pending-toggle'
|
||||
|
||||
%td{class: version && version.object_changes.to_h.slice("period", "period_unit", "valid_from", "valid_to").any? && "warning"}
|
||||
%p
|
||||
= "#{domain.period}#{domain.period_unit}"
|
||||
%br
|
||||
= "#{l(domain.valid_from, format: :date)}"
|
||||
%br
|
||||
= "#{l(domain.valid_to, format: :date)}"
|
||||
|
||||
%td
|
||||
- Array(registrant).each do |r|
|
||||
= link_to admin_contact_path(r.id), target: "contact_#{r.id}" do
|
||||
%p
|
||||
= r[:name]
|
||||
= r[:phone]
|
||||
= r[:email]
|
||||
%p
|
||||
= r[:code]
|
||||
|
||||
%td
|
||||
- Array(admin_contacts).each do |ac|
|
||||
= link_to admin_contact_path(ac.id), target: "contact_#{ac.id}" do
|
||||
%p
|
||||
= ac[:name]
|
||||
= ac[:phone]
|
||||
= ac[:email]
|
||||
%p
|
||||
= ac[:code]
|
||||
|
||||
%td
|
||||
- Array(tech_contacts).each do |tc|
|
||||
= link_to admin_contact_path(tc.id), target: "contact_#{tc.id}" do
|
||||
%p
|
||||
= tc[:name]
|
||||
= tc[:phone]
|
||||
= tc[:email]
|
||||
%p
|
||||
= tc[:code]
|
||||
|
||||
%td
|
||||
%p
|
||||
- Array(nameservers).each do |ns|
|
||||
= ns[:hostname]
|
||||
%br
|
||||
= ns[:ipv4].presence
|
||||
= ns[:ipv6].presence
|
||||
%br
|
||||
|
||||
%td
|
||||
- if domain.registrar
|
||||
%p
|
||||
= link_to admin_registrar_path(domain.registrar), target: "registrar_#{domain.registrar.id}" do
|
||||
= domain.registrar.name
|
||||
|
||||
- if domain.pending_json.present?
|
||||
%tr.js-pending{ style: 'display: none;' }
|
||||
%td{colspan: 8}
|
||||
= preserve do
|
||||
%pre
|
||||
- formatted_req = Nokogiri::XML(domain.pending_json['frame'])
|
||||
- if formatted_req.errors.none?
|
||||
= formatted_req
|
||||
- else
|
||||
= domain.pending_json['frame']
|
|
@ -1,44 +0,0 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:back_to_domain), [:admin, @domain], class: 'btn btn-default')
|
||||
= render 'shared/title', name: "#{t(:history)}: #{@domain.name}"
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-1'}= t(:timestap)
|
||||
%th{class: 'col-xs-2'}= t(:statuses)
|
||||
%th{class: 'col-xs-1'}= t(:period)
|
||||
%th{class: 'col-xs-2'}= t(:registrant)
|
||||
%th{class: 'col-xs-2'}= t(:admin)
|
||||
%th{class: 'col-xs-2'}= t(:tech)
|
||||
%th{class: 'col-xs-2'}= t(:nameservers)
|
||||
%th{class: 'col-xs-2'}= t(:registrar)
|
||||
|
||||
%tbody
|
||||
- if @pending_domain.present?
|
||||
%tr.small
|
||||
= render 'admin/domain_versions/version',
|
||||
domain: @pending_domain, pending_user: @pending_user, statuses_link: true
|
||||
|
||||
-# current version
|
||||
- if @domain.versions.present?
|
||||
%tr.small
|
||||
= render 'admin/domain_versions/version',
|
||||
domain: @domain, version: @domain.versions.last
|
||||
|
||||
-# all other older versions
|
||||
- @domain.versions.not_creates.reverse.each do |version|
|
||||
%tr.small
|
||||
= render 'admin/domain_versions/version',
|
||||
domain: version.reify, version: version.previous
|
||||
|
||||
:coffee
|
||||
$(document).on 'click', '.js-pending-toggle', (e) ->
|
||||
e.preventDefault()
|
||||
|
||||
$(document).on 'mousedown', '.js-pending-toggle', (e) ->
|
||||
target = $(e.target)
|
||||
target.parents('tr').next('tr.js-pending').toggle()
|
Loading…
Add table
Add a link
Reference in a new issue