Added spaces in captions

Added spaces in captions

git-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@918 2d86388d-c40f-0410-ad6a-a69da6a65d20

<% @page_title = "Results: #{@racer.name}: #{@competition.name}" %>

<%# TODO Use helper/partial? %>

<%= link_to(@racer.name, :action => 'racer', :id => @racer.to_param) %>

<%- for result in @results -%>

	  <%= result.place.to_i.ordinalize %> —
      <%= link_to(@competition.name + ' ', :action => 'event', :id => @competition.to_param) %>
      <%= link_to(result.race.standings.name + ' ', :action => 'event', :id => @competition.to_param) unless @competition.name == result.race.standings.name %>
      <%= link_to(result.race.name + ' ', :action => 'event', :id => @competition.to_param) unless result.race.name == result.race.standings.name %>

		Race
		Category
		Team
		Date
		Points

	<% for score in result.scores %>
	<tr class="<%= cycle("even", "odd") %>">
		<%= score.source_result.place %>

			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'event', :id => score.source_result.race.standings.event.id, :anchor => score.source_result.race.id) unless score.source_result.race.standings.event.is_a?(Competition) %>
			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'competition', :competition_id => score.source_result.race.standings.event.id, :racer_id => @racer.id) if score.source_result.race.standings.event.is_a?(Competition)%>

		<%= score.source_result.race.name %>
		<%= score.source_result.team_name %>
		<%= score.source_result.event.date.strftime("%D") %>
		<%= number_with_precision(score.points, 1) %>

	<% end %>

		TOTAL<%= number_with_precision(result.points, 1) %>

<%- end -%>

<%# TODO Add year param %>

	See all results for <%= link_to(@racer.name, {:action => 'racer', :id => @racer.to_param}, :class => 'obvious') %> or the
	<% if @competition.is_a?(Ironman) %>
  	<%= link_to(@competition.name, {:controller => 'ironman', :action => 'index', :year => @competition.date.year}, :class => 'obvious') %>.
	<% else %>
	  <%= link_to(@competition.name, {:action => 'event', :id => @competition.to_param}, :class => 'obvious') %>.
	<% end %>

<% @page_title = "Results: #{@racer.name}: #{@competition.name}" %>

<%# TODO Use helper/partial? %>

<%= link_to(@racer.name, :action => 'racer', :id => @racer.to_param) %>

<%- for result in @results -%>

	  <%= result.place.to_i.ordinalize %> —
      <%= link_to(@competition.name, :action => 'event', :id => @competition.to_param) %>
      <%= link_to(result.race.standings.name, :action => 'event', :id => @competition.to_param) unless @competition.name == result.race.standings.name %>
      <%= link_to(result.race.name, :action => 'event', :id => @competition.to_param) unless result.race.name == result.race.standings.name %>

		Race
		Category
		Team
		Date
		Points

	<% for score in result.scores %>
	<tr class="<%= cycle("even", "odd") %>">
		<%= score.source_result.place %>

			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'event', :id => score.source_result.race.standings.event.id, :anchor => score.source_result.race.id) unless score.source_result.race.standings.event.is_a?(Competition) %>
			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'competition', :competition_id => score.source_result.race.standings.event.id, :racer_id => @racer.id) if score.source_result.race.standings.event.is_a?(Competition)%>

		<%= score.source_result.race.name %>
		<%= score.source_result.team_name %>
		<%= score.source_result.event.date.strftime("%D") %>
		<%= number_with_precision(score.points, 1) %>

	<% end %>

		TOTAL<%= number_with_precision(result.points, 1) %>

<%- end -%>

<%# TODO Add year param %>

	See all results for <%= link_to(@racer.name, {:action => 'racer', :id => @racer.to_param}, :class => 'obvious') %> or the
	<% if @competition.is_a?(Ironman) %>
  	<%= link_to(@competition.name, {:controller => 'ironman', :action => 'index', :year => @competition.date.year}, :class => 'obvious') %>.
	<% else %>
	  <%= link_to(@competition.name, {:action => 'event', :id => @competition.to_param}, :class => 'obvious') %>.
	<% end %>


I18n title in public body page

I18n title in public body page

<% @title = h(@public_body.name) + _(" - view and make Freedom of Information requests") %>

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

    <% follower_count = TrackThing.count(:all, :conditions => ["public_body_id = ?", @public_body.id]) %>

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

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

<%= _('More about this authority')%>

      <% if !@public_body.calculated_home_page.nil? %>
          <%= link_to _('Home page of authority'), @public_body.calculated_home_page %>

      <% end %>
      <% if !@public_body.publication_scheme.empty? %>
          <%= link_to _('Publication scheme'), @public_body.publication_scheme %>

      <% end %>
      <% if @public_body.has_tag?("charity") %>
          <% for tag_value in @public_body.get_tag_values("charity") %>
              <% if tag_value.match(/^SC/) %>
                  <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %>

              <% else %>
                  <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + tag_value %>

              <% end %>
          <% end %>
      <% end %>
      <%= link_to _('View FOI email address'), view_public_body_email_url(@public_body.url_name) %>

<%= _("Freedom of information requests to") %>

<%=h(@public_body.name)%>

    <%=@public_body.type_of_authority(true)%><% if not @public_body.short_name.empty? %>,
    <%= _('also called {{public_body_short_name}}', :public_body_short_name =>  h(@public_body.short_name))%><% end %>
    <% if !@user.nil? && @user.admin_page_links? %>
    (<%= link_to _("admin"), public_body_admin_url(@public_body) %>)
    <% end %>

    <% if @public_body.has_notes? && (@public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact') %>

<%= @public_body.notes_as_html %>

    <% end %>

    <% if @public_body.eir_only? %>

<%= _('You can only request information about the environment from this authority.')%>

    <% end %>

        <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %>
            <% if @public_body.eir_only? %>
    	        <%= _('Make a new Environmental Information request')%>
            <% else %>
    	        <%= _('Make a new Freedom of Information request to {{public_body}}', :public_body => h(@public_body.name))%>
            <% end %>
             <%= _('{{text}}', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%>
        <% elsif @public_body.has_notes? %>
            <%= @public_body.notes_as_html %>
        <% elsif @public_body.not_requestable_reason == 'not_apply' %>
            <%= _('Freedom of Information law does not apply to this authority, so you cannot make
            a request to it.')%>
        <% elsif @public_body.not_requestable_reason == 'defunct' %>
            <%= _('This authority no longer exists, so you cannot make a request to it.')%>
        <% else %>
            <%= _('For an unknown reason, it is not possible to make a request to this authority.')%>
        <% end %>

   <% if @public_body.info_requests.size == 0 %>
        <% if @public_body.eir_only? %>

<%= _('Environmental Information Regulations requests made using this site') %>

Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.

        <% else %>

<%= _('Freedom of Information requests made using this site')%>

<%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%>

        <% end %>
    <% else %>

        <% if @public_body.eir_only? %>
            <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %>
        <% else %>
	   <% if  @public_body.info_requests.size > 4 %>
		<%= n_('Search within the %d Freedom of Information requests to %s', 'Search within the %d Freedom of Information requests made to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
           <% else %>
	      <%= n_('%d Freedom of Information request to %s', '%d Freedom of Information requests to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
	   <% end %>
        <% end %>
        <%= @page_desc %>

        <% if  @public_body.info_requests.size > 4 %>
         <%= render :partial => 'request/request_filter_form' %>
	<% end %>
    <% end %>

    <% if !@xapian_requests.nil? %>

            <% 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, @per_page, @public_body.info_requests.size) %>

    	<% if @xapian_requests.results.empty? %>

<% _('There were no requests matching your query.') %>

    	<% else %>

 <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>

    	<% end %>

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

<%= _('Environmental Information Regulations requests made') %>

        <% else %>

 <%= _('Freedom of Information requests made')%>

        <% end %>

 <%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests that have been made to this authority.')%>

    <% end %>

<% @title = h(@public_body.name) + " - view and make Freedom of Information requests" %>

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

    <% follower_count = TrackThing.count(:all, :conditions => ["public_body_id = ?", @public_body.id]) %>

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

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

<%= _('More about this authority')%>

      <% if !@public_body.calculated_home_page.nil? %>
          <%= link_to _('Home page of authority'), @public_body.calculated_home_page %>

      <% end %>
      <% if !@public_body.publication_scheme.empty? %>
          <%= link_to _('Publication scheme'), @public_body.publication_scheme %>

      <% end %>
      <% if @public_body.has_tag?("charity") %>
          <% for tag_value in @public_body.get_tag_values("charity") %>
              <% if tag_value.match(/^SC/) %>
                  <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %>

              <% else %>
                  <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + tag_value %>

              <% end %>
          <% end %>
      <% end %>
      <%= link_to _('View FOI email address'), view_public_body_email_url(@public_body.url_name) %>

<%= _("Freedom of information requests to") %>

<%=h(@public_body.name)%>

    <%=@public_body.type_of_authority(true)%><% if not @public_body.short_name.empty? %>,
    <%= _('also called {{public_body_short_name}}', :public_body_short_name =>  h(@public_body.short_name))%><% end %>
    <% if !@user.nil? && @user.admin_page_links? %>
    (<%= link_to _("admin"), public_body_admin_url(@public_body) %>)
    <% end %>

    <% if @public_body.has_notes? && (@public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact') %>

<%= @public_body.notes_as_html %>

    <% end %>

    <% if @public_body.eir_only? %>

<%= _('You can only request information about the environment from this authority.')%>

    <% end %>

        <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %>
            <% if @public_body.eir_only? %>
    	        <%= _('Make a new Environmental Information request')%>
            <% else %>
    	        <%= _('Make a new Freedom of Information request to {{public_body}}', :public_body => h(@public_body.name))%>
            <% end %>
             <%= _('{{text}}', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%>
        <% elsif @public_body.has_notes? %>
            <%= @public_body.notes_as_html %>
        <% elsif @public_body.not_requestable_reason == 'not_apply' %>
            <%= _('Freedom of Information law does not apply to this authority, so you cannot make
            a request to it.')%>
        <% elsif @public_body.not_requestable_reason == 'defunct' %>
            <%= _('This authority no longer exists, so you cannot make a request to it.')%>
        <% else %>
            <%= _('For an unknown reason, it is not possible to make a request to this authority.')%>
        <% end %>

   <% if @public_body.info_requests.size == 0 %>
        <% if @public_body.eir_only? %>

<%= _('Environmental Information Regulations requests made using this site') %>

Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.

        <% else %>

<%= _('Freedom of Information requests made using this site')%>

<%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%>

        <% end %>
    <% else %>

        <% if @public_body.eir_only? %>
            <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %>
        <% else %>
	   <% if  @public_body.info_requests.size > 4 %>
		<%= n_('Search within the %d Freedom of Information requests to %s', 'Search within the %d Freedom of Information requests made to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
           <% else %>
	      <%= n_('%d Freedom of Information request to %s', '%d Freedom of Information requests to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
	   <% end %>
        <% end %>
        <%= @page_desc %>

        <% if  @public_body.info_requests.size > 4 %>
         <%= render :partial => 'request/request_filter_form' %>
	<% end %>
    <% end %>

    <% if !@xapian_requests.nil? %>

            <% 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, @per_page, @public_body.info_requests.size) %>

    	<% if @xapian_requests.results.empty? %>

<% _('There were no requests matching your query.') %>

    	<% else %>

 <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>

    	<% end %>

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

<%= _('Environmental Information Regulations requests made') %>

        <% else %>

 <%= _('Freedom of Information requests made')%>

        <% end %>

 <%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests that have been made to this authority.')%>

    <% end %>


Link to contact form, rather than email.

<%= @outgoing_message.body.strip %>

-------------------------------------------------------------------
Disclaimer: This message and any reply that you make will be
published on the internet. Our privacy and copyright policies:
http://www.whatdotheyknow.com/help/about#officers

Is <%= @info_request.public_body.request_email%> the wrong address
for <%= @info_request.law_used_full %> requests to <%= @info_request.public_body.name%>?
If so please contact us using this form:
http://www.whatdotheyknow.com/help/contact
-------------------------------------------------------------------

<%= @outgoing_message.body.strip %>

-------------------------------------------------------------------
Disclaimer: This message and any reply that you make will be
published on the internet. Our privacy and copyright policies:
http://www.whatdotheyknow.com/help/about#officers

Is <%= @info_request.public_body.request_email%> the wrong address
for <%= @info_request.law_used_full %> requests to <%= @info_request.public_body.name%>?
If so please let us know by emailing <%=@contact_email%> - we'll make
sure future ones go to the right place.
-------------------------------------------------------------------


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


Don't show friendly name if it is an email

<% if (correspondence.class.to_s == 'OutgoingMessage')
    outgoing_message = correspondence %>
    <%= render :partial => 'bubble', :locals => { :body => outgoing_message.get_body_for_display() }  %>

        <%= user_link(@info_request.user) %>

        <% if outgoing_message.message_type == 'initial_request' %>
            sent the initial request
            <% if outgoing_message.status == 'sent' %>
                to <%= public_body_link(@info_request.public_body) %>
                on <%= simple_date(outgoing_message.sent_at) %>
            <% elsif outgoing_message.status == 'ready' %>
                it has not yet been sent
            <% else raise "unknown outgoing_message.status" %>
            <% end %>
        <% else raise "unknown outgoing_message.message_type" %>
        <% end %>

<% elsif (correspondence.class.to_s == 'IncomingMessage')
    incoming_message = correspondence%>
    <%= render :partial => 'bubble', :locals => { :body => incoming_message.get_body_for_display(@collapse_quotes) }  %>

    <% if incoming_message.mail.from and (not incoming_message.mail.friendly_from.include?('@')) %>
        <%= incoming_message.mail.friendly_from %>
    <% end %>
    <%= public_body_link(@info_request.public_body) %>
    <% if incoming_message.contains_information %>
        sent some useful information
    <% else %>
        replied
    <% end %>
    on <%= simple_date(incoming_message.sent_at)
    %>
    <% if not incoming_message.user_classified %>
        — please <%= link_to "classify this response", classify_request_url(:incoming_message_id => incoming_message.id) %>
    <% end %>

<% else %>
    <% raise "Unknown correspondence type " + correspondence.class.to_s %>
<% end %>

<% if (correspondence.class.to_s == 'OutgoingMessage')
    outgoing_message = correspondence %>
    <%= render :partial => 'bubble', :locals => { :body => outgoing_message.get_body_for_display() }  %>

        <%= user_link(@info_request.user) %>

        <% if outgoing_message.message_type == 'initial_request' %>
            sent the initial request
            <% if outgoing_message.status == 'sent' %>
                to <%= public_body_link(@info_request.public_body) %>
                on <%= simple_date(outgoing_message.sent_at) %>
            <% elsif outgoing_message.status == 'ready' %>
                it has not yet been sent
            <% else raise "unknown outgoing_message.status" %>
            <% end %>
        <% else raise "unknown outgoing_message.message_type" %>
        <% end %>

<% elsif (correspondence.class.to_s == 'IncomingMessage')
    incoming_message = correspondence%>
    <%= render :partial => 'bubble', :locals => { :body => incoming_message.get_body_for_display(@collapse_quotes) }  %>

    <% if incoming_message.mail.from %>
        <%= incoming_message.mail.friendly_from %> of
    <% end %>
    <%= public_body_link(@info_request.public_body) %>
    <% if incoming_message.contains_information %>
        sent some useful information
    <% else %>
        replied
    <% end %>
    on <%= simple_date(incoming_message.sent_at)
    %>
    <% if not incoming_message.user_classified %>
        — please <%= link_to "classify this response", classify_request_url(:incoming_message_id => incoming_message.id) %>
    <% end %>

<% else %>
    <% raise "Unknown correspondence type " + correspondence.class.to_s %>
<% end %>


changing review, author feedback, meta review and teammate review scores to refer to the scores table.

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

<% i = 0;
        for @question in @questions %>
          <%=@question.txt%>

          <% @rs = Score.find(:first,:conditions => ["instance_id = ? AND question_id = ? AND questionnaire_type_id =?", @review.id, @question.id, QuestionnaireType.find_by_name("Review").id])%>
          <input id=new_review_score_<%=i%>_comments name=new_review_score[<%=i%>][comments] value = "<%=@rs.comments.gsub(/\"/,'"')%>"  size=70 type=text />
          <% if @question.true_false? %>
              <select id=new_score_<%=i%> name=new_score[<%=i%>]>
                 <option value="<%=@min%>" <%if @min==@rs.score%>selected="selected"<%end%> >false</option>
                 <option value="<%=@max%>" <%if @max==@rs.score%>selected="selected"<%end%> >true</option>
              </select>

          <% else %>
              <select id=new_score_<%=i%> name=new_score[<%=i%>]>
                  <% for j in @min..@max %>
                    <option value="<%=j%>" <%if j==@rs.score%>selected="selected"<%end%> ><%=j%></option>
                  <% end %>
              </select>

          <% end %>
          <input id=new_question_<%=i%> name=new_question[<%=i%>] value=<%=@question.id%> type=hidden />
    <% i += 1;
    end %>

Additional Comment:

	<textarea cols="70" rows="5" id=new_review_comments name=new_review[comments]><%=@review.additional_comment%></textarea>

<% i = 0;
        for @question in @questions %>
          <%=@question.txt%>

          <% @rs = ReviewScore.find(:first,:conditions => ["review_id = ? AND question_id = ? AND questionnaire_type_id =?", @review.id, @question.id, QuestionnaireType.find_by_name("Review Rubric").id])%>
          <input id=new_review_score_<%=i%>_comments name=new_review_score[<%=i%>][comments] value = "<%=@rs.comments.gsub(/\"/,'"')%>"  size=70 type=text />
          <% if @question.true_false? %>
              <select id=new_score_<%=i%> name=new_score[<%=i%>]>
                 <option value="<%=@min%>" <%if @min==@rs.score%>selected="selected"<%end%> >false</option>
                 <option value="<%=@max%>" <%if @max==@rs.score%>selected="selected"<%end%> >true</option>
              </select>

          <% else %>
              <select id=new_score_<%=i%> name=new_score[<%=i%>]>
                  <% for j in @min..@max %>
                    <option value="<%=j%>" <%if j==@rs.score%>selected="selected"<%end%> ><%=j%></option>
                  <% end %>
              </select>

          <% end %>
          <input id=new_question_<%=i%> name=new_question[<%=i%>] value=<%=@question.id%> type=hidden />
    <% i += 1;
    end %>

Additional Comment:

	<textarea cols="70" rows="5" id=new_review_comments name=new_review[comments]><%=@review.additional_comment%></textarea>


- Fixed view.

- Fixed view.

  <% if Aurita.user.may_edit_content?(media_asset) then %>

      <%= gui.link_to(media_asset, :action => :update_section) { gui.icon_tag(:edit_button) } %>

  <% end %>

<%= media_asset.title.to_s %>

  <% if media_asset.is_video? then %>
    <embed
      src="/aurita/mediaplayer.swf"
      width="420"
      height="350"
      allowscriptaccess="always"
      allowfullscreen="true"
      flashvars="width=420&height=350&file=/aurita/assets/asset_<%= media_asset.media_asset_id %>.<%= media_asset.mime_extension %>"
    />

  <% elsif media_asset.mime_extension == 'mp3' then %>

      <object type="application/x-shockwave-flash" data="/aurita/mp3player.swf" width="200" height="20">
        <param name="movie" value="/aurita/mp3player.mp3" />
        <param name="bgcolor" value="#ffffff" />
        <param name="FlashVars" value="mp3=<%= media_asset.url %>" />
      </object>

  <% else %>
    <a href="<%= media_asset.url %>" target="_blank"
       style="float: left; margin-right: 4px; margin-bottom: 10px; background-color: #ffffff; text-align: center;  "
       <%= gui.context_menu(:entity => media_asset) %>
    >

        <div class="lore_text_button" style="float: left" onclick="Aurita.call('Media_Asset/perform_bookmark/media_asset_id=<%= media_asset.media_asset_id %>'); Element.toggle(this); "><%= tl(:bookmark_file) %>

        <div class="lore_text_button" style="float: left" onclick="resizeable_popup(500,500,'<%= media_asset.url %>');">+

      <%= gui.media_asset_thumb(:asset => media_asset, :size => :medium) %>

  <% end %>

        <%= tl(:category) %>

        <%= media_asset.categories.map { |category| gui.link_to(category) { category.category_name } }.join(', ') %>

        <%= tl(:download) %>

        <a href="<%= media_asset.url %>" target="_blank"><%= "#{media_asset.title}.#{media_asset.extension.to_s}" %>

        <%= tl(:filetype) %>

        <%= media_asset.mime_extension.upcase %>

        <%= tl(:filesize) %>

        <%= media_asset.filesize %>

  <% if !media_asset.description.empty? then %>

     <%= tl(:description) %>

       <%= media_asset.description %>

  <% end %>

  <% if articles && articles.length > 0 then %>

        <%= tl(:used_in_articles) %>

          <% articles.each do |article| %>

<%= gui.link_to(article) %>

          <% end %>

  <% end %>

        <%= tl(:uploaded_at) %>

        <%= Aurita::Datetime.new(media_asset.created).string("%d.%m.%Y - %H:%M:%S") + ' ' << tl(:by) + ' ' << gui.link_to(owner_user_group) { owner_user_group.user_group_name } %>

        <%= tl(:last_changed_at) %>

        <%= Aurita::Datetime.new(media_asset.changed).string("%d.%m.%Y - %H:%M:%S") %>

        <%= tl(:source_folder) %>

        <%=
        asset_folder_path.map! { |f|
          f = gui.link_to(f) { f.physical_path }
        }
        asset_folder_path.join(' / ')
      %>

        <%= tl(:tags) %>

          <%= content_tags %>

<% if media_asset.version.to_i > 0 then %>

<%= tl(:versions) %>

    <%= media_asset_versions %>

<% end %>

  <%= download_stats.string if download_stats %>

 <%= content_comments.string %>

  <% if Aurita.user.may_edit_content?(media_asset) then %>

      <%= gui.link_to(media_asset, :action => :update_section) { gui.icon_tag(:edit_button) } %>

  <% end %>

<%= media_asset.title.to_s %>

  <% if media_asset.is_video? then %>
    <embed
      src="/aurita/mediaplayer.swf"
      width="420"
      height="350"
      allowscriptaccess="always"
      allowfullscreen="true"
      flashvars="width=420&height=350&file=/aurita/assets/asset_<%= media_asset.media_asset_id %>.<%= media_asset.mime_extension %>"
    />

  <% elsif media_asset.mime_extension == 'mp3' then %>

      <object type="application/x-shockwave-flash" data="/aurita/mp3player.swf" width="200" height="20">
        <param name="movie" value="/aurita/mp3player.mp3" />
        <param name="bgcolor" value="#ffffff" />
        <param name="FlashVars" value="mp3=<%= media_asset.url %>" />
      </object>

  <% else %>
    <a href="<%= media_asset.url %>" target="_blank"
       onclick="window.open('/aurita/assets/asset_<%= media_asset.media_asset_id %>.jpg');"
       style="float: left; margin-right: 4px; margin-bottom: 10px; background-color: #ffffff; text-align: center;  "
       <%= gui.context_menu(:entity => media_asset) %>
    >

        <div class="lore_text_button" style="float: left" onclick="Aurita.call('Media_Asset/perform_bookmark/media_asset_id=<%= media_asset.media_asset_id %>'); Element.toggle(this); "><%= tl(:bookmark_file) %>

        <div class="lore_text_button" style="float: left" onclick="resizeable_popup(500,500,'<%= media_asset.url %>');">+

      <%= gui.media_asset_thumb(:asset => media_asset, :size => :medium) %>

  <% end %>

        <%= tl(:category) %>

        <%= media_asset.categories.map { |category| gui.link_to(category) { category.category_name } }.join(', ') %>

        <%= tl(:download) %>

        <a href="<%= media_asset.url %>" target="_blank"><%= "#{media_asset.title}.#{media_asset.extension.to_s}" %>

        <%= tl(:filetype) %>

        <%= media_asset.mime_extension.upcase %>

        <%= tl(:filesize) %>

        <%= media_asset.filesize %>

  <% if !media_asset.description.empty? then %>

     <%= tl(:description) %>

       <%= media_asset.description %>

  <% end %>

  <% if articles && articles.length > 0 then %>

        <%= tl(:used_in_articles) %>

          <% articles.each do |article| %>

<%= gui.link_to(article) %>

          <% end %>

  <% end %>

        <%= tl(:uploaded_at) %>

        <%= Aurita::Datetime.new(media_asset.created).string("%d.%m.%Y - %H:%M:%S") + ' ' << tl(:by) + ' ' << gui.link_to(owner_user_group) { owner_user_group.user_group_name } %>

        <%= tl(:last_changed_at) %>

        <%= Aurita::Datetime.new(media_asset.changed).string("%d.%m.%Y - %H:%M:%S") %>

        <%= tl(:source_folder) %>

        <%=
        asset_folder_path.map! { |f|
          f = gui.link_to(f) { f.physical_path }
        }
        asset_folder_path.join(' / ')
      %>

        <%= tl(:tags) %>

          <%= content_tags %>

<% if media_asset.version.to_i > 0 then %>

<%= tl(:versions) %>

    <%= media_asset_versions %>

<% end %>

  <%= download_stats.string if download_stats %>

 <%= content_comments.string %>


Fixed the incorrect javascript link in the index page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

	<title>ThingFish</title>

	<link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />

	<% $stderr.sync = true %>
	<% if options.main_page && files.key?( options.main_page ) %>

		<%= files[ options.main_page ]['description'] %>

	<% else %>

<%= h options.title %>

		<% modsort.each do |classname| %>
		<% classdata = classes[classname] %>
		<li class="<%= classdata['classmod'].downcase %>"><a
			href="<%= classdata['full_name'].gsub( /::/, '/' ) + '.html' %>"><%= classdata['full_name'] %>
			— <%= classdata['description'] ?
				classdata['description'].gsub( %r{^
|
$}, '' ).strip :
				"(no description)" %>

		<% end %>

	<% end %>


Don't repeat the download-zip link

Don't repeat the download-zip link

<%= _('Things to do with this request') %>

        <%= _('Anyone:') %>

			<%= _('Add an annotation (to help the requester or others)') % [new_comment_url(:url_title => @info_request.url_title)] %>

        <% if @old_unclassified %>

                <%= link_to _('Update the status of this request'), '#describe_state_form_1' %>

        <% end %>

          <%= link_to _("Download a zip file of all correspondence"), download_entire_request_url(:url_title => @info_request.url_title) %>

		<%= _('{{info_request_user_name}} only:',:info_request_user_name=>h(@info_request.user.name)) %>

          <% if @last_response.nil? %>
              <%= link_to _("Send a followup"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %>
          <% else %>
              <%= link_to _("Write a reply"), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %>
          <% end %>

      <% if !@old_unclassified %>

          <%= link_to _("Update the status of this request"), request_url(@info_request, :update_status => 1) %>

      <% end %>

          <%= link_to _("Request an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>

		<%= _('{{public_body_name}} only:',:public_body_name=>h(@info_request.public_body.name) ) %>

          <%= link_to _("Respond to request"), upload_response_url(:url_title => @info_request.url_title) %>

<%= _('Things to do with this request') %>

        <%= _('Anyone:') %>

			<%= _('Add an annotation (to help the requester or others)') % [new_comment_url(:url_title => @info_request.url_title)] %>

        <% if @old_unclassified %>

                <%= link_to _('Update the status of this request'), '#describe_state_form_1' %>

        <% end %>

		<%= _('{{info_request_user_name}} only:',:info_request_user_name=>h(@info_request.user.name)) %>

          <% if @last_response.nil? %>
              <%= link_to _("Write a reply"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %>
          <% else %>
              <%= link_to _("Write a reply"), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %>
          <% end %>

      <% if !@old_unclassified %>

          <%= link_to _("Update the status of this request"), request_url(@info_request, :update_status => 1) %>

      <% end %>

          <%= link_to _("Request an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>

          <%= link_to _("Download a zip file of all correspondence"), download_entire_request_url(:url_title => @info_request.url_title) %>

		<%= _('{{public_body_name}} only:',:public_body_name=>h(@info_request.public_body.name) ) %>

          <%= link_to _("Respond to request"), upload_response_url(:url_title => @info_request.url_title) %>

          <%= link_to _("Download a zip file of all correspondence"), download_entire_request_url(:url_title => @info_request.url_title) %>


日めくりの曜日がおかしかったのを修正。

日めくりの曜日がおかしかったのを修正。

git-svn-id: d766b2a131eb5d649bacb6a45bc0bcd899bdfdb3@348 c938ebee-df10-0410-95fc-be8c4b0ebdd5

<% last_day = Time.days_in_month(@date.month, @date.year) %>
        <% wday = Date.new(@date.year, @date.month, 1).wday %>

        <% prev_month = @date << 1 %>

<%= link_to format_month(prev_month.month) + 'へ', :action => 'index', :year => prev_month.year, :month => prev_month.month, :day => Time.days_in_month(prev_month.month, prev_month.year) %>

        <% for day in 1..last_day %>
          <% if wday == 0 %>
            <% c = 'red' %>
          <% elsif wday == 6 %>
            <% c = 'blue' %>
          <% else %>
            <% c = '#444444' %>
          <% end %>
          <% bg = @date.day == day ? 'white' : '#eeeeee' %>

          <td style="padding: 1px; text-align:right;color: <%= c %>;background-color: <%= bg%>; font-size:small;">
            <%= link_to(day.to_s + format_wday(wday), {:action => 'index', :year => @date.year, :month => @date.month, :day => day}, :style => "color: #{c};background-color: #{bg}; font-size:small; text-decoration:none;")%>

          <% if @user.deal_exists?(Date.new(@date.year, @date.month, day)) %>
          *
          <% end %>

          <% wday += 1 %>
          <% wday = 0 if wday > 6%>
        <% end %>
        <% next_month = @date >> 1 %>

<%= link_to format_month(next_month.month) + 'へ', :action => 'index', :year => next_month.year, :month => next_month.month, :day => 1 %>

<% last_day = Time.days_in_month(@date.month, @date.year) %>
        <% wday = Date.new(@date.year, @date.month, @date.day).wday %>

        <% prev_month = @date << 1 %>

<%= link_to format_month(prev_month.month) + 'へ', :action => 'index', :year => prev_month.year, :month => prev_month.month, :day => Time.days_in_month(prev_month.month, prev_month.year) %>

        <% for day in 1..last_day %>
          <% if wday == 0 %>
            <% c = 'red' %>
          <% elsif wday == 6 %>
            <% c = 'blue' %>
          <% else %>
            <% c = '#444444' %>
          <% end %>
          <% bg = @date.day == day ? 'white' : '#eeeeee' %>

          <td style="padding: 1px; text-align:right;color: <%= c %>;background-color: <%= bg%>; font-size:small;">
            <%= link_to(day.to_s + format_wday(wday), {:action => 'index', :year => @date.year, :month => @date.month, :day => day}, :style => "color: #{c};background-color: #{bg}; font-size:small; text-decoration:none;")%>

          <% if @user.deal_exists?(Date.new(@date.year, @date.month, day)) %>
          *
          <% end %>

          <% wday += 1 %>
          <% wday = 0 if wday > 6%>
        <% end %>
        <% next_month = @date >> 1 %>

<%= link_to format_month(next_month.month) + 'へ', :action => 'index', :year => next_month.year, :month => next_month.month, :day => 1 %>


con add users ahora si

con add users ahora si

git-svn-id: 268669d3058f191005ae665964cd19b71efa10c4@13778 3f47a204-8049-4147-aab0-d444c64e7564

		<%if current_user.superuser==true && session[:current_tab]=="Manage"%>
			<%= link_to "Spaces", :controller=>'spaces', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Roles", :controller=>'roles', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Users", manage_users_path(:container_id => @space.id, :container_type => :spaces) %> |
			<%= link_to "Resources", :controller=>'machines', :action=>'manage_resources', :container_id => @space.id %>
		<%elsif current_user.superuser==true && session[:current_tab]=="Home"%>
			<%= link_to "Edit Space", edit_space_path(@space) %> |
			<%= link_to "Delete Space", space_path(@space), :confirm => 'This will delete all the Space. Are you sure?', :method => :delete %>
		<%elsif session[:current_tab]=="Events"%>
			<%= link_to "New Event", :controller=>'events', :action=>'new', :container_id => @space.id %> |
			<%= link_to "Show Calendar", :controller=>'events', :action=>'show_calendar', :container_id => @space.id %>
		<%elsif session[:current_tab]=="Groups"%>
			<%if @space.manage_groups_by?(current_user)%>
				<%= link_to 'Create Group', create_group_path(:space,@container.id)%>
			<%end%>
		<%elsif session[:current_tab]=="MyProfile"%>
			<%= link_to 'Edit Profile', edit_space_user_profile_path(@space.id, current_user.id)%> |
			<%= link_to 'Edit Account' , edit_space_user_path(@space.id, current_user.id)%>
		<%elsif session[:current_tab]=="People"%>
			    <%= link_to 'Add Users', add_user_path(@space.id) %>
		<%end%>

		<%if current_user.superuser==true && session[:current_tab]=="Manage"%>
			<%= link_to "Spaces", :controller=>'spaces', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Roles", :controller=>'roles', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Users", manage_users_path(:container_id => @space.id, :container_type => :spaces) %> |
			<%= link_to "Resources", :controller=>'machines', :action=>'manage_resources', :container_id => @space.id %>
		<%elsif current_user.superuser==true && session[:current_tab]=="Home"%>
			<%= link_to "Edit Space", edit_space_path(@space) %> |
			<%= link_to "Delete Space", space_path(@space), :confirm => 'This will delete all the Space. Are you sure?', :method => :delete %>
		<%elsif session[:current_tab]=="Events"%>
			<%= link_to "New Event", :controller=>'events', :action=>'new', :container_id => @space.id %> |
			<%= link_to "Show Calendar", :controller=>'events', :action=>'show_calendar', :container_id => @space.id %>
		<%elsif session[:current_tab]=="Groups"%>
			<%if @space.manage_groups_by?(current_user)%>
				<%= link_to 'Create Group', create_group_path(:space,@container.id)%>
			<%end%>
		<%elsif session[:current_tab]=="MyProfile"%>
			<%= link_to 'Edit Profile', edit_space_user_profile_path(@space.id, current_user.id)%> |
			<%= link_to 'Edit Account' , edit_space_user_path(@space.id, current_user.id)%>
		<%elsif session[:current_tab]=="People"%>
			<%= link_to "Add Users", manage_users_path(:container_id => @space.id, :container_type => :spaces) %>
		<%end%>


Minor word change

Minor word change

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

What is the status of this request now?

            <%= 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 / a rejection (e.g. if the new response was just an acknowledgement)

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

            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>">The authority does not have the information (perhaps they suggest making the request elsewhere)

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

            <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %>
            <label for="successful<%=id_suffix%>">I've received all the information (or equivalents) that I asked for

            <%= 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 that I asked for

            <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
            <label for="requires_admin<%=id_suffix%>">None of the above - e.g. add a new option here

Filling this in each time you get a new response helps us track the progress of your request.

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

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

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

What is the status of this request now?

            <%= 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 / a rejection (e.g. if the new response was just an acknowledgement)

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

            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>">The authority does not have the information (perhaps they suggest making the request elsewhere)

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

            <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %>
            <label for="successful<%=id_suffix%>">I've received all the information (or equivalents) that I asked for

            <%= 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 that I asked for

            <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
            <label for="requires_admin<%=id_suffix%>">None of the above - e.g. add a new option here

Filling this in each time you get a new response helps us track the progress of your request.

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

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