mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Merge pull request #159 from internetee/117806281-clickable_actions
117806281 clickable actions
This commit is contained in:
commit
08db5bd547
3 changed files with 25 additions and 8 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
- if domain.present?
|
||||
- if version # normal history
|
||||
- epp_req = ApiLog::EppLog.find_by(uuid: version.uuid).try(:request) if version.uuid
|
||||
- children = HashWithIndifferentAccess.new(version.children)
|
||||
- nameservers = Nameserver.all_versions_for(children[:nameservers], version.created_at)
|
||||
- dnskeys = Dnskey.all_versions_for(children[:dnskeys], version.created_at)
|
||||
|
@ -13,7 +14,9 @@
|
|||
- registrant = Contact.all_versions_for(children[:registrant], version.created_at)
|
||||
- event = version.event
|
||||
- creator = plain_username(version.terminator)
|
||||
- whodunnit = version.try(:whodunnit)
|
||||
- else # pending history
|
||||
- epp_req = false
|
||||
- nameservers = domain.nameservers
|
||||
- dnskeys = domain.dnskeys
|
||||
- tech_contacts = domain.tech_contacts
|
||||
|
@ -26,6 +29,7 @@
|
|||
- registrant = [registrant]
|
||||
- creator = pending_user.try(:username)
|
||||
- event = 'pending'
|
||||
- whodunnit = false
|
||||
|
||||
%td
|
||||
%p.nowrap
|
||||
|
@ -34,8 +38,14 @@
|
|||
%br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id])
|
||||
|
||||
%p.text-right
|
||||
- if (event == 'update' || event == 'create') && epp_req
|
||||
= link_to event, '#', class: 'js-event'
|
||||
- else
|
||||
= event
|
||||
%br
|
||||
- if whodunnit
|
||||
= whodunnit
|
||||
- else
|
||||
= creator
|
||||
- if version
|
||||
%p.text-right
|
||||
|
@ -54,7 +64,7 @@
|
|||
%br
|
||||
- if domain.pending_json.present?
|
||||
%p
|
||||
= link_to t(:pending_epp), '#', class: 'js-pending-toggle'
|
||||
= link_to t(:pending_epp), '#', class: 'js-pending'
|
||||
|
||||
%td{class: changing_css_class(version, "period", "period_unit", "valid_from", "valid_to")}
|
||||
%p
|
||||
|
@ -120,9 +130,15 @@
|
|||
= link_to admin_registrar_path(domain.registrar), target: "registrar_#{domain.registrar.id}" do
|
||||
= domain.registrar.name
|
||||
|
||||
- if (event == 'create' || event == 'update') && epp_req
|
||||
%tr.js-event{ style: 'display: none;' }
|
||||
%td{colspan: 9}
|
||||
%pre
|
||||
= Nokogiri::XML(epp_req)
|
||||
|
||||
- if domain.pending_json.present?
|
||||
%tr.js-pending{ style: 'display: none;' }
|
||||
%td{colspan: 8}
|
||||
%td{colspan: 9}
|
||||
= preserve do
|
||||
%pre
|
||||
- formatted_req = Nokogiri::XML(domain.pending_json['frame'])
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
domain: version.reify, version: version.previous
|
||||
|
||||
:coffee
|
||||
$(document).on 'click', '.js-pending-toggle', (e) ->
|
||||
$(document).on 'click', '.js-pending, .js-event', (e) ->
|
||||
e.preventDefault()
|
||||
|
||||
$(document).on 'mousedown', '.js-pending-toggle', (e) ->
|
||||
$(document).on 'mousedown', '.js-pending, .js-event', (e) ->
|
||||
target = $(e.target)
|
||||
target.parents('tr').next('tr.js-pending').toggle()
|
||||
target.parents('tr').nextUntil('tr.small' ,'tr.' + this.className).toggle()
|
||||
|
|
|
@ -959,3 +959,4 @@ en:
|
|||
verified_confirm: 'Verified status is for cases when current registrant is the one applying for the update. Legal document signed by the registrant is required. Are you sure this update is properly verified with the registrant?'
|
||||
verified: 'Verified'
|
||||
only_estonian_residets_can_signin: "Access currently available only to Estonian citizens and e-residents with Estonian ID-card or Mobile-ID."
|
||||
cant_match_version: 'Impossible match version with request'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue