diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin_general_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/admin_public_body_change_requests_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/help_controller.rb | 4 | ||||
-rw-r--r-- | app/models/incoming_message.rb | 6 | ||||
-rw-r--r-- | app/views/admin_general/index.html.erb | 8 | ||||
-rw-r--r-- | app/views/public_body/_more_info.html.erb | 10 |
6 files changed, 20 insertions, 23 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb index 753208c9a..f2414eeab 100644 --- a/app/controllers/admin_general_controller.rb +++ b/app/controllers/admin_general_controller.rb @@ -7,13 +7,6 @@ class AdminGeneralController < AdminController def index - # ensure we have a trailing slash - current_uri = request.env['REQUEST_URI'] - if params[:suppress_redirect].nil? && !(current_uri =~ /\/$/) - redirect_to admin_general_index_url + "/" - return - end - # Overview counts of things @public_body_count = PublicBody.count diff --git a/app/controllers/admin_public_body_change_requests_controller.rb b/app/controllers/admin_public_body_change_requests_controller.rb index d76cdc0e5..6ff03a2bd 100644 --- a/app/controllers/admin_public_body_change_requests_controller.rb +++ b/app/controllers/admin_public_body_change_requests_controller.rb @@ -7,8 +7,12 @@ class AdminPublicBodyChangeRequestsController < AdminController def update @change_request = PublicBodyChangeRequest.find(params[:id]) @change_request.close! - @change_request.send_response(params[:subject], params[:response]) - flash[:notice] = 'The change request has been closed and the user has been notified' + if params[:subject] && params[:response] + @change_request.send_response(params[:subject], params[:response]) + flash[:notice] = 'The change request has been closed and the user has been notified' + else + flash[:notice] = 'The change request has been closed' + end redirect_to admin_general_index_path end diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 9033198a0..93215ccad 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -11,6 +11,10 @@ class HelpController < ApplicationController before_filter :long_cache before_filter :catch_spam, :only => [:contact] + def index + redirect_to help_about_path + end + def unhappy @info_request = nil if params[:url_title] diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 135a6bdaf..db6722976 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -693,8 +693,10 @@ class IncomingMessage < ActiveRecord::Base self.reload # get the main body part from the set of attachments we just created, - # not from the self.foi_attachments association - some of the total set of - # self.foi_attachments may now be obsolete + # not from the self.foi_attachments association - some of the total set + # of self.foi_attachments may now be obsolete. Sometimes (e.g. when + # parsing mail from Apple Mail) we can end up with less attachments + # because the hexdigest of an attachment is identical. main_part = get_main_body_text_part(attachments) # we don't use get_main_body_text_internal, as we want to avoid charset # conversions, since /usr/bin/uudecode needs to deal with those. diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb index f29258162..a1f2e1d2d 100644 --- a/app/views/admin_general/index.html.erb +++ b/app/views/admin_general/index.html.erb @@ -183,8 +183,12 @@ <div id="new-authorities" class="accordion-body collapse"> <% for @change_request in @new_body_requests %> <%= render :partial => 'change_request_summary'%> - <%= link_to("Close and respond", admin_change_request_edit_path(@change_request), :class => 'btn') %> - <%= link_to("Add authority", admin_body_new_path(:change_request_id => @change_request.id), :class => 'btn btn-primary') %> + <%= form_tag admin_change_request_update_path(@change_request), :class => "form form-horizontal" do %> + <%= submit_tag 'Close', :class => "btn btn-danger" %> + <%= link_to("Close and respond", admin_change_request_edit_path(@change_request), :class => 'btn') %> + <%= link_to("Add authority", admin_body_new_path(:change_request_id => @change_request.id), :class => 'btn btn-primary') %> + <% end %> + <% end %> </div> </div> diff --git a/app/views/public_body/_more_info.html.erb b/app/views/public_body/_more_info.html.erb index ff419192a..8f0e448b6 100644 --- a/app/views/public_body/_more_info.html.erb +++ b/app/views/public_body/_more_info.html.erb @@ -12,16 +12,6 @@ <%= link_to _('Disclosure log'), public_body.disclosure_log %><br> <% end %> -<% if public_body.has_tag?("charity") %> - <% public_body.get_tag_values("charity").each do |tag_value| %> - <% if tag_value.match(/^SC/) %> - <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %><br> - <% else %> - <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + tag_value %><br> - <% end %> - <% end %> -<% end %> - <%= link_to _('View FOI email address'), view_public_body_email_path(public_body.url_name) %><br> <%= link_to _("Ask us to update FOI email"), new_change_request_path(:body => public_body.url_name) %><br> |