Show megabytes for large files.

Show megabytes for large files.

        <%  if not attachments.nil? and attachments.size > 0 %>

                <% attachments.each do |a| %>

                        <% attachment_url = get_attachment_url(:id => incoming_message.info_request_id,
                                :incoming_message_id => incoming_message.id, :part => a.url_part_number, :file_name => a.display_filename) %>
                        <% img_filename = "icon_" + a.content_type.sub('/', '_') + "_large.png"
                        full_filename = File.join(File.dirname(__FILE__), "../../../public/images", img_filename)
                        if File.exist?(full_filename) %>
                            <a href="<%=attachment_url%>"><img class="attachment_image" alt="Attachment" src="/images/<%=img_filename%>">
                        <% else %>
                            <a href="<%=attachment_url%>">
                        <% end %>
                        <%= h a.display_filename %>

                        <%= (a.body.size > 1024 * 1024) ? ((a.body.size / 1024 / 1024).to_s + 'M') : ((a.body.size / 1024).to_s + 'K') %>
                        <%= link_to "Download", attachment_url %>

                <% end %>

        <% end %>

<%= body %>

        <%  if not attachments.nil? and attachments.size > 0 %>

                <% attachments.each do |a| %>

                        <% attachment_url = get_attachment_url(:id => incoming_message.info_request_id,
                                :incoming_message_id => incoming_message.id, :part => a.url_part_number, :file_name => a.display_filename) %>
                        <% img_filename = "icon_" + a.content_type.sub('/', '_') + "_large.png"
                        full_filename = File.join(File.dirname(__FILE__), "../../../public/images", img_filename)
                        if File.exist?(full_filename) %>
                            <a href="<%=attachment_url%>"><img class="attachment_image" alt="Attachment" src="/images/<%=img_filename%>">
                        <% else %>
                            <a href="<%=attachment_url%>">
                        <% end %>
                        <%= h a.display_filename %>

                        <%= a.body.size / 1024 %>K
                        <%= link_to "Download", attachment_url %>

                <% end %>

        <% end %>

<%= body %>


Check for override by method on column before assuming we are going to display a sub_form

  <% columns.each do |column| -%>
  <% if is_subsection? column -%>

<%= column.label %>

    <%= render :partial => 'form', :locals => { :columns => column } %>

  <% elsif is_subform? column and !override_form_field?(column) -%>

    <%= render :partial => form_partial_for_column(column), :locals => { :column => column } -%>

  <% else -%>
  <li class="form-element <%= 'required' if column.required? %>">
    <%= render :partial => form_partial_for_column(column), :locals => { :column => column } -%>

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

  <% columns.each do |column| -%>
  <% if is_subsection? column -%>

<%= column.label %>

    <%= render :partial => 'form', :locals => { :columns => column } %>

  <% elsif is_subform? column -%>

    <%= render :partial => form_partial_for_column(column), :locals => { :column => column } -%>

  <% else -%>
  <li class="form-element <%= 'required' if column.required? %>">
    <%= render :partial => form_partial_for_column(column), :locals => { :column => column } -%>

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


Fixed wrong icon for adding result

Fixed wrong icon for adding result

Race: <%= race.name %>

		<th colspan="<%= race.result_columns_or_default.size + 2 %>">

		<td colspan="<%= race.result_columns_or_default.size + 2 %>">
			<%= start_form_tag :action => 'update', :id => race.standings.event.id, :standings_id => race.standings.id, :race_id => race.id %>

					BAR Points:
					<%= select 'race', 'bar_points', bar_points_and_labels %>
					Notes:
					<%= text_field 'race', 'notes' %>

					BAR Category:
					<%= race.category.parent %>
					Field Size:
					<%= text_field 'race', 'field_size' %> (<%= race.results.size %>)

					<%= submit_tag "Save" %>

			<%= end_form_tag %>

		<% for column in race.result_columns_or_default %>
		<%= column %>
		<% end %>

	<%= start_form_tag %>
	<% for result in race.results.sort %>
	<tr id="result_<%= result.id %>_row">
		<%= link_to 'Edit', :controller => 'results', :action => 'edit', :id => result.to_param %>
		<% for column in race.result_columns_or_default %>
		<%= result.send(column.to_sym) if result.respond_to?(column.to_sym) %>
		<% end %>

  		<%= link_to_remote image_tag('/images/buttons/add.gif', :height => 22, :width => 22, :border => 0),
  		:url => {:action => "insert_result", :id => result.id},
  		:complete => evaluate_remote_response
			%><%= link_to_remote image_tag('/images/buttons/remove.gif', :height => 22, :width => 22, :border => 0),
			:url => {:action => "destroy_result", :id => result.id},
			:complete => evaluate_remote_response
			%>
			<span id="message_<%= result.id %>" >

	<% end %>

		<% for column in race.result_columns_or_default %>
		<%= column %>
		<% end %>

	<%= end_form_tag %>
	<%= form_tag({:controller => 'results', :action => 'create', :id => race.to_param}) %>

		New:
		<% for column in race.result_columns_or_default %>
		<%= text_field 'result', column, :size => grid_columns(column).size * 0.6, :autocomplete => 'off' %>
		<% end %>

		<td colspan="<%= race.result_columns_or_default.size + 2 %>" align="right">
			<%= submit_tag "Add New Result" %>

	<%= end_form_tag %>

Race: <%= race.name %>

		<th colspan="<%= race.result_columns_or_default.size + 2 %>">

		<td colspan="<%= race.result_columns_or_default.size + 2 %>">
			<%= start_form_tag :action => 'update', :id => race.standings.event.id, :standings_id => race.standings.id, :race_id => race.id %>

					BAR Points:
					<%= select 'race', 'bar_points', bar_points_and_labels %>
					Notes:
					<%= text_field 'race', 'notes' %>

					BAR Category:
					<%= race.category.parent %>
					Field Size:
					<%= text_field 'race', 'field_size' %> (<%= race.results.size %>)

					<%= submit_tag "Save" %>

			<%= end_form_tag %>

		<% for column in race.result_columns_or_default %>
		<%= column %>
		<% end %>

	<%= start_form_tag %>
	<% for result in race.results.sort %>
	<tr id="result_<%= result.id %>_row">
		<%= link_to 'Edit', :controller => 'results', :action => 'edit', :id => result.to_param %>
		<% for column in race.result_columns_or_default %>
		<%= result.send(column.to_sym) if result.respond_to?(column.to_sym) %>
		<% end %>

			<%= link_to_remote image_tag('buttons/remove_solo.gif', :height => 22, :width => 22, :border => 0),
			:url => {:action => "destroy_result", :id => result.id},
			:complete => evaluate_remote_response
			%><%= link_to_remote image_tag('/images/buttons/remove.gif', :height => 22, :width => 22, :border => 0),
			:url => {:action => "destroy_result", :id => result.id},
			:complete => evaluate_remote_response
			%>
			<span id="message_<%= result.id %>" >

	<% end %>

		<% for column in race.result_columns_or_default %>
		<%= column %>
		<% end %>

	<%= end_form_tag %>
	<%= form_tag({:controller => 'results', :action => 'create', :id => race.to_param}) %>

		New:
		<% for column in race.result_columns_or_default %>
		<%= text_field 'result', column, :size => grid_columns(column).size * 0.6, :autocomplete => 'off' %>
		<% end %>

		<td colspan="<%= race.result_columns_or_default.size + 2 %>" align="right">
			<%= submit_tag "Add New Result" %>

	<%= end_form_tag %>


for items which don't actually have a geometry, just zoomToMaxExtent.

<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>

Loading...


"Access to" is jargony

"Access to" is jargony

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

<% if @existing_request %>

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

<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

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

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

Use a search engine first to check that the information isn't already published.

Write your request in simple, precise language.
		<% if @info_request.public_body.info_requests.size > 0 %>

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

		<% else %>

Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.

		<% end %>

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

Top tip: Ask for a particular document you have seen mentioned elsewhere.

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

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

Please ask for environmental information only

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

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

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

Human health and safety

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

Plans and administrative measures that affect these matters

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

        <% end %>

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

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

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

		<% fields_for :outgoing_message do |o| %>

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

		<% end %>

			Privacy warning: All information that you enter, except
			for your email address, will be displayed publically on this website. Any
			response you get will also be published.

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

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

<% end %>

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

<% if @existing_request %>

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

<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

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

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

Use a search engine first to check that the information isn't already published.

Write your request in simple, precise language.
		<% if @info_request.public_body.info_requests.size > 0 %>

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

		<% else %>

Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.

		<% end %>

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

Top tip: Ask for a particular document you have seen mentioned elsewhere.

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

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

Please ask for environmental information only

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

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

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

Human health and safety

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

Plans and administrative measures that affect these matters

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

        <% end %>

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

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

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

		<% fields_for :outgoing_message do |o| %>

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

		<% end %>

			Privacy warning: All information that you enter, except
			for your email address, will be displayed publically on this website. Any
			response you get will also be published.

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

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

<% end %>


Updated form.rhtml with another type. SELECTOR

<% @form_fields.each do |field| %>

<%= field[0].humanize %> <%= error_message_on :item, field[0] %>
	<% case field[1] when "string" %>
		<%= text_field :item, field[0], :class => "big" %>
	<% when "text" %>
		<%= text_area :item, field[0], :rows => "#{field[2]}" %>
	<% when "datetime" %>
		<%= datetime_select :item, field[0] %>
	<% when "password" %>
		<%= password_field :item, field[0], :class => "big" %>
	<% when "boolean" %>
		<%= check_box :item, field[0] %> Checked if active.
	<% when "file" %>
		<%= file_field :item, field[0], :style => "border: 0px;" %>
	<% when "tags" %>
		<%= text_field :item, field[0], :value => @item.tags.join(", "), :class => "big" %>
	<% when "selector" %>
		<% @values = eval field[2] %>
		<%= select :item, field[0], @values.collect { |p| [ p[0], p[1] ] } %>
	<% when "collection" %>
		<% @collection = eval field[0].singularize.capitalize %>
		<%= collection_select :item, "#{field[0]}_id", @collection.find(:all), :id, :name %>
	<% else %>

....
	<% end %>

<% end %>

<% @form_fields.each do |field| %>

<%= field[0].humanize %> <%= error_message_on :item, field[0] %>
	<% case field[1] when "string" %>
		<%= text_field :item, field[0], :class => "big" %>
	<% when "text" %>
		<%= text_area :item, field[0], :rows => "#{field[2]}" %>
	<% when "datetime" %>
		<%= datetime_select :item, field[0] %>
	<% when "password" %>
		<%= password_field :item, field[0], :class => "big" %>
	<% when "boolean" %>
		<%= check_box :item, field[0] %> Checked if active.
	<% when "file" %>
		<%= file_field :item, field[0], :style => "border: 0px;" %>
	<% when"tags" %>
		<%= text_field :item, field[0], :value => @item.tags.join(", "), :class => "big" %>
	<% when "collection" %>
		<% @collection = eval field[0].singularize.capitalize %>
		<%= collection_select :item, "#{field[0]}_id", @collection.find(:all), :id, :name %>
	<% else %>

