aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/general/frontpage.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/general/frontpage.rhtml')
-rw-r--r--app/views/general/frontpage.rhtml50
1 files changed, 31 insertions, 19 deletions
diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml
index 44b4980df..ee88d23a1 100644
--- a/app/views/general/frontpage.rhtml
+++ b/app/views/general/frontpage.rhtml
@@ -1,29 +1,37 @@
<% 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="/en/new/tgq"><%= image_tag('start-button.png') %></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 %>
- <%= submit_tag _('Search') %>
+ <%= image_submit_tag 'button-search.png', :title => 'Search' %>
<br>
<%= render :partial => 'frontpage_search_examples' %>
- <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)%>
@@ -32,23 +40,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>