Agrega la nota como comentario para cuando queramos ponerla.

<!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.quesabes.org/quesabes-theme/images/logo_cuadrado.png" />

        <link rel="shortcut icon" href="/quesabes-theme/images/favicon.gif">
        <%= 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 @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' %>>

<%  # Codigo para poner un mensaje popup en todas las paginas.
=begin

    ACA VA LA NOTA QUE QUEREMOS PONER.

Cerrar

=end
%>

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

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

        <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
		<%= render :partial => 'general/usernav' %>

        <% end %>

            <% 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>
<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.quesabes.org/quesabes-theme/images/logo_cuadrado.png" />

        <link rel="shortcut icon" href="/quesabes-theme/images/favicon.gif">
        <%= 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 @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' %>>

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

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

        <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
		<%= render :partial => 'general/usernav' %>

        <% end %>

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


Updated splash page to reflect the status of 1919 and 1921.

What is FromThePage?

        FromThePage is software that allows volunteers to
transcribe handwritten documents online.  Currently it hosts
the <%= link_to('Julia Brumfield Diaries',
                { :controller => 'collection',
                  :action => 'show',
                  :collection_id => 1,
                  :ol => 's_sp_diaries'})%>, an incomplete collection
of diaries written between 1915 and 1938 chronicling life
on a tobacco farm in Pittsylvania County, Virginia.

The FromThePage software is still under development, but we'd like
to invite people to look around and send suggestions and
bug reports to alpha.info@fromthepage.com.  If anything looks broken, hard
to understand, or just odd, please let us know!  For a behind-the-scenes look
at the development effort, check out the product development
blog.

Read Transcriptions

        The 1918 diary was originally transcribed and published by
        Neil Brumfield in 1993.  It covers daily farm life, a neighbor's
        draft to fight the First World War, and the death of Julia's son
        Charles in the influenza epidemic.  Capitalization and
        punctuation has been modernized throughout, while spelling
        has been retained

        <%= link_to('Read the 1918 diary',
                        { :controller => 'display',
                          :action => 'read_work',
                          :work_id => 2,
                          :ol => 's_sp_1918' }) %>

        The 1919 diary was transcribed by volunteers using FromThePage.
        The majority of the transcription was performed by Linda Tucker,
        while editing and annotation was performed by Ben Brumfield.
        The subject matter and transcription conventions are similar
        to those of the 1918 diary.

        <%= link_to('Read the 1919 diary',
                        { :controller => 'display',
                          :action => 'read_work',
                          :work_id => 3,
                          :ol => 's_sp_1919' }) %>

Transcribe Manuscripts

        The 1921 diary awaits volunteers to transcribe it.  To help, or just
        to try out the FromThePage software, you'll need to
        <%= link_to('create an account',
                    { :controller => 'account',
                      :action => 'signup',
                      :ol => 's_sp_signup' }) %>.
        Then <%= link_to('visit the 1921 diary',
                            { :controller => 'display',
                              :action => 'read_work',
                              :work_id => 6,
                              :ol => 's_sp_1921' }) %>
        and click the transcribe tab on any page.

What is FromThePage?

        FromThePage is software that allows volunteers to
transcribe handwritten documents online.  Currently it hosts
the <%= link_to('Julia Brumfield Diaries',
                { :controller => 'collection',
                  :action => 'show',
                  :collection_id => 1,
                  :ol => 's_sp_diaries'})%>, an incomplete collection
of diaries written between 1915 and 1938 chronicling life
on a tobacco farm in Pittsylvania County, Virginia.

The FromThePage software is still under development, but we'd like
to invite people to look around and send suggestions and
bug reports to alpha.info@fromthepage.com.  If anything looks broken, hard
to understand, or just odd, please let us know!  For a behind-the-scenes look
at the development effort, check out the product development
blog.

Read Transcriptions

        The 1918 diary was originally transcribed and published by
        Neil Brumfield in 1993.  It covers daily farm life, a neighbor's
        draft to fight the First World War, and the death of Julia's son
        Charles in the influenza epidemic.  Capitalization and
        punctuation has been modernized throughout, while spelling
        has been retained

        <%= link_to('Read the 1918 diary',
                        { :controller => 'display',
                          :action => 'read_work',
                          :work_id => 2,
                          :ol => 's_sp_1918' }) %>

Transcribe Manuscripts

        The 1919 diary awaits volunteers to transcribe it.  To help, or just
        to try out the FromThePage software, you'll need to
        <%= link_to('create an account',
                    { :controller => 'account',
                      :action => 'signup',
                      :ol => 's_sp_signup' }) %>.
        Then <%= link_to('visit the 1919 diary',
                            { :controller => 'display',
                              :action => 'read_work',
                              :work_id => 3,
                              :ol => 's_sp_1919' }) %>
        and click the edit tab on any page,
        <%= link_to('like this one, for January 11',
                    { :controller => 'transcribe',
                      :action => 'display_page',
                      :page_id => 764,
                      :ol => 's_sp_jan11' }) %>.


Fixed the archive route.

Fixed the archive route.

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

<% unless sidebar.archives.blank? %>

<%= _("Archives")%>

  <% sidebar.archives.each do |month| %>

      <%= link_to month[:name], articles_by_month_path(month[:year], "%02i" % month[:month]) %>
      <%= "(#{month[:article_count]})" if show_count %>

  <% end %>

<% end %>

<% unless sidebar.archives.blank? %>

<%= _("Archives")%>

  <% sidebar.archives.each do |month| %>

      <%= link_to month[:name], :controller => "articles", :action => "find_by_date", :year => month[:year], :month => month[:month], :day => nil %>
      <%= "(#{month[:article_count]})" if show_count %>

  <% end %>

<% end %>


allow changing of published date

allow changing of published date

git-svn-id: 4158f9403e16ea83fe8a6e07a45f1f3b56a747ab@1380 567b1171-46fb-0310-a4c9-b4bef9110e78

<%= error_messages_for 'article' %>

Title

<%= form.text_field :title, :class => 'big'  %>

<%= form.label_for :excerpt %> (<%= link_to_function 'Cancel', %(Element.toggle('x-lbl', 'x-body')) %>)

<%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

Write your article (<%= link_to_function 'Add an excerpt', %(Element.toggle('x-lbl', 'x-body')) %>)

<%= form.text_area :body, :class => 'fat'  %>

Show article in these sections

        <% @sections.each do |section| %>

            <%= check_box_tag 'article[section_ids][]', section.id, @article.has_section?(section),
                  :id => "article_section_ids_#{section.id}" %>
            <label for="article_section_ids_<%= section.id %>"><%= section.name %>

        <% end %>

  <% unless @article.published? -%>

Save as Draft?

<%= check_box_tag :draft, '1', !@article.new_record?, :id => 'article-draft' %> Yes, save this article as a draft.

  <% end -%>
  <dt id="publish-date-lbl"<%= %( style="display:none") unless @article.new_record? || @article.published? -%>><%= label_tag 'article_created_at', 'Publish on this date:' %>

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @article.published? -%>><%= form.datetime_select :published_at, :discard_year => true %>

<% if @article.expire_comments_at && site.accept_comments? && site.comment_age.to_i > 0 %>

<%= label_tag 'article_expire_comments_at', 'Expire Comments on this date:' %>

<%= form.datetime_select :expire_comments_at %>

<% end -%>

Permanent link

<%= form.text_field :permalink %>

<% if false %>

Publish in these sections

      <% @sections.each do |section| %>

          <%= check_box_tag 'article[section_ids][]', section.id, @article.has_section?(section),
                :id => "article_section_ids_#{section.id}" %>
          <label for="article_section_ids_<%= section.id %>"><%= section.name %>

      <% end %>

  <% unless @article.new_record? -%>

Expire Comments At

    <%= form.date_select :expire_comments_at %>
  <% end -%>

<% end %>

<% content_for :sidebar do %>
<% if false %>

Publish in these sections

      <% @sections.each do |section| %>

          <%= check_box_tag 'article[section_ids][]', section.id, @article.has_section?(section),
                :id => "article_section_ids_#{section.id}" %>
          <label for="article_section_ids_<%= section.id %>"><%= section.name %>

      <% end %>

  <% unless @article.new_record? -%>

Expire Comments At

    <%= form.date_select :expire_comments_at %>
  <% end -%>

<% end %>

<% if false %>

Latest files

Search files

Upload

          <% 1.upto(5) do |i| %>
          <%= %(

          ) %>
          <% end %>

Search by tag or title

        <input class="searchbox" type="text" size="30" />
        <%= submit_tag 'Search' %>

1. <input type="file" size="15" />

2. <input type="submit" value="Upload" />

Other options

<%= check_box_tag 'allow_comments' %> Allow comments

  <% end %>
<% end %>

<%= error_messages_for 'article' %>

Title

<%= form.text_field :title, :class => 'big'  %>

<%= form.label_for :excerpt %> (<%= link_to_function 'Cancel', %(Element.toggle('x-lbl', 'x-body')) %>)

<%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

Write your article (<%= link_to_function 'Add an excerpt', %(Element.toggle('x-lbl', 'x-body')) %>)

<%= form.text_area :body, :class => 'fat'  %>

Show article in these sections

        <% @sections.each do |section| %>

            <%= check_box_tag 'article[section_ids][]', section.id, @article.has_section?(section),
                  :id => "article_section_ids_#{section.id}" %>
            <label for="article_section_ids_<%= section.id %>"><%= section.name %>

        <% end %>

  <% unless @article.published? -%>

Save as Draft?

<%= check_box_tag :draft, '1', !@article.new_record?, :id => 'article-draft' %> Yes, save this article as a draft.

  <% end -%>
  <dt id="publish-date-lbl"<%= %( style="display:none") unless @article.new_record? -%>><%= label_tag 'article_created_at', 'Publish on this date:' %>

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? -%>><%= form.datetime_select :published_at, :discard_year => true %>

<% if @article.expire_comments_at && site.accept_comments? && site.comment_age.to_i > 0 %>

<%= label_tag 'article_expire_comments_at', 'Expire Comments on this date:' %>

<%= form.datetime_select :expire_comments_at %>

<% end -%>

Permanent link

<%= form.text_field :permalink %>

<% if false %>

Publish in these sections

      <% @sections.each do |section| %>

          <%= check_box_tag 'article[section_ids][]', section.id, @article.has_section?(section),
                :id => "article_section_ids_#{section.id}" %>
          <label for="article_section_ids_<%= section.id %>"><%= section.name %>

      <% end %>

  <% unless @article.new_record? -%>

Expire Comments At

    <%= form.date_select :expire_comments_at %>
  <% end -%>

<% end %>

<% content_for :sidebar do %>
<% if false %>

Publish in these sections

      <% @sections.each do |section| %>

          <%= check_box_tag 'article[section_ids][]', section.id, @article.has_section?(section),
                :id => "article_section_ids_#{section.id}" %>
          <label for="article_section_ids_<%= section.id %>"><%= section.name %>

      <% end %>

  <% unless @article.new_record? -%>

Expire Comments At

    <%= form.date_select :expire_comments_at %>
  <% end -%>

<% end %>

<% if false %>

Latest files

Search files

Upload

          <% 1.upto(5) do |i| %>
          <%= %(

          ) %>
          <% end %>

Search by tag or title

        <input class="searchbox" type="text" size="30" />
        <%= submit_tag 'Search' %>

1. <input type="file" size="15" />

2. <input type="submit" value="Upload" />

Other options

<%= check_box_tag 'allow_comments' %> Allow comments

  <% end %>
<% end %>


 * Switched ID of ordered list holding the comments from 'comments' to 'commentList'. The former seems to trigger a bug in the IE6/Win DOM which made Ajax commenting not work on that particular browser

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

<% content_for("script") do %>
function item_added() {
  new Effect.Highlight($('commentList').lastChild);
}
function item_loading() {
  $('commentform').elements[2].value = '';
  $('commentform').elements[2].focus();
}

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

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

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

<%= responses(@article.comments, "response") %> to '<%=h @article.title  %>'

    Leave a response

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

<% end -%>

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

<%= responses(@article.trackbacks, "trackback") %> to '<%=h @article.title  %>'

    Use the following link to trackback from your own site:

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

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

<% end -%>

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

  write a comment....

        Your name

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

        Your blog

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

        Your message

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

        <input type="submit" name="submit" value="submit" class="button" />

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

<% content_for("script") do %>
function item_added() {
  new Effect.Highlight($('comments').lastChild);
}
function item_loading() {
  $('commentform').elements[2].value = '';
  $('commentform').elements[2].focus();
}

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

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

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

<%= responses(@article.comments, "response") %> to '<%=h @article.title  %>'

    Leave a response

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

<% end -%>

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

<%= responses(@article.trackbacks, "trackback") %> to '<%=h @article.title  %>'

    Use the following link to trackback from your own site:

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

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

<% end -%>

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

  write a comment....

        Your name

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

        Your blog

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

        Your message

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

        <input type="submit" name="submit" value="submit" class="button" />

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


cleaner layout

cleaner layout

<% help_responses = get_service_type('help')
     unless (help_responses.blank?) %>

?
        Question? Problem? Contact:

        <% help_responses.each do |help|
              value_hash = help.view_data %>

 <%= link_to value_hash[:display_text], {:controller=>'link_router', :id=>help.id}, 'target'=>"_blank" %>
              <% unless value_hash[:note].blank? %>

                <%= value_hash[:note] %>
              <% end %>

        <% end %>

  <% end %>


fix link to SFX to use app config

fix link to SFX to use app config

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

<title><%= AppConfig.param("app_name") %> | <%= @page_title %></title>
 <%= stylesheet_link_tag 'basic' %>

<%= render(:partial => "layout_helpers/resolve_head_content" ) %>

<%= render(:partial => "layout_helpers/resolve_body_open" ) %>

  <%= image_tag('/local/header.gif', :style=>"float: left;")
  %>

  Welcome to the new Find It interface. Feedback on our new interface? Please send to asklib@jhu.edu.

URL:
        <% url = permalink_url(request, @user_request) %>
        <%= link_to url, url %>

    <%= @content_for_layout %>

  FindIt service provided by <%= link_to 'Johns Hopkins Libraries', 'http://webapps.jhu.edu/jhuniverse/libraries/' %> | Powered by <%= link_to 'Umlaut', 'http://umlaut.rubyforge.org/' %>, using services from <%= link_to 'SFX', 'http://www.exlibrisgroup.com/sfx.htm' %>, <%= link_to 'CrossRef', 'http://www.crossref.org' %>, <%= link_to 'Amazon', 'http://www.amazon.com' %>, <%= link_to 'OCLC Worldcat', 'http://www.worldcat.org' %>, <%= link_to 'ISBNdb', 'http://isbndb.com' %> and others.  <%= link_to '[S]', AppConfig.param('main_sfx_base_url') + (hash_to_querystring(@user_request.original_co_params) if @user_request), :target=>'_blank' %>

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

<title><%= AppConfig.param("app_name") %> | <%= @page_title %></title>
 <%= stylesheet_link_tag 'basic' %>

<%= render(:partial => "layout_helpers/resolve_head_content" ) %>

<%= render(:partial => "layout_helpers/resolve_body_open" ) %>

  <%= image_tag('/local/header.gif', :style=>"float: left;")
  %>

  Welcome to the new Find It interface. Feedback on our new interface? Please send to asklib@jhu.edu.

URL:
        <% url = permalink_url(request, @user_request) %>
        <%= link_to url, url %>

    <%= @content_for_layout %>

  FindIt service provided by <%= link_to 'Johns Hopkins Libraries', 'http://webapps.jhu.edu/jhuniverse/libraries/' %> | Powered by <%= link_to 'Umlaut', 'http://umlaut.rubyforge.org/' %>, using services from <%= link_to 'SFX', 'http://www.exlibrisgroup.com/sfx.htm' %>, <%= link_to 'CrossRef', 'http://www.crossref.org' %>, <%= link_to 'Amazon', 'http://www.amazon.com' %>, <%= link_to 'OCLC Worldcat', 'http://www.worldcat.org' %>, <%= link_to 'ISBNdb', 'http://isbndb.com' %> and others.  <%= link_to '[S]', 'http://sfx.library.jhu.edu:8000/jhu_sfx?' + (hash_to_querystring(@user_request.original_co_params) if @user_request), :target=>'_blank' %>


new way to get relative_url_root for generating ajax

<%-
#   Include this partial to put the background updater device on your page.
#   This actually just sets up the Umlaut JQuery background updater, for
#   unobtrusive adding of background html content to menu page.
-%>

<%
   # only include if we have any background services. We could check to make
   # sure we only have background services we care about, but it's more work--
   # the updater will only run ONCE at most wrongly, then the
   # background_update action will stop it.
   if (  any_services_in_progress? )
%>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready( function($) {
  var updater = new Umlaut.HtmlUpdater("<%= request.protocol + request.host + request.port_string + (controller.relative_url_root || "") %>"  ,  "umlaut.request_id=<%= @user_request.id %>"  );

  <% SectionRenderer.bg_update_sections.collect do |section| %>
    updater.add_section_target({ umlaut_section_id: "<%= section[:div_id]  %>"  });
  <% end %>

  //Add one for errors
  <% if error_div_info = AppConfig.param("error_div") %>
    updater.add_section_target({ umlaut_section_id: "ERRORS", selector: "#<%= error_div_info[:div_id] %>" });
  <% end %>

  //Wait the designated number of seconds before kicking off the first bg
  //update request. Future requests will be automatically made with delay..
  setTimeout(function() { updater.update(); },
             <%= AppConfig.param("poll_wait_seconds", 4)*1000 %>
             );

});

//]]>
</script>

<% end %>

<%-
#   Include this partial to put the background updater device on your page.
#   This actually just sets up the Umlaut JQuery background updater, for
#   unobtrusive adding of background html content to menu page.
-%>

<%
   # only include if we have any background services. We could check to make
   # sure we only have background services we care about, but it's more work--
   # the updater will only run ONCE at most wrongly, then the
   # background_update action will stop it.
   if (  any_services_in_progress? )
%>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready( function($) {
  var updater = new Umlaut.HtmlUpdater("<%= request.protocol + request.host + request.port_string + request.relative_url_root %>"  ,  "umlaut.request_id=<%= @user_request.id %>"  );

  <% SectionRenderer.bg_update_sections.collect do |section| %>
    updater.add_section_target({ umlaut_section_id: "<%= section[:div_id]  %>"  });
  <% end %>

  //Add one for errors
  <% if error_div_info = AppConfig.param("error_div") %>
    updater.add_section_target({ umlaut_section_id: "ERRORS", selector: "#<%= error_div_info[:div_id] %>" });
  <% end %>

  //Wait the designated number of seconds before kicking off the first bg
  //update request. Future requests will be automatically made with delay..
  setTimeout(function() { updater.update(); },
             <%= AppConfig.param("poll_wait_seconds", 4)*1000 %>
             );

});

//]]>
</script>

<% end %>


Removed elapsed time from dashboard for now, to get the build passing.
We'll refactor and put this back in later.

git-svn-id: 50a8ad97cae5d6ab203d2d535a9b32cd3858a8ac@214 c04ce798-636b-4ca8-9149-0f9336831111

<div id="project_<%= project.name %>" class="project build_<%= project.last_build_status %>">

        <%= link_to project.name, :controller => 'builds', :action => 'show', :project => project.name %>

      <% recent_builds = project.last_five_builds %>

      <%= recent_builds.first ? 'build ' : 'Never built' %>

      <% unless recent_builds.empty? %>

          <% recent_builds.each do |build| %>

<%= link_to_build(project, build) %>

          <% end %>

      <% end %>

      <% form_remote_tag( :url => { :action => 'force_build' }) do %>
           <%= hidden_field_tag("project",project.name) %>
           <%= submit_tag 'Build now' %>
      <% end %>

    <%= display_builder_state(project.builder_state_and_activity) %>

    <% if project.last_build_status == "success" %>
        Build finished in  <%= project.last_build.elapsed_time %> seconds
    <% end %>


fixing the source viewer to handle models with an 's' in the singular form (e.g. Alias or Address)

