mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 05:05:45 +02:00
Improve readability
This commit is contained in:
parent
7fbf21daf8
commit
59a6f9d21e
5 changed files with 8 additions and 8 deletions
|
@ -21,7 +21,7 @@ class Registrant::DomainsController < RegistrantController
|
||||||
end
|
end
|
||||||
format.pdf do
|
format.pdf do
|
||||||
view = ActionView::Base.new(ActionController::Base.view_paths, domains: domains)
|
view = ActionView::Base.new(ActionController::Base.view_paths, domains: domains)
|
||||||
raw_html = view.render(file: 'registrant/domains/download_list', layout: false)
|
raw_html = view.render(file: 'registrant/domains/list_pdf', layout: false)
|
||||||
raw_pdf = domains.pdf(raw_html)
|
raw_pdf = domains.pdf(raw_html)
|
||||||
|
|
||||||
send_data raw_pdf, filename: 'domains.pdf'
|
send_data raw_pdf, filename: 'domains.pdf'
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Registrar
|
||||||
format.pdf do
|
format.pdf do
|
||||||
view = ActionView::Base.new(ActionController::Base.view_paths, contacts: contacts)
|
view = ActionView::Base.new(ActionController::Base.view_paths, contacts: contacts)
|
||||||
view.class_eval { include ::ApplicationHelper }
|
view.class_eval { include ::ApplicationHelper }
|
||||||
raw_html = view.render(file: 'registrar/contacts/download_list', layout: false)
|
raw_html = view.render(file: 'registrar/contacts/list_pdf', layout: false)
|
||||||
raw_pdf = contacts.pdf(raw_html)
|
raw_pdf = contacts.pdf(raw_html)
|
||||||
|
|
||||||
send_data raw_pdf, filename: 'contacts.pdf'
|
send_data raw_pdf, filename: 'contacts.pdf'
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @domains.each do |x| %>
|
<% @domains.each do |domain| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= x.name %></td>
|
<td><%= domain.name %></td>
|
||||||
<td><%= x.registrant %></td>
|
<td><%= domain.registrant %></td>
|
||||||
<td><%= l(x.valid_to, format: :short) %></td>
|
<td><%= l(domain.valid_to, format: :short) %></td>
|
||||||
<td><%= x.registrar %></td>
|
<td><%= domain.registrar %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
|
@ -8,7 +8,7 @@ en:
|
||||||
download_csv_btn: Download CSV
|
download_csv_btn: Download CSV
|
||||||
reset_btn: Reset
|
reset_btn: Reset
|
||||||
|
|
||||||
download_list:
|
list_pdf:
|
||||||
registrant: Registrant
|
registrant: Registrant
|
||||||
|
|
||||||
partials:
|
partials:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue