mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +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
|
||||
format.pdf do
|
||||
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)
|
||||
|
||||
send_data raw_pdf, filename: 'domains.pdf'
|
||||
|
|
|
@ -47,7 +47,7 @@ class Registrar
|
|||
format.pdf do
|
||||
view = ActionView::Base.new(ActionController::Base.view_paths, contacts: contacts)
|
||||
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)
|
||||
|
||||
send_data raw_pdf, filename: 'contacts.pdf'
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @domains.each do |x| %>
|
||||
<% @domains.each do |domain| %>
|
||||
<tr>
|
||||
<td><%= x.name %></td>
|
||||
<td><%= x.registrant %></td>
|
||||
<td><%= l(x.valid_to, format: :short) %></td>
|
||||
<td><%= x.registrar %></td>
|
||||
<td><%= domain.name %></td>
|
||||
<td><%= domain.registrant %></td>
|
||||
<td><%= l(domain.valid_to, format: :short) %></td>
|
||||
<td><%= domain.registrar %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
|
@ -8,7 +8,7 @@ en:
|
|||
download_csv_btn: Download CSV
|
||||
reset_btn: Reset
|
||||
|
||||
download_list:
|
||||
list_pdf:
|
||||
registrant: Registrant
|
||||
|
||||
partials:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue