bug in displaying the previous weight's date

 Weigh bats in <%= @cage.name %>

Bat
Today's Weight
Note
Previous Weight
Change
Change Per Day
<% for bat in @bats %>

	<%= link_to bat.band, :controller => 'bats', :action => 'weigh_bat', :id => bat, :redirectme => bat.cage %>

	<% if bat.weights.today %>
		<%=h bat.weights.today.weight %>
		<%=h bat.weights.today.note %>
	<% end %>

	<% if bat.weights.length >= 2 %>
		<% if bat.weights.today %>
			<%= bat.weights[1].weight %> (<%= nice_date(bat.weights[1].date) %>)
			<% percent_change = ((bat.weights.today.weight / bat.weights[1].weight - 1) * 100) %>
			<%= ("%0.2f" % percent_change).to_f %> %
			<%= ("%0.2f" % (percent_change / ((bat.weights.today.date - bat.weights[1].date) / 86400))).to_f %> %
		<% else %>

			<%= bat.weights[0].weight %> (<%= nice_date(bat.weights[0].date) %>)
		<% end %>
	<% end %>

	<% if bat.weights.today %>
		<% if bat.weights.today.weight < bat.species.lower_weight_limit %>
			<warning>Warning: below species lower weight limit (<%= bat.species.lower_weight_limit %>)</warning>
		<% elsif bat.weights.today.weight > bat.species.upper_weight_limit %>
			<warning>Warning: above species upper weight limit (<%= bat.species.upper_weight_limit %>)</warning>
		<% end %>
	<% end %>

<% end %>

<% if @bats.length == 0 %>
There are no bats in this cage.
<% end %>

<% if @updateable_tasks != nil %>

The following weighing tasks will be updated after all bats in cage have been weighed:

<%= render :partial => 'tasks/tasks_list', :locals =>{:tasks => @updateable_tasks, :div_id => 'weighing_tasks',
							:same_type_task_list => false, :manage => false, :sorted_by => 'repeat_code'} %>

<% else %>

No weighing tasks for this cage will be updated after all bats are weighed

<% end %>

<%= link_to 'Back', :controller => 'cages', :action => 'choose_cage_to_weigh' %>

 Weigh bats in <%= @cage.name %>

Bat
Today's Weight
Note
Previous Weight
Change
Change Per Day
<% for bat in @bats %>

	<%= link_to bat.band, :controller => 'bats', :action => 'weigh_bat', :id => bat, :redirectme => bat.cage %>

	<% if bat.weights.today %>
		<%=h bat.weights.today.weight %>
		<%=h bat.weights.today.note %>
	<% end %>

	<% if bat.weights.length >= 2 %>
		<% if bat.weights.today %>
			<%= bat.weights[1].weight %> (<%= nice_date(bat.weights[1].date) %>)
			<% percent_change = ((bat.weights.today.weight / bat.weights[1].weight - 1) * 100) %>
			<%= ("%0.2f" % percent_change).to_f %> %
			<%= ("%0.2f" % (percent_change / ((bat.weights.today.date - bat.weights[1].date) / 86400))).to_f %> %
		<% else %>

			<%= bat.weights[0].weight %> (<%= nice_date(bat.weights[1].date) %>)
		<% end %>
	<% end %>

	<% if bat.weights.today %>
		<% if bat.weights.today.weight < bat.species.lower_weight_limit %>
			<warning>Warning: below species lower weight limit (<%= bat.species.lower_weight_limit %>)</warning>
		<% elsif bat.weights.today.weight > bat.species.upper_weight_limit %>
			<warning>Warning: above species upper weight limit (<%= bat.species.upper_weight_limit %>)</warning>
		<% end %>
	<% end %>

<% end %>

<% if @bats.length == 0 %>
There are no bats in this cage.
<% end %>

<% if @updateable_tasks != nil %>

The following weighing tasks will be updated after all bats in cage have been weighed:

<%= render :partial => 'tasks/tasks_list', :locals =>{:tasks => @updateable_tasks, :div_id => 'weighing_tasks',
							:same_type_task_list => false, :manage => false, :sorted_by => 'repeat_code'} %>

<% else %>

No weighing tasks for this cage will be updated after all bats are weighed

<% end %>

<%= link_to 'Back', :controller => 'cages', :action => 'choose_cage_to_weigh' %>


typo

typo

git-svn-id: e70f47238a868777ecefe75ba01929cffb2d8127@329 d8b24053-1f83-4035-b5c3-ce8b92cd91ad

Bündel aus einer Paketliste erstellen

Hier kannst du ein Bündel aus einer vorhandenen Paketliste erstellen.
Die Liste muss in Form einter Textdatei vorliegen (plain text),
mit einem Paketnamen pro Zeile.

Die Liste der auf deinem Computer installierten Pakete kannst du zum Beispiel mit

dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}' > packages.list

herausfinden.

<%= form_tag({:controller => :cart, :id => :current_user.id, :action => :create_from_list}, :multipart => true)%>

Datei, die die Paketliste enthält, auswählen:

<%= file_field(:datei, :attachment) %>

<%= submit_tag('Erstellen') %>

</form>

Bündel aus einer Paketliste erstellen

Hier kannst du ein Bündel aus einer vorhandenen Paketliste erstellen.
Die Liste muss in Form einter Textdatei vorliegen (plain text),
mit einem Paketnamen pro Zeile.

Die Liste der auf deinem Computer installierten Pakete kannst du zum Beispiel mit

dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}' > packages.list

herausfinden.

<%= form_tag({:controller => :cart, :id => :current_user.id, :action => :create_from_list}, :multipart => true)%>

Datei, die die Paketliste enthält, auswählen:

<%= file_field(:datei, :attachment) %>

<%= submit_tag('Speichern') %>

</form>


List page was missing <ul> tags.

List page was missing <ul> tags.

Pages

  <% for page in @pages %>

      <a href="<%= @uri.page(page.name) %>"><%= page.name %>
      <a class="rename" href="<%= @uri.rename(page) %>">Rename
      <a class="delete" href="<%= @uri.delete(page) %>">Delete

  <% end %>

Uploads

  <% for upload in @uploads %>

      <a href="<%= @uri.upload(upload.name) %>"><%= upload.name %>
      <a class="rename" href="<%= @uri.rename(upload) %>">Rename
      <a class="delete" href="<%= @uri.delete(upload) %>">Delete

  <% end %>

    Upload a file

  <%= @partial.call :file_upload, { :complete_uri => @uri.list, :upload_uri => @uri.upload_file, :conf => @conf, :uri => @uri } %>


Encourage people not to file new request.

    <% if incoming_message.nil? %>

Send a follow up message
        to '<%=h @info_request.public_body.name %>'

    <% else %>

Send a follow up message
            <% if !incoming_message.safe_mail_from.nil? %>
                to <%= incoming_message.safe_mail_from %>
            <% end %>

    <% end %>

    <% if @info_request.stop_new_responses %>

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

    <% else %>

Use this to tell the public authority something, such as to clarify
        your request, or if they are late responding.

Please do not make new requests here.
        If you are asking for information which was not in your original request, then
        <%= link_to "file a new request", new_request_to_body_url(:public_body_id => @info_request.public_body.id.to_s) %>
        instead.

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

This request is currently overdue a response from <%=
            public_body_link(@info_request.public_body) %>.
            The response was due
            on <%= simple_date(@info_request.date_response_required_by) %>
            (<%= link_to "more info", about_url + "#quickly_response" %>). You can say
            that under the <%=h(@info_request.law_used_act)%> they should have replied by now.

        <% end %>

        <% form_for(:outgoing_message, @outgoing_message) do |o| %>

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

                Privacy warning: Your follow up message, and any response
                to it, will also be displayed publically on this website.

                <%= hidden_field_tag 'submitted_followup', 1 %>
                <%= submit_tag "Send public follow up message" %>

        <% end %>

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

    <% end %>

    <% if incoming_message.nil? %>

Send a follow up message
        to '<%=h @info_request.public_body.name %>'

    <% else %>

Send a follow up message
            <% if !incoming_message.safe_mail_from.nil? %>
                to <%= incoming_message.safe_mail_from %>
            <% end %>

    <% end %>

    <% if @info_request.stop_new_responses %>

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

    <% else %>

Use this to tell the public authority something, such as to clarify
        your request, or if they are late responding.

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

This request is currently overdue a response from <%=
            public_body_link(@info_request.public_body) %>.
            The response was due
            on <%= simple_date(@info_request.date_response_required_by) %>
            (<%= link_to "more info", about_url + "#quickly_response" %>). You can say
            that under the <%=h(@info_request.law_used_act)%> they should have replied by now.

        <% end %>

        <% form_for(:outgoing_message, @outgoing_message) do |o| %>

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

                Privacy warning: Your follow up message, and any response
                to it, will also be displayed publically on this website.

                <%= hidden_field_tag 'submitted_followup', 1 %>
                <%= submit_tag "Send public follow up message" %>

        <% end %>

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

    <% end %>


bump version number to 0.12

bump version number to 0.12

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <title><%= render :partial => "/sites/#{APP_CONFIG[:style]}/title" %><%=h ": " + @pagename if not @pagename.blank? %><%=h ": " + @content_for_pagename if not @content_for_pagename.blank? %></title>
  <%= stylesheet_link_tag 'common/common', APP_CONFIG[:style] %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag "ie_no_more.js" %>
  <%= active_scaffold_includes %>

  <%= yield :feed %>
  <link rel="shortcut icon" href="/images/<%= APP_CONFIG[:style] %>/favicon.ico" />
  <meta name="Keywords" content="carbon calculator, carbon footprint, climate change, global warming"/>
  <meta name="Description" content="Saving the planet, together! Calculate your daily carbon footprint, take action to reduce it, and share it with your friends!"/>
  <meta name="Author" content="James Smith"/>

<%= smack_down_ie6 %>

