From e3abcac0c91ce15bf0f3736d67f0d05909c16c99 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 1 May 2024 16:02:51 +0100 Subject: [PATCH 1/2] Reorder body more info sidebar Internal links first, then external. --- lib/views/public_body/_more_info.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/views/public_body/_more_info.html.erb b/lib/views/public_body/_more_info.html.erb index b3e4cfc0..25f53780 100644 --- a/lib/views/public_body/_more_info.html.erb +++ b/lib/views/public_body/_more_info.html.erb @@ -1,5 +1,9 @@

<%= _('More about this authority')%>

+<%= link_to _('View FOI email address'), view_public_body_email_path(public_body.url_name) %>
+ +<%= link_to _("Ask us to update FOI email"), new_change_request_body_path(:body => public_body.url_name) %>
+ <% if !public_body.calculated_home_page.nil? %> <%= link_to _('Home page of authority'), public_body.calculated_home_page %>
<% end %> @@ -123,7 +127,3 @@
<% end %> <% end %> - -<%= link_to _('View FOI email address'), view_public_body_email_path(public_body.url_name) %>
- -<%= link_to _("Ask us to update FOI email"), new_change_request_body_path(:body => public_body.url_name) %>
From bda94b99614d14427b61df7cb3f7fbd2457c50a4 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 1 May 2024 16:05:57 +0100 Subject: [PATCH 2/2] Add link to TheyWorkForYou from body sidebar Add a search for mentions of the authority in parliament. Fixes https://github.com/mysociety/whatdotheyknow-theme/issues/1332 --- lib/views/public_body/_more_info.html.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/views/public_body/_more_info.html.erb b/lib/views/public_body/_more_info.html.erb index 25f53780..302028f8 100644 --- a/lib/views/public_body/_more_info.html.erb +++ b/lib/views/public_body/_more_info.html.erb @@ -16,6 +16,13 @@ <%= link_to _('Disclosure log'), public_body.disclosure_log %>
<% end %> +<% twfy_utm_params = { utm_source: 'whatdotheyknow.com', + utm_medium: 'link', + utm_campaign: 'body_page_more_info' } %> +<% twfy_url = %Q[https://www.theyworkforyou.com/search/?q="#{public_body.name}"] %> + +<%= link_to _('Mentions in Parliament'), add_query_params_to_url(twfy_url, twfy_utm_params) %>
+ <% if public_body.has_tag?('charity') %> <% public_body.get_tag_values('charity').each do |tag_value| %> <% if tag_value.match(/^SC/) %>