aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorutvk <utvk@users.noreply.github.com>2017-11-10 11:54:00 +0100
committerutvk <utvk@users.noreply.github.com>2017-11-10 11:54:00 +0100
commit73f4fde6655bb8c96d65614bee95557078e79ea8 (patch)
tree2ace1d200226effa93bb28ad8e5b0de6abe05516 /lib
parent043445b4765e3ecf934959777f60c8ea45f9b1b6 (diff)
parent24e140ed1197776f109a2983fafc846d69f82a80 (diff)
Merge remote-tracking branch 'upstream/master' into origin/norway3origin/norway3norway3
Diffstat (limited to 'lib')
-rw-r--r--lib/alavetelitheme.rb15
-rw-r--r--lib/config/custom-routes.rb4
-rw-r--r--lib/views/general/_orglink.html.erb2
-rw-r--r--lib/views/help/about.html.erb30
-rw-r--r--lib/views/help/contact.html.erb2
-rw-r--r--lib/views/help/officers.html.erb22
-rw-r--r--lib/views/help/requesting.html.erb29
7 files changed, 81 insertions, 23 deletions
diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb
index 668d92a..c472d34 100644
--- a/lib/alavetelitheme.rb
+++ b/lib/alavetelitheme.rb
@@ -39,11 +39,26 @@ $alaveteli_route_extensions << 'custom-routes.rb'
['stylesheets', 'images', 'javascripts'].each do |asset_type|
theme_asset_path = File.join(File.dirname(__FILE__),
'..',
+ 'app',
'assets',
asset_type)
Rails.application.config.assets.paths.unshift theme_asset_path
end
+# Append individual theme assets to the asset path
+theme_asset_path = File.join(File.dirname(__FILE__),
+ '..',
+ 'app',
+ 'assets')
+theme_asset_path = Pathname.new(theme_asset_path).cleanpath.to_s
+
+LOOSE_THEME_ASSETS = lambda do |logical_path, filename|
+ filename.start_with?(theme_asset_path) &&
+ !['.js', '.css', ''].include?(File.extname(logical_path))
+end
+
+Rails.application.config.assets.precompile.unshift(LOOSE_THEME_ASSETS)
+
# Tell FastGettext about the theme's translations: look in the theme's
# locale-theme directory for a translation in the first place, and if
# it isn't found, look in the Alaveteli locale directory next:
diff --git a/lib/config/custom-routes.rb b/lib/config/custom-routes.rb
index 98fccf7..efbf95e 100644
--- a/lib/config/custom-routes.rb
+++ b/lib/config/custom-routes.rb
@@ -3,7 +3,7 @@
Rails.application.routes.draw do
# brand new controller example
- # match '/mycontroller' => 'general#mycontroller'
+ # get '/mycontroller' => 'general#mycontroller'
# Additional help page example
- # match '/help/help_out' => 'help#help_out'
+ # get '/help/help_out' => 'help#help_out'
end
diff --git a/lib/views/general/_orglink.html.erb b/lib/views/general/_orglink.html.erb
deleted file mode 100644
index 66002c0..0000000
--- a/lib/views/general/_orglink.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<%# Put the link to your organisation here, or leave blank %>
-<%= link_to image_tag('logo.png'), frontpage_path, :id=>'logo' %>
diff --git a/lib/views/help/about.html.erb b/lib/views/help/about.html.erb
index 36120f1..9f7d7d5 100644
--- a/lib/views/help/about.html.erb
+++ b/lib/views/help/about.html.erb
@@ -32,6 +32,34 @@
it must be kept confidential.
</dd>
+ <dt id="reporting">What if I see a request I feel to be inappropriate? <a href="#reporting">#</a></dt>
+ <dd>
+ <p>
+ Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).
+ </p>
+
+ <p>
+ If you believe a request is not suitable, you can report it for attention by the site administrators.
+ </p>
+ </dd>
+
+ <dt id="reporting_unavailable">Why won't it let me report some requests? <a href="#reporting_unavailable">#</a></dt>
+ <dd>
+ <p>
+ If a request has already been reported to the site administrators, you
+ can't report it a second time - this is to prevent the administrators
+ being notified multiple times about the same issue before they've had
+ a chance to conduct a review.
+ </p>
+
+ <p>
+ Where a request has been previously reported but an administrator has
+ chosen not to hide it from public view, you can use the form in the
+ sidebar of the request page to contact the administrators if you still
+ think it should be hidden.
+ </p>
+ </dd>
+
<dt id="who">Who makes <%= site_name %> ? <a href="#who">#</a> </dt>
<dd><%= site_name %> runs on <a href="http://alaveteli.org">Alaveteli</a>, which was created and run by <a href="http://www.mysociety.org">mySociety</a>,
and was initially <a href="http://www.mysociety.org/2006/12/06/funding-for-freedom-of-information/">funded by the JRSST Charitable Trust</a>. mySociety is a project of the
@@ -49,4 +77,4 @@
<p><strong>Next</strong>, read about <a href="<%= help_requesting_path %>">making requests</a> --&gt;</p>
<div id="hash_link_padding"></div>
-</div> \ No newline at end of file
+</div>
diff --git a/lib/views/help/contact.html.erb b/lib/views/help/contact.html.erb
index 21e5349..2072d0c 100644
--- a/lib/views/help/contact.html.erb
+++ b/lib/views/help/contact.html.erb
@@ -93,7 +93,7 @@
<div class="form_button">
<%= hidden_field_tag(:submitted_contact_form, 1) %>
- <%= submit_tag "Send message to the charity", :disable_with => "Sending..." %>
+ <%= submit_tag "Send message to the charity", :data => { :disable_with => "Sending..." } %>
&lt;-- we run this site, not the Government!
</div>
diff --git a/lib/views/help/officers.html.erb b/lib/views/help/officers.html.erb
index 5a0418f..f6be968 100644
--- a/lib/views/help/officers.html.erb
+++ b/lib/views/help/officers.html.erb
@@ -170,10 +170,13 @@
responses to requests. Please <a href="<%= help_contact_path %>">contact us</a> if we've
missed one.
For technical reasons we don't always remove them from attachments, such as certain PDFs.</p>
- <p>If you need to know what an address was that we've removed, please <a
- href="<%= help_contact_path %>">get in touch with us</a>. Occasionally, an email address
- forms an important part of a response and we will post it up in an obscured
- form in an annotation.
+ <p>If you need to know what an address was that we've removed, please <a
+ href="<%= help_contact_path %>">get in touch with us</a>.
+ <% if AlaveteliConfiguration::enable_annotations %>
+ Occasionally, an email address forms an important part of a response
+ and we will post it up in an obscured form in an annotation.
+ <% end %>
+ </p>
</dd>
<dt id="copyright"><a id="commercial"></a>What is your policy on copyright of documents?<a href="#copyright">#</a> </dt>
@@ -187,10 +190,19 @@
requests, and for good public relations, we'd advise you not to do that.
</dd>
+ <dt id="allowed_responses">My response to an old request on <%= site_name %> has been bounced!<a href="#allowed_responses">#</a> </dt>
+ <dd>After six months of inactivity, <%= site_name %> limits who can respond to a request to stop
+ spammers targeting old requests. At that point, the request can only be responded to by someone who's
+ from the authority. After twelve months, the request is closed to responses from anyone. If you need an
+ old request to be re-opened so that you can respond to it, please <a href="<%= help_contact_path %>">
+ contact us</a>.
+ </dd>
+
+
</dl>
<p><strong>If you haven't already</strong>, read <a href="<%= help_about_path %>">the introduction</a> --&gt;
<br><strong>Otherwise</strong>, the <a href="<%= help_credits_path %>">credits</a> or the <a href="<%= help_api_path %>">programmers API</a> --&gt;
<div id="hash_link_padding"></div>
-</div> \ No newline at end of file
+</div>
diff --git a/lib/views/help/requesting.html.erb b/lib/views/help/requesting.html.erb
index ca6bff7..f85e817 100644
--- a/lib/views/help/requesting.html.erb
+++ b/lib/views/help/requesting.html.erb
@@ -91,9 +91,12 @@
run your campaign, we encourage you to use it to get the information you
need. We also encourage to run your campaign elsewhere - one effective
and very easy way is to <%= link_to 'start your own blog',
- "http://wordpress.com/"%>. You are welcome to link to your campaign
- from this site in an annotation to your request (you can make
- annotations after submitting the request).
+ "http://wordpress.com/"%>.
+ <% if AlaveteliConfiguration::enable_annotations %>
+ You are welcome to link to your campaign from this site in an
+ annotation to your request (you can make annotations after submitting
+ the request).
+ <% end %>
</p>
</dd>
@@ -266,20 +269,22 @@
you can always make the same request again via <%= site_name %>.
</dd>
- <dt id="moderation">How do you moderate request annotations? <a href="#moderation">#</a> </dt>
+ <% if AlaveteliConfiguration::enable_annotations %>
+ <dt id="moderation">How do you moderate request annotations? <a href="#moderation">#</a> </dt>
- <dd>
- <p>Annotations on <%= site_name %> are to help
- people get the information they want, or to give them pointers to places they
- can go to help them act on it. We reserve the right to remove anything else.
- </p>
- <p>Endless, political discussions are not allowed.
- Post a link to a suitable forum or campaign site elsewhere.</p>
<dd>
+ <p>Annotations on <%= site_name %> are to help
+ people get the information they want, or to give them pointers to places they
+ can go to help them act on it. We reserve the right to remove anything else.
+ </p>
+ <p>Endless, political discussions are not allowed.
+ Post a link to a suitable forum or campaign site elsewhere.</p>
+ </dd>
+ <% end %>
</dl>
<p><strong>Next</strong>, read about <a href="<%= help_privacy_path %>">your privacy</a> --&gt;
<div id="hash_link_padding"></div>
-</div> \ No newline at end of file
+</div>