remove some stuff that accidentally snuck into a merge commit. I seem to have leaned on the keyboard at some point during a merge

<%
   object ||= nil
   set_parameters_for_sharing_form object
   disable_advanced_view ||= nil
   disable_can_publish_check ||= false
   show_advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?
   default_projects_access_type = @resource.is_asset? ? Policy::ACCESSIBLE : Policy::EDITING
   default_consortium_access_type = Policy::VISIBLE
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>

    <%= help_icon("Here you can specify who can see#{', download' if @resource.is_downloadable?} and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view the summary of<% if @resource.is_downloadable? %>, get access to the content of,<% end %> and edit the <%= @resource_type -%>.
        <%= link_to_function "More info " + expand_image, visual_effect(:toggle_blind, "more_sharing_info", :duration => 0.3) -%>

          You may:

Keep the <%= @resource_type -%> private, and only visible to yourself.

Share within the selected projects and with all other users that are a member of a <%= Seek::Config.project_name %> project.

          <% if try_block{@resource.can_publish?} %>

Share with the all visitors (including anonymous visitors with no login)

          <% end %>
          <% if !disable_advanced_view%>

Define more fine-grained sharing in the Advanced sharing: you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

          <% end %>

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
            <input type="hidden" id='access_type_select_<%= Policy::PRIVATE -%>' name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
            <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                                value="<%= Policy::PRIVATE -%>" type="radio" />
            - Keep this <%= @resource_type -%> private (only visible to you)

          <%= additional_advanced_permissions_included @resource, Policy::PRIVATE -%>

Or share it with..

            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]" value="<%= Policy::ALL_SYSMO_USERS -%>" />
            - Members of projects associated with this <%= @resource_type -%>:

             <select name="sharing[your_proj_access_type]" id="sharing_your_proj_access_type">
                 <%= policy_selection_options([Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource, your_project_access_type(@policy, @resource) || default_projects_access_type) -%>
             </select>

            ... and all other project members:
             <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
               :sharing_scope => Policy::ALL_SYSMO_USERS, :access_type => (@resource.respond_to?(:policy) && @resource.policy.try(:sharing_scope)==Policy::ALL_SYSMO_USERS ? @access_mode : default_consortium_access_type), :access_type_options=>[Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING] } -%>
             <%= additional_advanced_permissions_included @resource, Policy::ALL_SYSMO_USERS -%>

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>" <%= 'disabled="true"' if !disable_can_publish_check && @resource.respond_to?(:can_publish?) && !@resource.can_publish? -%>/>
            - All visitors (including anonymous visitors with no login):

           <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::EVERYONE,
            :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>
           <%= additional_advanced_permissions_included @resource, Policy::EVERYONE -%>

    <% if @resource.new_record? && @resource.errors.empty? -%>

    <% end -%>

    <% if !disable_advanced_view %>
      <%= link_to_function "Advanced permissions " + expand_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'none;' : 'block;'), :id =>'advanced_sharing_expand_image' do |page|
          page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
          page["advanced_sharing_expand_image"].toggle
          page["advanced_sharing_collapse_image"].toggle
      end
      -%>
      <%= link_to_function "Advanced permissions " + collapse_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'block;' : 'none;'), :id =>'advanced_sharing_collapse_image' do |page|
          page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
          page["advanced_sharing_expand_image"].toggle
          page["advanced_sharing_collapse_image"].toggle
      end
      -%>

      <div id="advanced sharing" class='sharing_box_form' style="display:<%= show_advanced_permissions ? 'block;' : 'none;' -%>">

Additional fine-grained sharing permissions

              So far you have selected to share this <%= @resource_type -%> with:

              Loading...

              Build up the list of people and groups to share with.
              Select from the options below and click "Add" to apply
              your choices and add collaborators to your current selection:

                <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
                Favourite Groups

                  <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
                  <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

                  <%= select_tag "favourite_group_select", f_group_select_options, :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

                  <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                              :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

                  <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit(@resource.class.name) -%>

                  <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                    <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new(@resource.class.name) -%>

                <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
                Projects and Institutions

                  <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

                  Step 1
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 2
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 3

                    <input type="hidden" id="proj_select_step_index" value="1">

                      <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                      Step 1: Select a project
                      <%= select("proj_project", "select",
                                 Project.find(:all).collect { |p| [p.name, p.id] },
                                 {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 2: Select scope of the project
                      <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 3: Choose access rights, review and
                      submit

                      <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                        <%= policy_selection_options [Policy::NO_ACCESS, Policy::VISIBLE, Policy::ACCESSIBLE, Policy::EDITING, Policy::MANAGING], @resource -%>
                      </select>

                        <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                          <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link(@resource.class.name) -%>

                <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
                Individual People

                    Please type names of people to share this <%= @resource_type -%> with into the box below -
                    suggestions will be displayed as you type.
                    Select access rights from drop-down menu; these will be applied to all chosen people.
                    Clicking "Add" will add selected people to the list.

                          ^_^<input type="text" id="ip_hidden_input" tabindex="-1">

                            <input type="text" size="1" tabindex="" id="ip_autocomplete_input"/>

Type the name of a friend, friend list, or email address

                        <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                          <%= policy_selection_options nil, @resource -%>
                        </select>

                        <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>

  <% end %>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>


Fix misspelling on domain setup page.

Fix misspelling on domain setup page.

Setup Domain: <%= @domain.name %>

<% admin_form_for :domain, @domain, :styled_form => {:no_translate => true} do |f| %>
  <% if @domain.domain_type == 'redirect' %>
    <%= f.text_field :redirect, :label => 'Redirect To' %>
    <%= f.submit_tag 'Setup' %>
  <% else %>
    <%= f.text_field :max_file_storage, :unit => 'MB', :description => "%s remaining" / number_to_human_size(@domain.client.available_file_storage.megabytes, :precision => 2), :vertical => true %>
    <%= f.radio_buttons :www_prefix, [['Use www. prefix',true ],['No www. prefix',false]] ,  :label => 'WWW Prefix',:single => true, :vertical => true, :label => 'Site should use a www prefix' %>
    <%= f.radio_buttons :active, [['Site is active',true ],['Site is inactive',false]] , :single => true, :description => 'If the site is inactive only the /website admin interface will be accessible', :vertical => true, :label => 'Should the site be live at the start' %>
    <%= f.select :database, @database_options, :label => 'Configuration Options' %>
    <%= f.submit_tag 'Setup' %>
  <% end -%>
<% end -%>

Setup Domain: <%= @domain.name %>

<% admin_form_for :domain, @domain, :styled_form => {:no_translate => true} do |f| %>
  <% if @domain.domain_type == 'redirect' %>
    <%= f.text_field :redirect, :label => 'Redirect To' %>
    <%= f.submit_tag 'Setup' %>
  <% else %>
    <%= f.text_field :max_file_storage, :unit => 'MB', :description => "%s remaining" / number_to_human_size(@domain.client.available_file_storage.megabytes, :precision => 2), :vertical => true %>
    <%= f.radio_buttons :www_prefix, [['Use www. prefix',true ],['No www. prefix',false]] ,  :label => 'WWW Prefix',:single => true, :vertical => true, :label => 'Site should use a www prefix' %>
    <%= f.radio_buttons :active, [['Site is active',true ],['Site is inactive',false]] , :single => true, :description => 'If the site is inactive only the /website admin interface will be accessible', :vertical => true, :label => 'Should the site be life at the start' %>
    <%= f.select :database, @database_options, :label => 'Configuration Options' %>
    <%= f.submit_tag 'Setup' %>
  <% end -%>
<% end -%>


figure out links issue

figure out links issue

Questionnaires

<%= javascript_include_tag "layout.js" %>

    <%= link_to_function "Create questionnaire", "selectTab('create_questionnaire');"%>

    <%= link_to_function "Import questionnaire", "selectTab('import_questionnaire');"%>

Create a new questionnaire

		<% ae_form_for(:questionnaire, @questionnaire, :url => questionnaires_path, :html => {:id => "create_questionnaire"}) do |f| %>
		  <%= f.text_field "title" %>
			<%= submit_tag "Create" %>
		<% end %>

Import a questionnaire

	  <% form_tag({:controller => "jqml", :action => 'import'}, :multipart => true) do %>
		  JQML file to import
		  <input type="file" name="file" />
			<%= submit_tag "Import" %>
		<% end %>

<% p = logged_in? ? logged_in_person : nil-%>

	<% for questionnaire in @questionnaires %>
		<%  links = []
				if questionnaire.is_open
					links << link_to("Answer", :controller => "answer", :action => "index", :id => questionnaire.id)
				end
				if p
					if p.permitted?(questionnaire, "edit")
						links << link_to('Edit', edit_questionnaire_path(questionnaire))
					end
					if p.permitted?(questionnaire, "view_answers")
						links << link_to(pluralize(questionnaire.responses.count, "Response"), :controller => 'analyze', :action => 'responses', :id => questionnaire)
					end
					if p.permitted?(questionnaire, "destroy")
						links << link_to('Delete', questionnaire_path(questionnaire), :confirm => 'Are you sure?', :method => :delete)
					end
				end
				if questionnaire.is_open? or (p and p.permitted?(questionnaire, "edit"))
					links << link_to('Export', questionnaire_path(questionnaire) + ".xml")
				end
		  -%>
		<% if links.length > -1 -%>
			<% authors = questionnaire.permitted_people("edit").collect {|p| p.name}.join(", ") -%>

<%=h questionnaire.title %>

				<% if authors.length > 0 -%>

		      By <%=h authors %>
				<% end -%>

					<%= pluralize(questionnaire.pages.count, "page") %>

					<%= pluralize(questionnaire.fields.count, "question") %>

				  <%= links.join(" ") %>

		<% end -%>
	<% end %>

Questionnaires

<%= javascript_include_tag "layout.js" %>

    <%= link_to_function "Create questionnaire", "selectTab('create_questionnaire');"%>

    <%= link_to_function "Import questionnaire", "selectTab('import_questionnaire');"%>

Create a new questionnaire

		<% ae_form_for(:questionnaire, @questionnaire, :url => questionnaires_path, :html => {:id => "create_questionnaire"}) do |f| %>
		  <%= f.text_field "title" %>
			<%= submit_tag "Create" %>
		<% end %>

Import a questionnaire

	  <% form_tag({:controller => "jqml", :action => 'import'}, :multipart => true) do %>
		  JQML file to import
		  <input type="file" name="file" />
			<%= submit_tag "Import" %>
		<% end %>

<% p = logged_in? ? logged_in_person : nil-%>

	<% for questionnaire in @questionnaires %>
		<%  links = []
				if questionnaire.is_open
					links << link_to("Answer", :controller => "answer", :action => "index", :id => questionnaire.id)
				end
				if p
					if p.permitted?(questionnaire, "edit")
						links << link_to('Edit', edit_questionnaire_path(questionnaire))
					end
					if p.permitted?(questionnaire, "view_answers")
						links << link_to(pluralize(questionnaire.responses.count, "Response"), :controller => 'analyze', :action => 'responses', :id => questionnaire)
					end
					if p.permitted?(questionnaire, "destroy")
						links << link_to('Delete', questionnaire_path(questionnaire), :confirm => 'Are you sure?', :method => :delete)
					end
				end
				if questionnaire.is_open? or (p and p.permitted?(questionnaire, "edit"))
					links << link_to('Export', questionnaire_path(questionnaire) + ".xml")
				end
		  -%>
		<% if links.length > 0 -%>
			<% authors = questionnaire.permitted_people("edit").collect {|p| p.name}.join(", ") -%>

<%=h questionnaire.title %>

				<% if authors.length > 0 -%>

		      By <%=h authors %>
				<% end -%>

					<%= pluralize(questionnaire.pages.count, "page") %>

					<%= pluralize(questionnaire.fields.count, "question") %>

				  <%= links.join(" ") %>

		<% end -%>
	<% end %>


Close stray paragraph tag to stop spec have_match() complaining

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

<% if @info_request.awaiting_description || @requires_admin_describe %>

    <%= 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 'Pledge with others', "http://www.pledgebank.com"%>

        <%= link_to '', "http://petitions.number10.gov.uk"%>
        <%= link_to 'Petition the PM', "http://petitions.number10.gov.uk"%>

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

    <% if !@xapian_similar.nil? && @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 %>

Are you the owner of
     any commercial copyright on this page?

<%=@title%>

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

    <% 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 prompt but
        <%= link_to "no later", about_url + "#quickly_response" %>
        than <%= simple_date(@info_request.date_response_required_by) %>.

        <% if @info_request.days_overdue > 14 %>
            They are <%= @info_request.days_overdue.to_i %> days late, you
            can complain by
            <%= link_to "requesting an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>.
        <% end %>

    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was 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 == 'gone_postal' %>
        The authority would like to / has responded by post to this request.
    <% elsif @status == 'internal_review' %>
        Waiting for an internal review by <%= public_body_link(@info_request.public_body) %> of their handling of this request.
    <% elsif @status == 'error_message' %>
        There was a delivery error or similar, which needs fixing by the WhatDoTheyKnow team.
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% elsif @status == 'user_withdrawn' %>
        This request has been withdrawn by the person who made it.
        There may be an explanation in an annotation below.
    <% else %>
        <% raise "unknown status " + @status %>
    <% end %>

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

    <% if @info_request.awaiting_description %>

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

    <% end %>

Things to do with this request

            <%= link_to "Add an annotation", new_comment_url(:url_title => @info_request.url_title) %> (to help
            the requester or others)

            <%=h @info_request.user.name %> only:
            <% if @last_response.nil? %>
                <%= link_to "Send follow up to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %>
            <% else %>
                <%= link_to "Reply to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %>
            <% end %>
            |
            <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>

            <%=h @info_request.public_body.name %> only:
            <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %>


Show whether a trace is public or private in the trace list, so that a user can easily find traces that are private, when they really wanted them to be public. Only show 'in ...tags...', if there are some tags. Improve indentation.

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

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

      <%= h(trace.description) %>

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

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

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

      <%= h(trace.description) %>

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


DRY update

DRY update

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

  <%= render(:partial => 'layouts/header') %>

  <body class="<%= @controller.controller_name %>">

          <% render_rounded_line do %>
            <%= link_to(_('Home'), home_url) %> |
            <%= link_to(_('Search'), search_url) %> |
            <% if logged_in? %>
              <%= link_to(_('%{user_name}\'s Dashboard') % { :user_name => h(current_user.first_name) }, :controller => '/dashboard') %> |

              <% if current_user.is_root? %>
                <%= link_to(_('Admin'), :controller => '/admin') %> |
              <% end %>

              <%= help_link %> |
              <%= link_to_function(_('Logout')) {|p| p << visual_effect(:toggle_slide, :confirm_logout)} %>
            <% else %>
              <%= help_link %> |
              <%= link_to(_('Login'), :controller => '/account', :action => 'login') %>
            <% end %>
          <% end %>

          <% if logged_in? %>
            <%= generate_fast_form(:id => 'confirm_logout',
                                   :label => _("Are you sure you want to logout?"),
                                   :button => _('OK'), :cancel => true, :field => :none,
                                   :xhr => false, :url => {:controller => '/account', :action => 'logout'}) %>
          <% end %>

        <% if @project %>

<%= link_to(h(@project.name), project_url(:project => @project)) %>

<%= h(@project.summary) %>

<%= render(:partial => 'layouts/project_menu') %>

        <% else %>

<%= link_to(h(Policy.lookup(:site_name)), home_url) %>

<%= h(Policy.lookup(:site_description)) %>

        <% end %>

          <%= render(:partial => 'layouts/stickies') %>
          <%= yield %>

Powered by <a href="<%= APP_HOME %>"><%= h(APP_NAME) %> from pmade inc.

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

  <%= render(:partial => 'layouts/header') %>

  <body class="<%= @controller.controller_name %>">

          <% render_rounded_line do %>
            <% if logged_in? %>
              <%= link_to(_('Home'), home_url) %> |
              <%= link_to(_('Search'), search_url) %> |
              <%= link_to(_('%{user_name}\'s Dashboard') % { :user_name => h(current_user.first_name) }, :controller => '/dashboard') %> |

              <% if current_user.is_root? %>
                <%= link_to(_('Admin'), :controller => '/admin') %> |
              <% end %>

              <%= help_link %> |
              <%= link_to_function(_('Logout')) {|p| p << visual_effect(:toggle_slide, :confirm_logout)} %>
            <% else %>
              <%= link_to(_('Home'), home_url) %> |
              <%= link_to(_('Search'), search_url) %> |
              <%= help_link %> |
              <%= link_to(_('Login'), :controller => '/account', :action => 'login') %>
            <% end %>
          <% end %>

          <% if logged_in? %>
            <%= generate_fast_form(:id => 'confirm_logout',
                                   :label => _("Are you sure you want to logout?"),
                                   :button => _('OK'), :cancel => true, :field => :none,
                                   :xhr => false, :url => {:controller => '/account', :action => 'logout'}) %>
          <% end %>

        <% if @project %>

<%= link_to(h(@project.name), project_url(:project => @project)) %>

<%= h(@project.summary) %>

<%= render(:partial => 'layouts/project_menu') %>

        <% else %>

<%= link_to(h(Policy.lookup(:site_name)), home_url) %>

<%= h(Policy.lookup(:site_description)) %>

        <% end %>

          <%= render(:partial => 'layouts/stickies') %>
          <%= yield %>

Powered by <a href="<%= APP_HOME %>"><%= h(APP_NAME) %> from pmade inc.


add ministrynet help

add ministrynet help

<!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><%= application_title %></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' %>
          <%= application_title %>
      <% else %>

<%= application_title %>

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

        MinistryNet - ministrynet@ccci.org

			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><%= application_title %></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' %>
          <%= application_title %>
      <% else %>

<%= application_title %>

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


add drime

add drime

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

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

			General Inquiries:pat.help@powertochange.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>


Bugfix.

Bugfix.

<%
	idstr = Knj::Php.md5("#{_get["path"]}_#{_get["smartsize"].to_i}_#{_get["width"].to_i}_#{_get["height"].to_i}_#{_get["maxwidth"].to_i}_#{_get["maxheight"].to_i}_#{_get["rounded_corners"].to_i}_#{_get["border"].to_i}_#{_get["border_color"]}")

	tmp_use = false
	tmp_write = false
	if $knj_webscripts_image_config
		tmp_use = true
		tmp_path = "#{$knj_webscripts_image_config["tmp_path"]}/#{idstr}"
		tmp_exists = File.exists?(tmp_path)
		tmp_write = true if !tmp_exists

		if !tmp_write and tmp_exists
			time_orig = File.mtime(_get["path"])
			time_cache = File.mtime(tmp_path)

			if time_orig > time_cache
				tmp_write = true
			end
		end
	end

	if !_get["path"] or !File.exists?(_get["path"])
    print "File does not exist.\n"
    exit
  end

	if !tmp_use or tmp_write or _get["force"].to_i > 0
    pic = Magick::Image.read(_get["path"]).first
    pic.format = "png"

		width = pic.columns
		height = pic.rows

		height = _get["height"].to_i if _get["height"]
		width = _get["width"].to_i if _get["width"]

		if _get["smartsize"]
			if pic.columns > pic.rows
				width = _get["smartsize"].to_i
				height = (pic.rows.to_f / (pic.columns.to_f / width.to_f)).to_i
			else
				height = _get["smartsize"].to_i
				width = (pic.columns.to_f / (pic.rows.to_f / height.to_f)).to_i
			end
		end

		if _get["maxwidth"]
			maxwidth = _get["maxwidth"].to_i

			if width > maxwidth
				height = (pic.rows.to_f / (pic.columns.to_f / maxwidth.to_f)).to_i
				width = maxwidth
			end
		end

		if _get["maxheight"]
			maxheight = _get["maxheight"].to_i

			if height > maxheight
				width = (pic.columns.to_f / (pic.rows.to_f / maxheight.to_f)).to_i
				height = maxheight
			end
		end

		if _get["width"] and _get["height"]
			width = _get["width"].to_i
			height = _get["height"].to_i
		end

		if height != pic.rows or width != pic.columns
			pic = pic.resize_to_fit(width.to_i, height.to_i)
		end

		if _get["rounded_corners"]
      args = {:img => pic, :radius => _get["rounded_corners"].to_i}

      if _get["border"] and _get["border_color"]
        args[:border] = _get["border"].to_i
        args[:border_color] = _get["border_color"]
      end

      Knj::Image.rounded_corners(args)
    end

		blob_cont = pic.to_blob
	end

	if tmp_write and blob_cont
		Knj::Php.file_put_contents(tmp_path, blob_cont)
	end

	if tmp_use
    Knj::Php.header("Last-Modified: #{time_orig.httpdate} GMT") if time_orig
		Knj::Php.header("Content-Type: image/png")
		print File.read(tmp_path)
	else
    Knj::Php.header("Last-Modified: #{time_orig.httpdate} GMT") if time_orig
		Knj::Php.header("Content-Type: image/png")
		print blob_cont
	end
%>

<%
	idstr = Knj::Php.md5("#{_get["path"]}_#{_get["smartsize"].to_i}_#{_get["width"].to_i}_#{_get["height"].to_i}_#{_get["maxwidth"].to_i}_#{_get["maxheight"].to_i}_#{_get["rounded_corners"].to_i}_#{_get["border"].to_i}_#{_get["border_color"]}")

	tmp_use = false
	tmp_write = false
	if $knj_webscripts_image_config
		tmp_use = true
		tmp_path = "#{$knj_webscripts_image_config["tmp_path"]}/#{idstr}"
		tmp_exists = File.exists?(tmp_path)
		tmp_write = true if !tmp_exists

		if !tmp_write and tmp_exists
			time_orig = File.mtime(_get["path"])
			time_cache = File.mtime(tmp_path)

			if time_orig > time_cache
				tmp_write = true
			end
		end
	end

	if !_get["path"] or !File.exists?(_get["path"])
    print "File does not exist.\n"
    exit
  end

	if !tmp_use or tmp_write or _get["force"].to_i > 0
    pic = Magick::Image.read(_get["path"]).first
    pic.format = "png"

		width = pic.columns
		height = pic.rows

		height = _get["height"].to_i if _get["height"]
		width = _get["width"].to_i if _get["width"]

		if _get["smartsize"]
			if pic.columns > pic.rows
				width = _get["smartsize"].to_i
				height = (pic.rows.to_f / (pic.columns.to_f / width.to_f)).to_i
			else
				height = _get["smartsize"].to_i
				width = (pic.columns.to_f / (pic.rows.to_f / height.to_f)).to_i
			end
		end

		if _get["maxwidth"]
			maxwidth = _get["maxwidth"].to_i

			if width > maxwidth
				height = (pic.rows.to_f / (pic.columns.to_f / maxwidth.to_f)).to_i
				width = maxwidth
			end
		end

		if _get["maxheight"]
			maxheight = _get["maxheight"].to_i

			if height > maxheight
				width = (pic.columns.to_f / (pic.rows.to_f / maxheight.to_f)).to_i
				height = maxheight
			end
		end

		if _get["width"] and _get["height"]
			width = _get["width"].to_i
			height = _get["height"].to_i
		end

		if height != pic.rows or width != pic.columns
			pic = pic.resize_to_fit(width.to_i, height.to_i)
		end

		if _get["rounded_corners"]
      args = {:img => pic, :radius => _get["rounded_corners"].to_i}

      if _get["border"] and _get["border_color"]
        args[:border] = _get["border"].to_i
        args[:border_color] = _get["border_color"]
      end

      Knj::Image.rounded_corners(args)
    end

		blob_cont = pic.to_blob
	end

	if tmp_write and blob_cont
		Knj::Php.file_put_contents(tmp_path, blob_cont)
	end

	if tmp_use
    Knj::Php.header("Last-Modified: #{time_orig.httpdate} GMT")
		Knj::Php.header("Content-Type: image/png")
		print File.read(tmp_path)
	else
    Knj::Php.header("Last-Modified: #{time_orig.httpdate} GMT")
		Knj::Php.header("Content-Type: image/png")
		print blob_cont
	end
%>


Add nowraps to try and help browsers layout the tasklist on gantt chart

<%= link_to_task(@t) %>

    <%= worked_nice(@t.worked_minutes)%>
    <% if current_user.can?(@t.project,'prioritize')%><input tabindex="<%=tab%>" type="text" size="5" style="font-size:11px;" id="duration-<%=@t.dom_id%>" name="duration" value="<%= worked_nice(@t.duration)%>" /><%else%><%= worked_nice(@t.duration)%><%end%>

	<% if current_user.can?(@t.project,'prioritize')%>
	    <input class="date" tabindex="<%=tab+1%>" id="due-<%=@t.dom_id%>" name="due" size="8" type="text" style="font-size:11px;" value="<%= @t.due_at.strftime(current_user.date_format) if @t.due_at %>" />
	      <img alt="Calendar" class="date" id="due-<%=@t.dom_id%>-calendar" src="/images/calendar.png" title="Show Calendar"/>

        <%else%>
	<%= @t.due_at.strftime(current_user.date_format) if @t.due_at %>
        <% end %>


Fixed XHTML validation problem in login.

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

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


It's called WhatDoTheyKnow now, not FOIFA

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

      <meta http-equiv="content-type" content="text/html;charset=UTF-8" >
      <title>WhatDoTheyKnow admin<%= @title ? ":" : "" %> <%=@title%></title>
      <%
        # Have to do explicit tag for stylesheet, to get absolute path on main server
      %>
      <%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => admin_public_url(stylesheet_path('admin')) }) %>

WhatDoTheyKnow admin interface:
    <%= link_to 'Overview', admin_url('') %>
    | <%= link_to 'Timeline', admin_url('timeline') %>
    | <%= link_to 'Public bodies', admin_url('body/list') %>
    | <%= link_to 'Requests', admin_url('request/list') %>
    | <%= link_to 'Users', admin_url('user/list') %>

<%= flash[:notice] %>

    <%= yield  %>

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

      <meta http-equiv="content-type" content="text/html;charset=UTF-8" >
      <title>FOIFA admin<%= @title ? ":" : "" %> <%=@title%></title>
      <%
        # Have to do explicit tag for stylesheet, to get absolute path on main server
      %>
      <%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => admin_public_url(stylesheet_path('admin')) }) %>

FOIFA admin interface:
    <%= link_to 'Overview', admin_url('') %>
    | <%= link_to 'Timeline', admin_url('timeline') %>
    | <%= link_to 'Public bodies', admin_url('body/list') %>
    | <%= link_to 'Requests', admin_url('request/list') %>
    | <%= link_to 'Users', admin_url('user/list') %>

<%= flash[:notice] %>

    <%= yield  %>