Remove redundant heading (it's repeated in the partial)

<% @title = 'Incoming message ' + @raw_email.incoming_message.id.to_s + ' of FOI request \'' + h(@raw_email.incoming_message.info_request.title) + "'" %>

Incoming message <%=@raw_email.incoming_message.id.to_s %>

    FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %>
    <% if @holding_pen %>

This is in the holding pen because: <%= @rejected_reason %>
        <% if @public_bodies.size > 0 %>

Guessed authority:
            <% for public_body in @public_bodies %>
                <%=public_body_both_links(public_body)%>
            <% end %>
            (based on From: email domain)
        <% end %>
        <% if @info_requests.size > 0 %>

Guessed request:
            <% for info_request in @info_requests %>
                <%=request_both_links(info_request)%>
            <% end %>
            (based on id, not hash, in To/Cc email)
        <% end %>
    <% end %>

    <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => @raw_email.incoming_message } %>

Raw email

<%= link_to "Download", "../download_raw_email/" + @raw_email.id.to_s %>

<%=h(@raw_email.data).gsub(/\n/, '
') %>

<% @title = 'Incoming message ' + @raw_email.incoming_message.id.to_s + ' of FOI request \'' + h(@raw_email.incoming_message.info_request.title) + "'" %>

Incoming message <%=@raw_email.incoming_message.id.to_s %>

    FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %>
    <% if @holding_pen %>

This is in the holding pen because: <%= @rejected_reason %>
        <% if @public_bodies.size > 0 %>

Guessed authority:
            <% for public_body in @public_bodies %>
                <%=public_body_both_links(public_body)%>
            <% end %>
            (based on From: email domain)
        <% end %>
        <% if @info_requests.size > 0 %>

Guessed request:
            <% for info_request in @info_requests %>
                <%=request_both_links(info_request)%>
            <% end %>
            (based on id, not hash, in To/Cc email)
        <% end %>
    <% end %>

Actions

    <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => @raw_email.incoming_message } %>

Raw email

<%= link_to "Download", "../download_raw_email/" + @raw_email.id.to_s %>

<%=h(@raw_email.data).gsub(/\n/, '
') %>


Fix link.

Fix link.

<% @title = "Timeline" %>

<%=h @events_title%>

Hour
| Day
| 2 days
| Week
| Month
| All time

<% last_date = nil %>
<% for event in @events %>
    <% if last_date != event.created_at.to_date %>
        <% if last_date.nil? %>

        <% end %>

<%= simple_date(event.created_at) %>

    <% else %>

    <% end %>
    <% last_date = event.created_at.to_date %>

    <% if event.class.to_s == 'InfoRequestEvent' %>
        <%= request_both_links(event.info_request) %>
        <% if event.event_type == 'edit' %>
            was edited by administrator <%=h event.params[:editor] %>.
            <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
                    if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                        %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                    end
               end
            %>
        <% elsif event.event_type == 'edit_outgoing' %>
            <% outgoing_messages = OutgoingMessage.find(:all, event.params[:outgoing_message_id].to_i) %>
            had outgoing message edited by administrator <%=h event.params[:editor] %>.
            <% if outgoing_messages.size > 0 %>
                <% outgoing_message = outgoing_messages[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing outgoing message, internal error.
            <% end %>
        <% elsif event.event_type == 'edit_comment' %>
            <% comments = Comment.find(:all, event.params[:comment_id].to_i) %>
            had annotation edited by administrator <%=h event.params[:editor] %>.
            <% if comments.size > 0 %>
                <% comment = comments[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing annotation, internal error.
            <% end %>
        <% elsif event.event_type == 'destroy_incoming' %>
            had incoming message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'redeliver_incoming' %>
            had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>.
         <% elsif event.event_type == 'response' %>
            <% incoming_message = event.incoming_message %>
            received
            <%= link_to 'a response', main_url(incoming_message_url(incoming_message)) %>
            from <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'sent' %>
            was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'resent' %>
            had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'followup_sent' %>
            had a follow up message sent to <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'comment' %>
            had an annotation posted by <%=h event.comment.user.name %>.
        <% elsif event.event_type == 'status_update' %>
                had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'.
        <% else %>
            had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>.
        <% end %>
    <% else %>
        <%= public_body_both_links(event.public_body) %>
        was created/updated by administrator <%=h event.last_edit_editor %>
    <% end %>
<% end %>
<% if not @events.empty? %>

<% end %>

<% @title = "Timeline" %>

<%=h @events_title%>

Hour
| Day
| 2 days
| Week
| Month
| All time

<% last_date = nil %>
<% for event in @events %>
    <% if last_date != event.created_at.to_date %>
        <% if last_date.nil? %>

        <% end %>

<%= simple_date(event.created_at) %>

    <% else %>

    <% end %>
    <% last_date = event.created_at.to_date %>

    <% if event.class.to_s == 'InfoRequestEvent' %>
        <%= request_both_links(event.info_request) %>
        <% if event.event_type == 'edit' %>
            was edited by administrator <%=h event.params[:editor] %>.
            <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
                    if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                        %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                    end
               end
            %>
        <% elsif event.event_type == 'edit_outgoing' %>
            <% outgoing_messages = OutgoingMessage.find(:all, event.params[:outgoing_message_id].to_i) %>
            had outgoing message edited by administrator <%=h event.params[:editor] %>.
            <% if outgoing_messages.size > 0 %>
                <% outgoing_message = outgoing_messages[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing outgoing message, internal error.
            <% end %>
        <% elsif event.event_type == 'edit_comment' %>
            <% comments = Comment.find(:all, event.params[:comment_id].to_i) %>
            had annotation edited by administrator <%=h event.params[:editor] %>.
            <% if comments.size > 0 %>
                <% comment = comments[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing annotation, internal error.
            <% end %>
        <% elsif event.event_type == 'destroy_incoming' %>
            had incoming message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'redeliver_incoming' %>
            had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>.
         <% elsif event.event_type == 'response' %>
            <% incoming_message = event.incoming_message %>
            received
            <%= link_to 'a response',
                main_url(show_response_url(:id => incoming_message.info_request.id, :incoming_message_id => incoming_message.id, :only_path => true)) %>

            from <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'sent' %>
            was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'resent' %>
            had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'followup_sent' %>
            had a follow up message sent to <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'comment' %>
            had an annotation posted by <%=h event.comment.user.name %>.
        <% elsif event.event_type == 'status_update' %>
                had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'.
        <% else %>
            had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>.
        <% end %>
    <% else %>
        <%= public_body_both_links(event.public_body) %>
        was created/updated by administrator <%=h event.last_edit_editor %>
    <% end %>
<% end %>
<% if not @events.empty? %>

<% end %>


Truncate action log text. Resolved gh-5

Truncate action log text. Resolved gh-5

<% if application_logs.is_today? %>

<% elsif application_logs.is_yesterday? %>

<% else %>

<% end %>

    <img src="/themes/<%=AppConfig.site_theme%>/images/logtypes/<%= "#{application_logs.rel_object_type.downcase}s.gif" %>" alt="<%= application_logs.rel_object_type %>" title="<%= application_logs.rel_object_type %>" />

      <% if not ['Comment', 'ProjectMessage'].include?(application_logs.rel_object_type) %>
      <%= application_logs.friendly_action %>:
      <% end %>
      <%= application_logs.rel_object.nil? ? h(truncate(application_logs.object_name, 50)) : link_to(h(truncate(application_logs.object_name, 50)), application_logs.rel_object.object_url) %>

<% if show_project_column %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    , <%= link_to (h application_logs.taken_by.display_name), user_path(:id => application_logs.taken_by.id) %>
    <% end %>

<% end %>

<% if show_project_column %>

<% if not application_logs.project.nil? %>
      <%= link_to (h application_logs.project.name), project_path(:id => application_logs.project.id) %>
<% end %>

<% else %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    <%= :action_by.l_with_args :user => link_to(h(application_logs.taken_by.display_name), user_path(:id => application_logs.taken_by.id)) %>
    <% end %>

<% end %>

<% if application_logs.is_today? %>

<% elsif application_logs.is_yesterday? %>

<% else %>

<% end %>

    <img src="/themes/<%=AppConfig.site_theme%>/images/logtypes/<%= "#{application_logs.rel_object_type.downcase}s.gif" %>" alt="<%= application_logs.rel_object_type %>" title="<%= application_logs.rel_object_type %>" />

      <% if not ['Comment', 'ProjectMessage'].include?(application_logs.rel_object_type) %>
      <%= application_logs.friendly_action %>:
      <% end %>
      <%= application_logs.rel_object.nil? ? h(application_logs.object_name) : link_to(h(application_logs.object_name), application_logs.rel_object.object_url) %>

<% if show_project_column %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    , <%= link_to (h application_logs.taken_by.display_name), user_path(:id => application_logs.taken_by.id) %>
    <% end %>

<% end %>

<% if show_project_column %>

<% if not application_logs.project.nil? %>
      <%= link_to (h application_logs.project.name), project_path(:id => application_logs.project.id) %>
<% end %>

<% else %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    <%= :action_by.l_with_args :user => link_to(h(application_logs.taken_by.display_name), user_path(:id => application_logs.taken_by.id)) %>
    <% end %>

<% end %>


* app/views/account/new_password.rhtml: Fixed form tags.

git-svn-id: ce004a3be656e491f060c65e2aab8dd2a5477e8b@55 f7b17897-190c-4688-811d-8cf59fb8cab0

<% @title = "#{Siteinfo.main.name} Password Reset" %>

      Lost your password?  Please give us your email address, and
      we'll send you a new one.

<% form_tag :action => 'reset_password' do %>

Email:

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

<%= submit_tag 'Send Password' %>

<% end %>

<% @title = "#{Siteinfo.main.name} Password Reset" %>

      Lost your password?  Please give us your email address, and
      we'll send you a new one.

<%= start_form_tag :action => 'reset_password' %>

Email:

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

<%= submit_tag 'Send Password' %>

<%= end_form_tag %>


Fixes a little bug with comment fields autofill when editing an existing comment

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

<%= error_messages_for 'comment' %>

  <%= _("Author")%>:

  <%= text_field 'comment', 'author', "value" => (session[:user][:name] if controller.action_name == "new") %>

  <%= _("Url") %>:

  <%= text_field 'comment', 'url', "value" => (this_blog.base_url if controller.action_name == "new")  %>

  <%= _("Email")%>:

  <%= text_field 'comment', 'email', "value" => (session[:user][:email] if controller.action_name == "new") %>

  <%= _("Body")%>:

  <%= text_area 'comment', 'body'  %>

<%= error_messages_for 'comment' %>

  <%= _("Author")%>:

  <%= text_field 'comment', 'author', "value" => session[:user][:name]  %>

  <%= _("Url") %>:

  <%= text_field 'comment', 'url', "value" => this_blog.base_url  %>

  <%= _("Email")%>:

  <%= text_field 'comment', 'email', "value" => session[:user][:email] %>

  <%= _("Body")%>:

  <%= text_area 'comment', 'body'  %>


Moving Enterprise's business name to closer to name

(ActionItem1931)

<%= optional_field(profile, 'display_name', f.text_field(:display_name)) %>
<% if profile.enterprise? %>
  <%= optional_field(profile, 'business_name', f.text_field(:business_name)) %>
<% end %>
<%= optional_field(profile, 'description', f.text_area(:description, :rows => 5)) %> <!-- , :maxlength => 10 -->
<%= optional_field(profile, 'contact_person', f.text_field(:contact_person)) %>
<%= optional_field(profile, 'contact_email', f.text_field(:contact_email)) %>
<%= optional_field(profile, 'contact_phone', f.text_field(:contact_phone)) %>
<%= optional_field(profile, 'legal_form', f.text_field(:legal_form)) %>
<%= optional_field(profile, 'economic_activity', f.text_field(:economic_activity)) %>
<%= optional_field(profile, 'management_information', f.text_area(:management_information, :rows => 5)) %>
<%= optional_field(profile, 'address', labelled_form_field(_('Address (street and number)'), text_field(object_name, :address))) %>
<%= optional_field(profile, 'zip_code', labelled_form_field(_('ZIP code'), text_field(object_name, :zip_code))) %>
<%= optional_field(profile, 'city', f.text_field(:city)) %>
<%= optional_field(profile, 'state', f.text_field(:state)) %>
<%= optional_field(profile, 'country', select_country(_('Country'), object_name, 'country', {:class => 'type-select'})) %>
<%= optional_field(profile, 'tag_list', f.text_field(:tag_list)) %>

<% if profile.community? %>
  <%= optional_field(profile, 'language', f.text_field(:language)) %>
<% end %>

<% if profile.enterprise? %>
  <%= optional_field(profile, 'organization_website', f.text_field(:organization_website)) %>
  <%= optional_field(profile, 'historic_and_current_context', f.text_area(:historic_and_current_context, :rows => 5)) %>
  <%= optional_field(profile, 'activities_short_description', f.text_area(:activities_short_description, :rows => 5)) %>
  <%= optional_field(profile, 'acronym', f.text_field(:acronym)) %>
  <%= optional_field(profile, 'foundation_year', f.text_field(:foundation_year)) %>
<% end %>

<%= optional_field(profile, 'display_name', f.text_field(:display_name)) %>
<%= optional_field(profile, 'description', f.text_area(:description, :rows => 5)) %> <!-- , :maxlength => 10 -->
<%= optional_field(profile, 'contact_person', f.text_field(:contact_person)) %>
<%= optional_field(profile, 'contact_email', f.text_field(:contact_email)) %>
<%= optional_field(profile, 'contact_phone', f.text_field(:contact_phone)) %>
<%= optional_field(profile, 'legal_form', f.text_field(:legal_form)) %>
<%= optional_field(profile, 'economic_activity', f.text_field(:economic_activity)) %>
<%= optional_field(profile, 'management_information', f.text_area(:management_information, :rows => 5)) %>
<%= optional_field(profile, 'address', labelled_form_field(_('Address (street and number)'), text_field(object_name, :address))) %>
<%= optional_field(profile, 'zip_code', labelled_form_field(_('ZIP code'), text_field(object_name, :zip_code))) %>
<%= optional_field(profile, 'city', f.text_field(:city)) %>
<%= optional_field(profile, 'state', f.text_field(:state)) %>
<%= optional_field(profile, 'country', select_country(_('Country'), object_name, 'country', {:class => 'type-select'})) %>
<%= optional_field(profile, 'tag_list', f.text_field(:tag_list)) %>

<% if profile.community? %>
  <%= optional_field(profile, 'language', f.text_field(:language)) %>
<% end %>

<% if profile.enterprise? %>
  <%= optional_field(profile, 'business_name', f.text_field(:business_name)) %>
  <%= optional_field(profile, 'organization_website', f.text_field(:organization_website)) %>
  <%= optional_field(profile, 'historic_and_current_context', f.text_area(:historic_and_current_context, :rows => 5)) %>
  <%= optional_field(profile, 'activities_short_description', f.text_area(:activities_short_description, :rows => 5)) %>
  <%= optional_field(profile, 'acronym', f.text_field(:acronym)) %>
  <%= optional_field(profile, 'foundation_year', f.text_field(:foundation_year)) %>
<% end %>


Fix adding interpretations in lexeme edit (still requires update & continue)

<% unless (f.object.try(:_delete)) %>
	<% nested_attributes_for f, [:interpretations, :parses, :etymology] %>
	<fieldset class="parse">
		<legend>Parse <%= remove_link_unless_new_record(f) %></legend>

				<%= f.label :parsed_form, nil, :style => "float:left" %>
				<%= headword_link(f.object) unless f.object.nil? || f.object.parsed_form.blank? %>

				<%= f.text_field :parsed_form %>

			<% unless @interpretations ? @interpretations[f.object.parsed_form].blank? : f.object.nil? || f.object.potential_interpretations.blank? %>
				<% @interpretation = f.object.interpretations.empty? ? f.object.interpretations.build : f.object.interpretations %>

				<% f.fields_for :interpretations do |i_form| %>
				  <%= render :partial => 'interpretation', :locals => { :f => i_form } %>
				<% end %>

					<%= link_to 'Add interpretation', '#interpretations', :class => 'add_nested', :rel => '[etymology][parses][interpretations]'%>

			<% end %>
	</fieldset>
<% end %>

<% unless (f.object.try(:_delete)) %>
	<% nested_attributes_for f, [:interpretations, :parses, :etymologies, :subentry] %>
	<fieldset class="parse">
		<legend>Parse <%= remove_link_unless_new_record(f) %></legend>

				<%= f.label :parsed_form, nil, :style => "float:left" %>
				<%= headword_link(f.object) unless f.object.nil? || f.object.parsed_form.blank? %>

				<%= f.text_field :parsed_form %>

			<% unless @interpretations ? @interpretations[f.object.parsed_form].blank? : f.object.nil? || f.object.potential_interpretations.blank? %>
				<% @interpretation = f.object.interpretations.empty? ? f.object.interpretations.build : f.object.interpretations %>

				<% f.fields_for :interpretations do |i_form| %>
				  <%= render :partial => 'interpretation', :locals => { :f => i_form } %>
				<% end %>

					<%= link_to 'Add interpretation', '#interpretations', :class => 'add_nested', :rel => '[subentry][etymologies][parses][interpretations]'%>

			<% end %>
	</fieldset>
<% end %>


Fixed bug in show_comments for show_name page.

git-svn-id: bc266cc4dcdee41d9588461a87969679bbc3047f@860 7a65b82a-1d14-0410-b525-e2835e71a0b4

<%
  @title = :show_name_title.t(:name => @name.display_name)
  Textile.register_name(@name)

  # Google Images | Distribution Map | Email Tracking
  new_tab_set do
    add_tab(:google_images.t,
            "http://images.google.com/images?q=#{@name.text_name}")
    if @data != []
      add_tab(:show_name_distribution_map.t, :action => 'map', :id => @name.id,
              :params => query_params)
    end
    add_tab(:show_name_email_tracking.t, :action => 'email_tracking',
            :id => @name.id, :params => query_params)
  end

  # Edit Name | Bulk Name Edit | Add Name | Change Synonyms | Approve/Deprecate
  new_tab_set do
    add_tab(:show_name_edit_name.t, :action => 'edit_name', :id => @name.id,
            :params => query_params)
    add_tab(:show_name_bulk_name_edit.t, :action => 'bulk_name_edit',
            :params => query_params)
    add_tab(:show_name_add_name.t, :action => 'create_name',
            :params => query_params)
    add_tab(:show_name_change_synonyms.t, :action => 'change_synonyms',
            :id => @name.id, :params => query_params)
    if @name.deprecated
      add_tab(:APPROVE.t, :action => 'approve_name', :id => @name.id,
              :params => query_params)
    else
      add_tab(:DEPRECATE.t, :action => 'deprecate_name', :id => @name.id,
              :params => query_params)
    end
  end

  draw_prev_next_tabs(@name)
  draw_interest_icons(@name)
%>

    <%
    # ----------------------------------------
    #  Show the basic name information
    # ----------------------------------------
    %>

        <%= render(:partial => 'name', :object => @name, :locals =>
                   { :synonyms => true } ) %>

        <%= show_previous_version(@name) %>

        <% for parent in @parents %>
          <%= rank_as_string(@parents[0].rank) %>:
            <%= link_to(parent.display_name.t, :action => 'show_name',
                        :id => parent.id, :params => query_params) %>

        <% end %>
        <% if @first_child %>
          <%= link_to("#{:show_object.t(:type => @first_child.rank.to_s)}", :action => 'index_name',
                      :params => query_params(@children_query)) %>

        <% end %>

        <%= set_export_status_controls(@name) %>

      <%= show_best_image(@first_consensus) %>

      <%= name_section_link(:show_name_observations.t, @first_consensus, @consensus_query) %>
      <%= name_section_link(:show_name_synonym_observations.t, @has_synonym, @synonym_query) %>
      <%= name_section_link(:show_name_other_observations.t, @has_other, @other_query) %>
      <%= name_section_link(:show_name_subtaxa_observations.t, @has_subtaxa, @subtaxa_query) %>

    <%
    # ----------------------------------------
    #  Show a list of NameDescriptions.
    # ----------------------------------------
    %>

      <%= show_alt_descriptions(@name, @projects) %>

<%
# ----------------------------------------
#  Show comments and notes.
# ----------------------------------------
%>
<% if @name.has_notes? %>

<%= :show_name_notes.t %>:

  <%= colored_notes_box(true, sanitize(@name.notes).tpl) %>
<% end %>

  <%= show_authors_and_editors(@name) %>

<%= render(:partial => 'comment/show_comments', :locals =>
           { :object => @name, :controls => true, :limit => nil }) %>

<%= show_object_footer(@name) %>

<%
  @title = :show_name_title.t(:name => @name.display_name)
  Textile.register_name(@name)

  # Google Images | Distribution Map | Email Tracking
  new_tab_set do
    add_tab(:google_images.t,
            "http://images.google.com/images?q=#{@name.text_name}")
    if @data != []
      add_tab(:show_name_distribution_map.t, :action => 'map', :id => @name.id,
              :params => query_params)
    end
    add_tab(:show_name_email_tracking.t, :action => 'email_tracking',
            :id => @name.id, :params => query_params)
  end

  # Edit Name | Bulk Name Edit | Add Name | Change Synonyms | Approve/Deprecate
  new_tab_set do
    add_tab(:show_name_edit_name.t, :action => 'edit_name', :id => @name.id,
            :params => query_params)
    add_tab(:show_name_bulk_name_edit.t, :action => 'bulk_name_edit',
            :params => query_params)
    add_tab(:show_name_add_name.t, :action => 'create_name',
            :params => query_params)
    add_tab(:show_name_change_synonyms.t, :action => 'change_synonyms',
            :id => @name.id, :params => query_params)
    if @name.deprecated
      add_tab(:APPROVE.t, :action => 'approve_name', :id => @name.id,
              :params => query_params)
    else
      add_tab(:DEPRECATE.t, :action => 'deprecate_name', :id => @name.id,
              :params => query_params)
    end
  end

  draw_prev_next_tabs(@name)
  draw_interest_icons(@name)
%>

    <%
    # ----------------------------------------
    #  Show the basic name information
    # ----------------------------------------
    %>

        <%= render(:partial => 'name', :object => @name, :locals =>
                   { :synonyms => true } ) %>

        <%= show_previous_version(@name) %>

        <% for parent in @parents %>
          <%= rank_as_string(@parents[0].rank) %>:
            <%= link_to(parent.display_name.t, :action => 'show_name',
                        :id => parent.id, :params => query_params) %>

        <% end %>
        <% if @first_child %>
          <%= link_to("#{:show_object.t(:type => @first_child.rank.to_s)}", :action => 'index_name',
                      :params => query_params(@children_query)) %>

        <% end %>

        <%= set_export_status_controls(@name) %>

      <%= show_best_image(@first_consensus) %>

      <%= name_section_link(:show_name_observations.t, @first_consensus, @consensus_query) %>
      <%= name_section_link(:show_name_synonym_observations.t, @has_synonym, @synonym_query) %>
      <%= name_section_link(:show_name_other_observations.t, @has_other, @other_query) %>
      <%= name_section_link(:show_name_subtaxa_observations.t, @has_subtaxa, @subtaxa_query) %>

    <%
    # ----------------------------------------
    #  Show a list of NameDescriptions.
    # ----------------------------------------
    %>

      <%= show_alt_descriptions(@name, @projects) %>

<%
# ----------------------------------------
#  Show comments and notes.
# ----------------------------------------
%>
<% if @name.has_notes? %>

<%= :show_name_notes.t %>:

  <%= colored_notes_box(true, sanitize(@name.notes).tpl) %>
<% end %>

  <%= show_authors_and_editors(@name) %>

<%= render(:partial => 'comment/show_comments', :locals =>
           { :object => @name, :controls => true }) %>

<%= show_object_footer(@name) %>


don't show group privacy options for committees (they weren't used, anyways)

Short name (must only contain alphanumeric characters)

<%= text_field 'group', 'name'  %>

Full name

<%= text_field 'group', 'full_name'  %>

Group Summary

<%= text_field 'group', 'summary'  %>

<% if not committee? -%>

<%= check_box :group, :publicly_visible_group %>
Make Group Publicly Visible

Group appears in public directory and group profile is viewable by non-members at we.riseup.net/yourgroupname.

<%= check_box :group, :publicly_visible_committees %>
  Make Committees Publicly Visible

  Committees are viewable by non-members at we.riseup.net/yourgroupname

<%= check_box :group, :publicly_visible_members %>
  Make Members Publicly Visible

  Members are viewable by non-members at we.riseup.net/yourgroupname. Also, the name of the group will be listed on each members profile page (we.riseup.net/username)

<%= check_box :group, :accept_new_membership_requests %>
  Allow Membership Requests

  A “join group” link will appear on your group page. This will send a request for membership to your group that can be accepted or rejected.

<% end -%>

Short name (must only contain alphanumeric characters)

<%= text_field 'group', 'name'  %>

Full name

<%= text_field 'group', 'full_name'  %>

Group Summary

<%= text_field 'group', 'summary'  %>

<%= check_box :group, :publicly_visible_group %>
Make Group Publicly Visible

Group appears in public directory and group profile is viewable by non-members at we.riseup.net/yourgroupname.

<%= check_box :group, :publicly_visible_committees %>
  Make Committees Publicly Visible

  Committees are viewable by non-members at we.riseup.net/yourgroupname

<%= check_box :group, :publicly_visible_members %>
  Make Members Publicly Visible

  Members are viewable by non-members at we.riseup.net/yourgroupname. Also, the name of the group will be listed on each members profile page (we.riseup.net/username)

<%= check_box :group, :accept_new_membership_requests %>
  Allow Membership Requests

  A “join group” link will appear on your grouppage. This will send a request for membership to your group that can be accepted or rejected.


Add link to the latest diff

Add link to the latest diff

<%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>,
<% if @page.revision == 1 %>
skapad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) %> sen
<% else%>
<%= link_to "ändrad för #{@page.updated_on.age_in_swedish_words(:minutes => true)} sen",
	revision_diff_url(:id => @page, :new => @page.revision, :old => @page.previous), :title => 'Se skillnaden mot tidigare version' %>
<% end %>
av <%= user_show_link(@page.updater) -%>

<%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, ändrad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) -%> sen av <%= user_show_link(@page.updater) -%>


Make the map on the user account page work.

User details

<%= error_messages_for 'user' %>
<% form_tag :controller => 'user', :action => 'account', :display_name => @user.display_name do %>

Name	<%= @user.email %>

Mapper since	<%= @user.creation_time %> (<%= time_ago_in_words(@user.creation_time) %> ago)

Display Name	<%= text_field :user, :display_name, :value => @user.display_name %>

Password	<%= password_field('user', 'pass_crypt',{:value => '', :size => 50, :maxlength => 255}) %>

Confirm Password	<%= password_field('user', 'pass_crypt_confirmation',{:value => '', :size => 50, :maxlength => 255}) %>

  <tr id="homerow" <% unless @user.home_lat and @user.home_lon %> class="nohome" <%end%> >Your home	You have not entered your home location.Latitude: <%= text_field :user, :home_lat, :value => @user.home_lat, :size => 20, :id => "home_lat" %> Longitude <%= text_field :user, :home_lon, :value => @user.home_lon, :size => 20, :id => "home_lon" %>

Update home location when I click on the map? <input type="checkbox" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" />

    <% # This now just used to detect the width/height required for the popup. %>

Description	<%= text_area :user, :description, :value => @user.description, :class => "editDescription" %>

<%= submit_tag 'Save Changes' %>
<% end %>

<% nearest_str = "" %>
<% if @user.home_lat and @user.home_lon %>

Users in your area

    <% if @user.nearby.empty? %>
    There are no users who admit to mapping in your area.  Better go out and spread the word about OSM!
    <% else %>

These users are mapping in your area:

    Name
    Contact

    <% @user.nearby(1,1).each do |nearby| %>
    <% nearest_str += "nearest.push( { 'display_name' : '#{nearby.display_name}', 'home_lat' : #{nearby.home_lat}, 'home_lon' : #{nearby.home_lon} } );\n" %>

    <%= link_to nearby.display_name, :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
    <%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => nearby.id %>

    <%end%>

    <%end%>

<% end %>

<% if @user.home_lat and @user.home_lon %>
    <% marker = true %>
    <% mlon = @user.home_lon %>
    <% mlat = @user.home_lat %>
    <% lon =  @user.home_lon %>
    <% lat =  @user.home_lat  %>
    <% zoom =  '12' %>

<% else %>
    <% lon =  params['lon'] || '-0.1' %>
    <% lat =  params['lat'] || '51.5' %>
    <% zoom =  params['zoom'] || '4' %>
<% end %>

Privacy

<% if @user.data_public? %>
  All your edits are public.
<% else %>
  Currently your edits are anonymous and people can't find out where you are located. To show what you edited and allow people to contact you through the website, click the button below. This action cannot be reversed.

  <% form_tag :controller => 'user', :action => 'go_public' do %>
  <%= submit_tag 'Make all my edits public, forever' %>
  <% end %>
<% end %>


Made Excel default choice again

Made Excel default choice again

<% @page_title = 'Admin: Racers' %>

<%= render "shared/admin/tabs" %>

<%= form_tag({}, {:method => 'get'}) %>
	Name: <%= text_field_tag 'name', @name, :size => 30 %>

	<%# Nasty code required to show consistent messages with and without AJAX. At least it could be in a helper. %>

		<%= image_tag('/images/icons/warn.gif', :height => 11, :width => 11, :id => 'warn_icon') %>
		<%= flash[:warn] %>
		<%= image_tag('/images/icons/confirmed.gif', :height => 11, :width => 11, :id => 'message_icon') %>
		<%= flash[:notice] %>

	<%= update_page_tag {|page| page.hide('message_icon')} unless flash[:notice] -%>
	<%= update_page_tag {|page| page.hide('warn_icon')} unless flash[:warn] -%>
</form>

			        Name
		            Team
		            Aliases
		            Road
		            MTB
		            DH
		            Cross
					Member

				<%= render :partial => "racer", :collection => @racers %>
				<% if @racers.empty? %>

					<%- if @name.blank? -%>
					Enter part of a racer's name
					<%- else -%>
					No racers found
					<%- end -%>

				<% end %>

<%= link_to(image_tag('/images/buttons/add.gif'), :action => 'new') %>

				<%= form_tag({:action => 'preview_import'}, { :multipart => true }) %>
					<%= submit_tag 'Import' %>
					<%= file_field_tag "racers_file" %>
				</form>

				<%= form_tag(:action => 'export') %>
					<%= submit_tag 'Export' %>
					<select name="include">
						<option value="all">All</option>
						<option value="members_only" selected>Current Members Only</option>
					</select>
					to
					<select name="format">
						<option value="excel" selected>Excel</option>
						<option value="finish_lynx">FinishLynx</option>
						<option value="scoring_sheet">Scoring Sheet</option>
					</select>
				</form>

				<%=
					link_to('Print Cards', :action => 'cards')
				%> | <%=
					link_to('Print Mailing Labels', :action => 'mailing_labels')
				%>

<%- for racer in @racers -%>
	<%= draggable_element("racer_#{racer.id}", :revert => true) %>
	<%= drop_receiving_element("racer_#{racer.id}",
		:url => { :action => "merge", :target_id => racer.id },
		:loading => "new Effect.Fade(element.id + '_row')",
		:complete => evaluate_remote_response) %>
	<%= drop_receiving_element("name_#{racer.id}",
		:url => { :action => "merge", :target_id => racer.id },
		:loading => "new Effect.Fade(element.id + '_row')",
		:complete => evaluate_remote_response) %>
<%- end -%>

<% @page_title = 'Admin: Racers' %>

<%= render "shared/admin/tabs" %>

<%= form_tag({}, {:method => 'get'}) %>
	Name: <%= text_field_tag 'name', @name, :size => 30 %>

	<%# Nasty code required to show consistent messages with and without AJAX. At least it could be in a helper. %>

		<%= image_tag('/images/icons/warn.gif', :height => 11, :width => 11, :id => 'warn_icon') %>
		<%= flash[:warn] %>
		<%= image_tag('/images/icons/confirmed.gif', :height => 11, :width => 11, :id => 'message_icon') %>
		<%= flash[:notice] %>

	<%= update_page_tag {|page| page.hide('message_icon')} unless flash[:notice] -%>
	<%= update_page_tag {|page| page.hide('warn_icon')} unless flash[:warn] -%>
</form>

			        Name
		            Team
		            Aliases
		            Road
		            MTB
		            DH
		            Cross
					Member

				<%= render :partial => "racer", :collection => @racers %>
				<% if @racers.empty? %>

					<%- if @name.blank? -%>
					Enter part of a racer's name
					<%- else -%>
					No racers found
					<%- end -%>

				<% end %>

<%= link_to(image_tag('/images/buttons/add.gif'), :action => 'new') %>

				<%= form_tag({:action => 'preview_import'}, { :multipart => true }) %>
					<%= submit_tag 'Import' %>
					<%= file_field_tag "racers_file" %>
				</form>

				<%= form_tag(:action => 'export') %>
					<%= submit_tag 'Export' %>
					<select name="include">
						<option value="all">All</option>
						<option value="members_only" selected>Current Members Only</option>
					</select>
					to
					<select name="format">
						<option value="excel" selected>Excel</option>
						<option value="finish_lynx">FinishLynx</option>
						<option value="scoring_sheet" selected>Scoring Sheet</option>
					</select>
				</form>

				<%=
					link_to('Print Cards', :action => 'cards')
				%> | <%=
					link_to('Print Mailing Labels', :action => 'mailing_labels')
				%>

<%- for racer in @racers -%>
	<%= draggable_element("racer_#{racer.id}", :revert => true) %>
	<%= drop_receiving_element("racer_#{racer.id}",
		:url => { :action => "merge", :target_id => racer.id },
		:loading => "new Effect.Fade(element.id + '_row')",
		:complete => evaluate_remote_response) %>
	<%= drop_receiving_element("name_#{racer.id}",
		:url => { :action => "merge", :target_id => racer.id },
		:loading => "new Effect.Fade(element.id + '_row')",
		:complete => evaluate_remote_response) %>
<%- end -%>


milestones.select, not milestones.collect

Signed-off-by: grantgrant <7561d7b6fa252e14d948ef730f22c68c9d861f6b@ish.com.au>

	<%
	last_customer = 0
	for project in @projects
		if last_customer != project.customer_id && current_user.option_externalclients.to_i > 0
			if last_customer != 0
				%>

			<% end %>

			<%
			collapse = " <div id=\"indicator_#{project.customer_id}\" class=\""
			collapse << ((session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) ? "collapse-indicator-closed" : "collapse-indicator-open")
			collapse << "\">
"
			collapse << (project.customer.name == 'Internal' ? current_user.company.name : project.customer.name)
			%>

				<%= link_to_remote collapse, :url => { :controller => 'activities', :action => 'toggle_display', :id => project.customer_id },
				                             :loading => "Element.show('loading');",
                                             :complete => "Element.hide('loading');"
               %>

<table width="100%" cellpadding="0" cellspacing="0" id="projects_customer_<%= project.customer_id %>" <%= "style=\"display:none;\"" if (session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) %>>

				<%
				last_customer = project.customer_id
			end

       if @widget.order_by == 'work'
         critical_count = project.overtime
         normal_count = project.work_done - critical_count
         low_count = project.total_estimate - normal_count - critical_count
         low_count = 0 if low_count < 0
         total_count = (critical_count + normal_count + low_count) * 1.0
       else
         critical_count = project.critical_count
         normal_count = project.normal_count
         low_count = project.low_count
         total_count = (critical_count + normal_count + low_count) * 1.0
       end

       critical_percent = ((critical_count / total_count) * 100.0)
       normal_percent = ((normal_count / total_count) * 100.0)

       critical_percent = critical_percent.round unless critical_percent.nan?

       normal_percent = normal_percent.round unless normal_percent.nan?

       normal_percent = 100 - critical_percent if normal_percent + critical_percent > 100
       low_percent = 100.0 - critical_percent - normal_percent

               collapse = " <div id=\"small_indicator_#{project.id}\" class=\""
               collapse << ((session[:collapse_milestones] && session[:collapse_milestones][project.id.to_s].to_i == 1) ? "small-collapse-indicator-closed" : "small-collapse-indicator-open")
               collapse << "\"
 "
          %>
    <tr class="milestone" id="project_<%=project.id%>">

        <div id="edit_project_<%= project.id%>" class="popout" style="position: absolute; z-index:10; left:0; top:0; width: 16px; display:none; ">
          <% if current_user.can?(project, 'grant') || current_user.can?(project, 'milestone') %>
            <%= link_to image_tag("application_form_edit.png", :border => 0, :title => _("Edit project %s", project.name), :class => "tooltip"),
            { :controller => 'projects', :action => 'edit', :id => project } -%>
          <% end %>

<%= link_to_remote collapse,
                                              :url => { :controller => 'activities', :action => 'toggle_display_milestones', :id => project.id },
                                              :loading => "Element.show('loading');",
                                              :complete => "Element.hide('loading');" %> <%= link_to project.name, { :controller => 'views', :action => 'select_project', :id => project.id} %>

	  <% if @widget.order_by == 'work' %>

	  <% critical_tooltip = "#{number_to_percentage( critical_percent, :precision => 0)} (#{worked_nice(critical_count)}) #{_'Over Estimate'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
             normal_tooltip   = "#{number_to_percentage( normal_percent, :precision => 0)} (#{worked_nice(normal_count)}) #{_'Estimated'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
             low_tooltip      = "#{number_to_percentage( low_percent, :precision => 0)} (#{worked_nice(low_count)}) #{_'Left'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent + low_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count + low_count)}) #{_'Total'}
"
          %>
          <div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0)%>;position:absolute;" title="<%= critical_tooltip %>"

          <div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= normal_tooltip%>">

          <div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= low_tooltip %> ">

	  <% else %>
          <div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0) %>;position:absolute;" title="<%= "#{number_to_percentage( critical_percent, :precision => 0)} (#{critical_count}/#{total_count.to_i})" %> <%=_'High Priority'%>">

          <div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( normal_percent, :precision => 0)} (#{normal_count}/#{total_count.to_i})"%> <%=_'Normal'%>">

          <div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( low_percent, :precision => 0)} (#{low_count}/#{total_count.to_i})" %>  <%=_'Low Priority'%> ">

         <% end %>

          <%= render :partial => "activities/overall_progress", :locals => { :project => project } %>
          <% for milestone in project.milestones.select{|m| m.completed_at.nil?} %>
              <%= render :partial => "activities/milestone_row", :locals => { :milestone => milestone } %>
          <% end %>
  <% @completed_milestones = project.total_milestones_count - project.open_milestones_count
     if @completed_milestones > 0
  %>

<%= link_to _('%d completed milestone', @completed_milestones), :controller => 'milestones', :action => 'list_completed', :id => project %>

  <% end %>

  <% end
     if last_customer != 0 %>

  <% end %>

  <% if @completed_projects > 0 %>

<%= link_to _('%d completed project', @completed_projects), :controller => 'projects', :action => 'list_completed' %>

  <% end %>

	<%
	last_customer = 0
	for project in @projects
		if last_customer != project.customer_id && current_user.option_externalclients.to_i > 0
			if last_customer != 0
				%>

			<% end %>

			<%
			collapse = " <div id=\"indicator_#{project.customer_id}\" class=\""
			collapse << ((session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) ? "collapse-indicator-closed" : "collapse-indicator-open")
			collapse << "\">
"
			collapse << (project.customer.name == 'Internal' ? current_user.company.name : project.customer.name)
			%>

				<%= link_to_remote collapse, :url => { :controller => 'activities', :action => 'toggle_display', :id => project.customer_id },
				                             :loading => "Element.show('loading');",
                                             :complete => "Element.hide('loading');"
               %>

<table width="100%" cellpadding="0" cellspacing="0" id="projects_customer_<%= project.customer_id %>" <%= "style=\"display:none;\"" if (session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) %>>

				<%
				last_customer = project.customer_id
			end

       if @widget.order_by == 'work'
         critical_count = project.overtime
         normal_count = project.work_done - critical_count
         low_count = project.total_estimate - normal_count - critical_count
         low_count = 0 if low_count < 0
         total_count = (critical_count + normal_count + low_count) * 1.0
       else
         critical_count = project.critical_count
         normal_count = project.normal_count
         low_count = project.low_count
         total_count = (critical_count + normal_count + low_count) * 1.0
       end

       critical_percent = ((critical_count / total_count) * 100.0)
       normal_percent = ((normal_count / total_count) * 100.0)

       critical_percent = critical_percent.round unless critical_percent.nan?

       normal_percent = normal_percent.round unless normal_percent.nan?

       normal_percent = 100 - critical_percent if normal_percent + critical_percent > 100
       low_percent = 100.0 - critical_percent - normal_percent

               collapse = " <div id=\"small_indicator_#{project.id}\" class=\""
               collapse << ((session[:collapse_milestones] && session[:collapse_milestones][project.id.to_s].to_i == 1) ? "small-collapse-indicator-closed" : "small-collapse-indicator-open")
               collapse << "\"
 "
          %>
    <tr class="milestone" id="project_<%=project.id%>">

        <div id="edit_project_<%= project.id%>" class="popout" style="position: absolute; z-index:10; left:0; top:0; width: 16px; display:none; ">
          <% if current_user.can?(project, 'grant') || current_user.can?(project, 'milestone') %>
            <%= link_to image_tag("application_form_edit.png", :border => 0, :title => _("Edit project %s", project.name), :class => "tooltip"),
            { :controller => 'projects', :action => 'edit', :id => project } -%>
          <% end %>

<%= link_to_remote collapse,
                                              :url => { :controller => 'activities', :action => 'toggle_display_milestones', :id => project.id },
                                              :loading => "Element.show('loading');",
                                              :complete => "Element.hide('loading');" %> <%= link_to project.name, { :controller => 'views', :action => 'select_project', :id => project.id} %>

	  <% if @widget.order_by == 'work' %>

	  <% critical_tooltip = "#{number_to_percentage( critical_percent, :precision => 0)} (#{worked_nice(critical_count)}) #{_'Over Estimate'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
             normal_tooltip   = "#{number_to_percentage( normal_percent, :precision => 0)} (#{worked_nice(normal_count)}) #{_'Estimated'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
             low_tooltip      = "#{number_to_percentage( low_percent, :precision => 0)} (#{worked_nice(low_count)}) #{_'Left'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent + low_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count + low_count)}) #{_'Total'}
"
          %>
          <div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0)%>;position:absolute;" title="<%= critical_tooltip %>"

          <div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= normal_tooltip%>">

          <div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= low_tooltip %> ">

	  <% else %>
          <div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0) %>;position:absolute;" title="<%= "#{number_to_percentage( critical_percent, :precision => 0)} (#{critical_count}/#{total_count.to_i})" %> <%=_'High Priority'%>">

          <div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( normal_percent, :precision => 0)} (#{normal_count}/#{total_count.to_i})"%> <%=_'Normal'%>">

          <div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( low_percent, :precision => 0)} (#{low_count}/#{total_count.to_i})" %>  <%=_'Low Priority'%> ">

         <% end %>

          <%= render :partial => "activities/overall_progress", :locals => { :project => project } %>
          <% for milestone in project.milestones.collect{|m| m.completed_at.nil?} %>
              <%= render :partial => "activities/milestone_row", :locals => { :milestone => milestone } %>
          <% end %>
  <% @completed_milestones = project.total_milestones_count - project.open_milestones_count
     if @completed_milestones > 0
  %>

<%= link_to _('%d completed milestone', @completed_milestones), :controller => 'milestones', :action => 'list_completed', :id => project %>

  <% end %>

  <% end
     if last_customer != 0 %>

  <% end %>

  <% if @completed_projects > 0 %>

<%= link_to _('%d completed project', @completed_projects), :controller => 'projects', :action => 'list_completed' %>

  <% end %>


ActionItem1044: don't display enterprises if disabled in the system

  <%= _('Basic information')%>

<%= display_field(_('Name:'), profile, :name) { |name| link_to name, profile.url  } %>
<%= display_field(_('Sex:'), profile, :sex) { |gender| { 'male' => _('Male'), 'female' => _('Female') }[gender] } %>
<%= display_field(_('Date of birth:'), profile, :birth_date) { |date| show_date(date)  }%>
<%= display_field(_('Location:'), profile, :location) %>

<% if profile == user || profile.friends.include?(user) %>

    <%= _('Contact')%>

  <%= display_field(_('Address:'), profile, :address) %>
  <%= display_field(_('ZIP code:'), profile, :zip_code) %>
  <%= display_field(_('Contact phone:'), profile, :contact_phone) %>
  <%= display_field(_('e-Mail:'), profile, :email) { |email| link_to_email(email) } %>
<% end %>

<% cache_timeout(profile.identifier + '-profile-relationships', 4.hours.from_now) do %>
  <% if !(profile.organization.blank? && profile.organization_website.blank?) %>

      <%= _('Work')%>

  <% end %>
  <%= display_field(_('Organization:'), profile, :organization) %>
  <%= display_field(_('Organization website:'), profile, :organization_website) { |url| link_to(url, url) }%>

  <% if !environment.enabled?('disable_asset_enterprises') && !profile.enterprises.empty? %>

      <%= __('Enterprises') %>

    <% profile.enterprises.each do |item| %>

        <%= button 'menu-enterprise', item.name, item.url %>

    <% end %>
  <% end %>

    <%= _('Network')%>

    <%= link_to  __('Friends') + (' (%d)' % profile.friends.count), { :controller => 'profile', :action => 'friends' } %>

    <%= link_to __('Communities') + (' (%d)' % profile.communities.count), :controller => "profile", :action => 'communities' %>

  <% if !environment.enabled?('disable_categories') && !profile.interests.empty? %>

      <%= _('Interests') %>

    <% profile.interests.each do |item| %>

        <%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %>

    <% end %>
  <% end %>

<% end %>

  <%= _('Basic information')%>

<%= display_field(_('Name:'), profile, :name) { |name| link_to name, profile.url  } %>
<%= display_field(_('Sex:'), profile, :sex) { |gender| { 'male' => _('Male'), 'female' => _('Female') }[gender] } %>
<%= display_field(_('Date of birth:'), profile, :birth_date) { |date| show_date(date)  }%>
<%= display_field(_('Location:'), profile, :location) %>

<% if profile == user || profile.friends.include?(user) %>

    <%= _('Contact')%>

  <%= display_field(_('Address:'), profile, :address) %>
  <%= display_field(_('ZIP code:'), profile, :zip_code) %>
  <%= display_field(_('Contact phone:'), profile, :contact_phone) %>
  <%= display_field(_('e-Mail:'), profile, :email) { |email| link_to_email(email) } %>
<% end %>

<% cache_timeout(profile.identifier + '-profile-relationships', 4.hours.from_now) do %>
  <% if !(profile.organization.blank? && profile.organization_website.blank?) %>

      <%= _('Work')%>

  <% end %>
  <%= display_field(_('Organization:'), profile, :organization) %>
  <%= display_field(_('Organization website:'), profile, :organization_website) { |url| link_to(url, url) }%>

  <% if !profile.enterprises.empty? %>

      <%= __('Enterprises') %>

    <% profile.enterprises.each do |item| %>

        <%= button 'menu-enterprise', item.name, item.url %>

    <% end %>
  <% end %>

    <%= _('Network')%>

    <%= link_to  __('Friends') + (' (%d)' % profile.friends.count), { :controller => 'profile', :action => 'friends' } %>

    <%= link_to __('Communities') + (' (%d)' % profile.communities.count), :controller => "profile", :action => 'communities' %>

  <% if !environment.enabled?('disable_categories') && !profile.interests.empty? %>

      <%= _('Interests') %>

    <% profile.interests.each do |item| %>

        <%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %>

    <% end %>
  <% end %>

<% end %>


Added checks to find out if the user is logged in?

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Events", :property => nil} -%>

    Id
    Title
    Date
    Published

<% for event in @events %>

    <%= event.id -%>.
    <%= link_to event.title, :action => 'show', :id => event-%>
    <%= event.created_at.strftime("%d %b, %Y") -%>
    <%= event.published == true ? "Yes" : "No" -%>

    <%if @current_user-%><%= link_to 'Edit', :action => 'edit', :id => event %>	<%end-%>
    <%if @current_user-%><%= link_to 'Destroy', { :action => 'destroy', :id => event }, :confirm => 'Are you sure?', :method => :post %>	<%end-%>

<%= truncate(event.agenda,100) -%>

<% end %>

<%= link_to 'Previous page', { :page => @event_pages.current.previous } if @event_pages.current.previous %>
<%= link_to 'Next page', { :page => @event_pages.current.next } if @event_pages.current.next %>

<%= link_to('New event', :action => 'new') if @current_user%>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => "layouts/categories_nav" -%>
<%end-%>

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Events", :property => nil} -%>

    Id
    Title
    Date
    Published

<% for event in @events %>

    <%= event.id -%>.
    <%= link_to event.title, :action => 'show', :id => event-%>
    <%= event.created_at.strftime("%d %b, %Y") -%>
    <%= event.published == true ? "Yes" : "No" -%>

    <%= link_to 'Edit', :action => 'edit', :id => event %>
    <%= link_to 'Destroy', { :action => 'destroy', :id => event }, :confirm => 'Are you sure?', :method => :post %>

<%= truncate(event.agenda,100) -%>

<% end %>

<%= link_to 'Previous page', { :page => @event_pages.current.previous } if @event_pages.current.previous %>
<%= link_to 'Next page', { :page => @event_pages.current.next } if @event_pages.current.next %>

<%= link_to 'New event', :action => 'new' %>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => "layouts/categories_nav" -%>
<%end-%>


Add a bit more text explaining what an internal review is.

    <% if @internal_review %>

Request an internal review
        from <%=h RequestMailer.name_for_followup(@info_request, nil) %>

    <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %>

Send a public follow up message
        to <%=h RequestMailer.name_for_followup(@info_request, nil) %>

    <% else %>

Send a public reply to
        <%=h RequestMailer.name_for_followup(@info_request, incoming_message) %>

    <% end %>

    <% if @info_request.stop_new_responses %>

Follow ups and new responses to this request have been stopped to prevent spam. Please
        contact us if you are <%= user_link(@info_request.user) %>
        and need to send a follow up.

    <% else %>

        <% if @internal_review %>

            If you are dissatisfied by the response you got from
            the public authority, you have the right to
            complain (details).

        <% end %>

        <% if @info_request.calculate_status == 'waiting_response_overdue' %>

This request is currently overdue a response from <%=
            public_body_link(@info_request.public_body) %>.
            By law, the response had to be prompt but no later than
            <%= simple_date(@info_request.date_response_required_by) %>
            (<%= link_to "more info", about_url + "#quickly_response" %>). You can say
            that under the <%=h(@info_request.law_used_act)%> they should have replied by now,
            and are breaking the law.

        <% end %>

        <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %>

                <%= o.text_area :body, :rows => 10, :cols => 55 %>

            <% if @internal_review %>
                <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %>
            <% else %>

What are you doing?

                <% if !@outgoing_message.errors[:what_doing_dummy].nil? %>

                <% else %>

                <% end %>

                        <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %>
                        I am requesting an internal review
                        (what's that?)

                        <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %>
                        Anything else, such as clarifying, prompting, thanking

            <% end %>

            <% if @internal_review %>

Edit and add more details to the message above,
                explaining why you would like a review.

Say that you are dissatisfied by their response

Set out your reasons why

Ask them to review their response

            <% end %>

                <%= hidden_field_tag 'submitted_followup', 1 %>
                <%= hidden_field_tag(:preview, 1 ) %>
                <% if @internal_review_pass_on %>
                    <%= hidden_field_tag(:internal_review, 1 ) %>
                <% end %>
                <%= submit_tag "Preview your message" %>

        <% end %>

            <% if not @is_owning_user %>
            (You will be asked to sign in as <%= user_link(@info_request.user) %>)
            <% end %>

    <% end %>

    <% if @internal_review %>

Request an internal review
        from <%=h RequestMailer.name_for_followup(@info_request, nil) %>

    <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %>

Send a public follow up message
        to <%=h RequestMailer.name_for_followup(@info_request, nil) %>

    <% else %>

Send a public reply to
        <%=h RequestMailer.name_for_followup(@info_request, incoming_message) %>

    <% end %>

    <% if @info_request.stop_new_responses %>

Follow ups and new responses to this request have been stopped to prevent spam. Please
        contact us if you are <%= user_link(@info_request.user) %>
        and need to send a follow up.

    <% else %>

        <% if @info_request.calculate_status == 'waiting_response_overdue' %>

This request is currently overdue a response from <%=
            public_body_link(@info_request.public_body) %>.
            By law, the response had to be prompt but no later than
            <%= simple_date(@info_request.date_response_required_by) %>
            (<%= link_to "more info", about_url + "#quickly_response" %>). You can say
            that under the <%=h(@info_request.law_used_act)%> they should have replied by now,
            and are breaking the law.

        <% end %>

        <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %>

                <%= o.text_area :body, :rows => 10, :cols => 55 %>

            <% if @internal_review %>
                <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %>
            <% else %>

What are you doing?

                <% if !@outgoing_message.errors[:what_doing_dummy].nil? %>

                <% else %>

                <% end %>

                        <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %>
                        I am requesting an internal review
                        (what's that?)

                        <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %>
                        Anything else, such as clarifying, prompting, thanking

            <% end %>

            <% if @internal_review %>

Edit and add more details to the message above,
                explaining why you would like a review.

            <% end %>

                <%= hidden_field_tag 'submitted_followup', 1 %>
                <%= hidden_field_tag(:preview, 1 ) %>
                <% if @internal_review_pass_on %>
                    <%= hidden_field_tag(:internal_review, 1 ) %>
                <% end %>
                <%= submit_tag "Preview your message" %>

        <% end %>

            <% if not @is_owning_user %>
            (You will be asked to sign in as <%= user_link(@info_request.user) %>)
            <% end %>

    <% end %>


Issue 395

Issue 395

.theme == :default does not need or use Rico.Corner.

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

<div id="<%= active_scaffold_id -%>" class="active-scaffold active-scaffold-<%= controller_id %> <%= active_scaffold_config.theme %>-theme">

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

    <tbody class="before-header" id="<%= before_header_id -%>">

  <div id="<%= active_scaffold_content_id -%>">
    <%= render :partial => 'list' %>


Use path to partial so it works in view tests

<% if @is_owning_user %>

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

<%= _('What best describes the status of this request now?') %>

<%= _('This request is still in progress:') %>

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %>
                <label for="waiting_response<%=id_suffix%>"><%= _('I\'m still waiting for my information
                (maybe you got an acknowledgement)') %>

        <% end %>
        <% if @info_request.described_state == 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>"><%= _('I\'m still waiting for the internal review') %>

        <% end %>

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %>
                <label for="waiting_clarification<%=id_suffix%>"><%= _('I\'ve been asked to clarify my request') %>

        <% end %>

        <% if @update_status && @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>"><%= _('I\'m waiting for an internal review response') %>

        <% end %>

            <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %>
            <label for="gone_postal<%=id_suffix%>"><%= _('They are going to reply by post') %>

        <%= render :partial => 'general/custom_state_transitions_pending', :locals => {:id_suffix => id_suffix } %>

<%= _('This particular request is finished:') %>

        <% if @info_request.described_state == 'internal_review' %>

<%= _('The review has finished and overall:') %>

        <% end %>

            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>"><%= _('They do not have the information (maybe they say who does)') %>

            <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %>
            <label for="partially_successful<%=id_suffix%>"><%= _('I\'ve received some of the information') %>

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

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

        <%= render :partial => 'general/custom_state_transitions_complete', :locals => {:id_suffix => id_suffix } %>

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

           <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %>
            <label for="error_message<%=id_suffix%>">
            <%= _('I\'ve received an error message') %>

        <% if @update_status %>

             <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
              <label for="error_message<%=id_suffix%>">
              <%= _('This request requires administrator attention') %>

             <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %>
              <label for="user_withdrawn<%=id_suffix%>">
              <%= _('I would like to withdraw this request') %>

        <% end %>

        <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %>
        <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %>
        <%= submit_tag _("Submit status") %> (<%= _('and we\'ll suggest what to do next') %>)

    <% end %>
<% elsif @old_unclassified %>
    <%= render :partial => 'request/other_describe_state', :locals => {:id_suffix => id_suffix } %>
<% else %>
  <% if !@info_request.is_external? %>
    <%=  _('We don\'t know whether the most recent response to this request contains
    information or not
        –
	if you are {{user_link}} please sign in and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.fullpath)) %>
  <% end %>
<% end %>

<% if @is_owning_user %>

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

<%= _('What best describes the status of this request now?') %>

<%= _('This request is still in progress:') %>

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %>
                <label for="waiting_response<%=id_suffix%>"><%= _('I\'m still waiting for my information
                (maybe you got an acknowledgement)') %>

        <% end %>
        <% if @info_request.described_state == 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>"><%= _('I\'m still waiting for the internal review') %>

        <% end %>

        <% if @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %>
                <label for="waiting_clarification<%=id_suffix%>"><%= _('I\'ve been asked to clarify my request') %>

        <% end %>

        <% if @update_status && @info_request.described_state != 'internal_review' %>

                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>"><%= _('I\'m waiting for an internal review response') %>

        <% end %>

            <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %>
            <label for="gone_postal<%=id_suffix%>"><%= _('They are going to reply by post') %>

        <%= render :partial => 'general/custom_state_transitions_pending', :locals => {:id_suffix => id_suffix } %>

<%= _('This particular request is finished:') %>

        <% if @info_request.described_state == 'internal_review' %>

<%= _('The review has finished and overall:') %>

        <% end %>

            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>"><%= _('They do not have the information (maybe they say who does)') %>

            <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %>
            <label for="partially_successful<%=id_suffix%>"><%= _('I\'ve received some of the information') %>

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

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

        <%= render :partial => 'general/custom_state_transitions_complete', :locals => {:id_suffix => id_suffix } %>

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

           <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %>
            <label for="error_message<%=id_suffix%>">
            <%= _('I\'ve received an error message') %>

        <% if @update_status %>

             <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
              <label for="error_message<%=id_suffix%>">
              <%= _('This request requires administrator attention') %>

             <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %>
              <label for="user_withdrawn<%=id_suffix%>">
              <%= _('I would like to withdraw this request') %>

        <% end %>

        <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %>
        <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %>
        <%= submit_tag _("Submit status") %> (<%= _('and we\'ll suggest what to do next') %>)

    <% end %>
<% elsif @old_unclassified %>
    <%= render :partial => 'other_describe_state', :locals => {:id_suffix => id_suffix } %>
<% else %>
  <% if !@info_request.is_external? %>
    <%=  _('We don\'t know whether the most recent response to this request contains
    information or not
        –
	if you are {{user_link}} please sign in and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.fullpath)) %>
  <% end %>
<% end %>


bump YUI include to 2.5.1; use MinifyController for Thoth JS

<script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="/minify/js/thoth.js"></script>

<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="/js/thoth.js"></script>


Adding prefix to h1 link in doc theme.

Adding prefix to h1 link in doc theme.


prevent error on missing file

prevent error on missing file

Media

<% if @prev_url || @next_url %>
  <%=
  render_template('../pager',
      :prev_url  => @prev_url,
      :next_url  => @next_url,
      :prev_text => '« Newer files',
      :next_text => 'Older files »')
  %>
<% end %>

      Filename
      Size
      Created
      Updated

    <% row = 'even' %>
    <% @files.all do |file| %>
      <tr class="<%= row == 'even' ? row = 'odd' : row = 'even' %>">

          <a href="<%= Rs(:edit, file.id) %>"><%= h(file.filename) %>

        <%= File.exist?(file.path) ? File.size(file.path).filesize_format : '?' %>

          <%= file.created_at(Riposte::Config.timestamp.short) %>

          <%= file.updated_at(Riposte::Config.timestamp.short) %>

    <% end %>

<% if @prev_url || @next_url %>
  <%=
  render_template('../pager',
      :prev_url  => @prev_url,
      :next_url  => @next_url,
      :prev_text => '« Newer files',
      :next_text => 'Older files »')
  %>
<% end %>

Media

<% if @prev_url || @next_url %>
  <%=
  render_template('../pager',
      :prev_url  => @prev_url,
      :next_url  => @next_url,
      :prev_text => '« Newer files',
      :next_text => 'Older files »')
  %>
<% end %>

      Filename
      Size
      Created
      Updated

    <% row = 'even' %>
    <% @files.all do |file| %>
      <tr class="<%= row == 'even' ? row = 'odd' : row = 'even' %>">

          <a href="<%= Rs(:edit, file.id) %>"><%= h(file.filename) %>

        <%= File.size(file.path).filesize_format %>

          <%= file.created_at(Riposte::Config.timestamp.short) %>

          <%= file.updated_at(Riposte::Config.timestamp.short) %>

    <% end %>

<% if @prev_url || @next_url %>
  <%=
  render_template('../pager',
      :prev_url  => @prev_url,
      :next_url  => @next_url,
      :prev_text => '« Newer files',
      :next_text => 'Older files »')
  %>
<% end %>