oops, left in testing code, removed

oops, left in testing code, removed

Journals

<%= render :partial=>"a_to_z" %>

  <% if flash[:error] %>

(!) Problems: <%= flash[:error] %>

  <% end %>

Searching for a specific journal?

  <%= form_tag(@submit_hash, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'})  %>

      <input type=hidden name="rfr_id" value="info:sid/sfxit.com:citation">

          Enter
              the journal title or the ISSN.
              If you have both the journal
              title
      and ISSN, use the ISSN.
        <input type="hidden" id="rft_title" name="rft.title">
          <input type="hidden" id="rft_object_id" name="rft.object_id">
          <input type="hidden" id="date" name="rft.date">

          Journal Title:

            <%= text_field :journal, :title, {:name=>'rft.jtitle', :onchange=>'clearObjectId();',:autocomplete=>'off', :size=>'40'} %>

            <select name="umlaut.title_search_type" id="sfx_title_search">
              <option value="contains">contains</option>
              <option value="begins">begins
              with</option>
              <option value="exact">exact match</option>
            </select>
                ISSN:
            <input type=text name="rft.issn" size="10" maxlength="9">

Searching for a specific article?

        Enter as much as you know of the following:

        Date:
          <select name="__year" onChange="setDate('rft.date',document.OpenURL)">

          <option value="" selected>Year</option>
            <% (-1*Time.now.year..-1*1950).each do |year| %>
            <option value="<%= year.abs.to_s %>"><%= year.abs.to_s %></option>
            <% end %>
          </select>

          <select name="__month" onChange="setDate('rft.date',document.OpenURL)">
            <option value="" selected>Month
            <option value="01">Jan
            <option value="02">Feb
            <option value="03">Mar
            <option value="04">Apr
            <option value="05">May
            <option value="06">Jun
            <option value="07">Jul
            <option value="08">Aug
            <option value="09">Sep
            <option value="10">Oct
            <option value="11">Nov
            <option value="12">Dec
          </select>

          <select name="__day" onChange="setDate('rft.date',document.OpenURL)">
            <option value="" selected>Day
            <option value="01">01
            <option value="02">02
            <option value="03">03
            <option value="04">04
            <option value="05">05
            <option value="06">06
            <option value="07">07
            <option value="08">08
            <option value="09">09
            <option value="10">10
            <option value="11">11
            <option value="12">12
            <option value="13">13
            <option value="14">14
            <option value="15">15
            <option value="16">16
            <option value="17">17
            <option value="18">18
            <option value="19">19
            <option value="20">20
            <option value="21">21
            <option value="22">22
            <option value="23">23
            <option value="24">24
            <option value="25">25
            <option value="26">26
            <option value="27">27
            <option value="28">28
            <option value="29">29
            <option value="30">30
          </select>

             Volume:
          <input type=text name="rft.volume" size="5" maxlength="5" value="" id='volume'>   Issue:
          <input type=text name="rft.issue" size="5" value="" id="issue">
             Start page:
          <input type=text name="rft.spage" size="5" value="" id='spage'>

        DOI or Pubmed Identifier:

          <select name='rft_id_type'>
            <option value='doi'>DOI:</option>
            <option value='pmid'>PMID:</option>
          </select>
           <input name="rft_id_value" type=text value="" size=25>

      <input type="submit" name="Generate_OpenURL2" value="Search">

                                      </form>

? Having
    Trouble?

Try entering less information
    about your article. If one piece of information is wrong, it could be causing
    the problem.

  <% if help_url = AppConfig.param('help_url') %>

For technical support, including access problems, please <a href="<%= help_url %>">contact us.

  <% end %>

Journals

<%= render :partial=>"a_to_z" %>

  <% if flash[:error] %>

(!) Problems: <%= flash[:error] %>

  <% end %>

Searching for a specific journal?

  <%= form_tag(@submit_hash, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'})  %>

      <input type=hidden name="rfr_id" value="info:sid/sfxit.com:citation">

          Enter
              the journal title or the ISSN.
              If you have both the journal
              title
      and ISSN, use the ISSN.
        <input type="hidden" id="rft_title" name="rft.title">
          <input type="hidden" id="rft_object_id" name="rft.object_id">
          <input type="hidden" id="date" name="rft.date">

          Journal Title:

            <%= text_field :journal, :title, {:name=>'rft.jtitle', :onchange=>'clearObjectId();',:autocomplete=>'off', :size=>'40'} %>

            <% text_field_with_auto_complete :journal, :title, {:name=>'rft.jtitle', :onchange=>'clearObjectId();',:autocomplete=>'off', :size=>'40'}, {:after_update_element=>'updateObjectId', :min_chars => 4, 'parameters' => "foo=bar"}
            %>

            <select name="umlaut.title_search_type" id="sfx_title_search">
              <option value="contains">contains</option>
              <option value="begins">begins
              with</option>
              <option value="exact">exact match</option>
            </select>
                ISSN:
            <input type=text name="rft.issn" size="10" maxlength="9">

Searching for a specific article?

        Enter as much as you know of the following:

        Date:
          <select name="__year" onChange="setDate('rft.date',document.OpenURL)">

          <option value="" selected>Year</option>
            <% (-1*Time.now.year..-1*1950).each do |year| %>
            <option value="<%= year.abs.to_s %>"><%= year.abs.to_s %></option>
            <% end %>
          </select>

          <select name="__month" onChange="setDate('rft.date',document.OpenURL)">
            <option value="" selected>Month
            <option value="01">Jan
            <option value="02">Feb
            <option value="03">Mar
            <option value="04">Apr
            <option value="05">May
            <option value="06">Jun
            <option value="07">Jul
            <option value="08">Aug
            <option value="09">Sep
            <option value="10">Oct
            <option value="11">Nov
            <option value="12">Dec
          </select>

          <select name="__day" onChange="setDate('rft.date',document.OpenURL)">
            <option value="" selected>Day
            <option value="01">01
            <option value="02">02
            <option value="03">03
            <option value="04">04
            <option value="05">05
            <option value="06">06
            <option value="07">07
            <option value="08">08
            <option value="09">09
            <option value="10">10
            <option value="11">11
            <option value="12">12
            <option value="13">13
            <option value="14">14
            <option value="15">15
            <option value="16">16
            <option value="17">17
            <option value="18">18
            <option value="19">19
            <option value="20">20
            <option value="21">21
            <option value="22">22
            <option value="23">23
            <option value="24">24
            <option value="25">25
            <option value="26">26
            <option value="27">27
            <option value="28">28
            <option value="29">29
            <option value="30">30
          </select>

             Volume:
          <input type=text name="rft.volume" size="5" maxlength="5" value="" id='volume'>   Issue:
          <input type=text name="rft.issue" size="5" value="" id="issue">
             Start page:
          <input type=text name="rft.spage" size="5" value="" id='spage'>

        DOI or Pubmed Identifier:

          <select name='rft_id_type'>
            <option value='doi'>DOI:</option>
            <option value='pmid'>PMID:</option>
          </select>
           <input name="rft_id_value" type=text value="" size=25>

      <input type="submit" name="Generate_OpenURL2" value="Search">

                                      </form>

? Having
    Trouble?

Try entering less information
    about your article. If one piece of information is wrong, it could be causing
    the problem.

  <% if help_url = AppConfig.param('help_url') %>

For technical support, including access problems, please <a href="<%= help_url %>">contact us.

  <% end %>


permit uninserted tracks to be edited

permit uninserted tracks to be edited

  <% cl = cycle('table0', 'table1') %>
  <td class="<%= cl %>">
    <% if trace.inserted %>
    <a href="<%= url_for :controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name %>"><img src="<%= url_for :controller => 'trace', :action => 'icon', :id => trace.id, :display_name => trace.user.display_name %>" border="0" alt="" />
    <% else %>
    PENDING
    <% end %>

  <td class="<%= cl %>"><%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %>
    <span class="gpxsummary" title="<%= trace.timestamp %>"> ...
      <% if trace.inserted %>
      (<%= trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> points)
      <% end %>
      ... <%= time_ago_in_words( trace.timestamp ) %>  ago
      <%= link_to 'more', {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => 'View Trace Details'} %> /
      <%= link_to_if trace.inserted?, 'map', {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'View Map'} %> /
      <%= link_to 'edit', {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => 'Edit Map'} %>

      <%= h(trace.description) %>

    by <%= link_to h(trace.user.display_name), {:controller => 'user', :action => 'view', :display_name => trace.user.display_name} %>
    in
    <% if trace.tags %>
      <% trace.tags.each do |tag| %>
        <%= link_to_tag tag.tag %>
      <% end %>
    <% end %>

  <% cl = cycle('table0', 'table1') %>
  <td class="<%= cl %>">
    <% if trace.inserted %>
    <a href="<%= url_for :controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name %>"><img src="<%= url_for :controller => 'trace', :action => 'icon', :id => trace.id, :display_name => trace.user.display_name %>" border="0" alt="" />
    <% else %>
    PENDING
    <% end %>

  <td class="<%= cl %>"><%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %>
    <span class="gpxsummary" title="<%= trace.timestamp %>"> ...
      <% if trace.inserted %>
      (<%= trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> points)
      <% end %>
      ... <%= time_ago_in_words( trace.timestamp ) %>  ago
      <%= link_to 'more', {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => 'View Trace Details'} %> /
      <%= link_to_if trace.inserted?, 'map', {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'View Map'} %> /
      <%= link_to_if trace.inserted?, 'edit', {:controller => 'site', :action => 'edit', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14, :gpx => trace.id }, {:title => 'Edit Map'} %>

      <%= h(trace.description) %>

    by <%= link_to h(trace.user.display_name), {:controller => 'user', :action => 'view', :display_name => trace.user.display_name} %>
    in
    <% if trace.tags %>
      <% trace.tags.each do |tag| %>
        <%= link_to_tag tag.tag %>
      <% end %>
    <% end %>


Fix #532 http://code.google.com/p/activescaffold/issues/detail?id=532 Show rows as readonly in subform when row is not authorized for update Show blank row in subform if row is authorized for create even when it's not authorized for update

<% record_column = column -%>
<% readonly = (@record.readonly? or not @record.authorized_for?(:action => :update)) -%>
<% action = @record.new_record? ? :create : (readonly ? :read : nil) -%>
<% show_actions = false -%>
<% active_scaffold_config_for(@record.class).subform.columns.each :for => @record.class, :action => action, :flatten => true do |column| %>
  <%
  next unless in_subform?(column, parent_record)
  show_actions = true
  column = column.clone
  column.form_ui ||= :select if column.association
  -%>

    <% unless readonly and not @record.new_record? -%>
      <%= render :partial => form_partial_for_column(column), :locals => { :column => column, :scope => scope } -%>
    <% else -%>

<%= get_column_value(@record, column) -%>

    <% end -%>

<% end -%>
<% if show_actions -%>

    <%= link_to_function as_('Remove'), '$(this).up(".association-record").remove()', { :class => "destroy" } if @record.authorized_for?(:action => :destroy) or not [:destroy, :delete_all].include?(record_column.association.options[:dependent]) %>
    <% unless @record.new_record? %>
    <input type="hidden" name="<%= "record#{scope}[id]" -%>" value="<%= @record.id -%>" />
    <% end -%>

<% end -%>


ActionItem1165: fixing broken HTML

ActionItem1165: fixing broken HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= html_language %>" lang="<%= html_language %>">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <%= javascript_include_tag :defaults %>
    <%= stylesheet_link_tag '/designs/icons/default/style.css' %>
    <%= javascript_include_tag 'jquery-latest.js' %>

    <%=
      # Load the principal css files:
      stylesheet_import( %w( common button search forms profiles)
                         ) + "\n" +
      stylesheet_import( %w( common button search forms profiles wizard),
      :themed_source => true ) + "\n" +
      # Load the boxes's css file if each exists:
      import_blocks_stylesheets +
      stylesheet_import( "controller_"+ @controller.controller_name() ) + "\n" +
      stylesheet_import( "controller_"+ @controller.controller_name(), :themed_source => true )
    %>

        <a href="#" id="btShowHelp" class="icon-help32on help-on icon-help-on"
           title="<%= _('Turn help on/off') %>"
           onclick="mouseHelpOnOff(); return false"><%= _('Help') %>
          <%= yield %>

    <%= javascript_include_tag 'show-mouse-help' %>
    <%= javascript_include_tag 'noosfero-show-help' %>


updated #6

updated #6

<% if @user.nil? or @users.empty? %>

	    <%= l(:label_no_data) %>

<% else %>
    <%=t(:list_members_legend)%>

	                <%= link_to t(:label_user_login), {:action => 'index', :order_login => @login['order'], :tab => "members"}, :class => @login['class'] %>

	                <%= link_to t(:label_user_fullname), {:action => 'index', :order_name => @name['order'], :tab => "members"}, :class => @name['class'] %>

	                <%= link_to t(:label_field_votes), {:action => 'index', :order_votes => @votes['order'], :tab => "members"}, :class => @votes['class'] %>

	        <% @users.each do |user| %>
	        <tr class="<%= cycle 'odd', 'even' %>">

	                <%= user['login'] %>

	                <%= user['fullname'] %>

	            	<span id="view_votes_<%=user['id']%>" class="view_votes_toggle" onclick="toggleForm(<%=user['id']%>);"><%= user['votes'] %>
					<span id="view_form_<%=user['id']%>" class="form_votes_toggle" style="display:none;">
						<% form_remote_tag :url => {:action => 'update_votes', :user_id => user['id']} do %>
							<%= text_field_tag :votes, user['votes']%>
							<%= submit_tag t(:label_update_votes) %>
							<%= button_to_function t(:button_cancel), "toggleForm(#{user['id']});"%>
						<% end %>

	        <% end %>

<% end %>

<% if @users.empty? %>

	    <%= l(:label_no_data) %>

<% else %>
    <%=t(:list_members_legend)%>

	                <%= link_to t(:label_user_login), {:action => 'index', :order_login => @login['order'], :tab => "members"}, :class => @login['class'] %>

	                <%= link_to t(:label_user_fullname), {:action => 'index', :order_name => @name['order'], :tab => "members"}, :class => @name['class'] %>

	                <%= link_to t(:label_field_votes), {:action => 'index', :order_votes => @votes['order'], :tab => "members"}, :class => @votes['class'] %>

	        <% @users.each do |user| %>
	        <tr class="<%= cycle 'odd', 'even' %>">

	                <%= user['login'] %>

	                <%= user['fullname'] %>

	            	<span id="view_votes_<%=user['id']%>" class="view_votes_toggle" onclick="toggleForm(<%=user['id']%>);"><%= user['votes'] %>
					<span id="view_form_<%=user['id']%>" class="form_votes_toggle" style="display:none;">
						<% form_remote_tag :url => {:action => 'update_votes', :user_id => user['id']} do %>
							<%= text_field_tag :votes, user['votes']%>
							<%= submit_tag t(:label_update_votes) %>
							<%= button_to_function t(:button_cancel), "toggleForm(#{user['id']});"%>
						<% end %>

	        <% end %>

<% end %>


removing old rhtml file

removing old rhtml file

<div<%= user && " class='logged-in'" %>>

    <% if @page.allow_edit?(user) && !remove_content_button(:edit) %>
      <% content = content_tag('span', label_for_edit_article(@page)) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }) %>
      <%= expirable_button @page, :edit, content, url %>
    <% end %>

    <% if @page != profile.home_page && !@page.has_posts?  && @page.allow_delete?(user) && !remove_content_button(:delete)%>
      <% content = content_tag( 'span', _('Delete') ) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page}) %>
      <% options = {:method => :post, :confirm => delete_article_message(@page)} %>
      <%= expirable_button @page, :delete, content, url, options %>
    <% end %>

    <% if !@page.folder? && @page.allow_spread?(user) && !remove_content_button(:spread) %>
      <% content = content_tag( 'span', _('Spread this') ) %>
      <% url = nil %>
      <% if profile.kind_of?(Person) %>
        <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }) %>
      <% elsif profile.kind_of?(Community) && environment.portal_community %>
        <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }) %>
      <% end %>
      <%= expirable_button @page, :spread, content, url if url %>
    <% end %>

    <% if !@page.gallery? && (@page.allow_create?(user) || (@page.parent && @page.parent.allow_create?(user))) %>
      <% if @page.translatable? && !@page.native_translation.language.blank? && !remove_content_button(:locale) %>
        <% content = _('Add translation') %>
        <% parent_id = (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)) %>
        <% url = profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => parent_id, :type => @page.type, :article => { :translation_of_id => @page.native_translation.id })%>
        <%= expirable_button @page, :locale, content, url %>
      <% end %>

      <%= colorbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) unless remove_content_button(:new) %>
    <% end %>

    <%
    @plugins.dispatch(:article_toolbar_extra_buttons).each do |plugin_button| %>
      <%= instance_eval(&plugin_button) %>
    <% end %>

    <% if @page.accept_uploads? && @page.allow_create?(user) %>
      <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) unless remove_content_button(:upload)%>
    <% end %>

    <% if !@page.allow_create?(user) && profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) && !remove_content_button(:suggest) %>
      <% content = content_tag( 'span', _('Suggest an article') ) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}) %>
      <% options = {:id => 'suggest-article-link'} %>
      <%= expirable_button @page, :suggest, content, url, options %>
    <% end %>

    <% if @page.display_versions? %>
      <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %>
    <% end %>

    <%= report_abuse(profile, :link, @page) %>

    <% if @page.blog? and !@page.image.nil? %>

