Added last weight column to the listing of bats.  Changed the collection date to Collected with only a year displayed.

<% if bat_list %>

	<%= link_to_remote( "Band",
		:update => 'bats_div',
		:url =>{ :controller => 'bats', :action => 'sort_by_band',
					:ids => bat_list,
					:show_leave_date_and_reason => show_leave_date_and_reason,
					:show_weigh_link => show_weigh_link}) %>

	<%= link_to_remote( "Cage",
		:update => 'bats_div',
		:url =>{ :controller => 'bats', :action => 'sort_by_cage',
					:ids => bat_list,
					:show_leave_date_and_reason => show_leave_date_and_reason,
					:show_weigh_link => show_weigh_link}) %>

	Species
	Gender
	Last Weight
	Collected
	<% if show_leave_date_and_reason %>
		Leave Date
		Leave Reason
	<% end %>

<% for bat in bat_list %>

  <% if show_weigh_link %>
  <%= link_to bat.band, :controller => 'bats', :action => 'weigh_bat', :id => bat %>

	<% if bat.cage %>
	  <%= bat.cage.name %>
	<% else %>
	  <%= 'Inactive' %>
	<% end %>

  <% else %>
	<%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %>

		<% if bat.cage %>
	  <%= link_to bat.cage.name, :controller => 'cages', :action => 'show', :id => bat.cage %>
	<% else %>
	  <%= 'Inactive' %>
	<% end %>

  <% end %>

		<%=h bat.species %>

		<%=h bat.gender %>

    <% if bat.weights.length > 0 %>
          <%=h bat.weights[0].weight %>
    <% else %>
          N/A
    <% end %>

		<%=h bat.collection_date.strftime("%Y") %>

	<% if @list_all %>

		<%=h nice_date_no_day(bat.leave_date) %>

		<%=h bat.leave_reason %>

	<% end %>
	<%= link_to 'Edit', :action => 'edit', :id => bat %>

	<% if bat.leave_date == nil %>
	<%= link_to 'Deactivate', { :action => 'deactivate', :id => bat } %>
	<% else %>
	<%=  link_to 'Reactivate', { :action => 'reactivate', :id => bat } %>
		<% end %>

  <%= link_to 'Weigh Bat', :action => 'weigh_bat', :id => bat %>

<% end %>

<% else %>
No bats
<% end %>

<% if bat_list %>

	<%= link_to_remote( "Band",
		:update => 'bats_div',
		:url =>{ :controller => 'bats', :action => 'sort_by_band',
					:ids => bat_list,
					:show_leave_date_and_reason => show_leave_date_and_reason,
					:show_weigh_link => show_weigh_link}) %>

	<%= link_to_remote( "Cage",
		:update => 'bats_div',
		:url =>{ :controller => 'bats', :action => 'sort_by_cage',
					:ids => bat_list,
					:show_leave_date_and_reason => show_leave_date_and_reason,
					:show_weigh_link => show_weigh_link}) %>

	Species
	Gender
	Collection Date
	<% if show_leave_date_and_reason %>
		Leave Date
		Leave Reason
	<% end %>

<% for bat in bat_list %>

  <% if show_weigh_link %>
  <%= link_to bat.band, :controller => 'bats', :action => 'weigh_bat', :id => bat %>

	<% if bat.cage %>
	  <%= bat.cage.name %>
	<% else %>
	  <%= 'Inactive' %>
	<% end %>

  <% else %>
	<%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %>

		<% if bat.cage %>
	  <%= link_to bat.cage.name, :controller => 'cages', :action => 'show', :id => bat.cage %>
	<% else %>
	  <%= 'Inactive' %>
	<% end %>

  <% end %>

		<%=h bat.species %>

		<%=h bat.gender %>

		<%=h nice_date_no_day(bat.collection_date) %>

	<% if @list_all %>

		<%=h nice_date_no_day(bat.leave_date) %>

		<%=h bat.leave_reason %>

	<% end %>
	<%= link_to 'Edit', :action => 'edit', :id => bat %>

	<% if bat.leave_date == nil %>
	<%= link_to 'Deactivate', { :action => 'deactivate', :id => bat } %>
	<% else %>
	<%=  link_to 'Reactivate', { :action => 'reactivate', :id => bat } %>
		<% end %>

  <%= link_to 'Weigh Bat', :action => 'weigh_bat', :id => bat %>

<% end %>

<% else %>
No bats
<% end %>


Change apply to submit button

Change apply to submit button

<% html_title(l(:charts_menu_label)) -%>

<% content_for :header_tags do %>
  <%= javascript_include_tag '/plugin_assets/open_flash_chart/javascripts/swfobject.js' %>
  <%= javascript_include_tag '/plugin_assets/redmine_charts/javascripts/charts.js' %>
<% end %>

<% content_for :sidebar do %>

<%= l(:charts_menu_label) %>

  <%= show_charts_menu %>

  <% unless @saved_conditions.empty? %>

<%= l(:charts_saved_conditions_label) %>

    <% @saved_conditions.each do |saved_condition| %>
      <%= link_to(saved_condition.name, "#{url_for(:controller => "charts_#{saved_condition.chart}".to_sym, :project_id => @project)}?#{saved_condition.conditions}&saved_condition_id=#{saved_condition.id}") %>

    <% end %>
  <% end %>
<% end %>

  <% if @saved_condition && User.current.allowed_to?(:save_charts, @project, :global => true) %>
	<%= link_to l(:button_delete_condition), {:action => 'destroy_saved_condition', :project_id => @project, :id => @saved_condition.id}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
  <% end %>

<%= @title %><%= " - #{@saved_condition.name}" if @saved_condition %>

<% form_tag '#', :method => :get, :id => 'chart_form' do %>

  <%= hidden_field_tag :page, @page %>
  <%= hidden_field_tag :project_id, @project.id %>
  <%= hidden_field_tag :saved_condition_id, @saved_condition ? @saved_condition.id : nil %>
  <%= hidden_field_tag :chart_form_action, "", :id => "chart_form_action" %>

    <% if @help %>

<%= @help %>

    <% end %>

    <fieldset id="filters" class="collapsible">
      <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>

        <%= render :partial => 'charts/filters' %>

    </fieldset>

    <%= submit_tag l(:button_apply), :class => 'button-small', :onclick => "$('chart_form_action').value = ''; $('page') = '1'; $('chart_form').submit(); return false;" %>

    <%= link_to l(:button_clear), {}, :class => 'icon icon-reload' %>

    <% if User.current.allowed_to?(:save_charts, @project, :global => true) %>
      <% if @saved_condition %>
        <%= link_to l(:button_save_condition), {}, :onclick => "$('saved_condition_create').hide(); $('saved_condition_update').show(); return false;", :class => 'icon icon-save' %>
        <%= link_to l(:button_save_condition_as_new), {}, :onclick => "$('saved_condition_update').hide(); $('saved_condition_create').show(); return false;", :class => 'icon icon-save' %>
      <% else %>
        <%= link_to l(:button_save_condition), {}, :onclick => "$('saved_condition_create').show(); return false;", :class => 'icon icon-save' %>
      <% end %>
    <% end %>

  <% if User.current.allowed_to?(:save_charts, @project, :global => true) %>
    <%= render :partial => 'charts/saved_conditions' %>
  <% end %>

  <% unless @error %>
    <%= show_graph(@data) %>

    <% if @show_pages %>

        <%= show_pages(@page, @pages) %>

    <% end %>

    <% if @date_condition %>

        <%= show_date_condition(@range[:limit], @range[:range], @range[:offset]) %>

    <% end %>

  <% end %>

<% end %>

<% html_title(l(:charts_menu_label)) -%>

<% content_for :header_tags do %>
  <%= javascript_include_tag '/plugin_assets/open_flash_chart/javascripts/swfobject.js' %>
  <%= javascript_include_tag '/plugin_assets/redmine_charts/javascripts/charts.js' %>
<% end %>

<% content_for :sidebar do %>

<%= l(:charts_menu_label) %>

  <%= show_charts_menu %>

  <% unless @saved_conditions.empty? %>

<%= l(:charts_saved_conditions_label) %>

    <% @saved_conditions.each do |saved_condition| %>
      <%= link_to(saved_condition.name, "#{url_for(:controller => "charts_#{saved_condition.chart}".to_sym, :project_id => @project)}?#{saved_condition.conditions}&saved_condition_id=#{saved_condition.id}") %>

    <% end %>
  <% end %>
<% end %>

  <% if @saved_condition && User.current.allowed_to?(:save_charts, @project, :global => true) %>
	<%= link_to l(:button_delete_condition), {:action => 'destroy_saved_condition', :project_id => @project, :id => @saved_condition.id}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
  <% end %>

<%= @title %><%= " - #{@saved_condition.name}" if @saved_condition %>

<% form_tag '#', :method => :get, :id => 'chart_form' do %>

  <%= hidden_field_tag :page, @page %>
  <%= hidden_field_tag :project_id, @project.id %>
  <%= hidden_field_tag :saved_condition_id, @saved_condition ? @saved_condition.id : nil %>
  <%= hidden_field_tag :chart_form_action, "", :id => "chart_form_action" %>

    <% if @help %>

<%= @help %>

    <% end %>

    <fieldset id="filters" class="collapsible">
      <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>

        <%= render :partial => 'charts/filters' %>

    </fieldset>

    <%= link_to l(:button_apply), {}, :onclick => "$('chart_form_action').value = ''; $('page') = '1'; $('chart_form').submit(); return false;", :class => 'icon icon-checked' %>

    <%= link_to l(:button_clear), {}, :class => 'icon icon-reload' %>

    <% if User.current.allowed_to?(:save_charts, @project, :global => true) %>
      <% if @saved_condition %>
        <%= link_to l(:button_save_condition), {}, :onclick => "$('saved_condition_create').hide(); $('saved_condition_update').show(); return false;", :class => 'icon icon-save' %>
        <%= link_to l(:button_save_condition_as_new), {}, :onclick => "$('saved_condition_update').hide(); $('saved_condition_create').show(); return false;", :class => 'icon icon-save' %>
      <% else %>
        <%= link_to l(:button_save_condition), {}, :onclick => "$('saved_condition_create').show(); return false;", :class => 'icon icon-save' %>
      <% end %>
    <% end %>

  <% if User.current.allowed_to?(:save_charts, @project, :global => true) %>
    <%= render :partial => 'charts/saved_conditions' %>
  <% end %>

  <% unless @error %>
    <%= show_graph(@data) %>

    <% if @show_pages %>

        <%= show_pages(@page, @pages) %>

    <% end %>

    <% if @date_condition %>

        <%= show_date_condition(@range[:limit], @range[:range], @range[:offset]) %>

    <% end %>

  <% end %>

<% end %>


Modified copyright notice and provided a source link

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

  <%= stylesheet_link_tag 'andreas06' %>
  <%= javascript_include_tag :defaults %>
  <%= calendar_date_select_includes "freelibrary" %>

Skip to: site menu | section menu | main content

e.f.l.

		Edmonton Free Library

Site menu:

		Welcome |

		<%= link_to 'books', books_path, :class => 'navitab' %> |
		<%= link_to 'video', videos_path, :class => 'navitab' %> |

<%= link_to 'tags', tags_path, :class => 'navitab' %> |
        find out more |

Back to top

e.f.l.

					<% if current_user %>
						<%= user_link current_user, :class => 'nav' %>

                        <%= link_to 'loans', {:controller => 'loans'}, :class=> 'nav' %>

                        <%= link_to 'edit profile', {:controller => 'account'}, :class =>'nav' %>

					<% else %>
						<%= link_to 'log in', {:controller => 'account', :action => 'login'}, :class=> 'nav' %>

						<%= link_to 'new account', {:controller => 'account', :action => 'signup'}, :class=> 'nav' %>

					<% end %>
					<%= controller_side_links %>
					<% if current_user %>
						<%= link_to 'log out', {:controller => 'account', :action => 'logout'}, :class=> 'nav' %>
					<% end %>
					Back to top

					<% if flash[:notice] %>

              Notice:

<%= flash[:notice].untaint %>

					<% elsif flash[:error] %>

              Error:

<%= flash[:error].untaint %>

					<% end %>

					<%= yield  %>

Back to top

Copyright 2009 Michael Edwards, Brendan Taylor (source) | Design by Andreas Viklund

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

  <%= stylesheet_link_tag 'andreas06' %>
  <%= javascript_include_tag :defaults %>
  <%= calendar_date_select_includes "freelibrary" %>

Skip to: site menu | section menu | main content

e.f.l.

		Edmonton Free Library

Site menu:

		Welcome |

		<%= link_to 'books', books_path, :class => 'navitab' %> |
		<%= link_to 'video', videos_path, :class => 'navitab' %> |

<%= link_to 'tags', tags_path, :class => 'navitab' %> |
        find out more |

Back to top

e.f.l.

					<% if current_user %>
						<%= user_link current_user, :class => 'nav' %>

                        <%= link_to 'loans', {:controller => 'loans'}, :class=> 'nav' %>

                        <%= link_to 'edit profile', {:controller => 'account'}, :class =>'nav' %>

					<% else %>
						<%= link_to 'log in', {:controller => 'account', :action => 'login'}, :class=> 'nav' %>

						<%= link_to 'new account', {:controller => 'account', :action => 'signup'}, :class=> 'nav' %>

					<% end %>
					<%= controller_side_links %>
					<% if current_user %>
						<%= link_to 'log out', {:controller => 'account', :action => 'logout'}, :class=> 'nav' %>
					<% end %>
					Back to top

					<% if flash[:notice] %>

              Notice:

<%= flash[:notice].untaint %>

					<% elsif flash[:error] %>

              Error:

<%= flash[:error].untaint %>

					<% end %>

					<%= yield  %>

Back to top

Copy away mofos | Design by Andreas Viklund


Fix missing I18n'd string

Fix missing I18n'd string

<% @title = "#{h(@info_request.title)} - a Freedom of Information request to #{h(@info_request.public_body.name)}" %>

<% if @info_request.prominence == 'hidden' %>

    <%= _('This request has prominence \'hidden\'. You can only see it because you are logged
    in as a super user.') %>

<% end %>
<% if @info_request.prominence == 'requester_only' %>

    <%= _('This request is hidden, so that only you the requester can see it. Please
    contact us if you are not sure why.') % [help_requesting_path] %>

<% end %>

<% if @update_status || @info_request.awaiting_description %>

    <%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %>

<% end %>

<%= render :partial => 'sidebar' %>

<%=h(@info_request.title)%>

    <% if @info_request.user.profile_photo %>

            <img src="<%= get_profile_photo_url(:url_name => @info_request.user.url_name) %>" alt="">

    <% end %>

        <% if !@user.nil? && @user.admin_page_links? %>
            <%= _('{{user}} (admin) made this {{law_used_full}} request (admin) to {{public_body_link}} (admin)',
                    :user => user_link(@info_request.user),
                    :law_used_full => h(@info_request.law_used_full),
                    :user_admin_url => user_admin_url(@info_request.user),
                    :request_admin_url => request_admin_url(@info_request),
                    :public_body_link => public_body_link(@info_request.public_body),
                    :public_body_admin_url => public_body_admin_url(@info_request.public_body)) %>
        <% else %>
            <%= _('{{user}} made this {{law_used_full}} request',:user=>user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
            <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
        <% end %>

    <p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>">
    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            <%= _('Please answer the question above so we know whether the ')%>
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %>
        <% else %>
            <%= _('This request has an unknown status.') %>
            <% if @old_unclassified %>
              <%= _('We\'re waiting for someone to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %>
            <% else %>
            <%=  _('We\'re waiting for') %>
              <%= user_link(@info_request.user) %> <%= _('to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status.') %>
            <% end %>
        <% end %>
    <% elsif @status == 'waiting_response' %>
		<%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %>
        <% if @info_request.public_body.is_school? %>
        <%= _('in term time') %>
        <% else %>
        <%= _('normally') %>
        <% end %>
        <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %>
        (<%= link_to _("details"), "/help/requesting#quickly_response" %>).
    <% elsif @status == 'waiting_response_overdue' %>
        <%= _('Response to this request is delayed.') %>
		<%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %>
            <% if @info_request.public_body.is_school? %>
            <%= _('in term time') %>
            <% end %>
            <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %>
		(<%= _('details') % [help_requesting_path + '#quickly_response'] %>)
    <% elsif @status == 'waiting_response_very_overdue' %>
        <%= _('Response to this request is long overdue.') %>
		<%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %>
        (<%= _('details') % [help_requesting_path + '#quickly_response'] %>).
        <%= _('You can complain by') %>
        <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %>
    <% elsif @status == 'rejected' %>
        <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        <%= _('The request was successful.') %>
    <% elsif @status == 'partially_successful' %>
        <%= _('The request was partially successful.') %>
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %>
            <%= _('Please') %>
              <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>.
        <% else %>
            <%= _('The request is waiting for clarification.') %>
			<%= _('If you are {{user_link}}, please',:user_link=>user_link(@info_request.user)) %>
            <%= link_to _("sign in"), signin_url(:r => request.request_uri) %> <%= _('to send a follow up message.') %>
        <% end %>
    <% elsif @status == 'gone_postal' %>
        <%= _('The authority would like to / has responded by post to this request.') %>
    <% elsif @status == 'internal_review' %>
		<%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %>
    <% elsif @status == 'error_message' %>
        <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'requires_admin' %>
        <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'user_withdrawn' %>
        <%= _('This request has been withdrawn by the person who made it.
        	   There may be an explanation in the correspondence below.') %>
    <% else %>
        <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
    <% end %>

    <% for info_request_event in @info_request_events %>
        <% if info_request_event.visible %>
            <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %>
        <% end %>
    <% end %>

    <% if @info_request.awaiting_description %>

        <%= render :partial => 'describe_state', :locals => { :id_suffix => "2" } %>

    <% end %>

    <%= render :partial => 'after_actions' %>

<% @title = "#{h(@info_request.title)} - a Freedom of Information request to #{h(@info_request.public_body.name)}" %>

<% if @info_request.prominence == 'hidden' %>

    <%= _('This request has prominence \'hidden\'. You can only see it because you are logged
    in as a super user.') %>

<% end %>
<% if @info_request.prominence == 'requester_only' %>

    <%= _('This request is hidden, so that only you the requester can see it. Please
    contact us if you are not sure why.') % [help_requesting_path] %>

<% end %>

<% if @update_status || @info_request.awaiting_description %>

    <%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %>

<% end %>

<%= render :partial => 'sidebar' %>

<%=h(@info_request.title)%>

    <% if @info_request.user.profile_photo %>

            <img src="<%= get_profile_photo_url(:url_name => @info_request.user.url_name) %>" alt="">

    <% end %>

        <% if !@user.nil? && @user.admin_page_links? %>
            <%= _('{{user}} (admin) made this {{law_used_full}} request (admin) to {{public_body_link}} (admin)',
                    :user => user_link(@info_request.user),
                    :law_used_full => h(@info_request.law_used_full),
                    :user_admin_url => user_admin_url(@info_request.user),
                    :request_admin_url => request_admin_url(@info_request),
                    :public_body_link => public_body_link(@info_request.public_body),
                    :public_body_admin_url => public_body_admin_url(@info_request.public_body)) %>
        <% else %>
            <%= _('{{user}} made this {{law_used_full}} request',:user=>user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
            <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
        <% end %>

    <p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>">
    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            <%= _('Please answer the question above so we know whether the ')%>
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %>
        <% else %>
            <%= _('This request has an unknown status.') %>
            <% if @old_unclassified %>
              <%= _('We\'re waiting for someone to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %>
            <% else %>
            <%=  _('We\'re waiting for') %>
              <%= user_link(@info_request.user) %> <%= _('to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status.') %>
            <% end %>
        <% end %>
    <% elsif @status == 'waiting_response' %>
		<%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %>
        <% if @info_request.public_body.is_school? %>
        <%= _('in term time') %>
        <% else %>
        <%= _('normally') %>
        <% end %>
        <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %>
        (<%= link_to "details", "/help/requesting#quickly_response" %>).
    <% elsif @status == 'waiting_response_overdue' %>
        <%= _('Response to this request is delayed.') %>
		<%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %>
            <% if @info_request.public_body.is_school? %>
            <%= _('in term time') %>
            <% end %>
            <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %>
		(<%= _('details') % [help_requesting_path + '#quickly_response'] %>)
    <% elsif @status == 'waiting_response_very_overdue' %>
        <%= _('Response to this request is long overdue.') %>
		<%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %>
        (<%= _('details') % [help_requesting_path + '#quickly_response'] %>).
        <%= _('You can complain by') %>
        <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %>
    <% elsif @status == 'rejected' %>
        <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        <%= _('The request was successful.') %>
    <% elsif @status == 'partially_successful' %>
        <%= _('The request was partially successful.') %>
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %>
            <%= _('Please') %>
              <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>.
        <% else %>
            <%= _('The request is waiting for clarification.') %>
			<%= _('If you are {{user_link}}, please',:user_link=>user_link(@info_request.user)) %>
            <%= link_to _("sign in"), signin_url(:r => request.request_uri) %> <%= _('to send a follow up message.') %>
        <% end %>
    <% elsif @status == 'gone_postal' %>
        <%= _('The authority would like to / has responded by post to this request.') %>
    <% elsif @status == 'internal_review' %>
		<%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %>
    <% elsif @status == 'error_message' %>
        <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'requires_admin' %>
        <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'user_withdrawn' %>
        <%= _('This request has been withdrawn by the person who made it.
        	   There may be an explanation in the correspondence below.') %>
    <% else %>
        <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
    <% end %>

    <% for info_request_event in @info_request_events %>
        <% if info_request_event.visible %>
            <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %>
        <% end %>
    <% end %>

    <% if @info_request.awaiting_description %>

        <%= render :partial => 'describe_state', :locals => { :id_suffix => "2" } %>

    <% end %>

    <%= render :partial => 'after_actions' %>


Changed the drop down box for 'reminder hrs.' to contain values '[8, 8],[16, 16],[24, 24],[32, 32],[40, 40],[48, 48],[56, 56],[64, 64],[72, 72],[80, 80],[88, 88],[96, 96]'

git-svn-id: f67d969b640da65cb7bc1d229e09fd6d2db44ae1@721 392d7b7b-3f31-0410-9dc3-c95a9635ea79

Deadlines for chapter 1

Number of rounds of review:
        <input type="text" id="assignment_helper_no_of_reviews" name="assignment_helper[no_of_reviews]" maxlength="5" size="5" value="1" onchange="addElement();" />
        <input type="button" name="selectButton" value="Edit" onclick="addElement();" />

               Deadline
               Date & time
               Submission allowed
               Review allowed

               Resubmission allowed
               Rereview allowed
               Review of review allowed
			   Reminder (hrs)

                   Submission deadline

                    <input type="text" id="submit_deadline_due_at" name ="submit_deadline[due_at]"/>

                   <%= select('submit_deadline', 'submission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>3 )%>

                   <%= select('submit_deadline', 'review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'resubmission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'rereview_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'review_of_review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'threshold', [ [8, 8],[16, 16],[24, 24],[32, 32],[40, 40],[48, 48],[56, 56],[64, 64],[72, 72],[80, 80],[88, 88],[96, 96] ],:selected =>1 )%>

                   <input name="deadlineTitle0" size=10	maxlength=10 value="Submission deadline" type="hidden"/>Review deadline

                   <input type="text" id="review_deadline_due_at" name ="review_deadline[due_at]"/>

                   <%= select('review_deadline', 'submission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('review_deadline', 'review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>3 )%>

                   <%= select('review_deadline', 'resubmission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('review_deadline', 'rereview_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('review_deadline', 'review_of_review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('review_deadline', 'threshold', [ [8, 8],[16, 16],[24, 24],[32, 32],[40, 40],[48, 48],[56, 56],[64, 64],[72, 72],[80, 80],[88, 88],[96, 96] ],:selected =>1 )%>

                   Review-of-review deadline

                  <input type="text" id="reviewofreview_deadline_due_at" name ="reviewofreview_deadline[due_at]"/>

                   <%= select('reviewofreview_deadline', 'submission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'resubmission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'rereview_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'review_of_review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>3 )%>

                   <%= select('reviewofreview_deadline', 'threshold', [ [8, 8],[16, 16],[24, 24],[32, 32],[40, 40],[48, 48],[56, 56],[64, 64],[72, 72],[80, 80],[88, 88],[96, 96] ],:selected =>1 )%>

  Number of {weeks, days} between submission of successive chapters:
  <input type="text" id="weeks" name ="weeks" maxlength="2" size="3"/> week(s)
  <input type="text" id="days" name ="days" maxLength="2" size="3"/> day(s)

Deadlines for chapter 1

Number of rounds of review:
        <input type="text" id="assignment_helper_no_of_reviews" name="assignment_helper[no_of_reviews]" maxlength="5" size="5" value="1" onchange="addElement();" />
        <input type="button" name="selectButton" value="Edit" onclick="addElement();" />

               Deadline
               Date & time
               Submission allowed
               Review allowed

               Resubmission allowed
               Rereview allowed
               Review of review allowed
			   Reminder (hrs)

                   Submission deadline

                    <input type="text" id="submit_deadline_due_at" name ="submit_deadline[due_at]"/>

                   <%= select('submit_deadline', 'submission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>3 )%>

                   <%= select('submit_deadline', 'review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'resubmission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'rereview_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'review_of_review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('submit_deadline', 'threshold', [ [1, 1],[2, 2],[3, 3],[4, 4],[5, 5],[6, 6],[7, 7],[8, 8],[9, 9],[10, 10],[11, 11],[12, 12] ],:selected =>1 )%>

                   <input name="deadlineTitle0" size=10	maxlength=10 value="Submission deadline" type="hidden"/>Review deadline

                   <input type="text" id="review_deadline_due_at" name ="review_deadline[due_at]"/>

                   <%= select('review_deadline', 'submission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('review_deadline', 'review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>3 )%>

                   <%= select('review_deadline', 'resubmission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('review_deadline', 'rereview_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('review_deadline', 'review_of_review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>1 )%>

                   <%= select('review_deadline', 'threshold', [ [1, 1],[2, 2],[3, 3],[4, 4],[5, 5],[6, 6],[7, 7],[8, 8],[9, 9],[10, 10],[11, 11],[12, 12] ],:selected =>1 )%>

                   Review-of-review deadline

                  <input type="text" id="reviewofreview_deadline_due_at" name ="reviewofreview_deadline[due_at]"/>

                   <%= select('reviewofreview_deadline', 'submission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'resubmission_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'rereview_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>2 )%>

                   <%= select('reviewofreview_deadline', 'review_of_review_allowed_id', [ ['No', 1],['Late', 2],['OK', 3]],:selected =>3 )%>

                   <%= select('reviewofreview_deadline', 'threshold', [ [1, 1],[2, 2],[3, 3],[4, 4],[5, 5],[6, 6],[7, 7],[8, 8],[9, 9],[10, 10],[11, 11],[12, 12] ],:selected =>1 )%>

  Number of {weeks, days} between submission of successive chapters:
  <input type="text" id="weeks" name ="weeks" maxlength="2" size="3"/> week(s)
  <input type="text" id="days" name ="days" maxLength="2" size="3"/> day(s)


Added javascript so that username field has focus on page load.

<% form_tag :controller => 'account', :action => 'login' do -%>

    <%=_("Username")%>

    <%= text_field_tag 'login' %>

    <%=_("Password")%>

    <%= password_field_tag 'password' %>

     <%= submit_tag _('Log in') %>

<% end -%>

<%# flash[:error] %>

  <%# link_to 'I forgot my password'.t, :controller => 'forms', :action => 'password'%>


[ClockingIT @ Fix day-change for other timezones than UTC]

              <%=_ 'Timeline' %>

            <%
            @clients = Customer.find(:all, :conditions => ["company_id = ?", session[:user].company_id], :order => "name").collect{ |c| [c.name, c.id.to_s]}
            @projects = User.find(session[:user].id).projects.find(:all, :conditions => ["completed_at IS NULL"]).collect {|p| [p.name, p.id.to_s]}
            @users = User.find(:all, :order => "name", :conditions => ["company_id = ?", session[:user].company_id]).collect {|c| [ c.name, c.id.to_s ] }

            filter_count = 0
            %>
            <%= start_form_tag( :controller => 'timeline', :action => 'list' ) %>

            <select name="filter_date" id="filter_date" onchange="javascript:document.forms[1].submit();">
                <% @dates =  [[_("[All Time]"), "0"], [_("This Week"),"1"], [_("Last Week"),"2"],[_("This Month"),"3"],[_("Last Month"),"4"],[_("This Year"),"5"],[_("Last Year"),"6"]] %>
                <%= options_for_select @dates, params[:filter_date] %>
            </select>

            <% if @projects.size > 1 %>
            <select name="filter_project" id="filter_project" onchange="javascript:document.forms[1].submit();">
              <% @projects = [[_("[Any Project]"), "0"]] + @projects  %>
              <%= options_for_select @projects, params[:filter_project] %>
            </select>
            <% end %>

            <% if @users.size > 1 %>
            <select name="filter_user" id="filter_user" onchange="javascript:document.forms[1].submit();">
              <% @users = [[_("[Any User]"), "0"]] + @users %>
              <%= options_for_select @users, params[:filter_user] %>
            </select>
            <% end %>

            <select name="filter_status" id="filter_status" onchange="javascript:document.forms[1].submit();">
              <%
                 @status = [[_("[Any Type]"), "-1"],
                            [_("Closed"), WorkLog::TASK_COMPLETED.to_s],
                            [_("Work Log"), WorkLog::TASK_WORK_ADDED.to_s],
                            [_("Status Change"), WorkLog::TASK_REVERTED.to_s],
                            [_("Created"), WorkLog::TASK_CREATED.to_s],
                            [_("Comment"), WorkLog::TASK_COMMENT.to_s],
                            [_("Modified"), WorkLog::TASK_MODIFIED.to_s]
                           ]

              %>
              <%= options_for_select @status, params[:filter_status] %>
            </select>

            <%= end_form_tag %>

              <% offset = "#{@logs.size}" if @offset == 0
                 offset = "#{@offset + 1} - #{@offset + 100}" if @offset > 0
                 offset = "#{@offset + 1} - #{@count}" if (@offset + 100 > @count && @count > 0)
              %>

              <%= link_to(_('[Prev]'), { :action => 'list', :page => params[:page].to_i - 1, :filter_status => params[:filter_status], :filter_user => params[:filter_user],
                          :filter_project => params[:filter_project], :filter_date => params[:filter_date] }) if (@offset > 0) %>
              <%= offset %> <%=_ 'of' %> <%= @count %> <%=_ 'entries..' %>
              <%= link_to('[Next]', { :action => 'list', :page => params[:page].to_i + 1, :filter_status => params[:filter_status], :filter_user => params[:filter_user],
                          :filter_project => params[:filter_project], :filter_date => params[:filter_date]}) if (@offset+100 < @count) %>

                <%
            day = 0
            for log in @logs
              if day != tz.utc_to_local(log.started_at).day
                day = tz.utc_to_local(log.started_at).day
                %>

                <%= tz.utc_to_local(log.started_at).strftime("%A, %d %B %Y") %>

            <% end %>
            <%= render_partial 'activities/log_row', { :log => log } %>
          <% end %>

              <%=_ 'Timeline' %>

            <%
            @clients = Customer.find(:all, :conditions => ["company_id = ?", session[:user].company_id], :order => "name").collect{ |c| [c.name, c.id.to_s]}
            @projects = User.find(session[:user].id).projects.find(:all, :conditions => ["completed_at IS NULL"]).collect {|p| [p.name, p.id.to_s]}
            @users = User.find(:all, :order => "name", :conditions => ["company_id = ?", session[:user].company_id]).collect {|c| [ c.name, c.id.to_s ] }

            filter_count = 0
            %>
            <%= start_form_tag( :controller => 'timeline', :action => 'list' ) %>

            <select name="filter_date" id="filter_date" onchange="javascript:document.forms[1].submit();">
                <% @dates =  [[_("[All Time]"), "0"], [_("This Week"),"1"], [_("Last Week"),"2"],[_("This Month"),"3"],[_("Last Month"),"4"],[_("This Year"),"5"],[_("Last Year"),"6"]] %>
                <%= options_for_select @dates, params[:filter_date] %>
            </select>

            <% if @projects.size > 1 %>
            <select name="filter_project" id="filter_project" onchange="javascript:document.forms[1].submit();">
              <% @projects = [[_("[Any Project]"), "0"]] + @projects  %>
              <%= options_for_select @projects, params[:filter_project] %>
            </select>
            <% end %>

            <% if @users.size > 1 %>
            <select name="filter_user" id="filter_user" onchange="javascript:document.forms[1].submit();">
              <% @users = [[_("[Any User]"), "0"]] + @users %>
              <%= options_for_select @users, params[:filter_user] %>
            </select>
            <% end %>

            <select name="filter_status" id="filter_status" onchange="javascript:document.forms[1].submit();">
              <%
                 @status = [[_("[Any Type]"), "-1"],
                            [_("Closed"), WorkLog::TASK_COMPLETED.to_s],
                            [_("Work Log"), WorkLog::TASK_WORK_ADDED.to_s],
                            [_("Status Change"), WorkLog::TASK_REVERTED.to_s],
                            [_("Created"), WorkLog::TASK_CREATED.to_s],
                            [_("Comment"), WorkLog::TASK_COMMENT.to_s],
                            [_("Modified"), WorkLog::TASK_MODIFIED.to_s]
                           ]

              %>
              <%= options_for_select @status, params[:filter_status] %>
            </select>

            <%= end_form_tag %>

              <% offset = "#{@logs.size}" if @offset == 0
                 offset = "#{@offset + 1} - #{@offset + 100}" if @offset > 0
                 offset = "#{@offset + 1} - #{@count}" if (@offset + 100 > @count && @count > 0)
              %>

              <%= link_to(_('[Prev]'), { :action => 'list', :page => params[:page].to_i - 1, :filter_status => params[:filter_status], :filter_user => params[:filter_user],
                          :filter_project => params[:filter_project], :filter_date => params[:filter_date] }) if (@offset > 0) %>
              <%= offset %> <%=_ 'of' %> <%= @count %> <%=_ 'entries..' %>
              <%= link_to('[Next]', { :action => 'list', :page => params[:page].to_i + 1, :filter_status => params[:filter_status], :filter_user => params[:filter_user],
                          :filter_project => params[:filter_project], :filter_date => params[:filter_date]}) if (@offset+100 < @count) %>

                <%
            day = 0
            for log in @logs
              if day != tz.utc_to_local(log.started_at.day)
                day = tz.utc_to_local(log.started_at.day)
                %>

                <%= tz.utc_to_local(log.started_at).strftime("%A, %d %B %Y") %>

            <% end %>
            <%= render_partial 'activities/log_row', { :log => log } %>
          <% end %>


Explicitly sort old versions by id (versions() doesn't seem to always order correctly. See BBC for example)

<% @title = "Public authority - " + h(@public_body.name) %>

<%=@title%>

<%
   columns = PublicBody.content_columns
   columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}

   for column in columns %>
  <%= column.human_name %>:
  <% if column.name == 'home_page' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name))  %>
  <% elsif column.name == 'request_email' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), "mailto:" + @public_body.send(column.name))  %>
  <% else %>
      <%=h @public_body.send(column.name) %>
  <% end %>

<% end %>
Calculated home page:
<% if !@public_body.calculated_home_page.nil? %>
    <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
<% else %>
    *unknown*
<% end %>

Tags: <%= @public_body.public_body_tags.map { |t|
        link_to(h(t.name), list_public_bodies_url(:tag => t.name)) +
        ' (admin)' }.join(' ') %>

    <%= link_to 'Public page', main_url(public_body_url(@public_body)) %>
    | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>

History

<%
    history_columns = PublicBody.content_columns
    history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter'].include?(c.name)}
    for column in history_columns %>
  <%= column.human_name %>
<% end %>
Updated at

<% for historic_public_body in @public_body.versions.sort { |a,b| b.id <=> a.id } %>
      <tr class="<%= cycle('odd', 'even') %>">
    <% for column in history_columns %>
      <%
        value = h(historic_public_body.send(column.name))
        if column.name == 'last_edit_comment'
            value = historic_public_body.last_edit_comment_for_html_display
        end
        # Highlight entries which have changed since previous version
        changed = (not ['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
      <td <%= changed ? ' class="entry_changed" ': '' %> >
      <%=value%>

    <% end %>
      <%=h historic_public_body.updated_at %>

<% end %>

Requests

<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %>

Track things

<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %>

<% @title = "Public authority - " + h(@public_body.name) %>

<%=@title%>

<%
   columns = PublicBody.content_columns
   columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}

   for column in columns %>
  <%= column.human_name %>:
  <% if column.name == 'home_page' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name))  %>
  <% elsif column.name == 'request_email' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), "mailto:" + @public_body.send(column.name))  %>
  <% else %>
      <%=h @public_body.send(column.name) %>
  <% end %>

<% end %>
Calculated home page:
<% if !@public_body.calculated_home_page.nil? %>
    <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
<% else %>
    *unknown*
<% end %>

Tags: <%= @public_body.public_body_tags.map { |t|
        link_to(h(t.name), list_public_bodies_url(:tag => t.name)) +
        ' (admin)' }.join(' ') %>

    <%= link_to 'Public page', main_url(public_body_url(@public_body)) %>
    | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>

History

<%
    history_columns = PublicBody.content_columns
    history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter'].include?(c.name)}
    for column in history_columns %>
  <%= column.human_name %>
<% end %>
Updated at

<% for historic_public_body in @public_body.versions.reverse %>
      <tr class="<%= cycle('odd', 'even') %>">
    <% for column in history_columns %>
      <%
        value = h(historic_public_body.send(column.name))
        if column.name == 'last_edit_comment'
            value = historic_public_body.last_edit_comment_for_html_display
        end
        # Highlight entries which have changed since previous version
        changed = (not ['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
      <td <%= changed ? ' class="entry_changed" ': '' %> >
      <%=value%>

    <% end %>
      <%=h historic_public_body.updated_at %>

<% end %>

Requests

<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %>

Track things

<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %>


fix a bug where @group was nil

fix a bug where @group was nil

<% if @asset.image? -%>
  <%= link_to(image_tag(@asset.public_filename(:preview)), @asset.public_filename) %>
<% end -%>

<% if current_user.may? :edit, @page -%>

  <%= 'created by'.t %>:
  <%= h @page.created_by.both_names if @page.created_by %>

<% end -%>

  <%= 'created on'.t %>:
  <%= full_time(@page.created_at) %>

<% if @page.updated_at > @page.created_at -%>
<% if current_user.may? :edit, @page -%>

  <%= 'last updated by'.t %>:
  <%= h @page.updated_by.both_names %>

<% end -%>

  <%= 'last updated on'.t %>:
  <%= full_time(@page.updated_at) %>

<% end -%>

  <%= 'file type'.t %>:
  <%= @asset.content_type %>

  <%= 'size'.t %>:
  <%= friendly_size(@asset.size) %>

<% if @asset.image? -%>

  <%= 'dimensions'.t %>:
  <%= "#{@asset.width}x#{@asset.height}" %>

<% end -%>

<%=
  links = [
    link_to("download %s" % @asset.filename, @asset.public_filename),
    link_to_function("view versions", "$('versions').toggle()")
  ]
  links.push link_to_function("upload a new version", "$('upload-new').toggle()") if current_user.may? :edit, @page

  link_line links
%>

  <% @asset.versions.reverse.each do |version| -%>
  <tr id="asset_<%= @asset.id %>_version_<%= version.version %>">

      <% if @current_user.may? :edit, @page and version.version < @asset.version %>
      <%= link_to_remote(image_tag('actions/trash.png'), {:url => direct_url(:page_id => @page.id, :action => :destroy_version, :id => version.version, :controller => 'tool/asset'), :confirm => 'are you sure you want to delete this version?', :before => "$($(this).up('td')).addClassName('busy')", :failure => "$($(this).up('td')).removeClassName('busy')"}, {:href => url_for(:controller => 'asset', :action => 'destroy', :id => @asset.id)}) %>
      <% end %>

    <%= version.image? ? image_tag(version.public_filename(:thumb)) : image_tag(version.small_icon) %>
    <%= link_to "#{version.version}: #{version.filename}", version.public_filename %>

  <% end -%>

  <% form_tag page_url(@page, :action => 'update'), :multipart => true do -%>
    <%= file_field_tag 'asset' %>
    <%= submit_tag 'upload' %>
  <% end %>

<% if @asset.image? -%>
  <%= link_to(image_tag(@asset.public_filename(:preview)), @asset.public_filename) %>
<% end -%>

<% if @group.publicly_visible_members or current_user.may? :edit, @page -%>

  <%= 'created by'.t %>:
  <%= h @page.created_by.both_names if @page.created_by %>

<% end -%>

  <%= 'created on'.t %>:
  <%= full_time(@page.created_at) %>

<% if @page.updated_at > @page.created_at -%>
<% if @group.publicly_visible_members or current_user.may? :edit, @page -%>

  <%= 'last updated by'.t %>:
  <%= h @page.updated_by.both_names %>

<% end -%>

  <%= 'last updated on'.t %>:
  <%= full_time(@page.updated_at) %>

<% end -%>

  <%= 'file type'.t %>:
  <%= @asset.content_type %>

  <%= 'size'.t %>:
  <%= friendly_size(@asset.size) %>

<% if @asset.image? -%>

  <%= 'dimensions'.t %>:
  <%= "#{@asset.width}x#{@asset.height}" %>

<% end -%>

<%=
  links = [
    link_to("download %s" % @asset.filename, @asset.public_filename),
    link_to_function("view versions", "$('versions').toggle()")
  ]
  links.push link_to_function("upload a new version", "$('upload-new').toggle()") if current_user.may? :edit, @page

  link_line links
%>

  <% @asset.versions.reverse.each do |version| -%>
  <tr id="asset_<%= @asset.id %>_version_<%= version.version %>">

      <% if @current_user.may? :edit, @page and version.version < @asset.version %>
      <%= link_to_remote(image_tag('actions/trash.png'), {:url => direct_url(:page_id => @page.id, :action => :destroy_version, :id => version.version, :controller => 'tool/asset'), :confirm => 'are you sure you want to delete this version?', :before => "$($(this).up('td')).addClassName('busy')", :failure => "$($(this).up('td')).removeClassName('busy')"}, {:href => url_for(:controller => 'asset', :action => 'destroy', :id => @asset.id)}) %>
      <% end %>

    <%= version.image? ? image_tag(version.public_filename(:thumb)) : image_tag(version.small_icon) %>
    <%= link_to "#{version.version}: #{version.filename}", version.public_filename %>

  <% end -%>

  <% form_tag page_url(@page, :action => 'update'), :multipart => true do -%>
    <%= file_field_tag 'asset' %>
    <%= submit_tag 'upload' %>
  <% end %>


Rework officers FAQ to be much nicer when they click the link. Add links to the ICO ruling.

<% @title = "About" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
something about the site, contact us.

Introduction to WhatDoTheyKnow

What is WhatDoTheyKnow for?

To help you find out inside information about what the UK government
is doing.

How does the site work?

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.

Why would I bother to do this?

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.

Why would the public authority bother to reply?

Under Freedom of Information (FOI) law, they have to respond.

Who makes it?

WhatDoTheyKnow is made by mySociety,
and was initially funded by the JRSST Charitable Trust. mySociety is a project of the
registered charity UK Citizens Online Democracy.
If you like what we're doing, then you can
make a donation.

Making requests

You're missing the public authority that I want to request from!

Please contact us with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.
If you'd like to help add a whole category of public authority to the site, for example all
primary care trusts or all schools, then please
edit this shared spreadsheet (Google account required).

How quickly will I get a response?

By law public authorities must respond "promptly", and in any event not later
than 20 working days after receiving your request. The date of that hard limit
is shown on the page for your request. You will be emailed if this date goes by
without a response, so you can send the public authority another note to remind
them that they are breaking the law. Note: If you had to
clarify your request, the clock starts from that date, instead of the date they
received your initial request.

What if I'm not satisfied with the response?

If you didn't get the information you asked for, or you didn't get it in time,
then read our page 'Unhappy about the response you got?'.

Can you tell me more of the nitty gritty about the process of making requests?

Have a look at the
access to official information
pages on the Information Commisioner's website.

Can I request information about myself?

Not using this site. Requests made using WhatDoTheyKnow are public, made under the
Freedom of Information Act, and cannot help you find information about a
private individual. If you would like to know what information a public
authority holds about yourself, you should make a "Subject Access Request" in
private using Data Protection law.  The leaflet Subject
Access - A guide for data subjects (on the Information Commisioner's
website) explains how to do this.

I'd like to keep my request secret! (At least until I publish my story)

WhatDoTheyKnow is currently only designed for public requests. All
responses that we receive are automatically published on the website for anyone
to read.  You should contact the public authority directly if you would like to
make a request in private.  If you're interested in buying a system which helps
you manage FOI requests in secret, then contact us.

Why can I only request information about the environment from some authorities?

Some public authorities, such as South East Water,
don't come under the Freedom of Information Act, but do come under another law called
the Environmental Information Regulations (EIR). It's a very similar law, so you make a request
to them using WhatDoTheyKnow in just the same way as an FOI request. The only difference
is that on the page where you write you request, it reminds you that you can only
request "environmental information" and tells you what that means. It is quite broad.

So can I request information using EIR from other authorities?

Yes, just make a Freedom of Information (FOI) request as normal. The
authority has a duty to work out if the Environmental Information Regulations
(EIR) is the more appropriate legislation to reply under.

Privacy questions

Who gets to see my email address?

We will not disclose your email address to anyone, including the public
authority you are sending a request to, unless we are obliged to by law,
or you ask us to. If you send a message to another user on the site, then
it will reveal your email address to them. You will be told that this
is going to happen.

Will you send nasty, brutish spam to my email address?

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
relating to a request you made, an email alert that you have signed up for,
or for other reasons that you specifically authorise. We will never give or
sell your email addresses to anyone else, unless we are obliged to by law, or
you ask us to.

Why will my name appear publically on the site?

It means that someone researching the same area can get in touch with you,
and maybe give you more information or ideas relating to your request.  Also,
we're going to publish the response with the name of the civil servant who
wrote it, so it seems only fair that your name should be public too!
Therefore, we encourage you to use your real name, but you may use a pseudonym
if you would like to be anonymous.

So I can make an FOI request using a pseudonym?

Yes, you can (although we encourage you to use your real name,
see the question just above). It is good practice for the public authority to reply
to an anonymous request, except in special circumstances such as if they suspect you
of making vexatious requests. See Freedom of Information Good Practice Guidance No 6
for details. You should refer to this if a public authority attempts to refuse
a request because you used a pseudonym.  Saying that, you can avoid the problem
by simply making your pseudonym look like a real person's name, as there is no
general obligation to prove your identity.

They've asked for my postal address!

If a public authority asks you for your full, physical address, reply to them saying
that section 8.1.b of the FOI Act asks for an "address for correspondence",
and that the email address you are using is sufficient.

The Ministry of Justice has guidance
on this –
"As well as hard copy written correspondence, requests that are
transmitted electronically (for example, in emails) are acceptable
... If a request is received by email and no postal address is given, the email
address should be treated as the return address."

As if that isn't enough, the Information Commissioner's
Hints for Practitioners say
"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."

What will you do to me if I annotate requests with nonsense?

It won't be pretty :).

Seriously, annotations on WhatDoTheyKnow 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.
Endless, content-free political discussions are not allowed, but
do post a link to a suitable forum elsewhere.

For example, if you think you know the reason someone posted a request,
and you don't approve of it, do not write a complex rant in the annotation.
Instead, simply write a short sentence, and link to another website which
already explains it in detail.

FOI officer questions

I just got here from bottom of an FOI request, what is going on?

WhatDoTheyKnow is a service run by a charity. It helps ordinary members
of the public make FOI requests, and easily track and share the responses.

The FOI request you got was made by someone using WhatDoTheyKnow. You can
simply reply to the request as you would any other request from an individual.
The only difference is that your response will be automatically published on
the Internet.

If you have privacy or copyright concerns, please read the answers below.
You might also like to read this page from the top to find out more about what
the site does from the point of view of a user. You can also search the
site to find the authority that you work for, and view the status of
any requests made using the site.

Finally, we welcome comments and
thoughts from FOI officers, please get in touch.

Why are you publishing responses to FOI requests?

Freedom of Information responses contain public information, which anybody could
easily request again from the public authority. Therefore,
there is no reason they shouldn't be published on the Internet. There are lots
of benefits - everything from preventing duplicate requests, to getting the public
more involved and interested in the work of government.

Are the people making requests real people?

Yes. The people are real people, for whom we have a verified email address
unique to each person.

Each request made by each person is also given a unique email, so that we
can keep track of and publish the responses. But if it says the same name
on two requests, they were made by the same person.

An email isn't a sufficient address for an FOI request!

Yes it is. This
letter from the ICO to Rother District Council gives guidance on the matter, specifically
in the context of requests made via WhatDoTheyKnow.

Aren't you making lots of vexatious requests?

WhatDoTheyKnow is not making any requests. We are sending requests on
behalf of our users, who are real people making the requests.

Look at it like this - if lots of different people made requests from
different Hotmail email addresses, then you would not think that Microsoft were
making vexatious requests. It is exactly the same if lots of requests are made
via WhatDoTheyKnow. Moreover, since all requests are public it is much easier
for you to see if one of our users is making vexatious requests, and for us to
block them when that happens.

If that isn't enough for you, the
letter from the ICO to Rother District Council gives some guidance on the matter.

Won't I be breaking copyright law by sending a response that you then publish?

No, you will simply be replying to an FOI request by email (the "expressed
preference" of the requester, under
section
11(1) of the Freedom of Information Act). That we are later republishing your
response is a separate matter of copyright law, and not something which FOIA lists
as a reason for rejecting a request.

Isn't it a problem that you publish the names of civil servants
and the text of emails?

Officers or servants responding to requests are doing so on behalf of the
public as part of their job, and we publish their response on that
basis. Usually the names and phone numbers of FOI officers are already
available on authority websites. We also encourage our users to give their real
name too, so it is fair both ways.

Do you publish email addresses or mobile phone numbers?

We automatically remove email addresses and labelled mobile phone numbers
that are in the email part of responses from public authorities. Please
contact us if we've missed one. We don't currently
remove these from attachments,
such as Word documents.

Can you take down private information about me?

If you see any information on the site which you'd like us to remove or
hide, then please let us know. We'll then
remove it, provided it is genuinely private information.

Credit where credit is due

Which people made WhatDoTheyKnow?

Oh, nearly everyone (and maybe you too)!

    Heather Brooke
    (vampy!) has
    been pushing the idea of a UK FOI archive for years now.

    Both Phil Rodgers and Francis Irving
    entered it in a mySociety competition for ideas for public interest websites to build.

    It won,
    and then Chris Lightfoot (RIP :()
    thought up the wheeze of intercepting email responses to requests and
    automatically publishing them.

    Tom Steinberg got the cash to pay for the site from
    a dead chocolate mogul (thank you!) ...

    ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville
    and Tom Steinberg could do the complex mixture of design and coding to build
    what you see today.

    Thanks particularly to Julian Todd (great blog!),
    Francis Davey, and Etienne Pollard for using the site early on and giving
    feedback (and/or legal advice!), and also to all our other users and
    testers.

    Lots of people have been looking up FOI email addresses, and a few
    volunteering to run the site - most especially Adam McGreggor, Alex
    Skene, John Cross and Tony Bowden.

Finally we couldn't do any of this without those
crazy people who volunteer,
amongst many other things, to do the accounts and fill in our VAT return.

You're all stars.

<% @title = "About" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
something about the site, contact us.

Introduction to WhatDoTheyKnow

What is WhatDoTheyKnow for?

To help you find out inside information about what the UK government
is doing.

How does the site work?

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.

Why would I bother to do this?

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.

Why would the public authority bother to reply?

Under Freedom of Information (FOI) law, they have to respond.

Who makes it?

WhatDoTheyKnow is made by mySociety,
and was initially funded by the JRSST Charitable Trust. mySociety is a project of the
registered charity UK Citizens Online Democracy.
If you like what we're doing, then you can
make a donation.

Making requests

You're missing the public authority that I want to request from!

Please contact us with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.
If you'd like to help add a whole category of public authority to the site, for example all
primary care trusts or all schools, then please
edit this shared spreadsheet (Google account required).

How quickly will I get a response?

By law public authorities must respond "promptly", and in any event not later
than 20 working days after receiving your request. The date of that hard limit
is shown on the page for your request. You will be emailed if this date goes by
without a response, so you can send the public authority another note to remind
them that they are breaking the law. Note: If you had to
clarify your request, the clock starts from that date, instead of the date they
received your initial request.

What if I'm not satisfied with the response?

If you didn't get the information you asked for, or you didn't get it in time,
then read our page 'Unhappy about the response you got?'.

Can you tell me more of the nitty gritty about the process of making requests?

Have a look at the
access to official information
pages on the Information Commisioner's website.

Can I request information about myself?

Not using this site. Requests made using WhatDoTheyKnow are public, made under the
Freedom of Information Act, and cannot help you find information about a
private individual. If you would like to know what information a public
authority holds about yourself, you should make a "Subject Access Request" in
private using Data Protection law.  The leaflet Subject
Access - A guide for data subjects (on the Information Commisioner's
website) explains how to do this.

I'd like to keep my request secret! (At least until I publish my story)

WhatDoTheyKnow is currently only designed for public requests. All
responses that we receive are automatically published on the website for anyone
to read.  You should contact the public authority directly if you would like to
make a request in private.  If you're interested in buying a system which helps
you manage FOI requests in secret, then contact us.

Why can I only request information about the environment from some authorities?

Some public authorities, such as South East Water,
don't come under the Freedom of Information Act, but do come under another law called
the Environmental Information Regulations (EIR). It's a very similar law, so you make a request
to them using WhatDoTheyKnow in just the same way as an FOI request. The only difference
is that on the page where you write you request, it reminds you that you can only
request "environmental information" and tells you what that means. It is quite broad.

So can I request information using EIR from other authorities?

Yes, just make a Freedom of Information (FOI) request as normal. The
authority has a duty to work out if the Environmental Information Regulations
(EIR) is the more appropriate legislation to reply under.

Privacy questions

Who gets to see my email address?

We will not disclose your email address to anyone, including the public
authority you are sending a request to, unless we are obliged to by law,
or you ask us to. If you send a message to another user on the site, then
it will reveal your email address to them. You will be told that this
is going to happen.

Will you send nasty, brutish spam to my email address?

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
relating to a request you made, an email alert that you have signed up for,
or for other reasons that you specifically authorise. We will never give or
sell your email addresses to anyone else, unless we are obliged to by law, or
you ask us to.

Why will my name appear publically on the site?

It means that someone researching the same area can get in touch with you,
and maybe give you more information or ideas relating to your request.  Also,
we're going to publish the response with the name of the civil servant who
wrote it, so it seems only fair that your name should be public too!
Therefore, we encourage you to use your real name, but you may use a pseudonym
if you would like to be anonymous.

So I can make an FOI request using a pseudonym?

Yes, you can (although we encourage you to use your real name,
see the question just above). It is good practice for the public authority to reply
to an anonymous request, except in special circumstances such as if they suspect you
of making vexatious requests. See Freedom of Information Good Practice Guidance No 6
for details. You should refer to this if a public authority attempts to refuse
a request because you used a pseudonym.  Saying that, you can avoid the problem
by simply making your pseudonym look like a real person's name, as there is no
general obligation to prove your identity.

They've asked for my postal address!

If a public authority asks you for your full, physical address, reply to them saying
that section 8.1.b of the FOI Act asks for an "address for correspondence",
and that the email address you are using is sufficient.

The Ministry of Justice has guidance
on this –
"As well as hard copy written correspondence, requests that are
transmitted electronically (for example, in emails) are acceptable
... If a request is received by email and no postal address is given, the email
address should be treated as the return address."

As if that isn't enough, the Information Commissioner's
Hints for Practitioners say
"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."

What will you do to me if I annotate requests with nonsense?

It won't be pretty :).

Seriously, annotations on WhatDoTheyKnow 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.
Endless, content-free political discussions are not allowed, but
do post a link to a suitable forum elsewhere.

For example, if you think you know the reason someone posted a request,
and you don't approve of it, do not write a complex rant in the annotation.
Instead, simply write a short sentence, and link to another website which
already explains it in detail.

FOI officer questions

Why are you publishing responses to FOI requests?

Freedom of Information responses contain public information, which anybody could
easily request again from the public authority. Therefore,
there is no reason they shouldn't be published on the Internet. There are lots
of benefits - everything from preventing duplicate requests, to getting the public
more involved and interested in the work of government.

Are the people making requests real people?

Yes. This website is a service to help ordinary members of the public
make FOI requests, and easily track the responses. The people are real
people, for whom we have a verified email address unique to each person.

Aren't you making lots of vexatious requests?

WhatDoTheyKnow is not making any requests. We are sending requests on
behalf of our users, who are real people making the requests. Look at it like
this - if lots of different people made requests from different Hotmail email
addresses, then you would not think that Microsoft were making vexatious
requests. It is exactly the same if lots of requests are made via
WhatDoTheyKnow. Moreover, since all requests are public it is much easier for
you to see if one of our users is making vexatious requests, and for us to
block them when that happens.

Won't I be breaking copyright law by sending a response that you then publish?

No, you will simply be replying to an FOI request by email (the "expressed
preference" of the requester, under
section
11(1) of the Freedom of Information Act). That we are later republishing your
response is a separate matter of copyright law, and not something which FOIA lists
as a reason for rejecting a request.

Isn't it a problem that you publish the names of civil servants
and the text of emails?

Officers or servants responding to requests are doing so on behalf of the
public as part of their job, and we publish their response on that
basis. Usually the names and phone numbers of FOI officers are already
available on authority websites. We also encourage our users to give their real
name too, so it is fair both ways.

Do you publish email addresses or mobile phone numbers?

We automatically remove email addresses and labelled mobile phone numbers
that are in the email part of responses from public authorities. Please
contact us if we've missed one. We don't currently
remove these from attachments,
such as Word documents.

Can you take down private information about me?

If you see any information on the site which you'd like us to remove or
hide, then please let us know. We'll then
remove it, provided it is genuinely private information.

Credit where credit is due

Which people made WhatDoTheyKnow?

Oh, nearly everyone (and maybe you too)!

    Heather Brooke
    (vampy!) has
    been pushing the idea of a UK FOI archive for years now.

    Both Phil Rodgers and Francis Irving
    entered it in a mySociety competition for ideas for public interest websites to build.

    It won,
    and then Chris Lightfoot (RIP :()
    thought up the wheeze of intercepting email responses to requests and
    automatically publishing them.

    Tom Steinberg got the cash to pay for the site from
    a dead chocolate mogul (thank you!) ...

    ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville
    and Tom Steinberg could do the complex mixture of design and coding to build
    what you see today.

    Thanks particularly to Julian Todd (great blog!),
    Francis Davey, and Etienne Pollard for using the site early on and giving
    feedback (and/or legal advice!), and also to all our other users and
    testers.

    Lots of people have been looking up FOI email addresses, and a few
    volunteering to run the site - most especially Adam McGreggor, Alex
    Skene, John Cross and Tony Bowden.

Finally we couldn't do any of this without those
crazy people who volunteer,
amongst many other things, to do the accounts and fill in our VAT return.

You're all stars.


So it validates.

So it validates.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

        <title>
        <% if @title %>
            <%=@title%> - WhatDoTheyKnow
        <% else %>
            WhatDoTheyKnow - file and browse Freedom of Information (FOI) requests
        <% end %>
        </title>

        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet"  %>
        <%= stylesheet_link_tag 'yucky-green', :title => "Yucky Green", :rel => "alternate stylesheet" %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
            <% end %>
        <% end %>

        <% if @no_crawl %>
            <meta name="robots" content="noindex, nofollow">
        <% end %>

<% # code for popup advert for a campaign etc.
=begin

=end
%>

<% # code for popup advert for a campaign etc.
=begin

Close

Blimey. It looks like the Internets won – a message from WhatDoTheyKnow

Sorry to interrupt, but we thought you’d like to know that you won!

On the 16th of May 2008 the High Court ruled that MPs’ expenses must be published under the Freedom of Information Act.

Tomorrow, MPs were going to vote on changing the law to keep their expenses secret after all,
    just before publication was due and after spending nearly a million of your pounds and seven months
    compiling the data.

However, after a tremendous response from you, with over 7,000 members
    on our Facebook group, 4,000 messages sent to MPs, help from

    Stephen Fry, and a helpful
    4th Report of the House of Lords
    Merits of Statutory Instruments Committee,
    it appears that the vote has been cancelled –
    Guardian,
    Times,
    BBC.

As President Obama said in his inauguration speech: “And
    those of us who manage the public’s dollars will be held to account – to
    spend wisely, reform bad habits, and do our business in the light of day –

    because only then can we restore the vital trust between a people and their
    government.”

Read our victory blog post. :-)

Close

=end
%>

            WhatDoTheyKnow?

            Make and explore Freedom of Information requests

		a site by mysociety.org

        <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "navigation_search_form"}) do %>

               <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
               <%= submit_tag "Search" %>

        <% end %>

Make request

<%= link_to "View requests", request_list_url(:view => 'successful') %>

<%= link_to "View authorities", list_public_bodies_default %>

			<% if @user %>

<%=link_to "My requests", user_url(@user) %>

			<% end %>

<%= link_to "Help", about_url %>

		<% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>

			<% if @user %>
				Hello, <%=h(@user.name)%>!
				(<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
			<% else %>
				Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
			<% end %>

		<% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

            <% end %>
            <% if flash[:error] %>

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>">
            <%= yield :layout %>

        Contact WhatDoTheyKnow
        |
        Built by mySociety ...
        and you
        |
        Dedicated to Chris Lightfoot

<% if MySociety::Config.get("DOMAIN", '127.0.0.1:3000') == 'www.whatdotheyknow.com'  %>

<% end %>


[web] small fix in template

[web] small fix in template

git-svn-id: bd379d88a756ded56d998f9d005ecc36158942ed@132 6386c4cd-e34a-4fa8-8920-d93eb39b512e

<% content_for :head do %>
  <%= stylesheet_link_tag 'scaffold' %>
<% end %>

Listing users

Quick add
<% form_tag :action => 'create' do %>

Login
Full name
Alias
Password
confirm

<%= text_field 'user', 'login', :size => 10  %>
<%= text_field 'user', 'full_name', :size => 30  %>
<%= text_field 'user', 'alias', :size => 10  %>
<%= password_field 'user', 'password', :size => 10  %>
<%= password_field 'user', 'password_confirmation', :size => 10 %>
<%= submit_tag "Create" %>

<% end %>

  <% for column in User.content_columns %>
    <%= column.human_name %>
  <% end %>

<% for user in @users %>

  <% for column in User.content_columns %>
    <%=h user.send(column.name) %>
  <% end %>
    <%= link_to 'Show', :action => 'show', :id => user %>
    <%= link_to 'Edit', :action => 'edit', :id => user %>
    <%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post %>

<% end %>

<%= link_to 'New user', :action => 'new' %>
<%= link_to 'New list of users', :action => 'new_list' %>


Wording improvement regarding clarification

<% if @is_owning_user %>

    <% form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %>

What best describes the status of this request now?

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %>
                <label for="waiting_response<%=id_suffix%>">I'm still waiting for my information
                (maybe you got an acknowledgement)

        <% end %>
        <% if @info_request.described_state == 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>">I'm still waiting for the internal review

        <% end %>

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %>
                <label for="waiting_clarification<%=id_suffix%>">I've been asked to clarify my request

        <% end %>

        <% if @update_status && @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>">I'm waiting for an internal review response

        <% end %>

            <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %>
            <label for="gone_postal<%=id_suffix%>">They are going to reply by post

        <% if @info_request.described_state == 'internal_review' %>

The review has finished and overall:

        <% end %>

            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>">They do not have the information (maybe they say who does)

            <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %>
            <label for="partially_successful<%=id_suffix%>">I've received some of the information

            <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %>
            <label for="successful<%=id_suffix%>">I've received all the information

            <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %>
            <label for="rejected<%=id_suffix%>">My request has been rejected

           <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %>
            <label for="error_message<%=id_suffix%>">
            I've received an error message

        <% if @update_status %>

             <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
              <label for="error_message<%=id_suffix%>">
              This request requires administrator attention

             <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %>
              <label for="user_withdrawn<%=id_suffix%>">
              I would like to withdraw this request

        <% end %>

        <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %>
        <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %>
        <%= submit_tag "Submit status" %> (and we'll suggest what to do next)

    <% end %>
<% elsif @old_unclassified %>
    <%= render :partial => 'other_describe_state', :locals => {:id_suffix => id_suffix } %>
<% else %>
    We don't know whether the most recent response to this request contains
    information or not
        –
    if you are
        <%= user_link(@info_request.user) %>,
    please
        <%= link_to "sign in", signin_url(:r => request.request_uri) %>
    and let everyone know.

<% end %>

<% if @is_owning_user %>

    <% form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %>

What best describes the status of this request now?

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %>
                <label for="waiting_response<%=id_suffix%>">I'm still waiting for my information
                (maybe you got an acknowledgement)

        <% end %>
        <% if @info_request.described_state == 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>">I'm still waiting for the internal review

        <% end %>

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %>
                <label for="waiting_clarification<%=id_suffix%>">I'm about to clarify my request

        <% end %>

        <% if @update_status && @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>">I'm waiting for an internal review response

        <% end %>

            <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %>
            <label for="gone_postal<%=id_suffix%>">They are going to reply by post

        <% if @info_request.described_state == 'internal_review' %>

The review has finished and overall:

        <% end %>

            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>">They do not have the information (maybe they say who does)

            <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %>
            <label for="partially_successful<%=id_suffix%>">I've received some of the information

            <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %>
            <label for="successful<%=id_suffix%>">I've received all the information

            <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %>
            <label for="rejected<%=id_suffix%>">My request has been rejected

           <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %>
            <label for="error_message<%=id_suffix%>">
            I've received an error message

        <% if @update_status %>

             <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
              <label for="error_message<%=id_suffix%>">
              This request requires administrator attention

             <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %>
              <label for="user_withdrawn<%=id_suffix%>">
              I would like to withdraw this request

        <% end %>

        <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %>
        <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %>
        <%= submit_tag "Submit status" %> (and we'll suggest what to do next)

    <% end %>
<% elsif @old_unclassified %>
    <%= render :partial => 'other_describe_state', :locals => {:id_suffix => id_suffix } %>
<% else %>
    We don't know whether the most recent response to this request contains
    information or not
        –
    if you are
        <%= user_link(@info_request.user) %>,
    please
        <%= link_to "sign in", signin_url(:r => request.request_uri) %>
    and let everyone know.

<% end %>


Includes article counter in the link.

Includes article counter in the link.

This won't break anything and fixes most themes having links using display: block in their sidebar. This behavior made the counter break the theme when displayed.

<% unless sidebar.archives.blank? %>

<%= _("Archives")%>

  <% sidebar.archives.each do |month| %>
    <% counter = sidebar.show_count ? "(#{month[:article_count]})" : "" %>

      <%= link_to"#{month[:name]} #{counter}".html_safe,  articles_by_month_path(month[:year], "%02i" % month[:month]) %>

  <% end %>

<% end %>

<% unless sidebar.archives.blank? %>

<%= _("Archives")%>

  <% sidebar.archives.each do |month| %>

      <%= link_to month[:name], articles_by_month_path(month[:year], "%02i" % month[:month]) %>
      <%= "(#{month[:article_count]})" if sidebar.show_count %>

  <% end %>

<% end %>