aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin_public_body/_form.rhtml20
-rw-r--r--app/views/general/frontpage.rhtml2
-rw-r--r--app/views/layouts/default.rhtml11
-rw-r--r--app/views/layouts/no_chrome.rhtml6
-rw-r--r--app/views/request/_search_ahead.rhtml11
-rw-r--r--app/views/request/new.rhtml11
6 files changed, 35 insertions, 26 deletions
diff --git a/app/views/admin_public_body/_form.rhtml b/app/views/admin_public_body/_form.rhtml
index 6a9013071..1cdc9b3fe 100644
--- a/app/views/admin_public_body/_form.rhtml
+++ b/app/views/admin_public_body/_form.rhtml
@@ -26,20 +26,20 @@
<div id="div-locale-<%=locale.to_s%>">
<%= t.hidden_field :locale, :value => locale.to_s %>
- <p><label for="<%= form_tag_id(t.object_name, :name) %>">Name</label><br/>
- <%= t.text_field :name, :size => 60, :id => form_tag_id(t.object_name, :name) %></p>
+ <p><label for="<%= form_tag_id(t.object_name, :name, locale) %>">Name</label><br/>
+ <%= t.text_field :name, :size => 60, :id => form_tag_id(t.object_name, :name, locale) %></p>
- <p><label for="<%= form_tag_id(t.object_name, :short_name) %>">Short name <small>(only put in abbreviations which are really used, otherwise leave blank. Short or long name is used in the URL - don't worry about breaking URLs through renaming, as the history is used to redirect)</small></label><br/>
- <%= t.text_field :short_name, :size => 60, :id => form_tag_id(t.object_name, :short_name) %></p>
+ <p><label for="<%= form_tag_id(t.object_name, :short_name, locale) %>">Short name <small>(only put in abbreviations which are really used, otherwise leave blank. Short or long name is used in the URL - don't worry about breaking URLs through renaming, as the history is used to redirect)</small></label><br/>
+ <%= t.text_field :short_name, :size => 60, :id => form_tag_id(t.object_name, :short_name, locale) %></p>
- <p><label for="<%= form_tag_id(t.object_name, :request_email) %>">Request email <small>(set to <strong>blank</strong> (empty string) if can't find an address; these emails are <strong>public</strong> as anyone can view with a CAPTCHA)</small></label><br/>
- <%= t.text_field :request_email, :size => 40, :id => form_tag_id(t.object_name, :request_email) %></p>
+ <p><label for="<%= form_tag_id(t.object_name, :request_email, locale) %>">Request email <small>(set to <strong>blank</strong> (empty string) if can't find an address; these emails are <strong>public</strong> as anyone can view with a CAPTCHA)</small></label><br/>
+ <%= t.text_field :request_email, :size => 40, :id => form_tag_id(t.object_name, :request_email, locale) %></p>
- <p><label for="<%= form_tag_id(t.object_name, :publication_scheme) %>">Publication scheme URL</label><br/>
- <%= t.text_field :publication_scheme, :size => 60, :id => form_tag_id(t.object_name, :publication_scheme) %></p>
+ <p><label for="<%= form_tag_id(t.object_name, :publication_scheme, locale) %>">Publication scheme URL</label><br/>
+ <%= t.text_field :publication_scheme, :size => 60, :id => form_tag_id(t.object_name, :publication_scheme, locale) %></p>
- <p><label for="<%= form_tag_id(t.object_name, :notes) %>">Public notes</label> <small>(HTML, for users to consider when making FOI requests to the authority)</small><br/>
- <%= t.text_area :notes, :rows => 3, :cols => 60, :id => form_tag_id(t.object_name, :notes) %></p>
+ <p><label for="<%= form_tag_id(t.object_name, :notes, locale) %>">Public notes</label> <small>(HTML, for users to consider when making FOI requests to the authority)</small><br/>
+ <%= t.text_area :notes, :rows => 3, :cols => 60, :id => form_tag_id(t.object_name, :notes, locale) %></p>
</div>
<%
end
diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml
index 55b00b753..215288791 100644
--- a/app/views/general/frontpage.rhtml
+++ b/app/views/general/frontpage.rhtml
@@ -58,7 +58,7 @@
<ul>
<% for event in @request_events %>
<li>
- <%= public_body_link(event.info_request.public_body) %> answered a request about
+ <%= public_body_link(event.info_request.public_body) %> <%= _('answered a request about') %>
<%=link_to h(event.info_request.title), request_url(event.info_request)%>
<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %>
<p class="excerpt" onclick="document.location.href='<%=request_url(event.info_request)%>'"><%= excerpt(event.info_request.title, "", 200) %></p>
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index 1075ffc03..bd96f1528 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -32,9 +32,10 @@
<style type="text/css">@import url("/stylesheets/ie7.css");</style>
<![endif]-->
<%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %>
- <!-- XXX: add conditional include -->
+ <% 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]%>">
@@ -62,8 +63,8 @@
$(document).ready(function() {
$("#make-request-link").fancybox({
'modal': false,
- 'width': 800,
- 'height': 500,
+ 'width': 900,
+ 'height': 400,
'type': 'iframe',
'href': '/en/profile/sign_in?modal=1',
'onClosed': function() {
@@ -132,9 +133,7 @@
</div>
</div>
<div id="wrapper">
-
<div id="content">
-
<% if flash[:notice] %>
<div id="notice"><%= flash[:notice] %></div>
<% end %>
diff --git a/app/views/layouts/no_chrome.rhtml b/app/views/layouts/no_chrome.rhtml
index c314dfbd3..74c79b701 100644
--- a/app/views/layouts/no_chrome.rhtml
+++ b/app/views/layouts/no_chrome.rhtml
@@ -11,7 +11,9 @@
<script type="text/javascript" src="/javascripts/jquery.js"></script>
- <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %>
+ <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %>
+ <%= stylesheet_link_tag 'fonts', :rel => "stylesheet" %>
+ <%= stylesheet_link_tag 'theme', :rel => "stylesheet" %>
<!--[if LT IE 7]>
<style type="text/css">@import url("/stylesheets/ie6.css");</style>
<![endif]-->
@@ -21,7 +23,7 @@
<%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %>
</head>
<body>
- <div class="entirebody">
+ <div class="entirebody">
<div id="content">
<% if flash[:notice] %>
<div id="notice"><%= flash[:notice] %></div>
diff --git a/app/views/request/_search_ahead.rhtml b/app/views/request/_search_ahead.rhtml
index b8ef7437e..9c49680c3 100644
--- a/app/views/request/_search_ahead.rhtml
+++ b/app/views/request/_search_ahead.rhtml
@@ -1,13 +1,12 @@
-<p>
- <div id="request_search_ahead_results">
+<div id="request_search_ahead_results">
<% if @xapian_requests.results.size > 0 %>
<h3><%= _("Possibly related requests:") %></h3>
<% end %>
<% for result in @xapian_requests.results %>
<%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
<% end %>
- </div>
-</p>
-
-
+ <p>
+ <a id="body-site-search-link" target="_blank"><%= _("Or search in their website for this information.") %></a>
+ </p>
+</div>
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml
index 8dae8467a..355641b63 100644
--- a/app/views/request/new.rhtml
+++ b/app/views/request/new.rhtml
@@ -4,8 +4,16 @@
// Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin:
// http://benalman.com/projects/jquery-throttle-debounce-plugin/
$("#typeahead_search").keypress($.debounce( 300, function() {
- $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value));
+ $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value), function() {
+ // When following links in typeahead results, open new tab/window
+ $("#typeahead_response a").attr("target","_blank");
+
+ // Update the public body site search link
+ $("#body-site-search-link").attr("href", "http://www.google.com/#q="+encodeURI($("#typeahead_search").val())+
+ "+site:<%= @info_request.public_body.calculated_home_page %>");
+ });
}));
+
});
</script>
@@ -84,6 +92,7 @@
<% end %>
)
</div>
+
<div id="typeahead_response">
</div>
</div>