<%= image_tag(@page.image.public_filename())%>

    <% end %>
    <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
    <%= @plugins.dispatch(:article_header_extra_contents, @page).collect { |content| instance_eval(&content) }.join("") %>
    <%= article_title(@page, :no_link => true) %>
    <%= article_translations(@page) %>


new request states for our code

new request states for our code

<% 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') %>

            <%= radio_button "incoming_message", "described_state", "deadline_extended", :id => 'deadline_extended' + id_suffix %>
            <label for="deadline_extended<%=id_suffix%>"><%= _('Authority has requested extension of the deadline.') %>

        <% 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 refused') %>

            <%= radio_button "incoming_message", "described_state", "wrong_response", :id => 'wrong_response' + id_suffix %>
            <label for="rejected<%=id_suffix%>"><%= _('Authority has replied but the response does not correspond to the request') %>

           <%= 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}} please sign in and let everyone know.',:user_link=>user_link(@info_request.user)) % [signin_url(:r => request.request_uri)] %>
<% 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\'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 refused') %>

           <%= 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}} please sign in and let everyone know.',:user_link=>user_link(@info_request.user)) % [signin_url(:r => request.request_uri)] %>
<% end %>


Say search tips

Say search tips

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% @include_request_link_in_authority_listing = true %>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

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

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @inputted_sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Search tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby == 'relevant', "Show most relevant results first", search_url(@query, 'relevant') %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

        <% for result in @xapian_requests.results %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. <%=search_link('climbing lane')%>

Use OR (in capital letters) where you don't mind which word,  e.g. <%=search_link('commons OR lords')%>

Use quotes when you want to find an exact phrase, e.g. <%=search_link('"Liverpool City Council"')%>

status: to select based on the status or historical status of the request, see the table of statuses below.

variety: to select type of thing to search for, see the table of varieties below.

<%=search_link('requested_from:home_office')%> to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

<%=search_link('requested_by:julian_todd')%> to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

<%=search_link('commented_by:tony_bowden')%> to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

<%=search_link('filetype:pdf')%> to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type <%=search_link('01/01/2008..14/01/2008')%> to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

Table of statuses

<%=search_link('status:waiting_response')%>	 Waiting for the public authority to reply

<%=search_link('status:not_held')%>	 The public authority does not have the information requested

<%=search_link('status:rejected')%>	 The request was rejected by the public authority

<%=search_link('status:partially_successful')%>	 Some of the information requested has been received

<%=search_link('status:successful')%>	 All of the information requested has been received

<%=search_link('status:waiting_clarification')%>	 The public authority would like part of the request explained

<%=search_link('status:gone_postal')%>	 The public authority would like to / has responded by post

<%=search_link('status:internal_review')%>	 Waiting for the public authority to complete an internal review of their handling of the request

<%=search_link('status:error_message')%>	 Received an error message, such as delivery failure.

<%=search_link('status:requires_admin')%>	 A strange reponse, required attention by the WhatDoTheyKnow team

<%=search_link('status:user_withdrawn')%>	 The requester has abandoned this request for some reason

Table of varieties

<%=search_link('variety:sent')%>	 Original request sent

<%=search_link('variety:followup_sent')%>	 Follow up message sent by requester

<%=search_link('variety:response')%>	 Response from a public authority

<%=search_link('variety:comment')%>	 Annotation added to request

<%=search_link('variety:authority')%>	 A public authority

<%=search_link('variety:user')%>	 A WhatDoTheyKnow user

<% end %>

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% @include_request_link_in_authority_listing = true %>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

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

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @inputted_sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Advanced tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby == 'relevant', "Show most relevant results first", search_url(@query, 'relevant') %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

        <% for result in @xapian_requests.results %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. <%=search_link('climbing lane')%>

Use OR (in capital letters) where you don't mind which word,  e.g. <%=search_link('commons OR lords')%>

Use quotes when you want to find an exact phrase, e.g. <%=search_link('"Liverpool City Council"')%>

status: to select based on the status or historical status of the request, see the table of statuses below.

variety: to select type of thing to search for, see the table of varieties below.

<%=search_link('requested_from:home_office')%> to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

<%=search_link('requested_by:julian_todd')%> to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

<%=search_link('commented_by:tony_bowden')%> to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

<%=search_link('filetype:pdf')%> to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type <%=search_link('01/01/2008..14/01/2008')%> to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

Table of statuses

<%=search_link('status:waiting_response')%>	 Waiting for the public authority to reply

<%=search_link('status:not_held')%>	 The public authority does not have the information requested

<%=search_link('status:rejected')%>	 The request was rejected by the public authority

<%=search_link('status:partially_successful')%>	 Some of the information requested has been received

<%=search_link('status:successful')%>	 All of the information requested has been received

<%=search_link('status:waiting_clarification')%>	 The public authority would like part of the request explained

<%=search_link('status:gone_postal')%>	 The public authority would like to / has responded by post

<%=search_link('status:internal_review')%>	 Waiting for the public authority to complete an internal review of their handling of the request

<%=search_link('status:error_message')%>	 Received an error message, such as delivery failure.

<%=search_link('status:requires_admin')%>	 A strange reponse, required attention by the WhatDoTheyKnow team

<%=search_link('status:user_withdrawn')%>	 The requester has abandoned this request for some reason

Table of varieties

<%=search_link('variety:sent')%>	 Original request sent

<%=search_link('variety:followup_sent')%>	 Follow up message sent by requester

<%=search_link('variety:response')%>	 Response from a public authority

<%=search_link('variety:comment')%>	 Annotation added to request

<%=search_link('variety:authority')%>	 A public authority

<%=search_link('variety:user')%>	 A WhatDoTheyKnow user

<% end %>


Wording change from Tony.

Wording change from Tony.

<% @title = "Make an " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %>

<% if @existing_request %>

    <%= user_or_you_capital_link(@existing_request.user) %> already
    created the same request on <%=simple_date(@existing_request.created_at)%>.
    You can either view the <a href="<%=request_url(@existing_request)%>">existing request,
    or edit the details below to make a new but similar request.

<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

Read this before writing your <%=h(@info_request.law_used_full)%> request

        <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %>

                First,
                <% if !@info_request.public_body.publication_scheme.empty? %>
                    browse the authority's
                    <%= link_to "publication scheme", @info_request.public_body.publication_scheme %>
                    or search their web site ...
                <% else %>
                       search the authority's web site ...
                <% end %>
                <% if !@info_request.public_body.calculated_home_page.nil? %>

                            <%= text_field_tag 'q', params[:q], { :size => 20 } %>
                    <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %>
                    <%= submit_tag "Search" %>
               <% end %>

               ... to check that the info isn't already published.

        <% end %>

        <% if @info_request.public_body.info_requests.size > 0 %>
            Browse <%= link_to "other requests", public_body_url(@info_request.public_body)  %>
            to '<%= h(@info_request.public_body.name) %>'
            for examples of how to word your request.
        <% else %>
            Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.
        <% end %>

Write your request in simple, precise language.

Ask for specific documents or information, this site is not suitable for general enquiries.

Keep it focussed. If you ask for everything it might cost too much and you might get nothing.

This site is public. Everything you type and any response will be published.

    <% if @info_request.public_body.notes != "" %>

Special note for this authority!

<%=MySociety::Format.make_clickable(@info_request.public_body.notes) %>

    <% end %>

    <% if @info_request.public_body.eir_only? %>

Please ask for environmental information only

The Freedom of Information Act does not apply to <%=h(@info_request.public_body.name)%>.
        However, you have the right to request environmental
        information under a different law (explanation).
        This covers a very wide spectrum of information about the state of
        the natural and built environment, such as:

Air, water, soil, land, flora and fauna (including how these effect
        human beings)