git-svn-id: b6390d97d9ded5bc793696aad9e4256efc0f90b3@336 561dde7e-7729-0410-be8e-ef83869d6c7d

<%= show_code("controllers", "#{params[:controller]}_controller.rb") -%>
<%= show_code("models", "#{params[:controller].split('/').last.pluralize.singularize}.rb") -%>
<%= show_code("helpers", "#{params[:controller]}_helper.rb") -%>

<%= show_code("controllers", "#{params[:controller]}_controller.rb") -%>
<%= show_code("models", "#{params[:controller].split('/').last.singularize}.rb") -%>
<%= show_code("helpers", "#{params[:controller]}_helper.rb") -%>


Don't barf if there is no site template set for a virtualsite

    Domain
    Site Template
    Delete?

  <% @event.virtual_sites.each do |vs| -%>

      <%=h vs.domain %>

        <% if vs.site_template -%>
          <%=h vs.site_template.name %>
        <% else -%>
          ProCon default template
        <% end -%>

      <%= check_box_tag "delete_virtual_site[#{vs.id}]" %>

  <% end -%>

    Add new virtual site:
    <%= text_field_tag "add_virtual_site[domain]" %>
    <%= select_tag "add_virtual_site[site_template]",
      options_for_select(SiteTemplate.find(:all).collect { |t| [t.name, t.id] }) %>

    Domain
    Site Template
    Delete?

  <% @event.virtual_sites.each do |vs| -%>

      <%=h vs.domain %>
      <%=h vs.site_template.name %>
      <%= check_box_tag "delete_virtual_site[#{vs.id}]" %>

  <% end -%>

    Add new virtual site:
    <%= text_field_tag "add_virtual_site[domain]" %>
    <%= select_tag "add_virtual_site[site_template]",
      options_for_select(SiteTemplate.find(:all).collect { |t| [t.name, t.id] }) %>


Close <p> tag in form

Close <p> tag in form

<% if @folder.parent_id.nil? && (@folder.new_record? || (@folder.num_files == 0 && @folder.num_folders == 0) )%>

<%=_ 'Project' %>
<select name="folder[project_id]" id="folder_project_id">
<% @clients = Customer.find(:all, :conditions => ["company_id = ?", current_user.company_id], :order => "name") %>
<% @clients.each do |c| %>
  <% @client_projects = current_user.projects.find(:all, :conditions => ["customer_id = #{c.id} AND completed_at IS NULL"], :order => "name" ) %>
  <% if @client_projects.size > 0 %>
    <optgroup class="select_heading" label="<%= h(c.name) %>">
    <% @client_projects.each do |p| %>
      <option value="<%=p.id%>" class="select_item"><%= p.name %></option>
    <% end %>
    </optgroup>
  <% end %>
<% end %>
</select>

<% else %>
<%= hidden_field 'folder', 'project_id' %>
<% end %>

<%=_ 'Name' %><%= text_field 'folder', 'name'  %>

<%= hidden_field 'folder', 'parent_id' %>


Added proper entity quoting to dc:description excerpt in article partial (fixes #88)

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

    <%= article_link article.title, article %>

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

  <%= article.body_html %>


*** empty log message ***

*** empty log message ***

<%= error_messages_for 'task' %>

Title

<%= text_field 'task', 'title'  %>

User(s) assigned

<%= select_tag("users[id][]", options_from_collection_for_select(@users, "id", "name", @user_ids), :multiple => true) %>

<% if @editing %>
On days

<%= select_tag("task[repeat_code]",
options_for_select([
["Daily", 0],
["Every Monday", 2],
["Every Tuesday", 3],
["Every Wednesday", 4],
["Every Thursday", 5],
["Every Friday", 6],
["Every Saturday", 7],
["Every Sunday", 1]
], @task.repeat_code)) %>

<% else %>

On days

<%= select_tag("days[]",
options_for_select([
["Daily", 0],
["Every Monday", 2],
["Every Tuesday", 3],
["Every Wednesday", 4],
["Every Thursday", 5],
["Every Friday", 6],
["Every Saturday", 7],
["Every Sunday", 1]
]),
:multiple => true) %>

<% end %>

<% if @task.internal_description == 'feed' %>

Food

<%= text_field 'task', 'food', :size => 1, :autocomplete => 'off' %> g

Dish Type

<%= select_tag("task[dish_type]", options_for_select([["Small","Small"],["Medium","Medium"], ["Long","Long"],["Metal tray","Metal tray"]], @task.dish_type)) %>

Number of dishes

<%= text_field 'task', 'dish_num', :size => 1, :autocomplete => 'off' %>

<% else %>

This task can be done one day ahead of schedule?
<%= check_box('task', 'jitter', {}, "-1", "0") %>

Notes

<%= text_field 'task', 'notes' %>

<% end %>


tweak

tweak

<%
   cited_by = get_service_type('cited_by')
   similar = get_service_type('similar')
%>

More like this:

  <%
      list_with_limit('umlaut_cited_by', cited_by) do |item, index |  %>
        <%= render(:partial => "fulltext_element", :object=> item, :locals => { :show_source => true, :li_class => "related_item"}) %>
  <%    end %>

  <%
  if (cited_by.length > 0) && (similar.length > 0) %>

  <% end %>

  <%
      list_with_limit('umlaut_similar_items', similar) do |item, index |  %>
        <%= render(:partial => "fulltext_element", :object=> item, :locals => { :show_source => true, :li_class => "related_item"}) %>
  <%    end %>

  <%
  if (service_types_in_progress?([ServiceTypeValue['cited_by'], ServiceTypeValue['similar']]))

  %>

    <%= render(:partial => "background_progress",
                     :locals => { :svc_types => [ServiceTypeValue[:similar],
                                  ServiceTypeValue[:cited_by]],
                                  :current_set_empty => similar.empty? && cited_by.empty?,
                                  :item_name => "Related Items"
                                 } ) %>

  <% elsif similar.empty? && cited_by.empty? %>

No related items found.

  <% end %>


Oops, forgot to remove debug thing from create_darvin.

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

<% if can_do_ajax? %>
  <%= javascript_include_tag 'prototype' %>
  <%= javascript_include_tag 'controls' %>
  <%= javascript_include_tag 'effects' %>
  <%= javascript_include_tag 'darvin' %>
<% end %>

<% @title = "Darvin's Special" %>

<%= @title %>

<% if !@js %>

This page will not work if javascript is disabled.

<% else if !can_do_ajax? %>

This page will not work on your browser, sorry!

<% else %>

  Genera
  Species
  Selected

   <%= form_tag({:action => 'create_darvin'}, {}) %>
    <%= submit_tag('Create List') %>
    <%= submit_tag('Show as Plain Text') %>
    <%= submit_tag('Show as Rich Text') %>
    <%= submit_tag('Show as Spreadsheet') %>
    <%= hidden_field_tag('results', @names.join("\n")) %>
   </form>

<%= javascript_tag %(
  var GENERA  = [#{@genera.map  {|n| "'#{n}'"}.join(",")}];
  var SPECIES = [#{@species.map {|n| "'#{n}'"}.join(",")}];
  var NAMES   = [];
  darvin_initialize_names();
  darvin_draw("genera", GENERA);
  darvin_draw("names", NAMES);
) %>

Create List: Click on a genus in the first
column to pull up a list of species in that genus.  Click on any of these taxa
to add species to your list.  Deprecated names are automatically linked to the
corresponding accepted name.  Your species list is shown in the third column.
You may remove names from this list by clicking on them.

Save List: When you are finished, click on any
of the buttons at the bottom of the page.  "Create List" takes you back to the
standard creation form, where you will be able to enter date, location, notes,
etc. before saving the list.

Reports: The plain text report gives you a
simple list of taxa with no formatting.  Rich text can be used to import the
list into Microsoft Word with all the formatting intact.  Spreadsheet produces
a CSV file, with name, author, and citation columns.  Common names are not
available yet.  (Click on "back" button in browser to return to this
form.)

  <% end %>
<% end %>

<% if can_do_ajax? %>
  <%= javascript_include_tag 'prototype' %>
  <%= javascript_include_tag 'controls' %>
  <%= javascript_include_tag 'effects' %>
  <%= javascript_include_tag 'darvin' %>
<% end %>

<% @title = "Darvin's Special" %>

<%= @title %>

<% if !@js %>

This page will not work if javascript is disabled.

<% else if true %>

This page will not work on your browser, sorry!

<% else %>

  Genera
  Species
  Selected

   <%= form_tag({:action => 'create_darvin'}, {}) %>
    <%= submit_tag('Create List') %>
    <%= submit_tag('Show as Plain Text') %>
    <%= submit_tag('Show as Rich Text') %>
    <%= submit_tag('Show as Spreadsheet') %>
    <%= hidden_field_tag('results', @names.join("\n")) %>
   </form>

<%= javascript_tag %(
  var GENERA  = [#{@genera.map  {|n| "'#{n}'"}.join(",")}];
  var SPECIES = [#{@species.map {|n| "'#{n}'"}.join(",")}];
  var NAMES   = [];
  darvin_initialize_names();
  darvin_draw("genera", GENERA);
  darvin_draw("names", NAMES);
) %>

Create List: Click on a genus in the first
column to pull up a list of species in that genus.  Click on any of these taxa
to add species to your list.  Deprecated names are automatically linked to the
corresponding accepted name.  Your species list is shown in the third column.
You may remove names from this list by clicking on them.

Save List: When you are finished, click on any
of the buttons at the bottom of the page.  "Create List" takes you back to the
standard creation form, where you will be able to enter date, location, notes,
etc. before saving the list.

Reports: The plain text report gives you a
simple list of taxa with no formatting.  Rich text can be used to import the
list into Microsoft Word with all the formatting intact.  Spreadsheet produces
a CSV file, with name, author, and citation columns.  Common names are not
available yet.  (Click on "back" button in browser to return to this
form.)

  <% end %>
<% end %>


replace applet with potlatch

replace applet with potlatch

note that this copy of potlatch is coming off of richards dev account and isn't speaking to your local API as it hasn't been integrated yet.

FIXME integrate potlatch properly.

Sorry, you need a Flash player to use Potlatch, the
    OpenStreetMap Flash editor. You can download Flash Player from Adobe.com.

    Several other options are also available
    for editing OpenStreetMap.

    <applet
    code="org/openstreetmap/processing/OsmApplet.class"
    archive="OSMApplet.jar, commons-codec-1.3.jar, core.jar, commons-logging.jar, commons-httpclient-3.0-rc3.jar, MinML2.jar, thinlet.jar"
    width="700"
    height="500"
    MAYSCRIPT="true" >
    <param name="clat" value="<%= params['lat'] %>">
    <param name="clon" value="<%= params['lon'] %>">
    <param name="zoom" value="<%= params['zoom'] %>">
    <param name="user" value="token">
    <param name="pass" value="<%= @user.token %>">
    <param name="wmsurl" value="http://www.openstreetmap.org/tile/0.2/gpx?;http://www.openstreetmap.org/api/wms/0.2/landsat/?request=GetMap&layers=modis,global_mosaic&styles=&srs=EPSG:4326&FORMAT=image/jpeg">
    <param name="apiurl" value="<%= SERVER_URL %>/api/<%= API_VERSION %>/">
    Your browser needs to support Java to edit maps.

    Download Java here
    </applet>

Need help editing?


additional parameter passed in the link assignment.name

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

Assignments

Title	Directory Path

<% for assignment in @assignments %>

    <%= link_to assignment.name, :action => 'list',
	    :id=> assignment.id, :assignment_id => assignment.id %>
    <%= assignment.directory_path %>

<% end -%>

Assignments

Title	Directory Path

<% for assignment in @assignments %>

    <%= link_to assignment.name, :action => 'list',
	    :assignment_id => assignment.id %>
    <%= assignment.directory_path %>

<% end -%>


Don't confuse users by giving them a choice about including a headers line in the CSV import.  Fixes #8

<% @title = "Upload CSV of public authorities" %>

<%=@title%>

<% if not @notes.empty? %>

<%=@notes %>

<% end %>
<% if not @errors.empty? %>

<%=@errors %>

<% end %>

<% form_tag 'import_csv', :multipart => true do %>

    CSV file:
    <%= file_field_tag :csv_file, :size => 40 %>

    Optional: Tag to add entries to / alter entries for:
    <%= text_field_tag 'tag', params[:tag] %>

    What to do with existing tags?
    <%= select_tag 'tag_behaviour',
        "<option value='add' selected>Add new tags to existing ones</option>
         <option value='replace'>Replace existing tags with new ones</option>"
    %>

CSV file format:The first row should be a list
    of fields, starting with '#'. The fields 'name' and
    'request_email' are required; additionally, translated values are
    supported by adding the locale name to the field name,
    e.g. 'name.es', 'name.de'... Example:

        #id,name,request_email,name.es,tag_string

        1,An Authority,a@example.com,Un organismo,a_tag another_tag

        2,Another One,another@example.com,Otro organismo,a_tag

Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n),
    publication_scheme (i18n), home_page, tag_string (tags separated by spaces).

Note: Choose dry run to test, without
    actually altering the database. Choose upload to actually
    make the changes. In either case, you will be shown any errors, or details
    of the changes.  When uploading, any changes since last import will be
    overwritten – e.g.  email addresses changed back.

Note: The import tag will also be added to the imported bodies
    if no tags are provided in the CSV file or if the import mode is set to
    "Add new tags to existing ones".

<%= submit_tag 'Dry run' %> <%= submit_tag 'Upload' %>

<% end %>

Standard tags:
    <% for category, description in PublicBodyCategories::get().by_tag() %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>

<% @title = "Upload CSV of public authorities" %>

<%=@title%>

<% if not @notes.empty? %>

<%=@notes %>

<% end %>
<% if not @errors.empty? %>

<%=@errors %>

<% end %>

<% form_tag 'import_csv', :multipart => true do %>

    CSV file:
    <%= file_field_tag :csv_file, :size => 40 %>

    Optional: Tag to add entries to / alter entries for:
    <%= text_field_tag 'tag', params[:tag] %>

    What to do with existing tags?
    <%= select_tag 'tag_behaviour',
        "<option value='add' selected>Add new tags to existing ones</option>
         <option value='replace'>Replace existing tags with new ones</option>"
    %>

CSV file format: A first row with the list of fields,
    starting with '#', is optional but highly recommended. The fields 'name'
    and 'request_email' are required; additionally, translated values are supported by
    adding the locale name to the field name, e.g. 'name.es', 'name.de'... Example:

        #id,name,request_email,name.es,tag_string

        1,An Authority,a@example.com,Un organismo,a_tag another_tag

        2,Another One,another@example.com,Otro organismo,a_tag

Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n),
    publication_scheme (i18n), home_page, tag_string (tags separated by spaces).

Note: Choose dry run to test, without
    actually altering the database. Choose upload to actually
    make the changes. In either case, you will be shown any errors, or details
    of the changes.  When uploading, any changes since last import will be
    overwritten – e.g.  email addresses changed back.

Note: The import tag will also be added to the imported bodies
    if no tags are provided in the CSV file or if the import mode is set to
    "Add new tags to existing ones".

<%= submit_tag 'Dry run' %> <%= submit_tag 'Upload' %>

<% end %>

Standard tags:
    <% for category, description in PublicBodyCategories::get().by_tag() %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>


bringing LiveSearch up to speed. it now relies on form_remote_tag instead of a custom Ajax.Updater. the periodic  observer just triggers the onsubmit() from the form_remote_tag.

<% href = url_for(params_for(:action => :update_table, :escape => false)) -%>
<%= form_remote_tag :url => href,
                    :method => :get,
                    :before => "addActiveScaffoldPageToHistory('#{href}', '#{params[:controller]}')",
                    :after => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'visible';",
                    :complete => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'hidden';",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :update => active_scaffold_content_id,
                    :html => { :href => href, :id => search_form_id, :class => 'search' } %>
  <input type="text" name="search" size="50" value="<%= params[:search] -%>" class="text-input" id="<%= search_input_id %>" autocompleted="off" />
  <%= as_('Reset') -%>
  <%= loading_indicator_tag(:action => :search) %>
</form>

<%= form_tag params_for(:action => :update_table), :id => search_form_id, :class => 'search' %>
  <input type="text" name="search" value="<%= params[:search] -%>" class="text-input" id="<%= search_input_id %>" autocompleted="off" />
  <input type="reset" value="<%= as_('Reset') -%>" onclick="f = this.up('form'); f.reset(); f.onsubmit();" />
  <%= loading_indicator_tag(:action => :search) %>
</form>

<script type="text/javascript">
//<![CDATA[
  new TextFieldWithExample('<%= search_input_id %>', '<%= as_("Live Search") %>');
  new Form.Element.Observer('<%= search_input_id %>', 1.5, function(element, value) {
    if (!$(element.id)) return false; // because the element may have been destroyed
    new Ajax.Updater('<%= active_scaffold_content_id %>', "<%= url_for params_for(:action => :update_table, :escape => false) %>", {
      asynchronous:true, evalScripts:true,
      onComplete:function(request){Element.hide('<%= loading_indicator_id(:action => :search) %>');},
      onLoading:function(request){Element.show('<%= loading_indicator_id(:action => :search) %>');},
      parameters:Form.serialize($('<%= search_form_id %>'))
    });
    return false;
  });

  Form.focusFirstElement('<%= search_form_id -%>');
//]]>
</script>


remove site delete button

remove site delete button

<% content_for :action_nav do -%>

<%= link_to "Sites", :action => "index" %>

<% end %>

<% form_for :site, :url => { :action => "update", :id => @site } do |f| -%>
<%= f.error_messages %>

<%=h @site.title %> (<%= mail_to @site.email %>)

Host

<%= f.text_field :host %>

Theme Path

<%=h @site.theme_path %>

			See and update the <%= link_to 'other site settings.', :controller => 'settings', :action => 'index', :host => @site.host %>

		<%= f.submit :Save %> or
		<%= link_to 'Delete', {:action => 'destroy', :id => @site}, :confirm => "Are you sure you wish to delete this site?", :method => :post %>

<% end -%>

<% form_tag :action => 'destroy', :id => @site do -%>

<%= submit_tag 'Delete' %>
<% end -%>


Only show frontpage lists if there are any items in them.

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority

you'd like information from OR anything to search for

           <%= text_field_tag 'query', params[:query], { :size => 30 } %>
           <%= hidden_field_tag 'bodies', 1 %>
           <%= submit_tag "Search" %>

           e.g. <%=link_to 'Liverpool', search_url('liverpool', 'bodies')%>, <%=link_to 'MRSA', search_url('mrsa', 'bodies')%>, <%=link_to 'Treasury', search_url('treasury', 'bodies')%>

    <% end %>

    <% if @popular_bodies.size > 0 %>

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>

            <% end%>

                <%= link_to "More authorities...", list_public_bodies_default %>

    <% end %>

    <% if @successful_requests.size > 0 %>

            <% for request in @successful_requests %>

<%=link_to h(excerpt(request.title, "", 35)), request_url(request)%>

            <% end %>

More successful requests...

    <% end %>

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority

you'd like information from OR anything to search for

           <%= text_field_tag 'query', params[:query], { :size => 30 } %>
           <%= hidden_field_tag 'bodies', 1 %>
           <%= submit_tag "Search" %>

           e.g. <%=link_to 'Liverpool', search_url('liverpool', 'bodies')%>, <%=link_to 'MRSA', search_url('mrsa', 'bodies')%>, <%=link_to 'Treasury', search_url('treasury', 'bodies')%>

    <% end %>

        <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>

        <% end%>

            <%= link_to "More authorities...", list_public_bodies_default %>

        <% for request in @successful_requests %>

<%=link_to h(excerpt(request.title, "", 35)), request_url(request)%>

        <% end %>

More successful requests...


Attempt to fix problem with disappearing comment box.

<%= error_messages_for 'comment' %>

<%= hidden_field("comment", "observation_id", :value => observation_id)%>

	<%= :form_comments_summary.l %>

	<%= text_field("comment", "summary", :size => 80) %>

	<%= :form_comments_comment.l %>

	<%= text_area("comment", "comment", :cols => 80, :rows => 5) %>

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

<%= error_messages_for 'comment' %>

<%= hidden_field("comment", "observation_id", :value => observation_id)%>

	<%= :form_comments_summary.l %>

	<%= text_field("comment", "summary", :size => 80) %>

	<Comment><%= :form_comments_comment.l %>

	<%= text_area("comment", "comment", :cols => 80, :rows => 5) %>

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


Fixes encode error for article notification on wall

  The replace used to remove non-breaking spaces was removing part of
  some characters codification. I changed it for \xC2\xA0 which is
  non-breaking space in UTF-8.

(ActionItem2480)

  <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>

<div class='profile-activity-description profile-activity-article-<%= activity.target.class.icon_name %>'>

    <%= link_to activity.user.short_name(20), activity.user.url %>
    <%= _("on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url) if activity.target.profile.is_a?(Community) %>

<%= link_to(activity.params['name'], activity.params['url']) %>

    <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'>
    <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') %> <%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %>

  <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>

<%= time_ago_as_sentence(activity.created_at) %>

    <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %>
    <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :only_hide => true, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>

<%= render :partial => 'profile_comments', :locals => { :activity => activity, :tab_action => tab_action } %>

  <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>

<div class='profile-activity-description profile-activity-article-<%= activity.target.class.icon_name %>'>

    <%= link_to activity.user.short_name(20), activity.user.url %>
    <%= _("on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url) if activity.target.profile.is_a?(Community) %>

<%= link_to(activity.params['name'], activity.params['url']) %>

    <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'>
    <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xA0|\xC2|\s)+/, ' ').gsub(/^\s+/, '') %> <%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %>

  <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>

<%= time_ago_as_sentence(activity.created_at) %>

    <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %>
    <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :only_hide => true, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>

<%= render :partial => 'profile_comments', :locals => { :activity => activity, :tab_action => tab_action } %>


Simplify and tighten up wording on describe dialog (thank to David Jones).

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

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

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

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

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

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

            <%= 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 / a rejection (e.g. if the new response was just an acknowledgement)

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

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

            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>">The authority does not have the information (perhaps they suggest making the request elsewhere)

            <%= 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 that I asked for

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

            <%= 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 (please read them first!)

Filling this in helps everyone track the progress of your request.

        <%= 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 advise you on 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 %>


Some tweaks to edit page.

Some tweaks to edit page.

Edit basic details of request

<%= error_messages_for 'info_request' %>

<% form_tag '../update/' + @info_request.id.to_s do %>

Title (warning: editing this will break URLs right now)

   <%= text_field 'info_request', 'title', :size => 50  %>

Prominence (whether is shown in lists of requests / search or not)

   <%= select( 'info_request', "prominence", { "normal" => "normal", "backpage" => "backpage"}) %>

Stop new responses (use this on requests getting spam, but also work out how the email leaked and plug it)

   <%= select('info_request', "stop_new_responses", [["Yes - stop new responses",true],["No - allow new responses",false]]) %>

Described state (don't forget to change 'awaiting description' below too if necessary)

   <%= select( 'info_request', "described_state",
       [
        'waiting_response',
        'waiting_clarification',
        'not_held',
        'rejected',
        'successful',
        'partially_successful',
        'requires_admin',
    ]) %>

Awaiting description

   <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %>

<%= submit_tag 'Save changes' %>

Note: To edit the actual request body text, click edit
  next to the specific outgoing message.

<% end %>

<%= link_to 'Show', '../show/' + @info_request.id.to_s %> |
<%= link_to 'List all', '../list' %>

<% form_tag '../fully_destroy/' + @info_request.id.to_s do %>

    This is permanent and irreversible! <%= submit_tag 'Destory request entirely' %>

Use it mainly if someone posts private information, e.g. made a Data Protection request. It
    destroys all responses and tracks as well.

<% end %>

Edit basic details of request

<%= error_messages_for 'info_request' %>

<% form_tag '../update/' + @info_request.id.to_s do %>

Title (warning: editing this will break URLs right now)

   <%= text_field 'info_request', 'title', :size => 50  %>

Prominence (whether is shown in lists of requests or not)

   <%= select( 'info_request', "prominence", { "normal" => "normal", "backpage" => "backpage"}) %>

Awaiting description

   <%= select('info_request', "awaiting_description", [["Yes",true],["No",false]]) %>

Stop new responses (use this on requests getting spam, but also work out how the email leaked and plug it)

   <%= select('info_request', "stop_new_responses", [["Yes",true],["No",false]]) %>

Described state

   <%= select( 'info_request', "described_state",
       [
        'waiting_response',
        'waiting_clarification',
        'not_held',
        'rejected',
        'successful',
        'partially_successful',
        'requires_admin',
    ]) %>

<%= submit_tag 'Save changes' %>

Note: To edit the actual request body text, click edit
  next to the specific outgoing message.

<% end %>

<% form_tag '../fully_destroy/' + @info_request.id.to_s do %>

    This is permanent and irreversible! <%= submit_tag 'Destory request entirely' %>

Use it mainly if someone posts private information, e.g. made a Data Protection request. It
    destroys all responses and tracks as well.

<% end %>

<%= link_to 'Show', '../show/' + @info_request.id.to_s %> |
<%= link_to 'List all', '../list' %>


replace 'editing block' label with block name

<div class="block-config-options <%= @block.class.name %>-options">

<%= _(@block.class.description) %>

  <% form_tag(:action => 'save', :id => @block.id) do %>

    <%= labelled_form_field(_('Custom title for this block: '), text_field(:block, :title, :maxlength => 20)) %>

    <%= render :partial => partial_for_class(@block.class) %>

    <%= labelled_form_field _('Display this block:'), '' %>

      <%= radio_button(:block, :display, 'always') %>
      <%= label_tag('block_display_always', _('In all pages')) %>

      <%= radio_button(:block, :display, 'home_page_only') %>
      <%= label_tag('block_display_home_page_only', _('Only in the homepage')) %>

      <%= radio_button(:block, :display, 'except_home_page') %>
      <%= label_tag('block_display_except_home_page', _('In all pages, except in the homepage')) %>

      <%= radio_button(:block, :display, 'never') %>
      <%= label_tag('block_display_never', _("Don't display")) %>

    <%= labelled_form_field(_('Show for:'), select(:block, :language, [ [ _('all languages'), 'all']] + environment.locales.map {|key, value| [value, key]} )) %>

    <% button_bar do %>
      <%= submit_button(:save, _('Save')) %>
      <%= colorbox_close_button(_('Cancel')) %>
    <% end %>

  <% end %>

<div class="block-config-options <%= @block.class.name %>-options">

<%= _('Editing block') %>

  <% form_tag(:action => 'save', :id => @block.id) do %>

    <%= labelled_form_field(_('Custom title for this block: '), text_field(:block, :title, :maxlength => 20)) %>

    <%= render :partial => partial_for_class(@block.class) %>

    <%= labelled_form_field _('Display this block:'), '' %>

      <%= radio_button(:block, :display, 'always') %>
      <%= label_tag('block_display_always', _('In all pages')) %>

      <%= radio_button(:block, :display, 'home_page_only') %>
      <%= label_tag('block_display_home_page_only', _('Only in the homepage')) %>

      <%= radio_button(:block, :display, 'except_home_page') %>
      <%= label_tag('block_display_except_home_page', _('In all pages, except in the homepage')) %>

      <%= radio_button(:block, :display, 'never') %>
      <%= label_tag('block_display_never', _("Don't display")) %>

    <%= labelled_form_field(_('Show for:'), select(:block, :language, [ [ _('all languages'), 'all']] + environment.locales.map {|key, value| [value, key]} )) %>

    <% button_bar do %>
      <%= submit_button(:save, _('Save')) %>
      <%= colorbox_close_button(_('Cancel')) %>
    <% end %>

  <% end %>


Weighing tasks aren't manageable

Weighing tasks aren't manageable

Dossier on <%= @cage.name%>

Owner: <%= @cage.user ? @cage.user.name : 'NP' %>

Room: <%= @cage.room %>

Bats: <%= @cage.bats.count %>

<% average_bat_weight = @cage.average_bat_weight %>
<% if average_bat_weight != nil %>

Average Weight: <%= average_bat_weight %> g

<% end %>

Date Created: <%= nice_date @cage.date_created %>

<% if @cage.date_destroyed != nil %>

Date Destroyed: <%= nice_date @cage.date_destroyed %>

<% else %>

<% end %>

Current Feeding Tasks:

<%= render :partial => 'tasks/tasks_list', :locals =>{:tasks_list => nil, :tasks => @cage.tasks.feeding_tasks, :div_id => 'feeding_tasks', :single_cage_task_list => true, :manage => true} %>

[<%= link_to 'Add feeding task', :controller => 'tasks', :action => 'new_feed_cage_task', :id => @cage %>]
[<%= link_to 'Edit multiple feeding tasks', :controller => 'tasks', :action => 'edit_multiple_feeding_tasks', :id => @cage %>]

<% @tasks = @cage.tasks.weighing_tasks %>
Current Weighing Tasks:

<%= render :partial => 'tasks/tasks_list', :locals =>{:tasks_list => nil, :tasks => @cage.tasks.weighing_tasks, :div_id => 'weighing_tasks', :single_cage_task_list => true, :manage => false} %>

[<%= link_to 'Add weighing task', :controller => 'tasks', :action => 'new_weigh_cage_task', :id => @cage %>]

<% if @cage.bats.active.length == 0 %>
No bats are in this cage.
<% else %>
  Current Bats:

  Band
  Last Weight
  Weigh Date
  Date in
  Who
  Why
  <% for bat in @cage.bats %>
    <% cih = bat.cage_in_histories %>
    <% if cih %>
    <%      @date_in = cih[0].date %>
    <%      @sig = cih[0].user.initials %>
    <%      @why = cih[0].note %>
    <% else %>
    <%      @date_in ="" %>
    <%      @sig = "" %>
    <%      @why = "" %>
    <% end %>

    <%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %>
    <% if bat.weights.length > 0 %>
          <%=h bat.weights.recent.weight %>
          <%=h nice_date(bat.weights.recent.date) %>
    <% else %>
          N/A
          N/A
    <% end %>
    <%=h nice_date(@date_in) %>
    <%=h @sig %>
    <%=h @why %>

  <% end %>

<% end %>

<% if @cohs.length == 0 %>
No bats were in this cage.
<% else %>
  Past Bats:

  Band
  Date in
  Who
  Date out
  Who
  <% for coh in @cohs %>

    <%=link_to coh.bat.band, :controller => 'bats', :action => 'show', :id => coh.bat %>
    <%=h nice_date(coh.cage_in_history.date) %>
    <%=h coh.cage_in_history.user.initials %>
    <%=h nice_date(coh.date) %>
    <%=h coh.user.initials %>

  <% end %>

<% end %>

<%= link_to 'Edit', :action => 'edit', :id => @cage %> |
<%= link_to 'List Current Cages', :action => 'list' %>

Dossier on <%= @cage.name%>

Owner: <%= @cage.user ? @cage.user.name : 'NP' %>

Room: <%= @cage.room %>

Bats: <%= @cage.bats.count %>

<% average_bat_weight = @cage.average_bat_weight %>
<% if average_bat_weight != nil %>

Average Weight: <%= average_bat_weight %> g

<% end %>

Date Created: <%= nice_date @cage.date_created %>

<% if @cage.date_destroyed != nil %>

Date Destroyed: <%= nice_date @cage.date_destroyed %>

<% else %>

<% end %>

Current Feeding Tasks:

<%= render :partial => 'tasks/tasks_list', :locals =>{:tasks_list => nil, :tasks => @cage.tasks.feeding_tasks, :div_id => 'feeding_tasks', :single_cage_task_list => true, :manage => true} %>

[<%= link_to 'Add feeding task', :controller => 'tasks', :action => 'new_feed_cage_task', :id => @cage %>]
[<%= link_to 'Edit multiple feeding tasks', :controller => 'tasks', :action => 'edit_multiple_feeding_tasks', :id => @cage %>]

<% @tasks = @cage.tasks.weighing_tasks %>
Current Weighing Tasks:

<%= render :partial => 'tasks/tasks_list', :locals =>{:tasks_list => nil, :tasks => @cage.tasks.weighing_tasks, :div_id => 'weighing_tasks', :single_cage_task_list => true, :manage => true} %>

[<%= link_to 'Add weighing task', :controller => 'tasks', :action => 'new_weigh_cage_task', :id => @cage %>]

<% if @cage.bats.active.length == 0 %>
No bats are in this cage.
<% else %>
  Current Bats:

  Band
  Last Weight
  Weigh Date
  Date in
  Who
  Why
  <% for bat in @cage.bats %>
    <% cih = bat.cage_in_histories %>
    <% if cih %>
    <%      @date_in = cih[0].date %>
    <%      @sig = cih[0].user.initials %>
    <%      @why = cih[0].note %>
    <% else %>
    <%      @date_in ="" %>
    <%      @sig = "" %>
    <%      @why = "" %>
    <% end %>

    <%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %>
    <% if bat.weights.length > 0 %>
          <%=h bat.weights.recent.weight %>
          <%=h nice_date(bat.weights.recent.date) %>
    <% else %>
          N/A
          N/A
    <% end %>
    <%=h nice_date(@date_in) %>
    <%=h @sig %>
    <%=h @why %>

  <% end %>

<% end %>

<% if @cohs.length == 0 %>
No bats were in this cage.
<% else %>
  Past Bats:

  Band
  Date in
  Who
  Date out
  Who
  <% for coh in @cohs %>

    <%=link_to coh.bat.band, :controller => 'bats', :action => 'show', :id => coh.bat %>
    <%=h nice_date(coh.cage_in_history.date) %>
    <%=h coh.cage_in_history.user.initials %>
    <%=h nice_date(coh.date) %>
    <%=h coh.user.initials %>

  <% end %>

<% end %>

<%= link_to 'Edit', :action => 'edit', :id => @cage %> |
<%= link_to 'List Current Cages', :action => 'list' %>


botonera nueva

botonera nueva

git-svn-id: 268669d3058f191005ae665964cd19b71efa10c4@13776 3f47a204-8049-4147-aab0-d444c64e7564

		<%if current_user.superuser==true && session[:current_tab]=="Manage"%>
			<%= link_to "Spaces", :controller=>'spaces', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Roles", :controller=>'roles', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Users", manage_users_path(:container_id => @space.id, :container_type => :spaces) %> |
			<%= link_to "Resources", :controller=>'machines', :action=>'manage_resources', :container_id => @space.id %>
		<%elsif current_user.superuser==true && session[:current_tab]=="Home"%>
			<%= link_to "Edit Space", edit_space_path(@space) %> |
			<%= link_to "Delete Space", space_path(@space), :confirm => 'This will delete all the Space. Are you sure?', :method => :delete %>
		<%elsif session[:current_tab]=="Events"%>
			<%= link_to "New Event", :controller=>'events', :action=>'new', :container_id => @space.id %> |
			<%= link_to "Show Calendar", :controller=>'events', :action=>'show_calendar', :container_id => @space.id %>
		<%elsif session[:current_tab]=="Groups"%>
			<%if @space.manage_groups_by?(current_user)%>
				<%= link_to 'Create Group', create_group_path(:space,@container.id)%>
			<%end%>
		<%elsif session[:current_tab]=="MyProfile"%>
			<%= link_to 'Edit Profile', edit_space_user_profile_path(@space.id, current_user.id)%> |
			<%= link_to 'Edit Account' , edit_space_user_path(@space.id, current_user.id)%>
		<%elsif session[:current_tab]=="People"%>
			<%= link_to "Manage Users", manage_users_path(:container_id => @space.id, :container_type => :spaces) %>
		<%end%>

		<%if session[:current_tab]=="Manage"%>
			<%= link_to "Spaces", :controller=>'spaces', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Roles", :controller=>'roles', :action=>'index', :container_id => @space.id %> |
			<%= link_to "Users", manage_users_path(:container_id => @space.id, :container_type => :spaces) %> |
			<%= link_to "Resources", :controller=>'machines', :action=>'manage_resources', :container_id => @space.id %>
		<%elsif session[:current_tab]=="Events"%>
			<%= link_to "New Event", :controller=>'events', :action=>'new', :container_id => @space.id %> |
			<%= link_to "Show Calendar", :controller=>'events', :action=>'show_calendar', :container_id => @space.id %>
		<%elsif session[:current_tab]=="Groups"%>
			<%if @space.manage_groups_by?(current_user)%>
			<%= link_to 'Create Group', create_group_path(:space,@container.id)%>
			<%end%>
		<%end%>


Fix setPosition().

Fix setPosition().


[ClockingIT @ Handle deleted users when printing created by / updated by]

<% if request.xhr? %>
    <%= form_remote_tag :url => { :action => 'update_ajax', :id => @task } ,
                        :loading => "Element.show('loading');",
                        :complete => "Element.hide('loading');"
    %>
<% else -%>
  <%= start_form_tag({ :action => 'update', :id => @task}, { :multipart => "true", :id => "taskform" }) %>
<% end -%>

          <%= render :partial => "task_edit_header", :locals => {:task => @task} %>

     <% creator = User.find(@task.creator_id)
        creator_name = (creator.nil? ? "Unknown" : creator.name)

        updator = User.find(@task.updated_by_id)
        updator_name = (updator.nil? ? "Unknown" : updator.name)

     %>
     <%=_ 'Created' %> <%= tz.utc_to_local(@task.created_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") if @task.created_at %> <%= "#{_('by')} #{creator_name}" unless (@task.creator_id.nil? || @task.creator_id == 0)%>
     <% if @task.updated_at && @task.updated_at != @task.created_at %> - <%=_ 'Last Updated' %> <%= tz.utc_to_local(@task.updated_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") if @task.updated_at %> <%= "#{_('by')} #{updator_name}" unless (@task.updated_by_id.nil? || @task.updated_by_id == 0)%>  <% end %>

<%= render_partial "form" %>

  <%= submit_tag _("Save"), :class => "nolabel" %> <%=_ 'and' %>

<%

 options = []
 options << [_("Leave Open"), 0] if @task.status == 0
 options << [_("Revert to Open"), 0] if @task.status != 0
 options << [_("Set in Progress"), 1] if @task.status == 0
 options << [_("Leave as in Progress"), 1] if @task.status == 1
 options << [_("Close"), 2] if @task.status == 0 || @task.status == 1
 options << [_("Leave Closed"), 2] if @task.status == 2
 options << [_("Set as Won't Fix"), 3] if @task.status == 0 || @task.status == 1
 options << [_("Leave as Won't Fix"), 3] if @task.status == 3
 options << [_("Set as Invalid"), 4] if @task.status == 0 || @task.status == 1
 options << [_("Leave as Invalid"), 4] if @task.status == 4
 options << [_("Set as Duplicate"), 5] if @task.status == 0 || @task.status == 1
 options << [_("Leave as Duplicate"), 5] if @task.status == 5

 can_close = {:disabled => "disabled"} unless session[:user].can?( @task.project, 'close' )
 can_close ||= {}
%>

<%= select 'task', 'status', options, {:selected => @task.status}, can_close %>
<%= check_box_tag 'notify', '1', (session[:user].send_notifications > 0) %><%=_ 'Send notification emails' %>

<%= end_form_tag %>

      <%= _ 'History' %>

    <%  day = 0
        for log in @logs
          if day != (tz.utc_to_local(log.started_at)).yday
             day = (tz.utc_to_local(log.started_at)).yday
           %>

                  <%= tz.utc_to_local(log.started_at).strftime("%A, %d %B %Y") %>

        <% end %>
        <%= render :partial => 'activities/log_row', :locals => {:log => log} %>
    <% end %>

<% if request.xhr? %>
    <%= form_remote_tag :url => { :action => 'update_ajax', :id => @task } ,
                        :loading => "Element.show('loading');",
                        :complete => "Element.hide('loading');"
    %>
<% else -%>
  <%= start_form_tag({ :action => 'update', :id => @task}, { :multipart => "true", :id => "taskform" }) %>
<% end -%>

          <%= render :partial => "task_edit_header", :locals => {:task => @task} %>

     <%=_ 'Created' %> <%= tz.utc_to_local(@task.created_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") if @task.created_at %> <%= "#{_('by')} #{User.find(@task.creator_id).name}" unless (@task.creator_id.nil? || @task.creator_id == 0)%>
     <% if @task.updated_at && @task.updated_at != @task.created_at %> - <%=_ 'Last Updated' %> <%= tz.utc_to_local(@task.updated_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") if @task.updated_at %> <%= "#{_('by')} #{User.find(@task.updated_by_id).name}" unless (@task.updated_by_id.nil? || @task.updated_by_id == 0)%>  <% end %>

<%= render_partial "form" %>

  <%= submit_tag _("Save"), :class => "nolabel" %> <%=_ 'and' %>

<%

 options = []
 options << [_("Leave Open"), 0] if @task.status == 0
 options << [_("Revert to Open"), 0] if @task.status != 0
 options << [_("Set in Progress"), 1] if @task.status == 0
 options << [_("Leave as in Progress"), 1] if @task.status == 1
 options << [_("Close"), 2] if @task.status == 0 || @task.status == 1
 options << [_("Leave Closed"), 2] if @task.status == 2
 options << [_("Set as Won't Fix"), 3] if @task.status == 0 || @task.status == 1
 options << [_("Leave as Won't Fix"), 3] if @task.status == 3
 options << [_("Set as Invalid"), 4] if @task.status == 0 || @task.status == 1
 options << [_("Leave as Invalid"), 4] if @task.status == 4
 options << [_("Set as Duplicate"), 5] if @task.status == 0 || @task.status == 1
 options << [_("Leave as Duplicate"), 5] if @task.status == 5

 can_close = {:disabled => "disabled"} unless session[:user].can?( @task.project, 'close' )
 can_close ||= {}
%>

<%= select 'task', 'status', options, {:selected => @task.status}, can_close %>
<%= check_box_tag 'notify', '1', (session[:user].send_notifications > 0) %><%=_ 'Send notification emails' %>

<%= end_form_tag %>

      <%= _ 'History' %>

    <%  day = 0
        for log in @logs
          if day != (tz.utc_to_local(log.started_at)).yday
             day = (tz.utc_to_local(log.started_at)).yday
           %>

                  <%= tz.utc_to_local(log.started_at).strftime("%A, %d %B %Y") %>

        <% end %>
        <%= render :partial => 'activities/log_row', :locals => {:log => log} %>
    <% end %>


edit_location was posting to create_location and failing.  My fault, Nathan, sorry.  -JPH

<%  if @title.nil?
        @title = 'Edit Location'
    end %>

<%= @title %>

<%= link_to(:location_all.l, :action => 'list_place_names') %>

<% form_for :location,
            :url => { :action => :edit_location } do |form| %>

    <%= submit_tag("Update") %>

    <%= render :partial => 'form_locations', :locals => {
        :where => @where, :form => form
        } %>
<% end %>

<%  if @title.nil?
        @title = 'Edit Location'
    end %>

<%= @title %>

<%= link_to(:location_all.l, :action => 'list_place_names') %>

<% form_for :location,
            :url => { :action => :create_location } do |form| %>

    <%= submit_tag("Update") %>

    <%= render :partial => 'form_locations', :locals => {
        :where => @where, :form => form
        } %>
<% end %>


Needed to register namings in observer/_show_namings.

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

<%
  javascript_include 'prototype'
  javascript_include 'element_extensions'
  javascript_include 'vote_popup'

  logged_in = !@user.nil? && !@user.verified.nil? && @user.verified
  consensus = @observation.consensus_naming
  any_names = @observation.namings && @observation.namings.length > 0
  popups = []
%>

<% form_tag(:action => 'show_observation', :id => @observation, :params => search_params) do %>

    <% if any_names %>
      <%= :show_namings_proposed_names.t %>:
    <% else %>
      <%= :show_namings_no_names_yet.t %>
    <% end %>
    <%= link_to(:show_namings_propose_new_name.t, :action => 'create_naming',
                :id => @observation, :params => search_params) %>
    <% if logged_in && any_names && can_do_ajax? %>
       <%= submit_tag(:show_namings_update_votes.l, :onclick => "set_changed(0)") %>
    <% end %>

  <% if any_names %>

      <% cols = logged_in ? 7 : 5 %>

          <%= :show_namings_proposed_name.t %>

          <%= :show_namings_user.t %>

          <%= :show_namings_consensus.t %>
            <% if logged_in %>

              <%= :show_namings_your_vote.t %>
            <% end %>

        <% for naming in @observation.namings.sort_by {|n| n.created} %>

                <%= link_to(sanitize(naming.format_name).t,
                            :controller => 'name', :action => 'show_name', :id => naming.name) %>

              <% if check_permission(naming.user_id) %>

                  (<%= link_to(:app_edit.t, :action => 'edit_naming', :id => naming) %>
                  | <%= link_to(:app_destroy.t, { :action => 'destroy_naming',
                                :id => naming.id }, :confirm => :app_are_you_sure.l) %>)

              <% end %>

              <%= user_link(naming.user, naming.user.login) %>

            <% txt = naming.vote_percent.round.to_s + "%"
            nvotes = naming.votes.length %>

              <% html = ""
              if nvotes == 0
                html += "(#{:show_namings_no_votes.t})"
              else
                html += can_do_ajax? ?
                  link_to_function(h(txt), "show_votes(#{naming.id})") :
                  link_to(h(txt), :action => 'show_votes', :id => naming.id)
                popups << naming
              end
              if nvotes != 0
                html += " (#{nvotes})"
              end %>
              <%= html %>

            <% if logged_in %>

                <% @vote = @votes[naming.id]
                menu = check_permission(naming.user_id) ? @confidence_menu : @agreement_menu
                # It *is* still possible for the owner not to have voted.  In which case I
                # need to explicitly add the "No Opinion" option to their menu.
                if check_permission(naming.user_id) && (!@vote || @vote.value == 0)
                  menu = menu.clone.unshift(@agreement_menu.first)
                end %>
                <%= select('vote', 'value', menu, {}, { :index => naming.id,
                           :onchange => "change_vote(#{naming.id})" }) %>
                <%= submit_tag(:show_namings_cast.l) if !can_do_ajax? %>

            <% end %>

            <%=
              (naming.is_owners_favorite? ? image_tag("eye.png") : "") +
              (naming == consensus ? image_tag("eyes.png") : "")
            %>

          <% String.register_name(naming.name)
          if naming.naming_reasons.length > 0 %>

              <td colspan="<%= cols %>">
                <% for reason in naming.naming_reasons %>
                  <% if reason.notes.nil? || reason.notes == "" %>
                    <%= reason.label.t %>
                  <% else %>
                    <%= sanitize(reason.label.l + ": " + reason.notes.to_s).tl %>
                  <% end %>

                <% end %>

          <% end %>
        <% end %>

      <% if !logged_in %>
        <%= :show_namings_please_login.t %>

      <% else %>
        <%= :show_namings_consensus_help.t %>
      <% end %>

          <%= image_tag("eye.png") %>

          <%= " = " + :show_namings_eye_help.t %>

          <%= image_tag("eyes.png") %>

          <%= " = " + :show_namings_eyes_help.t %>

  <% end %>
<% end %>

<% if can_do_ajax? %>
  <% @ajax = true %>
  <% for @naming in popups %>
    <div class="popup" id="show_votes_<%= @naming.id %>" style="display:none">

        <div class="popup_frame" id="show_votes_<%= @naming.id %>_frame">
          <%= render(:partial => 'show_votes', :locals => { :do_cancel => true }) %>

  <% end %>

  <%= javascript_tag %(
    var CHANGED = false;
    var POPUPS = { #{@observation.namings.map {|n|
      id = n.id.to_s
      "#{id}: $('show_votes_' + #{id})"
    }.join(", ")} };
    var VOTES = { #{@observation.namings.map {|n|
      id = n.id.to_s
      "#{id}: $('vote_' + #{id} + '_value')"
    }.join(", ")} };

    // Called when user leaves the page.
    window.onbeforeunload = function() {
      if (CHANGED)
        return "#{:show_namings_lose_changes.l.gsub("\n", ' ')}"
    }
  ) %>
<% end %>

<%
  javascript_include 'prototype'
  javascript_include 'element_extensions'
  javascript_include 'vote_popup'

  logged_in = !@user.nil? && !@user.verified.nil? && @user.verified
  consensus = @observation.consensus_naming
  any_names = @observation.namings && @observation.namings.length > 0
  popups = []
%>

<% form_tag(:action => 'show_observation', :id => @observation, :params => search_params) do %>

    <% if any_names %>
      <%= :show_namings_proposed_names.t %>:
    <% else %>
      <%= :show_namings_no_names_yet.t %>
    <% end %>
    <%= link_to(:show_namings_propose_new_name.t, :action => 'create_naming',
                :id => @observation, :params => search_params) %>
    <% if logged_in && any_names && can_do_ajax? %>
       <%= submit_tag(:show_namings_update_votes.l, :onclick => "set_changed(0)") %>
    <% end %>

  <% if any_names %>

      <% cols = logged_in ? 7 : 5 %>

          <%= :show_namings_proposed_name.t %>

          <%= :show_namings_user.t %>

          <%= :show_namings_consensus.t %>
            <% if logged_in %>

              <%= :show_namings_your_vote.t %>
            <% end %>

        <% for naming in @observation.namings.sort_by {|n| n.created} %>

                <%= link_to(sanitize(naming.format_name).t,
                            :controller => 'name', :action => 'show_name', :id => naming.name) %>

              <% if check_permission(naming.user_id) %>

                  (<%= link_to(:app_edit.t, :action => 'edit_naming', :id => naming) %>
                  | <%= link_to(:app_destroy.t, { :action => 'destroy_naming',
                                :id => naming.id }, :confirm => :app_are_you_sure.l) %>)

              <% end %>

              <%= user_link(naming.user, naming.user.login) %>

            <% txt = naming.vote_percent.round.to_s + "%"
            nvotes = naming.votes.length %>

              <% html = ""
              if nvotes == 0
                html += "(#{:show_namings_no_votes.t})"
              else
                html += can_do_ajax? ?
                  link_to_function(h(txt), "show_votes(#{naming.id})") :
                  link_to(h(txt), :action => 'show_votes', :id => naming.id)
                popups << naming
              end
              if nvotes != 0
                html += " (#{nvotes})"
              end %>
              <%= html %>

            <% if logged_in %>

                <% @vote = @votes[naming.id]
                menu = check_permission(naming.user_id) ? @confidence_menu : @agreement_menu
                # It *is* still possible for the owner not to have voted.  In which case I
                # need to explicitly add the "No Opinion" option to their menu.
                if check_permission(naming.user_id) && (!@vote || @vote.value == 0)
                  menu = menu.clone.unshift(@agreement_menu.first)
                end %>
                <%= select('vote', 'value', menu, {}, { :index => naming.id,
                           :onchange => "change_vote(#{naming.id})" }) %>
                <%= submit_tag(:show_namings_cast.l) if !can_do_ajax? %>

            <% end %>

            <%=
              (naming.is_owners_favorite? ? image_tag("eye.png") : "") +
              (naming == consensus ? image_tag("eyes.png") : "")
            %>

          <% if naming.naming_reasons.length > 0 %>

              <td colspan="<%= cols %>">
                <% for reason in naming.naming_reasons %>
                  <% if reason.notes.nil? || reason.notes == "" %>
                    <%= reason.label.t %>
                  <% else %>
                    <%= sanitize(reason.label.l + ": " + reason.notes.to_s).tl %>
                  <% end %>

                <% end %>

          <% end %>
        <% end %>

      <% if !logged_in %>
        <%= :show_namings_please_login.t %>

      <% else %>
        <%= :show_namings_consensus_help.t %>
      <% end %>

          <%= image_tag("eye.png") %>

          <%= " = " + :show_namings_eye_help.t %>

          <%= image_tag("eyes.png") %>

          <%= " = " + :show_namings_eyes_help.t %>

  <% end %>
<% end %>

<% if can_do_ajax? %>
  <% @ajax = true %>
  <% for @naming in popups %>
    <div class="popup" id="show_votes_<%= @naming.id %>" style="display:none">

        <div class="popup_frame" id="show_votes_<%= @naming.id %>_frame">
          <%= render(:partial => 'show_votes', :locals => { :do_cancel => true }) %>

  <% end %>

  <%= javascript_tag %(
    var CHANGED = false;
    var POPUPS = { #{@observation.namings.map {|n|
      id = n.id.to_s
      "#{id}: $('show_votes_' + #{id})"
    }.join(", ")} };
    var VOTES = { #{@observation.namings.map {|n|
      id = n.id.to_s
      "#{id}: $('vote_' + #{id} + '_value')"
    }.join(", ")} };

    // Called when user leaves the page.
    window.onbeforeunload = function() {
      if (CHANGED)
        return "#{:show_namings_lose_changes.l.gsub("\n", ' ')}"
    }
  ) %>
