more spacing tweaking

more spacing tweaking

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

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

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

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

<%= target[:collection_str] %>

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

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

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

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

<%= target[:notes] %>

  <% end %>

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

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

<%= s %>

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

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

          <% end %>

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

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

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

            <% end   %>

          <% end %>

  <% end %>
<%
end %>

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

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

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

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

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

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

    <%}%>

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

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

<% end %>


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

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority

you'd like information from OR anything to search for

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

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

    <% end %>

    <% if @popular_bodies.size > 0 %>

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>

            <% end%>

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

    <% end %>

    <% if @successful_requests.size > 0 %>

            <% for request in @successful_requests %>

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

            <% end %>

More successful requests...

    <% end %>

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority

you'd like information from OR anything to search for

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

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

    <% end %>

        <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>

        <% end%>

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

        <% for request in @successful_requests %>

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

        <% end %>

More successful requests...


ActionItem221: fixing malformed url for new articles

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

<% if @article %>

    <%= icon('cms') %>
    <%= link_to profile.identifier, :action => 'index' %>
    <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.name, :id => item.id)) } %>

<% else %>

    <%= icon('cms') %>
    <%= _('Content management') %>

  <% button_bar(:style => 'margin-bottom: 1em;') do %>
    <%= lightbox_button('new', _('New article'), :action => 'new') %>
  <% end %>

<% end %>

<%# subitem %>
<% if !@subitems.empty? && @article %>
  <%= toggle_panel(_('Hide subitems'), _('Show subitems'), 'article-subitems') %>
<% end %>

<%= @article ? _('Subitems') : _('Articles') %>

    <% unless @subitems.empty? %>

        <% @subitems.each do |item| %>

          <%= file_manager_button(item.name, icon_for_article(item), :action => 'view', :id => item.id) %>

        <% end %>

    <% end %>

    <% if @article %>
      <% button_bar(:class => 'file-manager-controls') do %>
        <% if @article.allow_children? %>
          <%= lightbox_button('new',  _('New subitem'), :action => 'new', :parent_id => @article.id) %>
        <% end %>
        <%= button('up', _('Go up one level'), :action => (@article.parent ? 'view' : 'index'), :id => @article.parent) %>
      <% end %>
    <% end %>

<%# display the article content %>

  <% if @article %>

      <%= @article.name %>
      <%= image_tag(icon_for_article(@article)) %>

    <% button_bar(:id => 'article-controls') do %>

        <%= _('"%{article}", last changed by %{author}') % { :article => @article.name, :author => (@article.last_changed_by ? @article.last_changed_by.name : _('Unknown User')) } %>

        <%= _('Public address of this article: %s') % link_to(url_for(@article.url), @article.url) %>

        <%= _('Tags:') %> <%= @article.tag_list %>

        <%= _('Categories:') %> <%= @article.categories.map { |item| item.name }.join(', ') %>

      <%= button('edit', _('Edit'), { :action => 'edit', :id => @article}) %>
      <%= button('home', _('Use as homepage'), { :action => 'set_home_page', :id => @article }, { :method => :post  }) %>
      <%= button('delete', _('Delete'), { :action => 'destroy', :id => @article }, :method => :post, :confirm => _('Are you sure you wan to remove this article?')) %>
    <% end %>
    <%= @article.to_html %>
  <% end %>

<% if @article %>

    <%= icon('cms') %>
    <%= link_to profile.identifier, :action => 'index' %>
    <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.name, :id => item.id)) } %>

<% else %>

    <%= icon('cms') %>
    <%= _('Content management') %>

  <% button_bar(:style => 'margin-bottom: 1em;') do %>
    <%= lightbox_button('new', _('New article'), :action => 'new') %>
  <% end %>

<% end %>

<%# subitem %>
<% if !@subitems.empty? && @article %>
  <%= toggle_panel(_('Hide subitems'), _('Show subitems'), 'article-subitems') %>
<% end %>

<%= @article ? _('Subitems') : _('Articles') %>

    <% unless @subitems.empty? %>

        <% @subitems.each do |item| %>

          <%= file_manager_button(item.name, icon_for_article(item), :action => 'view', :id => item.id) %>

        <% end %>

    <% end %>

    <% if @article %>
      <% button_bar(:class => 'file-manager-controls') do %>
        <% if @article.allow_children? %>
          <%= lightbox_button('new',  _('New subitem'), :action => 'new', :parent_id => @article.id) %>
        <% end %>
        <%= button('up', _('Go up one level'), :action => (@article.parent ? 'view' : 'index'), :id => @article.parent) %>
      <% end %>
    <% end %>

<%# display the article content %>

  <% if @article %>

      <%= @article.name %>
      <%= image_tag(icon_for_article(@article)) %>

    <% button_bar(:id => 'article-controls') do %>

        <%= _('"%{article}", last changed by %{author}') % { :article => @article.name, :author => (@article.last_changed_by ? @article.last_changed_by.name : _('Unknown User')) } %>

        <%= _('Public address of this article: %s') % link_to(@article.url, @article.url) %>

        <%= _('Tags:') %> <%= @article.tag_list %>

        <%= _('Categories:') %> <%= @article.categories.map { |item| item.name }.join(', ') %>

      <%= button('edit', _('Edit'), { :action => 'edit', :id => @article}) %>
      <%= button('home', _('Use as homepage'), { :action => 'set_home_page', :id => @article }, { :method => :post  }) %>
      <%= button('delete', _('Delete'), { :action => 'destroy', :id => @article }, :method => :post, :confirm => _('Are you sure you wan to remove this article?')) %>
    <% end %>
    <%= @article.to_html %>
  <% end %>


was using eticket for conf number in edit form

<%
editors ||= 'all_editors'
include_parse_by_line ||= false
%>

  <%= render :partial => 'travel_segments/form', :locals => { :editors => editors, :include_parse_by_line => include_parse_by_line } %>
  notes (attached to the assignment of this cost item to this profile):

    <%= text_area_tag "profile_travel_segment[notes]", @pts.notes %>

  eticket:
    <%= text_field_tag "profile_travel_segment[eticket]", @pts.eticket %>

  confirmation number:
    <%= text_field_tag "profile_travel_segment[confirmation_number]", @pts.confirmation_number %>

<%
editors ||= 'all_editors'
include_parse_by_line ||= false
%>

  <%= render :partial => 'travel_segments/form', :locals => { :editors => editors, :include_parse_by_line => include_parse_by_line } %>
  notes (attached to the assignment of this cost item to this profile):

    <%= text_area_tag "profile_travel_segment[notes]", @pts.notes %>

  eticket:
    <%= text_field_tag "profile_travel_segment[eticket]", @pts.eticket %>

  confirmation number:
    <%= text_field_tag "profile_travel_segment[confirmation_number]", @pts.eticket %>


Oops, I forgot this template change for themes to work

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

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

<tbody class="before_header" id="<%= before_header_id -%>">

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

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

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

<tbody class="before_header" id="<%= before_header_id -%>">

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


Re-enabled editing Taxonomic classification below the genus level.

<%= render(:partial => 'shared/form_description',
           :locals => { :form => form }) %>

<%= :DESCRIPTION.t %>:

<%= render(:partial => 'shared/textilize_help') %>

<% rank = rank_as_lower_string(@description.parent.rank) %>
<% for f in NameDescription.all_note_fields %>

    <label for="description_<%= f %>"><%= :"form_names_#{f}".t %>:
    <%= :"form_names_#{f}_help".l(:rank => rank) %>

    <%= form.text_area(f, :cols => 80) %>

<% end %>

<%= render(:partial => 'shared/form_description',
           :locals => { :form => form }) %>

<%= :DESCRIPTION.t %>:

<%= render(:partial => 'shared/textilize_help') %>

<% rank = rank_as_lower_string(@description.parent.rank) %>
<% for f in NameDescription.all_note_fields %>
  <% if (f != :classification) or @description.parent.above_species? %>

      <label for="description_<%= f %>"><%= :"form_names_#{f}".t %>:
      <%= :"form_names_#{f}_help".l(:rank => rank) %>

      <%= form.text_area(f, :cols => 80) %>

  <% end %>
<% end %>


Added parenthesis for future version

Added parenthesis for future version

<%# @show_bat is needed to show the bat band column %>

