Merge branch 'story/118300251-registrant' into staging

This commit is contained in:
Vladimir Krylov 2016-05-26 16:01:40 +03:00
commit 5d61a12774
2 changed files with 9 additions and 4 deletions

View file

@ -1,4 +1,4 @@
- statuses_link ||= false -#- statuses_link ||= false
- version ||= false - version ||= false
- domain ||= false - domain ||= false
- pending_user ||= false - pending_user ||= false
@ -18,14 +18,19 @@
- dnskeys = domain.dnskeys - dnskeys = domain.dnskeys
- tech_contacts = domain.tech_contacts - tech_contacts = domain.tech_contacts
- admin_contacts = domain.admin_contacts - admin_contacts = domain.admin_contacts
- registrant = [domain.registrant ? domain.registrant : ContactVersion.where(item_id: domain.registrant_id).where(event: :destroy).last.reify] - registrant = domain.registrant
- unless registrant
- ver = ContactVersion.where(item_id: domain.registrant_id).where(event: :destroy).last
- registrant = ver.reify
- registrant.version_loader = ver
- registrant = [registrant]
- creator = pending_user.try(:username) - creator = pending_user.try(:username)
- event = 'pending' - event = 'pending'
%td %td
%p.nowrap %p.nowrap
= l(domain.updated_at, format: :shorts) = l(domain.updated_at, format: :shorts)
- if statuses_link -#- if statuses_link
%br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id]) %br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id])
%p.text-right %p.text-right

View file

@ -19,7 +19,7 @@
%th{class: 'col-xs-2'}= t(:registrar) %th{class: 'col-xs-2'}= t(:registrar)
%tbody %tbody
- if @pending_domain.present? -#- if @pending_domain.present?
%tr.small %tr.small
= render 'admin/domains/partials/version', = render 'admin/domains/partials/version',
domain: @pending_domain, pending_user: @pending_user, statuses_link: true domain: @pending_domain, pending_user: @pending_user, statuses_link: true