....
	<% end %>

<% end %>


List user-reported requests for admins

List user-reported requests for admins

<% @title = "Summary" %>

Things to do

  <% if @holding_pen_messages.size > 0 %>

        <%=@holding_pen_messages.size%> Put misdelivered responses with the right request

            <% for message in @holding_pen_messages %>

                  <% if message.get_body_for_quoting.strip.size == 0 %>
                      <%= link_to "(no body)", "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% else %>
                      <%= link_to excerpt(message.get_body_for_quoting, "", 60), "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% end %>

                  <%=simple_date(message.sent_at)%>

            <% end %>

  <% end %>

  <% if @error_message_requests.size > 0 %>

        <%=@error_message_requests.size%> Fix these delivery and other errors

            <% for @request in @error_message_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @attention_requests.size > 0 %>

        <%=@attention_requests.size%> Review requests marked by users as requiring your attention

            <% for @request in @attention_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @requires_admin_requests.size > 0 %>

        <%=@requires_admin_requests.size%> These require administrator attention

            <% for @request in @requires_admin_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @blank_contacts.size > 0 %>

        <%=@blank_contacts.size%> Find missing FOI email for these public authorities (try phoning!)

            <% for @blank_contact in @blank_contacts %>

                  <%= link_to(''.html_safe, public_body_admin_url(@blank_contact))%>
                  <%= public_body_link(@blank_contact)%>

                  <%=simple_date(@blank_contact.updated_at)%>

            <% end %>

  <% end %>

  <% if @old_unclassified.size > 0 %>

        <%=@old_unclassified.size%> Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response

            <% for @request in @old_unclassified %>

                    <%= link_to("".html_safe, request_admin_url(@request)) %>
                    <%= request_link(@request) %>

                    <%=simple_date(@request.get_last_response_event.created_at)%>

            <% end %>

  <% end %>

<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %>

      No pending administration required.

<% end %>

<% @title = "Summary" %>

Things to do

  <% if @holding_pen_messages.size > 0 %>

        <%=@holding_pen_messages.size%> Put misdelivered responses with the right request

            <% for message in @holding_pen_messages %>

                  <% if message.get_body_for_quoting.strip.size == 0 %>
                      <%= link_to "(no body)", "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% else %>
                      <%= link_to excerpt(message.get_body_for_quoting, "", 60), "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% end %>

                  <%=simple_date(message.sent_at)%>

            <% end %>

  <% end %>

  <% if @error_message_requests.size > 0 %>

        <%=@error_message_requests.size%> Fix these delivery and other errors

            <% for @request in @error_message_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @requires_admin_requests.size > 0 %>

        <%=@requires_admin_requests.size%> These require administrator attention

            <% for @request in @requires_admin_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @blank_contacts.size > 0 %>

        <%=@blank_contacts.size%> Find missing FOI email for these public authorities (try phoning!)

            <% for @blank_contact in @blank_contacts %>

                  <%= link_to(''.html_safe, public_body_admin_url(@blank_contact))%>
                  <%= public_body_link(@blank_contact)%>

                  <%=simple_date(@blank_contact.updated_at)%>

            <% end %>

  <% end %>

  <% if @old_unclassified.size > 0 %>

        <%=@old_unclassified.size%> Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response

            <% for @request in @old_unclassified %>

                    <%= link_to("".html_safe, request_admin_url(@request)) %>
                    <%= request_link(@request) %>

                    <%=simple_date(@request.get_last_response_event.created_at)%>

            <% end %>

  <% end %>

<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %>

      No pending administration required.

<% end %>


Adjust CSS for videos (iframes) in frontpage, in case needed

/** FONTS **/
@font-face {
    font-family: GothamRounded;
    src: url('/asktheeu-theme/fonts/GothamRnd-Medium.otf') format("opentype");
}

@font-face {
    font-family: GothamRoundedBold;
    src: url('/asktheeu-theme/fonts/GothamRnd-Bold.otf') format("opentype");
}

/** LAYOUT **/
body {
    font-family: Verdana, Helvetica, Arial;
}
    body.front {
        background: none;
    }

#wrapper {
    padding-top: 10px;
    margin-bottom: 50px;
}

/** HEADER **/
#banner {
    background: #EAF5F6;
    border: none;
    height: 150px;
    position: relative;
}

#banner_inner {
    width: 950px;
    height: 150px;
}
    #banner_inner a:hover {
        text-decoration: underline;
    }

#logo {
    position: absolute;
    top: 20px;
}

#navigation_search {
    top: 50px;
    visibility: hidden;
}

div.lang {
    top: 23px;
    color: #00aaa6;
    font-size: 12px;
}
    div.lang a {
        color: #00aaa6;
        text-decoration: none;
    }

#logged_in_bar {
    top: 24px;
    font-weight: bold;
    font-size: 12px;
    padding: 3px 8px 1px 8px;
    height: 19px;
    background: #009a9d;
    border-radius: 5px;
}
    #logged_in_bar, #logged_in_bar a, #logged_in_bar a:visited {
        color: #FFF;
        text-decoration: none;
    }

/** NAVIGATION BAR **/
#topnav {
    font-family: Helvetica, Arial;
    font-size: 14px;
    font-weight: bold;
    margin-left: 190px;
}
    #topnav ul li {
        padding-left: 8px;
        padding-right: 8px;
        margin-right: 8px;

        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
    }
    #topnav ul li a {
        color: #00aaa6 !important;
    }