<% bat = @bat %>
<% medical_problem = medical_problem_for_bat %>

    <% if @show_bat %>
    <%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %>
    <% end %>

      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>

      <%= link_to medical_problem.user.initials, :controller => 'users', :action => 'show', :id => medical_problem.user %>

      <%=h nice_date(medical_problem.date_opened) %>

    <% if medical_problem.date_closed == nil %>
      <% if @list_all %>

          <%=h nice_date(medical_problem.date_closed) %>

      <% end %>

        <%= link_to 'Edit', :controller => 'medical_problems', :action => 'edit', :id => medical_problem %>

        <%= link_to 'Close', :controller => 'medical_problems', :action => 'deactivate', :id => medical_problem %>

    <% else %>

        <%=h nice_date(medical_problem.date_closed) %>

        <%= link_to 'Reactivate', :controller => 'medical_problems', :action => 'reactivate', :id => medical_problem %>

    <% end %>

    <% for proposed_treatment in medical_problem.proposed_treatments.current %>

        <%= link_to proposed_treatment.treatment, :controller => 'proposed_treatments', :action => 'show', :id => proposed_treatment %>

        <% if proposed_treatment.medical_care_actions.today.length > 0 %>
          Done
        <% else %>
          <%= link_to 'Do', :controller => 'medical_care_actions', :action => 'new', :id => proposed_treatment %>
        <% end %>

        <%= link_to 'End', :controller => 'proposed_treatments', :action => 'deactivate', :id => proposed_treatment %>

      <% if @list_all %>

      <% end %>
      <% if @show_bat %>

      <% end %>
    <% end %>
    <% if medical_problem.date_closed == nil %>
      [<%= link_to 'Add New Treatment', :controller => 'proposed_treatments', :action => 'new', :id => medical_problem %>]
    <% end %>

<%# @show_bat is needed to show the bat band column %>

<% bat = @bat %>
<% medical_problem = medical_problem_for_bat %>

    <% if @show_bat %>
    <%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %>
    <% end %>

      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>

      <%= link_to medical_problem.user.initials, :controller => 'users', :action => 'show', :id => medical_problem.user %>

      <%=h nice_date medical_problem.date_opened %>

    <% if medical_problem.date_closed == nil %>
      <% if @list_all %>

          <%=h nice_date medical_problem.date_closed %>

      <% end %>

        <%= link_to 'Edit', :controller => 'medical_problems', :action => 'edit', :id => medical_problem %>

        <%= link_to 'Close', :controller => 'medical_problems', :action => 'deactivate', :id => medical_problem %>

    <% else %>

        <%=h nice_date medical_problem.date_closed %>

        <%= link_to 'Reactivate', :controller => 'medical_problems', :action => 'reactivate', :id => medical_problem %>

    <% end %>

    <% for proposed_treatment in medical_problem.proposed_treatments.current %>

        <%= link_to proposed_treatment.treatment, :controller => 'proposed_treatments', :action => 'show', :id => proposed_treatment %>

        <% if proposed_treatment.medical_care_actions.today.length > 0 %>
          Done
        <% else %>
          <%= link_to 'Do', :controller => 'medical_care_actions', :action => 'new', :id => proposed_treatment %>
        <% end %>

        <%= link_to 'End', :controller => 'proposed_treatments', :action => 'deactivate', :id => proposed_treatment %>

      <% if @list_all %>

      <% end %>
      <% if @show_bat %>

      <% end %>
    <% end %>
    <% if medical_problem.date_closed == nil %>
      [<%= link_to 'Add New Treatment', :controller => 'proposed_treatments', :action => 'new', :id => medical_problem %>]
    <% end %>


ActionItem36: only present link to add friend if not already friend

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

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

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

  <% end %>

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

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

  <% end %>


Don't display Rails scaffold flash messages

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

  <title><%=h @questionnaire.title%><% if @page %> - Page <%= @page.number %> of <%= @questionnaire.pages.size %><% end %></title>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  <%= stylesheet_link_tag 'questionnaire' %>
  <%= stylesheet_link_tag 'journey' %>

  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag '/jipe/jester' %>
  <%= javascript_include_tag '/jipe/jipe' %>

<% if @questionnaire and not @suppress_custom_html -%>
        <%= sanitize @questionnaire.custom_html %>
<% end -%>

<% if flash[:error_messages] -%>

There were errors processing your request:

                <% flash[:error_messages].each do |error| -%>

<%= error %>

                <% end -%>

<% end %>

<%= @content_for_layout %>

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

  <title><%=h @questionnaire.title%><% if @page %> - Page <%= @page.number %> of <%= @questionnaire.pages.size %><% end %></title>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  <%= stylesheet_link_tag 'questionnaire' %>
  <%= stylesheet_link_tag 'journey' %>

  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag '/jipe/jester' %>
  <%= javascript_include_tag '/jipe/jipe' %>

<% if @questionnaire and not @suppress_custom_html -%>
        <%= sanitize @questionnaire.custom_html %>
<% end -%>

<% for name in [:notice, :warning, :message] %>
        <% if flash[name] %>
                <%= "
#{flash[name]}
" %>
        <% end %>
<% end %>

<% if flash[:error_messages] -%>

There were errors processing your request:

                <% flash[:error_messages].each do |error| -%>

<%= error %>

                <% end -%>

<% end %>

<%= @content_for_layout %>


 r413@bison:  gaspard | 2007-01-26 14:22:53 +0100
 better vhost file

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

<VirtualHost <%= address %>>
  ServerName <%= server_name %>

  DocumentRoot <%= doc_root %>
  ErrorLog <%= error_log %>
  CustomLog <%= access_log %>

  # Proxy and rails stuff below
  <Proxy *>
      Order deny,allow
      Allow from all
  </Proxy>

  <% if static.include?('cgi-bin') %>
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>
	<% end %>

	<% if static.include?('awstats-icon') %>
  Alias /awstats-icon/ /usr/share/awstats/icon/
  <Directory /usr/share/awstats/icon>
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
  <% end %>

  ProxyRequests Off
  <% ports.each do |port| %>
  ProxyPassReverse / http://localhost:<%= port %>/<% end %>

  ProxyPreserveHost On

  RewriteEngine On

  RewriteMap  servers rnd:<%= server_ports_file %>

  # Do not serve hidden files !!
  RewriteRule ^(.*)/\.(.*) /404 [R]
  # static content, never going to proxy
  RewriteRule ^/(<%= static.join("|") %>)/?(.*) $0 [L]

  # serve static content with apache, do not handle request to proxy
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}.html !-f

  RewriteRule ^/(.*)$ http://localhost:${servers:ports}/$1 [P,L]
</VirtualHost>

<VirtualHost <%= address %>>
  ServerName <%= server_name %>

  DocumentRoot <%= doc_root %>
  ErrorLog <%= error_log %>
  CustomLog <%= access_log %>

  # Proxy and rails stuff below
  <Proxy *>
      Order deny,allow
      Allow from all
  </Proxy>

  # Do not serve hidden files !!
  <Directory ~"^/.*/\.">
    order deny,allow
    deny from all
  </Directory>

  ProxyRequests Off
  <% ports.each do |port| %>
  ProxyPassReverse / http://localhost:<%= port %>/<% end %>

  ProxyPreserveHost On

  RewriteEngine On

  RewriteMap  servers rnd:<%= server_ports_file %>
  RewriteRule ^(.*)/\.(.*) /404 [R]
  RewriteRule ^/(images|stylesheets|javascripts|favicon.ico)/?(.*) $0 [L]
  RewriteRule ^/(images|stylesheets|javascripts|favicon.ico)/?(.*) $0 [L]
  # skip static
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ http://localhost:${servers:ports}/$1 [P,L]
</VirtualHost>


fixes #70, Authorization problem

fixes #70, Authorization problem

  <% unless @grouping_options.empty? %>

<%= l(:charts_group_by) %>
    <%= select_tag :grouping, options_for_select(@grouping_options, @grouping), { :class => "select-small" } %>

  <% end %>
  <% @textconditions_options.each do |condition| %>
    <tr id="<%= "tr_#{condition[0]}" %>" class="filter">
      <%= check_box_tag 'fields[]', condition[0], @conditions[condition[0].to_sym], :onclick => "toggle_filter('#{condition[0]}');", :id => "cb_#{condition[0]}" %>
      <label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %>

    <%= text_field_tag condition[0].to_sym, @conditions[condition[0].to_sym].blank? ? nil : @conditions[condition[0].to_sym], { :class => "select-small", :id => "values_#{condition[0]}" } %>

  <% end %>
  <% @conditions_options.each do |condition| %>
    <tr id="<%= "tr_#{condition[0]}" %>" class="filter">
      <%= check_box_tag 'fields[]', condition[0], @conditions[condition[0].to_sym], :onclick => "toggle_filter('#{condition[0]}');", :id => "cb_#{condition[0]}" %>
      <label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %>

    <% unless condition[1].nil? %>
      <%= select_tag condition[0].to_sym, options_for_select(condition[1], @conditions[condition[0].to_sym]), { :class => "select-small", :id => "values_#{condition[0]}" } %>
    <% end %>

  <% end %>
  <% @multiconditions_options.each do |condition| %>
    <tr id="<%= "tr_#{condition[0]}" %>" class="filter">
      <%= check_box_tag 'fields[]', condition[0], @conditions[condition[0].to_sym], :onclick => "toggle_filter('#{condition[0]}');", :id => "cb_#{condition[0]}" %>
      <label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %>

    <% unless condition[1].nil? %>
      <%= select_tag condition[0].to_sym, options_for_select(condition[1], @conditions[condition[0].to_sym]), {:multiple => true, :class => "select-small", :id => "values_#{condition[0]}"} %>
    <% end %>

  <% end %>

  <%= l(:label_filter_add) %>:

  <%= select_tag 'add_filter_select', options_for_select([["",""]] + @all_conditions_options.collect { |c| [ l("charts_condition_#{c[0]}".gsub(".","_").to_sym), c[0] ] }), :onchange => "add_filter();", :class => "select-small", :name => nil %>

  <% unless @grouping_options.empty? %>

<%= l(:charts_group_by) %>
    <%= select_tag :grouping, options_for_select(@grouping_options, @grouping), { :class => "select-small", :style => "width:200px" } %>

  <% end %>
  <% @textconditions_options.each do |condition| %>
    <tr id="<%= "tr_#{condition[0]}" %>" class="filter">
      <%= check_box_tag 'fields[]', condition[0], @conditions[condition[0].to_sym], :onclick => "toggle_filter('#{condition[0]}');", :id => "cb_#{condition[0]}" %>
      <label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %>

    <%= text_field_tag condition[0].to_sym, @conditions[condition[0].to_sym].blank? ? nil : @conditions[condition[0].to_sym], { :class => "select-small", :id => "values_#{condition[0]}" } %>

  <% end %>
  <% @conditions_options.each do |condition| %>
    <tr id="<%= "tr_#{condition[0]}" %>" class="filter">
      <%= check_box_tag 'fields[]', condition[0], @conditions[condition[0].to_sym], :onclick => "toggle_filter('#{condition[0]}');", :id => "cb_#{condition[0]}" %>
      <label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %>

    <% unless condition[1].nil? %>
      <%= select_tag condition[0].to_sym, options_for_select(condition[1], @conditions[condition[0].to_sym]), { :class => "select-small", :style => "width:200px", :id => "values_#{condition[0]}" } %>
    <% end %>

  <% end %>
  <% @multiconditions_options.each do |condition| %>
    <tr id="<%= "tr_#{condition[0]}" %>" class="filter">
      <%= check_box_tag 'fields[]', condition[0], @conditions[condition[0].to_sym], :onclick => "toggle_filter('#{condition[0]}');", :id => "cb_#{condition[0]}" %>
      <label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %>

    <% unless condition[1].nil? %>
      <%= select_tag condition[0].to_sym, options_for_select(condition[1], @conditions[condition[0].to_sym]), {:multiple => true, :class => "select-small", :style => "width:200px", :id => "values_#{condition[0]}"} %>
    <% end %>

  <% end %>

  <%= l(:label_filter_add) %>:

  <%= select_tag 'add_filter_select', options_for_select([["",""]] + @all_conditions_options.collect { |c| [ l("charts_condition_#{c[0]}".gsub(".","_").to_sym), c[0] ] }), :onchange => "add_filter();", :class => "select-small", :name => nil %>


Remove some spurious code relating to old CSS.

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

        <%= javascript_include_tag :defaults %>

        <title>
        <% if @title %>
            <%=@title%> - WhatDoTheyKnow
        <% else %>
            WhatDoTheyKnow - file and browse Freedom of Information (FOI) requests
        <% end %>
        </title>

        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet"  %>
        <%= stylesheet_link_tag 'yucky-green', :title => "Yucky Green", :rel => "alternate stylesheet" %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
            <% end %>
        <% end %>

            WhatDoTheyKnow?

            Make and explore Freedom of Information requests

		a site by mysociety.org

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

               <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
               <%= submit_tag "Search" %>

        <% end %>

Make request

<%= link_to "View requests", request_list_url(:view => nil) %>

<%= link_to "View authorities", list_public_bodies_url(:tag => 'other') %>

			<% if @user %>

<%=link_to "My requests", user_url(@user) %>

			<% end %>

<%= link_to "About", about_url %>

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

			<% if @user %>
				Hello, <%=h(@user.name)%>!
				(<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
			<% else %>
				Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
			<% end %>

		<% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.

<% if MySociety::Config.get("DOMAIN", '127.0.0.1:3000') == 'www.whatdotheyknow.com'  %>

<% end %>

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

        <%= javascript_include_tag :defaults %>

        <title>
        <% if @title %>
            <%=@title%> - WhatDoTheyKnow
        <% else %>
            WhatDoTheyKnow - file and browse Freedom of Information (FOI) requests
        <% end %>
        </title>
        <%
            # Angie, just change this to true / false :)
            yucky = false
        %>
        <%= stylesheet_link_tag 'yucky-green', :title => "Yucky Green", :rel => yucky ? "stylesheet" : "alternate stylesheet" %>
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => yucky ? "alternate stylesheet" : "stylesheet"  %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
            <% end %>
        <% end %>

            WhatDoTheyKnow?

            Make and explore Freedom of Information requests

		a site by mysociety.org

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

               <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
               <%= submit_tag "Search" %>

        <% end %>

Make request

<%= link_to "View requests", request_list_url(:view => nil) %>

<%= link_to "View authorities", list_public_bodies_url(:tag => 'other') %>

			<% if @user %>

<%=link_to "My requests", user_url(@user) %>

			<% end %>

<%= link_to "About", about_url %>

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

			<% if @user %>
				Hello, <%=h(@user.name)%>!
				(<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
			<% else %>
				Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
			<% end %>

		<% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.

<% if MySociety::Config.get("DOMAIN", '127.0.0.1:3000') == 'www.whatdotheyknow.com'  %>

<% end %>


change page title

change page title

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

		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta name="description" content="Compani.es - The alternative Open Companies House"/>
		<meta name="keywords" content="twitter,search,realtime"/>
		<title>Comapani.es Open House</title>
		<%=   stylesheet_link_tag("application") %>

                         <%= yield %>

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

		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta name="description" content="Compani.es - The alternative Open Companies House"/>
		<meta name="keywords" content="twitter,search,realtime"/>
		<title>Twitter Search</title>
		<%=   stylesheet_link_tag("application") %>

                         <%= yield %>


Stop yelling at IE users

Stop yelling at IE users

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

  <title><%= page_title %></title>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  <%= stylesheet_link_tag 'journey' %>
  <%= stylesheet_link_tag 'questionnaire' %>

  <%= stylesheet_link_tag 'auth' %>
  <%= ae_form_stylesheet %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag '/jipe/jester' %>
  <%= javascript_include_tag '/jipe/jipe' %>
  <%= javascript_include_tag 'overlabel' %>
  <%= javascript_include_tag "layout" %>
  <%= include_tiny_mce_if_needed %>
  <% if @rss_url %>
    <link rel="alternate" title="RSS Feed" href="<%=@rss_url%>" type="application/rss+xml"/>
  <% end %>

<% if flash[:error_messages] -%>

There were errors processing your request:

                <% flash[:error_messages].each do |error| -%>

<%= error %>

                <% end -%>

<% end %>

        <%= link_to(image_tag("journey26-logo.png", :border => "0", :alt => "Journey 2.6"), questionnaires_url) %>

    <%= user_options %>

<%= @content_for_layout %>

<% if Journey::SiteOptions.footer_partial -%>

		<%= render :partial => Journey::SiteOptions.footer_partial %>

<% end -%>

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

  <title><%= page_title %></title>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  <%= stylesheet_link_tag 'journey' %>
  <%= stylesheet_link_tag 'questionnaire' %>

  <%= stylesheet_link_tag 'auth' %>
  <%= ae_form_stylesheet %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag '/jipe/jester' %>
  <%= javascript_include_tag '/jipe/jipe' %>
  <%= javascript_include_tag 'browserdetect.js' %>
  <%= javascript_include_tag 'overlabel' %>
  <%= javascript_include_tag "layout" %>
  <%= include_tiny_mce_if_needed %>
  <% if @rss_url %>
    <link rel="alternate" title="RSS Feed" href="<%=@rss_url%>" type="application/rss+xml"/>
  <% end %>

<% if flash[:error_messages] -%>

There were errors processing your request:

                <% flash[:error_messages].each do |error| -%>

<%= error %>

                <% end -%>

<% end %>

        <%= link_to(image_tag("journey26-logo.png", :border => "0", :alt => "Journey 2.6"), questionnaires_url) %>

    <%= user_options %>

Warning for Internet Explorer users

Journey is known not to work well with Microsoft Internet Explorer.  Answering questionnaires will work
    fine with any browser, but other functionality, such as editing, importing, exporting, and analyzing
    questionnaires may fail.

Journey is tested and known to work with the following browsers:

Mozilla Firefox 2.0 and up

Safari 3.0 and up

Both of these browsers are available for free, and we recommend their use over Internet Explorer not
    just for this site, but in general, due to their greater track record for security, stability, and
    web standards compliance.

<%= @content_for_layout %>

<% if Journey::SiteOptions.footer_partial -%>

		<%= render :partial => Journey::SiteOptions.footer_partial %>

<% end -%>


Boosted number of comments shown on show_name.

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

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

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

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

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

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

        <%= show_previous_version(@name) %>

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

        <% end %>

        <%= set_export_status_controls(@name) %>

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

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

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

<%= :show_name_notes.t %>:

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

  <%= show_authors_and_editors(@name) %>

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

<%
# ----------------------------------------
#  Show the selected NameDescription.
# ----------------------------------------
if @description && @description.has_any_notes? %>
  <%= show_embedded_description_title(@description, @name) %>
  <%= render(:partial => 'name_description', :object => @description,
             :locals => { :review => true }) %>
  <%= render(:partial => 'comment/show_comments', :locals =>
             { :object => @description, :controls => true, :limit => 5 }) if false %>

<% end %>

<%
# ----------------------------------------
#  Draw the paginated list of children.
# ----------------------------------------
if @children_data && @children_data.length > 0 %>

    <big><%= rank_as_plural_string(@children_data[0].rank) %></big>:
    <%= if @children_data.length < @children_query.num_results
      link_to("(#{:show_object.t(:type => :index)})", :action => 'index_name',
              :params => query_params(@children_query))
    end %>

  <% paginate_block(@children_pages, :anchor => 'children') do %>

      <% for child in @children_data %>
        <%= link_to(child.display_name.t, :action => 'show_name',
                    :id => child.id,
                    :params => query_params(@children_query)) %>

      <% end %>

  <% end %>

<% end %>

<%
# ----------------------------------------
#  Draw the four groups of observations.
# ----------------------------------------
num_sects = 0
for sect in ['consensus', 'synonym', 'other', 'subtaxa']
  if sect == 'consensus'
    head  = :show_name_observations.t + ':'   # Displayed above group.
    data  = @consensus_data                   # Data returned by sql query.
    pages = @consensus_pages                  # Pagination object.
    query = @consensus_query                  # Associated query.
  elsif sect == 'synonym'
    head  = :show_name_synonym_observations.t + ':'
    data  = @synonym_data
    pages = @synonym_pages
    query = @synonym_query
  elsif sect == 'other'
    head  = %(
      #{:show_name_other_observations.t}:

        #{:show_name_other_observations_notes.t(:name => @name.display_name)}

    )
    data  = @other_data
    pages = @other_pages
    query = @other_query
  elsif sect == 'subtaxa'
    head  = :show_name_subtaxa_observations.t + ':'
    data  = @subtaxa_data
    pages = @subtaxa_pages
    query = @subtaxa_query
  end

  # Skip completely if group is empty.
  if data && data.length > 0
    num_sects += 1 %>

      <a id="<%=sect%>">
      <big><%= head %></big>
      (<%= links = []
      if true or (data.length < query.num_results)
        links << link_to(:show_object.t(:type => :index),
                         :controller => 'observer',
                         :action => 'index_observation',
                         :params => query_params(query))
      end
      # links << link_to(:IMAGES.t, :controller => 'image',
      #                  :action => 'index_image', :by => 'image_quality',
      #                  :params => query_params(query))
      links.join(' | ') if links.any? %>)

    <% paginate_block(pages, :anchor => sect) do %>

        <% odd_or_even = 0
        for obs in data
          odd_or_even = 1 - odd_or_even %>
          <tr valign="top" class="ListLine<%= odd_or_even %>">

              <%= if image = obs.thumb_image
                thumbnail(image, :border => 0, :link => :show_observation,
                          :obs => obs.id, :votes => true)
              end %>

                <%= link_to(obs.name.observation_name.t + " (#{obs.id})",
                            :controller => 'observer',
                            :action => 'show_observation', :id => obs.id,
                            :params => query_params(query)) %>

                <%= location_link(obs.where, obs.location) %>
              :

                <%= user_link(obs.user_id, "#{obs.user.name} (#{obs.user.login})") %>

              <%= :observation_made.t %>: <%= obs.when.web_date %>

              <%= :observation_made_confidence.t %>:
                <%= v = obs.vote_cache
                if v.blank?
                  :show_namings_no_votes.t
                else
                  (v.to_f*100/3).round.to_s + "%"
                end %>

        <% end %>

    <% end %>

  <% end %>
<% end %>

<%= show_object_footer(@name) %>

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

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

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

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

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

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

        <%= show_previous_version(@name) %>

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

        <% end %>

        <%= set_export_status_controls(@name) %>

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

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

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

<%= :show_name_notes.t %>:

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

  <%= show_authors_and_editors(@name) %>

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

<%
# ----------------------------------------
#  Show the selected NameDescription.
# ----------------------------------------
if @description && @description.has_any_notes? %>
  <%= show_embedded_description_title(@description, @name) %>
  <%= render(:partial => 'name_description', :object => @description,
             :locals => { :review => true }) %>
  <%= render(:partial => 'comment/show_comments', :locals =>
             { :object => @description, :controls => true, :limit => 2 }) if false %>

<% end %>

<%
# ----------------------------------------
#  Draw the paginated list of children.
# ----------------------------------------
if @children_data && @children_data.length > 0 %>

    <big><%= rank_as_plural_string(@children_data[0].rank) %></big>:
    <%= if @children_data.length < @children_query.num_results
      link_to("(#{:show_object.t(:type => :index)})", :action => 'index_name',
              :params => query_params(@children_query))
    end %>

  <% paginate_block(@children_pages, :anchor => 'children') do %>

      <% for child in @children_data %>
        <%= link_to(child.display_name.t, :action => 'show_name',
                    :id => child.id,
                    :params => query_params(@children_query)) %>

      <% end %>

  <% end %>

<% end %>

<%
# ----------------------------------------
#  Draw the four groups of observations.
# ----------------------------------------
num_sects = 0
for sect in ['consensus', 'synonym', 'other', 'subtaxa']
  if sect == 'consensus'
    head  = :show_name_observations.t + ':'   # Displayed above group.
    data  = @consensus_data                   # Data returned by sql query.
    pages = @consensus_pages                  # Pagination object.
    query = @consensus_query                  # Associated query.
  elsif sect == 'synonym'
    head  = :show_name_synonym_observations.t + ':'
    data  = @synonym_data
    pages = @synonym_pages
    query = @synonym_query
  elsif sect == 'other'
    head  = %(
      #{:show_name_other_observations.t}:

        #{:show_name_other_observations_notes.t(:name => @name.display_name)}

    )
    data  = @other_data
    pages = @other_pages
    query = @other_query
  elsif sect == 'subtaxa'
    head  = :show_name_subtaxa_observations.t + ':'
    data  = @subtaxa_data
    pages = @subtaxa_pages
    query = @subtaxa_query
  end

  # Skip completely if group is empty.
  if data && data.length > 0
    num_sects += 1 %>

      <a id="<%=sect%>">
      <big><%= head %></big>
      (<%= links = []
      if true or (data.length < query.num_results)
        links << link_to(:show_object.t(:type => :index),
                         :controller => 'observer',
                         :action => 'index_observation',
                         :params => query_params(query))
      end
      # links << link_to(:IMAGES.t, :controller => 'image',
      #                  :action => 'index_image', :by => 'image_quality',
      #                  :params => query_params(query))
      links.join(' | ') if links.any? %>)

    <% paginate_block(pages, :anchor => sect) do %>

        <% odd_or_even = 0
        for obs in data
          odd_or_even = 1 - odd_or_even %>
          <tr valign="top" class="ListLine<%= odd_or_even %>">

              <%= if image = obs.thumb_image
                thumbnail(image, :border => 0, :link => :show_observation,
                          :obs => obs.id, :votes => true)
              end %>

                <%= link_to(obs.name.observation_name.t + " (#{obs.id})",
                            :controller => 'observer',
                            :action => 'show_observation', :id => obs.id,
                            :params => query_params(query)) %>

                <%= location_link(obs.where, obs.location) %>
              :

                <%= user_link(obs.user_id, "#{obs.user.name} (#{obs.user.login})") %>

              <%= :observation_made.t %>: <%= obs.when.web_date %>

              <%= :observation_made_confidence.t %>:
                <%= v = obs.vote_cache
                if v.blank?
                  :show_namings_no_votes.t
                else
                  (v.to_f*100/3).round.to_s + "%"
                end %>

        <% end %>

    <% end %>

  <% end %>
<% end %>

<%= show_object_footer(@name) %>


corrected the login markup and added a 'back to the blog' link

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

<% form_tag :action=> "login" do %>

Typo

      <% if flash[:notice] %>

<%= flash[:notice] %>

      <% end %>

          Username:
          <input type="text" name="user_login" id="user_login" size="20" value=""/>

          Password:
          <input type="password" name="user_password" id="user_password" size="30"/>

      <input type="submit" name="login" value="Login »" class="primary" />

<%= link_to "« Back to the blog", { :controller => '/articles' } %>

<% end %>

<% form_tag :action=> "login" do %>

Please login

      <% if flash[:notice] %>

<%= flash[:notice] %>

      <% end %>
    Login:

    <input type="text" name="user_login" id="user_login" size="20" value=""/>

    Password:

    <input type="password" name="user_password" id="user_password" size="30"/>

    <input type="submit" name="login" value="Login »" class="primary" />

<% end %>


Add links to examples searches.

Add links to examples searches.

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

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

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Advanced tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby.nil?, "Show most relevant results first", search_url(@query, nil) %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

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

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. <%=search_link('climbing lane')%>

Use OR (in capital letters) where you don't mind which word,  e.g. <%=search_link('commons OR lords')%>

Use quotes when you want to find an exact phrase, e.g. <%=search_link('"Liverpool City Council"')%>

variety: with value sent, followup_sent, response, comment, authority or user to select type of thing to search for.

status: to select based on the status or historical status of the request, see table below.

<%=search_link('requested_from:home_office')%> to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

<%=search_link('requested_by:julian_todd')%> to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

<%=search_link('commented_by:tony_bowden')%> to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

<%=search_link('filetype:pdf')%> to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type <%=search_link('01/01/2008..14/01/2008')%> to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

Table of statuses

<%=search_link('status:waiting_response')%>	 Waiting for the public authority to reply

<%=search_link('status:not_held')%>	 The public authority does not have the information requested

<%=search_link('status:rejected')%>	 The request was rejected by the public authority

<%=search_link('status:partially_successful')%>	 Some of the information requested has been received

<%=search_link('status:successful')%>	 All of the information requested has been received

<%=search_link('status:waiting_clarification')%>	 The public authority would like part of the request explained

<%=search_link('status:gone_postal')%>	 The public authority would like to / has responded by post

<%=search_link('status:requires_admin')%>	 A strange reponse, required attention by the WhatDoTheyKnow team

<% end %>

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

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

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Advanced tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby.nil?, "Show most relevant results first", search_url(@query, nil) %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= link_to @spelling_correction, search_url(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= link_to @spelling_correction, search_url(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

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

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. climbing lane

Use OR (in capital letters) where you don't mind which word,  e.g. commons OR lords

Use quotes when you want to find an exact phrase, e.g. "Liverpool City Council"

variety: with value sent, followup_sent, response, comment, authority or user to select type of thing to search for.

status: to select based on the status or historical status of the request, see table below.

requested_from:home_office to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

requested_by:julian_todd to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

commented_by:tony_bowden to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

filetype:pdf to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type 01/01/2008..14/01/2008 to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

status:waiting_response	 Waiting for the public authority to reply

status:not_held	 The public authority does not have the information requested

status:rejected	 The request was rejected by the public authority

status:partially_successful	 Some of the information requested has been received

status:successful	 All of the information requested has been received

status:waiting_clarification	 The public authority would like part of the request explained

status:gone_postal	 The public authority would like to / has responded by post

status:requires_admin	 A strange reponse, required attention by the WhatDoTheyKnow team

<% end %>


Changes the footer.

Changes the footer.

tu derecho a saber

<%= link_to _("Contacto"), help_contact_path %>

<%= link_to _("Prensa"), help_press_path %>

<%= link_to _("Quiénes somos"), help_about_path %>

<%= link_to _("¿Cómo puedes colaborar?"), help_help_out_path %>

<%= link_to _("Patrocinadores"), help_about_path(:anchor => 'supporters') %>

<%= link_to _("Agradecimientos"), help_credits_path %>

<%= link_to _("Condiciones de uso"), help_terms_of_use_path %>

<%= link_to _("Política de privacidad"), help_privacy_policy_path %>

<%= _("Ayuda") %>

<%= link_to _("Guía para realizar solicitudes"), help_requesting_path %>

<%= link_to _("Tu privacidad"), help_privacy_path %>

<%= link_to _("Información para instituciones"), help_officers_path %>

<%= link_to _("Basado en Alaveteli"), help_alaveteli_path %>

<%= link_to _("API"), help_api_path %>

            <%= _("Contenido bajo licencia CC BY SA 3.0
Creative Commons Attribution Share-Alike") %>

<%= _("Un proyecto de") %>

<%= _("Con la ayuda de") %>

tuderechoasaber.es

<%= link_to _("Contacto"), help_contact_path %>

<%= link_to _("Prensa"), help_press_path %>

<%= link_to _("Quiénes somos"), help_about_path %>

<%= link_to _("¿Cómo puedes colaborar?"), help_help_out_path %>

<%= link_to _("Patrocinadores"), help_about_path(:anchor => 'supporters') %>

<%= link_to _("Agradecimientos"), help_credits_path %>

<%= link_to _("Condiciones de uso"), help_terms_of_use_path %>

<%= link_to _("Política de privacidad"), help_privacy_policy_path %>

<%= _("Ayuda") %>

<%= link_to _("Guía para realizar solicitudes"), help_requesting_path %>

<%= link_to _("Tu privacidad"), help_privacy_path %>

<%= link_to _("Información para instituciones"), help_officers_path %>

<%= link_to _("Basado en Alaveteli"), help_alaveteli_path %>

<%= link_to _("API"), help_api_path %>

            <%= _("Contenido bajo licencia CC BY SA 3.0
Creative Commons Attribution Share-Alike") %>

<%= _("Un proyecto de") %>

<%= _("Con la ayuda de") %>


order users by created_at in admin

order users by created_at in admin

API Users

        Sign out

    <% ApiUser.order(created_at: :desc).where(archived: false).each do |api_user| %>

          <% if api_user.active %>

          <% else %>

          <% end %>

          <%= api_user.email %>

 Token: <%= api_user.token %>

Name: <%= api_user.full_name %>

Email: <%= api_user.email %>

Company: <%= api_user.company %>

Type of User: <%= api_user.kind %>

Has licence? <%= api_user.has_licence %>

Licence Number: <%= api_user.licence_number || "N/A" %>

Reason for using the api: <%= api_user.reason %>

          <form method="POST" action="/admin/api_users/<%= api_user.id %>">
            <%= Rack::Csrf.csrf_tag(env) %>

              Active
              <input name="api_user[active]" type="checkbox" value="1" <%= api_user.active ? "checked" : nil %>>

Permissions

              <% $api_objects.each do |api_object| %>

<%= api_object.name %>

                    <% api_object.api_attributes.each do |attribute| %>

                        <%= attribute %>
                        <input
                            name="api_user[permissions][<%= api_object.name %>][<%= attribute %>]"
                            type="checkbox"
                            value="1"
                            <%= api_user.access_to?(api_object, attribute) ? "checked" : nil %>
                        >

                    <% end %>

              <% end %>

            <button name="save" class="big-button" type="submit">
              Save
            </button>
            <button onclick="return confirm('Are you sure?');" name="destroy" class="big-button--danger big-button" type="submit">
              Destroy user
            </button>

          </form>

    <% end%>

    <%= ApiUser.count %> API users, <%= ApiUser.where(active: true).count %> of which active

API Users

        Sign out

    <% ApiUser.order(active: :desc, email: :asc).all.each do |api_user| %>

          <% if api_user.active %>

          <% else %>

          <% end %>

          <%= api_user.email %>

 Token: <%= api_user.token %>

Name: <%= api_user.full_name %>

Email: <%= api_user.email %>

Company: <%= api_user.company %>

Type of User: <%= api_user.kind %>

Has licence? <%= api_user.has_licence %>

Licence Number: <%= api_user.licence_number || "N/A" %>

Reason for using the api: <%= api_user.reason %>

          <form method="POST" action="/admin/api_users/<%= api_user.id %>">
            <%= Rack::Csrf.csrf_tag(env) %>

              Active
              <input name="api_user[active]" type="checkbox" value="1" <%= api_user.active ? "checked" : nil %>>

Permissions

              <% $api_objects.each do |api_object| %>

<%= api_object.name %>

                    <% api_object.api_attributes.each do |attribute| %>

                        <%= attribute %>
                        <input
                            name="api_user[permissions][<%= api_object.name %>][<%= attribute %>]"
                            type="checkbox"
                            value="1"
                            <%= api_user.access_to?(api_object, attribute) ? "checked" : nil %>
                        >

                    <% end %>

              <% end %>

            <button name="save" class="big-button" type="submit">
              Save
            </button>
            <button onclick="return confirm('Are you sure?');" name="destroy" class="big-button--danger big-button" type="submit">
              Destroy user
            </button>

          </form>

    <% end%>

    <%= ApiUser.count %> API users, <%= ApiUser.where(active: true).count %> of which active


Fix indentation

Fix indentation

<% if @show_requests %>
 <% @title = h(@display_user.name) + " - Freedom of Information requests" %>
<% else %>
 <% @title = h(@display_user.name) + " - user profile" %>
<% end %>

<% if (@same_name_users.size >= 1) %>

<%= _('There is more than one person who uses this site and has this name.
    One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %>
        <%= user_link(@same_name_user) %>
    <% end %>
<% end%>

<% if @show_profile && @is_you && @undescribed_requests.size > 0 %>

<%= _('Please go to the following requests, and let us
        know if there was information in the recent responses to them.')%>

        <% for undescribed_request in @undescribed_requests %>

<%=request_link(undescribed_request)%>

        <% end %>

      <%= _('Thanks very much - this will help others find useful stuff. We\'ll
            also, if you need it, give advice on what to do next about your
            requests.')%>

<% end %>

<% if @show_profile %>

     <% if !@track_thing.nil? %>

<%= _('Track this person')%>

       <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
     <% end %>
     <% if !@xapian_requests.nil? %>

<%= _('On this page')%>

       <%= _('FOI requests')%>

<%= _('Annotations')%>
     <% end %>

        <% if @display_user.profile_photo %>
            <% if @is_you %>
            <a href="<%= set_profile_photo_url() %>">
            <% end %>
                <img src="<%= get_profile_photo_url(:url_name => @display_user.url_name) %>" alt="">
            <% if @is_you %>

            <% end %>
        <% else %>
            <% if @is_you %>

                    <%= link_to _('Set your profile photo'), set_profile_photo_url() %>

            <% end %>
        <% end %>

 <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %>

       <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %>
        <% if !@user.nil? && @user.admin_page_links? %>
        (<%= link_to "admin", user_admin_url(@display_user) %>)
        <% end %>

        <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
        <% if @is_you %>
            (<%= _('just to see how it works')%>)
        <% end %>

    <% if @display_user.public_banned? %>

                  <%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%>

               <%= _('They have been given the following explanation:')%>

                <%= @display_user.can_fail_html %>

    <% end %>

    <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>

            <%= @display_user.get_about_me_for_html_display %>
            <% if @is_you %>
                (<%= link_to _("edit text about you"), set_profile_about_me_url() %>)
            <% end %>

    <% end %>

    <% if @is_you %>

            <% if @display_user.profile_photo %>
                <%= link_to _('Change profile photo'), set_profile_photo_url() %> |
            <% end %>
            <%= link_to _('Change your password'), signchangepassword_url() %> |
            <%= link_to _('Change your email'), signchangeemail_url() %>

    <% end %>

    <% if not @is_you %>

           <%= _('Sign in to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.request_uri)]%>

    <% end %>

<% end %>

<% if @show_requests %>

    <% form_tag(show_user_url, :method => "get", :id=>"search_form") do %>

        <%= text_field_tag(:user_query, params[:user_query]) %>
        <% if @is_you %>
            <%= submit_tag(_("Search your contributions")) %>
        <% else %>
            <%= submit_tag(_("Search contributions by this person")) %>
        <% end %>

    <% end %>

    <% if !@xapian_requests.nil? %>
        <% if @xapian_requests.results.empty? %>
            <% if @page == 1 %>

<%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> <%= @match_phrase %>

<%= @is_you ? _('You have made no Freedom of Information requests using this site.') : _('This person has made no Freedom of Information requests using this site.') %>
                <%= @page_desc %>
            <% end %>
        <% else %>

                <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.matches_estimated.to_s) % @xapian_requests.matches_estimated.to_s : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests',  @xapian_requests.matches_estimated.to_s) % @xapian_requests.matches_estimated %>

                <%= @match_phrase %>
                <%= @page_desc %>

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

            <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.info_requests.size) %>
        <% end %>
    <% else %>
      <% if @show_requests %>

<%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %>

<%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests this person has made.')%>

      <% end %>
    <% end %>

    <% if !@xapian_comments.nil? %>
        <% if @xapian_comments.results.empty? %>
            <% if @page == 1 %>

<%= @is_you ? _('Your annotations') : _('This person\'s annotations') %>
                    <%= @match_phrase %>

<%= _('None made.')%>

            <% end %>
        <% else %>

                <%= @is_you ? n_('Your %d annotation', 'Your %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size : n_('This person\'s %d annotation', 'This person\'s %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size %>

                <%= @page_desc %>

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

            <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.visible_comments.size) %>
        <% end %>
    <% end %>

<% end %>
<% if @show_profile && @is_you %>
    <% if @track_things.empty? %>

 <%= _('Your email subscriptions')%>

<%= _('None made.')%>

    <% else %>

 Your <%=pluralize(@track_things.size, _('email subscription')) %>

        <% if @track_things_grouped.size == 1 %>
            <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>

                    <%=TrackThing.track_type_description(@track_things[0].track_type)%>
                    <%= hidden_field_tag 'track_type', @track_things[0].track_type %>
                    <%= hidden_field_tag 'user', @display_user.id %>
                    <%= hidden_field_tag 'r', request.request_uri %>
                    <% if @track_things.size > 1 %>
                        <%= submit_tag _('unsubscribe all') %>
                    <% end %>

            <% end %>
        <% end %>
        <% for track_type, track_things in @track_things_grouped %>
            <% if @track_things_grouped.size > 1 %>
                <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>

                        <%=TrackThing.track_type_description(track_type)%>
                        <%= hidden_field_tag 'track_type', track_type %>
                        <%= hidden_field_tag 'user', @display_user.id %>
                        <%= hidden_field_tag 'r', request.request_uri %>
                        <% if track_things.size > 1 %>
                            <%= submit_tag _('unsubscribe all')%>
                        <% end %>

                <% end %>
            <% end %>

            <% for track_thing in track_things %>

                    <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %>

                            <%= track_thing.params[:list_description] %>
                            <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
                            <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s }  %>
                            <%= submit_tag _('unsubscribe') %>

                    <% end %>

            <% end %>

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


Replaced obsolete 'has_taggings?' call.

Replaced obsolete 'has_taggings?' call.

<% articles.each do |article| %>
  <div id="<%= article.dom_id %>" class="article">
    <%= render(:partial => 'articles/title', :locals => {:article => article}) %>
    <%= render(:partial => 'articles/article_for_list', :locals => {:article => article}) %>

    <% unless article.taggings.blank? %>

Tags:
<%= tag_cloud_for(article) %>

    <% end %>

      <% link_text = 'No Comments' %>
      <% link_text = pluralize(article.comments.size, 'Comment') unless article.comments.size == 0 %>
      <%= link_to(h(link_text + ' ...'), articles_url('show', article).update(:anchor => 'comment_section')) %>

<% end %>

<% articles.each do |article| %>
  <div id="<%= article.dom_id %>" class="article">
    <%= render(:partial => 'articles/title', :locals => {:article => article}) %>
    <%= render(:partial => 'articles/article_for_list', :locals => {:article => article}) %>

    <% if article.has_taggings? %>

Tags:
<%= tag_cloud_for(article) %>

    <% end %>

      <% link_text = 'No Comments' %>
      <% link_text = pluralize(article.comments.size, 'Comment') unless article.comments.size == 0 %>
      <%= link_to(h(link_text + ' ...'), articles_url('show', article).update(:anchor => 'comment_section')) %>

<% end %>


switch order of comments and scan fields in booking form

<%= error_messages_for 'booking' %>

Value date

<%= text_field 'booking', 'value_date'  %>

Amount

<%= text_field 'booking', 'amount'  %>

Title

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

Soll

<%= select 'booking', 'credit_account_id', Account.find(:all, :order => :number).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'credit_amount_foreign_currency', :size => 6, :tabindex => 20 %>
<%= text_field 'booking', 'credit_currency', :size => 3, :tabindex => 21 %>

Haben

<%= select 'booking', 'debit_account_id', Account.find(:all, :order => :number).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'debit_amount_foreign_currency', :size => 6, :tabindex => 22 %>
<%= text_field 'booking', 'debit_currency', :size => 3, :tabindex => 23 %>

Scan

<%= file_column_field "booking", "scan" %>

Comments

<%= text_area 'booking', 'comments', :cols => 40, :rows => 5  %>

<%= error_messages_for 'booking' %>

Value date

<%= text_field 'booking', 'value_date'  %>

Amount

<%= text_field 'booking', 'amount'  %>

Title

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

Soll

<%= select 'booking', 'credit_account_id', Account.find(:all, :order => :number).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'credit_amount_foreign_currency', :size => 6, :tabindex => 20 %>
<%= text_field 'booking', 'credit_currency', :size => 3, :tabindex => 21 %>

Haben

<%= select 'booking', 'debit_account_id', Account.find(:all, :order => :number).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'debit_amount_foreign_currency', :size => 6, :tabindex => 22 %>
<%= text_field 'booking', 'debit_currency', :size => 3, :tabindex => 23 %>

Comments

<%= text_area 'booking', 'comments', :cols => 40, :rows => 5  %>

Scan

<%= file_column_field "booking", "scan" %>


Fixed path-bug of subprocess.

Fixed path-bug of subprocess.

<%
  #Support for the PHP-version... Comes handy when converting PHP to Ruby...
  if !_get["path"]
    trans = {
      "picture" => "path"
    }

    if _get["edgesize"]
      _get["rounded_corners"] = (_get["edgesize"].to_f / 3.0).to_i
    end

    if _get["edgeborder"]
      if _get["edgeborder"].length == 6
        _get["border_color"] = "##{_get["edgeborder"]}"
      else
        _get["border_color"] = _get["edbeborder"]
      end
    end

    if _get["edgeborder"]
      _get["border"] = 1
    end

    trans.each do |key, val|
      _get[val] = _get[key] if _get[key]
    end
  end

	idstr = Digest::MD5.hexdigest("#{_get["path"]}_#{_get["smartsize"].to_i}_#{_get["width"].to_i}_#{_get["height"].to_i}_#{_get["maxwidth"].to_i}_#{_get["maxheight"].to_i}_#{_get["rounded_corners"].to_i}_#{_get["border"].to_i}_#{_get["border_color"]}")

	if !_get["path"] or !File.exists?(_get["path"])
    print "File does not exist: '#{_get["path"]}'.\n"
    exit
  end

	time_orig = File.mtime(_get["path"])

	tmp_use = false
	tmp_write = false
	if $knj_webscripts_image_config
		tmp_use = true
		tmp_path = "#{$knj_webscripts_image_config["tmp_path"]}/#{idstr}"
		tmp_exists = File.exists?(tmp_path)
		tmp_write = true if !tmp_exists

		if !tmp_write and tmp_exists
			time_cache = File.mtime(tmp_path)

			if time_orig > time_cache
				tmp_write = true
			end
		end
	end

	if _get["force"] == "true" or _get["force"] == "1"
    force = true
  else
    force = false
  end

	notchanged = false

	if _httpsession.handler.modified_since and time_cache and _httpsession.handler.modified_since.utc.to_s == time_cache.utc.to_s
    notchanged = true
  elsif _httpsession.handler.modified_since and _httpsession.handler.modified_since.utc.to_s == time_orig.utc.to_s
    notchanged = true
  end

  if notchanged and !force
    _httpsession.resp.status = 304
    exit
  end

	if !tmp_use or tmp_write or force
    begin
      @subproc = Knj::Process_meta.new("debug_err" => true)
      @subproc.static("Object", "require", "rubygems")
      @subproc.static("Object", "require", "#{File.dirname(Knj::Os.realpath(__FILE__))}/../../knjrbfw.rb")
      @subproc.static("Object", "require", "knj/autoload")
      @subproc.static("Dir", "chdir", File.dirname(__FILE__))

      list_proxy = @subproc.proxy_from_static("Magick::Image", "read", _get["path"])
      pic = @subproc.proxy_from_call(list_proxy, "first")

      #pic = Magick::Image.read(_get["path"]).first
      if !pic
        print "Could not open image from '#{_get["path"]}'."
        exit
      end

      pic.format = "png"

      pic_columns = pic.columns
      pic_rows = pic.rows

      width = pic_columns
      height = pic_rows

      height = _get["height"].to_i if _get["height"]
      width = _get["width"].to_i if _get["width"]

      if _get["smartsize"]
        if pic_columns > pic_rows
          width = _get["smartsize"].to_i
          height = (pic_rows.to_f / (pic_columns.to_f / width.to_f)).to_i
        else
          height = _get["smartsize"].to_i
          width = (pic_columns.to_f / (pic_rows.to_f / height.to_f)).to_i
        end
      end

      if _get["maxwidth"]
        maxwidth = _get["maxwidth"].to_i

        if width > maxwidth
          height = (pic_rows.to_f / (pic_columns.to_f / maxwidth.to_f)).to_i
          width = maxwidth
        end
      end

      if _get["maxheight"]
        maxheight = _get["maxheight"].to_i

        if height > maxheight
          width = (pic_columns.to_f / (pic_rows.to_f / maxheight.to_f)).to_i
          height = maxheight
        end
      end

      if _get["width"] and _get["height"]
        width = _get["width"].to_i
        height = _get["height"].to_i
      end

      if height != pic_rows or width != pic_columns
        pic = @subproc.proxy_from_call(pic, "resize_to_fit", width.to_i, height.to_i)
        #pic = pic.resize_to_fit(width.to_i, height.to_i)
      end

      if _get["rounded_corners"]
        args = {:img => pic, :radius => _get["rounded_corners"].to_i}

        if _get["border"] and _get["border_color"]
          args[:border] = _get["border"].to_i
          args[:border_color] = _get["border_color"]
        end

        #Spawn arguments-hash for Knj::Image.rounded_corners in subprocess.
        proxy_hash = @subproc.new("{}", args)

        #Call rounded_corners with the proxy-hash.
        @subproc.static("Knj::Image", "rounded_corners", proxy_hash)
        #Knj::Image.rounded_corners(args)
      end

      blob_cont = pic.to_blob
    ensure
      @subproc.destroy if @subproc
      @subproc = nil
      pic = nil
      list_proxy = nil
    end
	end

	if tmp_write and blob_cont
    File.open(tmp_path, "w") do |fp|
      fp.write(blob_cont)
    end
	end

	if tmp_use
    _kas.header("Last-Modified", "#{time_orig.httpdate} GMT") if time_orig
		_kas.header("Content-Type", "image/png")
		_httpsession.force_content(File.new(tmp_path))
	else
    _kas.header("Last-Modified", "#{time_orig.httpdate} GMT") if time_orig
		_kas.header("Content-Type", "image/png")
		_httpsession.force_content(blob_cont)
	end
%>

<%
  #Support for the PHP-version... Comes handy when converting PHP to Ruby...
  if !_get["path"]
    trans = {
      "picture" => "path"
    }

    if _get["edgesize"]
      _get["rounded_corners"] = (_get["edgesize"].to_f / 3.0).to_i
    end

    if _get["edgeborder"]
      if _get["edgeborder"].length == 6
        _get["border_color"] = "##{_get["edgeborder"]}"
      else
        _get["border_color"] = _get["edbeborder"]
      end
    end

    if _get["edgeborder"]
      _get["border"] = 1
    end

    trans.each do |key, val|
      _get[val] = _get[key] if _get[key]
    end
  end

	idstr = Digest::MD5.hexdigest("#{_get["path"]}_#{_get["smartsize"].to_i}_#{_get["width"].to_i}_#{_get["height"].to_i}_#{_get["maxwidth"].to_i}_#{_get["maxheight"].to_i}_#{_get["rounded_corners"].to_i}_#{_get["border"].to_i}_#{_get["border_color"]}")

	if !_get["path"] or !File.exists?(_get["path"])
    print "File does not exist: '#{_get["path"]}'.\n"
    exit
  end

	time_orig = File.mtime(_get["path"])

	tmp_use = false
	tmp_write = false
	if $knj_webscripts_image_config
		tmp_use = true
		tmp_path = "#{$knj_webscripts_image_config["tmp_path"]}/#{idstr}"
		tmp_exists = File.exists?(tmp_path)
		tmp_write = true if !tmp_exists

		if !tmp_write and tmp_exists
			time_cache = File.mtime(tmp_path)

			if time_orig > time_cache
				tmp_write = true
			end
		end
	end

	if _get["force"] == "true" or _get["force"] == "1"
    force = true
  else
    force = false
  end

	notchanged = false

	if _httpsession.handler.modified_since and time_cache and _httpsession.handler.modified_since.utc.to_s == time_cache.utc.to_s
    notchanged = true
  elsif _httpsession.handler.modified_since and _httpsession.handler.modified_since.utc.to_s == time_orig.utc.to_s
    notchanged = true
  end

  if notchanged and !force
    _httpsession.resp.status = 304
    exit
  end

	if !tmp_use or tmp_write or force
    begin
      @subproc = Knj::Process_meta.new("debug_err" => true)
      @subproc.static("Object", "require", "rubygems")
      @subproc.static("Object", "require", "#{File.dirname(Knj::Os.realpath(__FILE__))}/../../knjrbfw.rb")
      @subproc.static("Object", "require", "knj/autoload")

      list_proxy = @subproc.proxy_from_static("Magick::Image", "read", _get["path"])
      pic = @subproc.proxy_from_call(list_proxy, "first")

      #pic = Magick::Image.read(_get["path"]).first
      if !pic
        print "Could not open image from '#{_get["path"]}'."
        exit
      end

      pic.format = "png"

      pic_columns = pic.columns
      pic_rows = pic.rows

      width = pic_columns
      height = pic_rows

      height = _get["height"].to_i if _get["height"]
      width = _get["width"].to_i if _get["width"]

      if _get["smartsize"]
        if pic_columns > pic_rows
          width = _get["smartsize"].to_i
          height = (pic_rows.to_f / (pic_columns.to_f / width.to_f)).to_i
        else
          height = _get["smartsize"].to_i
          width = (pic_columns.to_f / (pic_rows.to_f / height.to_f)).to_i
        end
      end

      if _get["maxwidth"]
        maxwidth = _get["maxwidth"].to_i

        if width > maxwidth
          height = (pic_rows.to_f / (pic_columns.to_f / maxwidth.to_f)).to_i
          width = maxwidth
        end
      end

      if _get["maxheight"]
        maxheight = _get["maxheight"].to_i

        if height > maxheight
          width = (pic_columns.to_f / (pic_rows.to_f / maxheight.to_f)).to_i
          height = maxheight
        end
      end

      if _get["width"] and _get["height"]
        width = _get["width"].to_i
        height = _get["height"].to_i
      end

      if height != pic_rows or width != pic_columns
        pic = @subproc.proxy_from_call(pic, "resize_to_fit", width.to_i, height.to_i)
        #pic = pic.resize_to_fit(width.to_i, height.to_i)
      end

      if _get["rounded_corners"]
        args = {:img => pic, :radius => _get["rounded_corners"].to_i}

        if _get["border"] and _get["border_color"]
          args[:border] = _get["border"].to_i
          args[:border_color] = _get["border_color"]
        end

        #Spawn arguments-hash for Knj::Image.rounded_corners in subprocess.
        proxy_hash = @subproc.new("{}", args)

        #Call rounded_corners with the proxy-hash.
        @subproc.static("Knj::Image", "rounded_corners", proxy_hash)
        #Knj::Image.rounded_corners(args)
      end

      blob_cont = pic.to_blob
    ensure
      @subproc.destroy if @subproc
      @subproc = nil
      pic = nil
      list_proxy = nil
    end
	end

	if tmp_write and blob_cont
    File.open(tmp_path, "w") do |fp|
      fp.write(blob_cont)
    end
	end

	if tmp_use
    _kas.header("Last-Modified", "#{time_orig.httpdate} GMT") if time_orig
		_kas.header("Content-Type", "image/png")
		_httpsession.force_content(File.new(tmp_path))
	else
    _kas.header("Last-Modified", "#{time_orig.httpdate} GMT") if time_orig
		_kas.header("Content-Type", "image/png")
		_httpsession.force_content(blob_cont)
	end
%>


Wording tweak.

Wording tweak.

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

<%=@title%>

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

<% @title = 'Raw email for incoming message ' + @raw_email.incoming_message.id.to_s + ' request \'' + h(@raw_email.incoming_message.info_request.title) + "'" %>

<%=@title%>

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


Updating bio

Updating bio

---
extension: html
filter:
  - erb
---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">

   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title>ReinH — <%= @page.title %></title>
   <meta name="author" content="<%= @page.author %>" />

   <link href="/css/facebox.css" media="screen" rel="stylesheet" type="text/css" />

   <link rel="stylesheet" href="/css/blueprint/screen.css" type="text/css" media="screen, projection" />
   <link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print" />

   <link rel="stylesheet" href="/css/coderay.css" type="text/css" />

   <link rel="stylesheet" href="/css/site.css" type="text/css" media="screen, projection" />

   <link rel="openid.server" href="http://www.myopenid.com/server" />
   <link rel="openid.delegate" href="http://ReinH.myopenid.com/" />
   <meta http-equiv="X-XRDS-Location" content="http://www.myopenid.com/xrds?username=ReinH.myopenid.com" />

   <link rel="alternate" type="application/atom+xml" title="RSS feed" href="http://reinh.com/feed/atom.xml" />

<div class="container" <%= 'id="home"' if @page.title == "Home" %>>

       ReinH.com

About

Recently

        <li class="column span-2 last <%= "active" if @page.title == "Archive" %>">Archive

      <%= @content %>

     [top]

About

           An avid guitarist, pianist and table tennis
           player, Rein writes a popular Ruby blog (you're reading it)
           and speaks frequently at Ruby conferences and user groups.

           Please twitter me (@ReinH) or
           email me (reinh [at] reinh [dot] com) your questions and comments.

Subscribe

Twitter Me

People I Read

      <%= BlogRoll.to_html %>

       <% recent_pages = @pages.find(:all,
                                     :in_directory => "blog",
                                     :recursive => true,
                                     :sort_by => 'created_at',
                                     :reverse => true){|p| p.path !~ /\/index\.txt$/}.first(5) %>

Recently

       <% recent_pages.group_by{|p| p.created_at.strftime('%B%y').upcase}.each do |group, pages| %>

<%= group %>

            <% pages.each do |page| %>

<a href="<%=  page.url %>"><%= page.title %>

            <% end %>
       <% end %>

        Created with Webby

        All design & content Copyright Rein Henrichs 2008

---
extension: html
filter:
  - erb
---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">

   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title>ReinH — <%= @page.title %></title>
   <meta name="author" content="<%= @page.author %>" />

   <link href="/css/facebox.css" media="screen" rel="stylesheet" type="text/css" />

   <link rel="stylesheet" href="/css/blueprint/screen.css" type="text/css" media="screen, projection" />
   <link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print" />

   <link rel="stylesheet" href="/css/coderay.css" type="text/css" />

   <link rel="stylesheet" href="/css/site.css" type="text/css" media="screen, projection" />

   <link rel="openid.server" href="http://www.myopenid.com/server" />
   <link rel="openid.delegate" href="http://ReinH.myopenid.com/" />
   <meta http-equiv="X-XRDS-Location" content="http://www.myopenid.com/xrds?username=ReinH.myopenid.com" />

   <link rel="alternate" type="application/atom+xml" title="RSS feed" href="http://reinh.com/feed/atom.xml" />

<div class="container" <%= 'id="home"' if @page.title == "Home" %>>

       ReinH.com

About

Recently

        <li class="column span-2 last <%= "active" if @page.title == "Archive" %>">Archive

      <%= @content %>

     [top]

About

           Rein Henrichs has been working with Rails since 2005 and is now heavily involved in the Merb, DataMapper, and RSpec communities.

Subscribe

Twitter Me

People I Read

      <%= BlogRoll.to_html %>

       <% recent_pages = @pages.find(:all,
                                     :in_directory => "blog",
                                     :recursive => true,
                                     :sort_by => 'created_at',
                                     :reverse => true){|p| p.path !~ /\/index\.txt$/}.first(5) %>

Recently

       <% recent_pages.group_by{|p| p.created_at.strftime('%B%y').upcase}.each do |group, pages| %>

<%= group %>

            <% pages.each do |page| %>

<a href="<%=  page.url %>"><%= page.title %>

            <% end %>
       <% end %>

        Created with Webby

        All design & content Copyright Rein Henrichs 2008


Add profile identifier to form after route reorganization

<%= h profile.name %>

<%=  _('Settings of Solidary Distribution Network') %>

  <% form_for :node, @node, :url => {:controller => :distribution_plugin_node, :action => :settings, :profile => profile.identifier}, :html => {:multipart => true} do |f| %>
    <%= labelled_field f, :activated, _('Collective Consumption Mode'),
      labelled_radio(f, :role, _('Disabled'), 'consumer') +
      labelled_radio(f, :role, _('Activated'), 'collective') %>

      <%= labelled_field f, :name_abbreviation, _("Abbreviated name of the Collective"), f.text_field(:name_abbreviation),
        {:help => _("This name will be used to avoid always use the full name of the Collective. How the Collective is generally called by the people?")} %>

      <% f.fields_for :image_builder, @node.image do |f| %>
        <%= labelled_field f, :uploaded_data, _("Header's image"), f.file_field(:uploaded_data, { :size => 10 }),
          {:help => _("This image will be used on the Collective's page, must be 960x110px, " +
                      "it will be automatically cropped to this size. Above this image, will be disposed " +
                      "the title and menu of the Collective's page")} %>
      <% end %>

      <%= f.submit _('Save') %>
      <%= link_to _('cancel'), {:controller => :profile_editor, :profile => profile.identifier} %>
  <% end %>

<%= h profile.name %>

<%=  _('Settings of Solidary Distribution Network') %>

  <% form_for :node, @node, :url => {:controller => :distribution_plugin_node, :action => :settings}, :html => {:multipart => true} do |f| %>
    <%= labelled_field f, :activated, _('Collective Consumption Mode'),
      labelled_radio(f, :role, _('Disabled'), 'consumer') +
      labelled_radio(f, :role, _('Activated'), 'collective') %>

      <%= labelled_field f, :name_abbreviation, _("Abbreviated name of the Collective"), f.text_field(:name_abbreviation),
        {:help => _("This name will be used to avoid always use the full name of the Collective. How the Collective is generally called by the people?")} %>

      <% f.fields_for :image_builder, @node.image do |f| %>
        <%= labelled_field f, :uploaded_data, _("Header's image"), f.file_field(:uploaded_data, { :size => 10 }),
          {:help => _("This image will be used on the Collective's page, must be 960x110px, " +
                      "it will be automatically cropped to this size. Above this image, will be disposed " +
                      "the title and menu of the Collective's page")} %>
      <% end %>

      <%= f.submit _('Save') %>
      <%= link_to _('cancel'), {:controller => :profile_editor, :profile => profile.identifier} %>
  <% end %>