Information on emissions and discharges (e.g. noise, energy,
        radiation, waste materials)

Human health and safety

Cultural sites and built structures (as they may be affected by the
        environmental factors listed above)

Plans and administrative measures that affect these matters

Please only request information that comes under those categories, do not waste your
        time or the time of the public authority by requesting unrelated information.

    <% end %>

<% form_for(:info_request, @info_request, :html => { :id => 'write_form' }  ) do |f| %>

			To:
			<%=h(@info_request.public_body.name)%>

			Summary:
			<%= f.text_field :title, :size => 50 %>

			(a one line summary of the information you are requesting,
			e.g.
            <% if @info_request.law_used == 'eir' %>
                'Pollution levels over time for the River Tyne'
            <% else %>
                'Crime statistics by ward level for Wales'
            <% end %>
            )

		<% fields_for :outgoing_message do |o| %>

			Your request:
			<%= o.text_area :body, :rows => 20, :cols => 60 %>

		<% end %>

        <% if !@user %>

                Everything that you enter on this page, including your name,
                will be displayed publicly on
                this website (why?).
                If you are thinking of using a pseudonym,
                please read this first.

        <% else %>

                Everything that you enter on this page
                will be displayed publicly on
                this website (why?).

        <% end %>

			Can I request information about myself?
			No! (Click here for details)

			<%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
			<%= hidden_field_tag(:submitted_new_request, 1 ) %>
			<%= hidden_field_tag(:preview, 1 ) %>
			<%= submit_tag "Preview your public request" %>

<% end %>

<% @title = "Make an " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %>

<% if @existing_request %>

    <%= user_or_you_capital_link(@existing_request.user) %> already
    created the same request on <%=simple_date(@existing_request.created_at)%>.
    You can either view the <a href="<%=request_url(@existing_request)%>">existing request,
    or edit the details below to make a new but similar request.

<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

Read this before writing your <%=h(@info_request.law_used_full)%> request

        <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %>

                First,
                <% if !@info_request.public_body.publication_scheme.empty? %>
                    browse the authority's
                    <%= link_to "publication scheme", @info_request.public_body.publication_scheme %>
                    or search their web site ...
                <% else %>
                       search the authority's web site ...
                <% end %>
                <% if !@info_request.public_body.calculated_home_page.nil? %>

                            <%= text_field_tag 'q', params[:q], { :size => 20 } %>
                    <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %>
                    <%= submit_tag "Search" %>
               <% end %>

               ... to check that the info isn't already published.

        <% end %>

        <% if @info_request.public_body.info_requests.size > 0 %>
            Browse <%= link_to "other requests", public_body_url(@info_request.public_body)  %>
            to '<%= h(@info_request.public_body.name) %>'
            for examples of how to word your request.
        <% else %>
            Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.
        <% end %>

Write your request in simple, precise language.

Ask for specific documents or information, this site is not suitable for general enquiries.

Keep it focussed. If you ask for everything it might cost too much and you might get nothing.

This site is public. Everything you type (except your email address) and any response will be published.

    <% if @info_request.public_body.notes != "" %>

Special note for this authority!

<%=MySociety::Format.make_clickable(@info_request.public_body.notes) %>

    <% end %>

    <% if @info_request.public_body.eir_only? %>

Please ask for environmental information only

The Freedom of Information Act does not apply to <%=h(@info_request.public_body.name)%>.
        However, you have the right to request environmental
        information under a different law (explanation).
        This covers a very wide spectrum of information about the state of
        the natural and built environment, such as:

Air, water, soil, land, flora and fauna (including how these effect
        human beings)

Information on emissions and discharges (e.g. noise, energy,
        radiation, waste materials)

Human health and safety

Cultural sites and built structures (as they may be affected by the
        environmental factors listed above)

Plans and administrative measures that affect these matters

Please only request information that comes under those categories, do not waste your
        time or the time of the public authority by requesting unrelated information.

    <% end %>

<% form_for(:info_request, @info_request, :html => { :id => 'write_form' }  ) do |f| %>

			To:
			<%=h(@info_request.public_body.name)%>

			Summary:
			<%= f.text_field :title, :size => 50 %>

			(a one line summary of the information you are requesting,
			e.g.
            <% if @info_request.law_used == 'eir' %>
                'Pollution levels over time for the River Tyne'
            <% else %>
                'Crime statistics by ward level for Wales'
            <% end %>
            )

		<% fields_for :outgoing_message do |o| %>

			Your request:
			<%= o.text_area :body, :rows => 20, :cols => 60 %>

		<% end %>

        <% if !@user %>

                Everything that you enter on this page, including your name,
                will be displayed publicly on
                this website (why?).
                If you are thinking of using a pseudonym,
                please read this first.

        <% else %>

                Everything that you enter on this page
                will be displayed publicly on
                this website (why?).

        <% end %>

			Can I request information about myself?
			No! (Click here for details)

			<%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
			<%= hidden_field_tag(:submitted_new_request, 1 ) %>
			<%= hidden_field_tag(:preview, 1 ) %>
			<%= submit_tag "Preview your public request" %>

<% end %>


 * Check @pages.item_count instead of @articles.size in articles/index.rhtml (fixes #39) [wismar@gmail.com]

git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@167 820eb932-12ee-0310-9ca8-eeb645f39767

<% for article in @articles -%>
  <%= render_partial "article", article %>

    <% unless article.categories.empty? -%>
      Posted in
      <%= article.categories.collect { |c| link_to c.name, :controller=>"articles", :action=>"category", :id=>c.name }.join(", ") %>
      <% unless article.allow_comments < 1 and article.allow_pings < 1 -%>
        |
      <% end -%>
    <% end -%>
    <% unless article.allow_comments < 1 -%>
      <%= comments_link(article) %>
      <% unless article.allow_pings < 1 -%>
        |
      <% end -%>
    <% end -%>
    <% unless article.allow_pings < 1 -%>
      <%= trackbacks_link(article) %>
    <% end -%>

<% end -%>

<% unless @pages.item_count < 10 %>

  Older posts:
  <%= pagination_links @pages, :params => { :action => @controller.action_name } %>

<% end %>

<% for article in @articles -%>
  <%= render_partial "article", article %>

    <% unless article.categories.empty? -%>
      Posted in
      <%= article.categories.collect { |c| link_to c.name, :controller=>"articles", :action=>"category", :id=>c.name }.join(", ") %>
      <% unless article.allow_comments < 1 and article.allow_pings < 1 -%>
        |
      <% end -%>
    <% end -%>
    <% unless article.allow_comments < 1 -%>
      <%= comments_link(article) %>
      <% unless article.allow_pings < 1 -%>
        |
      <% end -%>
    <% end -%>
    <% unless article.allow_pings < 1 -%>
      <%= trackbacks_link(article) %>
    <% end -%>

<% end -%>

<% unless @articles.size < 10 %>

  Older posts:
  <%= pagination_links @pages, :params => { :action => @controller.action_name } %>

<% end %>


put staff's name in the link to dashboard on your projects

<% @project ||= @show_projects.first -%>

<%= your_project.title %>

<% if profile = @viewer.profiles.find_by_project_id(@project.id) %>
  (<%= link_to("View #{@viewer.person.full_name} Dashboard", profile_path(profile)) %>)
<% end %>

<%= render :remote, :controller => 'reports', :action => :project_stats, :project_id => your_project.id %>

<%
@viewer.set_project(your_project)

title = ""
if @viewer.is_eventgroup_coordinator?(@eg)
    title += ", Projects Coordinator"
end
if @viewer.is_project_director?
    title += ", Project Director"
end
if @viewer.is_project_administrator?
    title += ", Project Administrator"
end
if @viewer.is_support_coach?
    title += ", Support Coach"
end
if @viewer.is_project_staff?
    title += ", Project Staff"
end
if @viewer.is_processor?
    title += ", Processor"
end

%>

<%= "#{@viewer.name}#{title}" %>

<% if @viewer.is_support_coach? || @viewer.is_atleast_project_staff(your_project) %>
    <%= render :partial => "support_coach_list", :locals => { :project => your_project } %>
<% end %>

<% if !@viewer.is_student?(@eg) %>
  <%
    cache(:controller => 'main', :action => 'your_projects', :section => 'Acceptance',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>

      <%= link_to 'Assign tasks', :action => 'assign_individual_tasks', :project_id => your_project.id %>

Accepted pile:

	      <%= render :partial => "accepted_pile", :locals => { :project => your_project } %>

  <% end %>

    <% @can_evaluate = @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>
    <% appln_includes = [ :references, { :viewer => { :persons => :campuses } }, :preference1, :profiles ]
       @processor_list = Applying.find_all_by_project_id your_project.id
    %>
    <% @refs_for_questionnaire = Hash[*(@processor_list.collect{ |applying|
           applying.appln.form.questionnaire.id
         }.uniq.inject([]) { |arr,qid|
           arr << qid << Questionnaire.find(qid).references
         })]
    %>

Processor's pile:

    <%= render :partial => "processor_pile", :locals => { :project => your_project } %>

Staff:

      <%= render :partial => "staff_pile", :locals => { :project => your_project } %>

  <% if @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>

Withdrawn pile:

      <%= render :partial => "withdrawn_pile", :locals => {:project => your_project }%>

  <% end %>
<% end %>

<% @project ||= @show_projects.first -%>

<%= your_project.title %>

<% if profile = @viewer.profiles.find_by_project_id(@project.id) %>
  (<%= link_to("Dashboard", profile_path(profile)) %>)
<% end %>

<%= render :remote, :controller => 'reports', :action => :project_stats, :project_id => your_project.id %>

<%
@viewer.set_project(your_project)

title = ""
if @viewer.is_eventgroup_coordinator?(@eg)
    title += ", Projects Coordinator"
end
if @viewer.is_project_director?
    title += ", Project Director"
end
if @viewer.is_project_administrator?
    title += ", Project Administrator"
end
if @viewer.is_support_coach?
    title += ", Support Coach"
end
if @viewer.is_project_staff?
    title += ", Project Staff"
end
if @viewer.is_processor?
    title += ", Processor"
end

%>

<%= "#{@viewer.name}#{title}" %>

<% if @viewer.is_support_coach? || @viewer.is_atleast_project_staff(your_project) %>
    <%= render :partial => "support_coach_list", :locals => { :project => your_project } %>
<% end %>

<% if !@viewer.is_student?(@eg) %>

    <%= link_to 'Assign tasks', :action => 'assign_individual_tasks', :project_id => your_project.id %>

Accepted pile:

      <%= render :partial => "accepted_pile", :locals => { :project => your_project } %>

  <% @can_evaluate = @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>
  <% appln_includes = [ :references, { :viewer => { :persons => :campuses } }, :preference1, :profiles ]
     @processor_list = Applying.find_all_by_project_id your_project.id
  %>
  <% @refs_for_questionnaire = Hash[*(@processor_list.collect{ |applying|
         applying.try(:appln).try(:form).try(:questionnaire).try(:id)
       }.uniq.compact.inject([]) { |arr,qid|
         arr << qid << Questionnaire.find(qid).references
       })]
  %>

Processor's pile:

    <%= render :partial => "processor_pile", :locals => { :project => your_project } %>

Staff:

      <%= render :partial => "staff_pile", :locals => { :project => your_project } %>

  <% if @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>

Withdrawn pile:

      <%= render :partial => "withdrawn_pile", :locals => {:project => your_project }%>

  <% end %>
<% end %>


less scary edition warning on holdings too

<%
=begin
  jrochkind's alternative partial for displaying holdings. Displays more
  information to deal with the more information we need to display from
  our Horizon. In tabular format. Customized for JH's needs, but should
  be usable by anyone.
=end
%>

<%= ServiceTypeValue[:holding].display_name_pluralize.titleize %>

<% holdings = get_service_type('holding') %>

<%
holdings.each do |p|
  target = p.view_data
%>

<%= target[:collection_str] %>

      <%= target[:call_number]%>

      <% status_class = (target[:status] == "Not Charged" or target[:status] == "Available") ? 'available' : '' %>

      <span class="<%= status_class %>"><%= target[:status]   %>

      <%= link_to(image_tag("more_info.gif", "border" => 0, "alt" => 'more info'), {:controller=>"link_router", :id=>p.id}, "target" => "_blank") %>

      <% if target[:request_url] %>

        <%= link_to( image_tag("request.gif", "border" => "0", "alt" => "request"),  target[:request_url], "target" => "_blank" ) %>
      <% end %>

  <% if (!target[:match_reliability].blank?) && target[:match_reliability] != ServiceResponse::MatchExact %>

          Edition information <%= target[:edition_str] %>

  <% end %>

  <% unless target[:notes].blank? %>

<%= target[:notes] %>

  <% end %>

  <% unless target[:coverage_str_array].blank? %>

          <%
            hidden_div_id = "copies_#{p.id}"
            list_with_limit(hidden_div_id, target[:coverage_str_array]) do |item, index|
          %>

<%= item %>

          <% end %>

  <% end %>
<%
end %>

<%
if holdings.empty?
   searches = get_service_type('holding_search')
    searches.each do | result_st |
      response = result_st.view_data %>

<%= link_to response[:display_text], {:controller=>'link_router', :id=>result_st.id}, 'target'=>"_blank" %>

<%
   end
end
if (holdings.blank? && searches.blank? && ! service_types_in_progress?(['holding', 'holding_search']))
%>

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

<%    session[:coins].each { | coins |
        unless coins[:text]
          label = image_tag(coins[:icon], :border=>0)
        else
          label = coins[:text]
        end
    %>

<a href="<%= coins[:host]%>?<%= @user_request.referent.to_context_object.kev %>" target="_blank"><%= label %>

    <%}%>

<%   end
%>
<% if service_types_in_progress?(['holding', 'holding_search']) %>

<%= render(:partial => "background_progress", :locals => { :svc_types => [ServiceTypeValue[:holding],ServiceTypeValue[:holding_search]], :current_set_empty => holdings.empty? } ) %>

<% end %>

<%
=begin
  jrochkind's alternative partial for displaying holdings. Displays more
  information to deal with the more information we need to display from
  our Horizon. In tabular format. Customized for JH's needs, but should
  be usable by anyone.
=end
%>

<%= ServiceTypeValue[:holding].display_name_pluralize.titleize %>

<% holdings = get_service_type('holding') %>

<%
holdings.each do |p|
  target = p.view_data
%>

<%= target[:collection_str] %>

      <%= target[:call_number]%>

      <% status_class = (target[:status] == "Not Charged" or target[:status] == "Available") ? 'available' : '' %>

      <span class="<%= status_class %>"><%= target[:status]   %>

      <%= link_to(image_tag("more_info.gif", "border" => 0, "alt" => 'more info'), {:controller=>"link_router", :id=>p.id}, "target" => "_blank") %>

      <% if target[:request_url] %>

        <%= link_to( image_tag("request.gif", "border" => "0", "alt" => "request"),  target[:request_url], "target" => "_blank" ) %>
      <% end %>

  <% if (!target[:match_reliability].blank?) && target[:match_reliability] != ServiceResponse::MatchExact %>

          May be an alternate edition <%= target[:edition_str] %>

  <% end %>

  <% unless target[:notes].blank? %>

<%= target[:notes] %>

  <% end %>

  <% unless target[:coverage_str_array].blank? %>

          <%
            hidden_div_id = "copies_#{p.id}"
            list_with_limit(hidden_div_id, target[:coverage_str_array]) do |item, index|
          %>

<%= item %>

          <% end %>

  <% end %>
<%
end %>

<%
if holdings.empty?
   searches = get_service_type('holding_search')
    searches.each do | result_st |
      response = result_st.view_data %>

<%= link_to response[:display_text], {:controller=>'link_router', :id=>result_st.id}, 'target'=>"_blank" %>

<%
   end
end
if (holdings.blank? && searches.blank? && ! service_types_in_progress?(['holding', 'holding_search']))
%>

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

<%    session[:coins].each { | coins |
        unless coins[:text]
          label = image_tag(coins[:icon], :border=>0)
        else
          label = coins[:text]
        end
    %>

<a href="<%= coins[:host]%>?<%= @user_request.referent.to_context_object.kev %>" target="_blank"><%= label %>

    <%}%>

<%   end
%>
<% if service_types_in_progress?(['holding', 'holding_search']) %>

<%= render(:partial => "background_progress", :locals => { :svc_types => [ServiceTypeValue[:holding],ServiceTypeValue[:holding_search]], :current_set_empty => holdings.empty? } ) %>

<% end %>


A better label

A better label

  <meta name='button.add' value='<%= _('Add to the text') %>'/>
  <meta name='button.zoom' value='<%= _('Zoom in') %>'/>
  <meta name='button.close' value='<%= _('Close') %>'/>
  <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>

<%= _('Insert media') %>

      <% form_tag({ :action => 'media_upload' }, :multipart => true) do %>

          <%# TODO duplicated from partial upload_file_form %>
          <%= labelled_form_field(_('Choose folder to upload files:'), select_tag('parent_id', options_for_select([[profile.identifier, '']] + profile.folders.collect {|f| [ profile.identifier + '/' +  f.full_name, f.id ] }))) %>

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

        <% button_bar do %>
          <%= submit_button(:save, _('Upload')) %>
        <% end %>
      <% end %>

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

<%= link_to(_('Upload more files ...'), '#', :id => 'media-upload-more-files')%>

<%= _('Media search') %>

    <% form_tag({ :action => 'search' }) do %>

        <input name='q' type='text' id='media-search-query' style='width: 250px;'/>

      <%= submit_button :search, _('Search'), :id => 'media-search-button' %>
    <% end %>

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

  <meta name='button.add' value='<%= _('Add to the text') %>'/>
  <meta name='button.zoom' value='<%= _('Zoom in') %>'/>
  <meta name='button.close' value='<%= _('Close') %>'/>
  <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>

<%= _('Media upload') %>

      <% form_tag({ :action => 'media_upload' }, :multipart => true) do %>

          <%# TODO duplicated from partial upload_file_form %>
          <%= labelled_form_field(_('Choose folder to upload files:'), select_tag('parent_id', options_for_select([[profile.identifier, '']] + profile.folders.collect {|f| [ profile.identifier + '/' +  f.full_name, f.id ] }))) %>

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

        <% button_bar do %>
          <%= submit_button(:save, _('Upload')) %>
        <% end %>
      <% end %>

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

<%= link_to(_('Upload more files ...'), '#', :id => 'media-upload-more-files')%>

<%= _('Media search') %>

    <% form_tag({ :action => 'search' }) do %>

        <input name='q' type='text' id='media-search-query' style='width: 250px;'/>

      <%= submit_button :search, _('Search'), :id => 'media-search-button' %>
    <% end %>

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


Fix noscript piwik tags (not that they do anything).

<!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 "Read blog", blog_url %>

<%= 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 %>


some css fix for search box and lang box

body{
	background: #eeeeee;
}
#header #tagline {
 color: green;
}

h1 {
 color: blue ! important;
}
#header h1 a {
    background-image: url("../iz_images/navimg/alaveteli-logo.png");
	width: 212px;
	height: 87px;
	margin-left: 5px;
}
#header #tagline {
 	display: none;
}
#header{
	height: 87px;
	position: static;
	width:900px;
}
.entirebody{
	width: 904px;
	margin: 0 auto;
    background: url("../iz_images/navimg/entirebody.png") repeat-y left top;
}
#topnav {
	background: url("../iz_images/navimg/main-nav-bg.png") repeat-x left top;
	height: 32px;
	float: left;
	margin-left: 5px;
	width: 894px;
	position: static;
	z-index: 0;
}
#frontpage_search{
	background: none;
}
#topnav li a, #content a, #footer a{
	color: #1f1f1f;
}
#topnav li a:visited, #content a:visited, #footer a:visited{
	color: #585858;
}
#topnav li a:hover, #content a:hover, #footer a:hover{
	color: #900000;
}
#navigation_search {
	width:900px;;
}
.lang{
	float: right;
    width: 200px;
}
#wrapper{
	padding: 0px;
}
 .entirebody:after {
    clear:both;
    content:".";
    display:block;
    height:0;
    line-height:0;
    visibility:hidden;
}
#content{
padding:2em;
padding-right:50px;
}
#content h1, #frontpage_search h1, .controller_request h1{
color:#900000 !important;
}
div#blog_sidebar{
margin-right:23px;
}
.blog_post{
padding-right:25px;
}
#query{
	background: url("../iz_images/navimg/second-search.png") no-repeat left top;
	border:none;
	height:32px;
	width:404px;
	padding-left:5px;
	padding-right:5px;
	margin-bottom: 10px;
}

