diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/request_controller.rb | 2 | ||||
-rw-r--r-- | app/models/info_request.rb | 20 | ||||
-rw-r--r-- | app/views/layouts/default.rhtml | 6 |
4 files changed, 15 insertions, 14 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 0bfbcd3d1..adb506b91 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -53,6 +53,7 @@ class AdminController < ApplicationController authenticate_or_request_with_http_basic do |user_name, password| if user_name == config_username && password == config_password session[:using_admin] = 1 + request.env['REMOTE_USER'] = user_name else request_http_basic_authentication end diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 4b7884065..1801648ca 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -774,7 +774,7 @@ class RequestController < ApplicationController :email => _("Then you can download a zip file of {{info_request_title}}.",:info_request_title=>info_request.title), :email_subject => _("Log in to download a zip file of {{info_request_title}}",:info_request_title=>info_request.title) ) - updated = Digest::SHA1.hexdigest(info_request.get_last_event.created_at.to_s + info_request.updated_at.to_s) + updated = Digest::SHA1.hexdigest(info_request.get_last_event.created_at.to_i.to_s + info_request.updated_at.to_i.to_s) @url_path = "/download/#{updated[0..1]}/#{updated}/#{params[:url_title]}.zip" file_path = File.join(File.dirname(__FILE__), '../../cache/zips', @url_path) if !File.exists?(file_path) diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 92322f74f..f482ca700 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -240,9 +240,9 @@ public # into some sort of separate jurisdiction dependent file if self.public_body.url_name == 'general_register_office' # without GQ in the subject, you just get an auto response - self.law_used_full + ' request GQ - ' + self.title + _('{{law_used_full}} request GQ - {{title}}',:law_used_full=>self.law_used_full,:title=>self.title) else - self.law_used_full + ' request - ' + self.title + _('{{law_used_full}} request - {{title}}',:law_used_full=>self.law_used_full,:title=>self.title) end end def email_subject_followup(incoming_message = nil) @@ -260,36 +260,36 @@ public # Two sorts of laws for requests, FOI or EIR def law_used_full if self.law_used == 'foi' - return "Freedom of Information" + return _("Freedom of Information") elsif self.law_used == 'eir' - return "Environmental Information Regulations" + return _("Environmental Information Regulations") else raise "Unknown law used '" + self.law_used + "'" end end def law_used_short if self.law_used == 'foi' - return "FOI" + return _("FOI") elsif self.law_used == 'eir' - return "EIR" + return _("EIR") else raise "Unknown law used '" + self.law_used + "'" end end def law_used_act if self.law_used == 'foi' - return "Freedom of Information Act" + return _("Freedom of Information Act") elsif self.law_used == 'eir' - return "Environmental Information Regulations" + return _("Environmental Information Regulations") else raise "Unknown law used '" + self.law_used + "'" end end def law_used_with_a if self.law_used == 'foi' - return "A Freedom of Information request" + return _("A Freedom of Information request") elsif self.law_used == 'eir' - return "An Environmental Information Regulations request" + return _("An Environmental Information Regulations request") else raise "Unknown law used '" + self.law_used + "'" end diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 2af13f342..4008760a1 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -12,7 +12,6 @@ <link rel="shortcut icon" href="/favicon.ico"> <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %> <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all" %> - <%= stylesheet_link_tag 'theme', :rel => "stylesheet", :media => "all" %> <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print" %> <% if !params[:print_stylesheet].nil? %> <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all" %> @@ -35,11 +34,12 @@ <!--[if LT IE 8]> <style type="text/css">@import url("/stylesheets/ie7.css");</style> <![endif]--> - <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> + <!-- the following method for customising CSS is deprecated -- see `doc/THEMES.md for detail --> + <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> <% if force_registration_on_new_request %> <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet" %> <% end %> - + <% if @feed_autodetect %> <% for feed in @feed_autodetect %> <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>"> |