/** MAIN SITE **/
h1, h1 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #009a9d;
    font-size: 28px;
    margin-top: 30px;
    text-decoration: none;
}

h2, h2 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #7bbb58;
    font-size: 18px;
}

h3, h3 a {
    font-family: Helvetica, Arial;
    color: #00aaa6;
    font-size: 14px;
    font-weight: bold;
}

/** HELP **/
#left_column_flip {
    margin-top: 20px;
    width: 550px;
    margin-right: 50px;
}

#right_column_flip {
    text-align: right;
}

.controller_help {
    font-size: 12px;
    line-height: 1.5;
    text-align: justify;
}
    .controller_help a {
        color: #009a9d;
        text-decoration: none;
    }
    .controller_help a:hover {
        text-decoration: underline;
    }

.XXX {  /* TODO stuff */
    color: red;
    font-weight: bold;
    background-color: yellow;
}

/** FRONTPAGE **/
.front #wrapper, .front #content {
    width: 100%;
    padding: 0px;
    margin: 0px;
}

#frontpage-intro {
    width: 950px;
    margin: auto;
    position: relative;
}

#frontpage-lead {
    font-family: GothamRounded, Helvetica, Arial;
    font-size: 24px;
    font-weight: normal;
    text-align: center;
    color: #73c167;
}

#frontpage-left-balloon {
    float: left;
    width: 206px;
    height: 184px;
    background: url(/asktheeu-theme/images/yellow_balloon.gif);
    padding: 10px 20px 20px 50px;
    margin: 36px 8px 60px 0px;
}
    #frontpage-left-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-middle-balloon {
    float: left;
    width: 314px;
    height: 283px;
    background: url(/asktheeu-theme/images/blue_balloon.gif);
    padding: 0px 30px 0px 30px;
}
    #frontpage-middle-balloon h1 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 42px;
        color: #fff;
        text-align: center;
        padding-right: 20px;
        margin-bottom: 5px;
    }
    #frontpage-middle-balloon p {
        margin-left: 15px;
    }
    #frontpage-middle-balloon .frontpage-button-link {
        margin-left: 95px;
    }

#frontpage-right-balloon {
    float: left;
    width: 218px;
    height: 174px;
    background: url(/asktheeu-theme/images/green_balloon.gif);
    padding: 5px 20px 20px 50px;
    margin: 41px 0px 60px 4px;
}
    #frontpage-right-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-left-balloon p,
#frontpage-right-balloon p,
#frontpage-middle-balloon p {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-top: 0px;
}

#frontpage-intro a {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}
    #frontpage-intro a:hover {
        text-decoration: underline;
    }

.frontpage-button-link {
    height: 24px;
    width: 100px;
    background: url(/asktheeu-theme/images/button_gradient.gif);
    border-radius: 5px;
    text-align: center;
    padding-top: 3px;
    padding-bottom: 3px;
}

#frontpage-content {
    background: #EAF5F6;
    border-top: 1px solid #b2dcde;
}

#frontpage-inner-content {
    width: 950px;
    margin: auto;
    position: relative;
    padding-bottom: 20px;
}

#left-column {
    float: left;
    background: #EAF5F6;
    width: 450px;
}

#right-column {
    float: right;
    width: 450px;
}

#frontpage-content p {
    color: #6f6f6e;
    font-size: 12px;
    line-height: 1.5;
}

#frontpage-content p a {
    color: #009a9d;
    font-size: 12px;
    text-decoration: none;
}
    #frontpage-content a:hover {
        text-decoration: underline;
    }

.picture-frame {
    width: 450px;
    height: 270px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
}
    .picture-frame img,
    .picture-frame iframe {
        width: 420px;
        height: 240px;
        margin: 15px;
    }

#follow-us-frame {
    width: 390px;
    height: 60px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
    margin-top: 50px;
    padding: 20px 30px 20px 30px;
}
    #follow-us-frame p {
        float: left;
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 18px;
        color: #009a9d;
    }
    #follow-us-frame span {
        float: left;
        margin-top: 12px;
        margin-left: 20px;
    }

.link-arrow {
    background: no-repeat url(/asktheeu-theme/images/arrow_icon.gif) ;
    padding-top: 6px;
    padding-left: 35px;
    height: 30px;
}
    .link-arrow a {
        font-family: Helvetica, Arial;
        color: #00aaa6;
        font-size: 14px;
        font-weight: bold;
        text-decoration: none;
    }

/** MODAL SIGN-IN **/

#signin-successful,
#signin-successful a {
    font-family: Helvetica, Arial;
    color: #00aaa6;
    font-size: 14px;
    font-weight: bold;
    padding-top: 50px;
}

/** FOOTER **/
#footer {
    height: 100px;
    margin: 0px;
    border-top-width: 1px;
}

#footer-inner {
    width: 950px;
    margin: auto;
    position: relative;
}

#access-info-logo {
    position: absolute;
    left: 0px;
    top: 10px;
}

#footer-links {
    margin-left: 150px;
    margin-top: 10px;
    float: left;

    font-family: GothamRounded, Helvetica, Arial;
    font-size: 18px;
}
    #footer-links ul {
        list-style: none outside none;
    }
    #footer-links ul li {
        float: left;
        margin-right: 40px;
    }
    #footer-links ul a {
        text-decoration: none;
        color: #009a9d;
    }
    #footer-links ul a:hover {
        text-decoration: underline;
    }

#credits {
    float: right;
    margin-top: 30px;
    margin-right: 20px;

    font-family: Verdana, Helvetica, Arial;
    font-size: 12px;
}
    #credits a {
        text-decoration: none;
        color: #00aaa6;
    }

#creative-commons-logo {
    float: right;
    margin-top: 20px;
}

/** FONTS **/
@font-face {
    font-family: GothamRounded;
    src: url('/asktheeu-theme/fonts/GothamRnd-Medium.otf') format("opentype");
}

@font-face {
    font-family: GothamRoundedBold;
    src: url('/asktheeu-theme/fonts/GothamRnd-Bold.otf') format("opentype");
}

/** LAYOUT **/
body {
    font-family: Verdana, Helvetica, Arial;
}
    body.front {
        background: none;
    }

#wrapper {
    padding-top: 10px;
    margin-bottom: 50px;
}

/** HEADER **/
#banner {
    background: #EAF5F6;
    border: none;
    height: 150px;
    position: relative;
}

#banner_inner {
    width: 950px;
    height: 150px;
}
    #banner_inner a:hover {
        text-decoration: underline;
    }

#logo {
    position: absolute;
    top: 20px;
}

#navigation_search {
    top: 50px;
    visibility: hidden;
}

div.lang {
    top: 23px;
    color: #00aaa6;
    font-size: 12px;
}
    div.lang a {
        color: #00aaa6;
        text-decoration: none;
    }

#logged_in_bar {
    top: 24px;
    font-weight: bold;
    font-size: 12px;
    padding: 3px 8px 1px 8px;
    height: 19px;
    background: #009a9d;
    border-radius: 5px;
}
    #logged_in_bar, #logged_in_bar a, #logged_in_bar a:visited {
        color: #FFF;
        text-decoration: none;
    }

/** NAVIGATION BAR **/
#topnav {
    font-family: Helvetica, Arial;
    font-size: 14px;
    font-weight: bold;
    margin-left: 190px;
}
    #topnav ul li {
        padding-left: 8px;
        padding-right: 8px;
        margin-right: 8px;

        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
    }
    #topnav ul li a {
        color: #00aaa6 !important;
    }

/** MAIN SITE **/
h1, h1 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #009a9d;
    font-size: 28px;
    margin-top: 30px;
    text-decoration: none;
}

h2, h2 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #7bbb58;
    font-size: 18px;
}

h3, h3 a {
    font-family: Helvetica, Arial;
    color: #00aaa6;
    font-size: 14px;
    font-weight: bold;
}

/** HELP **/
#left_column_flip {
    margin-top: 20px;
    width: 550px;
    margin-right: 50px;
}

#right_column_flip {
    text-align: right;
}

.controller_help {
    font-size: 12px;
    line-height: 1.5;
    text-align: justify;
}
    .controller_help a {
        color: #009a9d;
        text-decoration: none;
    }
    .controller_help a:hover {
        text-decoration: underline;
    }

.XXX {  /* TODO stuff */
    color: red;
    font-weight: bold;
    background-color: yellow;
}

/** FRONTPAGE **/
.front #wrapper, .front #content {
    width: 100%;
    padding: 0px;
    margin: 0px;
}

#frontpage-intro {
    width: 950px;
    margin: auto;
    position: relative;
}

#frontpage-lead {
    font-family: GothamRounded, Helvetica, Arial;
    font-size: 24px;
    font-weight: normal;
    text-align: center;
    color: #73c167;
}

#frontpage-left-balloon {
    float: left;
    width: 206px;
    height: 184px;
    background: url(/asktheeu-theme/images/yellow_balloon.gif);
    padding: 10px 20px 20px 50px;
    margin: 36px 8px 60px 0px;
}
    #frontpage-left-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-middle-balloon {
    float: left;
    width: 314px;
    height: 283px;
    background: url(/asktheeu-theme/images/blue_balloon.gif);
    padding: 0px 30px 0px 30px;
}
    #frontpage-middle-balloon h1 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 42px;
        color: #fff;
        text-align: center;
        padding-right: 20px;
        margin-bottom: 5px;
    }
    #frontpage-middle-balloon p {
        margin-left: 15px;
    }
    #frontpage-middle-balloon .frontpage-button-link {
        margin-left: 95px;
    }

#frontpage-right-balloon {
    float: left;
    width: 218px;
    height: 174px;
    background: url(/asktheeu-theme/images/green_balloon.gif);
    padding: 5px 20px 20px 50px;
    margin: 41px 0px 60px 4px;
}
    #frontpage-right-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-left-balloon p,
#frontpage-right-balloon p,
#frontpage-middle-balloon p {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-top: 0px;
}

#frontpage-intro a {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}
    #frontpage-intro a:hover {
        text-decoration: underline;
    }

.frontpage-button-link {
    height: 24px;
    width: 100px;
    background: url(/asktheeu-theme/images/button_gradient.gif);
    border-radius: 5px;
    text-align: center;
    padding-top: 3px;
    padding-bottom: 3px;
}

#frontpage-content {
    background: #EAF5F6;
    border-top: 1px solid #b2dcde;
}

#frontpage-inner-content {
    width: 950px;
    margin: auto;
    position: relative;
    padding-bottom: 20px;
}

#left-column {
    float: left;
    background: #EAF5F6;
    width: 450px;
}

#right-column {
    float: right;
    width: 450px;
}

#frontpage-content p {
    color: #6f6f6e;
    font-size: 12px;
    line-height: 1.5;
}

#frontpage-content p a {
    color: #009a9d;
    font-size: 12px;
    text-decoration: none;
}
    #frontpage-content a:hover {
        text-decoration: underline;
    }