.controller_general h1{
color:#900000;
}
#topnav ul{
padding: 3px;
}
#logged_in_bar{
 width: auto;
 color:#1F1F1F;
 margin-right: 10px;
 margin-top: -3px;
 }
 #frontpage_search{
 margin-top:-13px;
 }
 #frontpage_examples div#examples_0 li, #frontpage_examples div#examples_1 li{
 margin-top:4px;
 margin-bottom:3px;
 }
 #user_locale_switcher a, #header #user_locale_switcher span{
 margin-left:5px;
 margin-right:5px;
 }
 #user_locale_switcher a{
  color: #1F1F1F;
  }
 #user_locale_switcher span{
  color:#900000;
  }
  #topnav li a.active{
    color:#900000;
  }
div#about_sidebar{
  margin-bottom:20px;
  }
  div.correspondence{
  width:600px;
  }
  #footer{
  margin-left:5px;
  width: 894px;
  min-height:100px;
  }
  .after-footer{
  	background: url("../iz_images/navimg/after-footer.png") no-repeat left bottom;
	height:10px;
	width:904px;
	float:left;
  }
  #logged_in_bar a, #logged_in_bar a:visited{
  color:#900000;
  }

 div#banner, div#orglogo {
   display: none;
 }

 div.lang {
    left: 67%;
    position: absolute;
    top: 0;
 }
#navigation_search {
	position: static;
	padding-bottom: 8px;
}

body{
	background: #eeeeee;
}
#header #tagline {
 color: green;
}

h1 {
 color: blue ! important;
}
#header h1 a {
    background-image: url("../iz_images/navimg/alaveteli-logo.png");
	width: 212px;
	height: 87px;
	margin-left: 5px;
}
#header #tagline {
 	display: none;
}
#header{
	height: 87px;
	position: static;
	width:900px;
}
.entirebody{
	width: 904px;
	margin: 0 auto;
    background: url("../iz_images/navimg/entirebody.png") repeat-y left top;
}
#topnav {
	background: url("../iz_images/navimg/main-nav-bg.png") repeat-x left top;
	height: 32px;
	float: left;
	margin-left: 5px;
	width: 894px;
	position: static;
	z-index: 0;
}
#frontpage_search{
	background: none;
}
#topnav li a, #content a, #footer a{
	color: #1f1f1f;
}
#topnav li a:visited, #content a:visited, #footer a:visited{
	color: #585858;
}
#topnav li a:hover, #content a:hover, #footer a:hover{
	color: #900000;
}
#navigation_search {
	width:900px;;
}
.lang{
	float: right;
    width: 200px;
}
#wrapper{
	padding: 0px;
}
 .entirebody:after {
    clear:both;
    content:".";
    display:block;
    height:0;
    line-height:0;
    visibility:hidden;
}
#content{
padding:2em;
padding-right:50px;
}
#content h1, #frontpage_search h1, .controller_request h1{
color:#900000 !important;
}
div#blog_sidebar{
margin-right:23px;
}
.blog_post{
padding-right:25px;
}
#query{
	background: url("../iz_images/navimg/second-search.png") no-repeat left top;
	border:none;
	height:32px;
	width:404px;
	padding-left:5px;
	padding-right:5px;
	margin-bottom: 10px;
}

.controller_general h1{
color:#900000;
}
#topnav ul{
padding: 3px;
}
#logged_in_bar{
 width: auto;
 color:#1F1F1F;
 margin-right: 10px;
 margin-top: -3px;
 }
 #frontpage_search{
 margin-top:-13px;
 }
 #frontpage_examples div#examples_0 li, #frontpage_examples div#examples_1 li{
 margin-top:4px;
 margin-bottom:3px;
 }
 #header #user_locale_switcher a, #header #user_locale_switcher span{
 margin-left:5px;
 margin-right:5px;
 }
  #header #user_locale_switcher a{
  color: #1F1F1F;
  }
  #header #user_locale_switcher span{
  color:#900000;
  }
  #topnav li a.active{
    color:#900000;
  }
div#about_sidebar{
  margin-bottom:20px;
  }
  div.correspondence{
  width:600px;
  }
  #footer{
  margin-left:5px;
  width: 894px;
  min-height:100px;
  }
  .after-footer{
  	background: url("../iz_images/navimg/after-footer.png") no-repeat left bottom;
	height:10px;
	width:904px;
	float:left;
  }
  #logged_in_bar a, #logged_in_bar a:visited{
  color:#900000;
  }

 div#banner, div#orglogo {
   display: none;
 }

 div.lang {
   position: inherit;
 }


Removing useless view

Removing useless view


[Mezuro] Toggle datepicker

[Mezuro] Toggle datepicker

<% unless @content.errors[:base].nil? %>
  <%= @content.errors[:base] %>
<% else %>
  <div id="current_project_date" data-date="<%= @project_result.date %>"/>

<%= _('Last Result') %>

      <%= _('Date') %>
      <%= @project_result.date %>

      <%= _('Load time') %>
      <%= @project_result.formatted_load_time %>

      <%= _('Analysis time') %>
      <%= @project_result.formatted_analysis_time %>

      Click to choose specific date:
      <%= link_to(image_tag('/images/calendar_date_select/calendar.png', :width => 20, :height => 20, :onClick => "$( 'datepicker' ).toggle();"), "javascript:void(0)") %>

<% end %>

<% unless @content.errors[:base].nil? %>
  <%= @content.errors[:base] %>
<% else %>

 Choose a date to see specific project results: <input type="image" id="datepicker" />

  <div id="current_project_date" data-date="<%= @project_result.date %>"/>

<%= _('Last Result') %>

      <%= _('Date') %>
      <%= @project_result.date %>

      <%= _('Load time') %>
      <%= @project_result.formatted_load_time %>

      <%= _('Analysis time') %>
      <%= @project_result.formatted_analysis_time %>

<% end %>


html fix

html fix

  <% streamlined_side_menus.each do |text,url_for_options| %>

	  <a href="<%= url_for(url_for_options) %>"><%= text %>

	<% end %>


Fix typo in translation function call.

Fix typo in translation function call.

<%= _('Follow this request') %>

    <% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %>

<%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %>

     <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>

    <% if @info_request.described_state != "attention_requested" %>

<%= _('Offensive? Unsuitable?') %>

      <% if @info_request.attention_requested %>
        <% if @info_request.prominence == 'hidden' %>
          <%# The eccentric formatting of the following string is in order that it be identical
              to the corresponding string in request/show.rhtml %>

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

        <% elsif @info_request.prominence == 'requester_only' %>
          <%# The eccentric formatting of the following string is in order that it be identical
              to the corresponding string in request/show.rhtml %>