<% unless params[:controller] == "main" and params[:action] == "index" %>

  <% if @current_user.nil? %>
    <%= image_tag 'user.png' %>
    <%= link_to("Log In or Sign Up", { :controller => "/main", :action => "index" } ) %>
  <% else %>
    <%= image_tag @current_user.image %>
    <%= image_tag @current_user.flag %>
    <%= link_to h(@current_user.name), :controller => '/profile', :login => @current_user.login %>

    <%= link_to("Settings", { :controller => "/user", :action => "edit" } ) %>
    <%= link_to("Log Out", { :controller => "/user", :action => "logout" } ) %>
  <% end %>

<% end %>

<%= whitelabel_content 'header' %>

<%= render :partial => "/sites/#{APP_CONFIG[:style]}/linkbar" %>

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<% if @content_for_optionbar %>

  <%= yield :optionbar %>

<% end %>

<% unless (@pagename.nil? or @pagename.blank?) and @content_for_pagename.nil? %>

        <%= @content_for_pageicon unless @content_for_pageicon.nil? %>
        <%=h @content_for_pagename || @pagename %>

<% end %>
<%= yield %>

powered by The Carbon Diet: version 0.12

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <title><%= render :partial => "/sites/#{APP_CONFIG[:style]}/title" %><%=h ": " + @pagename if not @pagename.blank? %><%=h ": " + @content_for_pagename if not @content_for_pagename.blank? %></title>
  <%= stylesheet_link_tag 'common/common', APP_CONFIG[:style] %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag "ie_no_more.js" %>
  <%= active_scaffold_includes %>

  <%= yield :feed %>
  <link rel="shortcut icon" href="/images/<%= APP_CONFIG[:style] %>/favicon.ico" />
  <meta name="Keywords" content="carbon calculator, carbon footprint, climate change, global warming"/>
  <meta name="Description" content="Saving the planet, together! Calculate your daily carbon footprint, take action to reduce it, and share it with your friends!"/>
  <meta name="Author" content="James Smith"/>

<%= smack_down_ie6 %>

<% unless params[:controller] == "main" and params[:action] == "index" %>

  <% if @current_user.nil? %>
    <%= image_tag 'user.png' %>
    <%= link_to("Log In or Sign Up", { :controller => "/main", :action => "index" } ) %>
  <% else %>
    <%= image_tag @current_user.image %>
    <%= image_tag @current_user.flag %>
    <%= link_to h(@current_user.name), :controller => '/profile', :login => @current_user.login %>

    <%= link_to("Settings", { :controller => "/user", :action => "edit" } ) %>
    <%= link_to("Log Out", { :controller => "/user", :action => "logout" } ) %>
  <% end %>

<% end %>

<%= whitelabel_content 'header' %>

<%= render :partial => "/sites/#{APP_CONFIG[:style]}/linkbar" %>

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<% if @content_for_optionbar %>

  <%= yield :optionbar %>

<% end %>

<% unless (@pagename.nil? or @pagename.blank?) and @content_for_pagename.nil? %>

        <%= @content_for_pageicon unless @content_for_pageicon.nil? %>
        <%=h @content_for_pagename || @pagename %>

<% end %>
<%= yield %>

powered by The Carbon Diet: version 0.11


bump version number

bump version number

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <title><%= render :partial => "/sites/#{APP_CONFIG[:style]}/title" %><%=h ": " + @pagename if not @pagename.blank? %><%=h ": " + @content_for_pagename if not @content_for_pagename.blank? %></title>
  <%= stylesheet_link_tag 'common/common', APP_CONFIG[:style] %>
  <%= javascript_include_tag :defaults %>
  <%= active_scaffold_includes %>

  <%= yield :feed %>
  <link rel="shortcut icon" href="/images/<%= APP_CONFIG[:style] %>/favicon.ico" />
  <meta name="Keywords" content="carbon calculator, carbon footprint, climate change, global warming"/>
  <meta name="Description" content="Saving the planet, together! Calculate your daily carbon footprint, take action to reduce it, and share it with your friends!"/>
  <meta name="Author" content="James Smith"/>

<% unless params[:controller] == "main" and params[:action] == "index" %>

  <% if @current_user.nil? %>
    <%= image_tag 'user.png' %>
    <%= link_to("Log In or Sign Up", { :controller => "/main", :action => "index" } ) %>
  <% else %>
    <%= image_tag @current_user.image %>
    <%= image_tag @current_user.flag %>
    <%= link_to h(@current_user.name), :controller => '/profile', :login => @current_user.login %>

    <%= link_to("Settings", { :controller => "/user", :action => "edit" } ) %>
    <%= link_to("Log Out", { :controller => "/user", :action => "logout" } ) %>
  <% end %>

<% end %>

<%= whitelabel_content 'header' %>

<%= render :partial => "/sites/#{APP_CONFIG[:style]}/linkbar" %>

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<% if @content_for_optionbar %>

  <%= yield :optionbar %>

<% end %>

<% unless (@pagename.nil? or @pagename.blank?) and @content_for_pagename.nil? %>

        <%= @content_for_pageicon unless @content_for_pageicon.nil? %>
        <%=h @content_for_pagename || @pagename %>

<% end %>
<%= yield %>

powered by The Carbon Diet: version 0.11

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <title><%= render :partial => "/sites/#{APP_CONFIG[:style]}/title" %><%=h ": " + @pagename if not @pagename.blank? %><%=h ": " + @content_for_pagename if not @content_for_pagename.blank? %></title>
  <%= stylesheet_link_tag 'common/common', APP_CONFIG[:style] %>
  <%= javascript_include_tag :defaults %>
  <%= active_scaffold_includes %>

  <%= yield :feed %>
  <link rel="shortcut icon" href="/images/<%= APP_CONFIG[:style] %>/favicon.ico" />
  <meta name="Keywords" content="carbon calculator, carbon footprint, climate change, global warming"/>
  <meta name="Description" content="Saving the planet, together! Calculate your daily carbon footprint, take action to reduce it, and share it with your friends!"/>
  <meta name="Author" content="James Smith"/>

<% unless params[:controller] == "main" and params[:action] == "index" %>

  <% if @current_user.nil? %>
    <%= image_tag 'user.png' %>
    <%= link_to("Log In or Sign Up", { :controller => "/main", :action => "index" } ) %>
  <% else %>
    <%= image_tag @current_user.image %>
    <%= image_tag @current_user.flag %>
    <%= link_to h(@current_user.name), :controller => '/profile', :login => @current_user.login %>

    <%= link_to("Settings", { :controller => "/user", :action => "edit" } ) %>
    <%= link_to("Log Out", { :controller => "/user", :action => "logout" } ) %>
  <% end %>

<% end %>

<%= whitelabel_content 'header' %>

<%= render :partial => "/sites/#{APP_CONFIG[:style]}/linkbar" %>

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<% if @content_for_optionbar %>

  <%= yield :optionbar %>

<% end %>

<% unless (@pagename.nil? or @pagename.blank?) and @content_for_pagename.nil? %>

        <%= @content_for_pageicon unless @content_for_pageicon.nil? %>
        <%=h @content_for_pagename || @pagename %>

<% end %>
<%= yield %>

powered by The Carbon Diet: version 0.10.2


Added inactive message to website screen so admins know site is not active

<% if !DomainModel.active_domain[:active] -%>

<%= DomainModel.active_domain[:inactive_message] -%>

<% end -%>

<% tabled_form_for :user, @user, :html => { :class => 'admin_form' } do |f| -%>

	<%= f.text_field :username %>
	<%= f.password_field :password %>
	<%= f.submit_tag "Login" %>
<% end -%>


make "more in full menu" link super big!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% context_object = @user_request.referent.to_context_object -%>

<title><%= AppConfig.param('app_name', 'Find It') %> | <%= @user_request.referent.to_citation[:title] %></title>
 <%= stylesheet_link_tag 'basic'
 %>
 <%= render(:partial => 'shared/ensure_window_size') %>

    <%= resolver_link(nil, :target=>"_top", :params=>@user_request.original_co_params(:add_request_id => true).merge(:action => 'index', :'umlaut.skip_resolve_menu' => 'false')) %>

    <%= resolver_link(nil, :text => 'More in full menu', :target=>"_top", :params=>@user_request.original_co_params(:add_request_id => true).merge(:action => 'index', :'umlaut.skip_resolve_menu' => 'false')) %>

    <%= link_to "#{ image_tag("frame_remove.gif", :border=>0, :align=>'bottom') } Remove banner", {:controller=>'link_router', :id=>(@service_type_join.id if @service_type_join)}, 'target'=>'_top', 'class'=>'smallText' %>

  <% displayed_data = @service_type_join.view_data %>
  <% unless displayed_data[:authentication].blank? %>
        Authentication: <%= displayed_data[:authentication] %>
  <% end %>

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

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

  <% fulltxt = get_service_type('fulltext')
     title_level_fulltxt = get_service_type('fulltext_title_level')
     unless fulltxt.blank? && title_level_fulltxt.blank?
  %>

    <% if fulltxt.length + title_level_fulltxt.length > 1 %>

Other <%= ServiceTypeValue[:fulltext].display_name_pluralize.downcase%>:

    <% end %>

    <%
      fulltxt.each do | ft |
      target = ft.view_data
    %>
        <li class="fulltextlink <%= 'frameescaping' if known_frame_escaper?(ft) %>">
        <%  # Currently displayed one should not be a link, but should
            # be greyed-out instead.
            if ( ft == @service_type_join ) %>
            <%= target[:display_text] %>
        <% else %>
          <%= frameset_link_to(ft) %>
        <% end %>

    <% end
       unless title_level_request? || title_level_fulltxt.empty?
          genre = @user_request.referent.metadata['genre']
          genre = "Journal" if genre.downcase == 'article'
    %>

<%= genre.titlecase %>-level Page Only:

    <%
       end
       title_level_fulltxt.each do |ft|
       target = ft.view_data %>
        <li class="fulltextlink <%= 'frameescaping' if known_frame_escaper?(ft) %>">
        <%  # Currently displayed one should not be a link, but should
            # be greyed-out instead.
            if ( ft == @service_type_join ) %>
            <%= target[:display_text] %>
        <% else %>
          <%= frameset_link_to(ft) %>
        <% end %>

    <% end %>

  <% end %>

    ?Problem? Need help?
      <% help_responses.each do |help| %>
           <%= link_to help.view_data[:display_text], {:controller=>'link_router', :id=>help.id}, 'target'=>"_blank" %>
       <% end
     end
     %>


revert change user_menu

revert change user_menu

<%= link_to "Back", root_path %>

   <% if user_signed_in? %>

 Hi<%= link_to current_user.username, profile_path %>!

<% if can? :create, Proposal %>

<%=link_to 'Proposals', profile_proposals_path %>

<%=link_to 'Projects', profile_projects_path %>

<% end %>

<% if can? :create, Gallery %>

<%=link_to 'Galleries', profile_galleries_path %>

<% else %>

	<%= if current_user.change_role.empty?
			link_to 'Become a special member', new_profile_change_role_path
		else
			link_to 'Membership requested', profile_change_role_path(current_user.change_role)
		end %>
<% end %>

<%=link_to 'Edit info', edit_user_path(current_user) %>

<%= link_to "Sign out", destroy_user_session_path %>

   <% else %>

<%= link_to "Sign up", new_user_registration_path %> 	or

<%= link_to "Log in", new_user_session_path %>

   <% end %>

<%= link_to "Back", root_path %>

   <% if user_signed_in? %>

 Hi<%= link_to current_user.username, profile_path %>!

<% if can? :create, Proposal %>

<%=link_to 'Proposals', profile_proposals_path %>

<%=link_to 'Projects', profile_projects_path %>

<% end %>

<% if can? :create, Gallery %>

<%=link_to 'Galleries', profile_galleries_path %>

<% else %>

	<%= if current_user.change_role.empty?
			link_to 'Become a special member', new_profile_change_role_path
		else
			link_to 'Membership requested', profile_change_role_path(current_user.change_role.id)
		end %>
<% end %>

<%=link_to 'Edit info', edit_user_path(current_user) %>

<%= link_to "Sign out", destroy_user_session_path %>

   <% else %>

<%= link_to "Sign up", new_user_registration_path %> 	or

<%= link_to "Log in", new_user_session_path %>

   <% end %>


Fix link for importing themes so that it can be reached (instead of triggering security protection)

<% content_for :head do -%>
<%= javascript_include_tag 'mephisto/dialog' %>
<% end -%>

<% content_for :action_nav do -%>

<%= link_to "Import new theme", {:controller => 'themes', :action => 'import'}, :method => :post  %>

<% end -%>

<%= render :partial => "theme", :collection => site.themes %>

<% content_for :head do -%>
<%= javascript_include_tag 'mephisto/dialog' %>
<% end -%>

<% content_for :action_nav do -%>

<%= link_to "Import new theme", :controller => 'themes', :action => 'import' %>

<% end -%>

<%= render :partial => "theme", :collection => site.themes %>


Make button say it is public

Make button say it is public

<% @title = "Preview new FOI request to '" + h(@info_request.public_body.name) + "'" %>

<% form_for(:info_request, @info_request, :html => { :id => 'preview_form' }  ) do |f| %>

Now preview your request

    <%= f.hidden_field(:title) %>

    <% fields_for :outgoing_message do |o| %>

        To: <%=h @info_request.public_body.name %>

Subject: <%=h @info_request.title %>

        <%= @outgoing_message.get_body_for_html_preview %>
        <%= o.hidden_field(:body) %>

    <% end %>

    Note: Your request and any response will be
    displayed publically on this website.

    <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
    <%= hidden_field_tag(:submitted_new_request, 1) %>
    <%= hidden_field_tag(:preview, 0 ) %>
    <%= submit_tag "Re-edit this request", :name => 'reedit' %>
    <%= submit_tag "Send public Freedom of Information request", :name => 'submit' %>

<% end %>

<% @title = "Preview new FOI request to '" + h(@info_request.public_body.name) + "'" %>

<% form_for(:info_request, @info_request, :html => { :id => 'preview_form' }  ) do |f| %>

Now preview your request

    <%= f.hidden_field(:title) %>

    <% fields_for :outgoing_message do |o| %>

        To: <%=h @info_request.public_body.name %>

Subject: <%=h @info_request.title %>

        <%= @outgoing_message.get_body_for_html_preview %>
        <%= o.hidden_field(:body) %>

    <% end %>

    Note: Your request and any response will be
    displayed publically on this website.

    <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
    <%= hidden_field_tag(:submitted_new_request, 1) %>
    <%= hidden_field_tag(:preview, 0 ) %>
    <%= submit_tag "Re-edit this request", :name => 'reedit' %>
    <%= submit_tag "Send Freedom of Information request", :name => 'submit' %>

<% end %>


Add PayPal button to help out page

Add PayPal button to help out page

<% @title = "¿Cómo nos puedes ayudar?" %>

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

¿Cómo nos puedes ayudar?

Aportaciones económicas

tuderechoasaber.es ha arrancado gracias al apoyo económico de más de 150 personas que nos han dado un total de 6.138€ a través de la plataforma de crowdfunding Goteo. Pero aún nos queda mucho por hacer y necesitamos tu ayuda.

Toda pequeña contribución, incluso de 5€ o 10€, nos ayudará a realizar mejor las tareas de mantenimiento diario. Tu donación servirá para garantizar el buen funcionamiento de la web, ampliar nuestra red de contactos de instituciones y hacer llegar el mensaje de la necesidad de una administración abierta a mucha más gente.

Además:

Si donas más de 10 euros te mencionaremos en los agradecimientos. (Somos muy transparentes con nuestra financiación, publicando quién dona y cómo gastamos el dinero. Pero también respetamos tu privacidad. Si prefieres que tu nombre no aparezca, háznoslo saber.)

Si donas más de 400 euros aparecerás como <%= link_to _("patrocinador"), help_about_path(:anchor => 'supporters') %> en la web.

Puedes hacernos llegar tu donación de las siguientes maneras:

Preferiblemente, por transferencia bancaria a la siguiente cuenta (gestionada por Access Info Europe, ONG registrada en España):

          Banco: La Caixa, Paseo de la Habana 5, 28036 Madrid

          Número de cuenta: 2100 - 2133 - 99 - 0200291748

          Por favor, usa la referencia "DON-TDAS"

Si quieres, puedes hacerlo a través de PayPal a Access Info Europe, aunque de este modo se pierde un porcentaje en comisiones por el camino:

          <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
          <input type="hidden" name="cmd" value="_s-xclick">
          <input type="hidden" name="hosted_button_id" value="KATYF9NXGZRQA">
          <input type="image" src="https://www.paypalobjects.com/en_US/ES/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal button">

          </form>

Voluntarios

Puedes ayudarnos a traducir el contenido de la web y las solicitudes al catalán, al euskera y al gallego.

Ayúdanos a difundir este proyecto, con un post en tu web o en tu blog, por ejemplo o con Twitter recomendando @tuderechoasaber.

Si ves algún problema con la web, avísanos, aún estamos trabajando en ella.

Si quieres ayudarnos con el diseño y la programación de la web, o con la administración del servidor, eres más que bienvenido, escríbenos a contacto@tuderechoasaber.es.

Instituciones públicas

Si eres una institución pública, puedes ser entidad colaboradora. No puedes darnos dinero pero podemos colaborar para hacer que la web sea mejor y más colaborativa. Estas son las condiciones de colaboración.

    <%= render :partial => 'help/public_partners' %>

<% @title = "¿Cómo nos puedes ayudar?" %>

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

¿Cómo nos puedes ayudar?

Aportaciones económicas

tuderechoasaber.es ha arrancado gracias al apoyo económico de más de 150 personas que nos han dado un total de 6.138€ a través de la plataforma de crowdfunding Goteo. Pero aún nos queda mucho por hacer y necesitamos tu ayuda.

Toda pequeña contribución, incluso de 5€ o 10€, nos ayudará a realizar mejor las tareas de mantenimiento diario. Tu donación servirá para garantizar el buen funcionamiento de la web, ampliar nuestra red de contactos de instituciones y hacer llegar el mensaje de la necesidad de una administración abierta a mucha más gente.

Además:

Si donas más de 10 euros te mencionaremos en los agradecimientos. (Somos muy transparentes con nuestra financiación, publicando quién dona y cómo gastamos el dinero. Pero también respetamos tu privacidad. Si prefieres que tu nombre no aparezca, háznoslo saber.)

Si donas más de 400 euros aparecerás como <%= link_to _("patrocinador"), help_about_path(:anchor => 'supporters') %> en la web.

Puedes hacernos llegar tu donación de las siguientes maneras:

Preferiblemente, por transferencia bancaria a la siguiente cuenta (gestionada por Access Info Europe, ONG registrada en España):

          Banco: La Caixa, Paseo de la Habana 5, 28036 Madrid

          Número de cuenta: 2100 - 2133 - 99 - 0200291748

          Por favor, usa la referencia "DON-TDAS"

Si quieres, puedes hacerlo a través de PayPal a Access Info Europe, aunque de este modo se pierde un porcentaje en comisiones por el camino.

Voluntarios

Puedes ayudarnos a traducir el contenido de la web y las solicitudes al catalán, al euskera y al gallego.

Ayúdanos a difundir este proyecto, con un post en tu web o en tu blog, por ejemplo o con Twitter recomendando @tuderechoasaber.

Si ves algún problema con la web, avísanos, aún estamos trabajando en ella.

Si quieres ayudarnos con el diseño y la programación de la web, o con la administración del servidor, eres más que bienvenido, escríbenos a contacto@tuderechoasaber.es.

Instituciones públicas

Si eres una institución pública, puedes ser entidad colaboradora. No puedes darnos dinero pero podemos colaborar para hacer que la web sea mejor y más colaborativa. Estas son las condiciones de colaboración.

    <%= render :partial => 'help/public_partners' %>


Move admin link so clearly associated with the request, not the body or user

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

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

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

<% end %>

Track this request

     <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>

Act on what you've learnt

        <%= link_to '', "http://www.writetothem.com"%>
        <%= link_to 'Write to your politician', "http://www.writetothem.com"%>

        <%= link_to '', "http://www.pledgebank.com"%>
        <%= link_to 'Join others with a pledge', "http://www.pledgebank.com"%>

    <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>

Similar requests

        <% for result in @xapian_similar.results %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>
        <% if @xapian_similar_more %>

<%= link_to "More similar requests", request_similar_url(@info_request) %>

        <% end %>

     <% end %>

<%=@title%>

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

    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            Please answer the question above so we know whether the
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> useful information.
        <% else %>
            This request has an unknown status. We're waiting for
            <%= user_link(@info_request.user) %> to read
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
            and update the status.
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@info_request.public_body) %>,
        they <%= link_to "must respond", about_url + "#quickly_response" %>
        promptly but no later than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'waiting_response_overdue' %>
        Currently overdue a response from <%=
        public_body_link(@info_request.public_body) %>. By law,
        the response had to be
        <%= link_to "no later", about_url + "#quickly_response" %>
        than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was rejected by <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        The request was successful.
    <% elsif @status == 'partially_successful' %>
        The request was partially successful.
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> is waiting for your clarification.
            Please
            <%= link_to "send a follow up message", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#followup" %>.
        <% else %>
            The request is waiting for clarification.
            If you are
            <%= user_link(@info_request.user) %>, please
            <%= link_to "sign in", signin_url(:r => request.request_uri) %> to send a follow up message.
        <% end %>
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% else %>
        <% raise "unknown status " + @status %>
    <% end %>

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

    <% if @info_request.awaiting_description %>

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

    <% end %>

Things to do with this request

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

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

        <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %> (FOI
        officers only)

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

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

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

<% end %>

Track this request

     <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>

Act on what you've learnt

        <%= link_to '', "http://www.writetothem.com"%>
        <%= link_to 'Write to your politician', "http://www.writetothem.com"%>

        <%= link_to '', "http://www.pledgebank.com"%>
        <%= link_to 'Join others with a pledge', "http://www.pledgebank.com"%>

    <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>

Similar requests

        <% for result in @xapian_similar.results %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>
        <% if @xapian_similar_more %>

<%= link_to "More similar requests", request_similar_url(@info_request) %>

        <% end %>

     <% end %>

<%=@title%>

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

    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            Please answer the question above so we know whether the
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> useful information.
        <% else %>
            This request has an unknown status. We're waiting for
            <%= user_link(@info_request.user) %> to read
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
            and update the status.
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@info_request.public_body) %>,
        they <%= link_to "must respond", about_url + "#quickly_response" %>
        promptly but no later than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'waiting_response_overdue' %>
        Currently overdue a response from <%=
        public_body_link(@info_request.public_body) %>. By law,
        the response had to be
        <%= link_to "no later", about_url + "#quickly_response" %>
        than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was rejected by <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        The request was successful.
    <% elsif @status == 'partially_successful' %>
        The request was partially successful.
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> is waiting for your clarification.
            Please
            <%= link_to "send a follow up message", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#followup" %>.
        <% else %>
            The request is waiting for clarification.
            If you are
            <%= user_link(@info_request.user) %>, please
            <%= link_to "sign in", signin_url(:r => request.request_uri) %> to send a follow up message.
        <% end %>
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% else %>
        <% raise "unknown status " + @status %>
    <% end %>

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

    <% if @info_request.awaiting_description %>

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

    <% end %>

Things to do with this request

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

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

        <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %> (FOI
        officers only)


git-svn-id: e099d366fb13ea49c9e8e170ced890dab3ea84f7@671 aaa19a3b-e121-0410-9d45-962fd44e537e

<%= search_box(:ajax => true) %>

  <% (partial = form_tabs).each_index do |i| %><div id='<%= partial[i] %>_sel' <%= i == 0 ? "class='selected'" : "" %>><%= link_to_function(_(partial[i] + '_tab'), "select_tab('#{partial[i]}');") %>
<% end %>

<% partial.each_index do |i| %><div id='<%= partial[i] %>_tab' <%= i == 0 ? "" : "style='display:none;'" %>>
  <%= render :partial=>"/templates/drive_tabs/#{partial[i]}" %>

<% end %>

<%#= css_edit %>
<%= javascript_start %>
var current_tab = $('<%= partial[0] %>_tab');
var current_sel = $('<%= partial[0] %>_sel');
function select_tab(name) {
  var obj_tab = $(name+'_tab');
  var obj_sel = $(name+'_sel');
  current_tab.style.display = 'none';
  current_sel.className = '';
  current_tab = obj_tab;
  current_sel = obj_sel;
  current_tab.style.display = '';
  current_sel.className = 'selected';
}
new Form.Observer('node_form', 3, function(element,value){ opener.Zena.editor_preview(element,value)});
<%= javascript_end %>

<%= search_box %>

  <% (partial = form_tabs).each_index do |i| %><div id='<%= partial[i] %>_sel' <%= i == 0 ? "class='selected'" : "" %>><%= link_to_function(_(partial[i] + '_tab'), "select_tab('#{partial[i]}');") %>
<% end %>

<% partial.each_index do |i| %><div id='<%= partial[i] %>_tab' <%= i == 0 ? "" : "style='display:none;'" %>>
  <%= render :partial=>"/templates/drive_tabs/#{partial[i]}" %>

<% end %>

<%#= css_edit %>
<%= javascript_start %>
var current_tab = $('<%= partial[0] %>_tab');
var current_sel = $('<%= partial[0] %>_sel');
function select_tab(name) {
  var obj_tab = $(name+'_tab');
  var obj_sel = $(name+'_sel');
  current_tab.style.display = 'none';
  current_sel.className = '';
  current_tab = obj_tab;
  current_sel = obj_sel;
  current_tab.style.display = '';
  current_sel.className = 'selected';
}
new Form.Observer('node_form', 3, function(element,value){ opener.Zena.editor_preview(element,value)});
<%= javascript_end %>


cleaning up an error in the breadcrumbs.

git-svn-id: 035394e0ea20290a56a73539b1ebfcd8236adefd@401 7bd17f4f-1217-0410-bbc5-bc4367116c30

<% content_for('bread_crumbs') do -%>
  <% if( @category.bread_crumbs.size > 0 ) -%>
    <%=	@category.bread_crumbs.map{|x| "<li>#{link_to(x.name, :controller=>'category',:action=>'show',:id=>x.id)} </li>"} -%>
  <% end -%>
  <%= "<li>#{link_to(@category.name, :controller=>'category',:action=>'show',:id=>@category.id)} </li>"%>
  <%= "<li>#{link_to("#{params[:action]}: #{@article.title}")} </li>"%>
<% end -%>

<% content_for('application_header') do -%>
  <h1><%=h @article.title %> </h1>
<% end %>
<%= render :partial=>'article', :locals=>{:article=>@article} %>

<% content_for('bread_crumbs') do -%>
  <% if( @category.bread_crumbs.size > 0 ) -%>
    <%=	@category.bread_crumbs.map{|x| "<li>#{link_to(x.name, :controller=>'category',:action=>'show',:id=>x.id)} </li>"} -%>
  <% end -%>
  <%= "<li>#{link_to(@category.name)} </li>"%>
  <%= "<li>#{link_to("#{params[:action]}: #{@article.title}")} </li>"%>
<% end -%>

<% content_for('application_header') do -%>
  <h1><%=h @article.title %> </h1>
<% end %>
<%= render :partial=>'article', :locals=>{:article=>@article} %>


Get rid of browser autofill on chat input field. fixes #943

<%
remote_url = {:controller => 'chat', :action => 'say', :id => @channel}

loading_command = %(
  msg = '
' + time_and_name + '' + $('entryfield').value + '
';
  $('entryfield').value = '';
  $('entryfield').focus;
  new Insertion.Bottom('stage', msg);
  $('conversation').scrollTop = $('conversation').scrollHeight + $('conversation').clientHeight; )

complete = "eval(request.responseText)"
%>

<% content_for :style do %>
  @import url(/stylesheets/chat.css);
<% end %>

  <%= render :partial => 'chat/userlist' %>

    <% for message in @messages -%>
    <%= message_content(message) %>
    <% end -%>

<%= javascript_tag scroll_conversation_script %>
<%= javascript_tag set_time_and_name_script %>

<% form_remote_tag(:url => remote_url, :loading => loading_command, :complete => complete) do %>

  <%= current_user.login %>

    <% default_text = "Type your messages here and press enter..."[:type_your_messages_here] -%>
    <input id="entryfield" type="text" name="message" autocomplete="off" value="<%=default_text%>"
      onclick="if ($('entryfield').value == '<%=default_text%>') {$('entryfield').clear();}"
      />
    <input type="submit" value="Say" style="display: none;" />

<% end -%>

<%= # poll server every wait_time seconds for new messages
wait_time = 3
periodically_call_remote :url => { :controller => 'chat',
                                   :action => 'poll_channel_for_updates',
                                   :id => @channel},
                         :frequency => wait_time,
                         :complete => "eval(request.responseText)"
#                         :update => 'userlist'
%>

<%= # update server if user has been typing
wait_time = 6
observe_field(:entryfield,
              :frequency => wait_time,
              :url => { :controller => 'chat',
                        :action => 'user_is_typing',
                        :id => @channel })
%>

<%
remote_url = {:controller => 'chat', :action => 'say', :id => @channel}

loading_command = %(
  msg = '
' + time_and_name + '' + $('entryfield').value + '
';
  $('entryfield').value = '';
  $('entryfield').focus;
  new Insertion.Bottom('stage', msg);
  $('conversation').scrollTop = $('conversation').scrollHeight + $('conversation').clientHeight; )

complete = "eval(request.responseText)"
%>

<% content_for :style do %>
  @import url(/stylesheets/chat.css);
<% end %>

  <%= render :partial => 'chat/userlist' %>

    <% for message in @messages -%>
    <%= message_content(message) %>
    <% end -%>

<%= javascript_tag scroll_conversation_script %>
<%= javascript_tag set_time_and_name_script %>

<% form_remote_tag(:url => remote_url, :loading => loading_command, :complete => complete) do %>

  <%= current_user.login %>

    <% default_text = "Type your messages here and press enter..."[:type_your_messages_here] -%>
    <input id="entryfield" type="text" name="message" value="<%=default_text%>"
      onclick="if ($('entryfield').value == '<%=default_text%>') {$('entryfield').clear();}"
      />
    <input type="submit" value="Say" style="display: none;" />

<% end -%>

<%= # poll server every wait_time seconds for new messages
wait_time = 3
periodically_call_remote :url => { :controller => 'chat',
                                   :action => 'poll_channel_for_updates',
                                   :id => @channel},
                         :frequency => wait_time,
                         :complete => "eval(request.responseText)"
#                         :update => 'userlist'
%>

<%= # update server if user has been typing
wait_time = 6
observe_field(:entryfield,
              :frequency => wait_time,
              :url => { :controller => 'chat',
                        :action => 'user_is_typing',
                        :id => @channel })
%>


Load all JS files loaded by application-ng layout in chat

(ActionItem2122)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= html_language %>" lang="<%= html_language %>">

    <title><%= h page_title %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= javascript_include_tag 'prototype', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '/designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', :cache => 'cache-chat' %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>

<%= _("%s - Friends online (%d)") % [h(page_title), 0] %>

        <%= image_tag "#{theme_path}/images/thin-logo.png", :title => environment.name, :alt => environment.name %>

<%= user_status_menu('icon-menu-offline', _('Offline')) %>

    <%= yield %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= html_language %>" lang="<%= html_language %>">

    <title><%= h page_title %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= javascript_include_tag 'prototype', 'jquery-latest', 'jquery.noconflict', 'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '/designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'application', 'chat', :cache => 'cache-chat' %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>

<%= _("%s - Friends online (%d)") % [h(page_title), 0] %>

        <%= image_tag "#{theme_path}/images/thin-logo.png", :title => environment.name, :alt => environment.name %>

<%= user_status_menu('icon-menu-offline', _('Offline')) %>

    <%= yield %>


Link to new search help page.

Link to new search help page.

      Search Results
      Close

<% content_for "optionals" do %>

    Search
    <% form_remote_tag(:update => :search_results_content,
                       :loading => "openSearchResults()",
                       :url => { :controller => :geocoder, :action => :search }) do %>
      <%= text_field_tag :query, params[:query] %>
    <% end %>

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

<% end %>


Remove accidental quotes

Remove accidental quotes

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

<% form_tag(form_action, :id => article_form, :enctype => "multipart/form-data") do %>

  <%= render :partial => "form" %>

  <%= save("Save this article") %> or <%= cancel %>

<% end %>

<%= observe_form "article_form",
      :frequency => 2,
      :with => 'value',
      :complete => "$('preview').src = request.responseText; Element.show('preview');",
      :url => { :action => "preview" } %>

<% form_tag(form_action, :id => "article_form", :enctype => "multipart/form-data") do %>

  <%= render :partial => "form" %>

  <%= save("Save this article") %> or <%= cancel %>

<% end %>

<%= observe_form "article_form",
      :frequency => 2,
      :with => 'value',
      :complete => "$('preview').src = request.responseText; Element.show('preview');",
      :url => { :action => "preview" } %>


ActionItem501: fixed misslinked back button in enviroment design

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

<%= _('Organizing visual design')%>

<% button_bar do %>
  <%= lightbox_button('add', _('Add a block'), { :action => 'add_block' }) %>
  <%= button(:back, _('Back to control panel'), :controller => 'environment_design') %>
<% end %>

<%= _('Organizing visual design')%>

<% button_bar do %>
  <%= lightbox_button('add', _('Add a block'), { :action => 'add_block' }) %>
  <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
<% end %>


Fix for missing blog feed

Fix for missing blog feed

<!DOCTYPE html>

		<meta charset="utf-8">
		<link rel="alternate" type="application/rss+xml" title="EMRL Work Timeline Feed" href="https://projects.emrl.com/feeds/rss/da222717fb7b4dfc61f3ed49e3f62f4d">
		<link href="https://fonts.googleapis.com/css?family=Roboto:400,400italic,700,700italic,300,300italic' rel='stylesheet" rel="stylesheet">
		<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
		<link rel="alternate" type="application/rss+xml" title="RSS" href="https://projects.emrl.com/feeds/rss/da222717fb7b4dfc61f3ed49e3f62f4d" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="apple-touch-icon" sizes="57x57" href="/assets/img/apple-touch-icon-57x57.png">
		<link rel="apple-touch-icon" sizes="60x60" href="/assets/img/apple-touch-icon-60x60.png">
		<link rel="apple-touch-icon" sizes="72x72" href="/assets/img/apple-touch-icon-72x72.png">
		<link rel="apple-touch-icon" sizes="76x76" href="/assets/img/apple-touch-icon-76x76.png">
		<link rel="apple-touch-icon" sizes="114x114" href="/assets/img/apple-touch-icon-114x114.png">
		<link rel="apple-touch-icon" sizes="120x120" href="/assets/img/apple-touch-icon-120x120.png">
		<link rel="apple-touch-icon" sizes="144x144" href="/assets/img/apple-touch-icon-144x144.png">
		<link rel="apple-touch-icon" sizes="152x152" href="/assets/img/apple-touch-icon-152x152.png">
		<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/apple-touch-icon-180x180.png">
		<link rel="icon" type="image/png" href="/assets/img/favicon-16x16.png" sizes="16x16">
		<link rel="icon" type="image/png" href="/assets/img/favicon-32x32.png" sizes="32x32">
		<link rel="icon" type="image/png" href="/assets/img/favicon-96x96.png" sizes="96x96">
		<link rel="icon" type="image/png" href="/assets/img/android-chrome-192x192.png" sizes="192x192">
		<meta name="msapplication-square70x70logo" content="/assets/img/smalltile.png" />
		<meta name="msapplication-square150x150logo" content="/assets/img/mediumtile.png" />
		<meta name="msapplication-wide310x150logo" content="/assets/img/widetile.png" />
		<meta name="msapplication-square310x310logo" content="/assets/img/largetile.png" />

		<%= javascript_include_merged :base %>
		<%= yield :tinymce %>
		<%= javascript_include_merged :tt %>
		<%= javascript_include_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
		<%= javascript_include_tag "swfobject" %>
		<%= javascript_include_tag "builder" if ['activities'].include? controller.controller_name %>
		<% if ['activities'].include? controller.controller_name %>
		<%= javascript_include_tag "portal" %>

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

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

		<%= stylesheet_link_merged :tt %>
		<%= stylesheet_link_tag "widget" if ['activities'].include? controller.controller_name %>
		<%= stylesheet_link_tag "forum" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
		<%= stylesheet_link_tag "wiki" if ['wiki'].include? controller.controller_name %>
		<%= stylesheet_link_tag "quickadd" if ['tasks', 'schedule'].include? controller.controller_name %>
		<%= stylesheet_link_tag "print", { :media => "print" } %>

		<title>
			<%= controller.controller_name + " / " + controller.action_name %>
		</title>

		<% @internal = Customer.find(:first, :conditions => ["company_id = ? AND (name = 'Internal' or name = ?)", current_user.company_id, current_user.company.name ]) %>

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

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

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

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

										[<%= tz.utc_to_local(news.created_at).strftime("#{current_user.time_format} #{current_user.date_format}") %>]

										<%= news.body %>

									<%= link_to_remote "#{_('')}", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id }, :success => visual_effect(:fade, "news", :duration => 0.5) %>

					<% end %>

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

					  				<%= flash['notice'] %>

										<%= @content_for_layout %>

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

														<%= h(current_user.name) %>

														<%= "#{online_users} #{_('Online')}" %>

															<%= "" %>

														<% if total_today > 0 %>

														<%=_ 'You have worked'%> <%= distance_of_time_in_words(total_today.minutes) %>
														<%=_ 'today.'%>
														<% end %>

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

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

																	<form method="post" onsubmit="return false;" id="worklog_form">
																		<textarea name="worklog[body]" id="worklog_body" style="resize: vertical; font-size: 11px; margin: 0px; border:none; width:97%;" rows="7" placeholder="Text entered here will be saved automatically to your current task."><%= @current_sheet.body if @current_sheet%></textarea>
																	</form>

											<% if current_user.option_tracktime.to_i == 1 %>

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

														<%=_ 'Task Views' %>

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

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

													<% project_ids = current_project_ids %><% client_ids = current_projects.collect(&:customer_id).uniq.join(',')
														client_ids = "0" if client_ids.nil? || client_ids.empty?
														views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
														for view in views %>

													<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>
													<%= link_to _(''), :controller => 'views', :action => 'edit', :id => view if(view.user_id == current_user.id || current_user.admin?)%>

											<% end %>

												<td align="left" class="page_header_side tooltip" width="100%" colspan="2" title="<%= _'Quickly access recently edited Wikis'%>">

														<%=_ 'Recent Wikis'%>

											<% wikis = WikiPage.find(:all, :limit => 6, :order => "updated_at DESC") %>
											<% wiki_i = 0 %>
											<% for wiki in wikis %>

												<td class="views_item" style="white-space:nowrap;<%= "padding-top:0.2em;" if (wiki_i == 0) %>">

														<%= wiki.to_url_truncate(28) %>

												<td<%= " style=\"color: padding-top:0.2em\"" if (wiki_i == 0) %>>
													  <%= wiki.updated_at.strftime("%m/%d") %>

											<% wiki_i += 1 %>
											<% end %>

											<% end %>

												<td align="left" class="page_header_side tooltip" width="100%" colspan="2" title="<%= _'EMRL Blog'%>">

														<%=_ 'Agency Journal'%>

						<% if current_user.company.show_messaging %>

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

									  		<% end %>
								  		<% end %>

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

												<% all_users.each do |u| %>
													<% if u.id != current_user.id %>
														<% if u.online? %>

																<img src="<%= u.avatar_url(32) %>" class="photo tooltip" style="border-radius:50%" class="tooltip" title="<%= u.name %> <%= _('Active %s ago', (u.idle? ? time_ago_in_words(u.last_seen_at) : time_ago_in_words(u.last_ping_at) ) ) %>">

					  									<% elsif u.idle? %>
															<img src="<%= u.avatar_url(32) %>" class="photo desaturate tooltip" style="border-radius:50%;opacity:0.3;filter:alpha(opacity=30)" title="<%= u.name %> <%= _('Active %s ago', (u.idle? ? time_ago_in_words(u.last_seen_at) : time_ago_in_words(u.last_ping_at) ) ) %>">
					  									<% end %>
													<% end %>
			  									<% end %>

	  							<% end %>

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

								<%#= query_review_output %>

<!DOCTYPE html>

		<meta charset="utf-8">
		<link rel="alternate" type="application/rss+xml" title="EMRL Work Timeline Feed" href="https://projects.emrl.com/feeds/rss/da222717fb7b4dfc61f3ed49e3f62f4d">
		<link href="https://fonts.googleapis.com/css?family=Roboto:400,400italic,700,700italic,300,300italic' rel='stylesheet" rel="stylesheet">
		<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
		<link rel="alternate" type="application/rss+xml" title="RSS" href="https://projects.emrl.com/feeds/rss/da222717fb7b4dfc61f3ed49e3f62f4d" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="apple-touch-icon" sizes="57x57" href="/assets/img/apple-touch-icon-57x57.png">
		<link rel="apple-touch-icon" sizes="60x60" href="/assets/img/apple-touch-icon-60x60.png">
		<link rel="apple-touch-icon" sizes="72x72" href="/assets/img/apple-touch-icon-72x72.png">
		<link rel="apple-touch-icon" sizes="76x76" href="/assets/img/apple-touch-icon-76x76.png">
		<link rel="apple-touch-icon" sizes="114x114" href="/assets/img/apple-touch-icon-114x114.png">
		<link rel="apple-touch-icon" sizes="120x120" href="/assets/img/apple-touch-icon-120x120.png">
		<link rel="apple-touch-icon" sizes="144x144" href="/assets/img/apple-touch-icon-144x144.png">
		<link rel="apple-touch-icon" sizes="152x152" href="/assets/img/apple-touch-icon-152x152.png">
		<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/apple-touch-icon-180x180.png">
		<link rel="icon" type="image/png" href="/assets/img/favicon-16x16.png" sizes="16x16">
		<link rel="icon" type="image/png" href="/assets/img/favicon-32x32.png" sizes="32x32">
		<link rel="icon" type="image/png" href="/assets/img/favicon-96x96.png" sizes="96x96">
		<link rel="icon" type="image/png" href="/assets/img/android-chrome-192x192.png" sizes="192x192">
		<meta name="msapplication-square70x70logo" content="/assets/img/smalltile.png" />
		<meta name="msapplication-square150x150logo" content="/assets/img/mediumtile.png" />
		<meta name="msapplication-wide310x150logo" content="/assets/img/widetile.png" />
		<meta name="msapplication-square310x310logo" content="/assets/img/largetile.png" />

		<%= javascript_include_merged :base %>
		<%= yield :tinymce %>
		<%= javascript_include_merged :tt %>
		<%= javascript_include_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
		<%= javascript_include_tag "swfobject" %>
		<%= javascript_include_tag "builder" if ['activities'].include? controller.controller_name %>
		<% if ['activities'].include? controller.controller_name %>
		<%= javascript_include_tag "portal" %>

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

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

		<%= stylesheet_link_merged :tt %>
		<%= stylesheet_link_tag "widget" if ['activities'].include? controller.controller_name %>
		<%= stylesheet_link_tag "forum" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
		<%= stylesheet_link_tag "wiki" if ['wiki'].include? controller.controller_name %>
		<%= stylesheet_link_tag "quickadd" if ['tasks', 'schedule'].include? controller.controller_name %>
		<%= stylesheet_link_tag "print", { :media => "print" } %>

		<title>
			<%= controller.controller_name + " / " + controller.action_name %>
		</title>

		<% @internal = Customer.find(:first, :conditions => ["company_id = ? AND (name = 'Internal' or name = ?)", current_user.company_id, current_user.company.name ]) %>

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

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

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

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

										[<%= tz.utc_to_local(news.created_at).strftime("#{current_user.time_format} #{current_user.date_format}") %>]

										<%= news.body %>

									<%= link_to_remote "#{_('')}", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id }, :success => visual_effect(:fade, "news", :duration => 0.5) %>

					<% end %>

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

					  				<%= flash['notice'] %>

										<%= @content_for_layout %>

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

														<%= h(current_user.name) %>

														<%= "#{online_users} #{_('Online')}" %>

															<%= "" %>

														<% if total_today > 0 %>

														<%=_ 'You have worked'%> <%= distance_of_time_in_words(total_today.minutes) %>
														<%=_ 'today.'%>
														<% end %>

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

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

																	<form method="post" onsubmit="return false;" id="worklog_form">
																		<textarea name="worklog[body]" id="worklog_body" style="resize: vertical; font-size: 11px; margin: 0px; border:none; width:97%;" rows="7" placeholder="Text entered here will be saved automatically to your current task."><%= @current_sheet.body if @current_sheet%></textarea>
																	</form>

											<% if current_user.option_tracktime.to_i == 1 %>

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

														<%=_ 'Task Views' %>

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

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

													<% project_ids = current_project_ids %><% client_ids = current_projects.collect(&:customer_id).uniq.join(',')
														client_ids = "0" if client_ids.nil? || client_ids.empty?
														views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
														for view in views %>

													<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>
													<%= link_to _(''), :controller => 'views', :action => 'edit', :id => view if(view.user_id == current_user.id || current_user.admin?)%>

											<% end %>

												<td align="left" class="page_header_side tooltip" width="100%" colspan="2" title="<%= _'Quickly access recently edited Wikis'%>">

														<%=_ 'Recent Wikis'%>

											<% wikis = WikiPage.find(:all, :limit => 6, :order => "updated_at DESC") %>
											<% wiki_i = 0 %>
											<% for wiki in wikis %>

												<td class="views_item" style="white-space:nowrap;<%= "padding-top:0.2em;" if (wiki_i == 0) %>">

														<%= wiki.to_url_truncate(28) %>

												<td<%= " style=\"color: padding-top:0.2em\"" if (wiki_i == 0) %>>
													  <%= wiki.updated_at.strftime("%m/%d") %>

											<% wiki_i += 1 %>
											<% end %>

											<% end %>

												<td align="left" class="page_header_side tooltip" width="100%" colspan="2" title="<%= _'EMRL Blog'%>">

														<%=_ 'Blog'%>

						<% if current_user.company.show_messaging %>

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

									  		<% end %>
								  		<% end %>

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

												<% all_users.each do |u| %>
													<% if u.id != current_user.id %>
														<% if u.online? %>

																<img src="<%= u.avatar_url(32) %>" class="photo tooltip" style="border-radius:50%" class="tooltip" title="<%= u.name %> <%= _('Active %s ago', (u.idle? ? time_ago_in_words(u.last_seen_at) : time_ago_in_words(u.last_ping_at) ) ) %>">

					  									<% elsif u.idle? %>
															<img src="<%= u.avatar_url(32) %>" class="photo desaturate tooltip" style="border-radius:50%;opacity:0.3;filter:alpha(opacity=30)" title="<%= u.name %> <%= _('Active %s ago', (u.idle? ? time_ago_in_words(u.last_seen_at) : time_ago_in_words(u.last_ping_at) ) ) %>">
					  									<% end %>
													<% end %>
			  									<% end %>

	  							<% end %>

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

								<%#= query_review_output %>


Removed proxy error/hosting notice

