diff options
-rw-r--r-- | app/views/general/blog.rhtml | 99 | ||||
-rw-r--r-- | app/views/general/search.rhtml | 38 | ||||
-rw-r--r-- | app/views/public_body/list.rhtml | 5 | ||||
-rw-r--r-- | app/views/request/_request_filter_form.rhtml | 25 | ||||
-rw-r--r-- | app/views/request/new.rhtml | 2 | ||||
-rw-r--r-- | public/images/arrow-left.png | bin | 0 -> 353 bytes | |||
-rw-r--r-- | public/images/arrow-right.png | bin | 0 -> 439 bytes | |||
-rw-r--r-- | public/images/calendar.png | bin | 0 -> 388 bytes | |||
-rw-r--r-- | public/images/rss-16.png | bin | 0 -> 905 bytes | |||
-rw-r--r-- | public/images/ui-icons-theme.png | bin | 0 -> 4863 bytes | |||
-rw-r--r-- | public/stylesheets/theme.css | 134 |
11 files changed, 212 insertions, 91 deletions
diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.rhtml index f5bd66ebd..4bc23832d 100644 --- a/app/views/general/blog.rhtml +++ b/app/views/general/blog.rhtml @@ -1,56 +1,63 @@ <% @title = "#{site_name} blog and tweets" %> -<h1><%=@title %></h1> - <img src="/images/twitter.png" alt="twitter icon" valign="middle"> <a href="http://www.twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>">Follow us on twitter</a> - <img src="/images/rss.png" alt="RSS icon" valign="middle"> <a href="<%= MySociety::Config.get('BLOG_FEED') %>">Subscribe to blog</a> <% if !@twitter_user.empty? %> -<div id="twitter"> -<script src="http://widgets.twimg.com/j/2/widget.js"></script> -<script type="text/javascript"> -new TWTR.Widget({ - version: 2, - type: 'profile', - rpp: 15, - interval: 6000, - width: 'auto', - height: 500, - theme: { - shell: { - background: '#eaeaea', - color: '#000000' +<div id="right_column"> + <div class="act_link"> + <h2>Stay up to date</h2> + <img src="/images/twitter-16.png" alt="twitter icon" valign="middle"> <a href="http://www.twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>">Follow us on twitter</a><br/><br/> + <img src="/images/feed-16.png" alt="RSS icon" valign="middle"> <a href="<%= MySociety::Config.get('BLOG_FEED') %>">Subscribe to blog</a> + </div> + <div id="twitter"> + <script src="http://widgets.twimg.com/j/2/widget.js"></script> + <script type="text/javascript"> + new TWTR.Widget({ + version: 2, + type: 'profile', + rpp: 15, + interval: 6000, + width: 'auto', + height: 500, + theme: { + shell: { + background: '#eaeaea', + color: '#000000' + }, + tweets: { + background: '#ffffff', + color: '#000000', + links: '#0b004a' + } }, - tweets: { - background: '#ffffff', - color: '#000000', - links: '#0b004a' + features: { + scrollbar: false, + loop: false, + live: false, + hashtags: true, + timestamp: true, + avatars: true, + behavior: 'all' } - }, - features: { - scrollbar: false, - loop: false, - live: false, - hashtags: true, - timestamp: true, - avatars: true, - behavior: 'all' - } -}).render().setUser('<%=@twitter_user %>').start(); -</script> - + }).render().setUser('<%=@twitter_user %>').start(); + </script> + </div> </div> <% end %> -<div id="blog"> - <% for item in @blog_items: %> - <div class="blog_post"> - <h2><a href="<%=item['link']%>"><%=h item['title'] %></a></h2> - <p class="subtitle">Posted on <%= simple_date(Time.parse(item['pubDate'][0])) %> by <%=h item['creator'] %></p> - <div><%= item['encoded'] %></div> - <p><em> - <a href="<%=item['comments'][0]%>"><%=item['comments'][1]%> comments</a> - </em> - </p> - </div> - <% end %> +<div id="left_column"> + <h1><%=@title %></h1> + + <div id="blog"> + <% for item in @blog_items: %> + <div class="blog_post"> + <h2><a href="<%=item['link']%>"><%=h item['title'] %></a></h2> + <p class="subtitle">Posted on <%= simple_date(Time.parse(item['pubDate'][0])) %> by <%=h item['creator'] %></p> + <div><%= item['encoded'] %></div> + <p><em> + <a href="<%=item['comments'][0]%>"><%=item['comments'][1]%> comments</a> + </em> + </p> + </div> + <% end %> + </div> </div> diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index 5e21bc318..f0c5f1576 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -40,21 +40,17 @@ <% if @bodies %> <%= hidden_field_tag 'bodies', 1 %> <% end %> - <%= image_submit_tag 'button-search.png', :title=>"Search" %> + <%= submit_tag _("Search") %> </p> -<fieldset> - <legend> - <%= _("Filters:") %> - </legend> <div id="common-subfilters"> <div id="variety-filter"> - <ul> - <% for variety, label in [ - ["all", _("everything")], - ["requests", _("requests")], + <h3 class="title"><%= _("Showing") %></h3> + <% labels = [ + ["all", _("everything")], + ["requests", _("requests")], ["users", _("users")], ["bodies", _("authorities")]]%> - <li> + <% for variety, label in labels %> <% if @variety_postfix != variety %> <% if variety != "users" %> <%= link_to label, search_url([params[:query], @common_query], variety, @sort_postfix), :method => :get %> @@ -64,9 +60,8 @@ <% else %> <%= label %> <% end %> - </li> + <%= "|" unless variety == labels.last[0]%> <% end %> - </ul> </div> <% if false %> @@ -85,19 +80,19 @@ <% if @variety_postfix == "requests" %> <div id="requests-subfilters"> <div> - <%= _("Only show:") %> <br /> + <h3 class="title"><%= _("Restrict to") %></h3> <% [["successful", _("successful requests")], ["unsuccessful", _("unsuccessful requests")], ["awaiting", _("unresolved requests")], ["internal_review", _("internal reviews")]].each_with_index do |item, index| - - status, title = item %> + status, title = item %> + <%= check_box_tag "latest_status[]", status, params[:latest_status].nil? ? false : params[:latest_status].include?(status), :id => "latest_status_#{index}" %> <%= label_tag("latest_status_#{index}", title) %> <br/> <% end %> </div> <div> - <%= _("Search for words in:") %> <br/> + <h3 class="title"><%= _("Search in") %></h3> <% [["sent", _("messages from users")], ["response", _("messages from authorities")], ["comment", _("comments")]].each_with_index do |item, index| @@ -107,15 +102,16 @@ <%= label_tag("request_variety_#{index}", title) %> <br/> <% end %> </div> - <div> - Search between dates: - <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> - + <div id="date_range"> + <label class="form_label title" for="query">Made between</label> + <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> + <label class="form_label" for="query"> and</label> <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> </div> </div> +<br/> <% end %> - <%= submit_tag("Filter") %> - </fieldset> + <%= submit_tag("Filter") if @variety_postfix == "requests"%> <% end %> <p><%= link_to(_("Advanced search"), advanced_search_url) %></p> <% end %> diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml index aa82ba429..06c7d3be9 100644 --- a/app/views/public_body/list.rhtml +++ b/app/views/public_body/list.rhtml @@ -35,16 +35,15 @@ <% @title = _("Public authorities - {{description}}", :description => @description) %> <div id="left_column"> <h1>Public authorities</h1> -<h2 class="publicbody_results"><%= _('Found {{count}} public bodies {{description}}', :count=>@public_bodies.size, :description=>@description) %></h2> -<% form_tag(list_public_bodies_default_url, :method => "get") do %> +<% form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %> <div> - <%= label_tag(:public_body_query, _("Search:")) %> <%= text_field_tag(:public_body_query, params[:public_body_query]) %> <%= submit_tag(_("Search")) %> </div> <% end %> +<h2 class="publicbody_results"><%= _('Found {{count}} public bodies {{description}}', :count=>@public_bodies.size, :description=>@description) %></h2> <%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %> <%= will_paginate(@public_bodies) %><br/> diff --git a/app/views/request/_request_filter_form.rhtml b/app/views/request/_request_filter_form.rhtml index 33b7bfb27..b13637c25 100644 --- a/app/views/request/_request_filter_form.rhtml +++ b/app/views/request/_request_filter_form.rhtml @@ -2,17 +2,14 @@ <div id="list-filter"> <div class="list-filter-item"> - Showing: - <ul class="request-selector"> - <% for status, label in [["all", _("all requests")], + <h3 class="title">Showing</h3> + <% statuses = [["all", _("all requests")], ["successful", _("successful requests")], ["unsuccessful", _("unsuccessful requests")], ["awaiting", _("unresolved requests")]] %> - <li> - <% if params[:view] != status %> - <% if params[:controller] == "public_body" - - %> + <% for status, label in statuses %> + <% if params[:view] != status %> + <% if params[:controller] == "public_body" %> <%= link_to label, url_for(:controller => "public_body", :action => "show", :view => status, :url_name => @public_body.url_name) + "?" + request.query_string %> <% else %> <%= link_to label, url_for(:controller => "request", :action => "list", :view => status) + "?" + request.query_string %> @@ -20,13 +17,12 @@ <% else %> <%= label %> <% end %> - </li> + <%= "|" unless statuses.last[0] == status %> <% end %> - </ul> </div> - <% form_tag(request.path, :method => "get") do %> + <% form_tag(request.path, :method => "get", :id=>"filter_requests_form") do %> <div class="list-filter-item"> - <%= label_tag(:query, _("Search for:")) %> + <%= label_tag(:query, _("Keywords"), :class=>"form_label title") %> <%= text_field_tag(:query, params[:query]) %> </div> <% if false # don't think we want this, but leaving as an example %> @@ -43,8 +39,9 @@ </div> <% end %> <div class="list-filter-item"> - Search between dates: - <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> - + <%= label_tag(:query, _("Made between"), :class=>"form_label title") %> + <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> + <%= label_tag(:query, _("and"), :class=>"form_label") %> <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> </div> diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index 8f7d00d47..9538065ed 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -31,7 +31,7 @@ <p> <%= text_field_tag 'q', params[:q], { :size => 20 } %> <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %> - <%= submit_tag _("Search"), :class=>"small" %> + <%= submit_tag _("Search") %> </p> <% end %> ... <%= _('to check that the info isn\'t already published.') %> diff --git a/public/images/arrow-left.png b/public/images/arrow-left.png Binary files differnew file mode 100644 index 000000000..74d2fa253 --- /dev/null +++ b/public/images/arrow-left.png diff --git a/public/images/arrow-right.png b/public/images/arrow-right.png Binary files differnew file mode 100644 index 000000000..34dd75ef8 --- /dev/null +++ b/public/images/arrow-right.png diff --git a/public/images/calendar.png b/public/images/calendar.png Binary files differnew file mode 100644 index 000000000..44981a41c --- /dev/null +++ b/public/images/calendar.png diff --git a/public/images/rss-16.png b/public/images/rss-16.png Binary files differnew file mode 100644 index 000000000..d61986a56 --- /dev/null +++ b/public/images/rss-16.png diff --git a/public/images/ui-icons-theme.png b/public/images/ui-icons-theme.png Binary files differnew file mode 100644 index 000000000..f619648da --- /dev/null +++ b/public/images/ui-icons-theme.png diff --git a/public/stylesheets/theme.css b/public/stylesheets/theme.css index 218ada685..fce2bd813 100644 --- a/public/stylesheets/theme.css +++ b/public/stylesheets/theme.css @@ -2,7 +2,7 @@ h1 { color: #93278F; font-size: 42px; font-family: 'DeliciousBold', Arial, sans-serif; - margin-bottom:0px; + margin-bottom:15px; } h2 a { @@ -298,7 +298,8 @@ p.subtitle { color: #A68C2E; } -.icon_failed { +.icon_failed, +.icon_rejected { background-image: url(/images/status-denied.png); color: #C1272D; } @@ -360,9 +361,13 @@ p.subtitle { margin-top:60px; } +#search_form { + margin:0px -6px 20px 0px; +} + #search_form input[type=text] { + margin-right:-6px; font-size: 17px; - padding: 5px; color: #555; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; @@ -371,7 +376,6 @@ p.subtitle { border-width: 1px; width: 250px; height: 18px; - margin-right:-6px; } #search_form input[type=submit] { @@ -467,6 +471,43 @@ span#to_public_body { font-size: 18px; } +#date_range label, +#filter_requests_form label { + display: inline; + float: none; + padding-right: 5px; +} + +#date_range label.title, +#filter_requests_form label.title, +h3.title { + display: inline-block; + float: none; + width:110px; +} + +h3.title { + width: 114px; + margin-bottom: 5px; +} + +#requests-subfilters div { + margin-top: 10px; +} + +#requests-subfilters #latest_status_0, +#requests-subfilters #request_variety_0 { + margin-left: 0px; +} + +#requests-subfilters input[type=checkbox] { + margin-left: 117px; +} + +.list-filter-item { + margin-bottom: 10px; +} + span#to_public_body { font-family: 'DeliciousBold', Arial, sans-serif; } @@ -536,8 +577,22 @@ span#to_public_body { form input[type=text], form input[type=password] { font-size: 14px; - padding: 4px 5px; + padding: 5px; width:200px; + color: #555; + border-radius: 3px; + -moz-border-radius: 3px; + border-style: solid; + border-color: #BBB; + border-width: 1px; +} + +form input.use-datepicker[type=text] { + width: 130px !important; + background: url(/images/calendar.png) no-repeat 115px 3px; + margin: 0px !important; + border-radius:3px !important; + font-size: 14px !important; } form input[type=submit], @@ -680,4 +735,71 @@ div.correspondence { background: url(/images/stripes-70.png); border-width: 0px; font-size: 13px; -}
\ No newline at end of file +} + +/* ---------- Calendar theme ----------- */ + +#ui-datepicker-div.ui-widget { + font-family: Arial, sans-serif; + color: #93278F; +} + +#ui-datepicker-div .ui-datepicker-header, +#ui-datepicker-div .ui-widget-header { + background: none; + border: solid 0px white; + color: #93278F; + font-family: 'DeliciousRoman'; + font-size: 17px; + font-weight: normal; + line-height: 1.5em !important; +} + +#ui-datepicker-div .ui-state-default { + background: #F2F2F2; + border: solid 0px #FFF; + border-radius: 2px; +} + +#ui-datepicker-div .ui-state-default:hover { + background: #DEB4D8; + color: #FFF; +} + +#ui-datepicker-div .ui-state-active { + background: #D093C7; + color: #FFF; +} + +#ui-datepicker-div .ui-icon-circle-triangle-w, +#ui-datepicker-div .ui-icon-circle-triangle-e { + background-image: url(/images/ui-icons-theme.png); +} + +#ui-datepicker-div .ui-datepicker-prev { + margin-top: 2px; + opacity: 0.5; +} + +#ui-datepicker-div .ui-datepicker-prev-hover { + left: 2px; + top: 2px; + border: none; + background:#FFF; + cursor:pointer; + opacity: 1; +} + +#ui-datepicker-div .ui-datepicker-next { + margin-top: 2px; + opacity: 0.5; +} + +#ui-datepicker-div .ui-datepicker-next-hover { + right: 2px; + top: 2px; + border: none; + background:#FFF; + cursor:pointer; + opacity: 1; +} |