mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Domain History and basic whois rake
This commit is contained in:
parent
660e910208
commit
a6c936e18d
16 changed files with 254 additions and 128 deletions
|
@ -21,19 +21,21 @@
|
|||
- children = YAML.load(version.snapshot)
|
||||
- next unless children.is_a?(Hash)
|
||||
- children = HashWithIndifferentAccess.new(children)
|
||||
- changes = version.changed_elements
|
||||
|
||||
%tr
|
||||
%td
|
||||
%td{ :class => ('edit-highlight' if changes.include?(:domain)) }
|
||||
- if children[:domain]
|
||||
= children[:domain][:name]
|
||||
= children[:domain][:status]
|
||||
%td
|
||||
%td{ :class => ('edit-highlight' if changes.include?(:owner_contact)) }
|
||||
- if children[:owner_contact]
|
||||
%p{:style => "font-size:x-small;"}
|
||||
= children[:owner_contact][:name] + ","
|
||||
= children[:owner_contact][:phone] + ","
|
||||
= children[:owner_contact][:email] + ","
|
||||
= children[:owner_contact][:code]
|
||||
%td
|
||||
%td{ :class => ('edit-highlight' if changes.include?(:admin_contacts)) }
|
||||
- if children[:admin_contacts]
|
||||
- children[:admin_contacts].each do |ac|
|
||||
%p{:style => "font-size:x-small;"}
|
||||
|
@ -41,7 +43,7 @@
|
|||
= ac[:phone] + ","
|
||||
= ac[:email] + ","
|
||||
= ac[:code]
|
||||
%td
|
||||
%td{ :class => ('edit-highlight' if changes.include?(:tech_contacts)) }
|
||||
- if children[:tech_contacts]
|
||||
- children[:tech_contacts].each do |tc|
|
||||
%p{:style => "font-size:x-small;"}
|
||||
|
@ -49,7 +51,7 @@
|
|||
= tc[:phone] + ","
|
||||
= tc[:email] + ","
|
||||
= tc[:code]
|
||||
%td
|
||||
%td{ :class => ('edit-highlight' if changes.include?(:nameservers)) }
|
||||
- if children[:nameservers]
|
||||
- children[:nameservers].each do |ns|
|
||||
%p{:style => "font-size:x-small;"}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
address = @contact.address
|
||||
xml.tag!('contact:postalInfo', type: 'int') do # TODO instance method of defining type
|
||||
xml.tag!('contact:name', @contact.name) if @contact.disclosure.int_name
|
||||
xml.tag!('contact:org', @contact.org_name) if @contact.disclosure.int_org_name
|
||||
if @contact.disclosure.int_addr
|
||||
xml.tag!('contact:addr') do
|
||||
xml.tag!('contact:street', address.street) if address.street
|
||||
xml.tag!('contact:street', address.street2) if address.street2
|
||||
xml.tag!('contact:street', address.street3) if address.street3
|
||||
xml.tag!('contact:cc', address.try(:country).try(:iso)) unless address.try(:country).nil?
|
||||
end
|
||||
xml.tag!('contact:postalInfo', type: 'int') do
|
||||
xml.tag!('contact:name', @contact.name)# if @contact.disclosure.try(:int_name)
|
||||
xml.tag!('contact:org', @contact.org_name)# if @contact.disclosure.try(:int_org_name)
|
||||
#if @contact.disclosure.try(:int_addr)
|
||||
xml.tag!('contact:addr') do
|
||||
xml.tag!('contact:street', address.street) if address.street
|
||||
#xml.tag!('contact:street', address.street2) if address.street2
|
||||
#xml.tag!('contact:street', address.street3) if address.street3
|
||||
xml.tag!('contact:cc', address.try(:country).try(:iso)) unless address.try(:country).nil?
|
||||
xml.tag!('contact:city', address.city)
|
||||
end
|
||||
#end
|
||||
end
|
||||
|
||||
|
|
|
@ -7,9 +7,10 @@ xml.epp_head do
|
|||
xml.resData do
|
||||
xml.tag!('contact:chkData', 'xmlns:contact' => 'urn:ietf:params:xml:ns:contact-1.0') do
|
||||
xml << render('/epp/contacts/postal_info')
|
||||
xml.tag!('contact:voice', @contact.phone) if @contact.disclosure.phone
|
||||
xml.tag!('contact:fax', @contact.fax) if @contact.disclosure.fax
|
||||
xml.tag!('contact:email', @contact.email) if @contact.disclosure.email
|
||||
xml.tag!('contact:id', @contact.code)
|
||||
xml.tag!('contact:voice', @contact.phone) #if @contact.disclosure.try(:phone)
|
||||
xml.tag!('contact:fax', @contact.fax) #if @contact.disclosure.try(:fax)
|
||||
xml.tag!('contact:email', @contact.email) #if @contact.disclosure..try(:email)
|
||||
xml.tag!('contact:clID', @current_epp_user.username) if @current_epp_user
|
||||
xml.tag!('contact:crID', @contact.cr_id ) if @contact.cr_id
|
||||
xml.tag!('contact:crDate', @contact.created_at)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue