removing javascript includes (until they're necessary)

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

<!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"/>

	<title><%=h page_title %></title>

	<%= stylesheet_link_tag 'styles' %>

<%= link_to(page_title, :controller => 'forum', :action => 'index') %>

				<% if logged_in? %>
				<%= link_to('Forum', :controller => 'forum', :action => 'index') %>
				<%= link_to('Users', :controller => 'users', :action => 'index') %>
				<%= link_to('Start a New Topic »', :controller => 'forum', :action => 'index') %>
				<% else %>
				<%= nav_link('Register', :controller => 'users', :action => 'new') %>
				<%= nav_link('Login »', :controller => 'users', :action => 'login') %>
				<% end %>

				<% if logged_in? %>
				<% if @current_user_profile %><%= nav_link( 'My Profile ('+h(current_user.login)+')', :controller => 'users', :action => 'show', :id => session[:user_id]) %>
				<% else %><%= link_to('My Profile ('+h(current_user.login)+')', :controller => 'users', :action => 'show', :id => session[:user_id]) %>
				<% end %>
				<%= nav_link('Logout', :controller => 'users', :action => 'logout') %>
				<% end %>

			<%= content_tag 'div', h(flash[:notice]), :id => 'notice' if flash[:notice] %>
			<%= content_tag 'div', h(flash[:error]), :id => 'error' if flash[:error] %>

			<%= yield %>

<!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"/>

	<title><%=h page_title %></title>

	<%= javascript_include_tag :defaults %>

	<%= stylesheet_link_tag 'styles' %>

<%= link_to(page_title, :controller => 'forum', :action => 'index') %>

				<% if logged_in? %>
				<%= link_to('Forum', :controller => 'forum', :action => 'index') %>
				<%= link_to('Users', :controller => 'users', :action => 'index') %>
				<%= link_to('Start a New Topic »', :controller => 'forum', :action => 'index') %>
				<% else %>
				<%= nav_link('Register', :controller => 'users', :action => 'new') %>
				<%= nav_link('Login »', :controller => 'users', :action => 'login') %>
				<% end %>

				<% if logged_in? %>
				<% if @current_user_profile %><%= nav_link( 'My Profile ('+h(current_user.login)+')', :controller => 'users', :action => 'show', :id => session[:user_id]) %>
				<% else %><%= link_to('My Profile ('+h(current_user.login)+')', :controller => 'users', :action => 'show', :id => session[:user_id]) %>
				<% end %>
				<%= nav_link('Logout', :controller => 'users', :action => 'logout') %>
				<% end %>

			<%= content_tag 'div', h(flash[:notice]), :id => 'notice' if flash[:notice] %>
			<%= content_tag 'div', h(flash[:error]), :id => 'error' if flash[:error] %>

			<%= yield %>


ActionItem525: zoom to searched enterprises in google map

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

<%= content_tag('script', '', :src => GoogleMaps.api_url, :type => 'text/javascript') %>


events show displays private and reminder indicators

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

  <%= render :partial => 'events/new' if %w(index).include?(current_action) %>

  <%=h @event.title %>

    by <%= link_to h(@event.user.login), user_path(@event.user) %>
     |
    <%= @event.private? ? 'Private' : 'Public' %><%= @event.reminder? ? ', Reminder' : '' %>

<% if !@event.description.blank? %>

      <%=tz @event.date %>

    <%=h @event.description %>

<% end %>

  <%= render :partial => 'events/new' if %w(index).include?(current_action) %>

  <%=h @event.title %>
  by <%= link_to h(@event.user.login), user_path(@event.user) %>

<% if !@event.description.blank? %>

      <%=tz @event.date %>

    <%=h @event.description %>

<% end %>


Fixed Show action.

Fixed Show action.

<%= active_scaffold_config.show.label -%>

<%= render :partial => 'show_columns', :locals => {:columns => active_scaffold_config.show.columns} -%>

  <%= link_to as_('Close'), params_for(:action => 'list'), :class => 'cancel' %>
  <%= loading_indicator_tag(:action => :create, :id => params[:id]) %>

<%= active_scaffold_config.show.label -%>

<%= render :partial => 'show_columns', :locals => {:columns => active_scaffold_config.show.columns} -%>

  <%= link_to _('CLOSE_BUTTON'), params_for(:action => 'list'), { :onclick => "$('#{action_link_id(:action => active_scaffold_config.show.link.action)}').action_link.close(); return false;" }%>
  <%= loading_indicator_tag(:action => :create, :id => params[:id]) %>


Get formatting right.

Get formatting right.

<% @title =  MySociety::Format.fancy_pluralize(@new_responses_count, 'New response', 'new responses') +
    " to '" + h(@info_request.title) + "'" %>

<%= foi_error_messages_for :incoming_message, :outgoing_message %>

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

<%=MySociety::Format.fancy_pluralize(@new_responses_count, 'New response', 'new responses') %>
    to your request '<%= request_link @info_request %>'

    <% for info_request_event in @events_needing_description %>
        <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %>
    <% end %>

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


Printing upcoming partial only if upcoming array is set.

<%content_for("left") do-%>
<%=(render :partial => "events/upcoming") if @upcoming_events.length > 0-%>
<%for article in @articles-%>

<%= link_to article.title, :controller => 'articles', :action => 'show', :id => article.id -%>

<%= truncate(article.body, 600) -%>

  <%= link_to("Continue reading", :controller => 'articles', :action => 'show', :id => article.id) if article.body.length >= 600 -%>

Posted by <%= link_to article.author.fullname, :controller => 'people', :action => 'show', :id => article.author.id-%> on <%= article.created_at.strftime("%d %b, %Y")-%>

<%end-%>

<%= link_to "Older articles", :controller => "articles", :action => "list"-%>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => "layouts/categories_nav" -%>
<%= render :partial => "layouts/album" -%>
<%= render :partial => "layouts/about" -%>
<%end-%>

<%content_for("left") do-%>
<%=render :partial => "events/upcoming"-%>
<%for article in @articles-%>

<%= link_to article.title, :controller => 'articles', :action => 'show', :id => article.id -%>

<%= truncate(article.body, 600) -%>

  <%= link_to("Continue reading", :controller => 'articles', :action => 'show', :id => article.id) if article.body.length >= 600 -%>

Posted by <%= link_to article.author.fullname, :controller => 'people', :action => 'show', :id => article.author.id-%> on <%= article.created_at.strftime("%d %b, %Y")-%>

<%end-%>

<%= link_to "Older articles", :controller => "articles", :action => "list"-%>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => "layouts/categories_nav" -%>
<%= render :partial => "layouts/album" -%>
<%= render :partial => "layouts/about" -%>
<%end-%>


Added password confirmation field

Added password confirmation field

<%= error_messages_for 'person' %>

Username

<%= text_field 'person', 'username'  %>

Password

<%= password_field 'person', 'password'  %>

Password confirmation

<%= password_field 'person', 'password_confirmation'  %>

Fullname

<%= text_field 'person', 'fullname'  %>

Email

<%= text_field 'person', 'email'  %>

Additional details

Profile

<%= text_area 'person', 'profile', :rows => 5, :cols => 40  %>

Nickname

<%= text_field 'person', 'nickname'  %>

Irc nick

<%= text_field 'person', 'irc_nick'  %>

Webpage

<%= text_field 'person', 'webpage'  %>

Flickr username

<%= text_field 'person', 'flickr_username'  %>

Y! IM username

<%= text_field 'person', 'yahooim_username'  %>

Google talk username

<%= text_field 'person', 'gtalk_username'  %>

Privacy

Visible

<select id="person_visible" name="person[visible]">
  <option value="false" <%= @person.visible == false ? "selected" : ""-%>>False</option>
  <option value="true"  <%= @person.visible == true ? "selected" : ""-%>>True</option>
</select>

Created at

<%= date_select 'person', 'created_at'  %>

<%= error_messages_for 'person' %>

Username

<%= text_field 'person', 'username'  %>

Password

<%= password_field 'person', 'password'  %>

Fullname

<%= text_field 'person', 'fullname'  %>

Email

<%= text_field 'person', 'email'  %>

Additional details

Profile

<%= text_area 'person', 'profile', :rows => 5, :cols => 40  %>

Nickname

<%= text_field 'person', 'nickname'  %>

Irc nick

<%= text_field 'person', 'irc_nick'  %>

Webpage

<%= text_field 'person', 'webpage'  %>

Flickr username

<%= text_field 'person', 'flickr_username'  %>

Y! IM username

<%= text_field 'person', 'yahooim_username'  %>

Google talk username

<%= text_field 'person', 'gtalk_username'  %>

Privacy

Visible

<select id="person_visible" name="person[visible]">
  <option value="false" <%= @person.visible == false ? "selected" : ""-%>>False</option>
  <option value="true"  <%= @person.visible == true ? "selected" : ""-%>>True</option>
</select>

Created at

<%= date_select 'person', 'created_at'  %>


Translated payment processors

Translated payment processors

<% selected_processor = (  payment && payment[:processor_id] )  ? payment[:processor_id] : payment_processors[0].id %>

<% payment_processors.each do |processor| -%>

<% if payment_processors.length > 1 %>
<label for='processor_<%= processor.id %>'><input type='radio' name='payment[selected_processor_id]' id='processor_<%= processor.id %>' value='<%= processor.id %>' <%= "checked='checked'" if selected_processor == processor.id %> /><%= "Pay with".t %> <%= processor.payment_type.t %>

<% else -%>
  <%= "Payment via".t %> <%= processor.payment_type.t %><input type='hidden' name='payment[selected_processor_id]' value='<%= processor.id %>' />

<% end -%>

<% cms_unstyled_fields_for "payment[#{processor.id}]", processor.get_instance(user).get_transaction_options(payment[processor.id.to_s], :admin => admin) do |p| -%>
  <%= render :partial => processor.processor_handler_class.transaction_partial, :locals => {:f => p, :processor => processor, :admin => admin } %>

<% end -%>

<% end -%>

<% selected_processor = (  payment && payment[:processor_id] )  ? payment[:processor_id] : payment_processors[0].id %>

<% payment_processors.each do |processor| -%>

<% if payment_processors.length > 1 %>
<label for='processor_<%= processor.id %>'><input type='radio' name='payment[selected_processor_id]' id='processor_<%= processor.id %>' value='<%= processor.id %>' <%= "checked='checked'" if selected_processor == processor.id %> />Pay with <%= processor.payment_type.t %>

<% else -%>
  Pay with <%= processor.payment_type.t %><input type='hidden' name='payment[selected_processor_id]' value='<%= processor.id %>' />

<% end -%>

<% cms_unstyled_fields_for "payment[#{processor.id}]", processor.get_instance(user).get_transaction_options(payment[processor.id.to_s], :admin => admin) do |p| -%>
  <%= render :partial => processor.processor_handler_class.transaction_partial, :locals => {:f => p, :processor => processor, :admin => admin } %>

<% end -%>

<% end -%>


Update out of date unhappy help text.

Update out of date unhappy help text.

<% @title = "Unhappy about a Freedom of Information request?" %>

Unhappy about the response you got?

If ...

You didn't get a reply within 20 working days

You did not get all of the information that you requested or

Your request was rejected, but without a reason valid under the law

... you can

Ask for an internal review at the public authority.

If that doesn't help, complain to the Information Commisioner.

Either way, also use other means to answer your question.

1. Asking for an internal review

You can use WhatDoTheyKnow to request an internal review. Go to your
request and choose "send follow up" message, then write a message asking
for an internal review of your request. You may want to include a link to the request
page, to make it clear which request you are talking about.

The internal review should take 2-3 weeks for simple cases, and up to 6
weeks even for complex reviews. You will then either get the information that
you originally requested, or you will be told that the review upholds the
original decision.

2. Complaining to the Information Commissioner

If you are still unhappy after the public authority has done their internal review,
then you can complain to the Information Commisioner. To do this read
Complaints about Freedom of Information
on the Information Commisioner's website.

Again, you can include a link to your request on WhatDoTheyKnow, or print
out the whole page of your request, to make it easy to send the relevant
information to the Information Commissioner.

There is a backlog of work at the Information Commissioner, and
it can take literally years to get resolution from them. If you reach this point,
you should accept that you won't get the information quickly by this means. Maybe
you want to help the fight to improve Freedom of Information, or maybe
getting the information slowly is still worthwhile. You can also try and
get the information by other means...

3. Using other means to answer your question

You can try persuing your problem or your research in other ways.

Make an FOI request for summary information, or for documentation relating
indirectly to matters in your rejected request.
Ask us for ideas if you're stuck.

If any other public authorities or publically owned companies are involved,
then make FOI requests to them.

Write to your MP or other politician
and ask for their help. Often MPs can find out information which individuals can't,
by directly writing to ministers or departments, or by asking a written question in the
House of Commons. Likewise, councillors in local authorities can go and talk directly
to officers to try and find things out.

Ask others researching the same or similar questions for ideas. Perhaps you
can find them by browsing this site; you can contact any registered user from
their page. Perhaps there is an Internet forum or group where there are people
who know about the area you are researching.  If it is a local matter, use GroupsNearYou to find such a
forum.

Start a pledge to get others
to act together with you. For example, you could arrange a meeting with staff
from the authority. Or you could form a small local campaigns group.

<% @title = "Unhappy about a Freedom of Information request?" %>

Unhappy about the response you got?

If ...

You didn't get a reply within 20 working days

You did not get all of the information that you requested or

Your request was rejected, but without a reason valid under the law

... you can

Ask for an Internal Review at the public authority.

If that doesn't help, complain to the Information Commisioner.

Either way, also use other means to answer your question.

1. Asking for an Internal Review

Contact the Freedom of Information officer at the public authority and
request an internal review.

You should be able to find the email address for this by searching the
website of the public authority. If you filed your request using
WhatDoTheyKnow, you can include a link to the page about your request, so the
internal review has easy access to all the relevant correspondence.

The Internal Review should take 2-3 weeks for simple cases, and up to 6
weeks even for complex reviews. You will then either get the information that
you originally requested, or you will be told that the review upholds the
original decision.

2. Complaining to the Information Commissioner

If you are still unhappy after the public authority has done their internal review,
then you can complain to the Information Commisioner. To do this read
Complaints about Freedom of Information
on the Information Commisioner's website.

Again, you can include a link to your request on WhatDoTheyKnow, or print
out the whole page of your request, to make it easy to send the relevant
information to the Information Commissioner.

Warning: There is a backlog of work at the Information Commissioner, and
it can take literally years to get resolution from them. If you reach this point,
you should accept that you won't get the information quickly by this means. Maybe
you want to help the fight to improve Freedom of Information, or maybe
getting the information slowly is still worthwhile.

3. Using other means to answer your question

You can try persuing your problem or your research in other ways.

Make an FOI request for summary information, or for documentation relating
indirectly to matters in your rejected request.
Ask us for ideas if you're stuck.

If any other public authorities or publically owned companies are involved,
then make FOI requests to them.

Write to your MP or other politician
and ask for their help. Often MPs can find out information which individuals can't,
by directly writing to ministers or departments, or by asking a written question in the
House of Commons. Likewise, councillors in local authorities can go and talk directly
to officers to try and find things out.

Ask others researching the same or similar questions for ideas. Perhaps you
can find them by browsing this site; you can contact any registered user from
their page. Perhaps there is an Internet forum or group where there are people
who know about the area you are researching.  If it is a local matter, use GroupsNearYou to find such a
forum.

Start a pledge to get others
to act together with you. For example, you could arrange a meeting with staff
from the authority. Or you could form a small local campaigns group.


Maybe clearer wording

Maybe clearer wording

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

<% if @info_request.awaiting_description %>

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

<% end %>

Track this request

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

Act on what you've learnt

        <%= link_to '', "http://www.writetothem.com"%>
        <%= link_to 'Write to your politician', "http://www.writetothem.com"%>

        <%= link_to '', "http://www.pledgebank.com"%>
        <%= link_to 'Join others with a pledge', "http://www.pledgebank.com"%>

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

Similar requests

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

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

        <% end %>
     <% end %>

<%=@title%>

<%=h @info_request.law_used_with_a%> to
    <%= public_body_link(@info_request.public_body) %>
    by
    <%= user_link(@info_request.user) %>
    <% if !@user.nil? && @user.admin_page_links? %>
    (<%= link_to "admin", request_admin_url(@info_request) %>)
    <% end %>

    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            Please answer the question above so we know whether the
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> useful information.
        <% else %>
            This request has an unknown status. We're waiting for
            <%= user_link(@info_request.user) %> to read
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
            and update the status.
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@info_request.public_body) %>,
        they <%= link_to "must respond", about_url + "#quickly_response" %>
        promptly but no later than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'waiting_response_overdue' %>
        Currently overdue a response from <%=
        public_body_link(@info_request.public_body) %>. By law,
        the response had to be
        <%= link_to "no later", about_url + "#quickly_response" %>
        than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was rejected by <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        The request was successful.
    <% elsif @status == 'partially_successful' %>
        The request was partially successful.
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> is waiting for your clarification.
            Please
            <%= link_to "send a follow up message", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#followup" %>.
        <% else %>
            The request is waiting for clarification.
            If you are
            <%= user_link(@info_request.user) %>, please
            <%= link_to "sign in", signin_url(:r => request.request_uri) %> to send a follow up message.
        <% end %>
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% else %>
        <% raise "unknown status " + @status %>
    <% end %>

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

Add an annotation

        Annotations will be posted publically here, and are
        not sent to the authority.

        Help the requester with their request.

        <% if [ 'waiting_clarification' ].include?(@info_request.described_state) %>

 Advise on how to best clarify the request.

        <% end %>

        <% if @info_request.awaiting_description %>
        <% end %>

        <% if not [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>

 Link to the information requested, if it is already available on the Internet.

 Suggest where else the requester might find the information.

 Offer better ways of wording the request to get the information.

        <% end %>

        <% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>

 Summarise the content of any information returned.

 Say how you've used the information, with links if possible.

 Thank the public authority or <%=h @info_request.user.name %>.

        <% end %>
        <% if [ 'partially_successful' ].include?(@info_request.described_state) %>

 Suggest how the requester can find the rest of the information.

        <% end %>
        <% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>

 Point to related information, campaigns or forums which may be useful.

        <% end %>

        <% if [ 'not_held' ].include?(@info_request.described_state) %>

 Ideas on what other documents to request which the authority may hold.

        <% end %>
        <% if [ 'rejected' ].include?(@info_request.described_state) %>

 Advise on whether the rejection is legal, and how to complain about if not.

        <% end %>

        <% if [ 'requires_admin' ].include?(@info_request.described_state) %>

 Your thoughts on what the WhatDoTheyKnow administrators should do about the request.

        <% end %>

        <%= render :partial => 'comment/comment_form', :locals => { :track_thing => @track_thing } %>

<% if @info_request.awaiting_description %>

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

<% end %>

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

<% if @info_request.awaiting_description %>

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

<% end %>

Track this request

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

Act on what you've learnt

        <%= link_to '', "http://www.writetothem.com"%>
        <%= link_to 'Write to your politician', "http://www.writetothem.com"%>

        <%= link_to '', "http://www.pledgebank.com"%>
        <%= link_to 'Join others with a pledge', "http://www.pledgebank.com"%>

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

Similar requests

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

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

        <% end %>
     <% end %>

<%=@title%>

<%=h @info_request.law_used_with_a%> to
    <%= public_body_link(@info_request.public_body) %>
    by
    <%= user_link(@info_request.user) %>
    <% if !@user.nil? && @user.admin_page_links? %>
    (<%= link_to "admin", request_admin_url(@info_request) %>)
    <% end %>

    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            Please answer the question above so we know whether the
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> useful information.
        <% else %>
            This request has an unknown status. We're waiting for
            <%= user_link(@info_request.user) %> to read
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
            and update the status.
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@info_request.public_body) %>,
        they <%= link_to "must respond", about_url + "#quickly_response" %>
        promptly but no later than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'waiting_response_overdue' %>
        Currently overdue a response from <%=
        public_body_link(@info_request.public_body) %>. By law,
        the response had to be
        <%= link_to "no later", about_url + "#quickly_response" %>
        than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was rejected by <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        The request was successful.
    <% elsif @status == 'partially_successful' %>
        The request was partially successful.
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> is waiting for your clarification.
            Please
            <%= link_to "send a follow up message", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#followup" %>.
        <% else %>
            The request is waiting for clarification.
            If you are
            <%= user_link(@info_request.user) %>, please
            <%= link_to "sign in", signin_url(:r => request.request_uri) %> to send a follow up message.
        <% end %>
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% else %>
        <% raise "unknown status " + @status %>
    <% end %>

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

Add an annotation

        Help the requester with their request. Things you can do:

        <% if [ 'waiting_clarification' ].include?(@info_request.described_state) %>

 Advise on how to best clarify the request.

        <% end %>

        <% if @info_request.awaiting_description %>
        <% end %>

        <% if not [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>

 Link to the information requested, if it is already available on the Internet.

 Suggest where else the requester might find the information.

 Offer better ways of wording the request to get the information.

        <% end %>

        <% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>

 Summarise the content of any information returned.

 Say how you've used the information, with links if possible.

 Thank the public authority or <%=h @info_request.user.name %>.

        <% end %>
        <% if [ 'partially_successful' ].include?(@info_request.described_state) %>

 Suggest how the requester can find the rest of the information.

        <% end %>
        <% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>

 Point to related information, campaigns or forums which may be useful.

        <% end %>

        <% if [ 'not_held' ].include?(@info_request.described_state) %>

 Ideas on what other documents to request which the authority may hold.

        <% end %>
        <% if [ 'rejected' ].include?(@info_request.described_state) %>

 Advise on whether the rejection is legal, and how to complain about if not.

        <% end %>

        <% if [ 'requires_admin' ].include?(@info_request.described_state) %>

 Your thoughts on what the WhatDoTheyKnow administrators should do about the request.

        <% end %>

        <%= render :partial => 'comment/comment_form', :locals => { :track_thing => @track_thing } %>

<% if @info_request.awaiting_description %>

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

<% end %>


author feedback added

author feedback added

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

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>
<%= error_messages_for 'assignment' %>

  Assignment name:
  <%= text_field 'assignment', 'name'  %>

  Submission directory:
  <%= text_field 'assignment', 'directory_path'%>

  Writeup URL:
  <%= text_field 'assignment', 'spec_location'  %>

  Team assignment:

  		<select name="assignment[team_assignment]">
  		<% if @assignment.team_assignment == true %>
                <option value=false>No</option>
                <option value=true SELECTED>Yes</option>
        <% else %>
        		<option value=false>No</option>
                <option value=true>Yes</option>
        <% end %>
       </select>

  Wiki Type:

    <% if @wiki_types.length == 0 %>
      There are currently no wiki assignment types defined

    <% else %>
      <select name="assignment[wiki_type_id]">
      <% @wiki_types.each do |wiki_type| %>
        <option value="<%= wiki_type.id %>"
        <%= ' selected' if wiki_type.id == @assignment.wiki_type_id %> >
        <%= wiki_type.name %>
        </option>
      <% end %>
      </select>
    <% end %>

  Review questionnaire:

      <%=@questionnaires = Questionnaire.find(:all, :conditions => ["type_id = 1"]).map {|u| [u.name, u.id] }
         select('assignment', 'review_questionnaire_id', @questionnaires)%>

  Review weight:
      <%= text_field 'assignment', 'review_weight', :size=>5%>

  Feedback rubric

      <%=@rubrics = Questionnaire.find(:all, :conditions => ["type_id = 5"]).map {|u| [u.name, u.id] }
      select('assignment', 'author_feedback_questionnaire_id', @rubrics)%>

  Review-of-review questionnaire:

      <%=@questionnaires = Questionnaire.find(:all, :conditions => ["type_id = 1"]).map {|u| [u.name, u.id] }
         select('assignment', 'review_of_review_questionnaire_id', @questionnaires)%>

 Late Policy:
 <%=@late_policies = LatePolicy.find(:all).map {|u| [u.id] }
         select('for_due_date', 'late_policy_id', @late_policies,:selected =>1)%>

  Reviews should be visible to all other reviewers
  <%= check_box 'assignment', 'reviews_visible_to_all', {}, true, false %>

  Users must sign up before submitting
  <%= check_box 'assignment', 'require_signup', {}, true, false %>

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>
<%= error_messages_for 'assignment' %>

  Assignment name:
  <%= text_field 'assignment', 'name'  %>

  Submission directory:
  <%= text_field 'assignment', 'directory_path'%>

  Writeup URL:
  <%= text_field 'assignment', 'spec_location'  %>

  Team assignment:
  <select name="assignment[team_assignment]">
                <option value=false>No</option>
                <option value=true>Yes</option>
       </select>

  Wiki Type:

    <% if @wiki_types.length == 0 %>
      There are currently no wiki assignment types defined

    <% else %>
      <select name="assignment[wiki_type_id]">
      <% @wiki_types.each do |wiki_type| %>
        <option value="<%= wiki_type.id %>"
        <%= ' selected' if wiki_type.id == @assignment.wiki_type_id %> >
        <%= wiki_type.name %>
        </option>
      <% end %>
      </select>
    <% end %>

  Review questionnaire:

      <%=@questionnaires = Questionnaire.find(:all, :conditions => ["type_id = 1"]).map {|u| [u.name, u.id] }
         select('assignment', 'review_questionnaire_id', @questionnaires)%>

  Review weight:
      <%= text_field 'assignment', 'review_weight', :size=>5%>

  Review-of-review questionnaire:

      <%=@questionnaires = Questionnaire.find(:all, :conditions => ["type_id = 1"]).map {|u| [u.name, u.id] }
         select('assignment', 'review_of_review_questionnaire_id', @questionnaires)%>

 Late Policy:
 <%=@late_policies = LatePolicy.find(:all).map {|u| [u.id] }
         select('for_due_date', 'late_policy_id', @late_policies,:selected =>1)%>

  Reviews should be visible to all other reviewers
  <%= check_box 'assignment', 'reviews_visible_to_all', {}, true, false %>

  Users must sign up before submitting
  <%= check_box 'assignment', 'require_signup', {}, true, false %>


Add the reference to the Ubiquity command.

  <title>FreeCite - Open Source Citation Parser</title>
  <%= stylesheet_link_tag "main" %>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link rel="commands" href="/javascripts/freecite-ubiq.js" name="FreeCite Ubiquity Command" />
  <%= @content_for_head %>

      Brown University

    FreeCite
    Citation Classifier

      <%= @content_for_layout %>

<%= link_to "Home", {:controller => 'welcome', :action => 'index'} -%>

<%= link_to "FreeCite API", {:controller => 'welcome', :action => 'api_instructions'} -%>

<%= link_to "Feedback", {:controller => 'welcome', :action => 'feedback'} -%>

      FreeCite is brought to you by
      Brown University,
      Public Display and
      the Mellon Foundation.

  <title>FreeCite - Open Source Citation Parser</title>
  <%= stylesheet_link_tag "main" %>

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

  <%= @content_for_head %>

      Brown University

    FreeCite
    Citation Classifier

      <%= @content_for_layout %>

<%= link_to "Home", {:controller => 'welcome', :action => 'index'} -%>

<%= link_to "FreeCite API", {:controller => 'welcome', :action => 'api_instructions'} -%>

<%= link_to "Feedback", {:controller => 'welcome', :action => 'feedback'} -%>

      FreeCite is brought to you by
      Brown University,
      Public Display and
      the Mellon Foundation.


fixed var name typos

fixed var name typos

<% for column in model_ui.show_columns %>

  <%= column.human_name %>:

    <%= !column.render_td(self, @streamlined_item).blank? ? column.render_td(self, @streamlined_item) : ' ' %>

<% end %>

<% unless model_ui.read_only %>
<%= link_to 'Edit', {:action => 'edit', :id => @streamlined_item},
                    {:onclick => "Streamlined.Link.submit(this); return false;"} %>
<% end %>

<% for column in model_ui.show_columns %>

  <%= column.human_name %>:

    <%= !column.render_td(self, streamlined_item).blank? ? column.render_td(self, streamlined_item) : ' ' %>

<% end %>

<% unless model_ui.read_only %>
<%= link_to 'Edit', {:action => 'edit', :id => @streamlined_item},
                    {:onclick => "Streamlined.Link.submit(this); return false;"} %>
<% end %>


disable login button on click

disable login button on click

<% unless logged_in? -%>

            Log in / Register

        <% form_tag session_path do %>
        <%= hidden_field_tag "called_from[controller]", controller.controller_name -%>
        <%= hidden_field_tag "called_from[action]", controller.action_name -%>
        <%= hidden_field_tag "called_from[id]", params[:id] -%>

                    Login:

                    <%= text_field_tag 'login', nil, :class => 'field' -%>

                    Password:

                    <%= password_field_tag 'password', nil, :class => 'field' -%>

                    Remember me: <%= check_box_tag 'remember_me',nil,false, {:style=>"width:2em;"} %>

                    <%= image_tag "openid-16x16.gif" %>OpenID:

                    <%= text_field_tag 'openid_identifier', nil, :class => 'field' -%>

                Alternatively...

                Log in using <%= image_tag "openid-16x16.gif" %>OpenID

            <%= submit_tag "Log in", :id=>"login_button",:onclick=>"$('login_button').disabled=true;this.form.submit();return(false);" %>

        <% end %>

            Need an account?

            <%= link_to "Sign up", signup_url %>

            <%= link_to "Forgotten password?", forgot_password_url %>

<% end -%>

<% unless logged_in? -%>

            Log in / Register

        <% form_tag session_path do %>
        <%= hidden_field_tag "called_from[controller]", controller.controller_name -%>
        <%= hidden_field_tag "called_from[action]", controller.action_name -%>
        <%= hidden_field_tag "called_from[id]", params[:id] -%>

                    Login:

                    <%= text_field_tag 'login', nil, :class => 'field' -%>

                    Password:

                    <%= password_field_tag 'password', nil, :class => 'field' -%>

                    Remember me: <%= check_box_tag 'remember_me',nil,false, {:style=>"width:2em;"} %>

                    <%= image_tag "openid-16x16.gif" %>OpenID:

                    <%= text_field_tag 'openid_identifier', nil, :class => 'field' -%>

                Alternatively...

                Log in using <%= image_tag "openid-16x16.gif" %>OpenID

            <%= submit_tag "Log in" %>

        <% end %>

            Need an account?

            <%= link_to "Sign up", signup_url %>

            <%= link_to "Forgotten password?", forgot_password_url %>

<% end -%>


Add Alaveteli link to Welsh help sidebar.

Tudalennau cymorth

<%= link_to_unless_current "Cyflwyniad", help_about_path %>

<%= link_to_unless_current "Gwneud ceisiadau", help_requesting_path %>

<%= link_to_unless_current "Eich preifatrwydd", help_privacy_path %>

<%= link_to_unless_current "Swyddogion Rhyddid Gwybodaeth", help_officers_path %>

<%= link_to_unless_current "Credydau", help_credits_path %>

<%= link_to_unless_current "API Rhaglenwyr", help_api_path %>

<%= link_to_unless_current "Chwiliad manwl", advanced_search_path %>

<%= link_to_unless_current "Alaveteli", help_alaveteli_path %>

Cysylltwch â ni

Os nad yw eich cwestiwn yn cael ei ateb yma, neu eich bod jyst eisiau
gadael i ni wybod rhywbeth am y wefan, <a href="<%= help_contact_path %>">cysylltwch â ni.

Tudalennau cymorth

<%= link_to_unless_current "Cyflwyniad", help_about_path %>

<%= link_to_unless_current "Gwneud ceisiadau", help_requesting_path %>

<%= link_to_unless_current "Eich preifatrwydd", help_privacy_path %>

<%= link_to_unless_current "Swyddogion Rhyddid Gwybodaeth", help_officers_path %>

<%= link_to_unless_current "Credydau", help_credits_path %>

<%= link_to_unless_current "API Rhaglenwyr", help_api_path %>

<%= link_to_unless_current "Chwiliad manwl", advanced_search_path %>

Cysylltwch â ni

Os nad yw eich cwestiwn yn cael ei ateb yma, neu eich bod jyst eisiau
gadael i ni wybod rhywbeth am y wefan, <a href="<%= help_contact_path %>">cysylltwch â ni.


added mysoclogo div for banner

added mysoclogo div for banner

<!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>
        <%
            # Angie, just change this to true / false :)
            yucky = false
        %>
        <%= stylesheet_link_tag 'yucky-green', :title => "Yucky Green", :rel => yucky ? "stylesheet" : "alternate stylesheet" %>
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => yucky ? "alternate stylesheet" : "stylesheet"  %>

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

            Make and explore Freedom of Information requests

		a site by mysociety.org

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

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

        <% end %>

Make request

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

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

		<% 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>
        <%
            # Angie, just change this to true / false :)
            yucky = false
        %>
        <%= stylesheet_link_tag 'yucky-green', :title => "Yucky Green", :rel => yucky ? "stylesheet" : "alternate stylesheet" %>
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => yucky ? "alternate stylesheet" : "stylesheet"  %>

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

            Make and explore Freedom of Information requests

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

Make request

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

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

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


Think the title should be other way round.

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

        <title><%=@title%> <%= @title ? "-" : "" %> GovernmentSpy</title>
        <%= stylesheet_link_tag 'main' %>

            GovernmentSpy
            (in development)

It's your information. Free it from them.

Make Request

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

        <% if @user %>

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

        <% else %>
        <% end %>

<%= link_to "About", about_url %>

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

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

        <title>GovernmentSpy <%= @title ? "-" : "" %> <%=@title%></title>
        <%= stylesheet_link_tag 'main' %>

            GovernmentSpy
            (in development)

It's your information. Free it from them.

Make Request

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

        <% if @user %>

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

        <% else %>
        <% end %>

<%= link_to "About", about_url %>

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


Fixed XHTML validation problem in login.

<% form_tag(:action=> "login") do %>

<%= :login_please_login.l %>

    <% if @message %>

<%= @message %>

    <% end %>

    <%= :login_user.l %>:

    <input type="text" name="user_login" id="user_login" size="30" value=""/>

    <%= :login_password.l %>:

    <input type="password" name="user_password" id="user_password" size="30"/>

    <input type="submit" name="login" value=<%= "\"#{:login_login.l}\"" %> class="primary" />

	<%= textilize(:login_forgot_password.l % "#{DOMAIN}/account/email_new_password") %>
	<%= textilize(:login_no_account.l % "#{DOMAIN}/account/signup") %>

<%= textilize(:login_having_problems.l % "#{DOMAIN}/observer/ask_webmaster_question") %>

<% end %>


fixed another couple bugs in the view of the search field.

git-svn-id: 035394e0ea20290a56a73539b1ebfcd8236adefd@828 7bd17f4f-1217-0410-bbc5-bc4367116c30

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

  <title><%= APP_NAME %>: <%= @page_title || controller.action_name %></title>
  <%= render :partial=>'layouts/global_includes' %>

<%= image_tag 'ajax-loader.gif' %>  Loading...

	<%= render :partial=>'shared/page/header'%>

  <%= display_flash_message %>

  <%= render :partial=>'/shared/google_search' %>
  <% if current_user %>

    <%= form_tag :controller => 'search', :action => 'all' %>
  	  <input class="searchField" type="text" name='id' tabindex="1" alt="search box" />
  	  <input class="searchSubmit" type="submit" value="<%= APP_NAME %> Search" alt="search button" />
    <%= end_form_tag %>

      Search using
      <input id='google_radio' type="radio" onclick="View.show_hide('google_search_form','ram_search_form');$('ram_radio').checked = false;" value="Google" name="google_radio" />Google
      <input id='ram_radio' type="radio" onclick="View.show_hide('ram_search_form','google_search_form');$('google_radio').checked = false;" value="RAM" name="ram_radio" /><%= APP_NAME %>

  <% end -%>
  <%= yield :application_header %>

		<% if current_user
		  display_open_as  = display_close_as = "none"
		  if session[:view][:expand_menu]
		    display_open_as  = "block"
		  else
		    display_close_as = "block"
	      end
		-%>

			<div style="border-right:1px solid #cfcfcf;height:400px;width:250px;display:<%= display_open_as %>;">
			  <%= image_tag('/images/icons/arrow_left.png', {:style=>"display:block;position:absolute;left:225px;padding:1px;"})%>

<%= link_to 'Inbox', :controller=>'inbox' %>

<%= link_to 'Profile', :controller=>'account',:action=>'my_profile' %>

<%= link_to 'Categories', :controller=>'category' %>

				  <% unless params[:controller] == 'inbox' || params[:action] == 'dashboard'-%>

  				    <%= parse_tree(session[:category_tree][:root][:children]) %>

  				<% else -%>
					  <%= render :partial=>'shared/user_side_menu' %>
				  <% end -%>

				<div id="sideMenuCollapsed" style="border-right:1px solid #cfcfcf;width:25px;display:<%= display_close_as %>;">
			<%= image_tag('/images/icons/arrow_right.png', {:style=>"display:block;padding:1px;"})%>

			<% end -%>

				<%= yield :page_view_options %>
				<%= yield :layout %>
				<%= yield :subscription_options %>

    <%= yield :page_meta %>
    <%= render :partial=>'shared/page/footer'%>

	<%= grail_notify({:subject=>"System Message", :body=>flash[:grail]})  if flash.keys.include?(:grail) %>

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

  <title><%= APP_NAME %>: <%= @page_title || controller.action_name %></title>
  <%= render :partial=>'layouts/global_includes' %>

<%= image_tag 'ajax-loader.gif' %>  Loading...

	<%= render :partial=>'shared/page/header'%>

  <%= display_flash_message %>

  <%= render :partial=>'/shared/google_search' %>

  <% if current_user %>

    <%= form_tag :controller => 'search', :action => 'all' %>
  	  <input class="searchField" type="text" name='id' tabindex="1" alt="search box" />
  	  <input class="searchSubmit" type="submit" value="<%= APP_NAME %> Search" alt="search button" />
    <%= end_form_tag %>

      Search using
      <input id='google_radio' type="radio" onclick="View.show_hide('google_search_form','ram_search_form');$('ram_radio').checked = false;" value="Google" name="google_search">Google
      <input id='ram_radio' type="radio" onclick="View.show_hide('ram_search_form','google_search_form');$('google_radio').checked = false;" value="RAM" name="ram_search"><%= APP_NAME %>

  <% end -%>
  <%= yield :application_header %>

		<% if current_user
		  display_open_as  = display_close_as = "none"
		  if session[:view][:expand_menu]
		    display_open_as  = "block"
		  else
		    display_close_as = "block"
	      end
		-%>

			<div style="border-right:1px solid #cfcfcf;height:400px;width:250px;display:<%= display_open_as %>;">
			  <%= image_tag('/images/icons/arrow_left.png', {:style=>"display:block;position:absolute;left:225px;padding:1px;"})%>

<%= link_to 'Inbox', :controller=>'inbox' %>

<%= link_to 'Profile', :controller=>'account',:action=>'my_profile' %>

<%= link_to 'Categories', :controller=>'category' %>

				  <% unless params[:controller] == 'inbox' || params[:action] == 'dashboard'-%>

  				    <%= parse_tree(session[:category_tree][:root][:children]) %>

  				<% else -%>
					  <%= render :partial=>'shared/user_side_menu' %>
				  <% end -%>

				<div id="sideMenuCollapsed" style="border-right:1px solid #cfcfcf;width:25px;display:<%= display_close_as %>;">
			<%= image_tag('/images/icons/arrow_right.png', {:style=>"display:block;padding:1px;"})%>

			<% end -%>

				<%= yield :page_view_options %>
				<%= yield :layout %>
				<%= yield :subscription_options %>

    <%= yield :page_meta %>
    <%= render :partial=>'shared/page/footer'%>

	<%= grail_notify({:subject=>"System Message", :body=>flash[:grail]})  if flash.keys.include?(:grail) %>


If it is good for the _search and _live_search...

git-svn-id: b2ff2946fad280430023ee7ead77858f96a610fa@654 561dde7e-7729-0410-be8e-ef83869d6c7d

<%
# We have to remove search form params before the url_for method call, otherwise it throughs it on
search_params = params[:search]
params.merge!(:search => nil)
href = url_for(params_for(:action => :update_table, :escape => false).delete_if{|k,v| k == 'search'})
-%>
<%= form_remote_tag :url => href,
                    :method => :get,
                    :before => "addActiveScaffoldPageToHistory('#{href}', '#{params[:controller]}')",
                    :after => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{search_form_id}');",
                    :complete => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{search_form_id}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :update => active_scaffold_content_id,
                    :html => { :href => href, :id => search_form_id, :class => 'search' } %>

    <% active_scaffold_config.field_search.columns.each do |column| -%>
      <% name = "search[#{column.name}]" %>
      <% value = nil %>
      <% value = search_params[column.name] if search_params %>

            <label for="<%= "search_#{column.name}" %>"><%= column.label %>

        <%= case column.column.type
          when :boolean
            options = [
              ['', ''],
              [as_('True'), 1],
              [as_('False'), 0]
            ]
            select_tag name, options_for_select(options, value)
          else
            text_field_tag(name, value, { :autocomplete => "off", :size => 20, :class => 'text-input', :id => "search_#{column.name}"})
          end
        %>

    <% end -%>

    <%= submit_tag as_('Search'), :class => "submit" %>
    <%= as_('Reset') -%>
    <%= loading_indicator_tag(:action => :search) %>

</form>

<%
# We have to remove search form params before the url_for method call, otherwise it throughs it on
search_params = params[:search]
params.merge!(:search => nil)
href = url_for(params_for(:action => :update_table, :escape => false))
-%>
<%= form_remote_tag :url => href,
                    :method => :get,
                    :before => "addActiveScaffoldPageToHistory('#{href}', '#{params[:controller]}')",
                    :after => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{search_form_id}');",
                    :complete => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{search_form_id}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :update => active_scaffold_content_id,
                    :html => { :href => href, :id => search_form_id, :class => 'search' } %>

    <% active_scaffold_config.field_search.columns.each do |column| -%>
      <% name = "search[#{column.name}]" %>
      <% value = nil %>
      <% value = search_params[column.name] if search_params %>

            <label for="<%= "search_#{column.name}" %>"><%= column.label %>

        <%= case column.column.type
          when :boolean
            options = [
              ['', ''],
              [as_('True'), 1],
              [as_('False'), 0]
            ]
            select_tag name, options_for_select(options, value)
          else
            text_field_tag(name, value, { :autocomplete => "off", :size => 20, :class => 'text-input', :id => "search_#{column.name}"})
          end
        %>

    <% end -%>

    <%= submit_tag as_('Search'), :class => "submit" %>
    <%= as_('Reset') -%>
    <%= loading_indicator_tag(:action => :search) %>

</form>


 r443@bison:  gaspard | 2007-01-30 10:39:38 +0100
 typo

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

<% partial = ['text','title','help'] %>

<%= error_messages_for "node" %>

<%= search_box %>

  <% partial.each_index do |i| %><div id='<%= partial[i] %>_sel' <%= i == 0 ? "class='selected'" : "" %>><%= tlink_to_function(partial[i], "select_tab('#{partial[i]}');") %>
<% end %>

  <% if @node.kind_of?(Document) -%>
    <%= start_form_tag({ :action => "save", :controller=>'version', :rnd=>rnd }, :id => "node_form", :multipart=>true ) %>
  <% else -%>
    <%= start_form_tag({ :action => "save", :controller=>'version' }, :id => "node_form" ) %>
  <% end -%>

  <%= hidden_field 'node', 'v_lang', :value=>@node.v_lang %>
  <%= hidden_field 'node', 'id' %>
  <%= hidden_field 'node', 'v_id' %>

<input type="submit" onClick="$('loader').style.visibility = 'visible';" value='<%= transb('validate') %>'/>

<%= submit_to_remote('save', transb('save'), :url=>{:action => 'save_text', :controller=>'version', :id=>@node[:id]}) %>

<a href='#' onClick='uploader=window.open("<%= url_for :controller=>'document', :action=>'new', :parent_id=>@node %>", "uploader", "location=1,width=400,height=300");uploader.opener = opener;return false;'><%= transb('btn_add_document')%>

<% partial.each_index do |i| %><div id='<%= partial[i] %>' <%= i == 0 ? "" : "style='display:none;'" %>>
  <%= render :partial=>"templates/forms/#{partial[i]}" %>

<% end %>

<%= end_form_tag %>

<%#= css_edit %>
<%= javascript_start %>
var current_tab = $('<%= partial[0] %>');
var current_sel = $('<%= partial[0] %>_sel');
function select_tab(name) {
  var obj = $(name);
  var obj_sel = $(name+'_sel');
  current_tab.style.display = 'none';
  current_sel.className = '';
  current_tab = obj;
  current_sel = obj_sel;
  current_tab.style.display = '';
  current_sel.className = 'selected';
}
new Form.Observer('node_form', 3, function(element,value){ opener.Zena.editor_preview(element,value)});
<%= javascript_end %>

<% partial = ['text','title','help'] %>

<%= error_messages_for "node" %>

<%= search_box %>

  <% partial.each_index do |i| %><div id='<%= partial[i] %>_sel' <%= i == 0 ? "class='selected'" : "" %>><%= tlink_to_function(partial[i], "select_tab('#{partial[i]}');") %>
<% end %>

  <% if @node.kind_of?(Document) -%>
    <%= start_form_tag({ :action => "save", :controller=>'version', :rnd=>rnd }, :id => "node_form", :multipart=>true ) %>
  <% else -%>
    <%= start_form_tag({ :action => "save", :controller=>'version' }, :id => "node_form" ) %>
  <% end -%>

  <%= hidden_field 'node', 'v_lang', :value=>@node.v_lang %>
  <%= hidden_field 'node', 'id' %>
  <%= hidden_field 'node', 'v_id' %>

<%= submit_to_remote('save', transb('save'), :url=>{:action => 'save_text', :controller=>'version', :id=>@node[:id]}) %>

<input type="submit" onClick="$('loader').style.visibility = 'visible';" value='<%= transb('validate') %>'/>

<a href='#' onClick='uploader=window.open("<%= url_for :controller=>'document', :action=>'new', :parent_id=>@node %>", "uploader", "location=1,width=400,height=300");uploader.opener = opener;return false;'><%= transb('btn_add_document')%>

<% partial.each_index do |i| %><div id='<%= partial[i] %>' <%= i == 0 ? "" : "style='display:none;'" %>>
  <%= render :partial=>"templates/forms/#{partial[i]}" %>

<% end %>

<%= end_form_tag %>

<%#= css_edit %>
<%= javascript_start %>
var current_tab = $('<%= partial[0] %>');
var current_sel = $('<%= partial[0] %>_sel');
function select_tab(name) {
  var obj = $(name);
  var obj_sel = $(name+'_sel');
  current_tab.style.display = 'none';
  current_sel.className = '';
  current_tab = obj;
  current_sel = obj_sel;
  current_tab.style.display = '';
  current_sel.className = 'selected';
}
new Form.Observer('node_form', 3, function(element,value){ opener.Zena.editor_preview(element,value)});
<%= javascript_end %>


always put logout link, since it will always be gcx

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

<% if RAILS_ENV == "development" %>
  <% flash[:error] ||= "You are on our development site -- you should NOT be filling in your app or reference here.  Remove the 'dev.' from your url, and email #{$tech_email_only} with how you got here"
  %>

<% end %>

  <%
=begin
  flash[:error] = %|
  There will be a short, approximately 10-20 minutes, scheduled outage between 12pm-2pm PST

  -CIM team, Wed May 7
  |
=end
  %>

    <title>Project Application Tool</title>
    <%= stylesheet_link_tag 'main2', 'connexion_default' %>
    <%= render :partial => "externs/sortable_tables" %>
    <%= javascript_include_tag "prototype", "effects" %>
    <%= render :partial => "externs/load_extern" %>

    <%= connexion_bar if @viewer && session[:login_source] == 'gcx' %>

    <% if RAILS_ENV == 'development' && @debug -%>

debug: <%= @debug -%>

    <% end -%>

      Loading <%=image_tag('spinner.gif')%>

      Saving <%=image_tag('spinner.gif')%>

        <% if @viewer %>

user: <%= @viewer.name %> - <%= link_to "logout", :action => :logout, :controller => :security %>

        <% end %>

        <% if @eg %>

group:
            <%= @eg.to_s_with_eg_path %>
            <%= link_to 'change', scope_event_groups_url %>

        <% end %>

      <% if session[:logo_url] -%>
          <%= image_tag session[:logo_url], :class => 'branding_logo' %>
          Project Application Tool
      <% else %>

Project Application Tool

      <% end -%>

    <% if @viewer %>

          <%= new_item "Your Apps", "your_apps", :list %>
          <% if @show_your_project %>
            <%= new_item "Your Projects", "main", :your_projects %>
          <% end %>
          <% unless @viewer.is_student?(@eg) %>
            <%= new_item "App Processing", "main", :your_applications %>
            <% if @eg && @eg.has_your_campuses %>
              <%= new_item "Your Campuses", "main", :your_campuses %>
	          <% end %>
            <% if @viewer.is_eventgroup_coordinator?(@eg) %>
              <%= new_item "Tools", "tools", :index %>
              <%= new_item "Manage Forms", "forms" %>
              <%= new_item "Manage Groups", "event_groups" %>
            <% end %>
            <%= new_item "Manage Projects", "manage_projects", :list %>
            <%= new_item "Reports", "reports", :index %>
          <% end %>
          <%= new_item "Profiles", "profiles", :index%>

    <% end %>

    <% flash.each do |key, msg| -%>
      <% full_msg = msg %>
      <%= content_tag :div, full_msg, :id => "flash_#{key}", :class => 'error flash' %>
    <% end -%>

    <% @notifications.each do |n| -%>
      <% full_msg = n.message
         full_msg = h(full_msg) unless n.allow_html
         full_msg += "
"

         unless n.no_hide_button || @viewer.nil?
           full_msg += link_to_remote('Hide',
            :url => { :controller => 'notification_acknowledgments',
                      :action => 'create', :notification_id => n.id },
            :success => "$(\"notification_#{n.id}\").fade()"
           )
         end
        %>
      <%= content_tag :div, full_msg, :id => "notification_#{n.id}", :class => 'error flash' %>
    <% end -%>

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

        <%= form_remote_tag :url => { :controller => 'main', :action => :find_people },	:before => "Element.show('loading');", :complete  => "Element.hide('loading');" %>
          Search People:
          <%= text_field 'viewer', 'name', :size => 20, :value => '' %>
          <%= submit_tag "Search" %>
        </form>

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

    <%= render_if_possible(controller.controller_name + "/menu") ||
           (@submenu && render_if_possible(@submenu + "/menu"))
    %>

    <% submenu_items_html = yield :submenu %>
    <% if submenu_items_html && !@eg.nil? %>

          <%= submenu_items_html %>

    <% end %>

        <% if @form && params[:controller] != 'forms' %>
          <%= render_if_possible("qe_forms/form_#{@form}") || render_if_possible(:file => "layouts/form_#{@form}")%>
        <% else %>
          <%= yield %>
        <% end %>

    <% if @eg || @show_contact_emails_override %>

        Questions?

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - judyh@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

				Drime - info@drime.com

			General Inquiries:pat.help@powertochange.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>

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

<% if RAILS_ENV == "development" %>
  <% flash[:error] ||= "You are on our development site -- you should NOT be filling in your app or reference here.  Remove the 'dev.' from your url, and email #{$tech_email_only} with how you got here"
  %>

<% end %>

  <%
=begin
  flash[:error] = %|
  There will be a short, approximately 10-20 minutes, scheduled outage between 12pm-2pm PST

  -CIM team, Wed May 7
  |
=end
  %>

    <title>Project Application Tool</title>
    <%= stylesheet_link_tag 'main2', 'connexion_default' %>
    <%= render :partial => "externs/sortable_tables" %>
    <%= javascript_include_tag "prototype", "effects" %>
    <%= render :partial => "externs/load_extern" %>

    <%= connexion_bar if @viewer && session[:login_source] == 'gcx' %>

    <% if RAILS_ENV == 'development' && @debug -%>

debug: <%= @debug -%>

    <% end -%>

      Loading <%=image_tag('spinner.gif')%>

      Saving <%=image_tag('spinner.gif')%>

        <% if @viewer %>

user:
            <%= @viewer.name %>
            <% unless session[:login_source] == 'gcx' -%>
               - <%= link_to "logout", :action => :logout, :controller => :security %>
            <% end %>

        <% end %>

        <% if @eg %>

group:
            <%= @eg.to_s_with_eg_path %>
            <%= link_to 'change', scope_event_groups_url %>

        <% end %>

      <% if session[:logo_url] -%>
          <%= image_tag session[:logo_url], :class => 'branding_logo' %>
          Project Application Tool
      <% else %>

Project Application Tool

      <% end -%>

    <% if @viewer %>

          <%= new_item "Your Apps", "your_apps", :list %>
          <% if @show_your_project %>
            <%= new_item "Your Projects", "main", :your_projects %>
          <% end %>
          <% unless @viewer.is_student?(@eg) %>
            <%= new_item "App Processing", "main", :your_applications %>
            <% if @eg && @eg.has_your_campuses %>
              <%= new_item "Your Campuses", "main", :your_campuses %>
	          <% end %>
            <% if @viewer.is_eventgroup_coordinator?(@eg) %>
              <%= new_item "Tools", "tools", :index %>
              <%= new_item "Manage Forms", "forms" %>
              <%= new_item "Manage Groups", "event_groups" %>
            <% end %>
            <%= new_item "Manage Projects", "manage_projects", :list %>
            <%= new_item "Reports", "reports", :index %>
          <% end %>
          <%= new_item "Profiles", "profiles", :index%>

    <% end %>

    <% flash.each do |key, msg| -%>
      <% full_msg = msg %>
      <%= content_tag :div, full_msg, :id => "flash_#{key}", :class => 'error flash' %>
    <% end -%>

    <% @notifications.each do |n| -%>
      <% full_msg = n.message
         full_msg = h(full_msg) unless n.allow_html
         full_msg += "
"

         unless n.no_hide_button || @viewer.nil?
           full_msg += link_to_remote('Hide',
            :url => { :controller => 'notification_acknowledgments',
                      :action => 'create', :notification_id => n.id },
            :success => "$(\"notification_#{n.id}\").fade()"
           )
         end
        %>
      <%= content_tag :div, full_msg, :id => "notification_#{n.id}", :class => 'error flash' %>
    <% end -%>

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

        <%= form_remote_tag :url => { :controller => 'main', :action => :find_people },	:before => "Element.show('loading');", :complete  => "Element.hide('loading');" %>
          Search People:
          <%= text_field 'viewer', 'name', :size => 20, :value => '' %>
          <%= submit_tag "Search" %>
        </form>

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

    <%= render_if_possible(controller.controller_name + "/menu") ||
           (@submenu && render_if_possible(@submenu + "/menu"))
    %>

    <% submenu_items_html = yield :submenu %>
    <% if submenu_items_html && !@eg.nil? %>

          <%= submenu_items_html %>

    <% end %>

        <% if @form && params[:controller] != 'forms' %>
          <%= render_if_possible("qe_forms/form_#{@form}") || render_if_possible(:file => "layouts/form_#{@form}")%>
        <% else %>
          <%= yield %>
        <% end %>

    <% if @eg || @show_contact_emails_override %>

        Questions?

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - judyh@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

				Drime - info@drime.com

			General Inquiries:pat.help@powertochange.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>


ActionItem0: only include comatose stuff if they are actually needed.

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

    <%= javascript_include_tag :defaults %>
    <%= design_all_header_tags %>
    <% if params[:controller] == 'comatose_admin' %>
      <%= stylesheet_link_tag 'comatose_admin' %>
      <%= javascript_include_tag 'comatose_admin' %>
    <% end %>

    <%= image_tag 'loading.gif', :id => 'spinner', :style => "display:none; float:right;" %>

          <%= _('Skip to:') %>
          <%= _('Content') %> |
          <%= _('Navigation') %> |
          <%= _('Footer') %>

          <%= header %>

        <% unless flash[:notice].nil? %>

            <%= flash[:notice] %>

        <% end %>

          <%= design_display(yield) %>

          <%= footer %>
          <%= design_display_icon('back', _('Back') , :action => 'list')%>

    <%= javascript_include_tag :defaults %>
    <%= design_all_header_tags %>
    <%= stylesheet_link_tag 'comatose_admin' %>
    <%= javascript_include_tag 'comatose_admin' %>

    <%= image_tag 'loading.gif', :id => 'spinner', :style => "display:none; float:right;" %>

          <%= _('Skip to:') %>
          <%= _('Content') %> |
          <%= _('Navigation') %> |
          <%= _('Footer') %>

          <%= header %>

          <%= flash[:notice] %>

          <%= design_display(yield) %>

          <%= footer %>
          <%= design_display_icon('back', _('Back') , :action => 'list')%>


ActionItem295: including the labels of the radio boxes

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

<%= _('Edit profile') %>

<%= error_messages_for :profile %>

<% labelled_form_for :profile_data, @profile, :html => { :multipart => true } do |f| %>
  <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

<%= _('Change picture') %>

    <% f.fields_for :image_builder, @profile.image do |i| %>
      <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %>
    <% end %>

<%= _('Privacy options') %>

    <%= _('This profile is:') %>

      <%= radio_button 'profile_data', 'public_profile', 'true' %>
      <%= _('Public') %>

      <%= radio_button 'profile_data', 'public_profile', 'false' %>
      <%= _('Private') %>

    <%= _("This profile's content is:") %>

      <%= radio_button 'profile_data', 'public_content', 'true' %>
      <%= _('Public') %>

      <%= radio_button 'profile_data', 'public_content', 'false' %>
      <%= _('Private') %>

  <%= select_categories(:profile_data, _('Select the categories of your interest'), 1) %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
    <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
  <% end %>
<% end %>

<%# = generate_form :info, @info, {...} %>

<%= _('Edit profile') %>

<%= error_messages_for :profile %>

<% labelled_form_for :profile_data, @profile, :html => { :multipart => true } do |f| %>
  <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

<%= _('Change picture') %>

    <% f.fields_for :image_builder, @profile.image do |i| %>
      <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %>
    <% end %>

<%= _('Privacy options') %>

    <%= _('This profile is:') %>

      <%= radio_button 'profile_data', 'public_profile', 'true' %>

      <%= radio_button 'profile_data', 'public_profile', 'false' %>

    <%= _("This profile's content is:") %>

      <%= radio_button 'profile_data', 'public_content', 'true' %>

      <%= radio_button 'profile_data', 'public_content', 'false' %>

  <%= select_categories(:profile_data, _('Select the categories of your interest'), 1) %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
    <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
  <% end %>
<% end %>

<%# = generate_form :info, @info, {...} %>


git-svn-id: svn+ssh://ko.meadowy.net/home/svn/inside/kozuchi/trunk@333 c938ebee-df10-0410-95fc-be8c4b0ebdd5

<%= render :partial => "shared/doctype" %>

      <% # とりあえず毎回作る %>
      <% menu_tree, current_menu = load_menu(:controller => "/" + controller.class.controller_path, :action => controller.action_name) %>
      <% title = menu_tree ? menu_tree.name : controller.class.controller_name %>
      <% sub_title = current_menu ? current_menu.name : controller.action_name %>

    <%= render :partial => "shared/html_header" %>
    <title>
      <%= title %> - <%= sub_title %>
    </title>
    <%= stylesheet_link_tag 'common' %>
    <%= stylesheet_link_tag 'all_media', :media => :all %>
    <%= stylesheet_link_tag 'book' %>
    <%= stylesheet_link_tag 'print', :media => :print %>
    <%= javascript_include_tag "prototype" %>
    <%= javascript_include_tag "book" %>
    <%= javascript_include_tag "dragdrop" %>
    <%= javascript_include_tag "effects" %>
    <%= render :partial => "shared/google_analytics" %>

        <%= link_to(image_tag("/images/izumo_kozuchi.png", :border => 0, :width => 32, :height => 32), :controller => 'user', :action => 'home') %>

        <%= title %>
         - <%= sub_title %>

        <% h_menues = header_menues%>
        <% for menu in h_menues %>
          <% if menu_tree && menu.name != menu_tree.name %>
            <%= link_to(menu.name, menu.url_option)%>
          <% else %>
            <%= menu.name %>
          <% end %>
          <% break if menu == h_menues.last %>
           |
        <% end %>

      <div id="user_and_today" class="top_box" <%= user_color_style %>>
        <%= session[:user].login_id %>さん

        <%= format_date(Time.now) %>

      <% if menu_tree %>
      <% for menu in menu_tree %>
        <div class="side_menu<%= '_current' if menu == current_menu %>">
          <% if menu == current_menu %>
            <%= menu.name %>
          <% else %>
            <%= link_to(menu.name, url_for(menu.url_option)) %>
          <% end %>

      <% end %>
      <% end %>

      <%= yield %>

    <%= render :partial => "shared/footer" %>

<%= render :partial => "shared/doctype" %>

      <% # とりあえず毎回作る %>
      <% menu_tree, current_menu = load_menu(:controller => "/" + controller.class.controller_path, :action => controller.action_name) %>
      <% title = menu_tree ? menu_tree.name : controller.class.controller_name %>
      <% sub_title = current_menu ? current_menu.name : controller.action_name %>

    <%= render :partial => "shared/html_header" %>
    <title>
      <%= title %> - <%= sub_title %>
    </title>
    <%= stylesheet_link_tag 'common' %>
    <%= stylesheet_link_tag 'all_media', :media => :all %>
    <%= stylesheet_link_tag 'book' %>
    <%= stylesheet_link_tag 'print', :media => :print %>
    <%= javascript_include_tag "prototype" %>
    <%= javascript_include_tag "book" %>
    <%= javascript_include_tag "dragdrop" %>
    <%= javascript_include_tag "effects" %>
    <%= render :partial => "shared/google_analytics" %>

        <%= link_to(image_tag("/images/izumo_kozuchi.png", :border => 0, :width => 32, :height => 32), :controller => 'user', :action => 'home') %>

        <%= title %>
         - <%= sub_title %>

        <% h_menues = header_menues%>
        <% for menu in h_menues %>
          <% if menu_tree && menu.name != menu_tree.name %>
            <%= link_to(menu.name, menu.url_option)%>
          <% else %>
            <%= menu.name %>
          <% end %>
          <% break if menu == h_menues.last %>
           |
        <% end %>

      <div id="user_and_today" class="top_box" <%= user_color_style %>>
        <%= session[:user].login_id %>さん
(<%= @user.login_id if @user %>
        <%= format_date(Time.now) %>

      <% if menu_tree %>
      <% for menu in menu_tree %>
        <div class="side_menu<%= '_current' if menu == current_menu %>">
          <% if menu == current_menu %>
            <%= menu.name %>
          <% else %>
            <%= link_to(menu.name, url_for(menu.url_option)) %>
          <% end %>

      <% end %>
      <% end %>

      <%= yield %>

    <%= render :partial => "shared/footer" %>


Hide search button when always_show_search is true

<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%>

    <% new_params = params_for(:action => :table) %>
    <% active_scaffold_config.action_links.each :table do |link| -%>
	  <% next if link.action == 'show_search' && active_scaffold_config.list.always_show_search? %>
      <% next if controller.respond_to? link.security_method and !controller.send(link.security_method) -%>
      <%= render_action_link(link, new_params) -%>
    <% end -%>

    <%= loading_indicator_tag(:action => :table) %>

<% end %>

<%= active_scaffold_config.list.user.label %>

<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%>

    <% new_params = params_for(:action => :table) %>
    <% active_scaffold_config.action_links.each :table do |link| -%>
      <% next if controller.respond_to? link.security_method and !controller.send(link.security_method) -%>
      <%= render_action_link(link, new_params) -%>
    <% end -%>

    <%= loading_indicator_tag(:action => :table) %>

<% end %>

<%= active_scaffold_config.list.user.label %>


fixing css class on update form (was still 'create')

<% url_options = params_for(:action => :update) -%>
<%=
if request.xhr?
  if active_scaffold_config.update.multipart?  # file_uploads
    form_remote_upload_tag url_options.merge({:iframe => true}),
                           :id => element_form_id(:action => :update),
                           :class => 'update',
                           :method => :put
  else
    form_remote_tag :url => url_options,
                    :after => "$('#{loading_indicator_id(:action => :update, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{element_form_id(:action => :update)}');",
                    :complete => "$('#{loading_indicator_id(:action => :update, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{element_form_id(:action => :update)}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :html => {
                      :href => url_for(url_options),
                      :id => element_form_id(:action => :update),
                      :class => 'update',
                      :method => :put
                    }
  end
else
  form_tag url_options,
           :id => element_form_id(:action => :update),
           :multipart => active_scaffold_config.update.multipart?,
           :class => 'update',
           :method => :put
end
%>

<%= @record.to_label.nil? ? active_scaffold_config.update.label : as_('Update %s', @record.to_label) %>

  <% if request.xhr? -%>
    <div id="<%= element_messages_id(:action => :update) %>" class="messages-container"><%= error_messages_for :record %>

  <% else -%>
    <%= render :partial => 'form_messages' %>
  <% end -%>

  <%= render :partial => 'form', :locals => { :columns => active_scaffold_config.update.columns } %>

    <%= submit_tag as_('Update'), :class => "submit" %>
    <%= link_to as_('Cancel'), params_for(:action => 'list'), :class => 'cancel' %>
    <%= loading_indicator_tag(:action => :update, :id => params[:id]) %>

</form>

<% url_options = params_for(:action => :update) -%>
<%=
if request.xhr?
  if active_scaffold_config.update.multipart?  # file_uploads
    form_remote_upload_tag url_options.merge({:iframe => true}),
                           :id => element_form_id(:action => :update),
                           :class => 'update',
                           :method => :put
  else
    form_remote_tag :url => url_options,
                    :after => "$('#{loading_indicator_id(:action => :update, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{element_form_id(:action => :update)}');",
                    :complete => "$('#{loading_indicator_id(:action => :update, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{element_form_id(:action => :update)}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :html => {
                      :href => url_for(url_options),
                      :id => element_form_id(:action => :update),
                      :class => 'update',
                      :method => :put
                    }
  end
else
  form_tag url_options,
           :id => element_form_id(:action => :update),
           :multipart => active_scaffold_config.update.multipart?,
           :class => 'create',
           :method => :put
end
%>

<%= @record.to_label.nil? ? active_scaffold_config.update.label : as_('Update %s', @record.to_label) %>

  <% if request.xhr? -%>
    <div id="<%= element_messages_id(:action => :update) %>" class="messages-container"><%= error_messages_for :record %>

  <% else -%>
    <%= render :partial => 'form_messages' %>
  <% end -%>

  <%= render :partial => 'form', :locals => { :columns => active_scaffold_config.update.columns } %>

    <%= submit_tag as_('Update'), :class => "submit" %>
    <%= link_to as_('Cancel'), params_for(:action => 'list'), :class => 'cancel' %>
    <%= loading_indicator_tag(:action => :update, :id => params[:id]) %>

</form>


Subitems links in the cms goes to view page instead of edit page

  <%= _('Content management') %>

<% button_bar(:style => 'margin-bottom: 1em;') do %>
  <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>

  <% if !@article or !@article.blog? %>
    <%= button :newfolder, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %>
    <%= button :newblog, _('New Blog'), :action => 'new', :type => 'Blog', :parent_id => parent_id %>
    <%= button('upload-file', _('Upload files'), :action => 'upload_files', :parent_id => parent_id) %>
  <% end %>
  <%= lightbox_button('new', label_for_new_article(@article), :action => 'new', :parent_id => parent_id) %>
  <%= button(:back, _('Back to control panel'), :controller => 'profile_editor', :action => "index") %>
<% end %>

<% if @article %>

    <%= _('Current folder: ') %>
    <%= link_to profile.identifier, :action => 'index' %>
    <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.slug, :id => item.id)) } %>

<% end %>

  <%# header %>

    <%= _('Name') %>
    <%= _('Type') %>
    <%= _('Actions') %>

  <% if @article %>

        <%= image_tag 'icons-mime/gnome-folder.png' %>
        <% if @article.parent %>
          <%= link_to '.. (' + _('parent folder') + ')', :action => 'view', :id => @article.parent.id %>
        <% else %>
          <%= link_to '.. (' + _('parent folder') + ')', :action => 'index' %>
        <% end %>

      <%= Folder.short_description %>

  <% end %>

  <%# folders %>
  <% for folder in @folders %>

        <%= image_tag(icon_for_article(folder)) %>
        <%= link_to folder.name, :action => 'view', :id => folder.id %>

        <%= folder.class.short_description %>

        <%= button_without_text :edit, _('Properties'), :action => 'edit', :id => folder.id %>
        <%= button_without_text :eyes, _('Public view'), folder.url %>
        <% if !environment.enabled?('cant_change_homepage') %>
          <%= button_without_text :home, _('Use as homepage'), { :action => 'set_home_page', :id => folder.id }, :method => :post %>
        <% end %>
        <%= button_without_text :delete, _('Delete'), { :action => 'destroy', :id => folder.id }, :method => :post, :confirm => _('Are you sure that you want to remove this folder? Note that all the items inside it will also be removed!') %>

  <% end %>

  <%# non-folder subitems %>
  <% for item in @subitems %>

        <%= image_tag(icon_for_article(item)) %>
        <%= link_to short_filename(item.name,30), item.url %>

        <%= item.class.short_description %>

        <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => item.id %>
        <%= button_without_text :eyes, _('Public view'), item.url %>
        <% if profile.person? %>
          <%= button_without_text :spread, _('Spread this'), :action => 'publish', :id => item.id %>
        <% end %>
        <% if !environment.enabled?('cant_change_homepage') %>
          <%= button_without_text :home, _('Use as homepage'), { :action => 'set_home_page', :id => item.id }, :method => :post %>
        <% end %>
        <%= button_without_text :delete, _('Delete'), { :action => 'destroy', :id => item.id }, :method => :post, :confirm => _('Are you sure that you want to remove this item?') %>

  <% end %>

  <%= _('Content management') %>

<% button_bar(:style => 'margin-bottom: 1em;') do %>
  <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>

  <% if !@article or !@article.blog? %>
    <%= button :newfolder, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %>
    <%= button :newblog, _('New Blog'), :action => 'new', :type => 'Blog', :parent_id => parent_id %>
    <%= button('upload-file', _('Upload files'), :action => 'upload_files', :parent_id => parent_id) %>
  <% end %>
  <%= lightbox_button('new', label_for_new_article(@article), :action => 'new', :parent_id => parent_id) %>
  <%= button(:back, _('Back to control panel'), :controller => 'profile_editor', :action => "index") %>
<% end %>

<% if @article %>

    <%= _('Current folder: ') %>
    <%= link_to profile.identifier, :action => 'index' %>
    <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.slug, :id => item.id)) } %>

<% end %>

  <%# header %>

    <%= _('Name') %>
    <%= _('Type') %>
    <%= _('Actions') %>

  <% if @article %>

        <%= image_tag 'icons-mime/gnome-folder.png' %>
        <% if @article.parent %>
          <%= link_to '.. (' + _('parent folder') + ')', :action => 'view', :id => @article.parent.id %>
        <% else %>
          <%= link_to '.. (' + _('parent folder') + ')', :action => 'index' %>
        <% end %>

      <%= Folder.short_description %>

  <% end %>

  <%# folders %>
  <% for folder in @folders %>

        <%= image_tag(icon_for_article(folder)) %>
        <%= link_to folder.name, :action => 'view', :id => folder.id %>

        <%= folder.class.short_description %>

        <%= button_without_text :edit, _('Properties'), :action => 'edit', :id => folder.id %>
        <%= button_without_text :eyes, _('Public view'), folder.url %>
        <% if !environment.enabled?('cant_change_homepage') %>
          <%= button_without_text :home, _('Use as homepage'), { :action => 'set_home_page', :id => folder.id }, :method => :post %>
        <% end %>
        <%= button_without_text :delete, _('Delete'), { :action => 'destroy', :id => folder.id }, :method => :post, :confirm => _('Are you sure that you want to remove this folder? Note that all the items inside it will also be removed!') %>

  <% end %>

  <%# non-folder subitems %>
  <% for item in @subitems %>

        <%= image_tag(icon_for_article(item)) %>
        <%= link_to short_filename(item.name,30), :action => 'edit', :id => item.id %>

        <%= item.class.short_description %>

        <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => item.id %>
        <%= button_without_text :eyes, _('Public view'), item.url %>
        <% if profile.person? %>
          <%= button_without_text :spread, _('Spread this'), :action => 'publish', :id => item.id %>
        <% end %>
        <% if !environment.enabled?('cant_change_homepage') %>
          <%= button_without_text :home, _('Use as homepage'), { :action => 'set_home_page', :id => item.id }, :method => :post %>
        <% end %>
        <%= button_without_text :delete, _('Delete'), { :action => 'destroy', :id => item.id }, :method => :post, :confirm => _('Are you sure that you want to remove this item?') %>

  <% end %>


Fix CSS for Windows (closes #4564)

Fix CSS for Windows (closes #4564)

git-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@4164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de

<html>
<head>
  <title><%= @scaffold_class.wsdl_service_name %> Web Service</title>
  <style>
    body { background-color: #fff; color: #333; }

    body, p, ol, ul, td {
      font-family: verdana, arial, helvetica, sans-serif;
      font-size:   13px;
      line-height: 18px;
    }

    pre {
      background-color: #eee;
      padding: 10px;
      font-size: 11px;
    }

    a { color: #000; }
    a:visited { color: #666; }
    a:hover { color: #fff; background-color:#000; }

    .fieldWithErrors {
      padding: 2px;
      background-color: red;
      display: table;
    }

    #errorExplanation {
      width: 400px;
      border: 2px solid red;
      padding: 7px;
      padding-bottom: 12px;
      margin-bottom: 20px;
      background-color: #f0f0f0;
    }

    #errorExplanation h2 {
      text-align: left;
      font-weight: bold;
      padding: 5px 5px 5px 15px;
      font-size: 12px;
      margin: -7px;
      background-color: #c00;
      color: #fff;
    }

    #errorExplanation p {
      color: #333;
      margin-bottom: 0;
      padding: 5px;
    }

    #errorExplanation ul li {
      font-size: 12px;
      list-style: square;
    }
  </style>
</head>
<body>

<%= @content_for_layout %>

</body>
</html>


Add OKFN to help/credits

Add OKFN to help/credits

<% @title = "Credit where credit's due" %>

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

<%= @title%>

What made FYI possible? #

Nothing would have happened without Open New Zealand, which funds the servers FYI runs on.

The encouragement of Nat Torkington, Ed Corkery, and the technical assistance of Rob Coup turned this from an idea to something real.

Design work from Greer Mitchell and advice from Andrew Ecclestone was gratefully accepted.

The Alaveteli software from MySociety.

The amazingly generous donation of Open Knowledge Foundation Labs of server space.

And the site administrator, Rowan Crawford, standing on the shoulders of giants.

Can I help out? #

Yes please! We're built out of our supporters and volunteers.

You can make a donation:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="<%=MySociety::Config.get('PAYPAL_CODE')%>">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

</form>

Help people find successful requests, and monitor performance of authorities, by
        playing the categorisation game.

Find out OIA email addresses of authorities that we're missing.

Write a blog post about either FYI or an interesting request that you've
        found. Post about it on a forum that you frequent. Tell friends about it.

If you're
        a programmer, get the source code for our parent project, Alaveteli
        and tell us about patches we can pull. It's made in Ruby on Rails.

Get involved with the Open Government Ninjas.

<% @title = "Credit where credit's due" %>

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

<%= @title%>

What made FYI possible? #

Nothing would have happened without Open New Zealand, which funds the servers FYI runs on.

The encouragement of Nat Torkington, Ed Corkery, and the technical assistance of Rob Coup turned this from an idea to something real.

Design work from Greer Mitchell and advice from Andrew Ecclestone was gratefully accepted.

The Alaveteli software from MySociety.

And me, Rowan Crawford, standing on the shoulders of giants.

Can I help out? #

Yes please! We're built out of our supporters and volunteers.

You can make a donation:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="<%=MySociety::Config.get('PAYPAL_CODE')%>">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

</form>

Help people find successful requests, and monitor performance of authorities, by
        playing the categorisation game.

Find out OIA email addresses of authorities that we're missing.

Write a blog post about either FYI or an interesting request that you've
        found. Post about it on a forum that you frequent. Tell friends about it.

If you're
        a programmer, get the source code for our parent project, Alaveteli
        and tell us about patches we can pull. It's made in Ruby on Rails.

Get involved with the Open Government Ninjas.


Fixed template to point to about page

Fixed template to point to about page

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

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

Skip to: site menu | section menu | main content

e.f.l.

		Edmonton Free Library

Site menu:

		Welcome |

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

		find out more |

Back to top

e.f.l.

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

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

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

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

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

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

					<% if flash[:notice] %>

              Notice:

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

					<% elsif flash[:error] %>

              Error:

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

					<% end %>

					<%= yield  %>

Back to top

Copy away mofos | Design by Andreas Viklund