mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
parent
490ebf969c
commit
adcebd084a
9 changed files with 48 additions and 13 deletions
|
@ -1,5 +1,11 @@
|
||||||
class RegistrantPresenter
|
class RegistrantPresenter
|
||||||
delegate :name, :ident, :email, :priv?, :id_code, :reg_no,
|
delegate :name,
|
||||||
|
:ident,
|
||||||
|
:phone,
|
||||||
|
:email,
|
||||||
|
:priv?,
|
||||||
|
:id_code,
|
||||||
|
:reg_no,
|
||||||
:street, :city, :state, :zip, :country,
|
:street, :city, :state, :zip, :country,
|
||||||
:ident_country,
|
:ident_country,
|
||||||
to: :registrant
|
to: :registrant
|
||||||
|
|
|
@ -17,7 +17,7 @@ Muudatusega seotud domeenid:<br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<br>
|
<br>
|
||||||
Kontaktandmed:<br>
|
Kontaktandmed:<br>
|
||||||
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: contact %>
|
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: contact, with_phone: true %>
|
||||||
<br><br>
|
<br><br>
|
||||||
Lugupidamisega<br>
|
Lugupidamisega<br>
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -40,7 +40,7 @@ Domains affected by this update:<br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<br>
|
<br>
|
||||||
Contact information:<br>
|
Contact information:<br>
|
||||||
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: contact %>
|
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: contact, with_phone: true %>
|
||||||
<br><br>
|
<br><br>
|
||||||
Best Regards,<br>
|
Best Regards,<br>
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -17,7 +17,7 @@ Muudatusega seotud domeenid:
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
Kontaktandmed:
|
Kontaktandmed:
|
||||||
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: contact %>
|
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: contact, with_phone: true %>
|
||||||
|
|
||||||
Lugupidamisega
|
Lugupidamisega
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -40,7 +40,7 @@ Domains affected by this update:
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
Contact information:
|
Contact information:
|
||||||
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: contact %>
|
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: contact, with_phone: true %>
|
||||||
|
|
||||||
Best Regards,
|
Best Regards,
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -4,7 +4,10 @@ Name: <%= registrant.name %><br>
|
||||||
<% else %>
|
<% else %>
|
||||||
Business Registry code: <%= registrant.ident %><br>
|
Business Registry code: <%= registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if address_processing %>
|
<% if local_assigns[:with_phone] -%>
|
||||||
|
Phone: <%= registrant.phone %><br>
|
||||||
|
<% end -%>
|
||||||
|
<% if address_processing -%>
|
||||||
Street: <%= registrant.street %><br>
|
Street: <%= registrant.street %><br>
|
||||||
City: <%= registrant.city %><br>
|
City: <%= registrant.city %><br>
|
||||||
State: <%= registrant.state %><br>
|
State: <%= registrant.state %><br>
|
||||||
|
@ -12,4 +15,4 @@ Name: <%= registrant.name %><br>
|
||||||
Country: <%= registrant.country %>
|
Country: <%= registrant.country %>
|
||||||
<% else %>
|
<% else %>
|
||||||
Country: <%= registrant.ident_country %>
|
Country: <%= registrant.ident_country %>
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
|
@ -4,7 +4,10 @@ Name: <%= registrant.name %>
|
||||||
<% else %>
|
<% else %>
|
||||||
Business Registry code: <%= registrant.ident %>
|
Business Registry code: <%= registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if address_processing %>
|
<% if local_assigns[:with_phone] -%>
|
||||||
|
Phone: <%= registrant.phone %>
|
||||||
|
<% end -%>
|
||||||
|
<% if address_processing -%>
|
||||||
Street: <%= registrant.street %>
|
Street: <%= registrant.street %>
|
||||||
City: <%= registrant.city %>
|
City: <%= registrant.city %>
|
||||||
State: <%= registrant.state %>
|
State: <%= registrant.state %>
|
||||||
|
@ -12,4 +15,4 @@ Name: <%= registrant.name %>
|
||||||
Country: <%= registrant.country %>
|
Country: <%= registrant.country %>
|
||||||
<% else %>
|
<% else %>
|
||||||
Country: <%= registrant.ident_country %>
|
Country: <%= registrant.ident_country %>
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
|
@ -4,7 +4,10 @@ Nimi: <%= registrant.name %><br>
|
||||||
<% else %>
|
<% else %>
|
||||||
Äriregistrikood: <%= registrant.ident %><br>
|
Äriregistrikood: <%= registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if address_processing %>
|
<% if local_assigns[:with_phone] -%>
|
||||||
|
Telefon: <%= registrant.phone %><br>
|
||||||
|
<% end -%>
|
||||||
|
<% if address_processing -%>
|
||||||
Tänav: <%= registrant.street %><br>
|
Tänav: <%= registrant.street %><br>
|
||||||
Linn: <%= registrant.city %><br>
|
Linn: <%= registrant.city %><br>
|
||||||
Maakond: <%= registrant.state %><br>
|
Maakond: <%= registrant.state %><br>
|
||||||
|
@ -12,4 +15,4 @@ Nimi: <%= registrant.name %><br>
|
||||||
Riik: <%= registrant.country(locale: :et) %>
|
Riik: <%= registrant.country(locale: :et) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
Riik: <%= registrant.ident_country(locale: :et) %>
|
Riik: <%= registrant.ident_country(locale: :et) %>
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
|
@ -4,7 +4,10 @@ Nimi: <%= registrant.name %>
|
||||||
<% else %>
|
<% else %>
|
||||||
Äriregistrikood: <%= registrant.ident %>
|
Äriregistrikood: <%= registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if address_processing %>
|
<% if local_assigns[:with_phone] -%>
|
||||||
|
Telefon: <%= registrant.phone %>
|
||||||
|
<% end -%>
|
||||||
|
<% if address_processing -%>
|
||||||
Tänav: <%= registrant.street %>
|
Tänav: <%= registrant.street %>
|
||||||
Linn: <%= registrant.city %>
|
Linn: <%= registrant.city %>
|
||||||
Maakond: <%= registrant.state %>
|
Maakond: <%= registrant.state %>
|
||||||
|
@ -12,4 +15,4 @@ Nimi: <%= registrant.name %>
|
||||||
Riik: <%= registrant.country(locale: :et) %>
|
Riik: <%= registrant.country(locale: :et) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
Riik: <%= registrant.ident_country(locale: :et) %>
|
Riik: <%= registrant.ident_country(locale: :et) %>
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
|
@ -43,6 +43,7 @@ RSpec.describe RegistrantPresenter do
|
||||||
registrant_delegatable_attributes = %i(
|
registrant_delegatable_attributes = %i(
|
||||||
name
|
name
|
||||||
ident
|
ident
|
||||||
|
phone
|
||||||
email
|
email
|
||||||
priv?
|
priv?
|
||||||
street
|
street
|
||||||
|
|
|
@ -21,6 +21,22 @@ RSpec.shared_examples 'domain mailer registrant info' do |template_path|
|
||||||
expect(rendered).to have_text('test ident')
|
expect(rendered).to have_text('test ident')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when :with_phone is true' do
|
||||||
|
it 'has phone' do
|
||||||
|
allow(registrant).to receive(:phone).and_return('test phone')
|
||||||
|
render template: template_path, locals: { with_phone: true }
|
||||||
|
expect(rendered).to have_text('test phone')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when :with_phone is false' do
|
||||||
|
it 'has no phone' do
|
||||||
|
allow(registrant).to receive(:phone).and_return('test phone')
|
||||||
|
render template: template_path, locals: { with_phone: false }
|
||||||
|
expect(rendered).to_not have_text('test phone')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
address_attributes = %i[street city state zip country]
|
address_attributes = %i[street city state zip country]
|
||||||
|
|
||||||
context 'when address processing is enabled' do
|
context 'when address processing is enabled' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue