aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/public_body/_more_info.html.erb27
-rw-r--r--app/views/public_body/show.html.erb22
2 files changed, 28 insertions, 21 deletions
diff --git a/app/views/public_body/_more_info.html.erb b/app/views/public_body/_more_info.html.erb
new file mode 100644
index 000000000..ff419192a
--- /dev/null
+++ b/app/views/public_body/_more_info.html.erb
@@ -0,0 +1,27 @@
+<h2><%= _('More about this authority')%></h2>
+
+<% if !public_body.calculated_home_page.nil? %>
+ <%= link_to _('Home page of authority'), public_body.calculated_home_page %><br>
+<% end %>
+
+<% if !public_body.publication_scheme.empty? %>
+ <%= link_to _('Publication scheme'), public_body.publication_scheme %><br>
+<% end %>
+
+<% unless public_body.disclosure_log.empty? %>
+ <%= 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>
diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb
index 9352747ea..011aea535 100644
--- a/app/views/public_body/show.html.erb
+++ b/app/views/public_body/show.html.erb
@@ -12,27 +12,7 @@
</p>
<%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
- <h2><%= _('More about this authority')%></h2>
- <% if !@public_body.calculated_home_page.nil? %>
- <%= link_to _('Home page of authority'), @public_body.calculated_home_page %><br>
- <% end %>
- <% if !@public_body.publication_scheme.empty? %>
- <%= link_to _('Publication scheme'), @public_body.publication_scheme %><br>
- <% end %>
- <% unless @public_body.disclosure_log.empty? %>
- <%= link_to _('Disclosure log'), @public_body.disclosure_log %><br>
- <% end %>
- <% if @public_body.has_tag?("charity") %>
- <% for tag_value in @public_body.get_tag_values("charity") %>
- <% 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>
+ <%= render :partial => 'more_info', :locals => { :public_body => @public_body } %>
</div>
<div id="header_left">