aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--app/assets/stylesheets/responsive/_public_body_layout.scss8
-rw-r--r--app/assets/stylesheets/responsive/_public_body_style.scss33
-rw-r--r--app/assets/stylesheets/responsive/_search_layout.scss8
-rw-r--r--app/assets/stylesheets/responsive/_search_style.scss83
-rw-r--r--app/controllers/general_controller.rb5
-rw-r--r--app/views/request/_request_filter_form.html.erb2
-rw-r--r--config/initializers/missing_source_file.rb2
-rwxr-xr-xscript/wad4
-rw-r--r--spec/controllers/general_controller_spec.rb8
11 files changed, 112 insertions, 47 deletions
diff --git a/Gemfile b/Gemfile
index 3de506bcd..eca861681 100644
--- a/Gemfile
+++ b/Gemfile
@@ -33,7 +33,7 @@ gem 'secure_headers', '~> 1.3.4'
gem 'statistics2', '~> 0.54'
gem 'syslog_protocol', '~> 0.9.2'
gem 'thin', '~> 1.5.1'
-gem 'vpim', '~> 13.11.11'
+gem 'vpim', '~> 13.11.11'
gem 'will_paginate', '~> 3.0.5'
# when 1.2.9 is released by the maintainer, we can stop using this fork:
gem 'xapian-full-alaveteli', '~> 1.2.9.5'
diff --git a/Gemfile.lock b/Gemfile.lock
index 847819321..2f88a474e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -100,7 +100,7 @@ GEM
diff-lcs (1.2.4)
dynamic_form (1.1.4)
erubis (2.7.0)
- eventmachine (1.0.3)
+ eventmachine (1.0.7)
exception_notification (3.0.1)
actionmailer (>= 3.0.4)
activesupport (>= 3.0.4)
@@ -263,7 +263,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.7)
+ sqlite3 (1.3.10)
statistics2 (0.54)
syslog_protocol (0.9.2)
text (1.2.1)
diff --git a/app/assets/stylesheets/responsive/_public_body_layout.scss b/app/assets/stylesheets/responsive/_public_body_layout.scss
index 7a9637bc9..2afd67ffb 100644
--- a/app/assets/stylesheets/responsive/_public_body_layout.scss
+++ b/app/assets/stylesheets/responsive/_public_body_layout.scss
@@ -64,10 +64,4 @@
}
-.list-filter-item {
- .title {
- display: inline;
- font-size: 1em;
- font-weight: normal;
- }
-}
+
diff --git a/app/assets/stylesheets/responsive/_public_body_style.scss b/app/assets/stylesheets/responsive/_public_body_style.scss
index 748f6218b..79ee4764a 100644
--- a/app/assets/stylesheets/responsive/_public_body_style.scss
+++ b/app/assets/stylesheets/responsive/_public_body_style.scss
@@ -35,42 +35,9 @@
}
-.list-filter-item {
- ul {
- list-style: none outside none;
- margin: 0;
- padding: 0;
- }
- li {
- display: inline-block;
- &:after {
- content:' | ';
- display: inline-block;
- color: #ccc; //Unsupported browsers will ignore the rgba declaration below
- color: rgba(0,0,0,0.1);
- }
- &:last-child {
- &:after {
- content: '';
- }
- }
-
- }
-}
-
.authority__body__sidebar__links {
a {
display: inline-block;
margin-bottom: 0.5em;
}
}
-
-#list-filter {
- margin-bottom: 3em;
-}
-
-#filter_requests_form label.title {
- display: block;
- width: auto;
- margin-bottom: 0.3em;
-}
diff --git a/app/assets/stylesheets/responsive/_search_layout.scss b/app/assets/stylesheets/responsive/_search_layout.scss
index 48dd0c6a7..93a94f951 100644
--- a/app/assets/stylesheets/responsive/_search_layout.scss
+++ b/app/assets/stylesheets/responsive/_search_layout.scss
@@ -57,3 +57,11 @@
#advanced-search-tips{
@include grid-column(12);
}
+
+.list-filter-item {
+ .title {
+ display: inline;
+ font-size: 1em;
+ font-weight: normal;
+ }
+}
diff --git a/app/assets/stylesheets/responsive/_search_style.scss b/app/assets/stylesheets/responsive/_search_style.scss
index dfd40fc67..94ec1cf88 100644
--- a/app/assets/stylesheets/responsive/_search_style.scss
+++ b/app/assets/stylesheets/responsive/_search_style.scss
@@ -51,4 +51,87 @@ input.use-datepicker[type=text] {
}
}
+.list-filter-item {
+ ul {
+ list-style: none outside none;
+ margin: 0;
+ padding: 0;
+ }
+ li {
+ display: inline-block;
+ }
+}
+
+
+#list-filter {
+ margin-bottom: 3em;
+}
+#filter_requests_form label.title {
+ display: block;
+ width: auto;
+ margin-bottom: 0.3em;
+}
+
+.filter-request-types {
+ display: block;
+ margin-bottom: 1em;
+ @include respond-min( 20em ){
+ display: inline-block;
+ }
+ ul {
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ width: 100%;
+ font-size: 0;
+ border-bottom: 0;
+ @include respond-min( 20em ){
+ border-right: 0;
+ }
+ @include respond-min( 44em ){
+ border-bottom: 1px solid #ccc;
+ }
+ }
+ li {
+ width: 100%;
+ @include respond-min( 20em ){
+ width: 50%;
+ }
+ @include respond-min( 44em ){
+ width: auto;
+ }
+ }
+ a, span {
+ width: 100%;
+ text-align: center;
+ display: block;
+ font-size: 14px;
+ padding: 0.5em 0.75em;
+ border-bottom: 1px solid #ccc;
+ text-decoration: none;
+ @include respond-min( 20em ){
+ display: inline-block;
+ border-right: 1px solid #ccc;
+ border-bottom: 0;
+ &:nth-child(1),
+ &:nth-child(2) {
+ border-bottom: 1px solid #ccc;
+ }
+ }
+
+ @include respond-min( 44em ){
+ &:nth-child(n) {
+ border-bottom: 0;
+ }
+ }
+ }
+ span {
+ font-weight: bold;
+ background-color: #f4f4f4;
+ //older browsers will just see a flat background, new browsers will see an indent
+ -webkit-box-shadow: inset 0 2px 5px 1px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: inset 0 2px 5px 1px rgba(0, 0, 0, 0.1);
+ -o-box-shadow: inset 0 2px 5px 1px rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 2px 5px 1px rgba(0, 0, 0, 0.1);
+ }
+}
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index 438bbfd3f..380da285e 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -15,6 +15,11 @@ class GeneralController < ApplicationController
def frontpage
medium_cache
@locale = self.locale_from_params()
+ successful_query = InfoRequestEvent.make_query_from_params( :latest_status => ['successful'] )
+ @track_thing = TrackThing.create_track_for_search_query(successful_query)
+ @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'),
+ :title => _('Successful requests'),
+ :has_json => true } ]
end
# Display blog entries
diff --git a/app/views/request/_request_filter_form.html.erb b/app/views/request/_request_filter_form.html.erb
index 19961ddfc..549ddb32c 100644
--- a/app/views/request/_request_filter_form.html.erb
+++ b/app/views/request/_request_filter_form.html.erb
@@ -14,7 +14,7 @@
<%= link_to label, url_for(:controller => "request", :action => "list", :view => status) + "?" + request.query_string + '#results' %>
<% end %>
<% else %>
- <%= label %>
+ <span><%= label %></span>
<% end %>
</li>
<% end %>
diff --git a/config/initializers/missing_source_file.rb b/config/initializers/missing_source_file.rb
deleted file mode 100644
index a114fa972..000000000
--- a/config/initializers/missing_source_file.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# For Rails 2.3 on Ruby 1.9.3 @see https://github.com/rails/rails/pull/3745
-MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
diff --git a/script/wad b/script/wad
index 658ce37ef..98830e4a2 100755
--- a/script/wad
+++ b/script/wad
@@ -330,6 +330,8 @@ class Wad
end
def s3_configure
+ return log "ENV['S3_CREDENTIALS'] not present." unless ENV['S3_CREDENTIALS']
+
Presss.config = {
:region => s3_region,
:bucket_name => s3_bucket_name,
@@ -424,7 +426,7 @@ class Wad
end
def self.setup
- new.setup
+ ENV['S3_CREDENTIALS'] ? new.setup : new.install_bundle
end
end
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 128a42556..ae8d4f256 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -102,6 +102,14 @@ describe GeneralController, "when showing the frontpage" do
end
end
+ it 'should generate a feed URL for successful requests' do
+ get :frontpage
+ assigns[:feed_autodetect].size.should == 1
+ successful_request_feed = assigns[:feed_autodetect].first
+ successful_request_feed[:title].should == 'Successful requests'
+ end
+
+
it "should render the front page with default language and ignore the browser setting" do
config = MySociety::Config.load_default()
config['USE_DEFAULT_BROWSER_LANGUAGE'] = false