105842700-redirect_fix_and template

This commit is contained in:
Stas 2015-12-09 15:29:28 +02:00
parent cd8feaf553
commit ce209b317d
3 changed files with 24 additions and 2 deletions

View file

@ -32,7 +32,7 @@ class ApplicationController < ActionController::Base
if registrar_request?
registrar_root_url
elsif registrant_request?
registrant_root_url
registrant_login_url
elsif admin_request?
admin_root_url
end

View file

@ -36,7 +36,7 @@ class Registrant::DomainsController < RegistrantController
format.csv { render text: @domains.result.to_csv }
format.pdf do
pdf = @domains.result.pdf(render_to_string('registrant/domains/download_list', layout: false))
send_data pdf, filename: 'domains'
send_data pdf, filename: 'domains.pdf'
end
end
end

View file

@ -0,0 +1,22 @@
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-2'}
=t(:name)
%th{class: 'col-xs-2'}
=t(:registrant)
%th{class: 'col-xs-2'}
=t(:valid_to)
%th{class: 'col-xs-2'}
=t(:registrar)
%tbody
- @domains.result.each do |x|
%tr
%td= x.name
%td= x.registrant
%td= l(x.valid_to, format: :short)
%td= x.registrar
.row
.col-md-6