Removed proxy error/hosting notice

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

  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <%= auto_discovery_link_tag(:rss, {:controller => 'observer', :action  =>  'rss'}, {:title => :app_rss.l}) %>
  <title><%= :app_title.l %>: <%= if @title.nil? then controller.action_name else @title.strip_html end %></title>
  <%= "<link rel=\"SHORTCUT ICON\" href=\"#{DOMAIN}/images/favicon.ico\" />"%>

  <%= check_if_user_turned_javascript_on %>

  <%=
    css = nil
    if @user and @user.id == 0
      css = 'Admin'
    elsif is_robot?
      css = 'Agaricus'
    else
      if CSS.member?(controller.action_name)
        css = controller.action_name
      else
        unless @user.nil?
          css = @user.theme
        end
      end
      unless CSS.member?(css)
        css = CSS[rand(CSS.length)]
      end
    end
    stylesheet_link_tag 'general', css
  %>

  <%= sort_javascript_includes.map {|m| javascript_include_tag(m)} %>

  <% if @header %>
    <%= @header %>
  <% end %>

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

      DANGER: You are in administrator mode. Proceed with caution.

  <% end %>

                <%= link_to(@page_title || :app_banner.t, :controller => 'observer', :action => 'index') %>

                <%= link_to(:app_intro.t, :controller => 'observer', :action => 'intro') %>

                <%= link_to(:app_how_to_use.t, :controller => 'observer', :action => 'how_to_use') %>

                <%= link_to(:app_how_to_help.t, :controller => 'observer', :action => 'how_to_help') %>

                <%= link_to(:app_send_a_comment.t, :controller => 'observer', :action => 'ask_webmaster_question') %>

                <%= link_to(:app_index_a_z.t, :controller => 'name', :action => 'observation_index') %>

                <%= link_to(:app_list_projects.t, :controller => 'project', :action => 'list_projects') %>

                <%= :app_latest.t %>:

                  <%= link_to(:app_latest_changes.t, :controller => 'observer', :action => 'list_rss_logs') %>

                  <%= link_to(:app_newest_images.t, :controller => 'image', :action => 'list_images') %>

                  <%= link_to(:app_comments.t, :controller => 'comment', :action => 'list_comments') %>

                  <%= link_to(:app_news.t, :controller => 'observer', :action => 'news') %>

                <%= :app_observations_left.t %>:

                  <%= link_to(:app_create_observation.t, :controller => 'observer', :action => 'create_observation') %>

                  <%= link_to(:app_sort_by_date_obs.t, :controller => 'observer', :action => 'list_observations') %>

                <%= :app_species_list.t %>:

                  <%= link_to(:app_create_list.t, :controller => 'species_list', :action => 'name_lister') %>

                  <%= link_to(:app_sort_by_date_spl.t, :controller => 'species_list', :action => 'list_species_lists') %>

                  <%= link_to(:app_sort_by_title.t, :controller => 'species_list', :action => 'species_lists_by_title') %>

                <% if @user.nil? %>
                  <%= :app_account.t %>:

                    <%= link_to(:app_login.t, :controller => 'account', :action => 'login') %>

                    <%= link_to(:app_create_account.t, :controller => 'account', :action => 'signup') %>
                <% else %>
                  <%= :app_current_user.t %>:

                    <%= h(@user.login) %>

                    <%= link_to(:app_comments_for_you.t, :controller => 'comment', :action => 'show_comments_for_user', :id => @user.id) %>

                    <%= link_to(:app_your_observations.t, :controller => 'observer', :action => 'show_user_observations', :id => @user.id) %>

                    <%= link_to(:app_your_summary.t, :controller => 'observer', :action => 'show_user', :id => @user.id) %>

                    <%= link_to(:app_preferences.t, :controller => 'account', :action => 'prefs') %>

                    <%= :app_join_mailing_list.t%>

                    <%= link_to(:app_logout.t, :controller => 'account', :action => 'logout_user') %>
                  <% if @user.id == 0 %>

                    <%= :app_admin.t %>:

                      <%= link_to(:app_users.t, :controller => 'observer', :action => 'users_by_name') %>

                      <%= link_to(:app_email_all_users.t, :controller => 'observer', :action => 'email_features') %>

                      <%= link_to(:app_add_to_group.t, :controller => 'account', :action => 'add_user_to_group') %>

                  <% end %>
                <% end %>

                <%= :app_languages.t %>:

                <% for locale in all_locales %>
                    <%= link_to(locale.sub('-','_').to_sym.t, h(reload_with_args(:user_locale => locale))) %>

                <% end %>

                <%= link_to(:app_contributors.t, :controller => 'observer', :action => 'users_by_contribution') %>

                <%= link_to(:app_site_stats.t, :controller => 'observer', :action => 'show_site_stats') %>

                <%= link_to(:translators_note_title.t, :controller => 'observer', :action => 'translators_note') %>

                  <%= link_to(:app_colors_from.t(:theme => css), :controller => 'observer', :action => 'color_themes') %>

                  <%= :app_powered_by.t %>:

                  Ruby on Rails

                  <%= :app_preferred_browser.t %>:

                  FireFox
                  <% if @invalid.nil? %>

                  <% end %>

            <% pattern = session[:pattern]
            form_tag(:controller => 'observer', :action => 'pattern_search') do %>
              <%= :app_find.t %>: <%= text_field("search", "pattern", :size => 30, :value => pattern)%>
              <%= submit_tag :app_observations_find.l %>
              <%= submit_tag :app_images_find.l %>
              <%= submit_tag :app_names_find.l %>
              <%= submit_tag :app_locations_find.l %>
              <%= link_to(:app_advanced_search.l, :controller => 'observer', :action => 'advanced_search') %>
              <% if @start %>
                Start: <%= Time.now.to_f - @start.to_f %>
                <% @start = nil %>
              <% end %>
            <% end %>

            <% if flash[:notice] %>
              <%= boxify(flash[:notice_level]) %>
                <%= flash[:notice] %>
              <%= end_boxify %>
              <% flash_clear %>
            <% end %>

            <% no_session = !session_working?
            no_javascript = !javascript_enabled? && session[:js_override] != :off
            no_ajax       = can_do_ajax? == false && javascript_enabled? && session[:js_override] != :on
            no_browser    = can_do_ajax? == nil   && javascript_enabled? && session[:js_override] != :on
            if no_session || no_javascript || no_ajax || no_browser
              new_tab_set do
                add_tab(:app_no_session.t,    :controller => 'observer', :action => 'no_session')    if no_session
                add_tab(:app_no_javascript.t, :controller => 'observer', :action => 'no_javascript') if no_javascript
                add_tab(:app_no_ajax.t,       :controller => 'observer', :action => 'no_ajax')       if no_ajax
                add_tab(:app_no_browser.t,    :controller => 'observer', :action => 'no_browser')    if no_browser
              end
            end
            if @tab_sets %>

                <% for set in @tab_sets %>
                  <%= set.map {|tab| render_tab(*tab)}.join(' | ') %>

                <% end %>

            <% end %>

<%= @title %>

            <%= @content_for_layout %>

            <% if Locale.code.to_s != 'en-US' %>

                <%= :app_translators_credit.tpl %>

            <% end %>

  <% if @javascripts && @javascripts.include?('cached_auto_complete') %>

      <%= image_tag('indicator.gif') %>

  <% end %>

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

  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <%= auto_discovery_link_tag(:rss, {:controller => 'observer', :action  =>  'rss'}, {:title => :app_rss.l}) %>
  <title><%= :app_title.l %>: <%= if @title.nil? then controller.action_name else @title.strip_html end %></title>
  <%= "<link rel=\"SHORTCUT ICON\" href=\"#{DOMAIN}/images/favicon.ico\" />"%>

  <%= check_if_user_turned_javascript_on %>

  <%=
    css = nil
    if @user and @user.id == 0
      css = 'Admin'
    elsif is_robot?
      css = 'Agaricus'
    else
      if CSS.member?(controller.action_name)
        css = controller.action_name
      else
        unless @user.nil?
          css = @user.theme
        end
      end
      unless CSS.member?(css)
        css = CSS[rand(CSS.length)]
      end
    end
    stylesheet_link_tag 'general', css
  %>

  <%= sort_javascript_includes.map {|m| javascript_include_tag(m)} %>

  <% if @header %>
    <%= @header %>
  <% end %>

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

      DANGER: You are in administrator mode. Proceed with caution.

  <% end %>

    We have been experiencing an increased number of Proxy Errors recently.

    We are working on moving the website to a new hosting service.

    Thanks for your patience during this transition.

                <%= link_to(@page_title || :app_banner.t, :controller => 'observer', :action => 'index') %>

                <%= link_to(:app_intro.t, :controller => 'observer', :action => 'intro') %>

                <%= link_to(:app_how_to_use.t, :controller => 'observer', :action => 'how_to_use') %>

                <%= link_to(:app_how_to_help.t, :controller => 'observer', :action => 'how_to_help') %>

                <%= link_to(:app_send_a_comment.t, :controller => 'observer', :action => 'ask_webmaster_question') %>

                <%= link_to(:app_index_a_z.t, :controller => 'name', :action => 'observation_index') %>

                <%= link_to(:app_list_projects.t, :controller => 'project', :action => 'list_projects') %>

                <%= :app_latest.t %>:

                  <%= link_to(:app_latest_changes.t, :controller => 'observer', :action => 'list_rss_logs') %>

                  <%= link_to(:app_newest_images.t, :controller => 'image', :action => 'list_images') %>

                  <%= link_to(:app_comments.t, :controller => 'comment', :action => 'list_comments') %>

                  <%= link_to(:app_news.t, :controller => 'observer', :action => 'news') %>

                <%= :app_observations_left.t %>:

                  <%= link_to(:app_create_observation.t, :controller => 'observer', :action => 'create_observation') %>

                  <%= link_to(:app_sort_by_date_obs.t, :controller => 'observer', :action => 'list_observations') %>

                <%= :app_species_list.t %>:

                  <%= link_to(:app_create_list.t, :controller => 'species_list', :action => 'name_lister') %>

                  <%= link_to(:app_sort_by_date_spl.t, :controller => 'species_list', :action => 'list_species_lists') %>

                  <%= link_to(:app_sort_by_title.t, :controller => 'species_list', :action => 'species_lists_by_title') %>

                <% if @user.nil? %>
                  <%= :app_account.t %>:

                    <%= link_to(:app_login.t, :controller => 'account', :action => 'login') %>

                    <%= link_to(:app_create_account.t, :controller => 'account', :action => 'signup') %>
                <% else %>
                  <%= :app_current_user.t %>:

                    <%= h(@user.login) %>

                    <%= link_to(:app_comments_for_you.t, :controller => 'comment', :action => 'show_comments_for_user', :id => @user.id) %>

                    <%= link_to(:app_your_observations.t, :controller => 'observer', :action => 'show_user_observations', :id => @user.id) %>

                    <%= link_to(:app_your_summary.t, :controller => 'observer', :action => 'show_user', :id => @user.id) %>

                    <%= link_to(:app_preferences.t, :controller => 'account', :action => 'prefs') %>

                    <%= :app_join_mailing_list.t%>

                    <%= link_to(:app_logout.t, :controller => 'account', :action => 'logout_user') %>
                  <% if @user.id == 0 %>

                    <%= :app_admin.t %>:

                      <%= link_to(:app_users.t, :controller => 'observer', :action => 'users_by_name') %>

                      <%= link_to(:app_email_all_users.t, :controller => 'observer', :action => 'email_features') %>

                      <%= link_to(:app_add_to_group.t, :controller => 'account', :action => 'add_user_to_group') %>

                  <% end %>
                <% end %>

                <%= :app_languages.t %>:

                <% for locale in all_locales %>
                    <%= link_to(locale.sub('-','_').to_sym.t, h(reload_with_args(:user_locale => locale))) %>

                <% end %>

                <%= link_to(:app_contributors.t, :controller => 'observer', :action => 'users_by_contribution') %>

                <%= link_to(:app_site_stats.t, :controller => 'observer', :action => 'show_site_stats') %>

                <%= link_to(:translators_note_title.t, :controller => 'observer', :action => 'translators_note') %>

                  <%= link_to(:app_colors_from.t(:theme => css), :controller => 'observer', :action => 'color_themes') %>

                  <%= :app_powered_by.t %>:

                  Ruby on Rails

                  <%= :app_preferred_browser.t %>:

                  FireFox
                  <% if @invalid.nil? %>

                  <% end %>

            <% pattern = session[:pattern]
            form_tag(:controller => 'observer', :action => 'pattern_search') do %>
              <%= :app_find.t %>: <%= text_field("search", "pattern", :size => 30, :value => pattern)%>
              <%= submit_tag :app_observations_find.l %>
              <%= submit_tag :app_images_find.l %>
              <%= submit_tag :app_names_find.l %>
              <%= submit_tag :app_locations_find.l %>
              <%= link_to(:app_advanced_search.l, :controller => 'observer', :action => 'advanced_search') %>
              <% if @start %>
                Start: <%= Time.now.to_f - @start.to_f %>
                <% @start = nil %>
              <% end %>
            <% end %>

            <% if flash[:notice] %>
              <%= boxify(flash[:notice_level]) %>
                <%= flash[:notice] %>
              <%= end_boxify %>
              <% flash_clear %>
            <% end %>

            <% no_session = !session_working?
            no_javascript = !javascript_enabled? && session[:js_override] != :off
            no_ajax       = can_do_ajax? == false && javascript_enabled? && session[:js_override] != :on
            no_browser    = can_do_ajax? == nil   && javascript_enabled? && session[:js_override] != :on
            if no_session || no_javascript || no_ajax || no_browser
              new_tab_set do
                add_tab(:app_no_session.t,    :controller => 'observer', :action => 'no_session')    if no_session
                add_tab(:app_no_javascript.t, :controller => 'observer', :action => 'no_javascript') if no_javascript
                add_tab(:app_no_ajax.t,       :controller => 'observer', :action => 'no_ajax')       if no_ajax
                add_tab(:app_no_browser.t,    :controller => 'observer', :action => 'no_browser')    if no_browser
              end
            end
            if @tab_sets %>

                <% for set in @tab_sets %>
                  <%= set.map {|tab| render_tab(*tab)}.join(' | ') %>

                <% end %>

            <% end %>

<%= @title %>

            <%= @content_for_layout %>

            <% if Locale.code.to_s != 'en-US' %>

                <%= :app_translators_credit.tpl %>

            <% end %>

  <% if @javascripts && @javascripts.include?('cached_auto_complete') %>

      <%= image_tag('indicator.gif') %>

  <% end %>


Added meta tag.

Added meta tag.

git-svn-id: d766b2a131eb5d649bacb6a45bc0bcd899bdfdb3@100 c938ebee-df10-0410-95fc-be8c4b0ebdd5

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript; charset=utf-8" />
<meta name="author" content="Nay" />
<meta http-equiv="content-style-type" content="text/css" />


display error when comment save fails

display error when comment save fails

git-svn-id: 6ed4032d55824b87387cea7ca50eb066630d6e73@48 c93d8143-eb44-0410-8798-7b17b0fd9f9b

<div id="post-<%= @post.id %>" class="post">

      <a href="<%= @post.url %>" rel="bookmark"
          title="Permalink for this article">
        <%= h(@post.title) %>

      <%= @post.created_at(Riposte::Config::TIMESTAMP_LONG) %>

    <%= @post.body_rendered %>

    <% unless @post.tags.empty? %>

          <% @post.tags.each do |tag| %>

              <a href="<%= tag.url %>" rel="tag"><%= h(tag.name) %>

          <% end %>

    <% end %>

      Post a comment

Comments

  <% @post.comments.all.each do |comment| %>
      <div id="comment-<%= comment.id %>" class="comment">

            <a href="<%= comment.url %>" rel="bookmark"
                title="Permalink for this comment"><%= h(comment.title) %>

          <%= comment.body_rendered %>

            <%= comment.created_at(Riposte::Config::TIMESTAMP_LONG) %>

            Posted by
            <% if comment.author_url.empty? %>
              <%= h(comment.author) %>
            <% else %>
              <a href="<%= h(comment.author_url) %>" rel="nofollow">
                <%= h(comment.author) %>

            <% end %>

  <% end %>

<form id="post-comment" class="robots-nocontent" method="post"
    action="<%= R(CommentController, :new, @post.id) %>#post-comment">

  <% if @preview && @preview.valid? %>
    <fieldset>

            <a href="<%= @post.url %>" rel="bookmark"
                title="Permalink for this comment"><%= h(@preview.title) %>

          <%= @preview.body_rendered %>

            <%= Time.now.strftime(Riposte::Config::TIMESTAMP_LONG) %>

            Posted by
            <% if @preview.author_url.empty? %>
              <%= h(@preview.author) %>
            <% else %>
              <a href="<%= h(@preview.author_url) %>" rel="nofollow">
                <%= h(@preview.author) %>

            <% end %>

    </fieldset>
  <% end %>

  <fieldset>
    <legend>Post a comment</legend>

      Name
      <input type="text" name="author" id="author" maxlength="32"
          title="Enter your name"
          value="<%= h(@author) %>" />

    <% if @preview; @preview.errors.on(:author).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      URL
      <input type="text" name="author_url" id="author_url" maxlength="255"
          title="Enter the URL of your website (optional)"
          value="<%= h(@author_url) %>" />

    <% if @preview; @preview.errors.on(:author_url).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      Title
      <input type="text" class="long" name="title" id="title" maxlength="255"
          title="Enter a title for this comment"
          value="<%= @preview && @preview.title ? h(@preview.title) : '' %>" />

    <% if @preview; @preview.errors.on(:title).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      <textarea name="body" rows="6" cols="60"><%= @preview && @preview.body ? h(@preview.body) : '' %></textarea>

    <% if @preview; @preview.errors.on(:body).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      Basic XHTML (including links) is allowed, just don't try anything fishy.
      Your comment will be auto-formatted unless you use your own
      <p> tags for formatting.

      Don't type anything here unless you're an evil robot:

      <input type="text" id="captcha" name="captcha" maxlength="50" />

      And especially don't type anything here:

      <textarea name="comment" rows="6" cols="60"></textarea>

    <% if @comment_error %>

<%= h(@comment_error) %>

    <% end %>

      <input type="submit" name="action" value="Preview Comment" />
      <input type="submit" name="action" value="Post Comment" />

  </fieldset>
</form>

<div id="post-<%= @post.id %>" class="post">

      <a href="<%= @post.url %>" rel="bookmark"
          title="Permalink for this article">
        <%= h(@post.title) %>

      <%= @post.created_at(Riposte::Config::TIMESTAMP_LONG) %>

    <%= @post.body_rendered %>

    <% unless @post.tags.empty? %>

          <% @post.tags.each do |tag| %>

              <a href="<%= tag.url %>" rel="tag"><%= h(tag.name) %>

          <% end %>

    <% end %>

      Post a comment

Comments

  <% @post.comments.all.each do |comment| %>
      <div id="comment-<%= comment.id %>" class="comment">

            <a href="<%= comment.url %>" rel="bookmark"
                title="Permalink for this comment"><%= h(comment.title) %>

          <%= comment.body_rendered %>

            <%= comment.created_at(Riposte::Config::TIMESTAMP_LONG) %>

            Posted by
            <% if comment.author_url.empty? %>
              <%= h(comment.author) %>
            <% else %>
              <a href="<%= h(comment.author_url) %>" rel="nofollow">
                <%= h(comment.author) %>

            <% end %>

  <% end %>

<form id="post-comment" class="robots-nocontent" method="post"
    action="<%= R(CommentController, :new, @post.id) %>#post-comment">

  <% if @preview && @preview.valid? %>
    <fieldset>

            <a href="<%= @post.url %>" rel="bookmark"
                title="Permalink for this comment"><%= h(@preview.title) %>

          <%= @preview.body_rendered %>

            <%= Time.now.strftime(Riposte::Config::TIMESTAMP_LONG) %>

            Posted by
            <% if @preview.author_url.empty? %>
              <%= h(@preview.author) %>
            <% else %>
              <a href="<%= h(@preview.author_url) %>" rel="nofollow">
                <%= h(@preview.author) %>

            <% end %>

    </fieldset>
  <% end %>

  <fieldset>
    <legend>Post a comment</legend>

      Name
      <input type="text" name="author" id="author" maxlength="32"
          title="Enter your name"
          value="<%= h(@author) %>" />

    <% if @preview; @preview.errors.on(:author).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      URL
      <input type="text" name="author_url" id="author_url" maxlength="255"
          title="Enter the URL of your website (optional)"
          value="<%= h(@author_url) %>" />

    <% if @preview; @preview.errors.on(:author_url).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      Title
      <input type="text" class="long" name="title" id="title" maxlength="255"
          title="Enter a title for this comment"
          value="<%= @preview && @preview.title ? h(@preview.title) : '' %>" />

    <% if @preview; @preview.errors.on(:title).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      <textarea name="body" rows="6" cols="60"><%= @preview && @preview.body ? h(@preview.body) : '' %></textarea>

    <% if @preview; @preview.errors.on(:body).each do |error| %>

        <%= h(error) %>

    <% end; end %>

      Basic XHTML (including links) is allowed, just don't try anything fishy.
      Your comment will be auto-formatted unless you use your own
      <p> tags for formatting.

      Don't type anything here unless you're an evil robot:

      <input type="text" id="captcha" name="captcha" maxlength="50" />

      And especially don't type anything here:

      <textarea name="comment" rows="6" cols="60"></textarea>

      <input type="submit" name="action" value="Preview Comment" />
      <input type="submit" name="action" value="Post Comment" />

  </fieldset>
</form>


Show all requests as it makes more sense when we don't many successful requests. Yet.

        <li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("Make a request"), select_authority_url, :id => 'make-request-link' %>

        <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("View requests"), request_list_all_url %>

        <li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default %>

        <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_url %>

        <li class="<%= 'selected' if params[:controller] == 'help' %>"><%= link_to _("Help"), help_about_url %>

        <li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("Make a request"), select_authority_url, :id => 'make-request-link' %>

        <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("View requests"), request_list_successful_url %>

        <li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default %>

        <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_url %>

        <li class="<%= 'selected' if params[:controller] == 'help' %>"><%= link_to _("Help"), help_about_url %>