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
|
||||
|
||||
def contact_emails_verification_failed
|
||||
domain.contact_emails_verification_failed.join(', ')
|
||||
end
|
||||
|
||||
def remove_registry_lock_btn
|
||||
return unless domain.locked_by_registrant?
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<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>
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@ class DomainDeleteMailerPreview < ActionMailer::Preview
|
|||
def self.define_forced_templates
|
||||
%w[private_person legal_person invalid_email].each do |template_name|
|
||||
define_method "forced_#{template_name}".to_sym do
|
||||
DomainDeleteMailer.forced(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
registrant: @domain.registrant,
|
||||
domain = Domain.first
|
||||
DomainDeleteMailer.forced(domain: domain,
|
||||
registrar: domain.registrar,
|
||||
registrant: domain.registrant,
|
||||
template_name: template_name)
|
||||
end
|
||||
end
|
||||
|
@ -12,26 +13,25 @@ class DomainDeleteMailerPreview < ActionMailer::Preview
|
|||
|
||||
define_forced_templates
|
||||
|
||||
def initialize
|
||||
@domain = Domain.first
|
||||
super
|
||||
end
|
||||
|
||||
def confirmation_request
|
||||
DomainDeleteMailer.confirmation_request(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
registrant: @domain.registrant)
|
||||
domain = Domain.first
|
||||
DomainDeleteMailer.confirmation_request(domain: domain,
|
||||
registrar: domain.registrar,
|
||||
registrant: domain.registrant)
|
||||
end
|
||||
|
||||
def accepted
|
||||
DomainDeleteMailer.accepted(@domain)
|
||||
domain = Domain.first
|
||||
DomainDeleteMailer.accepted(domain)
|
||||
end
|
||||
|
||||
def rejected
|
||||
DomainDeleteMailer.rejected(@domain)
|
||||
domain = Domain.first
|
||||
DomainDeleteMailer.rejected(domain)
|
||||
end
|
||||
|
||||
def expired
|
||||
DomainDeleteMailer.expired(@domain)
|
||||
domain = Domain.first
|
||||
DomainDeleteMailer.expired(domain)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue