aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin_public_body/_tags.rhtml2
-rw-r--r--app/views/admin_request/_tags.rhtml8
-rw-r--r--app/views/admin_request/edit.rhtml3
-rw-r--r--app/views/admin_request/show.rhtml1
-rw-r--r--app/views/request/_sidebar.rhtml13
-rw-r--r--app/views/request/new.rhtml17
-rw-r--r--app/views/request/preview.rhtml5
7 files changed, 41 insertions, 8 deletions
diff --git a/app/views/admin_public_body/_tags.rhtml b/app/views/admin_public_body/_tags.rhtml
index 362424013..85dc942fd 100644
--- a/app/views/admin_public_body/_tags.rhtml
+++ b/app/views/admin_public_body/_tags.rhtml
@@ -1,4 +1,4 @@
-<% for t in body.public_body_tags %>
+<% for t in body.tags %>
<% if t.value %>
<%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %>:<%= link_to(h(t.value), main_url(list_public_bodies_url(:tag => t.name_and_value, :only_path => true))) %>
<% else %>
diff --git a/app/views/admin_request/_tags.rhtml b/app/views/admin_request/_tags.rhtml
new file mode 100644
index 000000000..22fbf13c8
--- /dev/null
+++ b/app/views/admin_request/_tags.rhtml
@@ -0,0 +1,8 @@
+<% for t in info_request.tags %>
+ <% if t.value %>
+ <%=h t.name %>:<%=h t.value %>
+ <% else %>
+ <%=h t.name %>
+ <% end %>
+<% end %>
+
diff --git a/app/views/admin_request/edit.rhtml b/app/views/admin_request/edit.rhtml
index 1bfe4cb90..b659c676d 100644
--- a/app/views/admin_request/edit.rhtml
+++ b/app/views/admin_request/edit.rhtml
@@ -41,6 +41,9 @@
<br/>(don't forget to change 'awaiting description' when you set described state)<br/>
</p>
+ <p><label for="info_request_tag_string"><strong>Tags</strong> <small>(space separated, can use key:value)</small></label><br/>
+ <%= text_field 'info_request', 'tag_string', :size => 60 %></p>
+
<p><%= submit_tag 'Save changes', :accesskey => 's' %>
</p>
diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml
index 279d09295..aac68ad2e 100644
--- a/app/views/admin_request/show.rhtml
+++ b/app/views/admin_request/show.rhtml
@@ -43,6 +43,7 @@
</span>
<br>
<strong>Incoming email address:</strong> <%= link_to h(@info_request.incoming_email), "mailto:" + @info_request.incoming_email %> <br>
+<b>Tags:</b> <%= render :partial => 'tags', :locals => { :info_request => @info_request} %> <br>
</p>
<% end %>
diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml
index 4a503d574..5557f0a6b 100644
--- a/app/views/request/_sidebar.rhtml
+++ b/app/views/request/_sidebar.rhtml
@@ -4,6 +4,10 @@
<h2>Act on what you've learnt</h2>
<div class="act_link">
+ <%= link_to '<img src="/images/helpmeinvestigate.png" alt="" class="rss">', "http://helpmeinvestigate.com/"%>
+ <%= link_to 'Get help investigating', "http://helpmeinvestigate.com/"%>
+ </div>
+ <div class="act_link">
<%= link_to '<img src="/images/writetothem.png" alt="" class="rss">', "http://www.writetothem.com"%>
<%= link_to 'Write to your politician', "http://www.writetothem.com"%>
</div>
@@ -11,15 +15,16 @@
<%= link_to '<img src="/images/pledgebank.png" alt="" class="rss">', "http://www.pledgebank.com"%>
<%= link_to 'Pledge with others', "http://www.pledgebank.com"%>
</div>
- <div class="act_link">
+ <!-- <div class="act_link">
<%= link_to '<img src="/images/petitions.png" alt="" class="rss">', "http://petitions.number10.gov.uk"%>
<%= link_to 'Petition the PM', "http://petitions.number10.gov.uk"%>
- </div>
+ </div> -->
<div class="act_link">
<%= link_to '<img src="/images/wordpress.png" alt="" class="rss">', "http://wordpress.com/"%>
<%= link_to 'Start your own blog', "http://wordpress.com/"%>
</div>
+
<% view_cache :ttl => 1.day, :tag => ['similar', @info_request.id] do %>
<% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>
<h2>Similar requests</h2>
@@ -34,6 +39,6 @@
<% end %>
<p><%= link_to "Event history details", request_details_url(@info_request) %></p>
- <p><a href="/help/about#commercial">Are you the owner of
- any commercial copyright on this page?</a></p>
+ <p><small><a href="/help/about#commercial">Are you the owner of
+ any commercial copyright on this page?</a></small></p>
</div>
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml
index b48966e2f..1b061fd46 100644
--- a/app/views/request/new.rhtml
+++ b/app/views/request/new.rhtml
@@ -115,8 +115,8 @@
<%= o.text_area :body, :rows => 20, :cols => 60 %>
</p>
<% end %>
-
- <div class="form_button">
+
+ <div class="form_button">
<script type="text/javascript">document.write('<input name="doSpell" type="button" value="Check spelling" onClick="openSpellChecker(document.getElementById(\'write_form\').body);"/> (optional)')</script>
</div>
@@ -147,7 +147,18 @@
<%= hidden_field_tag(:preview, 1 ) %>
<%= submit_tag "Preview your public request" %>
</div>
- </div>
+
+ <% if !@info_request.tag_string.empty? %>
+ <p class="form_note">
+ <!-- <label class="form_label" for="info_request_tag_string">Tags:</label>
+ <%= f.text_field :tag_string, :size => 50 %> -->
+
+ <%= f.hidden_field(:tag_string) %>
+ <strong>Tags:</strong> <%=h @info_request.tag_string %>
+ </p>
+ <% end %>
+
+ </div>
<% end %>
diff --git a/app/views/request/preview.rhtml b/app/views/request/preview.rhtml
index 427d036d9..97b92ffae 100644
--- a/app/views/request/preview.rhtml
+++ b/app/views/request/preview.rhtml
@@ -34,12 +34,17 @@
<p>
<%= f.hidden_field(:title) %>
<%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <%= f.hidden_field(:tag_string) %>
<%= hidden_field_tag(:submitted_new_request, 1) %>
<%= hidden_field_tag(:preview, 0 ) %>
<%= submit_tag "Re-edit this request", :name => 'reedit' %>
<%= submit_tag "Send public " + h(@info_request.law_used_full) + " request", :name => 'submit' %>
</p>
+ <% if !@info_request.tag_string.empty? %>
+ <p><strong>Tags:</strong> <%=h @info_request.tag_string %></p>
+ <% end %>
+
<% end %>