Explanation not always in an annotation.

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

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

    This request has prominence 'hidden'. You can only see it because you are logged
    in as a super user.

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

    This request is hidden, so that only you the requester can see it. Please
    contact us if you are not sure why.

<% end %>

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

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

<% end %>

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

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

    <p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>">
    <% 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.
            <% if @old_unclassified %>
              We're waiting for someone to read
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              and update the status accordingly. Perhaps you might like to help out by doing that?
            <% else %>
              We're waiting for
              <%= user_link(@info_request.user) %> to read
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              and update the status.
            <% end %>
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@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", respond_to_last_url(@info_request) + '#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 the correspondence 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 %>

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

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

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

    This request has prominence 'hidden'. You can only see it because you are logged
    in as a super user.

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

    This request is hidden, so that only you the requester can see it. Please
    contact us if you are not sure why.

<% end %>

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

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

<% end %>

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

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

    <p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>">
    <% 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.
            <% if @old_unclassified %>
              We're waiting for someone to read
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              and update the status accordingly. Perhaps you might like to help out by doing that?
            <% else %>
              We're waiting for
              <%= user_link(@info_request.user) %> to read
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              and update the status.
            <% end %>
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@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", respond_to_last_url(@info_request) + '#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 %>

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


Indentation fixes

Indentation fixes

<% @title = "Contact " + h(@recipient_user.name) %>

<% if not @user %>
    <% raise "You need to be logged in" %>
<% end %>

<%= foi_error_messages_for :contact %>

<% form_for :contact do |f| %>

<%= _("Contact {{recipient}}", :recipient => h(@recipient_user.name)) %>

	<%= _("From") %>:
	<%= h(@user.name_and_email) %>

	<%= _("Subject") %>:
	<%= f.text_field :subject, :size => 50 %>

      <%= _("Message") %>:
	<%= f.text_area :message, :rows => 10, :cols => 50 %>

	<% if @user == @recipient_user %>
	    <%= _('Note: You\'re sending a message to yourself, presumably
	    to try out how it works.')%>
	<% else %>
	   <%= _(' Privacy note: Your email address will be given to')%>
	    <%= user_link(@recipient_user) %><%= _(' when you send this message.')%>
	<% end %>

	<%= hidden_field_tag(:submitted_contact_form, { :value => 1 } ) %>
	<%= submit_tag _("Send message") %>

<% end %>


Add ID to main column to enable padding

Add ID to main column to enable padding

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

    <%= javascript_include_merged :base %>
    <%= yield :tinymce %>
    <%= javascript_include_merged :tt %>

    <%= javascript_include_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
    <%= javascript_include_tag "swfobject" %>

    <%= stylesheet_link_merged :tt %>
    <%= stylesheet_link_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
    <%= javascript_include_tag "builder" if ['activities'].include? controller.controller_name %>
    <% if ['activities'].include? controller.controller_name %>
      <%= javascript_include_tag "portal" %>

      <%= javascript_include_tag "flotr" %>
    <% end %>
    <%= yield :tinymce_init %>

    <%= stylesheet_link_tag "print", { :media => "print" } %>
    <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'rss', :id => current_user.uuid }) %>

    <title><%= controller.controller_name + " / " + controller.action_name %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<% @internal = Customer.find(:first, :conditions => ["company_id = ? AND (name = 'Internal' or name = ?)", current_user.company_id, current_user.company.name ]) %>

<%= image_tag('spinner.gif', :border => 0) %>

              <%= render(:partial => "layouts/menu") %>

                <% if current_user.seen_welcome.to_i == 0 %>
                  <% if controller.controller_name == "activities" && controller.action_name == 'welcome' %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'} %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "activities" && controller.action_name != 'welcome' %>

<%= link_to "#{_('Overview') }", { :controller => 'activities', :action => 'list'}, :class => "active"%>

<%= link_to_remote _('Add New Widget'), :url => { :controller => 'widgets', :action => 'add'} %>

                <% else %>

<%= link_to "#{_('Overview')}", { :controller => 'activities', :action => 'list'} %>
		<% end %>

                <% if controller.controller_name == "tasks" && !['timeline', 'new'].include?(controller.action_name) %>

<%= link_to "#{_('Browse')}", { :controller => 'views', :action => 'browse'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Browse')}", :controller => 'views', :action => 'browse' %>
                <% end %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                    <% project_ids = current_project_ids %>
                    <% client_ids = current_projects.collect(&:customer_id).join(',')
                       client_ids = "0" if client_ids.nil? || client_ids.empty?

                       views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                    for view in views %>

<%= link_to(view.name, { :controller => 'views', :action => 'select', :id => view }) %><%= link_to("[#{_('Edit')}]", {:controller => 'views', :action => 'edit', :id => view}) if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

		    <% end %>

<%= link_to "[#{_('New View')}]",  :controller => 'views', :action => 'new' %>

                <% if current_user.option_tracktime.to_i == 1%>
                  <% if controller.controller_name == "timeline" && controller.action_name == "list" %>

<%= link_to "#{_('Timeline')}", { :controller => 'timeline', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Timeline')}", :controller => 'timeline', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "schedule"  %>

<%= link_to "#{_('Schedule')}", {:controller => 'schedule', :action => 'list'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Schedule')}", :controller => 'schedule', :action => 'list' %>
                <% end %>

<%= link_to "#{_('Plan / GANTT')}", :controller => 'schedule', :action => 'gantt'%>

                <% if current_user.option_tracktime.to_i == 1 && current_user.can_any?(current_user.projects, 'report') %>
                  <% if controller.controller_name == "reports"  %>

<%= link_to "#{_('Reports')}", {:controller => 'reports', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Reports')}", :controller => 'reports', :action => 'list' %>

                  <% end %>
                <% end %>

	        <% if current_user.company.show_wiki? %>
		  <% if controller.controller_name == "wiki"  %>

<%= link_to "#{_('Wiki')}", {:controller => 'wiki', :action => 'show', :id => nil}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Wiki')}", :controller => 'wiki', :action => 'show' %>

                  <% end %>
	        <% end %>

	        <% if current_user.company.show_chat? %>
                  <% if controller.controller_name == "shout"  %>

<%= link_to "#{_('Chat')}", {:controller => 'shout', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Chat')}", :controller => 'shout', :action => 'list' %>

                  <% end %>
		<% end %>

	        <% if current_user.company.show_forum? %>
                  <% if ['forums', 'posts', 'topics'].include? controller.controller_name  %>

<%= link_to "#{_('Forums')}", {:controller => 'forums', :action => 'index'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Forums')}", :controller => 'forums', :action => 'index' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "project_files"  %>

<%= link_to "#{_('Files')}", {:controller => 'project_files', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Files')}", :controller => 'project_files', :action => 'list' %>

                <% end %>

                <% if controller.controller_name == "projects" %>

<%= link_to "#{_('Projects')}", {:controller => 'projects', :action => 'list'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Projects')}", {:controller => 'projects', :action => 'list'} %>
                <% end %>
		  <% if current_user.create_projects? %>

<%= link_to _("New Project"), :controller => 'projects', :action => 'new' %>

                  <% end %>

                <% if controller.controller_name == "tasks" && controller.action_name == 'new'  %>

<%= link_to "#{_('New Task') + image_tag('tick.png',  :border => 0, :height => 16, :style => "margin-top:-2px;")}", {:controller => 'tasks', :action => 'new'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('New Task') + image_tag('tick.png',  :border => 0, :height => 16, :style => "margin-top:-2px;")}", {:controller => 'tasks', :action => 'new'} %>
                <% end %>

<%= link_to "#{_('Log Out')}", { :controller => 'login', :action => 'logout'}, :class => "right" %>

                <% if controller.controller_name == "users" && controller.action_name == "edit_preferences" %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right active"%>
                <% else %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right" %>
                <% end %>
                <% if current_user.admin > 0 %>

<%= link_to _('Company Settings'), :controller => 'companies', :action => 'edit', :id => current_user.company_id %>

                <% end %>

                <% if current_user.admin > 0 %>

                <% if current_user.option_externalclients.to_i == 1%>
                <% if controller.controller_name == "customers" %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "right" %>

                <% end %>
                <% end %>

                <% if controller.controller_name == "users" && controller.action_name != "edit_preferences" %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right" %>

                <% end %>

                <% end %>

<% form_tag( {:controller => 'search', :action => 'search'}, {:method => 'get'}) do %>
                    <%= text_field_tag 'query', _('Search'), {:size => 10, :style => "font-size:9px;", :class => 'optional', :onfocus => "if($('query').value == '#{_('Search')}') {$('query').value = ''; $('query').removeClassName('optional');};"  }%>
                  <% end %>

          <% news = NewsItem.find(:first, :order => "id desc", :conditions => ["id > ?", current_user.seen_news_id ]) %>
          <% unless news.nil? %>

[<%= tz.utc_to_local(news.created_at).strftime("#{current_user.time_format} #{current_user.date_format}") %>]	<%= news.body %>
                <%= link_to_remote "[#{_('Hide')}]", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id },
                :success => visual_effect(:fade, "news", :duration => 0.5) %>

          <% end %>

          <div id="flash" <%="style=\"display:none\"" unless flash['notice']%>>

<%= flash['notice'] %>
	[<%=_ 'Hide'%>]

          <%= @content_for_layout %>

          <td align="right" valign="top" style="width:15%;<%= "display:none;" if session[:collapse_menu].to_i > 0 %>" id="left_menu">

                <td align="left" class="page_header tooltip" colspan="2" width="100%" title="<%= _'Custom saved filters showing a subset of your tasks'%>">
<%=_ 'Views' %>

<%= link_to _('New'),  :controller => 'views', :action => 'new' %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                <% project_ids = current_project_ids %>
                <% client_ids = current_projects.collect(&:customer_id).join(',')
                   client_ids = "0" if client_ids.nil? || client_ids.empty?

                   views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                   for view in views %>

<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>	<%= link_to _('Edit'), :controller => 'views', :action => 'edit', :id => view if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

                   <% end %>

		   <div <%= "style=\"display:none;\"" if @current_sheet.nil? || controller.action_name == "stop_work" %> id="work-log">

		           <div class="tooltip" title="<%= _'Text entered will be saved automatically to your current work notes.'%>"><%= _'Work Log' %>

				  <form method="post" onsubmit="return false;" id="worklog_form">
		           <textarea name="worklog[body]" id="worklog_body" style="padding:0;margin-top:0.5em;margin-bottom:0.3em;width:100%;" rows="4"><%= @current_sheet.body if @current_sheet%></textarea>
				  </form>

                  <td align=left class="page_header tooltip" width="100%" colspan="2" title="<%= _'Easy access to commonly needed information.'%>">

<%=_ 'Notes'%>

<%= link_to _('New'), :controller => 'pages', :action => 'new' %>

          <% for page in current_pages %>

                  <%= link_to "#{page.name} / #{page.project.name}", { :controller => 'pages', :action => 'show', :id => page} %> (<%=_('%s ago', time_ago_in_words( page.updated_at, false ) )%>)

          <% end %>

  <% if current_user.company.show_messaging %>

	    <% current_user.chats.each do |@chat|
	      @user = @chat.target
            %>
	      <%= render :partial => 'shout/chat_user' if @chat.active >= 0%>
	      <% if @chat.active == 1 %>

	      <% end %>
	    <% end %>

<%= _'Loading'%>...

<%= _('Online')%> (<%= online_users %>)

Clocking IT v0.99.3<% if current_user.locale != 'en_US' %> - <%= _'Help Translate'%><% end %>
<%=_ 'Feedback? Suggestions? Ideas? Bugs?'%><%= link_to "[Admin]", :controller => "admin", :action => "index" if current_user.admin == 10 %>

  <% else %>

Clocking IT v0.99.3<% if current_user.locale != 'en_US' %> - <%= _'Help Translate'%><% end %>
<%=_ 'Feedback? Suggestions? Ideas? Bugs?'%><%= link_to "[Admin]", :controller => "admin", :action => "index" if current_user.admin == 10 %>

  <% end %>

<%= periodically_call_remote(:url => { :controller => 'tasks', :action => 'update_sheet_info' }, :frequency => 90 ) -%>

<%= flash_plugin(session[:channels]) %>

<%#= query_review_output %>


[ClockingIT @ Bump version to 0.99.2]

[ClockingIT @ Bump version to 0.99.2]

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

    <%= javascript_include_merged :base %>
    <%= javascript_include_merged :tt %>

    <%= stylesheet_link_merged :tt %>

    <%= stylesheet_link_tag "print", { :media => "print" } %>
    <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'rss', :id => session[:user].uuid }) %>

    <title><%= controller.controller_name + " / " + controller.action_name %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<% @internal = Customer.find(:first, :conditions => ["(name = 'Internal' or name = ?) AND company_id = ?", session[:user].company.name, session[:user].company.id]) %>

<% if session[:project] && session[:project].customer.css && session[:project].customer.css.length > 0 %>

<% elsif !@internal.nil? && !@internal.css.nil? && @internal.css.length > 0 %>

<% end %>

              <%= render(:partial => "layouts/menu") %>

              <%= start_form_tag( {:controller => 'search', :action => 'search'}, {:method => 'get'})  %>

                <% if session[:user].seen_welcome.to_i == 0 %>
                  <% if controller.controller_name == "activities" && controller.action_name == 'welcome' %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'} %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "activities" && controller.action_name != 'welcome' %>

<%= link_to "#{_('Overview') }", { :controller => 'activities', :action => 'list'}, :class => "active"%>

                <% else %>

<%= link_to "#{_('Overview')}", { :controller => 'activities', :action => 'list'} %>

                <% end %>

                <% if controller.controller_name == "tasks" && !['timeline', 'new'].include?(controller.action_name) %>

<%= link_to "#{_('Browse')}", { :controller => 'views', :action => 'browse'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Browse')}", :controller => 'views', :action => 'browse' %>

                <% end %>

                <% if session[:user].option_tracktime == 1%>
                  <% if controller.controller_name == "timeline" && controller.action_name == "list" %>

<%= link_to "#{_('Timeline')}", { :controller => 'timeline', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Timeline')}", :controller => 'timeline', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "project_files"  %>

<%= link_to "#{_('Files')}", {:controller => 'project_files', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Files')}", :controller => 'project_files', :action => 'list' %>

                <% end %>

                <% if session[:user].option_tracktime == 1%>
                  <% if controller.controller_name == "reports"  %>

<%= link_to "#{_('Reports')}", {:controller => 'reports', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Reports')}", :controller => 'reports', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "schedule"  %>

<%= link_to "#{_('Schedule')}", {:controller => 'schedule', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Schedule')}", :controller => 'schedule', :action => 'list' %>

                <% end %>

                <% if controller.controller_name == "wiki"  %>

<%= link_to "#{_('Wiki')}", {:controller => 'wiki', :action => 'show'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Wiki')}", :controller => 'wiki', :action => 'show' %>

                <% end %>

                <% if controller.controller_name == "tasks" && controller.action_name == 'new'  %>

<%= link_to "#{_('New')}", {:controller => 'tasks', :action => 'new'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('New Task')}", :controller => 'tasks', :action => 'new' %>

                <% end %>

<%= link_to "#{_('Log Out')}", { :controller => 'login', :action => 'logout'}, :class => "right" %>

                <% if controller.controller_name == "users" && controller.action_name == "edit_preferences" %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right" %>

                <% end %>

                <% if session[:user].admin > 0 %>

                <% if session[:user].option_externalclients == 1%>
                <% if controller.controller_name == "customers" %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "right" %>

                <% end %>
                <% end %>

                <% if controller.controller_name == "users" && controller.action_name != "edit_preferences" %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right" %>

                <% end %>

                <% end %>

<%=_ 'Search' %> <%= text_field_tag 'query', "", {:size => 10, :style => "font-size:9px;"}%>

                <%= end_form_tag %>

        <% if session[:user].respond_to?(:seen_news_id)%>
          <% news = NewsItem.find(:first, :order => "created_at desc", :conditions => ["id > ?", session[:user].seen_news_id ]) %>
          <% unless news.nil? %>

[<%= tz.utc_to_local(news.created_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") %>]	<%= news.body %>
                <%= link_to_remote "[#{_('Hide')}]", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id },
                :success => visual_effect(:fade, "news", :duration => 0.5) %>

          <% end %>
          <% end %>

            <div id="flash" <%="style=\"display:none\"" unless flash['notice']%>>

<%= @flash['notice'] %>
	[<%=_ 'Hide'%>]

      <% if flash['notice'] %>

      <% end %>

          <%= @content_for_layout %>

<%=_ 'Views' %>

<%= link_to _('New'),  :controller => 'views', :action => 'new' %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                <% project_ids = current_project_ids
                   views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", session[:user].company_id, session[:user].id], :order => "shared, name")
                   for view in views %>

<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>	<%= link_to _('Edit'), :controller => 'views', :action => 'edit', :id => view if view.user_id == session[:user].id %><%= "[#{_('Shared')}]" if view.user_id != session[:user].id %>

                   <% end %>

        <% cache( :controller => "application", :action => "chat", :action_suffix => "#{session[:user].company_id}_#{session[:user].id}") do %>

                    <%=_ 'Chat'%>

                  <% @shouts = Shout.find(:all, :conditions => ["shouts.company_id = ?", session[:user].company.id], :limit => 7, :order => "shouts.id desc", :include => "user" )%>
                  <%= render :partial => "shout/shouts", :locals => { :shouts => @shouts } %>

                        <%= text_field 'shout', 'body' %>

        <% end %>

<%=_ 'Notes'%>

<%= link_to _('New'), :controller => 'pages', :action => 'new' %>

          <% for page in current_pages %>

                  <%= link_to "#{page.name} / #{page.project.name}", { :controller => 'pages', :action => 'show', :id => page} %> (<%=_('%s ago', time_ago_in_words( page.updated_at, false ) )%>)

          <% end %>

    Clocking IT v0.99.2 - <%=_ 'Feedback? Suggestions? Ideas? Bugs?'%> <%=_ 'Let me know'%> <%= link_to "[Admin]", :controller => "admin", :action => "index" if session[:user].admin == 10 %>

<%= periodically_call_remote(:url => { :controller => 'tasks', :action => 'update_sheet_info' }, :frequency => 90 ) -%>
<%#= periodically_call_remote(:url => { :controller => 'shout', :action => 'list_ajax' }, :frequency => 7, :complete => "check_chat(request);" ) -%>

<%= flash_plugin(session[:channels]) %>

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

    <%= javascript_include_merged :base %>
    <%= javascript_include_merged :tt %>

    <%= stylesheet_link_merged :tt %>

    <%= stylesheet_link_tag "print", { :media => "print" } %>
    <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'rss', :id => session[:user].uuid }) %>

    <title><%= controller.controller_name + " / " + controller.action_name %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<% @internal = Customer.find(:first, :conditions => ["(name = 'Internal' or name = ?) AND company_id = ?", session[:user].company.name, session[:user].company.id]) %>

<% if session[:project] && session[:project].customer.css && session[:project].customer.css.length > 0 %>

<% elsif !@internal.nil? && !@internal.css.nil? && @internal.css.length > 0 %>

<% end %>

              <%= render(:partial => "layouts/menu") %>

              <%= start_form_tag( {:controller => 'search', :action => 'search'}, {:method => 'get'})  %>

                <% if session[:user].seen_welcome.to_i == 0 %>
                  <% if controller.controller_name == "activities" && controller.action_name == 'welcome' %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'} %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "activities" && controller.action_name != 'welcome' %>

<%= link_to "#{_('Overview') }", { :controller => 'activities', :action => 'list'}, :class => "active"%>

                <% else %>

<%= link_to "#{_('Overview')}", { :controller => 'activities', :action => 'list'} %>

                <% end %>

                <% if controller.controller_name == "tasks" && !['timeline', 'new'].include?(controller.action_name) %>

<%= link_to "#{_('Browse')}", { :controller => 'views', :action => 'browse'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Browse')}", :controller => 'views', :action => 'browse' %>

                <% end %>

                <% if session[:user].option_tracktime == 1%>
                  <% if controller.controller_name == "timeline" && controller.action_name == "list" %>

<%= link_to "#{_('Timeline')}", { :controller => 'timeline', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Timeline')}", :controller => 'timeline', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "project_files"  %>

<%= link_to "#{_('Files')}", {:controller => 'project_files', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Files')}", :controller => 'project_files', :action => 'list' %>

                <% end %>

                <% if session[:user].option_tracktime == 1%>
                  <% if controller.controller_name == "reports"  %>

<%= link_to "#{_('Reports')}", {:controller => 'reports', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Reports')}", :controller => 'reports', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "schedule"  %>

<%= link_to "#{_('Schedule')}", {:controller => 'schedule', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Schedule')}", :controller => 'schedule', :action => 'list' %>

                <% end %>

                <% if controller.controller_name == "wiki"  %>

<%= link_to "#{_('Wiki')}", {:controller => 'wiki', :action => 'show'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Wiki')}", :controller => 'wiki', :action => 'show' %>

                <% end %>

                <% if controller.controller_name == "tasks" && controller.action_name == 'new'  %>

<%= link_to "#{_('New')}", {:controller => 'tasks', :action => 'new'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('New Task')}", :controller => 'tasks', :action => 'new' %>

                <% end %>

<%= link_to "#{_('Log Out')}", { :controller => 'login', :action => 'logout'}, :class => "right" %>

                <% if controller.controller_name == "users" && controller.action_name == "edit_preferences" %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right" %>

                <% end %>

                <% if session[:user].admin > 0 %>

                <% if session[:user].option_externalclients == 1%>
                <% if controller.controller_name == "customers" %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "right" %>

                <% end %>
                <% end %>

                <% if controller.controller_name == "users" && controller.action_name != "edit_preferences" %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right" %>

                <% end %>

                <% end %>

<%=_ 'Search' %> <%= text_field_tag 'query', "", {:size => 10, :style => "font-size:9px;"}%>

                <%= end_form_tag %>

        <% if session[:user].respond_to?(:seen_news_id)%>
          <% news = NewsItem.find(:first, :order => "created_at desc", :conditions => ["id > ?", session[:user].seen_news_id ]) %>
          <% unless news.nil? %>

[<%= tz.utc_to_local(news.created_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") %>]	<%= news.body %>
                <%= link_to_remote "[#{_('Hide')}]", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id },
                :success => visual_effect(:fade, "news", :duration => 0.5) %>

          <% end %>
          <% end %>

            <div id="flash" <%="style=\"display:none\"" unless flash['notice']%>>

<%= @flash['notice'] %>
	[<%=_ 'Hide'%>]

      <% if flash['notice'] %>

      <% end %>

          <%= @content_for_layout %>

<%=_ 'Views' %>

<%= link_to _('New'),  :controller => 'views', :action => 'new' %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                <% project_ids = current_project_ids
                   views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", session[:user].company_id, session[:user].id], :order => "shared, name")
                   for view in views %>

<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>	<%= link_to _('Edit'), :controller => 'views', :action => 'edit', :id => view if view.user_id == session[:user].id %><%= "[#{_('Shared')}]" if view.user_id != session[:user].id %>

                   <% end %>

        <% cache( :controller => "application", :action => "chat", :action_suffix => "#{session[:user].company_id}_#{session[:user].id}") do %>

                    <%=_ 'Chat'%>

                  <% @shouts = Shout.find(:all, :conditions => ["shouts.company_id = ?", session[:user].company.id], :limit => 7, :order => "shouts.id desc", :include => "user" )%>
                  <%= render :partial => "shout/shouts", :locals => { :shouts => @shouts } %>

                        <%= text_field 'shout', 'body' %>

        <% end %>

<%=_ 'Notes'%>

<%= link_to _('New'), :controller => 'pages', :action => 'new' %>

          <% for page in current_pages %>

                  <%= link_to "#{page.name} / #{page.project.name}", { :controller => 'pages', :action => 'show', :id => page} %> (<%=_('%s ago', time_ago_in_words( page.updated_at, false ) )%>)

          <% end %>

    Clocking IT v0.99.1 - <%=_ 'Feedback? Suggestions? Ideas? Bugs?'%> <%=_ 'Let me know'%> <%= link_to "[Admin]", :controller => "admin", :action => "index" if session[:user].admin == 10 %>

<%= periodically_call_remote(:url => { :controller => 'tasks', :action => 'update_sheet_info' }, :frequency => 90 ) -%>
<%#= periodically_call_remote(:url => { :controller => 'shout', :action => 'list_ajax' }, :frequency => 7, :complete => "check_chat(request);" ) -%>

<%= flash_plugin(session[:channels]) %>


Fix wrong translation key in nearby user list. Hopefully fixes #1885

<%= h(@this_user.display_name) %>

<% if @user and @this_user.id == @user.id %>

<%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
| <%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
| <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list_user', :display_name => @user.display_name %>
| <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
| <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% else %>

<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @this_user.id %>
| <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
| <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list_user', :display_name => @this_user.display_name %>
| <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %>
| <% if @user and @user.is_friends_with?(@this_user) %>
  <%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
<% else %>
  <%= link_to t('user.view.add as friend'), :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>
<% end %>
<% end %>

<% if @this_user != nil %>

<%= t 'user.view.mapper since' %><%= l @this_user.creation_time %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %>

<% end %>

<%= t 'user.view.user image heading' %>

<% if @this_user.image %>
  <%= image_tag url_for_file_column(@this_user, "image") %>
  <% if @user and @this_user.id == @user.id %>
    <%= button_to t('user.view.delete image'), :action => 'delete_image' %>
  <% end %>
<% end %>

<% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.upload an image' %>

  <%= form_tag({:action=>'upload_image'}, :multipart => true)%>
    <%= file_column_field 'user', 'image' %>
    <%= submit_tag t('user.view.add image') %>
  </form>
<% end %>

<%= t 'user.view.description' %>

<%= htmlize(@this_user.description) %>

<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>

<%= t 'user.view.user location' %>

  <%= t 'user.view.no home location' %>
  <% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name) %>
  <% end %>
<% else %>

  <% if @user and @this_user.id == @user.id %>

<%= t 'user.view.your friends' %>

    <% if @this_user.friends.empty? %>
      <%= t 'user.view.no friends' %>
    <% else %>

      <% @this_user.friends.each do |friend| %>
      <% @friend = User.find_by_id(friend.friend_user_id) %>

      <% if @friend.image %>
        <%= image_tag url_for_file_column(@friend, "image") %>
      <% end %>

      <%= link_to h(@friend.display_name), :controller => 'user', :action => 'view',  :display_name => @friend.display_name %>
      <% if @friend.home_lon and @friend.home_lat %><%= t 'user.view.km away', :distance => @this_user.distance(@friend).round %><% end %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @friend.id %>)

      <%end%>

    <%end%>

  <%end%>

  <% if @user and @this_user.id == @user.id %>

<%= t 'user.view.nearby users' %>

    <% if @this_user.nearby.empty? %>
      <%= t 'user.view.no nearby users' %>
    <% else %>

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

      <% @this_user.nearby.each do |nearby| %>

      <%= link_to h(nearby.display_name), :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
      <%= t 'user.view.km away', :distance => @this_user.distance(nearby).round %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => nearby.id %>)

      <% end %>

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

<% if @user and @this_user.id == @user.id %>
<%= link_to t('user.view.change your settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% end %>

<%= h(@this_user.display_name) %>

<% if @user and @this_user.id == @user.id %>

<%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
| <%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
| <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list_user', :display_name => @user.display_name %>
| <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
| <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% else %>

<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @this_user.id %>
| <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
| <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list_user', :display_name => @this_user.display_name %>
| <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %>
| <% if @user and @user.is_friends_with?(@this_user) %>
  <%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
<% else %>
  <%= link_to t('user.view.add as friend'), :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>
<% end %>
<% end %>

<% if @this_user != nil %>

<%= t 'user.view.mapper since' %><%= l @this_user.creation_time %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %>

<% end %>

<%= t 'user.view.user image heading' %>

<% if @this_user.image %>
  <%= image_tag url_for_file_column(@this_user, "image") %>
  <% if @user and @this_user.id == @user.id %>
    <%= button_to t('user.view.delete image'), :action => 'delete_image' %>
  <% end %>
<% end %>

<% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.upload an image' %>

  <%= form_tag({:action=>'upload_image'}, :multipart => true)%>
    <%= file_column_field 'user', 'image' %>
    <%= submit_tag t('user.view.add image') %>
  </form>
<% end %>

<%= t 'user.view.description' %>

<%= htmlize(@this_user.description) %>

<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>

<%= t 'user.view.user location' %>

  <%= t 'user.view.no home location' %>
  <% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name) %>
  <% end %>
<% else %>

  <% if @user and @this_user.id == @user.id %>

<%= t 'user.view.your friends' %>

    <% if @this_user.friends.empty? %>
      <%= t 'user.view.no friends' %>
    <% else %>

      <% @this_user.friends.each do |friend| %>
      <% @friend = User.find_by_id(friend.friend_user_id) %>

      <% if @friend.image %>
        <%= image_tag url_for_file_column(@friend, "image") %>
      <% end %>

      <%= link_to h(@friend.display_name), :controller => 'user', :action => 'view',  :display_name => @friend.display_name %>
      <% if @friend.home_lon and @friend.home_lat %><%= t 'user.view.km away', :distance => @this_user.distance(@friend).round %><% end %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @friend.id %>)

      <%end%>

    <%end%>

  <%end%>

  <% if @user and @this_user.id == @user.id %>

<%= t 'user.view.nearby users' %>

    <% if @this_user.nearby.empty? %>
      <%= t 'user.view.no nearby users' %>
    <% else %>

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

      <% @this_user.nearby.each do |nearby| %>

      <%= link_to h(nearby.display_name), :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
      <%= t 'user.view.no nearby users', :distance => @this_user.distance(nearby).round %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => nearby.id %>)

      <% end %>

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

<% if @user and @this_user.id == @user.id %>
<%= link_to t('user.view.change your settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% end %>


[ClockingIT @ Only include users you can see through your projects in filter]

<%= _ 'Tasks' %> <%= " / #{_(session[:view].name)}" unless session[:view].nil? %>

            <% if session[:view].nil? %>
<%= link_to( _("Save as View"), {:controller => 'views', :action => 'save_filter', :tags => @selected_tags.join(',')}) %>
<% end %>

            <%
            @clients = Customer.find(:all, :conditions => ["company_id = ?", session[:user].company_id], :order => "name").collect{ |c| [c.name, c.id.to_s]}

            if session[:filter_customer].to_i > 0
              @all_projects = User.find(session[:user].id).projects.find(:all, :conditions => ["customer_id = #{session[:filter_customer]} AND completed_at IS NULL"])
            else
              @all_projects = User.find(session[:user].id).projects.find(:all, :conditions => ["completed_at IS NULL"])
            end
            @projects = @all_projects.collect {|p| [p.name, p.id.to_s]}

            if session[:filter_project].to_i > 0
              @users = Project.find(:first, :order => "name", :conditions => ["company_id = ? AND id = ?", session[:user].company_id, session[:filter_project]]).users.collect {|c| [ c.name, c.id.to_s ] }
              @milestones = Milestone.find(:all, :order => "due_at", :conditions => ["company_id = ? AND project_id = ? AND completed_at IS NULL", session[:user].company_id, session[:filter_project]]).collect {|c| [ c.name,  c.id.to_s ] }
            else
              project_ids = @all_projects.collect {|p| p.id}.join(',')
              project_ids = "0" if project_ids.empty?

              @user_ids = []
              @all_projects.each do |p|
                @user_ids <
 ["id IN (#{@user_ids.join(',')})"], :order => "name").collect{|u| [u.name, u.id.to_s]}

#              @users = current_projects.collect().collect {|c| [ c.name, c.id.to_s ] }
              @milestones = Milestone.find(:all, :order => "project_id, due_at", :conditions => ["company_id = ? AND project_id IN (#{project_ids}) AND completed_at IS NULL", session[:user].company_id]).collect {|c| [ c.name + " / " + c.project.name, c.id.to_s ] }
            end

            filter_count = 0
            if session[:view].nil?
            %>
            <fieldset style="padding-bottom:0.2em;margin-bottom:1em;"><legend>Filter</legend>
            <%= start_form_tag( :controller => 'tasks', :action => 'filter' ) %>

            <select name="filter" id="filter" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[All Tasks]") %></option>

                <% @clients.each do |c| %>
                  <% @client_projects = User.find(session[:user].id).projects.find(:all, :conditions => ["customer_id = #{c[1]} AND completed_at IS NULL"], :order => "name") %>
                  <% if @client_projects.size > 0 %>
                  <option value="c<%=c[1]%>" class="select_heading"<%= " selected" if c[1].to_i == session[:filter_customer].to_i %>><%= c[0] %></option>
                    <% @client_projects.each do |p| %>
                      <option value="p<%= p.id %>" class="select_item"<%= " selected" if( p.id == session[:filter_project].to_i && -1 != session[:filter_milestone].to_i) %>>  <%= p.name %></option>
                      <% @project_milestones = Milestone.find(:all, :conditions => ["project_id = #{p.id} AND completed_at IS NULL"], :order => "due_at, name") %>
                      <% if @project_milestones.size > 0 -%>
                       <% @project_milestones.each do |m| -%>
                         <option value="m<%=m.id%>" class="select_subitem"<%= " selected" if m.id == session[:filter_milestone].to_i%>>    <%= m.name %></option>
                       <% end -%>
                       <option value="u<%=p.id%>" class="select_default select_subitem"<%= " selected" if session[:filter_milestone].to_i == -1 && session[:filter_project].to_i == p.id %>>    <%= _("[Unassigned]") -%></option>
                      <% end -%>
                    <% end -%>
                  <% end -%>
                <% end %>
            </select>

            <select name="filter_user" id="filter_user" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[Any User]") %></option>
              <%= options_for_select @users, session[:filter_user] %>
              <option value="-1" class="select_default"<%= " selected" if session[:filter_user].to_i == -1 %>><%= _("[Unassigned]") %></option>
            </select>

            <select name="filter_status" id="filter_status" onchange="javascript:document.forms[1].submit();">
              <option value="-1" class="select_default"><%= _("[Any Status]") %></option>

              <%
                 @status = [[_("Open"), "0"],[_("In Progress"), "1"],[_("Closed"), "2"],[_("Won't Fix"), "3"],[_("Invalid"), "4"],[_("Duplicate"), "5"],[_("Archived"), "-2"]]
              %>
              <%= options_for_select @status, session[:filter_status] %>
            </select>

            <select name="group_by" id="group_by" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[No Grouping]") %></option>

              <%
                 @group_by = [[_("Tags"), "1"],[_("Clients"), "2"],[_("Projects"), "3"],[_("Milestones"), "4"],[_("Projects / Milestones"), "10"],[_("Users"), "5"],[_("Task Type"), "6"],[_("Status"), "7"],[_("Priority"), "9"],[_("Severity"), "8"]]
              %>
              <%= options_for_select @group_by, session[:group_by] %>
            </select>

            <select name="sort" id="sort" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[Default Sorting]") %></option>
              <%
                 @sort = [[_("Due Date"), "1"],[_("Age"), "2"],[_("Name"), "3"]]
              %>
              <%= options_for_select @sort, session[:sort] %>
            </select>

            <input type="checkbox" name="hide_dependencies" id="hide_dependencies" title="<%= _('Hide tasks with unmet dependencies') %>" class="tooltip" value="1" <%= session[:hide_dependencies].to_i > 0 ? "checked" : "" %> onChange="javascript:document.forms[1].submit();"><div style="float:left;padding-top:2px;" title="<%= _('Hide tasks with unmet dependencies') %>" class="tooltip"> <%=_ 'Hide Waiting'%>

            <%= end_form_tag %>
            </fieldset>
            <% end %>

            <%= render(:partial => "tag_row", :locals => {:groups => @groups, :parent => ""}) %>

            <%=_ 'Tags' %>

      <% unless @selected_tags.empty? %>

<%= link_to _('[All Tags]'), :action => "list" %>

      <% end %>

      <% for tag in @all_tags
         if @selected_tags.include?(tag[0]) && @selected_tags.size > 0
            link = (@selected_tags - [tag[0]]).join(',')
         else
            link = (@selected_tags + [tag[0]]).join(',')
         end

         link = tag[0]

      %>

<span class="<%= (@selected_tags.include?(tag[0])) ? "tag_active" : "tag" %>"><%= link_to tag[0], :action => "list", :tag => link %> (<%= @tags[tag[0]] %>)

      <% end %>

<%= _ 'Tasks' %> <%= " / #{_(session[:view].name)}" unless session[:view].nil? %>

            <% if session[:view].nil? %>
<%= link_to( _("Save as View"), {:controller => 'views', :action => 'save_filter', :tags => @selected_tags.join(',')}) %>
<% end %>

            <%
            @clients = Customer.find(:all, :conditions => ["company_id = ?", session[:user].company_id], :order => "name").collect{ |c| [c.name, c.id.to_s]}

            if session[:filter_customer].to_i > 0
              @all_projects = User.find(session[:user].id).projects.find(:all, :conditions => ["customer_id = #{session[:filter_customer]} AND completed_at IS NULL"])
            else
              @all_projects = User.find(session[:user].id).projects.find(:all, :conditions => ["completed_at IS NULL"])
            end
            @projects = @all_projects.collect {|p| [p.name, p.id.to_s]}

            if session[:filter_project].to_i > 0
              @users = Project.find(:first, :order => "name", :conditions => ["company_id = ? AND id = ?", session[:user].company_id, session[:filter_project]]).users.collect {|c| [ c.name, c.id.to_s ] }
              @milestones = Milestone.find(:all, :order => "due_at", :conditions => ["company_id = ? AND project_id = ? AND completed_at IS NULL", session[:user].company_id, session[:filter_project]]).collect {|c| [ c.name,  c.id.to_s ] }
            else
              project_ids = @all_projects.collect {|p| p.id}.join(',')
              project_ids = "0" if project_ids.empty?
              @users = User.find(:all, :order => "name", :conditions => ["company_id = ?", session[:user].company_id]).collect {|c| [ c.name, c.id.to_s ] }
              @milestones = Milestone.find(:all, :order => "project_id, due_at", :conditions => ["company_id = ? AND project_id IN (#{project_ids}) AND completed_at IS NULL", session[:user].company_id]).collect {|c| [ c.name + " / " + c.project.name, c.id.to_s ] }
            end

            filter_count = 0
            if session[:view].nil?
            %>
            <fieldset style="padding-bottom:0.2em;margin-bottom:1em;"><legend>Filter</legend>
            <%= start_form_tag( :controller => 'tasks', :action => 'filter' ) %>

            <select name="filter" id="filter" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[All Tasks]") %></option>

                <% @clients.each do |c| %>
                  <% @client_projects = User.find(session[:user].id).projects.find(:all, :conditions => ["customer_id = #{c[1]} AND completed_at IS NULL"], :order => "name") %>
                  <% if @client_projects.size > 0 %>
                  <option value="c<%=c[1]%>" class="select_heading"<%= " selected" if c[1].to_i == session[:filter_customer].to_i %>><%= c[0] %></option>
                    <% @client_projects.each do |p| %>
                      <option value="p<%= p.id %>" class="select_item"<%= " selected" if( p.id == session[:filter_project].to_i && -1 != session[:filter_milestone].to_i) %>>  <%= p.name %></option>
                      <% @project_milestones = Milestone.find(:all, :conditions => ["project_id = #{p.id} AND completed_at IS NULL"], :order => "due_at, name") %>
                      <% if @project_milestones.size > 0 -%>
                       <% @project_milestones.each do |m| -%>
                         <option value="m<%=m.id%>" class="select_subitem"<%= " selected" if m.id == session[:filter_milestone].to_i%>>    <%= m.name %></option>
                       <% end -%>
                       <option value="u<%=p.id%>" class="select_default select_subitem"<%= " selected" if session[:filter_milestone].to_i == -1 && session[:filter_project].to_i == p.id %>>    <%= _("[Unassigned]") -%></option>
                      <% end -%>
                    <% end -%>
                  <% end -%>
                <% end %>
            </select>
            <%
              filter_count += 1
              %>

            <% if @users.size > 1 %>
            <select name="filter_user" id="filter_user" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[Any User]") %></option>
              <%= options_for_select @users, session[:filter_user] %>
              <option value="-1" class="select_default"<%= " selected" if session[:filter_user].to_i == -1 %>><%= _("[Unassigned]") %></option>
            </select>
            <%
              filter_count += 1
              end
              %>
            <% if filter_count > 2 %>

            <% filter_count = 0
                end %>

            <select name="filter_status" id="filter_status" onchange="javascript:document.forms[1].submit();">
              <option value="-1" class="select_default"><%= _("[Any Status]") %></option>

              <%
                 @status = [[_("Open"), "0"],[_("In Progress"), "1"],[_("Closed"), "2"],[_("Won't Fix"), "3"],[_("Invalid"), "4"],[_("Duplicate"), "5"],[_("Archived"), "-2"]]
              %>
              <%= options_for_select @status, session[:filter_status] %>
            </select>

            <select name="group_by" id="group_by" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[No Grouping]") %></option>

              <%
                 @group_by = [[_("Tags"), "1"],[_("Clients"), "2"],[_("Projects"), "3"],[_("Milestones"), "4"],[_("Projects / Milestones"), "10"],[_("Users"), "5"],[_("Task Type"), "6"],[_("Status"), "7"],[_("Priority"), "9"],[_("Severity"), "8"]]
              %>
              <%= options_for_select @group_by, session[:group_by] %>
            </select>

            <select name="sort" id="sort" onchange="javascript:document.forms[1].submit();">
              <option value="0" class="select_default"><%= _("[Default Sorting]") %></option>
              <%
                 @sort = [[_("Due Date"), "1"],[_("Age"), "2"],[_("Name"), "3"]]
              %>
              <%= options_for_select @sort, session[:sort] %>
            </select>

            <input type="checkbox" name="hide_dependencies" id="hide_dependencies" title="<%= _('Hide tasks with unmet dependencies') %>" class="tooltip" value="1" <%= session[:hide_dependencies].to_i > 0 ? "checked" : "" %> onChange="javascript:document.forms[1].submit();"><div style="float:left;padding-top:2px;" title="<%= _('Hide tasks with unmet dependencies') %>" class="tooltip"> <%=_ 'Hide Waiting'%>

            <%= end_form_tag %>
            </fieldset>
            <% end %>

            <%= render(:partial => "tag_row", :locals => {:groups => @groups, :parent => ""}) %>

            <%=_ 'Tags' %>

      <% unless @selected_tags.empty? %>

<%= link_to _('[All Tags]'), :action => "list" %>

      <% end %>

      <% for tag in @all_tags
         if @selected_tags.include?(tag[0]) && @selected_tags.size > 0
            link = (@selected_tags - [tag[0]]).join(',')
         else
            link = (@selected_tags + [tag[0]]).join(',')
         end

         link = tag[0]

      %>

<span class="<%= (@selected_tags.include?(tag[0])) ? "tag_active" : "tag" %>"><%= link_to tag[0], :action => "list", :tag => link %> (<%= @tags[tag[0]] %>)

      <% end %>


germanized title; focus title field in 'new booking'

Neue Buchung

<% form_tag( {:action => 'create'}, { :multipart => true } ) do %>
  <%= render :partial => 'form' %>
  <%= submit_tag "Create" %>
<% end %>

<%= link_to 'Back', :action => 'list' %>

New booking

<% form_tag( {:action => 'create'}, { :multipart => true } ) do %>
  <%= render :partial => 'form' %>
  <%= submit_tag "Create" %>
<% end %>

<%= link_to 'Back', :action => 'list' %>


Add "Open Source Citation Parser" to <title>

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

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

  <%= @content_for_head %>

      Brown University

    FreeCite
    Citation Classifier

      <%= @content_for_layout %>

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

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

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

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

  <title>FreeCite</title>
  <%= stylesheet_link_tag "main" %>

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

  <%= @content_for_head %>

      Brown University

    FreeCite
    Citation Classifier

      <%= @content_for_layout %>

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

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

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

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


fixing the Rico.Corner problem. the problem was that the Rico.Corner elements weren't clearing the pagination link float.

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

      <td colspan="<%= active_scaffold_config.list.columns.length + 1 -%>" class="messages-container">
        <div id="<%= active_scaffold_messages_id -%>">
          <%= render :partial => 'messages' %>

        <p id="<%= empty_message_id %>" class="empty-message" <%= ' style="display:none;" ' unless @page.items.empty? %>>
          <%= _('NO_ENTRIES') %>

  <tbody class="records" id="<%= active_scaffold_tbody_id %>">
    <% if !@records.empty? -%>
      <%= render :partial => 'list_record', :collection => @page.items, :locals => { :hidden => false } %>
      <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} -%>
        <%= render :partial => 'list_calculations' %>
      <% end -%>
    <% end -%>

    <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } unless @page.pager.number_of_pages == 1 %>

  <%= @page.pager.count -%> <%=_('FOUND')%>

<% # a hack for the Rico Corner problem %>


Use Effect.show instead of Effect.Appear for comment_loading div since the latter caused the spinner to keep spinning even after the comment was submitted

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

<% content_for("script") do %>
function item_added() {
  new Effect.Appear($('commentList').lastChild);
  Element.hide('comment_loading');
  Element.show('commentform');
  $('commentform').elements[2].value = '';
  $('commentform').elements[2].focus();
  $('form-submit-button').disabled = false;
}
function item_loading() {
  $('form-submit-button').disabled = true;
  Element.show('comment_loading');
}

window.onload = function() {
  if( $('commentform').elements[1].value != '' ) {
    Element.show('guest_url');
  }
}
<% end %>

<%= render_partial "article", @article %>

<% if @article.allow_comments > 0 -%>

Comments...

    Leave a response

    <%= render_collection_of_partials "comment", @article.comments %>

<% end -%>

<% if @article.allow_pings > 0 -%>

Trackbacks...

    Use the following link to trackback from your own site:

    <%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %>

    <%= render_collection_of_partials "trackback", @article.trackbacks %>

<% end -%>

<% if @article.allow_comments > 0 -%>
  <%= form_remote_tag :url => {:action => "comment", :id => @article.id},
                      :update => "commentList", :position=> "bottom",
                      :loading => "item_loading()",
                      :complete => "item_added()",
                      :html => {:id=>"commentform",:class=>"commentform"} %>

    write a comment....

        Your name

          <%= text_field "comment", "author", :size => 20 %> (leave url »)

        Your blog

          <%= text_field "comment", "url" %>

          Your message

          <%= text_area "comment", "body", "style"=> "width:300px;height:200px" %>

          <%= image_tag "spinner.gif" %>
          <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />

  <%= end_form_tag %>
<% end -%>

<% content_for("script") do %>
function item_added() {
  new Effect.Appear($('commentList').lastChild);
  Element.hide('comment_loading');
  Element.show('commentform');
  $('commentform').elements[2].value = '';
  $('commentform').elements[2].focus();
  $('form-submit-button').disabled = false;
}
function item_loading() {
  $('form-submit-button').disabled = true;
  new Effect.Appear('comment_loading');
}

window.onload = function() {
  if( $('commentform').elements[1].value != '' ) {
    Element.show('guest_url');
  }
}
<% end %>

<%= render_partial "article", @article %>

<% if @article.allow_comments > 0 -%>

Comments...

    Leave a response

    <%= render_collection_of_partials "comment", @article.comments %>

<% end -%>

<% if @article.allow_pings > 0 -%>

Trackbacks...

    Use the following link to trackback from your own site:

    <%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %>

    <%= render_collection_of_partials "trackback", @article.trackbacks %>

<% end -%>

<% if @article.allow_comments > 0 -%>
  <%= form_remote_tag :url => {:action => "comment", :id => @article.id},
                      :update => "commentList", :position=> "bottom",
                      :loading => "item_loading()",
                      :complete => "item_added()",
                      :html => {:id=>"commentform",:class=>"commentform"} %>

    write a comment....

        Your name

          <%= text_field "comment", "author", :size => 20 %> (leave url »)

        Your blog

          <%= text_field "comment", "url" %>

          Your message

          <%= text_area "comment", "body", "style"=> "width:300px;height:200px" %>

          <%= image_tag "spinner.gif" %>
          <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />

  <%= end_form_tag %>
<% end -%>


entitiy_created event is now published by rails helper

<%= @title %>

<div id="<%="#{@entity.name.underscorize}_list_div"%>">


The search help has now moved to the Search page on the wiki, which previously contained out of date information on searching.

      Search Results
      Close

<% content_for "optionals" do %>

    Search
    Where am I?

    <% form_remote_tag(:loading => "startSearch()",
                       :complete => "endSearch()",
                       :url => { :controller => :geocoder, :action => :search }) do %>
      <%= text_field_tag :query, params[:query] %>
    <% end %>

Searching...

      examples: 'Alkmaar', 'Regent Street, Cambridge', 'CB2 5AQ',
      or 'post offices near Lünen'
      more examples...

<% end %>


add limition to the booking in current year only

Mina spelrätt bokning

    <% if current_user.play_right_bookings.size == 0 %>

Du har ingen bokning

    <% else %>

Du har följande bokning.

          Golf banan
	        Datum

        <%current_user.play_right_bookings.each do | booking | %>

	        <%= h(booking.play_right.name) %>
          <%= booking.booked_on %>

            <%= link_to "Ta bort", {:action => "remove", :id => booking.id},
              :confirm => "Är du säker du vill ta bort bokningen den #{booking.booked_on} på #{booking.play_right.name}?",
              :method => :post %>

        <% end %>

    <% end %>

Boka nytt spelrätt

Här kan du boka golf banan. Du får bara har ett utstående bokning per gång.

    <% semantic_form_for [:member, PlayRightBooking.new] do |form| %>
      <% form.inputs do %>
        <%= form.input :play_right, :label => 'Golfsbanan', :include_blank => false %>
        <%= form.input :booked_on, :label => 'Datum', :start_year => Time.now.year, :end_year => Time.now.year %>
        <%= form.input :num_of_resource, :as => :hidden, :value => "1" %>
      <% end %>
      <% form.buttons do %>
        <%= form.commit_button :label => "Boka" %>
      <% end %>
    <% end %>

Dagens boking av spelrätter

      <% @play_rights.each do |pr| %>
      <%  booking_count = pr.play_right_bookings.today.count %>
      <%   if booking_count == 0 %>

<%= "Idag har  #{pr.name} ingen bokning" %>

      <%   else %>

             <%   booking_msg = (booking_count == 1) ? "bokning" : "bokningar" %>
             <%= "Idag har  #{pr.name} #{booking_count} #{booking_msg}" %>

                <% pr.play_right_bookings.today.each do |booking| %>

<%= "#{booking.user.name} - #{booking.user.email} - #{booking.user.mobile_phone}" %>

               <% end %>

        <% end %>
     <% end %>

Mina spelrätt bokning

    <% if current_user.play_right_bookings.size == 0 %>

Du har ingen bokning

    <% else %>

Du har följande bokning.

          Golf banan
	        Datum

        <%current_user.play_right_bookings.each do | booking | %>

	        <%= h(booking.play_right.name) %>
          <%= booking.booked_on %>

            <%= link_to "Ta bort", {:action => "remove", :id => booking.id},
              :confirm => "Är du säker du vill ta bort bokningen den #{booking.booked_on} på #{booking.play_right.name}?",
              :method => :post %>

        <% end %>

    <% end %>

Boka nytt spelrätt

Här kan du boka golf banan. Du får bara har ett utstående bokning per gång.

    <% semantic_form_for [:member, PlayRightBooking.new] do |form| %>
      <% form.inputs do %>
        <%= form.input :play_right, :label => 'Golfsbanan', :include_blank => false %>
        <%= form.input :booked_on, :label => 'Datum' %>
        <%= form.input :num_of_resource, :as => :hidden, :value => "1" %>
      <% end %>
      <% form.buttons do %>
        <%= form.commit_button :label => "Boka" %>
      <% end %>
    <% end %>

Dagens boking av spelrätter

      <% @play_rights.each do |pr| %>
      <%  booking_count = pr.play_right_bookings.today.count %>
      <%   if booking_count == 0 %>

<%= "Idag har  #{pr.name} ingen bokning" %>

      <%   else %>

             <%   booking_msg = (booking_count == 1) ? "bokning" : "bokningar" %>
             <%= "Idag har  #{pr.name} #{booking_count} #{booking_msg}" %>

                <% pr.play_right_bookings.today.each do |booking| %>

<%= "#{booking.user.name} - #{booking.user.email} - #{booking.user.mobile_phone}" %>

               <% end %>

        <% end %>
     <% end %>


#1605 - changed the contact email at the bottom of the page for leader impact group to

vip@leaderimpactgroup.com

<!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 spt@campusforchrist.org 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' %>
    <%= render :partial => "externs/sortable_tables" %>
    <%= javascript_include_tag "prototype", "effects" %>
    <%= render :partial => "externs/load_extern" %>

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

debug: <%= @debug -%>

    <% end -%>

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

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

        <% if @user %>

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

        <% end %>

        <% if @eg %>

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

        <% end %>

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

Project Application Tool

      <% end -%>

    <% if @user %>

          <%= new_item "Your Apps", "your_apps", :list %>
          <% if @show_your_project %>
            <%= new_item "Your Projects", "main", :your_projects %>
          <% end %>
          <% unless @user.is_student? %>
            <%= new_item "App Processing", "main", :your_applications %>
            <% if @eg && @eg.has_your_campuses %>
              <%= new_item "Your Campuses", "main", :your_campuses %>
	          <% end %>
            <% if @user.is_projects_coordinator? %>
              <%= 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 = h(msg) %>
      <%= content_tag :div, full_msg, :id => "flash_#{key}", :class => 'error flash' %>
    <% end -%>
    <% flash.discard -%>

    <% @notifications.each do |n| -%>
      <% full_msg = h(n.message) + "
"
         unless n.no_hide_button || @user.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 @user && !@user.is_student? && !@eg.nil? %>

        <%= 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%>
          <%= submit_tag "Search" %>
        </form>

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

    <% if file_exists? controller.controller_name + "/_menu" %>
      <%= render :partial => controller.controller_name + "/menu" %>
    <% elsif @submenu && file_exists?(@submenu + "/_menu") %>
      <%= render :partial => @submenu + "/menu" %>
    <% end %>

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

          <%= submenu_items_html %>

    <% end %>

        <% if @form && params[:controller] != 'forms' %>
          <%= render "layouts/form_#{@form}.rhtml" %>
        <% else %>
          <%= yield %>
        <% end %>

    <% if @eg || @show_contact_emails_override %>

        Non-Technical Inquiries:

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - vip@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

			Technical Inquiries:help.pat@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 spt@campusforchrist.org 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' %>
    <%= render :partial => "externs/sortable_tables" %>
    <%= javascript_include_tag "prototype", "effects" %>
    <%= render :partial => "externs/load_extern" %>

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

debug: <%= @debug -%>

    <% end -%>

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

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

        <% if @user %>

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

        <% end %>

        <% if @eg %>

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

        <% end %>

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

Project Application Tool

      <% end -%>

    <% if @user %>

          <%= new_item "Your Apps", "your_apps", :list %>
          <% if @show_your_project %>
            <%= new_item "Your Projects", "main", :your_projects %>
          <% end %>
          <% unless @user.is_student? %>
            <%= new_item "App Processing", "main", :your_applications %>
            <% if @eg && @eg.has_your_campuses %>
              <%= new_item "Your Campuses", "main", :your_campuses %>
	          <% end %>
            <% if @user.is_projects_coordinator? %>
              <%= 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 = h(msg) %>
      <%= content_tag :div, full_msg, :id => "flash_#{key}", :class => 'error flash' %>
    <% end -%>
    <% flash.discard -%>

    <% @notifications.each do |n| -%>
      <% full_msg = h(n.message) + "
"
         unless n.no_hide_button || @user.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 @user && !@user.is_student? && !@eg.nil? %>

        <%= 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%>
          <%= submit_tag "Search" %>
        </form>

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

    <% if file_exists? controller.controller_name + "/_menu" %>
      <%= render :partial => controller.controller_name + "/menu" %>
    <% elsif @submenu && file_exists?(@submenu + "/_menu") %>
      <%= render :partial => @submenu + "/menu" %>
    <% end %>

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

          <%= submenu_items_html %>

    <% end %>

        <% if @form && params[:controller] != 'forms' %>
          <%= render "layouts/form_#{@form}.rhtml" %>
        <% else %>
          <%= yield %>
        <% end %>

    <% if @eg || @show_contact_emails_override %>

        Non-Technical Inquiries:

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - danielled@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

			Technical Inquiries:help.pat@powertochange.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>


git-svn-id: http://seta.dit.upm.es/svn/ging/sir2.0/trunk@14888 3f47a204-8049-4147-aab0-d444c64e7564

<% if logged_in? %>

		 	<%= nav_tab "Home", { :url => space_path(@space), :id=>'round_button'} %>
		 	<%= nav_tab "MyProfile", { :url => user_profile_path(current_user), :id=>'round_button2'} %>
		    <%= nav_tab "Events", { :url => space_events_path(@space), :id=>'round_button3'} %>
		 	<%= nav_tab "Posts", { :url => space_articles_path(@space), :id=>'round_button4'} %>
		 	<%if @space.id!=1%>
				<%= nav_tab "People", { :url => space_users_path(@space, {:only_space_users => true}), :id=>'round_button5'} %>
		 		<%= nav_tab "Groups", { :url =>  space_groups_path(@space), :id=>'round_button6'} %>
		 	<%else%>
				<%= nav_tab "People", { :url => space_users_path(@space), :id=>'round_button5'} %>
		 		<%= nav_tab "Spaces", { :url =>  spaces_path, :id=>'round_button6'} %>
			<%end%>

			<%if current_user.superuser==true%>

				<%= nav_tab "Manage", :url => spaces_path(:manage=>true), :id=>'round_button7' %>

			<%end%>

<% elsif @space%>

      	    <%= nav_tab "Home", { :url => space_path(@space), :id=>'round_button'} %>
		     <%= nav_tab "Events", { :url => space_events_path(@space), :id=>'round_button2'} %>
		 	<%= nav_tab "Posts", { :url => space_articles_path(@space), :id=>'round_button3'} %>
			<%if @space.id!=1%>
				<%= nav_tab "People", { :url => space_users_path(@space, {:only_space_users => true}), :id=>'round_button4'} %>
		 		<%= nav_tab "Groups", { :url =>  space_groups_path(@space), :id=>'round_button5'} %>
			<%else%>
				<%= nav_tab "People", { :url => space_users_path(@space), :id=>'round_button4'} %>
		 		<%= nav_tab "Spaces", { :url =>  spaces_path, :id=>'round_button5'} %>
		 	<%end%>

  <%else%>

      	    <%= nav_tab "Home", { :url => space_path("Public"),:id=>'round_button'} %>
		    <%= nav_tab "Events", { :url => space_events_path("Public"), :id=>'round_button2'} %>
		 	<%= nav_tab "Posts", { :url => {:controller=>'articles', :action=>'index', :space_id => "Public"}, :id=>'round_button3'} %>

<% end %>

<% if logged_in? %>

		 	<%= nav_tab "Home", { :url => space_path(@space), :id=>'round_button'} %>
		 	<%= nav_tab "MyProfile", { :url => user_profile_path(current_user), :id=>'round_button2'} %>
		    <%= nav_tab "Events", { :url => space_events_path(@space), :id=>'round_button3'} %>
		 	<%= nav_tab "Posts", { :url => space_articles_path(@space), :id=>'round_button4'} %>
		 	<%if @space.id!=1%>
				<%= nav_tab "People", { :url => space_users_path(@space, {:only_space_users => true}), :id=>'round_button5'} %>
		 		<%= nav_tab "Groups", { :url =>  space_groups_path(@space), :id=>'round_button6'} %>
		 	<%else%>
				<%= nav_tab "People", { :url => space_users_path(@space), :id=>'round_button5'} %>
		 		<%= nav_tab "Spaces", { :url =>  spaces_path, :id=>'round_button6'} %>
			<%end%>

			<%if current_user.superuser==true%>

				<%= nav_tab "Manage", :url => spaces_path(:manage=>true), :id=>'round_button7' %>

			<%end%>

<% elsif @space%>

      	    <%= nav_tab "Home", { :url => space_path(@space)} %>
		    <%= nav_tab "Events", { :url => space_events_path(@space)} %>
		 	<%= nav_tab "Posts", { :url => space_articles_path(@space)} %>
			<%if @space.id!=1%>
				<%= nav_tab "People", { :url => space_users_path(@space, {:only_space_users => true})} %>
		 		<%= nav_tab "Groups", { :url =>  space_groups_path(@space)} %>
			<%else%>
				<%= nav_tab "People", { :url => space_users_path(@space)} %>
		 		<%= nav_tab "Spaces", { :url =>  spaces_path} %>
		 	<%end%>

  <%else%>

      	    <%= nav_tab "Home", { :url => space_path("Public")} %>
		    <%= nav_tab "Events", { :url => space_events_path("Public")} %>
		 	<%= nav_tab "Posts", { :url => {:controller=>'articles', :action=>'index', :space_id => "Public"}} %>

<% end %>


LInk from admin interface to home page of site is useful

<!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')) }) %>

<%= link_to 'WhatDoTheyKnow', main_url('/') %> admin interface:
    <%= link_to 'Overview', admin_url('') %>
    | <%= link_to 'Timeline', admin_url('timeline') %>
    | <%= link_to 'Public authorities', 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>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 authorities', admin_url('body/list') %>
    | <%= link_to 'Requests', admin_url('request/list') %>
    | <%= link_to 'Users', admin_url('user/list') %>

<%= flash[:notice] %>

    <%= yield  %>


nothing to see here, move along

nothing to see here, move along

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

links

Ruby on Rails

Textmate

My Projects

Snowdevil

Typo weblogging engine

Hieraki book collaboration


fix typo in href

fix typo in href

Welcome to FreeCite!

FreeCite is an open-source application that classifies document citations into fielded data. You can use
    it as a web application
    or a <%= link_to "service", :contoller => "welcome", :action => "api_instructions" %>. You can also
    download the source and run FreeCite on your
    own server. FreeCite is distributed under the <a href="http://www.opensource.org/licenses/mit-license.php"MIT license.

FreeCite was inspired by
    ParsCit.
    Much thanks to ParsCit's maintainer, Isaac Councill.

FreeCite was developed through a partnership between the
    Brown
    University Library and Providence-based start-up
    Public Display,
    with funding from the Mellon Foundation.

FreeCite is implemented in Ruby on Rails and
    uses the CRF++ library
    implementation of conditional random fields. Our model is trained on the
    CORA dataset.

If you're interested in a tool like FreeCite, you should check out these other
    citation tools:

ParaCite

ParsCit

    <%= link_to "Let us know", :action => "feedback" %> of any other tools you'd like to see listed here.

<%= link_to "Please get in touch with us", :action => "feedback" %> if you have any feedback to share.

    <%= render :partial => "citations/parse_string" %>

<%= link_to "Learn about our API", :controller => "welcome", :action => "api_instructions" %>


ActionItem36: adding link to add person as friend

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

  <%if logged_in? && (user != profile) %>

<%= link_to _('Add friend'), :profile => user.identifier, :controller => 'friends', :action => 'add', :id => profile.id %>

  <% end %>