.picture-frame {
    width: 450px;
    height: 270px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
}
    .picture-frame img {
        width: 420px;
        height: 240px;
        margin: 15px;
    }

#follow-us-frame {
    width: 390px;
    height: 60px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
    margin-top: 50px;
    padding: 20px 30px 20px 30px;
}
    #follow-us-frame p {
        float: left;
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 18px;
        color: #009a9d;
    }
    #follow-us-frame span {
        float: left;
        margin-top: 12px;
        margin-left: 20px;
    }

.link-arrow {
    background: no-repeat url(/asktheeu-theme/images/arrow_icon.gif) ;
    padding-top: 6px;
    padding-left: 35px;
    height: 30px;
}
    .link-arrow a {
        font-family: Helvetica, Arial;
        color: #00aaa6;
        font-size: 14px;
        font-weight: bold;
        text-decoration: none;
    }

/** MODAL SIGN-IN **/

#signin-successful,
#signin-successful a {
    font-family: Helvetica, Arial;
    color: #00aaa6;
    font-size: 14px;
    font-weight: bold;
    padding-top: 50px;
}

/** FOOTER **/
#footer {
    height: 100px;
    margin: 0px;
    border-top-width: 1px;
}

#footer-inner {
    width: 950px;
    margin: auto;
    position: relative;
}

#access-info-logo {
    position: absolute;
    left: 0px;
    top: 10px;
}

#footer-links {
    margin-left: 150px;
    margin-top: 10px;
    float: left;

    font-family: GothamRounded, Helvetica, Arial;
    font-size: 18px;
}
    #footer-links ul {
        list-style: none outside none;
    }
    #footer-links ul li {
        float: left;
        margin-right: 40px;
    }
    #footer-links ul a {
        text-decoration: none;
        color: #009a9d;
    }
    #footer-links ul a:hover {
        text-decoration: underline;
    }

#credits {
    float: right;
    margin-top: 30px;
    margin-right: 20px;

    font-family: Verdana, Helvetica, Arial;
    font-size: 12px;
}
    #credits a {
        text-decoration: none;
        color: #00aaa6;
    }

#creative-commons-logo {
    float: right;
    margin-top: 20px;
}


Hmmm.

Hmmm.

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

        <%= javascript_include_tag :defaults %>

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

            WhatDoTheyKnow
            (<%= link_to "in development", about_url %>)

            Lift the lid on the UK public sector!

Make Request

<%= link_to "View Requests", request_list_url %>

<%= link_to "View Authorities", list_public_bodies_url(:tag => 'department') %>

        <% if @user %>

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

        <% end %>

<%= link_to "About", about_url %>

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

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

        <% end %>

    <% if MySociety::Config.getbool("STAGING_SITE", 1) %>

            This is a test version of the site. FOI requests will not be sent to real public bodies.

    <% end %>

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

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

    <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.

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

        <%= javascript_include_tag :defaults %>

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

            WhatDoTheyKnow
            (<%= link_to "in development", about_url %>)

            Lift the lid on the UK public sector!

Make Request

<%= link_to "View Requests", request_list_url %>

        <% if @user %>

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

        <% else %>
        <% end %>

<%= link_to "About", about_url %>

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

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

        <% end %>

    <% if MySociety::Config.getbool("STAGING_SITE", 1) %>

            This is a test version of the site. FOI requests will not be sent to real public bodies.

    <% end %>

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

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

    <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.


start page box on search page

start page box on search page

Journals

WARNING: Systematic downloading of data is prohibited.
    <% if policy_url = AppConfig.param('usage_policy_url') %>
    Please see <a href="#" class="smallTextlink" onClick="window.open('<%= policy_url %>','image','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height=380,width=650');">Policy
                                for Use of Online Info.

    <% end %>

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

Searching for a specific journal?

                                    <%= form_tag({:controller=>'search', :action=>'journal_search'}, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'}, nil)  %>

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

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

                                            Journal Title:

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

                                              <select name="umlaut.title_search_type" id="sfx_title_search">
                                                <option value="contains">contains</option>
                                                <option value="begins">begins
                                                with</option>
                                                <option value="exact">exact match</option>

                                              </select>
                                                ISSN:
                                            <input type=text name="rft.issn" size="10" maxlength="9">

Searching for a specific article?

        Enter as much as you know of the following:

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

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

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

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

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

        DOI or Pubmed Identifier:

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

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

                                      </form>

? Having
    Trouble?

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

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

For technical support, including access problems, please contact us.

  <% end %>

Journals

WARNING: Systematic downloading of data is prohibited.
    <% if policy_url = AppConfig.param('usage_policy_url') %>
    Please see <a href="#" class="smallTextlink" onClick="window.open('<%= policy_url %>','image','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,height=380,width=650');">Policy
                                for Use of Online Info.

    <% end %>

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

Searching for a specific journal?

                                    <%= form_tag({:controller=>'search', :action=>'journal_search'}, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'}, nil)  %>

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

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

                                            Journal Title:

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

                                              <select name="umlaut.title_search_type" id="sfx_title_search">
                                                <option value="contains">contains</option>
                                                <option value="begins">begins
                                                with</option>
                                                <option value="exact">exact match</option>

                                              </select>
                                                ISSN:
                                            <input type=text name="rft.issn" size="10" maxlength="9">

Searching for a specific article?

        Enter as much as you know of the following:

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

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

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

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

             Volume:
          <input type=text name="rft.volume" size="5" maxlength="5" value="">   Issue:
          <input type=text name="rft.issue" size="5" value="">

        DOI or Pubmed Identifier:

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

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

                                      </form>

? Having
    Trouble?

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

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

For technical support, including access problems, please contact us.

  <% end %>


workaround for MT routing issues

workaround for MT routing issues

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

<%= error_messages_for :avatar %>
<% form_for(:avatar, :url => '/avatars/', :html => { :multipart => true }) do |f| -%>
	<div class="box" id="action" <%= hide_div? %>>

New Avatar

<%= f.file_field :uploaded_data %>

Avatars must be smaller than 50k.

			<%= submit_tag "Upload", :disable_with => "Upload" %> or
			<% if current_action != 'new' %>
				<%= link_to_function 'Cancel', "$('action').toggle()" %>
			<% else %>
				<%= link_to 'Cancel', avatars_path %>
			<% end %>

<% end %>

<div class="info-left" <%= hide_div? %>>
	<%= link_to 'Home', home_path %> »
	<%= link_to 'Users', users_path %> »
	<%= link_to 'Avatars', avatars_path %> » New Avatar

<%= error_messages_for :avatar %>
<% form_for(:avatar, :url => avatars_path, :html => { :multipart => true }) do |f| -%>
	<div class="box" id="action" <%= hide_div? %>>

New Avatar

<%= f.file_field :uploaded_data %>

Avatars must be smaller than 50k.

			<%= submit_tag "Upload", :disable_with => "Upload" %> or
			<% if current_action != 'new' %>
				<%= link_to_function 'Cancel', "$('action').toggle()" %>
			<% else %>
				<%= link_to 'Cancel', avatars_path %>
			<% end %>

<% end %>

<div class="info-left" <%= hide_div? %>>
	<%= link_to 'Home', home_path %> »
	<%= link_to 'Users', users_path %> »
	<%= link_to 'Avatars', avatars_path %> » New Avatar


previous commit wrongly resolved the conflict for one view.  this gives me a chance to properly record that we now complete    merge branches/rails-2.0 r820:1235 into trunk

<%
remote_url = {:controller => 'chat', :action => 'say', :id => @channel}

loading_command = %(
  msg = '
' + time_and_name + '' + $('entryfield').value + '
';
  $('entryfield').value = '';
  $('entryfield').focus;
  new Insertion.Bottom('stage', msg);
  $('conversation').scrollTop = $('conversation').scrollHeight + $('conversation').clientHeight; )

complete = "eval(request.responseText)"
%>

<% content_for :style do %>
  @import url(/stylesheets/chat.css);
<% end %>

  <%= render :partial => 'chat/userlist' %>

    <% for message in @messages -%>
    <%= message_content(message) %>
    <% end -%>

<%= javascript_tag scroll_conversation_script %>
<%= javascript_tag set_time_and_name_script %>

<% form_remote_tag(:url => remote_url, :loading => loading_command, :complete => complete) do %>

  <%= current_user.login %>

    <% default_text = "Type your messages here and press enter...".t -%>
    <input id="entryfield" type="text" name="message" value="<%=default_text%>"
      onclick="if ($('entryfield').value == '<%=default_text%>') {$('entryfield').clear();}"
      />
    <input type="submit" value="Say" style="display: none;" />

<% end -%>

<%= # poll server every wait_time seconds for new messages
wait_time = 3
periodically_call_remote :url => { :controller => 'chat',
                                   :action => 'poll_channel_for_updates',
                                   :id => @channel},
                         :frequency => wait_time,
                         :complete => "eval(request.responseText)"
#                         :update => 'userlist'
%>

<%= # update server if user has been typing
wait_time = 6
observe_field(:entryfield,
              :frequency => wait_time,
              :url => { :controller => 'chat',
                        :action => 'user_is_typing',
                        :id => @channel })
%>

<%
remote_url = {:controller => 'chat', :action => 'say', :id => @channel}

loading_command = %(
  msg = '
' + time_and_name + '' + $('entryfield').value + '
';
  $('entryfield').value = '';
  $('entryfield').focus;
  new Insertion.Bottom('stage', msg);
  $('conversation').scrollTop = $('conversation').scrollHeight + $('conversation').clientHeight; )

complete = "eval(request.responseText)"
%>

<% content_for :style do %>
  @import url(/stylesheets/chat.css);
<% end %>

  <%= render :partial => 'chat/userlist' %>

    <% for message in @messages -%>
    <%= message_content(message) %>
    <% end -%>

<%= javascript_tag scroll_conversation_script %>
<%= javascript_tag set_time_and_name_script %>

<%= # handle input by posting it and also sending it to the server
form_remote_tag :url => { :controller => 'chat',
                          :action => 'say',
                          :id => @channel },
                :loading => %( msg = '
' + time_and_name + '' + $('entryfield').value + '
';
                             $('entryfield').value = '';
                             $('entryfield').focus;
                             new Insertion.Bottom('stage', msg);
                             $('conversation').scrollTop = $('conversation').scrollHeight + $('conversation').clientHeight; ),
                :complete => "eval(request.responseText)"
%>

    <%= current_user.login %>

      <% default_text = "Type your messages here and press enter...".t -%>
      <input id="entryfield" type="text" name="message" value="<%=default_text%>"
        onclick="if ($('entryfield').value == '<%=default_text%>') {$('entryfield').clear();}"
        />
      <input type="submit" value="Say" style="display: none;" />

<% end -%>

<%= # poll server every wait_time seconds for new messages
wait_time = 3
periodically_call_remote :url => { :controller => 'chat',
                                   :action => 'poll_channel_for_updates',
                                   :id => @channel},
                         :frequency => wait_time,
                         :complete => "eval(request.responseText)"
#                         :update => 'userlist'
%>

<%= # update server if user has been typing
wait_time = 6
observe_field(:entryfield,
              :frequency => wait_time,
              :url => { :controller => 'chat',
                        :action => 'user_is_typing',
                        :id => @channel })
%>


Columns in wrong order in request

Columns in wrong order in request

We're making the theme more responsive for openaustralia/alaveteli, and this is one of the blockers. This has no effect on the actual appearance of the page and requires no changes to CSS.

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

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

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

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

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

<% end %>

<% if ( @update_status || @info_request.awaiting_description ) && ! @info_request.is_external? %>

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

<% end %>

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

    <% if !@info_request.is_external? && @info_request.user.profile_photo %>

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

    <% end %>

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

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

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

    <% if @info_request.awaiting_description && ! @info_request.is_external? %>

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

    <% end %>

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

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

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

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

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

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

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

<% end %>

<% if ( @update_status || @info_request.awaiting_description ) && ! @info_request.is_external? %>

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

<% end %>

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

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

    <% if !@info_request.is_external? && @info_request.user.profile_photo %>

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

    <% end %>

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

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

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

    <% if @info_request.awaiting_description && ! @info_request.is_external? %>

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

    <% end %>

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


estimate number of requests, not number of bodies!

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

<% 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_bodies.matches_estimated.to_s) % @xapian_bodies.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 %>


Make sure user count check works for nil entries

<%
  @user_ids = []
  @current_user.company.projects.each do |p|
    @user_ids <
 ["id IN (#{@user_ids.flatten.compact.uniq.join(',')})"], :order => "name").collect{|u| [u.name, u.id.to_s]}
