mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Add presenter method & preview
This commit is contained in:
parent
6a4bb6079d
commit
e8c2f33e2d
3 changed files with 19 additions and 15 deletions
|
@ -52,6 +52,10 @@ class DomainPresenter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def contact_emails_verification_failed
|
||||||
|
domain.contact_emails_verification_failed.join(', ')
|
||||||
|
end
|
||||||
|
|
||||||
def remove_registry_lock_btn
|
def remove_registry_lock_btn
|
||||||
return unless domain.locked_by_registrant?
|
return unless domain.locked_by_registrant?
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<p>Lugupeetud domeeni <%= @domain.name %> registreerija/halduskontakt</p>
|
<p>Lugupeetud domeeni <%= @domain.name %> registreerija/halduskontakt</p>
|
||||||
|
|
||||||
<p>Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et domeeni <%= @domain.name %> kontaktandmed on puudulikud - eposti aadress <%= @domain.contact_emails_verification_failed %></p>
|
<p>Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et domeeni <%= @domain.name %> kontaktandmed on puudulikud - eposti aadress <%= @domain.contact_emails_verification_failed %>.</p>
|
||||||
|
|
||||||
<p>Et see olukord on vastuolus .ee <a href='https://www.internet.ee/domains/ee-domain-regulation'>domeenireeglitega</a> algatas EIS <%= @delete_period_length %> päeva pikkuse kustutusmenetluse. Menetluse käigus on domeen <%= @expire_warning_period %> esimest päeva internetis kättesaadav.</p>
|
<p>Et see olukord on vastuolus .ee <a href='https://www.internet.ee/domains/ee-domain-regulation'>domeenireeglitega</a> algatas EIS <%= @delete_period_length %> päeva pikkuse kustutusmenetluse. Menetluse käigus on domeen <%= @expire_warning_period %> esimest päeva internetis kättesaadav.</p>
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,10 @@ class DomainDeleteMailerPreview < ActionMailer::Preview
|
||||||
def self.define_forced_templates
|
def self.define_forced_templates
|
||||||
%w[private_person legal_person invalid_email].each do |template_name|
|
%w[private_person legal_person invalid_email].each do |template_name|
|
||||||
define_method "forced_#{template_name}".to_sym do
|
define_method "forced_#{template_name}".to_sym do
|
||||||
DomainDeleteMailer.forced(domain: @domain,
|
domain = Domain.first
|
||||||
registrar: @domain.registrar,
|
DomainDeleteMailer.forced(domain: domain,
|
||||||
registrant: @domain.registrant,
|
registrar: domain.registrar,
|
||||||
|
registrant: domain.registrant,
|
||||||
template_name: template_name)
|
template_name: template_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -12,26 +13,25 @@ class DomainDeleteMailerPreview < ActionMailer::Preview
|
||||||
|
|
||||||
define_forced_templates
|
define_forced_templates
|
||||||
|
|
||||||
def initialize
|
|
||||||
@domain = Domain.first
|
|
||||||
super
|
|
||||||
end
|
|
||||||
|
|
||||||
def confirmation_request
|
def confirmation_request
|
||||||
DomainDeleteMailer.confirmation_request(domain: @domain,
|
domain = Domain.first
|
||||||
registrar: @domain.registrar,
|
DomainDeleteMailer.confirmation_request(domain: domain,
|
||||||
registrant: @domain.registrant)
|
registrar: domain.registrar,
|
||||||
|
registrant: domain.registrant)
|
||||||
end
|
end
|
||||||
|
|
||||||
def accepted
|
def accepted
|
||||||
DomainDeleteMailer.accepted(@domain)
|
domain = Domain.first
|
||||||
|
DomainDeleteMailer.accepted(domain)
|
||||||
end
|
end
|
||||||
|
|
||||||
def rejected
|
def rejected
|
||||||
DomainDeleteMailer.rejected(@domain)
|
domain = Domain.first
|
||||||
|
DomainDeleteMailer.rejected(domain)
|
||||||
end
|
end
|
||||||
|
|
||||||
def expired
|
def expired
|
||||||
DomainDeleteMailer.expired(@domain)
|
domain = Domain.first
|
||||||
|
DomainDeleteMailer.expired(domain)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue