#1631 - drime contact in bottom footer

#1631 - drime contact in bottom footer

Contact created. - evan

<!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 = n.message
         full_msg = h(full_msg) unless n.allow_html
         full_msg += "
"

         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

        DRIME - tanya@drime.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 = n.message
         full_msg = h(full_msg) unless n.allow_html
         full_msg += "
"

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


Revert "unhide plugins tab"

Revert "unhide plugins tab"

This reverts commit 7af009a57222f56ad33aa9527f323321ff39320e.

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

    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title><%= site.title %>: Admin <%= controller.controller_name %></title>
    <%= stylesheet_link_tag 'mephisto/mephisto' %>
    <%= javascript_include_tag 'mephisto/prototype', 'mephisto/effects', 'mephisto/dragdrop', 'mephisto/lowpro', 'mephisto/application' %>

    <%= yield :head %>

<%= link_to 'Website', dispatch_path([]) %>

      <% if admin? -%>

<%= link_to 'Settings', :controller => 'settings' %>

      <% end -%>
			<% if Site.multi_sites_enabled && global_admin? %>

<%= link_to 'Sites', :controller => '/admin/sites' %>

			<% end %>

<%= link_to 'Account', :controller => 'users', :action => 'show', :id => current_user %>

<%= link_to 'Logout', :controller => '/account', :action => 'logout' %>

<%= link_to "#{site.title} — Admin", { :controller => '/admin/overview' }, :title => "#{site.title} admin" %>

        <% if logged_in? -%>

<%= link_to 'Overview',  :controller => '/admin/overview' %>

<%= link_to 'Articles',  :controller => '/admin/articles' %>

<%= link_to 'Assets',    :controller => '/admin/assets' %>

          <% Mephisto::Plugin.tabs.each do |tab| -%>

<%= link_to tab.first, tab.last %>

          <% end -%>

          <% if admin? -%>

<%= link_to 'Sections', :controller => '/admin/sections' %>

<%= link_to 'Design',   :controller => '/admin/design' %>

<%= link_to "Users",    :controller => "users" %>

					<% if false -%>
						hidden because plugins are in for a change

<%= link_to 'Plugins',  :controller => '/admin/plugins' %>

					<% end -%>
          <% Mephisto::Plugin.admin_tabs.each do |tab| -%>

<%= link_to tab.first.to_s.tableize.humanize, tab.last %>

          <% end -%>

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

      <%= yield :form if @content_for_form %>

<%= flash[:error] %>

<%= flash[:notice] %>

          <%= yield :action_nav %>

<%= yield %>

          <%= yield :sidebar %>

      <%= '</form>' if @content_for_form %>

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

    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title><%= site.title %>: Admin <%= controller.controller_name %></title>
    <%= stylesheet_link_tag 'mephisto/mephisto' %>
    <%= javascript_include_tag 'mephisto/prototype', 'mephisto/effects', 'mephisto/dragdrop', 'mephisto/lowpro', 'mephisto/application' %>

    <%= yield :head %>

<%= link_to 'Website', dispatch_path([]) %>

      <% if admin? -%>

<%= link_to 'Settings', :controller => 'settings' %>

      <% end -%>
			<% if Site.multi_sites_enabled && global_admin? %>

<%= link_to 'Sites', :controller => '/admin/sites' %>

			<% end %>

<%= link_to 'Account', :controller => 'users', :action => 'show', :id => current_user %>

<%= link_to 'Logout', :controller => '/account', :action => 'logout' %>

<%= link_to "#{site.title} — Admin", { :controller => '/admin/overview' }, :title => "#{site.title} admin" %>

        <% if logged_in? -%>

<%= link_to 'Overview',  :controller => '/admin/overview' %>

<%= link_to 'Articles',  :controller => '/admin/articles' %>

<%= link_to 'Assets',    :controller => '/admin/assets' %>

          <% Mephisto::Plugin.tabs.each do |tab| -%>

<%= link_to tab.first, tab.last %>

          <% end -%>

          <% if admin? -%>

<%= link_to 'Sections', :controller => '/admin/sections' %>

<%= link_to 'Design',   :controller => '/admin/design' %>

<%= link_to "Users",    :controller => "users" %>

<%= link_to 'Plugins',  :controller => '/admin/plugins' %>

          <% Mephisto::Plugin.admin_tabs.each do |tab| -%>

<%= link_to tab.first.to_s.tableize.humanize, tab.last %>

          <% end -%>

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

      <%= yield :form if @content_for_form %>

<%= flash[:error] %>

<%= flash[:notice] %>

          <%= yield :action_nav %>

<%= yield %>

          <%= yield :sidebar %>

      <%= '</form>' if @content_for_form %>


Fix broken html with additional </td> and no matching open.

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

                  <%= render :partial => "layouts/tabmenu" %>

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


Update admin timeline with new consistent link format

<% @title = "Timeline" %>

    Hour
    Day
    2 days
    Week
    Month
    All time

<%=h @events_title%>

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

        <% end %>

<%= simple_date(event_at) %>

    <% else %>

    <% end %>
    <% last_date = event_at.to_date %>

    <%= simple_time(event_at) %>

    <% if event.is_a? InfoRequestEvent %>
        <%= request_both_links(event.info_request) %>

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

<% end %>

<% @title = "Timeline" %>

    Hour
    Day
    2 days
    Week
    Month
    All time

<%=h @events_title%>

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

        <% end %>

<%= simple_date(event_at) %>

    <% else %>

    <% end %>
    <% last_date = event_at.to_date %>

    <%= simple_time(event_at) %>

    <% if event.is_a? InfoRequestEvent %>
        <%= link_to(''.html_safe, admin_request_show_url(event.info_request), :title => "view full details")%>
        <%= link_to(event.info_request.title, request_path(event.info_request), :title => "view request on public website")%>

        <% if event.event_type == 'edit' %>
            was edited by administrator <%=h event.params[:editor] %>.
            <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
                    if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                        %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                    end
               end
            %>
        <% elsif event.event_type == 'edit_outgoing' %>
            <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %>
            had outgoing message edited by administrator <%=h event.params[:editor] %>.
            <% if outgoing_message %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing outgoing message, internal error.
            <% end %>
        <% elsif event.event_type == 'edit_comment' %>
            <% comment = Comment.find(event.params[:comment_id].to_i) %>
            had annotation edited by administrator <%=h event.params[:editor] %>.
            <% if comment %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing annotation, internal error.
            <% end %>
        <% elsif event.event_type == 'destroy_incoming' %>
            had incoming message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'destroy_outgoing' %>
            had outgoing message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'hide' %>
            was hidden by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'redeliver_outgoing' %>
            had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>.
         <% elsif event.event_type == 'response' %>
            <% incoming_message = event.incoming_message %>
            received
            <%= link_to 'a response', incoming_message_path(incoming_message) %>
            from <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'sent' %>
            was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'resent' %>
            had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'followup_sent' %>
            had a follow up message sent to <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'comment' %>
            had an annotation posted by <%=h event.comment.user.name %>.
        <% elsif event.event_type == 'status_update' %>
                had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'.
        <% else %>
            had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>.
        <% end %>
    <% else %>
        <%= link_to(''.html_safe, admin_body_show_path(event.public_body), :title => "view full details")%>
        <%= link_to(event.public_body.name, public_body_path(event.public_body), :title => "view authority on public website")%>
        was created/updated by administrator <%=h event.last_edit_editor %>
    <% end %>
<% end %>
<%= will_paginate(@events, :class => 'paginator') %>
<% if not @events.empty? %>

<% end %>


Show ban text in user list

Show ban text in user list

  <% for user in users %>

          <a href="#user_<%=user.id%>" data-toggle="collapse" data-parent="requests">
          <% if user.admin_level == "super" %>
            superuser
          <% end %>
          <%= link_to("#{h(user.name)} (#{user.email})", user_admin_url(user))%>

          updated <%=I18n.l(user.updated_at, :format => "%e %B %Y %H:%M:%S")%>

      <div id="user_<%=user.id%>" class="accordion-body collapse">

            <% if banned_column %>

                Ban text
                <%= h user.ban_text %>

            <% end %>
            <% user.for_admin_column do |name, value, type|%>

                <%=h name%>

                  <% if type == 'datetime' %>
                    <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                    (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                  <% else %>
                    <%= h value %>
                  <% end %>

            <% end %>

  <% end %>

<%= will_paginate(users, :class => "paginator") %>

  <% for user in users %>

        <a href="#user_<%=user.id%>" data-toggle="collapse" data-parent="requests">
	 <% if user.admin_level == "super" %>
          superuser
	 <% end %>
        <%= link_to("#{h(user.name)} (#{user.email})", user_admin_url(user))%>

	 updated <%=I18n.l(user.updated_at, :format => "%e %B %Y %H:%M:%S")%>

      <div id="user_<%=user.id%>" class="accordion-body collapse">

            <% user.for_admin_column do |name, value, type|%>

                  <%=h name%>

                  <% if type == 'datetime' %>
                    <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                    (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                  <% else %>
                    <%= h value %>
                  <% end %>

            <% end %>

  <% end %>

<%= will_paginate(users, :class => "paginator") %>


Put date in first column so can see it on narrow screen.

<% @title = "Public authority - " + h(@public_body.name) %>

<%=@title%>

<%
   columns = PublicBody.content_columns + [] # force dup
   columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}

   for column in columns %>
  <%= column.human_name %>:
  <% if column.name == 'home_page' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name))  %>
  <% elsif column.name == 'request_email' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), "mailto:" + @public_body.send(column.name))  %>
  <% else %>
      <%=h @public_body.send(column.name) %>
  <% end %>

<% end %>
Calculated home page:
<% if !@public_body.calculated_home_page.nil? %>
    <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
<% else %>
    *unknown*
<% end %>

Tags: <%= @public_body.public_body_tags.map { |t|
        link_to(h(t.name), list_public_bodies_url(:tag => t.name)) +
        ' (admin)' }.join(' ') %>

    <%= link_to 'Public page', main_url(public_body_url(@public_body)) %>
    | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>

History

Updated at
<%
    history_columns = PublicBody.content_columns + [] # force dup
    history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter'].include?(c.name)}
    for column in history_columns %>
  <%= column.human_name %>
<% end %>

<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %>
<% for historic_public_body in @public_body.reverse_sorted_versions %>
      <tr class="<%= cycle('odd', 'even') %>">
      <%=h historic_public_body.updated_at %>
    <% for column in history_columns %>
      <%
        value = h(historic_public_body.send(column.name))
        if column.name == 'last_edit_comment'
            value = historic_public_body.last_edit_comment_for_html_display
        end
        # Highlight entries which have changed since previous version
        changed = (!['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.sorted_versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
      <td <%= changed ? ' class="entry_changed" ': '' %> >
      <%=value%>

    <% end %>

<% end %>

Requests

<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %>

Track things

<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %>

<% @title = "Public authority - " + h(@public_body.name) %>

<%=@title%>

<%
   columns = PublicBody.content_columns + [] # force dup
   columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}

   for column in columns %>
  <%= column.human_name %>:
  <% if column.name == 'home_page' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name))  %>
  <% elsif column.name == 'request_email' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), "mailto:" + @public_body.send(column.name))  %>
  <% else %>
      <%=h @public_body.send(column.name) %>
  <% end %>

<% end %>
Calculated home page:
<% if !@public_body.calculated_home_page.nil? %>
    <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
<% else %>
    *unknown*
<% end %>

Tags: <%= @public_body.public_body_tags.map { |t|
        link_to(h(t.name), list_public_bodies_url(:tag => t.name)) +
        ' (admin)' }.join(' ') %>

    <%= link_to 'Public page', main_url(public_body_url(@public_body)) %>
    | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>

History

<%
    history_columns = PublicBody.content_columns + [] # force dup
    history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter'].include?(c.name)}
    for column in history_columns %>
  <%= column.human_name %>
<% end %>
Updated at

<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %>
<% for historic_public_body in @public_body.reverse_sorted_versions %>
      <tr class="<%= cycle('odd', 'even') %>">
    <% for column in history_columns %>
      <%
        value = h(historic_public_body.send(column.name))
        if column.name == 'last_edit_comment'
            value = historic_public_body.last_edit_comment_for_html_display
        end
        # Highlight entries which have changed since previous version
        changed = (!['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.sorted_versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
      <td <%= changed ? ' class="entry_changed" ': '' %> >
      <%=value%>

    <% end %>
      <%=h historic_public_body.updated_at %>

<% end %>

Requests

<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %>

Track things

<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %>


Link to load balancer config

Link to load balancer config

<% @title = "Debug" %>

<%=@title%>

You are <%= h @http_auth_user %>

Apache load balancing configuration

Version numbers

Rails::VERSION::STRING <%=Rails::VERSION::STRING%>

TMail::VERSION::STRING <%=TMail::VERSION::STRING%>

Xapian::version_string <%=Xapian::version_string%>

Spec::VERSION::NAME/STRING <%=Spec::VERSION::NAME%> <%=Spec::VERSION::STRING%>

Environment variables

<%= @request_env.to_yaml %>

Parameters

<%= params.to_yaml %>

Session

<%= session.to_yaml %>

<% @title = "Debug" %>

<%=@title%>

You are <%= h @http_auth_user %>

Version numbers

Rails::VERSION::STRING <%=Rails::VERSION::STRING%>

TMail::VERSION::STRING <%=TMail::VERSION::STRING%>

Xapian::version_string <%=Xapian::version_string%>

Spec::VERSION::NAME/STRING <%=Spec::VERSION::NAME%> <%=Spec::VERSION::STRING%>

Environment variables

<%= @request_env.to_yaml %>

Parameters

<%= params.to_yaml %>

Session

<%= session.to_yaml %>


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

    <title>小槌</title>
    <%= stylesheet_link_tag 'login' %>

      Web家計簿

      小槌
      <%= image_tag("/images/kozuchi.png", :size => "48x48")%>

    <% if @flash[:notice] %>

<%=@flash[:notice]%>

    <% end %>

    <%= form_tag %>

        ログインID
        <%= text_field("user", "login_id", :size => 10) %>

        パスワード
        <%= password_field("user", "password", :size => 10) %>

        <button type="submit" id="login_button">ログイン</button>

    <%=end_form_tag%>

小槌 Ver.0.1.0 (c)2006 Yasuko Ohba All rights reserved.

    <title>小槌</title>
    <%= stylesheet_link_tag 'login' %>

      Web家計簿

      小槌
      <%= image_tag("/images/kozuchi.bmp", :size => "48x48")%>

    <% if @flash[:notice] %>

<%=@flash[:notice]%>

    <% end %>

    <%= form_tag %>

        ログインID
        <%= text_field("user", "login_id", :size => 10) %>

        パスワード
        <%= password_field("user", "password", :size => 10) %>

        <button type="submit" id="login_button">ログイン</button>

    <%=end_form_tag%>

小槌 Ver.0.1.0 (c)2006 Yasuko Ohba All rights reserved.


Show an edit link on the trace details page, and use the same zoom level as the trace list.

Viewing trace <%= @trace.name %>

<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :user_login => @trace.user.display_name %>">

filename:	<%= @trace.name %> (<%= link_to 'download', :controller => 'trace', :action => 'data', :id => @trace.id %>)

uploaded at:	<%= @trace.timestamp %>

points:	<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>

start coordinate:	<%= @trace.latitude %>, <%= @trace.longitude %> (<%=link_to 'map', :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %> / <%=link_to 'edit', :controller => 'site', :action => 'edit', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %>)

owner:	<%= link_to @trace.user.display_name, {:controller => 'trace', :action => 'view', :display_name => @trace.user.display_name, :id => nil} %>

description:	<%= @trace.description %>

tags:
    <% if @trace.tags %>
      <% @trace.tags.each do |tag| %>
        <%= link_to tag.tag, { :controller => 'trace', :action => 'list', :tag => tag.tag, :id => nil } %>
      <% end %>
    <% end %>

<% unless @trace.public? %>

  <%= start_form_tag :controller => 'trace', :action => 'make_public', :id => @trace.id%>
  <%= submit_tag 'Make this track public permanently' %>
  <%= end_form_tag %>
<% end %>

Viewing trace <%= @trace.name %>

<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :user_login => @trace.user.display_name %>">

filename:	<%= @trace.name %> (<%= link_to 'download', :controller => 'trace', :action => 'data', :id => @trace.id %>)

uploaded at:	<%= @trace.timestamp %>

points:	<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>

start coordinate:	<%= @trace.latitude %>, <%= @trace.longitude %> (<%=link_to 'map', :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 6 %>)

owner:	<%= link_to @trace.user.display_name, {:controller => 'trace', :action => 'view', :display_name => @trace.user.display_name, :id => nil} %>

description:	<%= @trace.description %>

tags:
    <% if @trace.tags %>
      <% @trace.tags.each do |tag| %>
        <%= link_to tag.tag, { :controller => 'trace', :action => 'list', :tag => tag.tag, :id => nil } %>
      <% end %>
    <% end %>

<% unless @trace.public? %>

  <%= start_form_tag :controller => 'trace', :action => 'make_public', :id => @trace.id%>
  <%= submit_tag 'Make this track public permanently' %>
  <%= end_form_tag %>
<% end %>


r213: added elapsed time to build page

r213: added elapsed time to build page

  Build history
  <% @project.builds.reverse.each do |build| %>
    <div class="build-link<%= ' selected' if @build.label == build.label %>">
      <%= link_to_build(@project, build) %>

  <% end %>

  <%= h @project.name %> build <%= h @build.label %>
  <% if @build.failed? %>FAILED<% end %>

  finished at <%= format_time @build.time, :verbose %>. Total <%= @build.elapsed_time%> seconds.

<% if !@build.additional_artifacts.empty? %>

  <% @build.additional_artifacts.each do |artifact| %>

      <%= link_to artifact, :action => 'artifact', :project => @project.name, :build => @build.label, :artifact_path => artifact %>

  <% end %>

<% end %>

Build Changeset

    <%= format_changeset_log(@build.changeset) %>

<% test_failures = get_test_failures_and_errors_if_any(@build.output) %>
<% if test_failures %>

Test Failures and Errors

    <%= test_failures %>

<% end %>

Build Log

      <%= format_build_log(@build.output) %>

  Build history
  <% @project.builds.reverse.each do |build| %>
    <div class="build-link<%= ' selected' if @build.label == build.label %>">
      <%= link_to_build(@project, build) %>

  <% end %>

  <%= h @project.name %> build <%= h @build.label %>
  <% if @build.failed? %>FAILED<% end %>

  finished at <%= format_time @build.time, :verbose %>

<% if !@build.additional_artifacts.empty? %>

  <% @build.additional_artifacts.each do |artifact| %>

      <%= link_to artifact, :action => 'artifact', :project => @project.name, :build => @build.label, :artifact_path => artifact %>

  <% end %>

<% end %>

Build Changeset

    <%= format_changeset_log(@build.changeset) %>

<% test_failures = get_test_failures_and_errors_if_any(@build.output) %>
<% if test_failures %>

Test Failures and Errors

    <%= test_failures %>

<% end %>

Build Log

      <%= format_build_log(@build.output) %>


Use styles to set background on new index page


Rewriten conditions to use -cases- instead of conditions

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

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

....
	<% end %>

<% end %>

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

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

<% end %>


Eliminate extraneous information from included issue "description".

<% form_tag({}) do -%>
<%= hidden_field_tag 'back_url', url_for(params) %>

        <%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
                                                           :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>

		<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %>
        <% query.columns.each do |column| %>
          <%= column_header(column) %>
        <% end %>

	<% previous_group = false %>

	<% issue_list(issues) do |issue, level| -%>
  <% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
    <% reset_cycle %>

    	<td colspan="<%= query.columns.size + 2 %>">

      	<%= group.blank? ? 'None' : column_content(@query.group_by_column, issue) %> (<%= @issue_count_by_group[group] %>)

		<% previous_group = group %>
  <% end %>
	<tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
	  <%= check_box_tag("ids[]", issue.id, false, :id => nil) %>
		<%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %>
        <% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.name %><% end %>

      <% if @query.show_desc %>

      <td colspan="<%= query.columns.size + 2 %>">
      <div class="<%= issue.css_classes %> details">

<%=l(:field_description)%>

        <%= textilizable issue, :description, :attachments => issue.attachments %>

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

<% end -%>

<% form_tag({}) do -%>
<%= hidden_field_tag 'back_url', url_for(params) %>

        <%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
                                                           :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>

		<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %>
        <% query.columns.each do |column| %>
          <%= column_header(column) %>
        <% end %>

	<% previous_group = false %>

	<% issue_list(issues) do |issue, level| -%>
  <% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
    <% reset_cycle %>

    	<td colspan="<%= query.columns.size + 2 %>">

      	<%= group.blank? ? 'None' : column_content(@query.group_by_column, issue) %> (<%= @issue_count_by_group[group] %>)

		<% previous_group = group %>
  <% end %>
	<tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
	  <%= check_box_tag("ids[]", issue.id, false, :id => nil) %>
		<%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %>
        <% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.name %><% end %>

      <% if @query.show_desc %>

      <td colspan="<%= query.columns.size + 2 %>">
      <div class="<%= issue.css_classes %> details">
        <%= avatar(issue.author, :size => "50") %>

          <%=h issue.subject %>

<%= authoring issue.created_on, issue.author %>.
        <% if issue.created_on != issue.updated_on %><%= l(:label_updated_time, time_tag(issue.updated_on)) %>.
        <% end %>

<%=l(:field_description)%>

        <%= textilizable issue, :description, :attachments => issue.attachments %>

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

<% end -%>


Update box in frontpage

Update box in frontpage

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

Pregunta a los diputados

27 de septiembre, 18h. Te esperamos para hablar sobre transparencia con los políticos clave en la Facultad de Ciencias de la Información de la Univ. Complutense. Aquí más detalles.

    			<form action="http://tuderechoasaber.us4.list-manage.com/subscribe/post?u=9416fe6b76f2c3f985c1f8e0f&id=36f187e6e2" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank">

¿Quieres estar informado de todas las novedades? Suscríbete a nuestro boletín:

<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="dirección de correo" required="true" style="width:90%">

<input type="submit" value="Suscríbeme" name="subscribe" id="mc-embedded-subscribe" style="border-color:silver">

    			</form>

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(item['description'].to_s, "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

¡Da tu opinión!

Puedes ayudar a mejorar el anteproyecto de ley de transparencia de Euskadi aquí hasta el 15 de Septiembre

    			<form action="http://tuderechoasaber.us4.list-manage.com/subscribe/post?u=9416fe6b76f2c3f985c1f8e0f&id=36f187e6e2" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank">

¿Quieres estar informado de todas las novedades? Suscríbete a nuestro boletín:

<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="dirección de correo" required="true" style="width:90%">

<input type="submit" value="Suscríbeme" name="subscribe" id="mc-embedded-subscribe" style="border-color:silver">

    			</form>

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(item['description'].to_s, "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>


layout tweaking

layout tweaking

<%
=begin
  jrochkind's alternative partial for displaying holdings. Displays more
  information to deal with the more information we need to display from
  our Horizon. In tabular format. Customized for JH's needs, but should
  be usable by anyone.
=end
%>

<%= ServiceTypeValue[:holding].display_name_pluralize.titleize %>

<% holdings = get_service_type('holding') %>

<%
holdings.each do |p|
  target = p.view_data
%>

<%= target[:collection_str] %>

      <%= link_to (target[:call_number] || 'catalog'), {:controller=>"link_router", :id=>p.id}, "target"=>"_blank" %>

      <% status_class = (target[:status] == "Not Charged" or target[:status] == "Available") ? 'available' : '' %>

      <%= target[:copy_str] %>
      <span class="<%= status_class %>"><%= target[:status]   %>

  <% unless target[:notes].blank? %>

<%= target[:notes] %>

  <% end %>

  <% unless target[:coverage_str].blank? %>

          <%
          # Only show first 5, with a 'more' link to make others visible if neccesary.
          hidden_div_id = "copies_#{p.id}"
          target[:coverage_str_array].each_index do |index|
              break if (index >= 5 &&
                        params['umlaut.holding_expand_all'] != 'true')
              s = target[:coverage_str_array][index]%>

<%= s %>

          <% end %>
          <% if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>

 <%= link_to_function("More...",
                     "Element.toggle('#{hidden_div_id}'); Element.update(this, 'Show/Hide...')",
                     :href => url_for( params.merge({ :'umlaut.holding_expand_all' => 'true'}))) %>

          <% end %>

          <% # okay, the rest in a hidden div, if more than 5
             if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>
          <div id=<%= hidden_div_id %> style="display:none; ">

            <% 5.upto( target[:coverage_str_array].length + 1) do |index| %>

<%= target[:coverage_str_array][index] %>

            <% end   %>

          <% end %>

  <% end %>
<%
end %>

<%
if holdings.empty?
   searches = get_service_type('holding_search')
    searches.each do | result_st |
      response = result_st.view_data %>

<%= link_to response[:display_text], {:controller=>'link_router', :id=>result_st.id}, 'target'=>"_blank" %>

<%
   end
end
if (holdings.blank? && searches.blank? && ! service_types_in_progress?(['holding', 'holding_search']))
%>

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

<%    session[:coins].each { | coins |
        unless coins[:text]
          label = image_tag(coins[:icon], :border=>0)
        else
          label = coins[:text]
        end
    %>

<a href="<%= coins[:host]%>?<%= @user_request.referent.to_context_object.kev %>" target="_blank"><%= label %>

    <%}%>

<%   end
%>
<% if service_types_in_progress?(['holding', 'holding_search']) %>

<%= render(:partial => "background_progress", :locals => { :svc_types => [ServiceTypeValue[:holding],ServiceTypeValue[:holding_search]], :current_set_empty => holdings.empty? } ) %>

<% end %>


Added controller information so that calls to show, edit, and detroy from other pages would still work.

<% # You need to pass a local variable called 'manage' that is true or false %>
<% # i.e. like <%= render_partial 'task_list', nil, 'task' => task, 'manage' => true %> %>

<% # if true, the partial will also display edit and destroy buttons %>

    <%= task.title %>

      <% for user in task.users %>
      <%= user.name %>

      <% end %>

      <%= task.repeat == 0 ? "Daily" : '' %>
      <%= task.repeat == 1 ? "Every Sunday" : '' %>
      <%= task.repeat == 2 ? "Every Monday" : '' %>
      <%= task.repeat == 3 ? "Every Tuesday" : '' %>
      <%= task.repeat == 4 ? "Every Wednesday" : '' %>
      <%= task.repeat == 5 ? "Every Thursday" : '' %>
      <%= task.repeat == 6 ? "Every Friday" : '' %>
      <%= task.repeat == 7 ? "Every Saturday" : '' %>

    <% if task.done_by_schedule %>
       <%= nice_date task.last_done_date %>
    <% else %>
       <% if manage == true %>
        [<%= link_to 'Just Done', :controller => 'tasks', :action => 'done', :id => task %>]
       <% else %>
        Not done on schedule
       <% end %>
    <% end %>

    <%= link_to 'Show', :controller => 'tasks', :action => 'show', :id => task %>
    <% if manage == true %>
    <%= link_to 'Edit',  :controller => 'tasks', :action => 'edit', :id => task %>
    <%= link_to 'Destroy', { :controller => 'tasks', :action => 'destroy', :id => task }, :confirm => 'Are you sure?', :post => true %>
    <% end %>

<% # You need to pass a local variable called 'manage' that is true or false %>
<% # i.e. like <%= render_partial 'task_list', nil, 'task' => task, 'manage' => true %> %>

<% # if true, the partial will also display edit and destroy buttons %>

    <%= task.title %>

      <% for user in task.users %>
      <%= user.name %>

      <% end %>

      <%= task.repeat == 0 ? "Daily" : '' %>
      <%= task.repeat == 1 ? "Every Sunday" : '' %>
      <%= task.repeat == 2 ? "Every Monday" : '' %>
      <%= task.repeat == 3 ? "Every Tuesday" : '' %>
      <%= task.repeat == 4 ? "Every Wednesday" : '' %>
      <%= task.repeat == 5 ? "Every Thursday" : '' %>
      <%= task.repeat == 6 ? "Every Friday" : '' %>
      <%= task.repeat == 7 ? "Every Saturday" : '' %>

    <% if task.done_by_schedule %>
       <%= nice_date task.last_done_date %>
    <% else %>
       <% if manage == true %>
        [<%= link_to 'Just Done', :controller => 'tasks', :action => 'done', :id => task %>]
       <% else %>
        Not done on schedule
       <% end %>
    <% end %>

    <%= link_to 'Show', :action => 'show', :id => task %>
    <% if manage == true %>
    <%= link_to 'Edit', :action => 'edit', :id => task %>
    <%= link_to 'Destroy', { :action => 'destroy', :id => task }, :confirm => 'Are you sure?', :post => true %>
    <% end %>


Improved how prioritize option of blocks is displayed

(ActionItem1908)

  <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %>
  <%= check_box(:block, :prioritize_profiles_with_image) %>
  <%= _('Prioritize profiles with image') %>

  <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %>
  <%= labelled_form_field _('Prioritize profiles with image'), check_box(:block, :prioritize_profiles_with_image) %>


ActionItem1049: slightly better publish screen

<%= _('Select the groups where you want to publish your article') %>

<% form_tag do%>
 <%= hidden_field_tag :back_to, @back_to %>
 <% @groups.each do |group| %>
    <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

    <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>

  <% end %>

  <% button_bar do %>
    <%= submit_button 'spread', _('Publish') %>
  <% end %>
<% end %>

<%= _('Select the groups where you want to publish your article') %>

<% form_tag do%>
 <%= hidden_field_tag :back_to, @back_to %>
 <% @groups.each do |group| %>
    <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

    <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name %>

  <% end %>

  <% button_bar do %>
    <%= submit_button 'menu-community', _('Publish') %>
  <% end %>
<% end %>


Remove bad and confusing "as them".

Remove bad and confusing "as them".

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

What is the status of this request now?

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

                <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %>
                <label for="waiting_response<%=id_suffix%>">I'm still waiting for my information

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

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

        <% end %>

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

                <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %>
                <label for="waiting_clarification<%=id_suffix%>">I'm about to clarify my request

        <% end %>

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

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

The review has finished and overall:

        <% end %>

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

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

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

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

           <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
            <label for="requires_admin<%=id_suffix%>">None of the above

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

    <% end %>
<% else %>
        We don't know whether the most recent response to this request contains
        information or not
            –
        if you are
            <%= user_link(@info_request.user) %>,
        please
            <%= link_to "sign in", signin_url(:r => request.request_uri) %>
        and let everyone know.
<% end %>

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

What is the status of this request now?

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

                <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %>
                <label for="waiting_response<%=id_suffix%>">I'm still waiting for my information

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

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

        <% end %>

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

                <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %>
                <label for="waiting_clarification<%=id_suffix%>">I'm about to clarify my request

        <% end %>

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

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

The review has finished and overall:

        <% end %>

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

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

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

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

           <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
            <label for="requires_admin<%=id_suffix%>">None of the above

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

    <% end %>
<% else %>
        We don't know whether the most recent response to this request contains
        information or not
            –
        if you are
            <%= user_link(@info_request.user) %>,
        please
            <%= link_to "sign in as them", signin_url(:r => request.request_uri) %>
        and let everyone know.
<% end %>


default sorting column now does not have a 'reset' stage. it just cycles between ASC and DESC.

<%
sorting = active_scaffold_config.list.user.sorting
sorting_stages = ['reset', 'ASC', 'DESC']
default_sorting = active_scaffold_config.list.sorting
default_sorting_stages = ['ASC', 'DESC']
-%>
<% active_scaffold_config.list.columns.each do |column| -%>
  <%
  stages = default_sorting.sorts_on?(column) ? default_sorting_stages : sorting_stages
  column_sort_direction = stages.after(sorting.direction_of(column)) || 'ASC'
  sort_params = params_for(:action => :update_table, :page => 1,
                           :sort => column.name, :sort_direction => column_sort_direction)
  column_header_id = active_scaffold_column_header_id(column)
  -%>
  <th id="<%= column_header_id %>" <%= "class=\"sorted #{sorting.direction_of(column).downcase}\"" if sorting.sorts_on? column %>>
  <% if column.sortable? -%>
    <% href = url_for(sort_params) -%>
    <%= link_to_remote column.label,
      { :url => sort_params,
        :before => "addActiveScaffoldPageToHistory('#{href}', '#{controller_id}')",
        :loading => "Element.addClassName('#{column_header_id}','loading');",
        :update => active_scaffold_content_id },
      { :href => href } %>
   <% else -%>

<%= column.label %>

   <% end -%>

<% end -%>

<% sorting = active_scaffold_config.list.user.sorting -%>
<% active_scaffold_config.list.columns.each do |column| -%>
  <% column_sort_direction = ['reset', 'ASC', 'DESC'].after(sorting.direction_of(column)) || 'ASC' -%>
  <% sort_params = params_for(:action => :update_table, :page => 1,
                              :sort => column.name, :sort_direction => column_sort_direction) -%>
  <% column_header_id = active_scaffold_column_header_id(column) -%>
  <th id="<%= column_header_id %>" <%= "class=\"sorted #{sorting.direction_of(column).downcase}\"" if sorting.sorts_on? column %>>
  <% if column.sortable? -%>
    <% href = url_for(sort_params) -%>
    <%= link_to_remote column.label,
      { :url => sort_params,
        :before => "addActiveScaffoldPageToHistory('#{href}', '#{controller_id}')",
        :loading => "Element.addClassName('#{column_header_id}','loading');",
        :update => active_scaffold_content_id },
      { :href => href } %>
   <% else -%>

<%= column.label %>

   <% end -%>

<% end -%>


Closed ticket #1.  Small layout fix.

Closed ticket #1.  Small layout fix.

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

    <a href="<%= url_for :controller=>"articles", :action=>"read", :id=>article.id %>" title="Permanent link to this article"><%=h article.title %>

  Posted by <%=h article.author %> <%= distance_of_time_in_words_to_now article.created_at %> ago

  <%= article.body_html %>


More more fixes!

More more fixes!

Again, there is still an issue: it renders the new paragraph, but it
doesn't ever render the link. Obviously there is an issue with my syntax.

<%= l(:label_revision) %> <%= format_revision(@rev_to) + ':' if @rev_to %><%= format_revision(@rev) %> <%=h @path %>

<%= link_to "Return to diff overview", url: => {:controller => 'repositories', :action => 'revision', :rev => params[:rev]}, :caption => "Return to overview" if @rev %>
<%= link_to "Return to diff overview", url => {:controller => 'repositories', :action => 'revision', :rev => params[:rev_to]}, :caption => "Return to overview" if @rev_to %>

<% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
  <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
  <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>

<%= l(:label_view_diff) %>
  <%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %>

<% end %>

<% cache(@cache_key) do -%>
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
<% end -%>

<% other_formats_links do |f| %>
	<%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
<% end %>

<% html_title(with_leading_slash(@path), 'Diff') -%>

<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<% end %>

<%= l(:label_revision) %> <%= format_revision(@rev_to) + ':' if @rev_to %><%= format_revision(@rev) %> <%=h @path %>

<%= link_to "Return to diff overview", url: => {:controller => 'repositories', :action => 'revision', :rev => @rev}, :caption => "Return to overview" if @rev %>
<%= link_to "Return to diff overview", url => {:controller => 'repositories', :action => 'revision', :rev => @rev_to}, :caption => "Return to overview" if @rev_to %>

<% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
  <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
  <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>

<%= l(:label_view_diff) %>
  <%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %>

<% end %>

<% cache(@cache_key) do -%>
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
<% end -%>

<% other_formats_links do |f| %>
	<%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
<% end %>

<% html_title(with_leading_slash(@path), 'Diff') -%>

<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<% end %>


added Categories to admin tabs

added Categories to admin tabs

	<%=
		link_to('Schedule', :controller => 'schedule', :action => 'index')
	%> |
	<%=
		link_to('Racers', :controller => 'racers', :action => 'index')
	%> |
	<%=
		link_to('Teams', :controller => 'teams', :action => 'index')
	%> |
	<%=
		link_to('Categories', :controller => 'categories', :action => 'index')
	%>


Use get_current_stage from assignment model

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

Submit or Review work for <%= @assignment.name %>

Next: Click the activity you wish to perform on the assignment titled: <%= @assignment.name %>

<% if @assignment.spec_location && @assignment.spec_location.length > 0 %>
  <a href="<%= @assignment.spec_location %>" target="new">Assignment Description
<% end %>

	<%if @assignment.team_assignment == true%>

 <%= link_to 'Your team', :controller=>'student_team', :action => 'view', :id => @participant.id %>
		(View and manage your team)

	<%end%>

	    <% if @assignment.submission_allowed == true %>
	    	<%= link_to 'Your work', :controller => 'submitted_content', :action => 'edit', :id => @participant.id %>
	    <% else %>
	        <%= link_to 'Your work', :controller => 'submitted_content', :action => 'view', :id => @participant.id %>
        <% end %>
		(Submit and view your work)

		<% if @assignment.review_allowed == true %>
			<%= link_to "Others' work",{:controller => 'student_review', :action => 'list', :id => @participant.id} %>
		<% else %>
			Others' work
		<% end %> (Give feedback to others on their work)

<%= link_to "View scores",{:action => 'view_scores', :id => @participant.id} %>(View feedback on your work)

	<% if @assignment.get_current_stage() == "Complete" -%>

<%= link_to "Take Survey",{:controller => 'survey_response', :action => 'begin_survey', :id => @assignment.id} %> (This will log you out)

	<% end %>

<%= link_to "Change your handle", {:controller => 'participants', :action => 'change_handle', :id => @participant.id} %> (Provide a different handle for this assignment)

Back

Submit or Review work for <%= @assignment.name %>

Next: Click the activity you wish to perform on the assignment titled: <%= @assignment.name %>

<% if @assignment.spec_location && @assignment.spec_location.length > 0 %>
  <a href="<%= @assignment.spec_location %>" target="new">Assignment Description
<% end %>

	<%if @assignment.team_assignment == true%>

 <%= link_to 'Your team', :controller=>'student_team', :action => 'view', :id => @participant.id %>
		(View and manage your team)

	<%end%>

	    <% if @assignment.submission_allowed == true %>
	    	<%= link_to 'Your work', :controller => 'submitted_content', :action => 'edit', :id => @participant.id %>
	    <% else %>
	        <%= link_to 'Your work', :controller => 'submitted_content', :action => 'view', :id => @participant.id %>
        <% end %>
		(Submit and view your work)

		<% if @assignment.review_allowed == true %>
			<%= link_to "Others' work",{:controller => 'student_review', :action => 'list', :id => @participant.id} %>
		<% else %>
			Others' work
		<% end %> (Give feedback to others on their work)

<%= link_to "View scores",{:action => 'view_scores', :id => @participant.id} %>(View feedback on your work)

	<% if StudentAssignmentHelper::get_current_stage(@assignment.id) == "Complete" -%>

<%= link_to "Take Survey",{:controller => 'survey_response', :action => 'begin_survey', :id => @assignment.id} %> (This will log you out)

	<% end %>

<%= link_to "Change your handle", {:controller => 'participants', :action => 'change_handle', :id => @participant.id} %> (Provide a different handle for this assignment)

Back


ActionItem501: fixed link to product category in product listing

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

<%# FIXME add more information %>

<%
product_item_pos = 0  if ! product_item_pos
product_item_pos += 1
%>

<li class="product-item <%= ( pos % 2 == 0 ) ? 'odd' : 'even' %>">
  <%= link_to_product product, :class => 'product-pic', :style => 'background-image:url(%s)' %
       ( product.image ? product.image.public_filename(:minor) : '/images/icons-app/product-default-pic-minor.png' ) %>

    <%= link_to_product product %>

 <%= _('Price: %s') % (product.price ? product.price : _('Not informed')) %>

    <% if product.enterprise %>

 <%= _('Suplier: %s') % link_to_homepage(product.enterprise.name, product.enterprise.identifier) %>

    <% end %>

 <%= _('Category:') + ' ' + (product.product_category ? link_to(product.product_category.name, :controller => 'search', :action => 'assets', :asset => 'products', :product_category => product.product_category.id) : _('Uncategorized product')) %>

<%# FIXME add more information %>

<%
product_item_pos = 0  if ! product_item_pos
product_item_pos += 1
%>

<li class="product-item <%= ( pos % 2 == 0 ) ? 'odd' : 'even' %>">
  <%= link_to_product product, :class => 'product-pic', :style => 'background-image:url(%s)' %
       ( product.image ? product.image.public_filename(:minor) : '/images/icons-app/product-default-pic-minor.png' ) %>

    <%= link_to_product product %>

 <%= _('Price: %s') % (product.price ? product.price : _('Not informed')) %>

    <% if product.enterprise %>

 <%= _('Suplier: %s') % link_to_homepage(product.enterprise.name, product.enterprise.identifier) %>

    <% end %>

 <%= _('Category:') + ' ' + link_to_category(product.product_category, false) %>


Fixing OG meta tags and DOCTYPE

Fixing OG meta tags and DOCTYPE

<!DOCTYPE html>
<html lang="<%= I18n.locale %>" prefix="og: http://ogp.me/ns#">

        <% if @title %>
        <title><%=@title%> - <%= site_name %></title>
        <meta property="og:title" content="<%=@title%> - <%= site_name %>" />
        <% else %>
        <title><%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %></title>
        <meta property="og:title" content="<%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>" />
        <% end %>

        <meta property="og:type" content="website" />
        <meta property="og:image" content="http://www.tuderechoasaber.es/tuderechoasaber-theme/images/logo.png?1330664009" />

        <link rel="shortcut icon" href="/favicon.ico">
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
        <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all"  %>
        <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
        <% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
        <% end %>

        <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js' %>

        <% if @profile_photo_javascript %>

            <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
        <% end %>

        <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <% if force_registration_on_new_request %>
        <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet"  %>
        <% end %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
        <% end %>

        <% if @no_crawl %>
            <meta name="robots" content="noindex, nofollow">
        <% end %>

        <%= render :partial => 'general/before_head_end' %>

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

    <% if force_registration_on_new_request && !@user %>
    <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %>

    <% end %>

<% # code for popup advert for a campaign etc.
=begin

Close

    [ message goes here ]

Close

=end
%>

  <%= link_to _("¡Colabora con nosotros!"), help_help_out_path %>

<%= render :partial => 'general/locale_switcher' %>

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

          <% if @user %>
              <%= _('Hello, {{username}}!', :username => h(@user.name))%>

                <% if @user %>
                    <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
                    <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
                <% end %>

              <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>
          <% else %>
              <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>
          <% end %>

        <% end %>

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

                   <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
                   <%= image_submit_tag('search-button.png') %>

            <% end %>

        <%= render :partial => 'general/orglink' %>

        <%= render :partial => 'general/topnav' %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

    <%= render :partial => 'general/footer' %>

    <%= render :partial => 'general/before_body_end' %>

X
<%= _("Paste this link into emails, tweets, and anywhere else:") %>

<input type="text">

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

        <% if @title %>
        <title><%=@title%> - <%= site_name %></title>
        <meta property="og:title" content="<%=@title%> - <%= site_name %>" />
        <% else %>
        <title><%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %></title>
        <meta property="og:title" content="<%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>" />
        <% end %>

        <meta property="og:type" content="web" />
        <meta property="og:image" content="http://www.tuderechoasaber.es/tuderechoasaber-theme/images/logo.png?1330664009" />

        <link rel="shortcut icon" href="/favicon.ico">
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
        <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all"  %>
        <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
        <% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
        <% end %>

        <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js' %>

        <% if @profile_photo_javascript %>

            <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
        <% end %>

        <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <% if force_registration_on_new_request %>
        <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet"  %>
        <% end %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
        <% end %>

        <% if @no_crawl %>
            <meta name="robots" content="noindex, nofollow">
        <% end %>

        <%= render :partial => 'general/before_head_end' %>

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

    <% if force_registration_on_new_request && !@user %>
    <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %>

    <% end %>

<% # code for popup advert for a campaign etc.
=begin

Close

    [ message goes here ]

Close

=end
%>

  <%= link_to _("¡Colabora con nosotros!"), help_help_out_path %>

<%= render :partial => 'general/locale_switcher' %>

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

          <% if @user %>
              <%= _('Hello, {{username}}!', :username => h(@user.name))%>

                <% if @user %>
                    <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
                    <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
                <% end %>

              <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>
          <% else %>
              <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>
          <% end %>

        <% end %>

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

                   <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
                   <%= image_submit_tag('search-button.png') %>

            <% end %>

        <%= render :partial => 'general/orglink' %>

        <%= render :partial => 'general/topnav' %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

    <%= render :partial => 'general/footer' %>

    <%= render :partial => 'general/before_body_end' %>

X
<%= _("Paste this link into emails, tweets, and anywhere else:") %>

<input type="text">


don't say it twice in non-js bg progress statement

<%   # Partial to display spinner for background services in progress.
     # Also degrades fairly nicely to non-javascript.
     #
     # Pass in local variables as arguments (:locals param to render method):
     #
     # svc_type : String or ServiceTypeValue that we should be
     #    paying attention to. This or service_types is required.
     #
     # svc_types: Array of Strings or ServiceTypeValue for multiple.
     #
     # div_id: id of div that progress content is put in. Optional, defaults
     #   to "progress_#{svc_type.name}", good idea especially if it won't be
     #   unique otherwise.
     #
     # current_set_empty: optional. defaults to false. If true, then
     #   the word 'more' won't be used in note to user, since it's not 'more'!

     # Strategy of this output: We start out outputting our non-js
     # version. Then we immediately use js to over-write it with our
     # js version. So js people get js, non get non, everyone is happy.
     # Further investigation may need to be done to optimize specifically
     # for JAWS (which is neither full js nor non js, but some js--right
     # now I think they'll just get the non-js version, but we can do better.)

  svc_types = [] if svc_types.nil?
  svc_types.push(svc_type).uniq! if defined?(svc_type) && ! svc_type.nil?
  # convert any Strings to ServiceTypeValues.
  svc_types = svc_types.collect { |t| t.kind_of?(ServiceTypeValue) ? t : ServiceTypeValue[t] }

  div_id = "progress_#{svc_types[0].name}" unless div_id
  current_set_empty = false if current_set_empty.nil?

  item_name ||= svc_types[0].display_name_pluralize
  progress_message ||= "Searching for #{current_set_empty ? "" : "more "} #{item_name}"
%>

<% # only display if there are more!
 if service_types_in_progress?(svc_types) %>
  <div id="<%= div_id %>" class="background_progress_spinner" >
    <% unless @force_bg_progress_spinner %>
      <%= link_to "#{current_set_empty ? "" : "More"} #{item_name} may be available.", {:action => "background_status", :"umlaut.request_id" => @user_request.id, :"umlaut.skip_resolve_menu" => params['umlaut.skip_resolve_menu']} %>
    <% end %>
    <% if @force_bg_progress_spinner %>
      <%=
      image_tag('spinner.gif', :alt =>"") %>
      <%= progress_message %>
    <% end %>
  </div>

  <% unless @force_bg_progress_spinner == false # Not just nil, but false
  %>
    <script type="text/javascript">
    <%= update_page do |page|
         page.replace_html div_id, "#{image_tag('spinner.gif', :alt => "")} #{progress_message}"
    end
    %>
    </script>
  <% end %>
<% end %>

<%   # Partial to display spinner for background services in progress.
     # Also degrades fairly nicely to non-javascript.
     #
     # Pass in local variables as arguments (:locals param to render method):
     #
     # svc_type : String or ServiceTypeValue that we should be
     #    paying attention to. This or service_types is required.
     #
     # svc_types: Array of Strings or ServiceTypeValue for multiple.
     #
     # div_id: id of div that progress content is put in. Optional, defaults
     #   to "progress_#{svc_type.name}", good idea especially if it won't be
     #   unique otherwise.
     #
     # current_set_empty: optional. defaults to false. If true, then
     #   the word 'more' won't be used in note to user, since it's not 'more'!

     # Strategy of this output: We start out outputting our non-js
     # version. Then we immediately use js to over-write it with our
     # js version. So js people get js, non get non, everyone is happy.
     # Further investigation may need to be done to optimize specifically
     # for JAWS (which is neither full js nor non js, but some js--right
     # now I think they'll just get the non-js version, but we can do better.)

  svc_types = [] if svc_types.nil?
  svc_types.push(svc_type).uniq! if defined?(svc_type) && ! svc_type.nil?
  # convert any Strings to ServiceTypeValues.
  svc_types = svc_types.collect { |t| t.kind_of?(ServiceTypeValue) ? t : ServiceTypeValue[t] }

  div_id = "progress_#{svc_types[0].name}" unless div_id
  current_set_empty = false if current_set_empty.nil?

  item_name ||= svc_types[0].display_name_pluralize
  progress_message ||= "Searching for #{current_set_empty ? "" : "more "} #{item_name}"
%>

<% # only display if there are more!
 if service_types_in_progress?(svc_types) %>
  <div id="<%= div_id %>" class="background_progress_spinner" >
    <% unless @force_bg_progress_spinner %>
      <%= current_set_empty ? "" : "More " %><%= svc_types[0].display_name_pluralize %> may be available.
      <%= link_to "#{current_set_empty ? "" : "more"} #{item_name} may be available.", {:action => "background_status", :"umlaut.request_id" => @user_request.id, :"umlaut.skip_resolve_menu" => params['umlaut.skip_resolve_menu']} %>
    <% end %>
    <% if @force_bg_progress_spinner %>
      <%=
      image_tag('spinner.gif', :alt =>"") %>
      <%= progress_message %>
    <% end %>
  </div>

  <% unless @force_bg_progress_spinner == false # Not just nil, but false
  %>
    <script type="text/javascript">
    <%= update_page do |page|
         page.replace_html div_id, "#{image_tag('spinner.gif', :alt => "")} #{progress_message}"
    end
    %>
    </script>
  <% end %>
<% end %>