updating demo header for 1.1.0 release

updating demo header for 1.1.0 release

git-svn-id: b6390d97d9ded5bc793696aad9e4256efc0f90b3@722 561dde7e-7729-0410-be8e-ef83869d6c7d

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">

  <title>ActiveScaffold :: Demo</title>
  <%= javascript_include_tag :defaults, "code_highlighter/code_highlighter", "code_highlighter/ruby" %>
  <%= active_scaffold_includes %>
  <%= stylesheet_link_tag "reset", "main", :media => 'all' %>

ActiveScaffold

A Ruby on Rails plugin from the makers of AjaxScaffold

Home

Documentation

Team

Help

Contribute

Blog

Demo

        Latest release is 1.1.0:

          download |
          svn

      <%= render :partial => "layouts/jump" %>

        Download the demo from SVN

      <%= render :partial => "layouts/menu" if @menu %>

    <%= yield %>

Source

      <%= render :partial => "demo/source" %>

  <% unless request.host.scan('activescaffold.com').empty? -%>

  <% end -%>

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">

  <title>ActiveScaffold :: Demo</title>
  <%= javascript_include_tag :defaults, "code_highlighter/code_highlighter", "code_highlighter/ruby" %>
  <%= active_scaffold_includes %>
  <%= stylesheet_link_tag "reset", "main", :media => 'all' %>

ActiveScaffold

A Ruby on Rails plugin from the makers of AjaxScaffold

Home

Documentation

Team

Help

Contribute

Blog

Demo

        Latest release is 1.0.1:

          download |
          svn

      <%= render :partial => "layouts/jump" %>

        Download the demo from SVN

      <%= render :partial => "layouts/menu" if @menu %>

    <%= yield %>

Source

      <%= render :partial => "demo/source" %>

  <% unless request.host.scan('activescaffold.com').empty? -%>

  <% end -%>


setting topics to be default search if no params

git-svn-id: 295275ead0c997ff8920a9abe88dec0903829be9@476 9c008b19-a030-0410-9975-d76d301b4276

<% form_tag search_path, :method => 'get' do %>
  <div id="search" class="box" <%= 'style="display:none;"' unless current_controller == 'search' %>>
    Search

      <select id="type" name="type">
        <option<%= ' selected="selected"' if params[:type] == 'avatars' || current_controller == 'avatars' %> value='avatars'>Avatars</option>
        <option<%= ' selected="selected"' if params[:type] == 'events' || current_controller == 'events' %> value='events'>Events</option>
        <option<%= ' selected="selected"' if params[:type] == 'files' || current_controller == 'uploads' %> value='files'>Files</option>
        <option<%= ' selected="selected"' if params[:type] == 'headers' || current_controller == 'headers' %> value='headers'>Headers</option>
        <option<%= ' selected="selected"' if params[:type] == 'posts' || current_controller == 'posts' %> value='posts'>Posts</option>
        <option<%= ' selected="selected"' if params[:type] == 'topics' || params[:type].blank? || %w(home categories topics forums).include?(current_controller) %> value='topics'>Topics</option>
        <option<%= ' selected="selected"' if params[:type] == 'users' || current_controller == 'users' %> value='users'>Users</option>
      </select>
      <%= text_field_tag :query, params[:query], :id => :query, :style => "width:31%" %>

      <%= submit_tag "Search", :disable_with => "Search" %>
      <%= link_to_function 'Cancel', "$('search').toggle()" %>

<% end %>

<% form_tag search_path, :method => 'get' do %>
  <div id="search" class="box" <%= 'style="display:none;"' unless current_controller == 'search' %>>
    Search

      <select id="type" name="type">
        <option<%= ' selected="selected"' if params[:type] == 'avatars' || current_controller == 'avatars' %> value='avatars'>Avatars</option>
        <option<%= ' selected="selected"' if params[:type] == 'events' || current_controller == 'events' %> value='events'>Events</option>
        <option<%= ' selected="selected"' if params[:type] == 'files' || current_controller == 'uploads' %> value='files'>Files</option>
        <option<%= ' selected="selected"' if params[:type] == 'headers' || current_controller == 'headers' %> value='headers'>Headers</option>
        <option<%= ' selected="selected"' if params[:type] == 'posts' %> value='posts'>Posts</option>
        <option<%= ' selected="selected"' if params[:type] == 'topics' || %w(home categories topics forums).include?(current_controller) %> value='topics'>Topics</option>
        <option<%= ' selected="selected"' if params[:type] == 'users' || current_controller == 'users' %> value='users'>Users</option>
      </select>
      <%= text_field_tag :query, params[:query], :id => :query, :style => "width:31%" %>

      <%= submit_tag "Search", :disable_with => "Search" %>
      <%= link_to_function 'Cancel', "$('search').toggle()" %>

<% end %>


Oops.

Oops.

<% form_tag({:action => "signin"}, {:id => "signin_form"}) do %>
    <%= foi_error_messages_for :user_signin %>

    <% if not sign_in_as_existing_user %>

If you've used WhatDoTheyKnow before

    <% end %>

    Your e-mail:
    <%= text_field 'user_signin', 'email', { :size => 20 } %>

    Password:
    <%= password_field 'user_signin', 'password', { :size => 15 } %>

    <%= link_to "Forgotten your password?", signchange_url + "?pretoken=" + h(params[:token]) %>

    <%= check_box_tag 'remember_me', "1" %>
    Remember me (keeps you signed in longer;
    do not use on a public computer)

    <%= hidden_field_tag 'token', params[:token], { :id => 'signin_token' } %>
    <%= submit_tag "Sign in" %>

<% end %>


Wording improvement

Wording improvement

As suggested by @mlandauer in #641.


Fix textmate footnotes to now blowup on exceptions

  <%=h @exception.original_exception.class.to_s %> in
  <%=h request.parameters["controller"].capitalize if request.parameters["controller"]%>#<%=h request.parameters["action"] %>

  Showing <%=h @exception.file_name %> where line #<%= @exception.line_number_link rescue @exception.line_number %> raised:

<%=h @exception.message %>

Extracted source (around line #<%= @exception.line_number_link rescue @exception.line_number %>):

<%=h @exception.source_extract %>

<%=h @exception.sub_template_message %>

<% @real_exception = @exception
   @exception = @exception.original_exception || @exception %>
<%= render_file(@rescues_path + "/_trace.erb", false) %>
<% @exception = @real_exception %>

<%= render_file(@rescues_path + "/_request_and_response.erb", false) %>

  <%=h @exception.original_exception.class.to_s %> in
  <%=h request.parameters["controller"].capitalize if request.parameters["controller"]%>#<%=h request.parameters["action"] %>

  Showing <%=h @exception.file_name %> where line #<%= @exception.line_number_link rescue @exception.line_number %> raised:

<%=h @exception.message %>

Extracted source (around line #<%= @exception.line_number_link rescue @exception.line_number %>):

<%=h @exception.source_extract %>

<%=h @exception.sub_template_message %>

<% @real_exception = @exception
   @exception = @exception.original_exception || @exception %>
<%= render_file(@rescues_path + "/_trace.rhtml", false) %>
<% @exception = @real_exception %>

<%= render_file(@rescues_path + "/_request_and_response.rhtml", false) %>


Aha, finally fixed the screwed-up spacing around the observation notes.

git-svn-id: 3ebd8a4fd9006ff03462623fffc479a1d4750d42@1041 7a65b82a-1d14-0410-b525-e2835e71a0b4

  <%= :WHEN.t %>: <%= observation.when.web_date %>

  <%= if observation.is_collection_location
    :show_observation_collection_location.t
  else
    :show_observation_seen_at.t
  end %>:
  <%= location_link(observation.place_name, observation.location, nil, true) %>
  <%= if observation.lat
    "(#{observation.lat}, #{observation.long})"
  end %>

  <%= :WHO.t %>: <%= user_link(observation.user) %>

    <% if observation.specimen %>
      <%= :show_observation_specimen_available.t %>
    <% else %>
      <%= :show_observation_specimen_not_available.t %>
    <% end %>

  <%= if !observation.notes.blank?
    Textile.register_name(observation.namings.map {|n| n.name})
    Textile.register_name(observation.name)
    '
' +
      sanitize(:NOTES.l + ': ' + observation.notes.to_s).tpl +
    '
'
  end %>

  <%= :WHEN.t %>: <%= observation.when.web_date %>

  <%= if observation.is_collection_location
    :show_observation_collection_location.t
  else
    :show_observation_seen_at.t
  end %>:
  <%= location_link(observation.place_name, observation.location, nil, true) %>
  <%= if observation.lat
    "(#{observation.lat}, #{observation.long})"
  end %>

  <%= :WHO.t %>: <%= user_link(observation.user) %>

    <% if observation.specimen %>
      <%= :show_observation_specimen_available.t %>
    <% else %>
      <%= :show_observation_specimen_not_available.t %>
    <% end %>

  <% if !observation.notes.blank?
    Textile.register_name(observation.namings.map {|n| n.name})
    Textile.register_name(observation.name) %>
    <%= sanitize(:NOTES.l + ': ' + observation.notes.to_s).tpl %>
  <% end %>


Add link to order and format it better

Add link to order and format it better

<!DOCTYPE html>

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

      <%= t('orders_cycle_plugin.views.mailer.open_cycle.hello_member_of_name') % {:name => @profile.name} %>

<%= t('orders_cycle_plugin.views.mailer.open_cycle.a_new_cycle_is_open_c') + @cycle.name %>

<%= @cycle.description %>

<%= t('orders_cycle_plugin.views.mailer.open_cycle.the_administrator_let') %>

<%= @message %>

<%= link_to t('orders_cycle_plugin.views.order.index.place_an_order'), {:controller => :orders_cycle_plugin_order, :action => :edit, :cycle_id => @cycle.id, :profile => @profile.identifier, :only_path => false, :host => @profile.hostname || @environment.default_hostname }, :id => 'consumer-new-order' %>

<%= @domain %>

      --

    <%= @environment.name %>

<!DOCTYPE html>

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

      <%= t('orders_cycle_plugin.views.mailer.open_cycle.hello_member_of_name') % {:name => @profile.name} %>

<%= t('orders_cycle_plugin.views.mailer.open_cycle.a_new_cycle_is_open_c') + @cycle.name %>

<%= t('orders_cycle_plugin.views.mailer.open_cycle.the_cycle_description') %>

<%= @cycle.description %>

<%= t('orders_cycle_plugin.views.mailer.open_cycle.the_administrator_let') %>

<%= @message %>

      --

    <%= @environment.name %>


Update lib/views/help/_sidebar.rhtml

Update lib/views/help/_sidebar.rhtml

We have an Alaveteli help page already but it is not linked to
from the other help pages. This proposed change adds such a link.

Help pages

<%= link_to_unless_current "Introduction", "/help/about" %>

<%= link_to_unless_current "Making requests", "/help/requesting" %>

<%= link_to_unless_current "Your privacy", "/help/privacy" %>

<%= link_to_unless_current "FOI officers", "/help/officers" %>

<%= link_to_unless_current "Credits", "/help/credits" %>

<%= link_to_unless_current "Programmers API", "/help/api" %>

<%= link_to_unless_current "Advanced search", "/search" %>

<%= link_to_unless_current "Alaveteli", "/alaveteli" %>

Contact us

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

Help pages

<%= link_to_unless_current "Introduction", "/help/about" %>

<%= link_to_unless_current "Making requests", "/help/requesting" %>

<%= link_to_unless_current "Your privacy", "/help/privacy" %>

<%= link_to_unless_current "FOI officers", "/help/officers" %>

<%= link_to_unless_current "Credits", "/help/credits" %>

<%= link_to_unless_current "Programmers API", "/help/api" %>

<%= link_to_unless_current "Advanced search", "/search" %>

Contact us

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


Indentation only

Indentation only

<% @title = "FOI officer questions" %>

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

<%= @title %> #

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

<%= site_name %> is a service run by a charity. It helps ordinary members
of the public make FOI requests, and easily track and share the responses.

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

If you have privacy or other concerns, please read the answers below.
You might also like to read the introduction to <%= site_name %> to find out more about what
the site does from the point of view of a user. You can also search the
site to find the authority that you work for, and view the status of
any requests made using the site.

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

Why are you publishing responses to FOI requests? #

We think there are lots of benefits. Most importantly it will encourage the
public to be more interested and involved in the work of government. We
also hope that it will reduce the number of duplicate requests on any
subject that a public body will receive. Given that Freedom of Information
responses contain public information, which anybody could easily request
again from the public authority, we think there should be no reason not to
publish it widely.

Are the people making requests real people? #

Yes. For the purposes of keeping track of responses we use
computer-generated email addresses for each request. However, before
they can send a request, each user must register on the site with a
unique email address that we then verify. You can search this site and
find a page listing all requests that each person has made.

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

Yes it is.

Aren't you making lots of vexatious requests? #

<%= site_name %> is not making any requests. We are sending requests on
behalf of our users, who are real people making the requests.

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

I can see a request on <%= site_name %>, but we never got it by email!#

If a request appears on the site, then we have attempted to send it to
the authority by email. Any delivery failure messages will automatically
appear on the site. You can check the address we're using with the "View FOI
email address" link which appears on the page for the authority. Contact us if there is a better address we can
use.

Requests are sometimes not delivered because they are quietly removed by
"spam filters" in the IT department of the authority. Authorities can make
sure this doesn't happen by asking their IT departments to "whitelist"
any email from @<%= MySociety::Config.get('INCOMING_EMAIL_DOMAIN', 'localhost') %>.
If you ask us we will resend any request,
and/or give technical details of delivery so an IT department can chase
up what happened to the message.

Finally, you can respond to any request from your web browser, without
needing any email, using the "respond to request" link at the bottom of
each request page.

How do you calculate the deadline shown on request pages?#

The Freedom of Information Act says:

        …the agency or Minister must…as soon as practicable but in
        any case not later than the end of the period of 30 days after the day on
        which the request is received by or on behalf of the agency or Minister,
        take all reasonable steps to enable the applicant to be notified of a
        decision on the request

      —
      (s 15(5)(b))

    And we try to be as generous as possible in our calculation of the 30 day
    timeframe.

But really, how do you calculate the deadline?#

Please read the answer to the previous question first. Legally, authorities
must respond promptly to FOI requests. If they fail to do that,
it is best if they show the hard work they are doing by explaining what is
taking the extra time to do.

That said, <%= site_name %> does show the maximum legal deadline
for response on each request. Here's how we calculate it.

If the day we deliver the request by email is a working day, we count that
as "day zero", even if it was delivered late in the evening. Days end at
midnight.  We then count the next working day as "day one", and so on up to
20 working days.

If the day the request email was delivered was a non-working day, we count
the next working day as "day one". Delivery is delivery, even if it happened on
the weekend. Some authorities <a href="http://www.<%= site_name %>.com/request/policy_regarding_body_scans#incoming-1100">disagree with this, our lawyer disagrees with them.

Requesters are encouraged to mark when they have clarified
their request so the clock resets, but sometimes they get this wrong. If you
see a problem with a particular request, let us know and we'll fix it.

The date thus calculated is shown on requests with the text "By law,
Agency should normally have responded by...". There is only
one case which is not normal, see the next question about
public interest test time extensions.

If you're getting really nerdy about all this, read the detailed Office of the Australian Information Commissioner guidance.
Meanwhile, remember that the law says authorities must respond
promptly. That's really what matters.

How can I send a large file, which won't go by email?#

Instead of email, you can respond to a request directly from your web
browser, including uploading a file. To do this, choose "respond to request" at
the bottom of the request's page. Contact us if it
is too big for even that (more than, say, 50Mb).

Why do you publish the names of public servants and the text of emails? #

We consider what officers or servants do in the course of their employment
to be public information. We will only remove content in exceptional
circumstances, see our take down policy.

Do you publish email addresses or mobile phone numbers? #

To prevent spam, we automatically remove most emails and some mobile numbers from
responses to requests.  Please contact us if we've
missed one.
For technical reasons we don't always remove them from attachments, such as certain PDFs.

If you need to know what an address was that we've removed, please get in touch with us. Occasionally, an email address
forms an important part of a response and we will post it up in an obscured
form in an annotation.

What is your policy on copyright of documents?#

Our Freedom of Information law is "applicant blind", so anyone in the
world can request the same document and get a copy of it.

If you think our making a document available on the internet infringes your
copyright, you may contact us and ask us
to take it down.  However, to save tax payers' money by preventing duplicate
requests, and for good public relations, we'd advise you not to do that.

If you haven't already, read the introduction -->

Otherwise, the credits or the programmers API -->


Fix missing i18n string in clarification email

<%= _('{{public_body}} has asked you to explain part of your {{law_used}} request.',
    :public_body => @info_request.public_body.name,
    :law_used => @info_request.law_used_short ) %>
<%= _('To do this, first click on the link below.') %>

<%=@url%>

<%= _('You will only get an answer to your request if you follow up
with the clarification.')%>

-- <%= _('the {{site_name}} team', :site_name=>site_name) %>

<%=@info_request.public_body.name%> <%=('has asked you to explain part of your')%> <%=@info_request.law_used_short%> <%= _('request.')%>
<%= _('To do this, first click on the link below.')%>

<%=@url%>

<%= _('You will only get an answer to your request if you follow up
with the clarification.')%>

-- <%= _('the {{site_name}} team', :site_name=>site_name) %>


Fix start button in homepage

Fix start button in homepage

<% view_cache :ttl => 5.minutes, :tag => I18n.locale do %>

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

    Make a new Freedom of Information request

    Search over <%= InfoRequest.count %> requests and <%= PublicBody.count %> authorities:
    <% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %>
           <%= text_field_tag 'query', params[:query], { :size => 30 } %>
           <%= hidden_field_tag 'bodies', 1 %>
           <%= image_submit_tag 'button-search.png', :title => 'Search' %>

           <%= _('e.g.') %>
	   <% @search_examples.each_with_index do |name, i| %>
             <%=link_to name, search_url(name, 'bodies')%><% if i < 2 %>, <% else %>. <% break %><% end %>
	   <% end %>
    <% end %>

    <% if @popular_bodies.size > 0 %>

Who has the information?

	<%= site_name %> covers requests to <%= PublicBody.count %> authorities, including:

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>
                 <%= n_('%d request', '%d requests', popular_body.info_requests.count) % popular_body.info_requests.count %>

            <% end%>

                <%= link_to _('Browse all authorities...'), list_public_bodies_default %>

    <% end %>

What are people asking?

           <%= site_name %> users have asked <%= InfoRequest.count %> questions.

              <% for event in @successful_request_events %>

 	       <%= public_body_link(event.info_request.public_body) %> answered a question about
	       <%=link_to h(event.info_request.title), request_url(event.info_request)%>
               <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %>
	       <p class="excerpt" onclick="document.location.href='<%=request_url(event.info_request)%>'"><%= excerpt(event.info_request.title, "", 200) %>

            <% end %>

<%=link_to _('More successful requests...'), request_list_successful_url %>

<% end %>


Hides "must be a member to post" message for private replies

<% @page_title = "Mailing Lists: #{@mailing_list.friendly_name}" %>

  <%= error_messages_for "mailing_list_post" %>

  <%= start_form_tag :action => "post" %>
  <%= hidden_field("mailing_list_post", "mailing_list_id") %>
  <%= hidden_field("reply_to", 'id') %>

      To:

		<% if @reply_to %>
		<%= h(@reply_to.sender_obscured) %>
		<% else %>
		<%= @mailing_list.friendly_name %>
		<% end %>

      Your Name:
      <%= text_field("mailing_list_post", "from_name", :size => "40") %>

      Your Email Address:
      <%= text_field("mailing_list_post", "from_email_address", :size => "40") %>

      Subject:
      <%= text_field("mailing_list_post", "subject", :size => "40") %>

      <%= text_area("mailing_list_post", "body", :rows => "14", :cols => "65") %>

      <% unless @reply_to %>You must be a subscriber to post<% end %>

		<% if @reply_to %>
	    	<%= submit_tag("Send") %>
		<% else %>
    	<%= submit_tag("Post") %>
		<% end %>

  <%= end_form_tag %>

      <%= render("shared/mailing_list_links", :mailing_list => @mailing_list) %>

<% @page_title = "Mailing Lists: #{@mailing_list.friendly_name}" %>

  <%= error_messages_for "mailing_list_post" %>

  <%= start_form_tag :action => "post" %>
  <%= hidden_field("mailing_list_post", "mailing_list_id") %>
  <%= hidden_field("reply_to", 'id') %>

      To:

		<% if @reply_to %>
		<%= h(@reply_to.sender_obscured) %>
		<% else %>
		<%= @mailing_list.friendly_name %>
		<% end %>

      Your Name:
      <%= text_field("mailing_list_post", "from_name", :size => "40") %>

      Your Email Address:
      <%= text_field("mailing_list_post", "from_email_address", :size => "40") %>

      Subject:
      <%= text_field("mailing_list_post", "subject", :size => "40") %>

      <%= text_area("mailing_list_post", "body", :rows => "14", :cols => "65") %>

      You must be a subscriber to post

		<% if @reply_to %>
	    	<%= submit_tag("Send") %>
		<% else %>
    	<%= submit_tag("Post") %>
		<% end %>

  <%= end_form_tag %>

      <%= render("shared/mailing_list_links", :mailing_list => @mailing_list) %>


Show correct number of requests for logged in user on their user page.

<% if @show_requests %>
 <% @title = h(@display_user.name) + " - Freedom of Information requests" %>
<% else %>
 <% @title = h(@display_user.name) + " - user profile" %>
<% end %>

<% if (@same_name_users.size >= 1) %>

<%= _('There is more than one person who uses this site and has this name.
    One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %>
        <%= user_link(@same_name_user) %>
    <% end %>
<% end%>

<% if @show_profile && @is_you && @undescribed_requests.size > 0 %>

<%= _('Please go to the following requests, and let us
        know if there was information in the recent responses to them.')%>

        <% for undescribed_request in @undescribed_requests %>

<%=request_link(undescribed_request)%>

        <% end %>

      <%= _('Thanks very much - this will help others find useful stuff. We\'ll
            also, if you need it, give advice on what to do next about your
            requests.')%>

<% end %>

<% if @show_profile %>

     <% if !@track_thing.nil? %>

<%= _('Track this person')%>

       <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
     <% end %>
     <% if !@xapian_requests.nil? %>

<%= _('On this page')%>

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

<%= _('Annotations')%>
     <% end %>

        <% if @display_user.profile_photo %>
            <% if @is_you %>
            <a href="<%= set_profile_photo_url() %>">
            <% end %>
                <img src="<%= get_profile_photo_url(:url_name => @display_user.url_name) %>" alt="">
            <% if @is_you %>

            <% end %>
        <% else %>
            <% if @is_you %>

                    <%= link_to _('Set your profile photo'), set_profile_photo_url() %>

            <% end %>
        <% end %>

 <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %>

       <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %>
        <% if !@user.nil? && @user.admin_page_links? %>
        (<%= link_to "admin", user_admin_url(@display_user) %>)
        <% end %>

        <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
        <% if @is_you %>
            (<%= _('just to see how it works')%>)
        <% end %>

    <% if @display_user.public_banned? %>

					<%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%>

               <%= _('They have been given the following explanation:')%>

                <%= @display_user.can_fail_html %>

    <% end %>

    <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>

            <%= @display_user.get_about_me_for_html_display %>
            <% if @is_you %>
                (<%= link_to _("edit text about you"), set_profile_about_me_url() %>)
            <% end %>

    <% end %>

    <% if @is_you %>

            <% if @display_user.profile_photo %>
                <%= link_to _('Change profile photo'), set_profile_photo_url() %> |
            <% end %>
            <%= link_to _('Change your password'), signchangepassword_url() %> |
            <%= link_to _('Change your email'), signchangeemail_url() %>

    <% end %>

    <% if not @is_you %>

           <%= _('Sign in to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.request_uri)]%>

    <% end %>

<% end %>

<% if @show_requests %>

            <% form_tag(show_user_url, :method => "get", :id=>"search_form") do %>

	      <%= text_field_tag(:user_query, params[:user_query]) %>
	      <% if @is_you %>
               <%= submit_tag(_("Search your contributions")) %>
	      <% else %>
               <%= submit_tag(_("Search contributions by this person")) %>
	      <% end %>

	    <% end %>

    <% if !@xapian_requests.nil? %>
        <% if @xapian_requests.results.empty? %>
            <% if @page == 1 %>

<%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> <%= @match_phrase %>

<%= @is_you ? _('You have made no Freedom of Information requests using this site.') : _('This person has made no Freedom of Information requests using this site.') %>
		<%= @page_desc %>
            <% end %>
        <% else %>

                <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.matches_estimated.to_s) % @xapian_requests.matches_estimated.to_s : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests',  @xapian_requests.matches_estimated.to_s) % @xapian_requests.matches_estimated %>

                <%= @match_phrase %>
		<%= @page_desc %>

            <% 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, @display_user.info_requests.size) %>
        <% end %>
    <% else %>
      <% if @show_requests %>

<%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %>

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

      <% end %>
    <% end %>

    <% if !@xapian_comments.nil? %>
        <% if @xapian_comments.results.empty? %>
            <% if @page == 1 %>

<%= @is_you ? _('Your annotations') : _('This person\'s annotations') %>
                <%= @match_phrase %>

<%= _('None made.')%>

            <% end %>
        <% else %>

                <%= @is_you ? n_('Your %d annotation', 'Your %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size : n_('This person\'s %d annotation', 'This person\'s %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size %>

                <%= @page_desc %>

            <% for result in @xapian_comments.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, @display_user.visible_comments.size) %>
        <% end %>
    <% end %>

    <% if @show_profile && @is_you %>
        <% if @track_things.empty? %>

 <%= _('Your email subscriptions')%>

<%= _('None made.')%>

        <% else %>

 Your <%=pluralize(@track_things.size, _('email subscription')) %>

            <% if @track_things_grouped.size == 1 %>
                <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>

                        <%=TrackThing.track_type_description(@track_things[0].track_type)%>
                        <%= hidden_field_tag 'track_type', @track_things[0].track_type %>
                        <%= hidden_field_tag 'user', @display_user.id %>
                        <%= hidden_field_tag 'r', request.request_uri %>
                        <% if @track_things.size > 1 %>
                            <%= submit_tag _('unsubscribe all') %>
                        <% end %>

                <% end %>
            <% end %>
            <% for track_type, track_things in @track_things_grouped %>
                <% if @track_things_grouped.size > 1 %>
                    <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>

                            <%=TrackThing.track_type_description(track_type)%>
                            <%= hidden_field_tag 'track_type', track_type %>
                            <%= hidden_field_tag 'user', @display_user.id %>
                            <%= hidden_field_tag 'r', request.request_uri %>
                            <% if track_things.size > 1 %>
                                <%= submit_tag _('unsubscribe all')%>
                            <% end %>

                    <% end %>
                <% end %>

                <% for track_thing in track_things %>

                        <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %>

                                <%= track_thing.params[:list_description] %>
                                <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
                                <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s }  %>
                                <%= submit_tag _('unsubscribe') %>

                        <% end %>

                <% end %>

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

<% end %>

<% if @show_requests %>
 <% @title = h(@display_user.name) + " - Freedom of Information requests" %>
<% else %>
 <% @title = h(@display_user.name) + " - user profile" %>
<% end %>

<% if (@same_name_users.size >= 1) %>

<%= _('There is more than one person who uses this site and has this name.
    One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %>
        <%= user_link(@same_name_user) %>
    <% end %>
<% end%>

<% if @show_profile && @is_you && @undescribed_requests.size > 0 %>

<%= _('Please go to the following requests, and let us
        know if there was information in the recent responses to them.')%>

        <% for undescribed_request in @undescribed_requests %>

<%=request_link(undescribed_request)%>

        <% end %>

      <%= _('Thanks very much - this will help others find useful stuff. We\'ll
            also, if you need it, give advice on what to do next about your
            requests.')%>

<% end %>

<% if @show_profile %>

     <% if !@track_thing.nil? %>

<%= _('Track this person')%>

       <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
     <% end %>
     <% if !@xapian_requests.nil? %>

<%= _('On this page')%>

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

<%= _('Annotations')%>
     <% end %>

        <% if @display_user.profile_photo %>
            <% if @is_you %>
            <a href="<%= set_profile_photo_url() %>">
            <% end %>
                <img src="<%= get_profile_photo_url(:url_name => @display_user.url_name) %>" alt="">
            <% if @is_you %>

            <% end %>
        <% else %>
            <% if @is_you %>

                    <%= link_to _('Set your profile photo'), set_profile_photo_url() %>

            <% end %>
        <% end %>

 <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %>

       <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %>
        <% if !@user.nil? && @user.admin_page_links? %>
        (<%= link_to "admin", user_admin_url(@display_user) %>)
        <% end %>

        <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
        <% if @is_you %>
            (<%= _('just to see how it works')%>)
        <% end %>

    <% if @display_user.public_banned? %>

					<%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%>

               <%= _('They have been given the following explanation:')%>

                <%= @display_user.can_fail_html %>

    <% end %>

    <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>

            <%= @display_user.get_about_me_for_html_display %>
            <% if @is_you %>
                (<%= link_to _("edit text about you"), set_profile_about_me_url() %>)
            <% end %>

    <% end %>

    <% if @is_you %>

            <% if @display_user.profile_photo %>
                <%= link_to _('Change profile photo'), set_profile_photo_url() %> |
            <% end %>
            <%= link_to _('Change your password'), signchangepassword_url() %> |
            <%= link_to _('Change your email'), signchangeemail_url() %>

    <% end %>

    <% if not @is_you %>

           <%= _('Sign in to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.request_uri)]%>

    <% end %>

<% end %>

<% if @show_requests %>

            <% form_tag(show_user_url, :method => "get", :id=>"search_form") do %>

	      <%= text_field_tag(:user_query, params[:user_query]) %>
	      <% if @is_you %>
               <%= submit_tag(_("Search your contributions")) %>
	      <% else %>
               <%= submit_tag(_("Search contributions by this person")) %>
	      <% end %>

	    <% end %>

    <% if !@xapian_requests.nil? %>
        <% if @xapian_requests.results.empty? %>
            <% if @page == 1 %>

<%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> <%= @match_phrase %>

<%= @is_you ? _('You have made no Freedom of Information requests using this site.') : _('This person has made no Freedom of Information requests using this site.') %>
		<%= @page_desc %>
            <% end %>
        <% else %>

                <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.results.size) % @xapian_requests.results.size  : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests',  @xapian_requests.matches_estimated.to_s) % @xapian_requests.matches_estimated %>

                <%= @match_phrase %>
		<%= @page_desc %>

            <% 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, @display_user.info_requests.size) %>
        <% end %>
    <% else %>
      <% if @show_requests %>

<%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %>

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

      <% end %>
    <% end %>

    <% if !@xapian_comments.nil? %>
        <% if @xapian_comments.results.empty? %>
            <% if @page == 1 %>

<%= @is_you ? _('Your annotations') : _('This person\'s annotations') %>
                <%= @match_phrase %>

<%= _('None made.')%>

            <% end %>
        <% else %>

                <%= @is_you ? n_('Your %d annotation', 'Your %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size : n_('This person\'s %d annotation', 'This person\'s %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size %>

                <%= @page_desc %>

            <% for result in @xapian_comments.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, @display_user.visible_comments.size) %>
        <% end %>
    <% end %>

    <% if @show_profile && @is_you %>
        <% if @track_things.empty? %>

 <%= _('Your email subscriptions')%>

<%= _('None made.')%>

        <% else %>

 Your <%=pluralize(@track_things.size, _('email subscription')) %>

            <% if @track_things_grouped.size == 1 %>
                <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>

                        <%=TrackThing.track_type_description(@track_things[0].track_type)%>
                        <%= hidden_field_tag 'track_type', @track_things[0].track_type %>
                        <%= hidden_field_tag 'user', @display_user.id %>
                        <%= hidden_field_tag 'r', request.request_uri %>
                        <% if @track_things.size > 1 %>
                            <%= submit_tag _('unsubscribe all') %>
                        <% end %>

                <% end %>
            <% end %>
            <% for track_type, track_things in @track_things_grouped %>
                <% if @track_things_grouped.size > 1 %>
                    <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>

                            <%=TrackThing.track_type_description(track_type)%>
                            <%= hidden_field_tag 'track_type', track_type %>
                            <%= hidden_field_tag 'user', @display_user.id %>
                            <%= hidden_field_tag 'r', request.request_uri %>
                            <% if track_things.size > 1 %>
                                <%= submit_tag _('unsubscribe all')%>
                            <% end %>

                    <% end %>
                <% end %>

                <% for track_thing in track_things %>

                        <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %>

                                <%= track_thing.params[:list_description] %>
                                <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
                                <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s }  %>
                                <%= submit_tag _('unsubscribe') %>

                        <% end %>

                <% end %>

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

<% end %>


Quick fix to get homepage working for now

<% view_cache :ttl => 5.minutes, :tag => I18n.locale do %>

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

    Make a new Freedom of Information request

     <%= image_tag('start-button.png') %>

    Search over <%= InfoRequest.count %> requests and <%= PublicBody.count %> authorities:
    <% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %>
           <%= text_field_tag 'query', params[:query], { :size => 30 } %>
           <%= hidden_field_tag 'bodies', 1 %>
           <%= image_submit_tag 'button-search.png', :title => 'Search' %>

           <%= _('e.g.') %>
	   <% @search_examples.each_with_index do |name, i| %>
             <%=link_to name, search_url(name, 'bodies')%><% if i < 2 %>, <% else %>. <% break %><% end %>
	   <% end %>
    <% end %>

    <% if @popular_bodies.size > 0 %>

Who has the information?

	<%= site_name %> covers requests to <%= PublicBody.count %> authorities, including:

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>
                 <%= n_('%d request', '%d requests', popular_body.info_requests.count) % popular_body.info_requests.count %>

            <% end%>

                <%= link_to _('Browse all authorities...'), list_public_bodies_default %>

    <% end %>

What are people asking?

           <%= site_name %> users have asked <%= InfoRequest.count %> questions.

              <% for event in @successful_request_events %>

 	       <%= public_body_link(event.info_request.public_body) %> answered a question about
	       <%=link_to h(event.info_request.title), request_url(event.info_request)%>
               <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %>
	       <p class="excerpt" onclick="document.location.href='<%=request_url(event.info_request)%>'"><%= excerpt(event.info_request.title, "", 200) %>

            <% end %>

<%=link_to _('More successful requests...'), request_list_successful_url %>

<% end %>


35 is a little too wide to fit, try 32.

35 is a little too wide to fit, try 32.

<% view_cache :ttl => 5.minutes do %>

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority you'd

like information from. By law, they have to respond
           (why?).

           <%= text_field_tag 'query', params[:query], { :size => 30 } %>
           <%= hidden_field_tag 'bodies', 1 %>
           <%= submit_tag "Search" %>

           e.g. <%=link_to 'Liverpool', search_url('liverpool', 'bodies')%>, <%=link_to 'MRSA', search_url('mrsa', 'bodies')%>, <%=link_to 'Treasury', search_url('treasury', 'bodies')%>

           OR, search for information others have requested using WhatDoTheyKnow.com

    <% end %>

    <% if @popular_bodies.size > 0 %>

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>
                <%=h popular_body.info_requests.count%> requests

            <% end%>

                <%= link_to "More authorities...", list_public_bodies_default %>

    <% end %>

    <% if @successful_request_events.size > 0 %>

            <% for event in @successful_request_events %>

<%=link_to h(excerpt(event.info_request.title, "", 32)), request_url(event.info_request)%>
                <%=h time_ago_in_words(event.described_at).gsub("about ", "") %> ago

            <% end %>

More successful requests...

    <% end %>

<% end %>

<% view_cache :ttl => 5.minutes do %>

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority you'd

like information from. By law, they have to respond
           (why?).

           <%= text_field_tag 'query', params[:query], { :size => 30 } %>
           <%= hidden_field_tag 'bodies', 1 %>
           <%= submit_tag "Search" %>

           e.g. <%=link_to 'Liverpool', search_url('liverpool', 'bodies')%>, <%=link_to 'MRSA', search_url('mrsa', 'bodies')%>, <%=link_to 'Treasury', search_url('treasury', 'bodies')%>

           OR, search for information others have requested using WhatDoTheyKnow.com

    <% end %>

    <% if @popular_bodies.size > 0 %>

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>
                <%=h popular_body.info_requests.count%> requests

            <% end%>

                <%= link_to "More authorities...", list_public_bodies_default %>

    <% end %>

    <% if @successful_request_events.size > 0 %>

            <% for event in @successful_request_events %>

<%=link_to h(excerpt(event.info_request.title, "", 35)), request_url(event.info_request)%>
                <%=h time_ago_in_words(event.described_at).gsub("about ", "") %> ago

            <% end %>

More successful requests...

    <% end %>

<% end %>


Automatically redirect when you select item.

<%= render :partial => 'help/alpha_notice' %>

Make requests for information from the UK Government

    <% form_tag({:action => :frontpage}, :method => 'get', :id => 'public_body_form', :class => 'plaque' ) do %>

            Find the public body you would like information from:

            <%= text_field_with_auto_complete 'public_body', 'query', {}, { :skip_style => true, :frequency => 0.1,
                :after_update_element =>
                  "function(element,value) {
                      parent.window.location = '/?public_body[query]=' + element.value
                  }"
                } %>

        Type to search e.g. Health, Business, Scotland

            <%= submit_tag "Submit" %>

        <% if @public_bodies.size > 0 %>

                    Public bodies found
                <% for public_body in @public_bodies %>

                        <%= link_to h(public_body.name), new_request_to_body_url(:public_body_id => public_body.id.to_s) %>

                <% end %>

        <% end %>

    <% end %>

Explore information that others requested

    <%= render :partial => 'request_listing', :locals => { :info_requests => @info_requests } %>

View all information

<%= render :partial => 'help/alpha_notice' %>

Make requests for information from the UK Government

    <% form_tag({:action => :frontpage}, :id => 'public_body_form', :class => 'plaque' ) do %>

            Find the public body you would like information from:

            <%= text_field_with_auto_complete 'public_body', 'query', {}, { :skip_style => true } %>

        Type to search e.g. Health, Business, Scotland

            <%= submit_tag "Submit" %>

        <% if @public_bodies.size > 0 %>

                    Public bodies found
                <% for public_body in @public_bodies %>

                        <%= link_to h(public_body.name), new_request_to_body_url(:public_body_id => public_body.id.to_s) %>

                <% end %>

        <% end %>

    <% end %>

Explore information that others requested

    <%= render :partial => 'request_listing', :locals => { :info_requests => @info_requests } %>

View all information


display_content: fix javascript needed for tabs

<%= javascript_tag 'render_all_jquery_ui_widgets()' %>

 <%= _('Choose which attributes should be displayed and drag to reorder them:') %>

  <% for section in @block.sections do %>

      <%= hidden_field_tag 'block[sections][][value]', section[:value] %>
      <%= check_box_tag 'block[sections][][checked]', section[:value], section[:checked] %>

    <%= @block.section_name(section[:value]) %>

  <% end %>

 <%= _('Choose which content should be displayed:') %>

<% tabs = [] %>
<% tabs << {:title => _('Choose directly'), :id => 'choose-directly', :content => (render :partial => 'choose_directly')} %>
<% tabs << {:title => _('Choose by Content Type'), :id => 'choose_by_content_type', :content => (render :partial => 'choose_by_content_type')} %>

<%= render_tabs(tabs) %>

<%= noosfero_javascript %>

 <%= _('Choose which attributes should be displayed and drag to reorder them:') %>

  <% for section in @block.sections do %>

      <%= hidden_field_tag 'block[sections][][value]', section[:value] %>
      <%= check_box_tag 'block[sections][][checked]', section[:value], section[:checked] %>

    <%= @block.section_name(section[:value]) %>

  <% end %>

 <%= _('Choose which content should be displayed:') %>

<% tabs = [] %>
<% tabs << {:title => _('Choose directly'), :id => 'choose-directly', :content => (render :partial => 'choose_directly')} %>
<% tabs << {:title => _('Choose by Content Type'), :id => 'choose_by_content_type', :content => (render :partial => 'choose_by_content_type')} %>

<%= render_tabs(tabs) %>


Show sign-in pop-up in current locale.

Show sign-in pop-up in current locale.

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

        <title>
        <% if @title %>
            <%=@title%> - <%= site_name %>
        <% else %>
            <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>
        <% end %>
        </title>

        <link rel="shortcut icon" href="/favicon.ico">
	<%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>

	<%= stylesheet_link_tag 'theme', :rel => "stylesheet", :media => "all"  %>
	<%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
	<% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
	<% end %>
	<%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js', 'general.js' %>

    <% if @profile_photo_javascript %>

        <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
    <% end %>

	<%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <%= stylesheet_link_tag '../asktheeu-theme/stylesheets/asktheeu.css', :title => "Main", :rel => "stylesheet"  %>
        <% if force_registration_on_new_request %>
        <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet"  %>
        <% end %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri) %>.json">
        <% end %>

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

    <%= render :partial => 'general/before_head_end' %>

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

    <% if force_registration_on_new_request && !@user %>
    <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %>

    <% end %>

<%= render :partial => 'general/locale_switcher' %>

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

          <% if @user %>
              <%= _('Hello, {{username}}!', :username => h(@user.name))%>

                <% if @user %>
                    <%=link_to _("My profile"), user_url(@user) %>
                <% end %>

              <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>
          <% else %>
              <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>
          <% end %>

        <% end %>

        <% if I18n.locale != :en %>

The translations into Spanish and French are still ongoing and we are happy for anyone
                who can support us
in order to make the site even more accessible. If you wish to help us,
                we are more than happy to hear from you.
Please get in touch:
                team@asktheeu.org

Close

        <% end %>

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

                   <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
                   <%= image_submit_tag('search-button.png') %>

            <% end %>

        <%= render :partial => 'general/orglink' %>

        <%= render :partial => 'general/topnav' %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

    <%= render :partial => 'general/footer' %>

    <%= render :partial => 'general/before_body_end' %>

X
<%= _("Paste this link into emails, tweets, and anywhere else:") %>

<input type="text">


[Mezuro] module results table now has a fixed relative size in _module_result partial

<%= _('Metric results for: ') + @module_label %>

      Metric
      Value
      Weight
      Threshold

    <% @module_result.metric_results.each do |metric_result|  %>
      <% range = metric_result.range %>
      <% if !range.nil? %>

          <a href="#" show-metric-history="<%= MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_result) %>" data-module-name="<%= @module.name %>"><%= metric_result.metric.name %>
          <%= MezuroPlugin::Helpers::ContentViewerHelper.format_grade(metric_result.value) %>
          <%= metric_result.weight %>
          <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %>

        <tr class="<%= MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_result) %>" style="display: none;">

            <div id='historical-<%= MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_result) %>'>

            <%= range.comments.nil? ? '' : range.comments %>

      <% end %>
    <% end %>

        <a href="#" show-grade-history="<%= @module_result.module.name %>" data-module-name="<%= @module.name%>" >

            <%= _('Grade:') %>
            <%= "%.02f" % @module_result.grade %>


s/XHTML/HTML/

s/XHTML/HTML/

<form id="post-comment" class="robots-nocontent" method="post" action="<%== @form_action %>">

  <% if @comment && @comment.valid? %>
    <fieldset>
      <%= Thoth::CommentController.render_view(:comment, :comment => @comment) %>
    </fieldset>
  <% end %>

  <fieldset>
    <legend>New comment</legend>

      Name
      <input type="text" name="author" id="author" maxlength="32"
          title="Enter your name" value="<%== @author %>" />

    <% if @comment; @comment.errors.on_field(:author).each do |error| %>

<%== error %>

    <% end; end %>

      Email
      <input type="text" name="author_email" id="author_email" maxlength="255"
          title="Enter your email address" value="<%== @author_email %>" />
      required, won't be displayed (but may be used for Gravatar)

    <% if @comment; @comment.errors.on_field(:author_email).each do |error| %>

<%== error %>

    <% end; end %>

      Website
      <input type="text" name="author_url" id="author_url" maxlength="255"
          title="Enter the URL of your website (optional)"
          value="<%== @author_url %>" />
      optional

    <% if @comment; @comment.errors.on_field(:author_url).each do |error| %>

<%== error %>

    <% end; end %>

      Title
      <input type="text" class="long" name="title" id="title" maxlength="100"
          title="Enter a title for this comment"
          value="<%== @comment && @comment.title ? @comment.title : '' %>" />

    <% if @comment; @comment.errors.on_field(:title).each do |error| %>

<%== error %>

    <% end; end %>

      <textarea name="body" rows="6" cols="60"><%== @comment && @comment.body ? @comment.body : '' %></textarea>

    <% if @comment; @comment.errors.on_field(:body).each do |error| %>

<%== error %>

    <% end; end %>

      Don't type anything here unless you're an evil robot:

      <input type="text" id="captcha" name="captcha" maxlength="50" />

      And especially don't type anything here:

      <textarea name="comment" rows="6" cols="60"></textarea>

    <% if @comment_error %>

<%== @comment_error %>

    <% end %>

      <input type="submit" name="action" value="Preview Comment" />
      <input type="submit" name="action" value="Post Comment" />
      <input type="hidden" name="post_id" value="<%== @post.id %>" />
      <input type="hidden" name="comment_id"
          value="<%== @comment && @comment.id ? @comment.id : '' %>" />

      Basic HTML (including links) is allowed, just don't try anything fishy.
      Your comment will be auto-formatted unless you use your own
      <p> tags for formatting. You're also welcome to use
      Textile.

  </fieldset>
</form>

<form id="post-comment" class="robots-nocontent" method="post" action="<%== @form_action %>">

  <% if @comment && @comment.valid? %>
    <fieldset>
      <%= Thoth::CommentController.render_view(:comment, :comment => @comment) %>
    </fieldset>
  <% end %>

  <fieldset>
    <legend>New comment</legend>

      Name
      <input type="text" name="author" id="author" maxlength="32"
          title="Enter your name" value="<%== @author %>" />

    <% if @comment; @comment.errors.on_field(:author).each do |error| %>

<%== error %>

    <% end; end %>

      Email
      <input type="text" name="author_email" id="author_email" maxlength="255"
          title="Enter your email address" value="<%== @author_email %>" />
      required, won't be displayed (but may be used for Gravatar)

    <% if @comment; @comment.errors.on_field(:author_email).each do |error| %>

<%== error %>

    <% end; end %>

      Website
      <input type="text" name="author_url" id="author_url" maxlength="255"
          title="Enter the URL of your website (optional)"
          value="<%== @author_url %>" />
      optional

    <% if @comment; @comment.errors.on_field(:author_url).each do |error| %>

<%== error %>

    <% end; end %>

      Title
      <input type="text" class="long" name="title" id="title" maxlength="100"
          title="Enter a title for this comment"
          value="<%== @comment && @comment.title ? @comment.title : '' %>" />

    <% if @comment; @comment.errors.on_field(:title).each do |error| %>

<%== error %>

    <% end; end %>

      <textarea name="body" rows="6" cols="60"><%== @comment && @comment.body ? @comment.body : '' %></textarea>

    <% if @comment; @comment.errors.on_field(:body).each do |error| %>

<%== error %>

    <% end; end %>

      Don't type anything here unless you're an evil robot:

      <input type="text" id="captcha" name="captcha" maxlength="50" />

      And especially don't type anything here:

      <textarea name="comment" rows="6" cols="60"></textarea>

    <% if @comment_error %>

<%== @comment_error %>

    <% end %>

      <input type="submit" name="action" value="Preview Comment" />
      <input type="submit" name="action" value="Post Comment" />
      <input type="hidden" name="post_id" value="<%== @post.id %>" />
      <input type="hidden" name="comment_id"
          value="<%== @comment && @comment.id ? @comment.id : '' %>" />

      Basic XHTML (including links) is allowed, just don't try anything fishy.
      Your comment will be auto-formatted unless you use your own
      <p> tags for formatting. You're also welcome to use
      Textile.

  </fieldset>
</form>


Translate heading for map key sidebar (uses existing site.map.map_key translation). Closes #1905.

<% content_for :left_menu do %>
<%= link_to_function t('site.key.map_key'), "showKey();" %>
<% end %>


Move span out of <ul> in delicious sidebar.  (closes #380)

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

<% if @delicious -%>

<a href="http://<%= @delicious.title %>"><%= @delicious.title %>

    <% (@sb_config['groupdate'] ? @delicious.days : [{ :container => @delicious.items }]).each do |group| -%>
    <% if @sb_config['groupdate'] -%>
    <%= group[:date].to_s.to_date.strftime("%b %d") %>
    <% end -%>

      <% for item in group[:container] %>

        <a href="<%= item.link %>" title="<%=h item.title%>"><%=h item.title %>
        <% if @sb_config['description'] -%>

<%= @sb_config['desclink'] ? item.description_link : item.description %>
        <% end -%>

      <% end -%>

    <% end -%>

<% end -%>


handle appln being deleted; remove caching

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

    <%= 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)
       }.compact.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("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 %>


Make clearer not comprehensive

Make clearer not comprehensive

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

Track this authority

    <%= 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.charity_number.empty? %>
        <% if @public_body.charity_number.match(/^SC/) %>
            <%= link_to "Charity overview", "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + @public_body.charity_number %>

        <% else %>
            <%= link_to "Charity overview", "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + @public_body.charity_number %>

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

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

<%=@public_body.type_of_authority(true)%> in the UK<% if not @public_body.short_name.empty? %>, also called <%= 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' %>
        <% make = 'Make' %>
        <% if @searched_to_send_request %>
            Next,
            <% make = 'make' %>
        <% end %>
        <% if @public_body.eir_only? %>
            <%= link_to make + " a new Environmental Information request", new_request_to_body_url(:public_body_id => @public_body.id.to_s)%>
        <% else %>
            <%= link_to make + " a new Freedom of Information request", new_request_to_body_url(:public_body_id => @public_body.id.to_s)%>
        <% end %>
        to <%= h(@public_body.name) %>
    <% 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 !@xapian_requests.nil? %>
    <% if @xapian_requests.results.empty? %>
        <% if @public_body.eir_only? %>

Environmental Information Regulations requests made

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

        <% else %>

Freedom of Information requests made

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

        <% end %>
    <% else %>

        <% if @public_body.eir_only? %>
            <%=pluralize(@public_body.info_requests.size, "Environmental Information Regulations request") %> made using this site
        <% else %>
            <%=pluralize(@public_body.info_requests.size, "Freedom of Information request") %> made using this site
        <% end %>
        <%= @page_desc %>

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

Only requests made using WhatDoTheyKnow.com are shown.

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

Track this authority

    <%= 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.charity_number.empty? %>
        <% if @public_body.charity_number.match(/^SC/) %>
            <%= link_to "Charity overview", "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + @public_body.charity_number %>

        <% else %>
            <%= link_to "Charity overview", "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + @public_body.charity_number %>

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

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

<%=@public_body.type_of_authority(true)%> in the UK<% if not @public_body.short_name.empty? %>, also called <%= 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' %>
        <% make = 'Make' %>
        <% if @searched_to_send_request %>
            Next,
            <% make = 'make' %>
        <% end %>
        <% if @public_body.eir_only? %>
            <%= link_to make + " a new Environmental Information request", new_request_to_body_url(:public_body_id => @public_body.id.to_s)%>
        <% else %>
            <%= link_to make + " a new Freedom of Information request", new_request_to_body_url(:public_body_id => @public_body.id.to_s)%>
        <% end %>
        to <%= h(@public_body.name) %>
    <% 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 !@xapian_requests.nil? %>
    <% if @xapian_requests.results.empty? %>
        <% if @public_body.eir_only? %>

Environmental Information Regulations requests made

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

        <% else %>

Freedom of Information requests made

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

        <% end %>
    <% else %>

        <% if @public_body.eir_only? %>
            <%=pluralize(@public_body.info_requests.size, "Environmental Information Regulations request") %> made
        <% else %>
            <%=pluralize(@public_body.info_requests.size, "Freedom of Information request") %> made
        <% end %>
        <%= @page_desc %>

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

Only requests made using WhatDoTheyKnow.com are shown.

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


Fix for "flag after width" exception notifier fail

<% max = @request.env.keys.max { |a,b| a.length <=> b.length } -%>
<% @request.env.keys.sort.each do |key| -%>
* <%= "%-s: %s" % [max.length, key, @request.env[key].to_s.strip] %>
<% end -%>

* Process: <%= $$ %>
* Server : <%= `hostname -s`.chomp %>

<% max = @request.env.keys.max { |a,b| a.length <=> b.length } -%>
<% @request.env.keys.sort.each do |key| -%>
* <%= "%*-s: %s" % [max.length, key, @request.env[key].to_s.strip] %>
<% end -%>

* Process: <%= $$ %>
* Server : <%= `hostname -s`.chomp %>


make something look nicer for deploy

make something look nicer for deploy


Fixed inline RDF output to point to correct trackback link.

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

<a href="<%= url_for :controller=>"articles", :action=>"read", :id=>article.id%>" title="Permanent link to this article"><%= h article.title %>

Posted by <%= h article.author %> <%= distance_of_time_in_words_to_now article.created_at %> ago
<%= article.body_html %>


Use simple_format() to make text more readable, and wrap YAML in pre tags.

<% @title = "FOI request - " + h(@info_request.title) %>

<%=@title%>

<% for column in InfoRequest.content_columns %>
  <%= column.human_name %>: <%=h @info_request.send(column.name) %>

<% end %>
Created by: <%= user_both_links(@info_request.user) %>

Public authority: <%= public_body_both_links(@info_request.public_body) %>

Incoming email address: <%= link_to h(@info_request.incoming_email), "mailto:" + @info_request.incoming_email %>

    <%= link_to 'Public page', main_url(request_url(@info_request)) %>
    | <%= link_to 'Edit', '../edit/' + @info_request.id.to_s %>
    | <%= link_to 'FOI officer upload URL', '../generate_upload_url/' + @info_request.id.to_s %> (see also links on incoming messages below)

Events

  Id
  <% for column in InfoRequestEvent.content_columns %>
    <%= column.human_name %>
  <% end %>

<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h info_request_event.id %>
  <% for column in InfoRequestEvent.content_columns %>

      <% if column.name == 'params_yaml' %>

<%= info_request_event.params_yaml %>

      <% elsif column.text? %>
        <%=h (info_request_event.send(column.name) || '').gsub(/_/,' ') %>
      <% else %>
        <%=h info_request_event.send(column.name) %>
      <% end %>

  <% end %>

<% end %>

Outgoing messages

    Id
    <% for column in OutgoingMessage.content_columns %>
      <%= column.human_name %>
    <% end %>
    Actions

<% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h outgoing_message.id %>
  <% for column in OutgoingMessage.content_columns.map { |c| c.name } %>
    <%= simple_format( outgoing_message.send(column) ) %>
  <% end %>

  <% form_tag '../resend' do %>

          <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
          <%= submit_tag "Resend" %>

  <% end %>
  <%= link_to "Edit", '../edit_outgoing/' + outgoing_message.id.to_s %>

<% end %>

Incoming messages

  Id
  <% for column in IncomingMessage.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>">
  <%=h incoming_message.id %>
  <% for column in IncomingMessage.content_columns.map { |c| c.name } %>
    <%= simple_format( incoming_message.send(column) ) %>
  <% end %>

        <% if !incoming_message.raw_email_id.nil? %>

            <%= link_to "View raw email", "../show_raw_email/" + incoming_message.raw_email_id.to_s %>

        <% end %>
        <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

<% end %>

Annotations

  Id
  Posted by
  <% for column in Comment.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for comment in @info_request.comments %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h comment.id %>
  <%= user_both_links(comment.user) %>
  <% for column in Comment.content_columns.map { |c| c.name } %>
    <% if column == 'body' && !comment.visible %>
        <s><%=h comment.send(column) %></s>
    <% else %>
        <%=h comment.send(column) %>
    <% end %>
  <% end %>

      <%= link_to "Edit", '../edit_comment/' + comment.id.to_s %>

<% end %>

Exim delivery logs

Lines containing the request incoming email address, updated hourly.

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>

<% @title = "FOI request - " + h(@info_request.title) %>

<%=@title%>

<% for column in InfoRequest.content_columns %>
  <%= column.human_name %>: <%=h @info_request.send(column.name) %>

<% end %>
Created by: <%= user_both_links(@info_request.user) %>

Public authority: <%= public_body_both_links(@info_request.public_body) %>

Incoming email address: <%= link_to h(@info_request.incoming_email), "mailto:" + @info_request.incoming_email %>

    <%= link_to 'Public page', main_url(request_url(@info_request)) %>
    | <%= link_to 'Edit', '../edit/' + @info_request.id.to_s %>
    | <%= link_to 'FOI officer upload URL', '../generate_upload_url/' + @info_request.id.to_s %> (see also links on incoming messages below)

Events

  Id
  <% for column in InfoRequestEvent.content_columns %>
    <%= column.human_name %>
  <% end %>

<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h info_request_event.id %>
  <% for column in InfoRequestEvent.content_columns.map { |c| c.name } %>
    <%=h info_request_event.send(column) %>
  <% end %>

<% end %>

Outgoing messages

  Id
  <% for column in OutgoingMessage.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h outgoing_message.id %>
  <% for column in OutgoingMessage.content_columns.map { |c| c.name } %>
    <%=h outgoing_message.send(column) %>
  <% end %>

  <% form_tag '../resend' do %>

          <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
          <%= submit_tag "Resend" %>

  <% end %>
  <%= link_to "Edit", '../edit_outgoing/' + outgoing_message.id.to_s %>

<% end %>

Incoming messages

  Id
  <% for column in IncomingMessage.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>">
  <%=h incoming_message.id %>
  <% for column in IncomingMessage.content_columns.map { |c| c.name } %>
    <%=h incoming_message.send(column) %>
  <% end %>

        <% if !incoming_message.raw_email_id.nil? %>

            <%= link_to "View raw email", "../show_raw_email/" + incoming_message.raw_email_id.to_s %>

        <% end %>
        <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

<% end %>

Annotations

  Id
  Posted by
  <% for column in Comment.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for comment in @info_request.comments %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h comment.id %>
  <%= user_both_links(comment.user) %>
  <% for column in Comment.content_columns.map { |c| c.name } %>
    <% if column == 'body' && !comment.visible %>
        <s><%=h comment.send(column) %></s>
    <% else %>
        <%=h comment.send(column) %>
    <% end %>
  <% end %>

      <%= link_to "Edit", '../edit_comment/' + comment.id.to_s %>

<% end %>

Exim delivery logs

Lines containing the request incoming email address, updated hourly.

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>


We have search now.

We have search now.

Hello! This site really isn't nearly finished yet, but it
    works and so we wanted to start sharing it with you.
    Things still to do:

 Design the site - the current appearance is purely placeholder.

 RSS feeds and email alerts based on search terms.

 Add things you tell us you want.

As always, if you want mySociety to do more stuff like this, please
    volunteer,
    donate,
    or commission us!

Hello! This site really isn't nearly finished yet, but it
    works and so we wanted to start sharing it with you.
    Things still to do:

 Design the site - the current appearance is purely placeholder.

 Add search, plus RSS feeds and email alerts based on search terms.

 Add things you tell us you want.

As always, if you want mySociety to do more stuff like this, please
    volunteer,
    donate,
    or commission us!


Mark html for number of requests in categorisation game as html_safe

<% @title = _("Play the request categorisation game!") %>

        <img width=250 height=125 src="http://chart.apis.google.com/chart?chs=250x125&cht=gom&chd=t:<%=@percentage%>" alt="<%=@percentage%>% of requests have been categorised">

<%=pluralize(@missing, 'request')%> left to categorise / <%=@total %> total

Top recent players

    <% c = 0; for classifications in @league_table_28_days %>

             <%= c += 1 %>.
             <%= user_link(classifications.user) %>
             <%=pluralize(classifications.cnt, 'request').gsub(" ", " ").html_safe %>

    <% end %>

All time best players

    <% c = 0; for classifications in @league_table_all_time %>

             <%= c += 1 %>.
             <%= user_link(classifications.user) %>
             <%= pluralize(classifications.cnt, 'request').gsub(" ", " ").html_safe %>

    <% end %>

<%= _("Play the request categorisation game!")%>

<%= _("Some people who've made requests haven't let us know whether they were
successful or not.  We need your help –
choose one of these requests, read it, and let everyone know whether or not the
information has been provided. Everyone'll be exceedingly grateful.")%>

<% for info_request in @requests %>
    <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %>
<% end %>

<%= button_to _('I don\'t like these ones — give me some more!'), play_url %>
<%= button_to _('I don\'t want to do any more tidying now!'), stop_url %>

<%= _('Thanks for helping - your work will make it easier for everyone to find successful
responses, and maybe even let us make league tables...')%>

<% @title = _("Play the request categorisation game!") %>

        <img width=250 height=125 src="http://chart.apis.google.com/chart?chs=250x125&cht=gom&chd=t:<%=@percentage%>" alt="<%=@percentage%>% of requests have been categorised">

<%=pluralize(@missing, 'request')%> left to categorise / <%=@total %> total

Top recent players

    <% c = 0; for classifications in @league_table_28_days %>

             <%= c += 1 %>.
             <%= user_link(classifications.user) %>
             <%=pluralize(classifications.cnt, 'request').gsub(" ", " ")%>

    <% end %>

All time best players

    <% c = 0; for classifications in @league_table_all_time %>

             <%= c += 1 %>.
             <%= user_link(classifications.user) %>
             <%= pluralize(classifications.cnt, 'request').gsub(" ", " ")%>

    <% end %>

<%= _("Play the request categorisation game!")%>

<%= _("Some people who've made requests haven't let us know whether they were
successful or not.  We need your help –
choose one of these requests, read it, and let everyone know whether or not the
information has been provided. Everyone'll be exceedingly grateful.")%>

<% for info_request in @requests %>
    <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %>
<% end %>

<%= button_to _('I don\'t like these ones — give me some more!'), play_url %>
<%= button_to _('I don\'t want to do any more tidying now!'), stop_url %>

<%= _('Thanks for helping - your work will make it easier for everyone to find successful
responses, and maybe even let us make league tables...')%>


updating the scenario dropdown for the nature models

git-svn-id: b6390d97d9ded5bc793696aad9e4256efc0f90b3@501 561dde7e-7729-0410-be8e-ef83869d6c7d

<%

scenarios = [
  ["user management", url_for(:controller => '/users')],
  ["habtm", url_for(:controller => 'nature/lakes')],
  ["has_many", url_for(:controller => 'nature/parks')],
  ["belongs_to", url_for(:controller => 'nature/dens')],
  ["has_one", url_for(:controller => 'nature/bears')],
  ["join model", url_for(:controller => 'nature/dens')],
  ["polymorphic", url_for(:controller => 'nature/tracking_devices')],
  ["security", url_for(:controller => '/secured_records')]
]

controllers = Dir['app/controllers/**/*_controller.rb'].collect {|c| c.sub('app/controllers', '').sub('_controller.rb', '')}
controllers.delete('demo')

%>

  Go to demo:
  <select onchange="window.location = this.value">
    <option>Scenario:</option>
    <%= options_for_select scenarios %>
  </select>

  <select onchange="window.location = this.value">
    <option>Scaffold:</option>
    <%= options_for_select controllers.sort.collect {|c| [File.basename(c), c]} %>
  </select>

<%

scenarios = [
  ["user management", url_for(:controller => '/users')],
  ["habtm", url_for(:controller => '/permissions')],
  ["has_many", url_for(:controller => 'nature/parks')],
  ["belongs_to", url_for(:controller => 'nature/dens')],
  ["has_one", url_for(:controller => 'nature/bears')],
  ["join model", url_for(:controller => 'nature/lakes')],
  ["polymorphic", url_for(:controller => '/addresses')],
  ["security", url_for(:controller => '/secured_records')]
]

controllers = Dir['app/controllers/**/*_controller.rb'].collect {|c| c.sub('app/controllers', '').sub('_controller.rb', '')}
controllers.delete('demo')

%>

  Go to demo:
  <select onchange="window.location = this.value">
    <option>Scenario:</option>
    <%= options_for_select scenarios %>
  </select>

  <select onchange="window.location = this.value">
    <option>Scaffold:</option>
    <%= options_for_select controllers.sort.collect {|c| [File.basename(c), c]} %>
  </select>


Don't initialize invite user auto-complete unless it exists in the Room view

<%= @room.name %>

<%= link_to _('Leave Room'),  :action => 'leave', :id => @room.id %>

<% last = nil %>
<% @room.shouts.find(:all, :conditions => ["created_at > ?", tz.now.utc.midnight], :order => "created_at desc", :limit => ((@room.company_id.to_i > 0) ? 50 : 20)).reverse.each do |@shout| %>
  <%= render :partial => 'shout', :locals => {:last => last} %>
  <% last = @shout %>
<% end %>

<%= @room.description if @room.description %>

<%= _('Participants') %>

           <% @room.subscribers.each do |u| %>
             <% if u.online? %>
             <div id="channel-user-<%= u.id %>"><%= "#{u.online_status_name}" %>

             <% end %>
           <% end %>

         <% if @invite_targets.size > 0 %>

         <%= link_to_function _('Invite a user'), "Element.toggle('channel-invite');$('channel-invite-user').focus();" %>

           <%= form_remote_tag :url => { :action => 'invite_ajax', :id => @room.id } ,
           :loading => "Element.show('loading');",
           :complete => "Element.hide('loading');$('channel-invite-user').clear();$('channel-invite-user').focus();"
           %>
           <input type="text" name="invite_user" id="channel-invite-user"/>

           </form>

         <% end %>

<%= form_remote_tag :url => { :action => 'chat_ajax', :id => @room.id } ,
       :loading => "Element.show('loading');",
       :complete => "Element.hide('loading');$('shout_body').clear();$('shout_body').focus();",
       :html => { :id => "shout-input" }
%>

<textarea name="shout[body]" id="shout_body" style="width:100%" rows="2"></textarea>

<input type="submit" name="Send" value="Send" style="vertical-align:top;margin-left:5px;margin-top:1px;">

<%= link_to _('Leave room'),  :action => 'leave', :id => @room.id %>
<%= link_to _('Change room'),  :action => 'list' %>

</form>


Using short_name on the edit page.

Using short_name on the edit page.

<% if is_confirmed_member_of_team(session[:person].id, @team.id) %>

  <% @heading=@task.short_name; %>
  <% @h1class='task' %>

  <% @breadcrumbs = link_to_team(@team, 'breadcrumb') + " > " + link_to_list(@list, 'breadcrumb') + " > " + link_to_task(@task, 'breadcrumb') %>

  <% form_tag(:action => 'update', :id => @task) do %>

    <% @editmode = true %>
    <%= render :partial => 'form' %>

      <%= submit_tag 'Save task' %>

  <% end %>

<% else %>

  <%= access_denied() %>

<% end %>

<% if is_confirmed_member_of_team(session[:person].id, @team.id) %>

	<% @heading=@task.name; %>
	<% @h1class='task' %>

	<% @breadcrumbs = link_to_team(@team, 'breadcrumb') + " > " + link_to_list(@list, 'breadcrumb') + " > " + link_to_task(@task, 'breadcrumb') %>

	<% form_tag(:action => 'update', :id => @task) do %>

	   <% @editmode = true %>
		<%= render :partial => 'form' %>

		<%= submit_tag 'Save task' %>

<% end %>

<% else %>

	<%= access_denied() %>

<% end %>


Ugliest hack to hardcode launch day posts

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

<%= _("Cuenta atrás por la transparencia en España") %>

<%= _("Quedan  días para que el PP cumpla su promesa de presentar una ley de acceso a la información") %>

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <%
                  # XXX: The ugliest hack, for launch day only
                  leads = [
                    'Los políticos la han prometido desde 2004, pero España sigue aún sin ley de transparencia.',
                    'Ya estamos en marcha. Entra con nosotros en el fascinante mundo de pedir información que es tuya.'
                  ];

                  position = 0;
                  for item in @blog_items[0..3]:
                    position = position + 1; %>
                  <div class="frontpage-blog-post <%= position.even? ? 'right' : 'left' %>">
                    <img src="/tuderechoasaber-theme/images/posts/<%= item['title'].to_s.gsub(/[^A-Za-z]/,'').downcase %>.jpg" width="278"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(leads[position-1], "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                <% end %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

<%= _("Cuenta atrás por la transparencia en España") %>

<%= _("Quedan  días para que el PP cumpla su promesa de presentar una ley de acceso a la información") %>

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <%
                  position = 1;
                  for item in @blog_items[0..3].reverse:
                    position = position + 1; %>
                  <div class="frontpage-blog-post <%= position.even? ? 'right' : 'left' %>">
                    <img src="/tuderechoasaber-theme/images/posts/<%= item['title'].to_s.gsub(/[^A-Za-z]/,'').downcase %>.jpg" width="278"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(item['description'].to_s, "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>