Added simple fix to force users' browsers to refresh stylesheet when we make
changes to it.

git-svn-id: bc266cc4dcdee41d9588461a87969679bbc3047f@872 7a65b82a-1d14-0410-b525-e2835e71a0b4

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

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

  <%= check_if_user_turned_javascript_on %>

  <%=
    css = nil
    if is_in_admin_mode?
      css = 'Admin'
    elsif is_robot?
      css = 'Agaricus'
    else
      if CSS.member?(controller.action_name)
        css = controller.action_name
      else
        unless @user.nil?
          css = @user.theme
        end
      end
      unless CSS.member?(css)
        css = CSS[rand(CSS.length)]
      end
    end
    stylesheet_link_tag('general.css?v=1', "#{css}.css?v=1")
  %>

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

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

  <% if is_in_admin_mode? %>

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

  <% end %>

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

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

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

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

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

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

                <%= link_to(:app_list_locations.t, :controller => 'location', :action => 'list_locations') %>

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

                <%= :app_latest.t %>:

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

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

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

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

                <%= :app_observations_left.t %>:

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

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

                <%= :app_species_list.t %>:

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

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

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

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

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

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

                <% else %>
                  <%= :app_current_user.t %>:

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

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

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

                  <%= indent + link_to(:app_your_interests.t, :controller => 'interest', :action => 'list_interests') %>

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

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

                  <%= indent + link_to(:app_join_mailing_list.t, 'http://lists.mushroomobserver.org/listinfo.cgi/general-mushroomobserver.org') %>

                  <%= indent + link_to(:app_logout.t, :controller => 'account', :action => 'logout_user') %>

                  <% if @user.admin %>

                    <%= :app_admin.t %>:

                    <% if is_in_admin_mode? %>
                      <%= indent + link_to(:app_users.t, :controller => 'observer', :action => 'users_by_name') %>

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

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

                      <%= indent + link_to(:app_turn_admin_off.t, :controller => 'account', :action => 'turn_admin_off') %>

                    <% else %>
                      <%= indent + link_to(:app_turn_admin_on.t, :controller => 'account', :action => 'turn_admin_on') %>

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

                <%= :app_languages.t %>:

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

                <% end %>

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

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

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

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

                  <%= :app_powered_by.t %>:

                  Ruby on Rails

                  <%= :app_preferred_browser.t %>:

                  FireFox
                  <% if @invalid.nil? %>

                  <% end %>

              <% form_tag(:controller => 'observer', :action => 'pattern_search') do %>
                <%= :app_find.t %>:
                  <%= text_field(:search, :pattern, :size => 30,
                                 :value => session[:pattern])%>
                <%= options = [
                  [ :OBSERVATIONS.l, :observation ],
                  [ :IMAGES.l, :image ],
                  [ :NAMES.l, :name ],
                  [ :LOCATIONS.l, :location ],
                  [ :SPECIES_LISTS.l, :species_list ],
                  [ :COMMENTS.l, :comment ],
                  [ :USERS.l, :user ],
                  [ :PROJECTS.l, :project ],
                  [ :app_search_google.l, :google ],
                ]
                select(:search, :type, options,
                       :selected => session[:search_type] || :observation) %>
                <%= submit_tag :app_search.l %>
                <% if (DEVELOPMENT || is_reviewer?) && query_params != {} %>
                  <%= link_to(:app_refine_search.l.nowrap, :controller => 'observer',
                              :action => 'refine_search',
                              :params => query_params) %> |
                <% end %>
                <%= link_to(:app_advanced_search.l.nowrap, :controller => 'observer',
                            :action => 'advanced_search_form') %>
              <% end %>

            <% if @timer_start %>

                <%= @timer_end ||= Time.now
                secs = '%.2f' % (@timer_end.to_f - @timer_start.to_f)
                @timer_start = nil
                if @num_results
                  '(' + :app_index_timer.t(:seconds => secs,
                                           :num => @num_results.to_i) + ')'
                else
                  '(' + :app_timer.t(:seconds => secs) + ')'
                end %>

            <% end %>

              <% if flash_notices? %>
                  <% boxify(flash_notice_level) do %>
                    <%= flash_get_notices %>
                  <% end %>
              <% end
              flash_clear %>

            <% if @right_tabs %>

                <%= @right_tabs.join('
') %>

            <% end %>

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

<%= @title %>

            <%= @content_for_layout %>

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

                <%= :app_translators_credit.tpl %>

            <% end %>

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

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

  <% end %>

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

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

  <%= check_if_user_turned_javascript_on %>

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

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

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

  <% if is_in_admin_mode? %>

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

  <% end %>

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

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

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

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

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

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

                <%= link_to(:app_list_locations.t, :controller => 'location', :action => 'list_locations') %>

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

                <%= :app_latest.t %>:

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

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

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

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

                <%= :app_observations_left.t %>:

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

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

                <%= :app_species_list.t %>:

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

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

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

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

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

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

                <% else %>
                  <%= :app_current_user.t %>:

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

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

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

                  <%= indent + link_to(:app_your_interests.t, :controller => 'interest', :action => 'list_interests') %>

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

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

                  <%= indent + link_to(:app_join_mailing_list.t, 'http://lists.mushroomobserver.org/listinfo.cgi/general-mushroomobserver.org') %>

                  <%= indent + link_to(:app_logout.t, :controller => 'account', :action => 'logout_user') %>

                  <% if @user.admin %>

                    <%= :app_admin.t %>:

                    <% if is_in_admin_mode? %>
                      <%= indent + link_to(:app_users.t, :controller => 'observer', :action => 'users_by_name') %>

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

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

                      <%= indent + link_to(:app_turn_admin_off.t, :controller => 'account', :action => 'turn_admin_off') %>

                    <% else %>
                      <%= indent + link_to(:app_turn_admin_on.t, :controller => 'account', :action => 'turn_admin_on') %>

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

                <%= :app_languages.t %>:

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

                <% end %>

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

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

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

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

                  <%= :app_powered_by.t %>:

                  Ruby on Rails

                  <%= :app_preferred_browser.t %>:

                  FireFox
                  <% if @invalid.nil? %>

                  <% end %>

              <% form_tag(:controller => 'observer', :action => 'pattern_search') do %>
                <%= :app_find.t %>:
                  <%= text_field(:search, :pattern, :size => 30,
                                 :value => session[:pattern])%>
                <%= options = [
                  [ :OBSERVATIONS.l, :observation ],
                  [ :IMAGES.l, :image ],
                  [ :NAMES.l, :name ],
                  [ :LOCATIONS.l, :location ],
                  [ :SPECIES_LISTS.l, :species_list ],
                  [ :COMMENTS.l, :comment ],
                  [ :USERS.l, :user ],
                  [ :PROJECTS.l, :project ],
                  [ :app_search_google.l, :google ],
                ]
                select(:search, :type, options,
                       :selected => session[:search_type] || :observation) %>
                <%= submit_tag :app_search.l %>
                <% if (DEVELOPMENT || is_reviewer?) && query_params != {} %>
                  <%= link_to(:app_refine_search.l.nowrap, :controller => 'observer',
                              :action => 'refine_search',
                              :params => query_params) %> |
                <% end %>
                <%= link_to(:app_advanced_search.l.nowrap, :controller => 'observer',
                            :action => 'advanced_search_form') %>
              <% end %>

            <% if @timer_start %>

                <%= @timer_end ||= Time.now
                secs = '%.2f' % (@timer_end.to_f - @timer_start.to_f)
                @timer_start = nil
                if @num_results
                  '(' + :app_index_timer.t(:seconds => secs,
                                           :num => @num_results.to_i) + ')'
                else
                  '(' + :app_timer.t(:seconds => secs) + ')'
                end %>

            <% end %>

              <% if flash_notices? %>
                  <% boxify(flash_notice_level) do %>
                    <%= flash_get_notices %>
                  <% end %>
              <% end
              flash_clear %>

            <% if @right_tabs %>

                <%= @right_tabs.join('
') %>

            <% end %>

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

<%= @title %>

            <%= @content_for_layout %>

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

                <%= :app_translators_credit.tpl %>

            <% end %>

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

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

  <% end %>


Allow an argument to control message to user about what is in progress

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

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

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

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

  item_name ||= svc_types[0].display_name_pluralize
%>

<% # only display if there are more!
 if service_types_in_progress?(svc_types) %>
  <div id="<%= div_id %>" class="spinner" style="line-height: 1.5em;">
    <% unless @force_bg_progress_spinner %>
      <%= current_set_empty ? "" : "More " %><%= svc_types[0].display_name_pluralize %> may be available.
      <%= link_to "Load #{current_set_empty ? "" : "complete "}#{svc_types[0].display_name_pluralize}", {:action => "background_status", :"umlaut.request_id" => @user_request.id, :"umlaut.skip_resolve_menu" => params['umlaut.skip_resolve_menu']} %>
    <% end %>
    <% if @force_bg_progress_spinner %>
      <%=
      image_tag('spinner.gif') %>
      Searching for <%= (current_set_empty ? "" : "more ") + item_name %>
    <% end %>

  <% unless @force_bg_progress_spinner == false # Not just nil, but false
  %>

  <% end %>
<% end %>

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

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

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

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

<% # only display if there are more!
 if service_types_in_progress?(svc_types) %>
  <div id="<%= div_id %>" class="spinner" style="line-height: 1.5em;">
    <% unless @force_bg_progress_spinner %>
      <%= current_set_empty ? "" : "More " %><%= svc_types[0].display_name_pluralize %> may be available.
      <%= link_to "Load #{current_set_empty ? "" : "complete "}#{svc_types[0].display_name_pluralize}", {:action => "background_status", :"umlaut.request_id" => @user_request.id, :"umlaut.skip_resolve_menu" => params['umlaut.skip_resolve_menu']} %>
    <% end %>
    <% if @force_bg_progress_spinner %>
      <%=
      image_tag('spinner.gif') %>
      Searching for <%= (current_set_empty ? "" : "more ") + svc_types[0].display_name_pluralize %>
    <% end %>

  <% unless @force_bg_progress_spinner == false # Not just nil, but false
  %>

  <% end %>
<% end %>


CCRB-36: change the warning message

CCRB-36: change the warning message

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

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

        <%= link_to project.name, :action => 'show', :id => project.name %>
        <%= link_to image_tag("rss.gif", :border => 0), :action => 'show', :id => project.name, :format => 'rss' %>

      <% recent_builds = project.last_five_builds %>

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

      <% unless recent_builds.empty? %>

          <% recent_builds.each do |build| %>
            <% if build == recent_builds.first %>

<%= link_to_build_with_elapsed_time(project, build) %>

            <% else %>

<%= link_to_build(project, build) %>

            <% end %>
          <% end %>

      <% end %>

      <% form_remote_tag(
             :url => { :action => 'build', :id => project },
             :before => "$('build_#{project.to_param}').disabled = true; " +
                        "$('build_#{project.to_param}').className = 'build_button_disabled'; " +
                        "Element.update('build_#{project.to_param}', 'Wait...')"
           ) do %>
        <button
            <% if Configuration.disable_build_now -%>
              onclick="alert('Build Now button is disabled on this site.'); return false;"
            <% end -%>
            id="build_<%= project.to_param %>" type="submit" class="build_button" value="txt" alt="Build Now">
          <% if project.builder_state_and_activity == 'builder_down' %>
            Start Builder
          <% else %>
            Build Now
          <% end %>
        </button>
      <% end %>

    <%= display_builder_state(project.builder_state_and_activity) %>

    <% latest_build = recent_builds.first %>
    <% if latest_build %>
      <% if latest_build.incomplete? %>

          Now building: <%= latest_build.label %>
          for <%= format_seconds(latest_build.elapsed_time_in_progress, :general) %>

      <% end %>
      <%= show_revisions_in_build(revisions_in_build(latest_build)) %>

      <% if latest_build.brief_error %>

<%= link_to latest_build.brief_error, {:action => 'show', :id => project.name}, {:class => "failed"} %>

      <% end %>
    <% end %>

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

        <%= link_to project.name, :action => 'show', :id => project.name %>
        <%= link_to image_tag("rss.gif", :border => 0), :action => 'show', :id => project.name, :format => 'rss' %>

      <% recent_builds = project.last_five_builds %>

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

      <% unless recent_builds.empty? %>

          <% recent_builds.each do |build| %>
            <% if build == recent_builds.first %>

<%= link_to_build_with_elapsed_time(project, build) %>

            <% else %>

<%= link_to_build(project, build) %>

            <% end %>
          <% end %>

      <% end %>

      <% form_remote_tag(
             :url => { :action => 'build', :id => project },
             :before => "$('build_#{project.to_param}').disabled = true; " +
                        "$('build_#{project.to_param}').className = 'build_button_disabled'; " +
                        "Element.update('build_#{project.to_param}', 'Wait...')"
           ) do %>
        <button
            <% if Configuration.disable_build_now -%>
              onclick="alert('Build Now button is disabled on the demo site.'); return false;"
            <% end -%>
            id="build_<%= project.to_param %>" type="submit" class="build_button" value="txt" alt="Build Now">
          <% if project.builder_state_and_activity == 'builder_down' %>
            Start Builder
          <% else %>
            Build Now
          <% end %>
        </button>
      <% end %>

    <%= display_builder_state(project.builder_state_and_activity) %>

    <% latest_build = recent_builds.first %>
    <% if latest_build %>
      <% if latest_build.incomplete? %>

          Now building: <%= latest_build.label %>
          for <%= format_seconds(latest_build.elapsed_time_in_progress, :general) %>

      <% end %>
      <%= show_revisions_in_build(revisions_in_build(latest_build)) %>

      <% if latest_build.brief_error %>

<%= link_to latest_build.brief_error, {:action => 'show', :id => project.name}, {:class => "failed"} %>

      <% end %>
    <% end %>


Disable auto-complete for signup fields to fix a bug with Chrome auto-filling.

<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %>
    <%= foi_error_messages_for :user_signup %>

        <%= _('Your e-mail:')%>
        <%= text_field 'user_signup', 'email', { :size => 20, :tabindex => 60 } %>

        <%= _('We will not reveal your email address to anybody unless you or
        the law tell us to (details). ') %[help_privacy_path] %>

         <%= _('Your name:')%>
        <%= text_field 'user_signup', 'name', { :size => 20, :tabindex => 70, :autocomplete => "off" } %>

         <%= _('Your name will appear publicly
        (why?)
        on this website and in search engines. If you
        are thinking of using a pseudonym, please
        read this first.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"] %>

         <%= _('Password:')%>
        <%= password_field 'user_signup', 'password', { :size => 15, :tabindex => 80, :autocomplete => "off" } %>

         <%= _('Password: (again)')%>
        <%= password_field 'user_signup', 'password_confirmation', { :size => 15, :tabindex => 90, :autocomplete => "off" } %>

    <% if @request_from_foreign_country %>
    <%= recaptcha_tags %>
    <% end %>

        <%= hidden_field_tag 'token', params[:token], {:id => 'signup_token' } %>
        <%= hidden_field_tag :modal, params[:modal], {:id => 'signup_modal' } %>
        <%= submit_tag _('Sign up'), :tabindex => 100 %>

<% end %>

<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %>
    <%= foi_error_messages_for :user_signup %>

        <%= _('Your e-mail:')%>
        <%= text_field 'user_signup', 'email', { :size => 20, :tabindex => 60 } %>

        <%= _('We will not reveal your email address to anybody unless you or
        the law tell us to (details). ') %[help_privacy_path] %>

         <%= _('Your name:')%>
        <%= text_field 'user_signup', 'name', { :size => 20, :tabindex => 70 } %>

         <%= _('Your name will appear publicly
        (why?)
        on this website and in search engines. If you
        are thinking of using a pseudonym, please
        read this first.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"] %>

         <%= _('Password:')%>
        <%= password_field 'user_signup', 'password', { :size => 15, :tabindex => 80 } %>

         <%= _('Password: (again)')%>
        <%= password_field 'user_signup', 'password_confirmation', { :size => 15, :tabindex => 90 } %>

    <% if @request_from_foreign_country %>
    <%= recaptcha_tags %>
    <% end %>

        <%= hidden_field_tag 'token', params[:token], {:id => 'signup_token' } %>
        <%= hidden_field_tag :modal, params[:modal], {:id => 'signup_modal' } %>
        <%= submit_tag _('Sign up'), :tabindex => 100 %>

<% end %>


still trying to get uploads working (x7)

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

<%= error_messages_for :header %>

<% form_for(:header, :url => { :action => 'upload' }, :html => { :multipart => true }) do |f| -%>

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

    <%= submit_tag 'Upload' %>

<% end -%>

<%= error_messages_for :header %>

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

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

    <%= submit_tag 'Upload' %>

<% end -%>


Use the right parameter order for permitted?

<% if @editing and logged_in? and logged_in_person.permitted?(@question.questionnaire, "edit_answers") -%>
  <%= text_area_tag "answer[#{@question.id}]", value, :rows => 4 %>
<% else -%>
  <% if logged_in? and logged_in_person.permitted?(@question.questionnaire, "view_answers") -%>
    <%= simple_format value %>
  <% end -%>
<% end -%>

<% if @editing -%>
  <% if logged_in? and logged_in_person.permitted?("edit_answers", @question.questionnaire) -%>
    <%= text_area_tag "answer[#{@question.id}]", value, :rows => 4 %>
  <% end -%>
<% else -%>
  <% if logged_in? and logged_in_person.permitted?("view_answers", @question.questionnaire) -%>
    <%= simple_format value %>
  <% end -%>
<% end -%>


Clearer it is run by mySocety

Clearer it is run by mySocety

<% @title = "About" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
something about the site, contact us.

Introduction to WhatDoTheyKnow

What is WhatDoTheyKnow for?

To help you find out inside information about what the UK government
is doing.

How does the site work?

You choose the public authority that you would like information from, then
write a brief note describing what you want to know. We then send your request
to the public authority. Any response they make is automatically published on the
website for you and anyone else to find and read.

Why would I bother to do this?

You pay taxes, and then government does things with the money. All sorts of
things that affect your life, from healthcare through to national defence. Some
it does badly, some it does well. The more we find out about how government
works, the better able we are to make suggestions to improve the things that
are done badly, and to celebrate the things that are done well.

Why would the public authority bother to reply?

Under Freedom of Information (FOI) law, they have to respond.

Who makes it?

WhatDoTheyKnow is created and run by mySociety,
and was initially funded by the JRSST Charitable Trust. mySociety is a project of the
registered charity UK Citizens Online Democracy.
If you like what we're doing, then you can
make a donation.

Making requests

You're missing the public authority that I want to request from!

Please contact us with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.
If you'd like to help add a whole category of public authority to the site, for example all
primary care trusts or all schools, then please
edit this shared spreadsheet (Google account required).

How quickly will I get a response?

By law public authorities must respond "promptly", and in any event not later
than 20 working days after receiving your request. The date of that hard limit
is shown on the page for your request. You will be emailed if this date goes by
without a response, so you can send the public authority another note to remind
them that they are breaking the law. Note: If you had to
clarify your request, the clock starts from that date, instead of the date they
received your initial request.

What if I'm not satisfied with the response?

If you didn't get the information you asked for, or you didn't get it in time,
then read our page 'Unhappy about the response you got?'.

Can you tell me more of the nitty gritty about the process of making requests?

Have a look at the
access to official information
pages on the Information Commisioner's website.

Can I request information about myself?

Not using this site. Requests made using WhatDoTheyKnow are public, made under the
Freedom of Information Act, and cannot help you find information about a
private individual. If you would like to know what information a public
authority holds about yourself, you should make a "Subject Access Request" in
private using Data Protection law.  The leaflet Subject
Access - A guide for data subjects (on the Information Commisioner's
website) explains how to do this.

I'd like to keep my request secret! (At least until I publish my story)

WhatDoTheyKnow is currently only designed for public requests. All
responses that we receive are automatically published on the website for anyone
to read.  You should contact the public authority directly if you would like to
make a request in private.  If you're interested in buying a system which helps
you manage FOI requests in secret, then contact us.

Why can I only request information about the environment from some authorities?

Some public authorities, such as South East Water,
don't come under the Freedom of Information Act, but do come under another law called
the Environmental Information Regulations (EIR). It's a very similar law, so you make a request
to them using WhatDoTheyKnow in just the same way as an FOI request. The only difference
is that on the page where you write you request, it reminds you that you can only
request "environmental information" and tells you what that means. It is quite broad.

So can I request information using EIR from other authorities?

Yes, just make a Freedom of Information (FOI) request as normal. The
authority has a duty to work out if the Environmental Information Regulations
(EIR) is the more appropriate legislation to reply under.

Privacy questions

Who gets to see my email address?

We will not disclose your email address to anyone, including the public
authority you are sending a request to, unless we are obliged to by law,
or you ask us to. If you send a message to another user on the site, then
it will reveal your email address to them. You will be told that this
is going to happen.

Will you send nasty, brutish spam to my email address?

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
relating to a request you made, an email alert that you have signed up for,
or for other reasons that you specifically authorise. We will never give or
sell your email addresses to anyone else, unless we are obliged to by law, or
you ask us to.

Why will my name appear publically on the site?

It means that someone researching the same area can get in touch with you,
and maybe give you more information or ideas relating to your request.  Also,
we're going to publish the response with the name of the civil servant who
wrote it, so it seems only fair that your name should be public too!
Therefore, we encourage you to use your real name, but you may use a pseudonym
if you would like to be anonymous.

So I can make an FOI request using a pseudonym?

It is good practice for the public authority to reply to an anonymous request,
except in special circumstances such as if they suspect you of making vexatious
requests. See Freedom of Information Good Practice Guidance No 6
for details.  You should refer to this if a public authority attempts to refuse
a request because you used a pseudonym.

However, there are good reasons to use your real name, see the question
above.  If nothing else, it avoids the risk of an authority being picky,
ignoring the guidance and refusing your request.

They've asked for my postal address!

If a public authority asks you for your full, physical address, reply to them saying
that section 8.1.b of the FOI Act asks for an "address for correspondence",
and that the email address you are using is sufficient.

The Ministry of Justice has guidance
on this –
"As well as hard copy written correspondence, requests that are
transmitted electronically (for example, in emails) are acceptable
... If a request is received by email and no postal address is given, the email
address should be treated as the return address."

As if that isn't enough, the Information Commissioner's
Hints for Practitioners say
"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."

What will you do to me if I annotate requests with nonsense?

It won't be pretty :).

Seriously, annotations on WhatDoTheyKnow are to help
people get the information they want, or to give them pointers to places they
can go to help them act on it. We reserve the right to remove anything else.
Endless, content-free political discussions are not allowed, but
do post a link to a suitable forum elsewhere.

For example, if you think you know the reason someone posted a request,
and you don't approve of it, do not write a complex rant in the annotation.
Instead, simply write a short sentence, and link to another website which
already explains it in detail.

FOI officer questions

I just got here from bottom of an FOI request, what is going on?

WhatDoTheyKnow is a service run by a charity. It helps ordinary members
of the public make FOI requests, and easily track and share the responses.

The FOI request you got was made by someone using WhatDoTheyKnow. You can
simply reply to the request as you would any other request from an individual.
The only difference is that your response will be automatically published on
the Internet.

If you have privacy or copyright concerns, please read the answers below.
You might also like to read this page from the top to find out more about what
the site does from the point of view of a user. You can also search the
site to find the authority that you work for, and view the status of
any requests made using the site.

Finally, we welcome comments and
thoughts from FOI officers, please get in touch.

Why are you publishing responses to FOI requests?

Freedom of Information responses contain public information, which anybody could
easily request again from the public authority. Therefore,
there is no reason they shouldn't be published on the Internet. There are lots
of benefits - everything from preventing duplicate requests, to getting the public
more involved and interested in the work of government.

Are the people making requests real people?

Yes. The people are real people, for whom we have a verified email address
unique to each person.

Each request made by each person is also given a unique email, so that we
can keep track of and publish the responses. You can search this
site and find a page listing all requests that each person has made.

An email isn't a sufficient address for an FOI request!

Yes it is. This
letter from the ICO to Rother District Council gives guidance on the matter, specifically
in the context of requests made via WhatDoTheyKnow.

Aren't you making lots of vexatious requests?

WhatDoTheyKnow is not making any requests. We are sending requests on
behalf of our users, who are real people making the requests.

Look at it like this - if lots of different people made requests from
different Hotmail email addresses, then you would not think that Microsoft were
making vexatious requests. It is exactly the same if lots of requests are made
via WhatDoTheyKnow. Moreover, since all requests are public it is much easier
for you to see if one of our users is making vexatious requests, and for us to
block them when that happens.

If that isn't enough for you, the
letter from the ICO to Rother District Council gives some guidance on the matter.

Won't I be breaking copyright law by sending a response that you then publish?

No, you will simply be replying to an FOI request by email (the "expressed
preference" of the requester, under
section
11(1) of the Freedom of Information Act). That we are later republishing your
response is a separate matter of copyright law, and not something which FOIA lists
as a reason for rejecting a request.

Isn't it a problem that you publish the names of civil servants
and the text of emails?

Officers or servants responding to requests are doing so on behalf of the
public as part of their job, and we publish their response on that
basis. Usually the names and phone numbers of FOI officers are already
available on authority websites. We also encourage our users to give their real
name too, so it is fair both ways.

Do you publish email addresses or mobile phone numbers?

We automatically remove email addresses and labelled mobile phone numbers
that are in the email part of responses from public authorities. Please
contact us if we've missed one. We don't currently
remove these from attachments,
such as Word documents.

Can you take down private information about me?

If you see any information on the site which you'd like us to remove or
hide, then please let us know. We'll then
remove it, provided it is genuinely private information.

Credit where credit is due

Which people made WhatDoTheyKnow?

Oh, nearly everyone (and maybe you too)!

    Heather Brooke
    (vampy!) has
    been pushing the idea of a UK FOI archive for years now.

    Both Phil Rodgers and Francis Irving
    entered it in a mySociety competition for ideas for public interest websites to build.

    It won,
    and then Chris Lightfoot (RIP :()
    thought up the wheeze of intercepting email responses to requests and
    automatically publishing them.

    Tom Steinberg got the cash to pay for the site from
    a dead chocolate mogul (thank you!) ...

    ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville
    and Tom Steinberg could do the complex mixture of design and coding to build
    what you see today.

    Thanks particularly to Julian Todd (great blog!),
    Francis Davey, and Etienne Pollard for using the site early on and giving
    feedback (and/or legal advice!), and also to all our other users and
    testers.

    Lots of people have been looking up FOI email addresses, and a few
    volunteering to run the site - most especially Adam McGreggor, Alex
    Skene, John Cross and Tony Bowden.

Finally we couldn't do any of this without those
crazy people who volunteer,
amongst many other things, to do the accounts and fill in our VAT return.

You're all stars.

<% @title = "About" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
something about the site, contact us.

Introduction to WhatDoTheyKnow

What is WhatDoTheyKnow for?

To help you find out inside information about what the UK government
is doing.

How does the site work?

You choose the public authority that you would like information from, then
write a brief note describing what you want to know. We then send your request
to the public authority. Any response they make is automatically published on the
website for you and anyone else to find and read.

Why would I bother to do this?

You pay taxes, and then government does things with the money. All sorts of
things that affect your life, from healthcare through to national defence. Some
it does badly, some it does well. The more we find out about how government
works, the better able we are to make suggestions to improve the things that
are done badly, and to celebrate the things that are done well.

Why would the public authority bother to reply?

Under Freedom of Information (FOI) law, they have to respond.

Who makes it?

WhatDoTheyKnow is made by mySociety,
and was initially funded by the JRSST Charitable Trust. mySociety is a project of the
registered charity UK Citizens Online Democracy.
If you like what we're doing, then you can
make a donation.

Making requests

You're missing the public authority that I want to request from!

Please contact us with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.
If you'd like to help add a whole category of public authority to the site, for example all
primary care trusts or all schools, then please
edit this shared spreadsheet (Google account required).

How quickly will I get a response?

By law public authorities must respond "promptly", and in any event not later
than 20 working days after receiving your request. The date of that hard limit
is shown on the page for your request. You will be emailed if this date goes by
without a response, so you can send the public authority another note to remind
them that they are breaking the law. Note: If you had to
clarify your request, the clock starts from that date, instead of the date they
received your initial request.

What if I'm not satisfied with the response?

If you didn't get the information you asked for, or you didn't get it in time,
then read our page 'Unhappy about the response you got?'.

Can you tell me more of the nitty gritty about the process of making requests?

Have a look at the
access to official information
pages on the Information Commisioner's website.

Can I request information about myself?

Not using this site. Requests made using WhatDoTheyKnow are public, made under the
Freedom of Information Act, and cannot help you find information about a
private individual. If you would like to know what information a public
authority holds about yourself, you should make a "Subject Access Request" in
private using Data Protection law.  The leaflet Subject
Access - A guide for data subjects (on the Information Commisioner's
website) explains how to do this.

I'd like to keep my request secret! (At least until I publish my story)

WhatDoTheyKnow is currently only designed for public requests. All
responses that we receive are automatically published on the website for anyone
to read.  You should contact the public authority directly if you would like to
make a request in private.  If you're interested in buying a system which helps
you manage FOI requests in secret, then contact us.

Why can I only request information about the environment from some authorities?

Some public authorities, such as South East Water,
don't come under the Freedom of Information Act, but do come under another law called
the Environmental Information Regulations (EIR). It's a very similar law, so you make a request
to them using WhatDoTheyKnow in just the same way as an FOI request. The only difference
is that on the page where you write you request, it reminds you that you can only
request "environmental information" and tells you what that means. It is quite broad.

So can I request information using EIR from other authorities?

Yes, just make a Freedom of Information (FOI) request as normal. The
authority has a duty to work out if the Environmental Information Regulations
(EIR) is the more appropriate legislation to reply under.

Privacy questions

Who gets to see my email address?

We will not disclose your email address to anyone, including the public
authority you are sending a request to, unless we are obliged to by law,
or you ask us to. If you send a message to another user on the site, then
it will reveal your email address to them. You will be told that this
is going to happen.

Will you send nasty, brutish spam to my email address?

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
relating to a request you made, an email alert that you have signed up for,
or for other reasons that you specifically authorise. We will never give or
sell your email addresses to anyone else, unless we are obliged to by law, or
you ask us to.

Why will my name appear publically on the site?

It means that someone researching the same area can get in touch with you,
and maybe give you more information or ideas relating to your request.  Also,
we're going to publish the response with the name of the civil servant who
wrote it, so it seems only fair that your name should be public too!
Therefore, we encourage you to use your real name, but you may use a pseudonym
if you would like to be anonymous.

So I can make an FOI request using a pseudonym?

It is good practice for the public authority to reply to an anonymous request,
except in special circumstances such as if they suspect you of making vexatious
requests. See Freedom of Information Good Practice Guidance No 6
for details.  You should refer to this if a public authority attempts to refuse
a request because you used a pseudonym.

However, there are good reasons to use your real name, see the question
above.  If nothing else, it avoids the risk of an authority being picky,
ignoring the guidance and refusing your request.

They've asked for my postal address!

If a public authority asks you for your full, physical address, reply to them saying
that section 8.1.b of the FOI Act asks for an "address for correspondence",
and that the email address you are using is sufficient.

The Ministry of Justice has guidance
on this –
"As well as hard copy written correspondence, requests that are
transmitted electronically (for example, in emails) are acceptable
... If a request is received by email and no postal address is given, the email
address should be treated as the return address."

As if that isn't enough, the Information Commissioner's
Hints for Practitioners say
"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."

What will you do to me if I annotate requests with nonsense?

It won't be pretty :).

Seriously, annotations on WhatDoTheyKnow are to help
people get the information they want, or to give them pointers to places they
can go to help them act on it. We reserve the right to remove anything else.
Endless, content-free political discussions are not allowed, but
do post a link to a suitable forum elsewhere.

For example, if you think you know the reason someone posted a request,
and you don't approve of it, do not write a complex rant in the annotation.
Instead, simply write a short sentence, and link to another website which
already explains it in detail.

FOI officer questions

I just got here from bottom of an FOI request, what is going on?

WhatDoTheyKnow is a service run by a charity. It helps ordinary members
of the public make FOI requests, and easily track and share the responses.

The FOI request you got was made by someone using WhatDoTheyKnow. You can
simply reply to the request as you would any other request from an individual.
The only difference is that your response will be automatically published on
the Internet.

If you have privacy or copyright concerns, please read the answers below.
You might also like to read this page from the top to find out more about what
the site does from the point of view of a user. You can also search the
site to find the authority that you work for, and view the status of
any requests made using the site.

Finally, we welcome comments and
thoughts from FOI officers, please get in touch.

Why are you publishing responses to FOI requests?

Freedom of Information responses contain public information, which anybody could
easily request again from the public authority. Therefore,
there is no reason they shouldn't be published on the Internet. There are lots
of benefits - everything from preventing duplicate requests, to getting the public
more involved and interested in the work of government.

Are the people making requests real people?

Yes. The people are real people, for whom we have a verified email address
unique to each person.

Each request made by each person is also given a unique email, so that we
can keep track of and publish the responses. You can search this
site and find a page listing all requests that each person has made.

An email isn't a sufficient address for an FOI request!

Yes it is. This
letter from the ICO to Rother District Council gives guidance on the matter, specifically
in the context of requests made via WhatDoTheyKnow.

Aren't you making lots of vexatious requests?

WhatDoTheyKnow is not making any requests. We are sending requests on
behalf of our users, who are real people making the requests.

Look at it like this - if lots of different people made requests from
different Hotmail email addresses, then you would not think that Microsoft were
making vexatious requests. It is exactly the same if lots of requests are made
via WhatDoTheyKnow. Moreover, since all requests are public it is much easier
for you to see if one of our users is making vexatious requests, and for us to
block them when that happens.

If that isn't enough for you, the
letter from the ICO to Rother District Council gives some guidance on the matter.

Won't I be breaking copyright law by sending a response that you then publish?

No, you will simply be replying to an FOI request by email (the "expressed
preference" of the requester, under
section
11(1) of the Freedom of Information Act). That we are later republishing your
response is a separate matter of copyright law, and not something which FOIA lists
as a reason for rejecting a request.

Isn't it a problem that you publish the names of civil servants
and the text of emails?

Officers or servants responding to requests are doing so on behalf of the
public as part of their job, and we publish their response on that
basis. Usually the names and phone numbers of FOI officers are already
available on authority websites. We also encourage our users to give their real
name too, so it is fair both ways.

Do you publish email addresses or mobile phone numbers?

We automatically remove email addresses and labelled mobile phone numbers
that are in the email part of responses from public authorities. Please
contact us if we've missed one. We don't currently
remove these from attachments,
such as Word documents.

Can you take down private information about me?

If you see any information on the site which you'd like us to remove or
hide, then please let us know. We'll then
remove it, provided it is genuinely private information.

Credit where credit is due

Which people made WhatDoTheyKnow?

Oh, nearly everyone (and maybe you too)!

    Heather Brooke
    (vampy!) has
    been pushing the idea of a UK FOI archive for years now.

    Both Phil Rodgers and Francis Irving
    entered it in a mySociety competition for ideas for public interest websites to build.

    It won,
    and then Chris Lightfoot (RIP :()
    thought up the wheeze of intercepting email responses to requests and
    automatically publishing them.

    Tom Steinberg got the cash to pay for the site from
    a dead chocolate mogul (thank you!) ...

    ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville
    and Tom Steinberg could do the complex mixture of design and coding to build
    what you see today.

    Thanks particularly to Julian Todd (great blog!),
    Francis Davey, and Etienne Pollard for using the site early on and giving
    feedback (and/or legal advice!), and also to all our other users and
    testers.

    Lots of people have been looking up FOI email addresses, and a few
    volunteering to run the site - most especially Adam McGreggor, Alex
    Skene, John Cross and Tony Bowden.

Finally we couldn't do any of this without those
crazy people who volunteer,
amongst many other things, to do the accounts and fill in our VAT return.

You're all stars.


Escape every title in the home page

Escape every title in the home page

<% if environment.enabled?('display_wizard_signup') && !logged_in? %>
  <%= lightbox_button(:new, _('Signup'), { :controller => 'account', :action => 'wizard' }, :class => 'wizard', :id => 'signup-wizard') %>
<% end %>

<% if @has_news %>

<%= _('News') %>

  <% cache @news_cache_key do %>

      <% @highlighted_news.each_with_index do |highlighted, index| %>
        <div class='highlighted-news-item post-<%= index + 1 %>'>
          <div class='highlighted-news-item post-<%= index + 1 %>-inner'>

<%= link_to(h(highlighted.title), highlighted.url, :class => 'post-title') %>

            <%= show_date(highlighted.published_at, true) %>

<%= !highlighted.abstract.blank? ? highlighted.abstract : highlighted.first_paragraph %>

              <%= link_to(_('Read more'), highlighted.url) %>

      <% end %>

        <% @portal_news.each do |news| %>

          <%= show_date(news.published_at, true) %>
          <%= link_to(h(news.title), news.url, :class =>  'post-title' ) %>

        <% end %>

    <% @area_news.each_with_index do |folder, i| %>
      <% content_tag(:div, :class => ["news-area", ['even', 'odd'][i%2]].join(' ')) do %>
        <% content_tag(:div, :class => 'news-area-inner-1') do %>
          <% content_tag(:div, :class => 'news-area-inner-2') do %>

<%= link_to h(folder.title), folder.url %>

              <% folder.news(environment.news_amount_by_folder).each do |news| %>

 <%= link_to(h(news.title), news.url) %>

              <% end%>

            <%= link_to _('View more'), folder.url, :class => 'news-see-more'  %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% else %>
  <%= environment.description %>
<% end %>

<% if environment.enabled?('search_in_home') %>

    <% form_tag :controller => 'search', :action => 'index' do %>

        <%= text_field_tag('query', '', :size => 50) %>
        <%= submit_button(:search, _('Search')) %>

        <%= lightbox_link_to _('More options'), :controller => 'search', :action => 'popup' %>

    <% end %>

<% end %>

<% if environment.enabled?('display_wizard_signup') && !logged_in? %>
  <%= lightbox_button(:new, _('Signup'), { :controller => 'account', :action => 'wizard' }, :class => 'wizard', :id => 'signup-wizard') %>
<% end %>

<% if @has_news %>

<%= _('News') %>

  <% cache @news_cache_key do %>

      <% @highlighted_news.each_with_index do |highlighted, index| %>
        <div class='highlighted-news-item post-<%= index + 1 %>'>
          <div class='highlighted-news-item post-<%= index + 1 %>-inner'>

<%= link_to(highlighted.title, highlighted.url, :class => 'post-title') %>

            <%= show_date(highlighted.published_at, true) %>

<%= !highlighted.abstract.blank? ? highlighted.abstract : highlighted.first_paragraph %>

              <%= link_to(_('Read more'), highlighted.url) %>

      <% end %>

        <% @portal_news.each do |news| %>

          <%= show_date(news.published_at, true) %>
          <%= link_to(news.title, news.url, :class =>  'post-title' ) %>

        <% end %>

    <% @area_news.each_with_index do |folder, i| %>
      <% content_tag(:div, :class => ["news-area", ['even', 'odd'][i%2]].join(' ')) do %>
        <% content_tag(:div, :class => 'news-area-inner-1') do %>
          <% content_tag(:div, :class => 'news-area-inner-2') do %>

<%= link_to folder.title, folder.url %>

              <% folder.news(environment.news_amount_by_folder).each do |news| %>

 <%= link_to(news.title, news.url) %>

              <% end%>

            <%= link_to _('View more'), folder.url, :class => 'news-see-more'  %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% else %>
  <%= environment.description %>
<% end %>

<% if environment.enabled?('search_in_home') %>

    <% form_tag :controller => 'search', :action => 'index' do %>

        <%= text_field_tag('query', '', :size => 50) %>
        <%= submit_button(:search, _('Search')) %>

        <%= lightbox_link_to _('More options'), :controller => 'search', :action => 'popup' %>

    <% end %>

<% end %>


moved me menu

moved me menu

<%
#
#
# also supports drop down menus, like this:
#
#
menu title
#

#
menu item 1

#
menu item 2

#

#

#

active = first_breadcrumb
selected = 'class="selected"'
%>

<% if controller.logged_in? %>

  <% if controller.logged_in? %>
  <li <%= selected if active == 'me' %> >
    <%= link_to "Me", me_url %>

  <% end %>

  <li <%= selected if active == 'groups' %> >
    <%= link_to "Groups", groups_url %>

  <li <%= selected if active == 'people' %> >
    <%= link_to "People", people_url %>

  <% if controller.logged_in? %>

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

  <% end %>

<% end %>

<%
#
#
# also supports drop down menus, like this:
#
#
menu title
#

#
menu item 1

#
menu item 2

#

#

#

active = first_breadcrumb
selected = 'class="selected"'
%>

<% if controller.logged_in? %>

  <li <%= selected if active == 'groups' %> >
    <%= link_to "Groups", groups_url %>

  <li <%= selected if active == 'people' %> >
    <%= link_to "People", people_url %>

  <% if controller.logged_in? %>
  <li <%= selected if active == 'me' %> >
    <%= link_to "Me", me_url %>

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

  <% end %>

<% end %>


Return "Make my edits" button to functioning state, positioning is unfortunate, but it cannot be inside the page's form. I've made a compromise of the two states.

My settings

<%= error_messages_for 'user' %>
<% form_for :user, @user do |f| %>

Display Name : 	<%= f.text_field :display_name %>

Email : 	<%= f.text_field :email, {:size => 50, :maxlength => 255} %> (never displayed publicly)

Password : 	<%= f.password_field :pass_crypt, {:value => '', :size => 30, :maxlength => 255} %>

Confirm Password : 	<%= f.password_field :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255} %>

  Public editing :

<% if @user.data_public? %>
  Enabled. Not anonymous (what's this?)
<% else %>
  Disabled and anonymous. (why's this bad?)
<% end %>

Profile Description : 	<%= f.text_area :description, :rows => '5', :cols => '60' %>

  <tr id="homerow" <% unless @user.home_lat and @user.home_lon %> class="nohome" <%end%> >Home Location : 	You have not entered your home location.Latitude: <%= f.text_field :home_lat, :size => 20, :id => "home_lat" %> Longitude <%= f.text_field :home_lon, :size => 20, :id => "home_lon" %>

Update home location when I click on the map? <input type="checkbox" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" />

<%= submit_tag 'Save Changes' %>

<% end %>

<%= render :partial => 'friend_map' %>
<% unless @user.data_public? %>

Public editing

  Currently your edits are anonymous and people can't send you messages or see your location. To show what you edited and allow people to contact you through the website, click the button below.
  You will need to do this if you want to use the online editor and it is encouraged to do so (find out why).

  Your email address will not be revealed by becoming public.

  This action cannot be reversed and all new users are now public by default.

  <%= button_to "Make all my edits public", :action => :go_public %>
<% end %>

<%= link_to 'return to profile', :controller => 'user', :action => @user.display_name %>

My settings

<%= error_messages_for 'user' %>
<% form_for :user, @user do |f| %>

Display Name : 	<%= f.text_field :display_name %>

Email : 	<%= f.text_field :email, {:size => 50, :maxlength => 255} %> (not displayed publicly)

Password : 	<%= f.password_field :pass_crypt, {:value => '', :size => 30, :maxlength => 255} %>

Confirm Password : 	<%= f.password_field :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255} %>

  Public editing :

<% if @user.data_public? %>
  Enabled. Not anonymous (what's this?)
<% else %>

  Currently your edits are anonymous and people can't send you messages or see your location. To show what you edited and allow people to contact you through the website, click the button below.
  You will need to do this if you want to use the online editor and it is encouraged (find out why).

  This action cannot be reversed and all new users are now public by default.

  <%= button_to "Make all my edits public", :action => :go_public %>

<% end %>

Profile Description : 	<%= f.text_area :description, :rows => '5', :cols => '60' %>

  <tr id="homerow" <% unless @user.home_lat and @user.home_lon %> class="nohome" <%end%> >Home Location : 	You have not entered your home location.Latitude: <%= f.text_field :home_lat, :size => 20, :id => "home_lat" %> Longitude <%= f.text_field :home_lon, :size => 20, :id => "home_lon" %>

Update home location when I click on the map? <input type="checkbox" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" />

<%= submit_tag 'Save Changes' %>

<% end %>

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

<%= link_to 'return to profile', :controller => 'user', :action => @user.display_name %>


updated list's display markup.

updated list's display markup.

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Events", :property => nil} -%>

    Id
    Title
    Date
    Published

<% for event in @events %>

    <%= event.id -%>.
    <%= link_to event.title, :action => 'show', :id => event-%>
    <%= event.created_at.strftime("%d %b, %Y") -%>
    <%= event.published == true ? "Yes" : "No" -%>

    <%= link_to 'Edit', :action => 'edit', :id => event %>
    <%= link_to 'Destroy', { :action => 'destroy', :id => event }, :confirm => 'Are you sure?', :method => :post %>

<%= truncate(event.agenda,100) -%>

<% end %>

<%= link_to 'Previous page', { :page => @event_pages.current.previous } if @event_pages.current.previous %>
<%= link_to 'Next page', { :page => @event_pages.current.next } if @event_pages.current.next %>

<%= link_to 'New event', :action => 'new' %>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => "layouts/categories_nav" -%>
<%end-%>

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Events", :property => nil} -%>

    Id
    Title
    Date
    Published

<% for event in @events %>

    <%= event.id -%>.
    <%= link_to event.title, :action => 'show', :id => event-%>
    <%= event.created_at.strftime("%d %b, %Y") -%>
    <%= event.published == true ? "Yes" : "No" -%>

    <%= link_to 'Edit', :action => 'edit', :id => event %>
    <%= link_to 'Destroy', { :action => 'destroy', :id => event }, :confirm => 'Are you sure?', :method => :post %>

<%=truncate(event.agenda,100)-%>

<% end %>

<%= link_to 'Previous page', { :page => @event_pages.current.previous } if @event_pages.current.previous %>
<%= link_to 'Next page', { :page => @event_pages.current.next } if @event_pages.current.next %>

<%= link_to 'New event', :action => 'new' %>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => "layouts/categories_nav" -%>
<%end-%>


Using the short_name on the calendar view.

<% @heading="Calendar".t %>
<% @h1class='home' %>

<% @links = [] %>
<% @links += [{:url => "/tasks/workload", :title => "Workload", :accesskey => "w"}] %>
<% @links += [{:url => "/tasks/matrix", :title => "Hot Map", :accesskey => "m"}] %>
<% @links += [{:url => "/tasks/calendar", :title => "Calendar", :accesskey => "c"}] %>
<% @links += [{:url => "/tasks/collage", :title => "Collage", :accesskey => "o"}] %>
<% @links += [{:url => "/tasks/statistics", :title => "Statistics", :accesskey => "s"}] %>
<% @links += [{:url => "/tasks/print", :title => "Print outs", :accesskey => "p"}] %>

<%= render(:partial => 'messages') %>

<%= render(:partial => 'reschedule_link') %>

<% day = Date.parse("#{@year}-#{@month}-01") %>

<% days_in_month = ::Time.days_in_month(@month.to_i, @year.to_i) %>

<%= link_to(image_tag('arrow-left.png', :size => '15x12', :alt => "previous month".t), {'year' => @backyear, 'month' => @backmonth}) + day.localize("%B %Y") + link_to(image_tag('arrow-right.png', :size => '15x12', :alt => "next month".t), {'year' => @forwardyear, 'month' => @forwardmonth}) %>

<% day_of_month = 1 %>

<% year_string = @year.to_s -%>
<% month_string = @month.to_s -%>

        <% while day_of_month <= days_in_month %>

          <% day = Date.parse("#{@year}-#{@month}-#{day_of_month}") %>

          <tr<%= " class='calendar-today'" if day_of_month == @marktoday %>>
            <td class='calendar-date<%= " sunday" if day.wday == 0 %>'>
              <%= day_of_month %>

              <%= day.localize("%a") %>

            <td class='calendar-content droppable' id='drop_<%= year_string + "-" + month_string + "-" + day_of_month.to_s %>'>
              <% content_in_cell = false; %>
              <% for task in @this_months_tasks %>
                <% if task.next_due.mday == day_of_month %>
                  <% content_in_cell = true; %>

                  <% if task.list.team.use_colour == true
                    style=" style='background-color:#" + task.list.team.colour + "; color:#" + task.list.team.text_colour + ";'"
                  else
                    style=""
                  end %>

                  <span id='task-<%= task.id.to_s %>' class='draggable'>

                    <% if @enable_js -%>
                      <img src='/images/icons/drag-handle.png' class='drag-handle' width='13' height='13' alt='<%= "Drag to re-schedule".t %>' title='<%= "Drag to re-schedule".t %>' />
                    <% end -%>
                    <a title='<%= task.recurrence_description %>' href='/tasks/show/<%= task.id %>' <%= style %>><%= task.list.name %>: <%= task.short_name %>

                    <% if @enable_js == false %>
                      <%= link_to(image_tag('tick.png', :size => '12x12', :alt => 'done'), {:controller => 'tasks', :action => 'done', :id => task.id, :return => 'calendar'}) %>
                    <% else %>
                      <%= link_to_remote(image_tag('tick.png', :size => '12x12', :alt => 'done', 'onclick' => "new Effect.Fade('task-" + task.id.to_s + "', {duration:0.8});"), :url => {:controller => 'tasks', :action => 'done', :id => task.id, :return => 'calendar', :flash => 'none'}, :failure => "alert('" + "Apologies, something might have gone wrong. Please refresh your browser to check whether the task was updated properly.".t + "');") %>
                    <% end %>

                <% end %>
              <% end %>
              <%= " " if content_in_cell == false %>

          <% day_of_month += 1 %>

          <% if day_of_month == 17 %>

          <% end %>

        <% end %>

<% if @enable_js -%>

<% end -%>

<% @heading="Calendar".t %>
<% @h1class='home' %>

<% @links = [] %>
<% @links += [{:url => "/tasks/workload", :title => "Workload", :accesskey => "w"}] %>
<% @links += [{:url => "/tasks/matrix", :title => "Hot Map", :accesskey => "m"}] %>
<% @links += [{:url => "/tasks/calendar", :title => "Calendar", :accesskey => "c"}] %>
<% @links += [{:url => "/tasks/collage", :title => "Collage", :accesskey => "o"}] %>
<% @links += [{:url => "/tasks/statistics", :title => "Statistics", :accesskey => "s"}] %>
<% @links += [{:url => "/tasks/print", :title => "Print outs", :accesskey => "p"}] %>

<%= render(:partial => 'messages') %>

<%= render(:partial => 'reschedule_link') %>

<% day = Date.parse("#{@year}-#{@month}-01") %>

<% days_in_month = ::Time.days_in_month(@month.to_i, @year.to_i) %>

<%= link_to(image_tag('arrow-left.png', :size => '15x12', :alt => "previous month".t), {'year' => @backyear, 'month' => @backmonth}) + day.localize("%B %Y") + link_to(image_tag('arrow-right.png', :size => '15x12', :alt => "next month".t), {'year' => @forwardyear, 'month' => @forwardmonth}) %>

<% day_of_month = 1 %>

<% year_string = @year.to_s -%>
<% month_string = @month.to_s -%>

        <% while day_of_month <= days_in_month %>

          <% day = Date.parse("#{@year}-#{@month}-#{day_of_month}") %>

          <tr<%= " class='calendar-today'" if day_of_month == @marktoday %>>
            <td class='calendar-date<%= " sunday" if day.wday == 0 %>'>
              <%= day_of_month %>

              <%= day.localize("%a") %>

            <td class='calendar-content droppable' id='drop_<%= year_string + "-" + month_string + "-" + day_of_month.to_s %>'>
              <% content_in_cell = false; %>
              <% for task in @this_months_tasks %>
                <% if task.next_due.mday == day_of_month %>
                  <% content_in_cell = true; %>

                  <% if task.list.team.use_colour == true
                    style=" style='background-color:#" + task.list.team.colour + "; color:#" + task.list.team.text_colour + ";'"
                  else
                    style=""
                  end %>

                  <span id='task-<%= task.id.to_s %>' class='draggable'>

                    <% if @enable_js -%>
                      <img src='/images/icons/drag-handle.png' class='drag-handle' width='13' height='13' alt='<%= "Drag to re-schedule".t %>' title='<%= "Drag to re-schedule".t %>' />
                    <% end -%>
                    <a title='<%= task.recurrence_description %>' href='/tasks/show/<%= task.id %>' <%= style %>><%= task.list.name %>: <%= task.name %>

                    <% if @enable_js == false %>
                      <%= link_to(image_tag('tick.png', :size => '12x12', :alt => 'done'), {:controller => 'tasks', :action => 'done', :id => task.id, :return => 'calendar'}) %>
                    <% else %>
                      <%= link_to_remote(image_tag('tick.png', :size => '12x12', :alt => 'done', 'onclick' => "new Effect.Fade('task-" + task.id.to_s + "', {duration:0.8});"), :url => {:controller => 'tasks', :action => 'done', :id => task.id, :return => 'calendar', :flash => 'none'}, :failure => "alert('" + "Apologies, something might have gone wrong. Please refresh your browser to check whether the task was updated properly.".t + "');") %>
                    <% end %>

                <% end %>
              <% end %>
              <%= " " if content_in_cell == false %>

          <% day_of_month += 1 %>

          <% if day_of_month == 17 %>

          <% end %>

        <% end %>

<% if @enable_js -%>

<% end -%>


Fix XML Syndication configuration to auto-select active format

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

<%= form_tag({},{:id => 'configure_'+@sidebar.id.to_s, :class=>'configblock'}) %>
  <input type="checkbox" id="configure_<%= @sidebar.id.to_s %>_articles" name="configure[articles]" <% if @sidebar.staged_config['articles'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_articles">Show Articles feed

  <input type="checkbox" id="configure_<%= @sidebar.id.to_s %>_comments" name="configure[comments]" <% if @sidebar.staged_config['comments'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_comments">Show Comments feed

  <input type="checkbox" id="configure_<%= @sidebar.id.to_s %>_trackbacks" name="configure[trackbacks]" <% if @sidebar.staged_config['trackbacks'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_trackbacks">Show Trackbacks feed

  Format:

  <input type="radio" id="configure_<%= @sidebar.id.to_s %>_format1" name="configure[format]" value="rss20" <% if @sidebar.staged_config['format'] == 'rss20' %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_format1">RSS 2.0

  <input type="radio" id="configure_<%= @sidebar.id.to_s %>_format2" name="configure[format]" value="atom10" <% if @sidebar.staged_config['format'] == 'atom10' %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_format2">Atom 1.0

  <input type="radio" id="configure_<%= @sidebar.id.to_s %>_format3" name="configure[format]" value="atom03" <% if @sidebar.staged_config['format'] == 'atom03' %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_format3">Atom 0.3
<%= end_form_tag %>

<%= observe_form "configure_"+@sidebar.id.to_s,
    :url => { :action => "save_config", :id=>@sidebar.id},
    :with => 'value'
 %>

<%= form_tag({},{:id => 'configure_'+@sidebar.id.to_s, :class=>'configblock'}) %>
  <input type="checkbox" id="configure_<%= @sidebar.id.to_s %>_articles" name="configure[articles]" <% if @sidebar.staged_config['articles'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_articles">Show Articles feed

  <input type="checkbox" id="configure_<%= @sidebar.id.to_s %>_comments" name="configure[comments]" <% if @sidebar.staged_config['comments'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_comments">Show Comments feed

  <input type="checkbox" id="configure_<%= @sidebar.id.to_s %>_trackbacks" name="configure[trackbacks]" <% if @sidebar.staged_config['trackbacks'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_trackbacks">Show Trackbacks feed

  Format:

  <input type="radio" id="configure_<%= @sidebar.id.to_s %>_format1" name="configure[format]" value="rss20" <% if @sidebar.staged_config['type'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_format1">RSS 2.0

  <input type="radio" id="configure_<%= @sidebar.id.to_s %>_format2" name="configure[format]" value="atom10" <% if @sidebar.staged_config['type'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_format2">Atom 1.0

  <input type="radio" id="configure_<%= @sidebar.id.to_s %>_format3" name="configure[format]" value="atom03" <% if @sidebar.staged_config['type'] %>checked="checked"<% end %>/>
  <label for="configure_<%= @sidebar.id.to_s %>_format3">Atom 0.3
<%= end_form_tag %>

<%= observe_form "configure_"+@sidebar.id.to_s,
    :url => { :action => "save_config", :id=>@sidebar.id},
    :with => 'value'
 %>


making last edited by timestamp timezone aware in topics/show

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

	<%= render :partial => 'topics/new' %>

	<%=h @topic.title %>

		« <%= link_to @topic.forum.name, forum_path(@topic.forum) %>
		« <%= link_to @topic.forum.category.name, category_path(@topic.forum.category) %>
		 |
		<%= @topic.private? ? 'Private' : 'Public' %><%= @topic.closed? ? ', Closed' : '' %>

		<%= link_to_remote "#{pluralize(number_with_delimiter(@topic.posts_count), 'Post')} by #{pluralize(number_with_delimiter(@topic.posters), 'User')}", :url => {:action => 'show_posters', :id => @topic.id} %>
		<% if @topic.last_page != 1 %>
		 |  <%= will_paginate @posts, :inner_window => 1, :outer_window => 0, :prev_label => '« Prev' %>
		<% end %>

<% @posts.each_with_index do |post, index| index+=1 %>
	<table class="thread" cellspacing="0" id="p<%= post.id %>">

				<%= time_ago_or_time_stamp(post.created_at, TzTime.now, true, true) %>

					<%= link_to "#" + (index + @padding).to_s, topic_path(:page => @page, :anchor => 'p' + post.id.to_s) %>

<%= link_to h(post.user.login), user_path(post.user.id) %>

<%= rank_for(post.user.posts_count, post.user.admin) %>

							<%= link_to avatar_for(post.user), user_path(post.user.id) unless post.user.avatar.nil? %>

Registered: <%= post.user.created_at.strftime("%b, %Y") %>

						<% unless post.user.is_online? %>

Last visit: <%= time_ago_or_time_stamp(post.user.online_at) %>

						<% end %>

Posts: <%= post.user.posts_count %>

						<%= bb(post.body) %>
						<% if (post.updated_at > post.created_at + 5.minutes) %>

								Last edited <%= time_ago_or_time_stamp(post.updated_at, TzTime.now, true, true) %>
								<%= 'by ' + post.editor.login unless post.editor.nil? %>

						<% end %>
						<% if !post.user.signature.blank? %>

								<%= bb(post.user.signature) %>

						<% end %>

					<% if post.user.is_online? %>
						Online
					<% else %>
						Offline
					<% end %>

					<% if can_edit?(post) %>
						<%= link_to 'Edit', edit_post_path(post) %> |
					<% end %>
					<% if logged_in? && !@topic.closed %>
						<%= link_to 'Quote', quote_post_path(post) %>
					<% end %>

<% end %>

<% if logged_in? && !@topic.closed %>
	<%= render :partial => 'posts/new' %>
<% elsif logged_in? && @topic.closed %>

This Topic is Closed

<% else %>

			<%= link_to('Login', login_path) %> or
			<%= link_to('Register', register_path) %> to post a reply

<% end %>

	<%= render :partial => 'topics/new' %>

	<%=h @topic.title %>

		« <%= link_to @topic.forum.name, forum_path(@topic.forum) %>
		« <%= link_to @topic.forum.category.name, category_path(@topic.forum.category) %>
		 |
		<%= @topic.private? ? 'Private' : 'Public' %><%= @topic.closed? ? ', Closed' : '' %>

		<%= link_to_remote "#{pluralize(number_with_delimiter(@topic.posts_count), 'Post')} by #{pluralize(number_with_delimiter(@topic.posters), 'User')}", :url => {:action => 'show_posters', :id => @topic.id} %>
		<% if @topic.last_page != 1 %>
		 |  <%= will_paginate @posts, :inner_window => 1, :outer_window => 0, :prev_label => '« Prev' %>
		<% end %>

<% @posts.each_with_index do |post, index| index+=1 %>
	<table class="thread" cellspacing="0" id="p<%= post.id %>">

				<%= time_ago_or_time_stamp(post.created_at, TzTime.now, true, true) %>

					<%= link_to "#" + (index + @padding).to_s, topic_path(:page => @page, :anchor => 'p' + post.id.to_s) %>

<%= link_to h(post.user.login), user_path(post.user.id) %>

<%= rank_for(post.user.posts_count, post.user.admin) %>

							<%= link_to avatar_for(post.user), user_path(post.user.id) unless post.user.avatar.nil? %>

Registered: <%= post.user.created_at.strftime("%b, %Y") %>

						<% unless post.user.is_online? %>

Last visit: <%= time_ago_or_time_stamp(post.user.online_at) %>

						<% end %>

Posts: <%= post.user.posts_count %>

						<%= bb(post.body) %>
						<% if (post.updated_at > post.created_at+5.minutes) %>

								Last edited <%= time_ago_or_time_stamp(post.updated_at) %>
								<%= 'by ' + post.editor.login unless post.editor.nil? %>

						<% end %>
						<% if !post.user.signature.blank? %>

								<%= bb(post.user.signature) %>

						<% end %>

					<% if post.user.is_online? %>
						Online
					<% else %>
						Offline
					<% end %>

					<% if can_edit?(post) %>
						<%= link_to 'Edit', edit_post_path(post) %> |
					<% end %>
					<% if logged_in? && !@topic.closed %>
						<%= link_to 'Quote', quote_post_path(post) %>
					<% end %>

<% end %>

<% if logged_in? && !@topic.closed %>
	<%= render :partial => 'posts/new' %>
<% elsif logged_in? && @topic.closed %>

This Topic is Closed

<% else %>

			<%= link_to('Login', login_path) %> or
			<%= link_to('Register', register_path) %> to post a reply

<% end %>


Duplicating article-actions to avoid empty div

(ActionItem1911)

<%
  if @page.parent && @page.parent.has_posts? && @page.parent.feed
    add_rss_feed_to_head(@page.parent.name, @page.parent.feed.url)
  end
%>

<div id="article" class="<%= @page.css_class_name %>">

<div<%= " class='logged-in'" if user %>>
  <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %>

      <% if @page.allow_post_content?(user) %>
        <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
            profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
            :class => 'button with-text icon-edit' %>
        <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
          <% if @page != profile.home_page && !@page.has_posts? %>
            <%= link_to content_tag( 'span', _('Delete') ),
              profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }),
              :class => 'button with-text icon-delete' %>
          <% end %>
          <% if !environment.enabled?('disable_cms') && !@page.folder? %>
            <% if profile.kind_of?(Person) %>
              <%= link_to content_tag( 'span', _('Spread this') ),
                  profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
                  :class => 'button with-text icon-spread' %>
            <% elsif profile.kind_of?(Community) && environment.portal_community %>
              <%= link_to content_tag( 'span', _('Spread this') ),
                  profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }),
                  :class => 'button with-text icon-spread' %>
            <% end %>
          <% end %>
        <% end %>
      <% end %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if !@page.gallery? %>
          <%= link_to _('Add translation'),
              profile.admin_url.merge(:controller => 'cms', :action => 'new',
                                      :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)),
                                      :type => @page.type, :article => { :translation_of_id => @page.native_translation.id }),
              :class => 'button with-text icon-locale' if @page.translatable? && !@page.native_translation.language.blank? %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
        <% if (@page.folder? && !@page.has_posts?) || (@page.parent && @page.parent.folder? && !@page.parent.has_posts?) %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% end %>
      <% end %>
      <% if profile.kind_of?(Enterprise) && @page.gallery? %>
        <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
      <% end %>

  <% elsif profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) %>

      <%= link_to content_tag( 'span', _('Suggest an article') ), profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}), :id => 'suggest-article-link', :class => 'button with-text icon-new' %>

  <% end %>

    <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
    <%= article_title(@page, :no_link => true) %>
    <%= article_translations(@page) %>

<% if !@page.tags.empty? %>

    <%= _("This article's tags:") %>
    <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tags', :id => t.name ) }.join("\n") %>

<% end %>

<% if @page.display_hits? %>

    <%= n_('Viewed one time', 'Viewed %{num} times', @page.hits) % { :num => @page.hits } %>

<% end %>

<% if @page.parent && !@page.parent.path.blank? %>

  <%= button(:back, _('Go back to %s') % @page.parent.short_title, @page.parent.url) %>

<% end %>

<%= render :partial => 'shared/disabled_enterprise' %>

<% cache(@page.cache_key(params, user)) do %>
  <div class="<%="article-body article-body-" + @page.css_class_name %>">
    <% options = @page.image? ? {:gallery_view => true} : {} %>
    <%= article_to_html(@page, options) %>

<% end %>

<% if ! @page.categories.empty? %>

<%= _('Categories') %>

    <%= @page.categories.map {|item| link_to_category(item, false) }.join(", ") %>

<% end %>

<%= display_source_info(@page) %>

<% if NOOSFERO_CONF['addthis_enabled'] %>

<% end %>

  <% if @page.accept_comments? %>
  <h3 <%= 'class="no-comments-yet"' if @comments.size == 0 %>>
    <%= number_of_comments(@page) %>

  <% if @comments_count > 1 %>

<%= _('Post a comment') %>

  <% end %>

    <%= render :partial => 'comment', :collection => @comments %>

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

  <% end %>

<%= add_zoom_to_images %>


use bars not slashes

use bars not slashes


Make export tab work from non-view pages.


Simplify template slightly.

Simplify template slightly.

<%=@title%>

<% if @search_results.empty? %>

No requests made yet.

<% else %>
    <% for search_result in @search_results %>
        <% if search_result.class.to_s == 'InfoRequestEvent' %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => search_result, :info_request => search_result.info_request } %>
        <% else %>

Unexpected search result type <%=search_result.class.to_s%>

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

<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @search_hits) %>

<%=@title%>

<% if @search_results.empty? %>

No requests made yet.

<% else %>
    <% for search_result in @search_results %>
        <% if search_result.class.to_s == 'PublicBody' %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => search_result } %>
        <% elsif search_result.class.to_s == 'User' %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => search_result } %>
        <% elsif search_result.class.to_s == 'InfoRequestEvent' %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => search_result, :info_request => search_result.info_request } %>
        <% else %>

Unknown search result type <%=search_result.class.to_s%>

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

<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @search_hits) %>


Fixed javascript library conflict on assign categories page

<%= render({ :partial => '/shared/page_tabs',
             :locals => { :selected =>3,
                          :page_id => @page.id }}) %>

<%= @page.title %>

    <%= render :partial => '/shared/page_navigation' %>

        <%= html_block('left') %>
	    <% for article in @page.articles %>
	      <% if article.categories.length == 0 %>

<%= article.title %>

					<%= render({ :partial => '/article/article_categories',
					             :locals => { :article => article }}) %>
  	    <% end %>
	    <% end %>
      <%= button_to("Done",
                    { :action => 'display_page',
                      :controller => 'display',
                      :page_id => @page.id }) %>

                <%= html_block('right') %>


Weighing tasks no longer manageable.

Weighing tasks no longer manageable.

Feeding Tasks

  <% if feeding_tasks.length == 0 %>
    You have no cage feeding tasks.
  <% else %>
  <%= render :partial => 'tasks/tasks_list', :locals => {:tasks_list => nil, :tasks => feeding_tasks, :div_id => "feeding_tasks_" + count, :single_cage_task_list => false, :manage => true} %>
  <% end %>

Weighing Tasks

  <% if weighing_tasks.length == 0 %>
    You have no cage weighing tasks.
  <% else %>
  <%= render :partial => 'tasks/tasks_list', :locals => {:tasks_list => nil, :tasks => weighing_tasks, :div_id => "weighing_tasks_"+count, :single_cage_task_list => false, :manage => false} %>
  <% end %>

General Tasks

  <% if general_tasks.length == 0 %>
    You have no general tasks.
  <% else %>
  <%= render :partial => 'tasks/tasks_list', :locals => {:tasks_list => nil, :tasks => general_tasks, :div_id => "general_tasks_"+count, :single_cage_task_list => false, :manage => true} %>
  <% end %>

Feeding Tasks

  <% if feeding_tasks.length == 0 %>
    You have no cage feeding tasks.
  <% else %>
  <%= render :partial => 'tasks/tasks_list', :locals => {:tasks_list => nil, :tasks => feeding_tasks, :div_id => "feeding_tasks_" + count, :single_cage_task_list => false, :manage => true} %>
  <% end %>

Weighing Tasks

  <% if weighing_tasks.length == 0 %>
    You have no cage weighing tasks.
  <% else %>
  <%= render :partial => 'tasks/tasks_list', :locals => {:tasks_list => nil, :tasks => weighing_tasks, :div_id => "weighing_tasks_"+count, :single_cage_task_list => false, :manage => true} %>
  <% end %>

General Tasks

  <% if general_tasks.length == 0 %>
    You have no general tasks.
  <% else %>
  <%= render :partial => 'tasks/tasks_list', :locals => {:tasks_list => nil, :tasks => general_tasks, :div_id => "general_tasks_"+count, :single_cage_task_list => false, :manage => true} %>
  <% end %>


Fixed bug relating to showing away team when not yet assigned.

		Time
		Home Team
		v
		Away Team
		Type

<% reset_cycle; for game in fixtures %>
	<tr class="<%= cycle("odd", "even") %>">
		<%= game.pretty_time %>
		<%= if game.home_team then link_to(game.home_team.title, team_url(:team => game.home_team)) else '-to be arranged-' end %>
		v
		<%= if game.away_team then link_to(game.away_team.title,	team_url(:team => game.away_team)) else '-to be arranged-' end  %>
		<%= link_to game.hierarchy, stage_url(:competition => game.competition, :stage => game.stage, :anchor => game.group.slug) %>

<% end %>

		Time
		Home Team
		v
		Away Team
		Type

<% reset_cycle; for game in fixtures %>
	<tr class="<%= cycle("odd", "even") %>">
		<%= game.pretty_time %>
		<%= if game.home_team then link_to(game.home_team.title, team_url(:team => game.home_team)) else '-to be arranged-' end %>
		v
		<%= if game.home_team then link_to(game.away_team.title,	team_url(:team => game.away_team)) else '-to be arranged-' end  %>
		<%= link_to game.hierarchy, stage_url(:competition => game.competition, :stage => game.stage, :anchor => game.group.slug) %>

<% end %>