<%= _('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] %>

        <% else %>

<%= _('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please contact us.') % [help_requesting_path] %>

        <% end %>
     <% else %>

<%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %>

<%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %>

       <%= link_to _("Report this request"), report_path, :class => "link_button_green", :method => "POST" %>
      <% end %>
    <% end %>

<%= _("Act on what you've learnt") %>

     <% tweet_link = "https://twitter.com/share?url=#{h(request.url)}&via=#{h(MySociety::Config.get('TWITTER_USERNAME', ''))}&text='#{h(@info_request.title)}'&related=#{_('alaveteli_foi:The software that runs {{site_name}}', :site_name => h(site_name))}" %>
        <%= link_to '', tweet_link %>
        <%= link_to _("Tweet this request"), tweet_link %>

        <%= link_to '', "http://wordpress.com/"%>
        <%= link_to _("Start your own blog"), "http://wordpress.com/"%>

    <%= render :partial => 'request/next_actions' %>

    <% view_cache :ttl => 1.day.to_i, :tag => ['similar', @info_request.id, I18n.locale] do %>
     <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>

<%= _('Similar requests')%>

        <% for result in @xapian_similar.results %>
            <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>
        <% if @xapian_similar_more %>

<%= link_to _("More similar requests"), request_similar_url(@info_request) %>

        <% end %>

     <% end %>
    <% end %>

<%= link_to _('Event history details'), request_details_url(@info_request) %>

<%= _('Are you the owner of
            any commercial copyright on this page?') % [help_officers_path+"#copyright"] %>

<%= _('Follow this request') %>

    <% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %>

<%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %>

     <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>

    <% if @info_request.described_state != "attention_requested" %>

<%= _('Offensive? Unsuitable?') %>

      <% if @info_request.attention_requested %>
        <% if @info_request.prominence == 'hidden' %>
          <%# The eccentric formatting of the following string is in order that it be identical
              to the corresponding string in request/show.rhtml %>

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

        <% elsif @info_request.prominence == 'requester_only' %>
          <%# The eccentric formatting of the following string is in order that it be identical
              to the corresponding string in request/show.rhtml %>

<%= _('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] %>

        <% else %>

<%= _('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please contact us.') % [help_requesting_path] %>

        <% end %>
     <% else %>

<%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %>

<%= ('If you believe this request is not suitable, you can report it for attention by the site administrators') %>

       <%= link_to _("Report this request"), report_path, :class => "link_button_green", :method => "POST" %>
      <% end %>
    <% end %>

<%= _("Act on what you've learnt") %>

     <% tweet_link = "https://twitter.com/share?url=#{h(request.url)}&via=#{h(MySociety::Config.get('TWITTER_USERNAME', ''))}&text='#{h(@info_request.title)}'&related=#{_('alaveteli_foi:The software that runs {{site_name}}', :site_name => h(site_name))}" %>
        <%= link_to '', tweet_link %>
        <%= link_to _("Tweet this request"), tweet_link %>

        <%= link_to '', "http://wordpress.com/"%>
        <%= link_to _("Start your own blog"), "http://wordpress.com/"%>

    <%= render :partial => 'request/next_actions' %>

    <% view_cache :ttl => 1.day.to_i, :tag => ['similar', @info_request.id, I18n.locale] do %>
     <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>

<%= _('Similar requests')%>

        <% for result in @xapian_similar.results %>
            <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>
        <% if @xapian_similar_more %>

<%= link_to _("More similar requests"), request_similar_url(@info_request) %>

        <% end %>

     <% end %>
    <% end %>

<%= link_to _('Event history details'), request_details_url(@info_request) %>

<%= _('Are you the owner of
            any commercial copyright on this page?') % [help_officers_path+"#copyright"] %>


Remove spurious spaces from top of email.

<%  if @highlight_words.nil?
      @highlight_words = []
    end

    # Construct the main text of the mail
    main_text = ''
    for track_thing, alert_results in @email_about_things
        main_text += track_thing.params[:title_in_email] + "\n"
        main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
        for result in alert_results.reverse
            if result[:model].class.to_s == "InfoRequestEvent"
                event = result[:model]

                if not event.outgoing_message.nil?
                    extract = highlight_and_excerpt(event.outgoing_message.body_without_salutation, @highlight_words, 150, false)
                elsif not event.incoming_message.nil?
                    extract = highlight_and_excerpt(event.incoming_message.get_body_for_quoting, @highlight_words, 150, false)
                else
                    extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
                end
                extract.gsub!(/\s+/, ' ')

                if event.event_type == 'response'
                    url = main_url(incoming_message_url(event.incoming_message))
                    main_text += event.info_request.public_body.name + " sent a response to " + event.info_request.user.name
                elsif event.event_type == 'followup_sent'
                    url = main_url(outgoing_message_url(event.outgoing_message))
                    main_text += event.info_request.user.name + " sent a follow up message to " + event.info_request.public_body.name
                elsif event.event_type == 'sent'
                    # this is unlikely to happen in real life, but happens in the test code
                    url = main_url(request_url(event.info_request))+"#outgoing-"+event.outgoing_message.id.to_s
                    main_text += event.info_request.user.name + " sent a request to " + event.info_request.public_body.name
                else
                    raise "unknown type in event_digest " + event.event_type
                end
                main_text += " (" + simple_date(event.created_at) + ")\n"
                main_text += MySociety::Format.wrap_email_body('"' + extract + '"').gsub(/\n+$/, "") + "\n"
                main_text += url + "\n"

                main_text += "\n"
            else
                raise "need to add other types to TrackMailer.event_digest"
            end
        end
        main_text += "\n"
    end

    #STDERR.puts main_text
    #STDERR.puts @unsubscribe_url
%><%=main_text%>Alter your subscription
=======================

Please click on the link below to cancel or alter these emails.
<%=@unsubscribe_url%>

-- the WhatDoTheyKnow team

<% if @highlight_words.nil?
      @highlight_words = []
end %>

<%
        # Construct the main text of the mail
        main_text = ''
        for track_thing, alert_results in @email_about_things
            main_text += track_thing.params[:title_in_email] + "\n"
            main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
            for result in alert_results.reverse
                if result[:model].class.to_s == "InfoRequestEvent"
                    event = result[:model]

                    if not event.outgoing_message.nil?
                        extract = highlight_and_excerpt(event.outgoing_message.body_without_salutation, @highlight_words, 150, false)
                    elsif not event.incoming_message.nil?
                        extract = highlight_and_excerpt(event.incoming_message.get_body_for_quoting, @highlight_words, 150, false)
                    else
                        extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
                    end
                    extract.gsub!(/\s+/, ' ')

                    if event.event_type == 'response'
                        url = main_url(incoming_message_url(event.incoming_message))
                        main_text += event.info_request.public_body.name + " sent a response to " + event.info_request.user.name
                    elsif event.event_type == 'followup_sent'
                        url = main_url(outgoing_message_url(event.outgoing_message))
                        main_text += event.info_request.user.name + " sent a follow up message to " + event.info_request.public_body.name
                    elsif event.event_type == 'sent'
                        # this is unlikely to happen in real life, but happens in the test code
                        url = main_url(request_url(event.info_request))+"#outgoing-"+event.outgoing_message.id.to_s
                        main_text += event.info_request.user.name + " sent a request to " + event.info_request.public_body.name
                    else
                        raise "unknown type in event_digest " + event.event_type
                    end
                    main_text += " (" + simple_date(event.created_at) + ")\n"
                    main_text += MySociety::Format.wrap_email_body('"' + extract + '"').gsub(/\n+$/, "") + "\n"
                    main_text += url + "\n"

                    main_text += "\n"
                else
                    raise "need to add other types to TrackMailer.event_digest"
                end
            end
            main_text += "\n"
        end

        #STDERR.puts main_text
        #STDERR.puts @unsubscribe_url
%><%=main_text%>Alter your subscription
=======================

Please click on the link below to cancel or alter these emails.
<%=@unsubscribe_url%>

-- the WhatDoTheyKnow team


Add inner div for logos.

Add inner div for logos.

    <%= image_tag('/ipvtheme/images/OSF.jpg') %>
    <%= image_tag('/ipvtheme/images/otevrete.jpg') %>
    <%= image_tag('/ipvtheme/images/FOM.jpg') %>

    <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_url %>
|  <a href="https://twitter.com/<%= Configuration::twitter_username %>"><%= _("Follow us on twitter") %>
<%= render :partial => 'general/credits' %>


Include alt text for logo

Include alt text for logo

<%= link_to "#{image_tag('navimg/logo-trans.png', :alt => 'WhatDoTheyKnow?')} Make and explore Freedom of Information requests", frontpage_url, :id=>'logo' %>

      another really handy site by mysociety.org

<%= link_to "#{image_tag('navimg/logo-trans.png')} Make and explore Freedom of Information requests", frontpage_url, :id=>'logo' %>

      another really handy site by mysociety.org


typo

typo

git-svn-id: e099d366fb13ea49c9e8e170ced890dab3ea84f7@295 aaa19a3b-e121-0410-9d45-962fd44e537e

<%= if @edit
  form_remote_tag(:with=>"add_comment_form", :url=>{:controller=>'comment', :action=>"update", :rnd=>rnd})
else
  form_remote_tag(:with=>"add_comment_form", :url=>{:controller=>'comment', :action=>"create", :rnd=>rnd})
end %>
<% if @edit -%>

<%= link_to_remote(transb('btn_x'), :with=>'main', :url=>{:controller=>'discussion', :action=>'show', :id=>@comment[:discussion_id]} ) %>

<% elsif @comment && @comment.reply_to -%>

<%= link_to_function transb('btn_x'), "new Element.remove('add_comment_form#{@comment.reply_to}');" %>

<% else -%>

<%= link_to_function transb('btn_x'), "new Element.toggle('add_comment', 'add_comment_form');" %>

<% end  -%>

  <%= trans("author")  %> <%= session[:user] ? visitor.fullname : text_field('comment', 'author_name', :size=>25) %>
  <%= trans("title")  %> <%= text_field('comment', 'title', :size=>25) %>

  <div id='comment_errors<%= @comment && @comment.reply_to ? @comment.reply_to : '' %>' class='errors'>

<%= text_area('comment', 'text', :cols=>nil, :rows=>12 ) %>

  <%= hidden_field('comment', 'id') %>
  <%= hidden_field('node', 'id') %>
  <%= hidden_field('comment', 'reply_to') %>

<input type='submit' value='<%= transb('validate') %>'/>

<%= end_form_tag %>
<%= '
' if @edit %>

<%= if @edit
  form_remote_tag(:with=>"add_comment_form", :url=>{:controller=>'comment', :action=>"update", :rnd=>rnd})
else
  form_remote_tag(:with=>"add_comment_form", :url=>{:controller=>'comment', :action=>"create", :rnd=>rnd})
end %>
<% if @edit -%>

<%= link_to_remote(transb('btn_x'), :with=>'main', :url=>{:controller=>'discussion', :action=>'show', :id=>@comment[:discussion_id]} ) %>

<% elsif @comment && @comment.reply_to -%>

<%= link_to_function transb('btn_x'), "new Element.remove('add_comment_form#{@comment.reply_to}');" %>

<% else -%>

<%= link_to_function transb('btn_x'), "new Element.toggle('add_comment', 'add_comment_form');" %>

<% end  -%>

  <%= trans("author")  %> <%= session[:user] ? visitor[:fullname] : text_field('comment', 'author_name', :size=>25) %>
  <%= trans("title")  %> <%= text_field('comment', 'title', :size=>25) %>

  <div id='comment_errors<%= @comment && @comment.reply_to ? @comment.reply_to : '' %>' class='errors'>

<%= text_area('comment', 'text', :cols=>nil, :rows=>12 ) %>

  <%= hidden_field('comment', 'id') %>
  <%= hidden_field('node', 'id') %>
  <%= hidden_field('comment', 'reply_to') %>

<input type='submit' value='<%= transb('validate') %>'/>

<%= end_form_tag %>
<%= '
' if @edit %>


no hardcoded roles in wild theme

no hardcoded roles in wild theme

git-svn-id: d95c7f39bc46a13f717da3baac7edcc188a27d76@1488 9df96bbd-a318-0410-8f51-977bef1cc4bb

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title>WILD - CMS SAFARI</title>
			<%= render :partial => '/layouts/head' %>
      <%= theme_stylesheet_link_tag 'wild' %>
   </head>
   <body>
      <%= yield %>
   </body>
</html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title>WILD - CMS SAFARI</title>
			<%= render :partial => '/layouts/head' %>
      <%= theme_stylesheet_link_tag 'wild' %>
   </head>
   <body class="<%= user_roles_classes -%>">
      <%= yield %>
   </body>
</html>


Fixed file name in index.rhtml

Fixed file name in index.rhtml

<% open('ngrok.log') do |f| %>
  <% f.lines.select { |line| line.include?("[INFO] [client]") }.each do |line| %>
    <%= line %>
    <br />
  <% end %>
<% end %>

<% open('out.txt') do |f| %>
  <% f.lines.select { |line| line.include?("[INFO] [client]") }.each do |line| %>
    <%= line %>
    <br />
  <% end %>
<% end %>


Minor formatting.

Minor formatting.

<%= error_messages_for 'public_body' %>

List of tags

    <% first_row = true %>
    <% for row in PublicBody.categories_with_headings %>
        <% if row.instance_of?(Array) %>
            <% if row[0] != 'other' %>
                <%= row[0] %>=<%= row[1] %>

            <% end %>
        <% elsif row != 'Miscellaneous' %>
            <% if not first_row %>
            <% else %>
                <% first_row = false %>
            <% end %>

<%=h row%>

        <% end %>
    <% end %>

Name

<%= text_field 'public_body', 'name', :size => 60  %>

Short name (only put in abbreviations which are really used, otherwise leave blank. Short or long name is used in the URL - don't worry about breaking URLs through renaming, as the history is used to redirect)

<%= text_field 'public_body', 'short_name', :size => 60  %>

Request email (set to blank (empty string) if can't find an address; to not_apply if FOI no longer / never did apply to authority; these emails are public as anyone can view with a CAPTCHA)

<%= text_field 'public_body', 'request_email', :size => 40  %>

Home page (of whole authority, not just their FOI page; set to blank (empty string) to guess it from the email)

<%= text_field 'public_body', 'home_page', :size => 60  %>

Public notes (for users to consider when making FOI requests to the authority)

<%= text_area 'public_body', 'notes', :rows => 3, :cols => 60  %>

Tags (space separated; see list of tags on the right)

<%= text_field 'public_body', 'tag_string', :size => 60  %>

Comment for this edit (put URL or other source of new info)

<%= text_area 'public_body', 'last_edit_comment', :rows => 3, :cols => 60  %>