%>

<fieldset>
<legend>New User</legend>

<% form_tag :action => 'create' do %>
  <%= render :partial => "form" %>

  <%=_('Signup Message')%><%= text_area_tag 'welcome_message', {}, { :rows => 10, :style => "width:80%;"} %>

  <%=_('The message will be included in the signup email.')%>

  <%= submit_tag _("Create"), :class => 'nolabel' %> <%= _'and copy permissions from'%>

  <select name="copy_user" id="copy_user">
     <option value="0" class="select_default"><%= _("[No one]") %></option>
     <%= options_for_select @users, params[:copy_user].to_i %>
  </select>

<% end %>

</fieldset>


Wrap pages in a div to make styling easier.

<%== @page.title %>

    <%= @page.body_rendered %>


ActionItem490: remove attempt to list products

git-svn-id: 43659daf80e124e0b603d67096418e58e4f21099@2153 3f533792-8f58-4932-b0fe-aaf55b0a4547

<h2 class="<%= profile.class == Person ? 'fn' : 'org' %>"><%= block.owner.name %>

      <%=
        profile_image(block.owner, :thumb) +"\n"+
        profile_sex_icon( profile )
      %>

<%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %>

<%= link_to _('Homepage'), block.owner.url, :class => 'url' %>

<%= link_to _('View profile'), block.owner.public_profile_url %>

<%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) if block.owner.enterprise? %>

  <% if !user.nil? and user.has_permission?('edit_profile', profile) %>

<%= link_to _('Control panel'), :controller => 'profile_editor' %>

  <% end %>

<% if profile.respond_to? :city %>

<%=
  [ [ profile.city, 'locality' ],
    [ profile.state, 'region' ],
    [ profile.country, 'country-name' ]
  ].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
%>

<% end %>

  <%= render :file => 'blocks/profile_info_actions/' +  block.owner.class.name.underscore %>

<h2 class="<%= profile.class == Person ? 'fn' : 'org' %>"><%= block.owner.name %>

      <%=
        profile_image(block.owner, :thumb) +"\n"+
        profile_sex_icon( profile )
      %>

<%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %>

<%= link_to _('Homepage'), block.owner.url, :class => 'url' %>

<%= link_to _('View profile'), block.owner.public_profile_url %>

<%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) if block.owner.enterprise? %>

  <% if !user.nil? and user.has_permission?('edit_profile', profile) %>

<%= link_to _('Control panel'), :controller => 'profile_editor' %>

  <% end %>

<% if profile.respond_to? :city %>

<%=
  [ [ profile.city, 'locality' ],
    [ profile.state, 'region' ],
    [ profile.country, 'country-name' ]
  ].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
%>

<% end %>

<% if profile.class == Enterprise %>

<%=
  profile.product_categories.map{ |c| c.size > 1 ? [c[0],c[1]] : nil }.
          compact.uniq.map{ |c|
              content_tag 'span',
                          content_tag( 'span', c.join(' → ') ),
                          :title => c[0] +' → '+ c[1],
                          :class => 'product_cat_' + (c[0]+'_'+c[1]).gsub( /\s/, '_' )
          }.join "\n"
%>

<% end %>

  <%= render :file => 'blocks/profile_info_actions/' +  block.owner.class.name.underscore %>


fixed typo that was making xml invalid

fixed typo that was making xml invalid

<% # see README -%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd">

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <%= favicon %>
  <title><%=h title_from_context %></title>
  <link rel="stylesheet" href="/bundles/<%=CSS_VERSION%>/base.css" type="text/css" media="screen" charset="utf-8" />
  <%= stylesheet_link_tag stylesheet if stylesheet %>

  <% if need_extra_javascript? %><% end %>

<body class="<%=body_class||=''%>">

 <%= render 'layouts/menu' %>

<% if banner -%>

  <%= render :partial => banner %>

<% end -%>

    <%= display_messages %>

  <%= yield %>

    Get involved building crabgrass!