Commit ce2f08c5396df5492f5412b04f6c49b0dc6fdd1c

Authored by Karpikau Andrei
1 parent 7ba772ed

change version, check pdf include css file

... ... @@ -200,12 +200,15 @@ module Kanjai
200 200 end
201 201 end
202 202
203   - if params[:format].to_s == 'pdf'
  203 + #if params[:format].to_s == 'pdf'
204 204 #css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}"
  205 + file = File.open("#{Rails.root}/pdf.css", "r")
  206 + contents = file.read
  207 +
205 208 css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}/pdf.css"
206   - layer.gsub!(/<\/head>/, '<link rel="stylesheet" href="'+ css_path +'"></head>')
  209 + layer.gsub!(/<\/head>/, '<style>'+ contents +'</style></head>')
207 210 #layer.gsub!(/<meta charset/, '<link rel="stylesheet" href="'+ css_path +'"><meta charset')
208   - end
  211 + #end
209 212
210 213
211 214 return layer
... ...
1 1 module Kanjai
2   - VERSION = "0.0.100"
  2 + VERSION = "0.0.101"
3 3 end
... ...