<% end %>


Stop border jerking.

Stop border jerking.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <%= javascript_include_tag :defaults %>
    <title><%= h(@page_title) %></title>

			<% if @page_title -%>
<%=h @page_title %>
<% end -%>
			  <% [:notice, :error].each do |message| %>
    		  <%if flash[message] %>
      		<div id="<%= message %>">
        			<%= h(flash[message]) if flash[message] %>

      		<% end %>
    		<% end %>
		<%= yield %>


Fix the Summary link in the admin menu

Fix the Summary link in the admin menu

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

      <meta http-equiv="content-type" content="text/html;charset=UTF-8" >
      <title>WhatDoTheyKnow admin<%= @title ? ":" : "" %> <%=@title%></title>
      <%= stylesheet_link_tag 'admin', :title => "Main", :rel => "stylesheet"  %>

    <%= link_to 'WhatDoTheyKnow', main_url('/') %> admin:
    Summary
    | Timeline
    | Stats
    | Debug
    | Wiki
    View:
    Authorities
    | Requests
    | Users
    | Tracks

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

    <% if flash[:error] %>

<%= flash[:error] %>

    <% end %>

    <% if flash[:notice] %>

<%= flash[:notice] %>

    <% end %>

    <%= yield  %>


fixed missing create page link on 'not found'

Sorry, page <%= h params[:_page]%> does not exist.

  <% if logged_in? and @group and current_user.member_of?(@group) %>

<%= link_to "create #{h params[:_page]}", {:controller => 'pages', :action => :create_wiki, :name => params[:_page], :group => @group.name }, :method=>:post %>

  <% end %>
  <% if request.env["HTTP_REFERER"] %>

<%= "return to previous page" % request.env["HTTP_REFERER"] %>

  <% end %>

Sorry, page <%= h params[:_page]%> does not exist.

  <% if @group and @user and @user.member_of?(@group) %>

<%= link_to "create #{h params[:_page]}", {:controller => 'pages', :action => :create_wiki, :name => params[:_page], :group => @group.name }, :method=>:post %>

  <% end %>

search for similar pages

  <% if request.env["HTTP_REFERER"] %>

<%= "return to previous page" % request.env["HTTP_REFERER"] %>

  <% end %>


git-svn-id: https://svn.csc.ncsu.edu:8443/svn/research-expertiza/trunk@208 392d7b7b-3f31-0410-9dc3-c95a9635ea79

Teams for <%= @assignment.name %>

<%
   column_definitions = Array.new
   column_definitions << {:name => 'Team Name',      :type => 'display',        :field => 'name'}
   column_definitions << {:name => 'Edit Name',      :action => 'edit',         :controller => 'team', :hidden => {:id => @assignment.id, :name => 'assignment_id'} }
   column_definitions << {:name => 'Modify Members', :action => 'list',         :controller => 'teams_users'}
   column_definitions << {:name => 'Delete Team',    :action => 'delete_team',  :controller => 'team', :hidden => {:id => @assignment.id, :name => 'assignment_id'} }
%>
<%= render :partial => 'shared_scripts/selectTable', :locals => {:column_definitions => column_definitions, :elements => @teams} %>

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

<%= link_to 'New Team', :action => 'new', :assignment_id=>params[:assignment_id] %>

Teams for <%= @assignment.name %>

<%
   column_definitions = Array.new
   column_definitions << {:name => 'Team Name',      :type => 'display',        :field => 'name'}
   column_definitions << {:name => 'Edit Name',      :action => 'edit',         :controller => 'team', :hidden => {:id => @assignment.id, :name => 'assignment_id'} }
   column_definitions << {:name => 'Modify Members', :action => 'list',         :controller => 'teams_users'}
   column_definitions << {:name => 'Delete Team',    :action => 'delete_team',  :controller => 'team', :hidden => {:id => @assignment.id, :name => 'assignment_id'} }
%>
<%= render :partial => 'shared_scripts/selectTable', :locals => {:column_definitions => column_definitions, :elements => @teams} %>

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

<%= link_to 'New Team', :action => 'new', :assignment_id=>params[:id] %>


added required css

added required css

<% @element = personalinformation %>

  <%= render :partial => 'profiles/personal_info_form' %>


don't ask why, but these extra newlines at the end of the template seem to help. At least they don't hurt.

<partial_html_sections>

  <%= render(:partial => "api_in_progress", :layout => false) %>

<% @partial_html_sections.each do |section| %>
  <html_section id="<%= section[:div_id] %>">
    <included_services>
       <% section[:service_type_values].each do |type_name| %>
         <service name="<%= type_name %>" />
       <% end %>
    </included_services>
    <service_load_complete value="<%= section[:complete?]  %>" />
    <response_count value="<%= section[:response_count] %>" />
    <html_content>
      <%=
          html = render(:partial => section[:partial].to_s )
          # xml-escape our html, so we can safely embed it in our xml
          # even if it's not valid xhtml, and in one XML 'string'.
          # We abuse REXML for it's XML-escaping powers.
          REXML::Text.new( html ).to_s
       %>
    </html_content>
  </html_section>
<% end %>
</partial_html_sections>


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

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => @article.class.to_s.pluralize, :property => @article.title} -%>

<%= link_to @article.title-%>

  <%= @article.body -%>

<%if @current_user-%><%= link_to 'Edit', :action => 'edit', :id => @article %> | <%end-%>
<%= link_to 'Articles list', :action => 'list' %>
<%end-%>

<%content_for("right") do-%>

<%if @recent_articles-%>

Recent articles

    <%for article in @recent_articles -%>

<%= link_to truncate(article.title,30), :id => article.id-%>

    <%end-%>

<%= link_to "Show all", :action => 'list'-%>
<%end-%>

Properties

Title: <%= @article.title-%>

Posted by: <%= @article.author.fullname-%>

Created on: <%= @article.created_at.strftime("%d %b, %Y")-%>

Published: <%= @article.published == true ? "Yes" : "No"-%>

Tags: <%= @article.tags-%>

<%end-%>

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => @article.class.to_s.pluralize, :property => @article.title} -%>

<%= link_to @article.title-%>

  <%= @article.body -%>

<%= link_to 'Edit', :action => 'edit', :id => @article %> |
<%= link_to 'Articles list', :action => 'list' %>
<%end-%>

<%content_for("right") do-%>

<%if @recent_articles-%>

Recent articles

    <%for article in @recent_articles -%>

<%= link_to truncate(article.title,30), :id => article.id-%>

    <%end-%>

<%= link_to "Show all", :action => 'list'-%>
<%end-%>

Properties

Title: <%= @article.title-%>

Posted by: <%= @article.author.fullname-%>

Created on: <%= @article.created_at.strftime("%d %b, %Y")-%>

Published: <%= @article.published == true ? "Yes" : "No"-%>

Tags: <%= @article.tags-%>

<%end-%>


trying to get uploads working

trying to get uploads working

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

<%= error_messages_for :files %>

<% form_for(:files, :url => files_path, :html => { :multipart => true }) do |f| -%>

    File:
    <%= f.file_field :uploaded_data %>

    <%= submit_tag 'Upload' %>

<% end -%>

<%= error_messages_for :files %>

<% form_for(:files, :url => { :controller => "files" }, :html => { :multipart => true }) do |f| -%>

    Upload A File:
    <%= f.file_field :uploaded_data %>

    <%= submit_tag 'Upload' %>

<% end -%>