Commit f593618f9b4db32e8ec52687cfed189845409471
1 parent
d3dad5e2
change version, check pdf include css file
Showing
2 changed files
with
3 additions
and
3 deletions
| @@ -200,14 +200,14 @@ module Kanjai | @@ -200,14 +200,14 @@ module Kanjai | ||
| 200 | end | 200 | end |
| 201 | end | 201 | end |
| 202 | 202 | ||
| 203 | - #if params[:format].to_s == 'pdf' | 203 | + if params[:format].to_s == 'pdf' |
| 204 | #css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}" | 204 | #css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}" |
| 205 | file = File.open("#{Rails.root}/public/pdf.css", "r") | 205 | file = File.open("#{Rails.root}/public/pdf.css", "r") |
| 206 | contents = file.read | 206 | contents = file.read |
| 207 | 207 | ||
| 208 | layer.gsub!(/<\/head>/, '<style>'+ contents +'</style></head>') | 208 | layer.gsub!(/<\/head>/, '<style>'+ contents +'</style></head>') |
| 209 | #layer.gsub!(/<meta charset/, '<link rel="stylesheet" href="'+ css_path +'"><meta charset') | 209 | #layer.gsub!(/<meta charset/, '<link rel="stylesheet" href="'+ css_path +'"><meta charset') |
| 210 | - #end | 210 | + end |
| 211 | 211 | ||
| 212 | 212 | ||
| 213 | return layer | 213 | return layer |