diff options
-rw-r--r-- | app/views/general/_frontpage_intro_sentence.rhtml | 6 | ||||
-rw-r--r-- | app/views/general/frontpage.rhtml | 49 | ||||
-rw-r--r-- | app/views/help/about.rhtml | 46 | ||||
-rw-r--r-- | config/environment.rb | 2 | ||||
-rw-r--r-- | public/images/bighand.png | bin | 0 -> 2153 bytes | |||
-rw-r--r-- | public/images/littlehand.png | bin | 0 -> 1113 bytes | |||
-rw-r--r-- | public/stylesheets/main.css | 2 | ||||
-rw-r--r-- | public/stylesheets/theme.css | 75 | ||||
-rw-r--r-- | spec/views/public_body/show.rhtml_spec.rb | 8 |
9 files changed, 114 insertions, 74 deletions
diff --git a/app/views/general/_frontpage_intro_sentence.rhtml b/app/views/general/_frontpage_intro_sentence.rhtml index 2c3bcaf83..4e6dbecb3 100644 --- a/app/views/general/_frontpage_intro_sentence.rhtml +++ b/app/views/general/_frontpage_intro_sentence.rhtml @@ -1,3 +1,3 @@ -First, type in the <strong>name of the UK public authority</strong> you'd -<br>like information from. <strong>By law, they have to respond</strong> -(<a href="<%= help_about_url %>">why?</a>). +<h3>Use your Right to Know</h3> + +Every citizen has the right to access information held by public authorities. <strong>By law, they have to respond</strong>. <a href="<%= help_about_url %>">Find out more about freedom of information.</a> diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml index e8ab7849a..6294e4353 100644 --- a/app/views/general/frontpage.rhtml +++ b/app/views/general/frontpage.rhtml @@ -1,14 +1,22 @@ <% view_cache :ttl => 5.minutes, :tag => I18n.locale do %> -<div id="frontpage_search"> - <h1><%= _('Make or explore Freedom of Information requests') %></h1> + <div class="frontpage-box" id="frontpage-box-1"> + <%= render :partial => 'frontpage_intro_sentence' %> + </div> + + <div class="frontpage-box" id="frontpage-box-2"> + <div id="bighand"> + Make a new <strong>Freedom of Information</strong> request + <br /> + <a href="http://127.0.0.1:3000/en/new/tgq"><img alt="Start-button" src="http://127.0.0.1:3000/images/start-button.png?1314013338"></a> + </div> + </div> + + <div class="frontpage-box" id="frontpage-box-3"> + <div id="littlehand"> + Search over <strong><%= InfoRequest.count %> requests</strong> and <strong><%= PublicBody.count %> authorities</strong>: <% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %> - <p> - <%= render :partial => 'frontpage_intro_sentence' %> - <br> - - <br> <%= text_field_tag 'query', params[:query], { :size => 30 } %> <%= hidden_field_tag 'bodies', 1 %> <%= image_submit_tag 'button-search.png', :title => 'Search' %> @@ -17,17 +25,16 @@ <% @search_examples.each_with_index do |name, i| %> <%=link_to name, search_url(name, 'bodies')%><% if i < 2 %>, <% else %>. <% break %><% end %> <% end %> - - <br> - <br> - <%= _('OR, <strong>search</strong> for information others have requested using {{site_name}}', :site_name => site_name) %> - </p> <% end %> -</div> + </div> + </div> + <div id="frontpage_examples"> <% if @popular_bodies.size > 0 %> <div id="examples_0"> + <h3>Who has the information?</h3> + <%= site_name %> covers requests to <%= PublicBody.count %> authorities, including: <ul> <% for popular_body in @popular_bodies %> <li><%=public_body_link(popular_body)%> @@ -36,23 +43,27 @@ <% end%> </ul> <p><strong> - <%= link_to _('More authorities...'), list_public_bodies_default %> + <%= link_to _('Browse all authorities...'), list_public_bodies_default %> </strong></p> </div> <% end %> - <% if @successful_request_events.size > 0 %> <div id="examples_1"> + <h3>What are people asking?</h3> + <%= site_name %> users have asked <%= InfoRequest.count %> questions. <ul> - <% for event in @successful_request_events %> - <li><%=link_to h(excerpt(event.info_request.title, "", 30)), request_url(event.info_request)%> - <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> + + <% for event in @successful_request_events %> + <li> + <%= public_body_link(event.info_request.public_body) %> answered a question 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> </li> <% end %> </ul> <p><strong><%=link_to _('More successful requests...'), request_list_successful_url %></strong></p> </div> - <% end %> </div> diff --git a/app/views/help/about.rhtml b/app/views/help/about.rhtml index b7fc51234..648ca1fb2 100644 --- a/app/views/help/about.rhtml +++ b/app/views/help/about.rhtml @@ -51,49 +51,3 @@ <div id="hash_link_padding"></div> </div> - -<dt id="purpose">What is <%= site_name %> for? <a href="#purpose">#</a> </dt> -<dd>To help you find out inside information about what the UK government -is doing. -</dd> - -<dt id="premise">How does the site work? <a href="#premise">#</a> </dt> -<dd>You choose the public authority that you would like information from, then -write a brief note describing what you want to know. We then send your request -to the public authority. Any response they make is automatically published on the -website for you and anyone else to find and read. -</dd> - -<dt id="whybother_me">Why would I bother to do this? <a href="#whybother_me">#</a> </dt> -<dd>You pay taxes, and then government does things with the money. All sorts of -things that affect your life, from healthcare through to national defence. Some -it does badly, some it does well. The more we find out about how government -works, the better able we are to make suggestions to improve the things that -are done badly, and to celebrate the things that are done well. -</dd> - -<dt id="whybother_them">Why would the public authority bother to reply? <a href="#whybother_them">#</a> </dt> -<dd>Under Freedom of Information (FOI) law, they have to respond. The response -will either contain the information you want, or give a valid legal reason why -it must be kept confidential. -</dd> - -<dt id="who">Who makes <%= site_name %>? <a href="#who">#</a> </dt> -<dd><%= site_name %> is 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 -registered charity <a href="http://www.ukcod.org.uk/UK_Citizens_Online_Democracy">UK Citizens Online Democracy</a>. -If you like what we're doing, then you can -<a href="https://secure.mysociety.org/donate/">make a donation</a>. -</dd> - -<dt id="updates">How can I keep up with news about <%= site_name %>?<a href="#updates">#</a> </dt> -<dd>We have a <a href="/blog">blog</a> and a <a href="http://www.twitter.com/whatdotheyknow">twitter feed</a>. -</dd> - - -</dl> - -<p><strong>Next</strong>, read about <a href="/help/requesting">making requests</a> --> - - <div id="hash_link_padding"></div> -</div> diff --git a/config/environment.rb b/config/environment.rb index 73cab9201..91da156bb 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -109,7 +109,7 @@ ActionMailer::Base.default_url_options[:host] = MySociety::Config.get("DOMAIN", # So that javascript assets use full URL, so proxied admin URLs read javascript OK if (MySociety::Config.get("DOMAIN", "") != "") ActionController::Base.asset_host = Proc.new { |source, request| - if request.fullpath.match(/^\/admin\//) + if ENV["RAILS_ENV"] != "test" && request.fullpath.match(/^\/admin\//) MySociety::Config.get("ADMIN_PUBLIC_URL", "") else MySociety::Config.get("DOMAIN", 'localhost:3000') diff --git a/public/images/bighand.png b/public/images/bighand.png Binary files differnew file mode 100644 index 000000000..92a4a6105 --- /dev/null +++ b/public/images/bighand.png diff --git a/public/images/littlehand.png b/public/images/littlehand.png Binary files differnew file mode 100644 index 000000000..f7ec82045 --- /dev/null +++ b/public/images/littlehand.png diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 28b2762ab..5710e719c 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -1238,4 +1238,4 @@ div.lang { div#user_locale_switcher { margin: 5px; -}
\ No newline at end of file +} diff --git a/public/stylesheets/theme.css b/public/stylesheets/theme.css index e7d36e1a7..b75540828 100644 --- a/public/stylesheets/theme.css +++ b/public/stylesheets/theme.css @@ -12,6 +12,13 @@ h2, dt { font-weight:normal; } +h3 { + color: #6B3C6A; + font-size: 22px; + font-family: DeliciousRoman; + font-weight: bold; +} + dd { margin:18px 0px 36px 0px; width:auto; @@ -58,6 +65,7 @@ body { position:absolute; left:0px; top:70px; + z-index: 100; } #navigation_search { @@ -418,4 +426,71 @@ ul.no_bullets li { #frontpage_search { background:transparent; +} + + +div.frontpage-box { + background: url(/images/stripes.png); + border: 1px solid #DEBEDD; + border-radius:5px; + font-family:DeliciousRoman; + color: #6B3C6A; + font-size:18px; + padding:15px 12px 0; + text-align:center; + width: 255px; + height: 210px; + float: left; +} + +#frontpage-box-1 { + margin-right: 10px; + vertical-align: middle; +} + +#frontpage-box-2 { + margin-right: 10px; +} + + +#bighand { + padding: 0; + margin: 0; + height: 210px; + background: url(/images/bighand.png) no-repeat scroll 0 bottom transparent; +} + +#littlehand { + padding: 0; + margin: 0; + height: 210px; + background: url(/images/littlehand.png) repeat-x scroll 10px bottom transparent; +} + +#frontpage-box-3 { +} + +#frontpage-box-3 #search_form input[type=text] { + width: 10em; +} + +#frontpage_examples p, +#frontpage_examples ul { + text-align: left; +} +#examples_1 ul li { + border-bottom: 1px solid #ddd; + padding: 5px 0 5px 0; +} + +#frontpage_examples .excerpt { + cursor: hand; + cursor: pointer; + background: url(/images/quote-marks.png) no-repeat; + padding: 0px 0px 0px 40px; + font-size:12px; + color:#444; + line-height:18px; + min-height: 30px; + font-style: italic; }
\ No newline at end of file diff --git a/spec/views/public_body/show.rhtml_spec.rb b/spec/views/public_body/show.rhtml_spec.rb index 7793b9b38..d52e1ac5e 100644 --- a/spec/views/public_body/show.rhtml_spec.rb +++ b/spec/views/public_body/show.rhtml_spec.rb @@ -67,10 +67,10 @@ describe "when viewing a body" do @pb.stub!(:get_tag_values).and_return(['98765', '12345']) render "public_body/show" - response.should have_tag("div#request_sidebar") do + response.should have_tag("div#header_right") do with_tag("a[href*=?]", /charity-commission.gov.uk.*RegisteredCharityNumber=98765$/) end - response.should have_tag("div#request_sidebar") do + response.should have_tag("div#header_right") do with_tag("a[href*=?]", /charity-commission.gov.uk.*RegisteredCharityNumber=12345$/) end end @@ -80,7 +80,7 @@ describe "when viewing a body" do @pb.stub!(:get_tag_values).and_return(['SC1234']) render "public_body/show" - response.should have_tag("div#request_sidebar") do + response.should have_tag("div#header_right") do with_tag("a[href*=?]", /www.oscr.org.uk.*id=SC1234$/) end end @@ -88,7 +88,7 @@ describe "when viewing a body" do it "should not link to Charity Commission site if we don't have number" do render "public_body/show" - response.should have_tag("div#request_sidebar") do + response.should have_tag("div#header_right") do without_tag("a[href*=?]", /charity-commission.gov.uk/) end end |