mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 01:03:35 +02:00
Updated history pending view #2785
This commit is contained in:
parent
05bcce0669
commit
330c0c326f
3 changed files with 20 additions and 8 deletions
|
@ -9,7 +9,9 @@ class Admin::DomainVersionsController < AdminController
|
||||||
if @domain.pending_json.present?
|
if @domain.pending_json.present?
|
||||||
frame = Nokogiri::XML(@domain.pending_json['frame'])
|
frame = Nokogiri::XML(@domain.pending_json['frame'])
|
||||||
@pending_user = User.find(@domain.pending_json['current_user_id'])
|
@pending_user = User.find(@domain.pending_json['current_user_id'])
|
||||||
@pending_domain = Epp::Domain.new_from_epp(frame, @pending_user)
|
@pending_domain = Epp::Domain.find(@domain.id)
|
||||||
|
@pending_domain.updated_at = @domain.pending_json['domain']['updated_at'].last
|
||||||
|
@pending_domain.update(frame, @pending_user, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# rubocop:enable Style/GuardClause
|
# rubocop:enable Style/GuardClause
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
- tech_contacts = domain.tech_contacts
|
- tech_contacts = domain.tech_contacts
|
||||||
- admin_contacts = domain.admin_contacts
|
- admin_contacts = domain.admin_contacts
|
||||||
- registrant = [domain.registrant]
|
- registrant = [domain.registrant]
|
||||||
- event = ('PENDING<br>' + link_to(t(:manage), edit_admin_domain_path(params[:domain_id]))).html_safe
|
|
||||||
- creator = pending_user.try(:username)
|
- creator = pending_user.try(:username)
|
||||||
|
- event = 'PENDING'
|
||||||
- else # if legacy data not presentable
|
- else # if legacy data not presentable
|
||||||
- nameservers = []
|
- nameservers = []
|
||||||
- tech_contacts = []
|
- tech_contacts = []
|
||||||
|
@ -29,16 +29,25 @@
|
||||||
%td
|
%td
|
||||||
%p.nowrap
|
%p.nowrap
|
||||||
= l(domain.updated_at, format: :short)
|
= l(domain.updated_at, format: :short)
|
||||||
= event
|
|
||||||
%p.text-right
|
%p.text-right
|
||||||
|
= event
|
||||||
|
%br
|
||||||
= creator
|
= creator
|
||||||
|
- if event == 'PENDING'
|
||||||
|
%br= link_to t(:manage), edit_admin_domain_path(params[:domain_id])
|
||||||
|
|
||||||
%td
|
%td
|
||||||
%p
|
%p
|
||||||
= "#{domain.period}#{domain.period_unit}"
|
= "#{domain.period}#{domain.period_unit}"
|
||||||
= "#{l(domain.valid_from, format: :date)} - #{l(domain.valid_to, format: :date)}"
|
%br
|
||||||
|
= "#{l(domain.valid_from, format: :date)}"
|
||||||
|
%br
|
||||||
|
= "#{l(domain.valid_to, format: :date)}"
|
||||||
|
|
||||||
|
%td
|
||||||
%p
|
%p
|
||||||
= domain.status
|
- domain.statuses.each do |s|
|
||||||
|
= s
|
||||||
|
|
||||||
%td
|
%td
|
||||||
- registrant.each do |oc|
|
- registrant.each do |oc|
|
||||||
|
@ -68,8 +77,8 @@
|
||||||
= tc[:code]
|
= tc[:code]
|
||||||
|
|
||||||
%td
|
%td
|
||||||
- nameservers.each do |ns|
|
%p
|
||||||
%p
|
- nameservers.each do |ns|
|
||||||
= ns[:hostname]
|
= ns[:hostname]
|
||||||
%br
|
%br
|
||||||
= ns[:ipv4]
|
= ns[:ipv4]
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th{class: 'col-xs-1'}= t(:timestap)
|
%th{class: 'col-xs-1'}= t(:timestap)
|
||||||
%th{class: 'col-xs-2'}= t(:period)
|
%th{class: 'col-xs-1'}= t(:period)
|
||||||
|
%th{class: 'col-xs-2'}= t(:statuses)
|
||||||
%th{class: 'col-xs-2'}= t(:owner)
|
%th{class: 'col-xs-2'}= t(:owner)
|
||||||
%th{class: 'col-xs-2'}= t(:admin)
|
%th{class: 'col-xs-2'}= t(:admin)
|
||||||
%th{class: 'col-xs-2'}= t(:tech)
|
%th{class: 'col-xs-2'}= t(:tech)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue