Arg.

Arg.

<!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 = 'BlackOnWhite'
    else
      if CSS.member?(controller.action_name)
        css = controller.action_name
      else
        if @user.nil?
          css = 'BlackOnWhite'
        else
          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) + '?v=2'}.join('') %>

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

  <% if is_in_admin_mode? %>

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

  <% end %>
  <%
    banner = :app_donate_banner.t
    if banner != "" %>

        <%= banner %>

  <% 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_donate.t, :controller => 'support', :action => 'donate') %>

                <%= link_to(:app_feature_tracker.t, :controller => 'pivotal', :action => 'index') %>

                <%= 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.to_sym.l), :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 = 'BlackOnWhite'
    else
      if CSS.member?(controller.action_name)
        css = controller.action_name
      else
        if @user.nil?
          css = 'BlackOnWhite'
        else
          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 + '?v=2')}.join('') %>

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

  <% if is_in_admin_mode? %>

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

  <% end %>
  <%
    banner = :app_donate_banner.t
    if banner != "" %>

        <%= banner %>

  <% 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_donate.t, :controller => 'support', :action => 'donate') %>

                <%= link_to(:app_feature_tracker.t, :controller => 'pivotal', :action => 'index') %>

                <%= 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.to_sym.l), :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 %>


added help text for league table, showing what figures represent

Rankings

<% i = 0 %>
<% for entry in @leaguetable %>

  <%= i = i.next %>
  <%= entry[:user].public ? link_to(h(entry[:user].name), :controller => "/profile", :login => entry[:user].login) : h(entry[:user].name) %>

  <% if entry[:total] < 9e99 %>
    <%= tonnes(entry[:total], 2) %> / year
  <% elsif not entry[:user].public %>
    private
  <% else %>
    no data
  <% end %>

<% end %>

figures are per person per year

<%= render :partial => "shared/xmlswfcharts",
           :locals => { :data_url => @pie_url, :width => "100%", :height => "200" } %>

Rankings

<% i = 0 %>
<% for entry in @leaguetable %>

  <%= i = i.next %>
  <%= entry[:user].public ? link_to(h(entry[:user].name), :controller => "/profile", :login => entry[:user].login) : h(entry[:user].name) %>

  <% if entry[:total] < 9e99 %>
    <%= tonnes(entry[:total], 2) %> / year
  <% elsif not entry[:user].public %>
    private
  <% else %>
    no data
  <% end %>

<% end %>

<%= render :partial => "shared/xmlswfcharts",
           :locals => { :data_url => @pie_url, :width => "100%", :height => "200" } %>


Remove bad and confusing "as them".

Remove bad and confusing "as them".

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

What is the status of this request now?

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

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

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

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

        <% end %>

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

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

        <% end %>

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

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

The review has finished and overall:

        <% end %>

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

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

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

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

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

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

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

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

What is the status of this request now?

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

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

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

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

        <% end %>

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

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

        <% end %>

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

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

The review has finished and overall:

        <% end %>

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

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

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

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

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

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

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


I think "send follow up" makes it clearer it isn't a comment reply, but an email

<%
if !info_request_event.nil? && info_request_event.event_type == 'response'
    incoming_message = info_request_event.incoming_message
end

if not incoming_message.nil?
%>
    <div class="correspondence" id="incoming-<%=incoming_message.id.to_s%>">

            <% if !incoming_message.safe_mail_from.nil? %>
                <%= incoming_message.safe_mail_from %>

            <% end %>
            <%=h @info_request.public_body.name %>

<%= simple_date(incoming_message.sent_at) %>

        <%= render :partial => 'bubble', :locals => { :incoming_message => incoming_message, :body => incoming_message.get_body_for_html_display(@collapse_quotes), :attachments => incoming_message.get_attachments_for_display }  %>

            <%= link_to "Link to this", incoming_message_url(incoming_message) %> |
            <%= link_to "Send follow up", show_response_url(:id => incoming_message.info_request.id, :incoming_message_id => incoming_message.id) + "#followup" %>

<%
elsif info_request_event.event_type == 'sent' || info_request_event.event_type == 'followup_sent'
    outgoing_message = info_request_event.outgoing_message
    %>
    <div class="correspondence" id="outgoing-<%=outgoing_message.id.to_s%>">

        <%=h @info_request.user.name %>

<%= simple_date(info_request_event.created_at) %>

        <%= render :partial => 'bubble', :locals => { :body => outgoing_message.get_body_for_html_display(), :attachments => nil }  %>

            <% if outgoing_message.status == 'ready' %>
                 Warning: This message has not yet been sent for an unknown reason.
            <% end %>

            <%= link_to "Link to this", outgoing_message_url(outgoing_message) %> |
            <%= link_to "Send follow up", show_response_no_followup_url(:id => outgoing_message.info_request.id, :incoming_message_id => nil) + "#followup" %>

<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %>

            <%= simple_date(info_request_event.created_at) %>

            Sent
            <% if info_request_event.outgoing_message.message_type == 'initial_request' %>
                request
            <% elsif info_request_event.outgoing_message.message_type == 'followup' %>
                a follow up
            <% else %>
                <% raise "unknown message_type" %>
            <% end %>

            to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>.

<% elsif info_request_event.event_type == 'comment'
    comment = info_request_event.comment
%>
    <%= render :partial => 'comment/single_comment', :locals => { :comment => comment } %>
<%
end

%>

<%
if !info_request_event.nil? && info_request_event.event_type == 'response'
    incoming_message = info_request_event.incoming_message
end

if not incoming_message.nil?
%>
    <div class="correspondence" id="incoming-<%=incoming_message.id.to_s%>">

            <% if !incoming_message.safe_mail_from.nil? %>
                <%= incoming_message.safe_mail_from %>

            <% end %>
            <%=h @info_request.public_body.name %>

<%= simple_date(incoming_message.sent_at) %>

        <%= render :partial => 'bubble', :locals => { :incoming_message => incoming_message, :body => incoming_message.get_body_for_html_display(@collapse_quotes), :attachments => incoming_message.get_attachments_for_display }  %>

            <%= link_to "Link to this", incoming_message_url(incoming_message) %> |
            <%= link_to "Reply", show_response_url(:id => incoming_message.info_request.id, :incoming_message_id => incoming_message.id) + "#followup" %>

<%
elsif info_request_event.event_type == 'sent' || info_request_event.event_type == 'followup_sent'
    outgoing_message = info_request_event.outgoing_message
    %>
    <div class="correspondence" id="outgoing-<%=outgoing_message.id.to_s%>">

        <%=h @info_request.user.name %>

<%= simple_date(info_request_event.created_at) %>

        <%= render :partial => 'bubble', :locals => { :body => outgoing_message.get_body_for_html_display(), :attachments => nil }  %>

            <% if outgoing_message.status == 'ready' %>
                 Warning: This message has not yet been sent for an unknown reason.
            <% end %>

            <%= link_to "Link to this", outgoing_message_url(outgoing_message) %> |
            <%= link_to "Send follow up", show_response_no_followup_url(:id => outgoing_message.info_request.id, :incoming_message_id => nil) + "#followup" %>

<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %>

            <%= simple_date(info_request_event.created_at) %>

            Sent
            <% if info_request_event.outgoing_message.message_type == 'initial_request' %>
                request
            <% elsif info_request_event.outgoing_message.message_type == 'followup' %>
                a follow up
            <% else %>
                <% raise "unknown message_type" %>
            <% end %>

            to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>.

<% elsif info_request_event.event_type == 'comment'
    comment = info_request_event.comment
%>
    <%= render :partial => 'comment/single_comment', :locals => { :comment => comment } %>
<%
end

%>


made tables with black writing (red is too hard on eyes)

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

    <title><%= title %></title>

Generated on <%= generated %>.

<%= title %>

Overview

    Complete Classes

(<%= "#{classes_done} out of #{total_classes}" %>)

    <%= percent_bar(classes_pct) %>

    Class Methods

(<%= "#{class_methods_done} out of #{total_class_methods}" %>)

    <%= percent_bar(class_methods_pct) %>

    Instance Methods

(<%= "#{instance_methods_done} out of #{total_instance_methods}" %>)

    <%= percent_bar(instance_methods_pct) %>

Partially Complete Classes

      Class
      class methods needed
      instance methods needed
      <% partially_complete_classes.each do |klass, info| %>

        <%= klass %>
        <%= info[:class_methods].join(', ') %>
        <%= info[:instance_methods].join(', ') %>

      <% end %>

Complete Classes

      <% for klass in complete_classes %>

<%= klass %>

      <% end %>

Un-Implemented Classes

      <% for klass in incomplete_classes %>

<%= klass %>

      <% end %>

      envisioned by Matthew Elder <sseses@gmail.com> MuHaHaHaHa


Remove Google site verification that I think was accidentally added in 30af67e3221e84e92a294f082fda232a9b4c7a19

<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %>
<% if RAILS_ENV == 'production' %>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '<%= MySociety::Config.get('GOOGLE_ANALYTICS_KEY', '') %>']);
  _gaq.push(['_setDomainName', 'whatdotheyknow.org.au']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<% end %>

<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %>
<meta name="google-site-verification" content="_RLAC9OWUI8UJBM_OqNFPZpTxluWd-RhPXE_AeEGSns" />
<meta name="google-site-verification" content="eH2_EMcMNPtcLv6bdpA8luZGXnrDtxz3jB8Qw5hTEN8" />
<% if RAILS_ENV == 'production' %>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '<%= MySociety::Config.get('GOOGLE_ANALYTICS_KEY', '') %>']);
  _gaq.push(['_setDomainName', 'whatdotheyknow.org.au']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<% end %>


account/login: comment out unused stuff in ruby, not HTML.

<% form_tag({:controller => 'account', :action => 'login'}, :id => "loginform") do -%>

    <%= "Login name"[:login_name] %>

    <%= text_field_tag 'login' %>

    <%= "Password"[:login_password] %>

    <%= password_field_tag 'password' %>

     <%= submit_tag 'Log in'[:login_button] %>

<%- if false # Change to true if you want this functionality -%>

Remember me:
<%= check_box_tag 'remember_me' %>

<%- end -%>

  <%= link_to 'Need a new account?'[:signup_link], { :action => 'signup', :redirect => params[:redirect] } %>

  <%= link_to 'I forgot my password'[:forgot_password_link], forgot_password_path %>

<%= hidden_field_tag 'redirect', params[:redirect] %>
<% end # form -%>

<%= javascript_tag "Form.focusFirstElement('loginform');" %>

<%# flash[:error] %>

<% form_tag({:controller => 'account', :action => 'login'}, :id => "loginform") do -%>

    <%= "Login name"[:login_name] %>

    <%= text_field_tag 'login' %>

    <%= "Password"[:login_password] %>

    <%= password_field_tag 'password' %>

     <%= submit_tag 'Log in'[:login_button] %>

  <%= link_to 'Need a new account?'[:signup_link], { :action => 'signup', :redirect => params[:redirect] } %>

  <%= link_to 'I forgot my password'[:forgot_password_link], forgot_password_path %>

<%= hidden_field_tag 'redirect', params[:redirect] %>
<% end # form -%>

<%= javascript_tag "Form.focusFirstElement('loginform');" %>

<%# flash[:error] %>


implement (one-wayish) time_ago_in_words/date switch in bookings list

Listing bookings

    <%= sort_header 'title' %>
    <%= sort_header 'value_date' %>
    <%= sort_header 'credit_account_id' %>
    <%= sort_header 'debit_account_id' %>
    <%= sort_header 'amount' %>

<% for booking in @bookings %>

    <%=h booking.title%>
    <span id="time_ago_in_words_<%=booking.id %>"><%= link_to_function time_ago_in_words(booking.value_date), "toggle('time_ago_in_words_#{booking.id}', 'date_#{booking.id}')" unless booking.value_date.nil?%><span id="date_<%=booking.id %>" style="display: none"><%= link_to_function booking.value_date.strftime('%d.%m.%Y'), "toggle('date_#{booking.id}', 'time_ago_in_words_#{booking.id}')"  unless booking.value_date.nil? %>
    <%=link_to h(booking.credit_account.title), :controller => :accounts, :action => :show, :id => booking.credit_account unless booking.credit_account.nil? %>
    <%=link_to h(booking.debit_account.title), :controller => :accounts, :action => :show, :id => booking.debit_account unless booking.debit_account.nil? %>
    <%=h number_to_currency(booking.rounded_amount, :unit => "CHF ")  %>

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

<% end %>

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

<%= link_to 'New booking', :action => 'new' %>

Listing bookings

    <%= sort_header 'title' %>
    <%= sort_header 'value_date' %>
    <%= sort_header 'credit_account_id' %>
    <%= sort_header 'debit_account_id' %>
    <%= sort_header 'amount' %>

<% for booking in @bookings %>

    <%=h booking.title%>
    <%=h booking.value_date.strftime('%d.%m.%Y') unless booking.value_date.nil?%>
    <%=link_to h(booking.credit_account.title), :controller => :accounts, :action => :show, :id => booking.credit_account unless booking.credit_account.nil? %>
    <%=link_to h(booking.debit_account.title), :controller => :accounts, :action => :show, :id => booking.debit_account unless booking.debit_account.nil? %>
    <%=h number_to_currency(booking.rounded_amount, :unit => "CHF ")  %>

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

<% end %>

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

<%= link_to 'New booking', :action => 'new' %>


Deep evil for the admin interface to work over https.

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

  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>FOIFA admin<%= @title ? ":" : "" %> <%=@title%></title>
  <%= stylesheet_link_tag 'admin' %>
  <%= stylesheet_link_tag 'scaffold' %>

FOIFA admin interface:
<%  # This is evil. We have to use ../../blah relative URLs so it still works
    # when proxied over HTTPS from secure.mysociety.org - which it has to be as
    # it is our admin interface and is protected by valuable passwords.
    url_prefix = ('../' * (request.request_uri.split('/').size - 3))
%>
<%= link_to 'Public bodies', url_prefix + 'body/list' %>

<%= flash[:notice] %>

<%= yield  %>

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

  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>FOIFA admin<%= @title ? ":" : "" %> <%=@title%></title>
  <%= stylesheet_link_tag 'admin' %>
  <%= stylesheet_link_tag 'scaffold' %>

FOIFA admin interface:
<%= link_to 'Public bodies', :controller => 'admin_public_body', :action => 'list' %>

<%= flash[:notice] %>

<%= yield  %>


Make openSidebar() work with no argument.


I keep nearly filling in the notes field with my commnet, so try moving notes up.

<%= error_messages_for 'public_body' %>

Name

<%= text_field 'public_body', 'name', :size => 60  %>

Short name (only put in abbreviations which are really used, otherwise leave blank. Short or long name is used in the URL - don't worry about breaking URLs through renaming, as the history is used to redirect)

<%= text_field 'public_body', 'short_name', :size => 60  %>

Request email (set to blank (empty string) if can't find an address; to not_apply if FOI no longer / never did apply to authority)

<%= text_field 'public_body', 'request_email', :size => 40  %>

Home page (of whole authority, not just their FOI page; set to blank (empty string) to guess it from the email)

<%= text_field 'public_body', 'home_page', :size => 60  %>

Notes (for users to consider when making FOI requests to the authority)

<%= text_area 'public_body', 'notes', :rows => 3, :cols => 60  %>

Tags (space separated:
    <% for category, description in PublicBody.categories_by_tag %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>
)

<%= text_field 'public_body', 'tag_string', :size => 80  %>

Comment for this edit (put URL or other source of new info)

<%= text_area 'public_body', 'last_edit_comment', :rows => 2, :cols => 60  %>

Privacy note: The email addresses are assumed public data,
so we can share the love around later. If somebody wants to give us a
super-secret address (say to bypass spam traps) then we'll have to rethink
this.

<%= error_messages_for 'public_body' %>

Name

<%= text_field 'public_body', 'name', :size => 60  %>

Short name (only put in abbreviations which are really used, otherwise leave blank. Short or long name is used in the URL - don't worry about breaking URLs through renaming, as the history is used to redirect)

<%= text_field 'public_body', 'short_name', :size => 60  %>

Request email (set to blank (empty string) if can't find an address; to not_apply if FOI no longer / never did apply to authority)

<%= text_field 'public_body', 'request_email', :size => 40  %>

Home page (of whole authority, not just their FOI page; set to blank (empty string) to guess it from the email)

<%= text_field 'public_body', 'home_page', :size => 60  %>

Tags (space separated:
    <% for category, description in PublicBody.categories_by_tag %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>
)

<%= text_field 'public_body', 'tag_string', :size => 80  %>

Notes (for users to consider when making FOI requests to the authority)

<%= text_area 'public_body', 'notes', :rows => 4, :cols => 60  %>

Comment for this edit (put URL or other source of new info)

<%= text_area 'public_body', 'last_edit_comment', :rows => 2, :cols => 60  %>

Privacy note: The email addresses are assumed public data,
so we can share the love around later. If somebody wants to give us a
super-secret address (say to bypass spam traps) then we'll have to rethink
this.


allow the user to pass in a gpx and a zoom

<% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %>

The OpenStreetMap database is currently offline while
   essential database maintenance work is carried out.

<% elsif OSM_STATUS == :database_readonly or OSM_STATUS == :api_readonly %>

The OpenStreetMap database is currently in read-only mode while
   essential database maintenance work is carried out.

<% elsif !@user.data_public? %>

You haven't set your edits to be public.

You can no longer edit the map unless you do so. You can set your edits as public from your
<%= link_to 'user page', {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}%>.

(Find out why this is the case.)

<% else %>
<% content_for :greeting do %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<% end %>
<% end %>

<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
<%= render :partial => 'search' %>

<%
session[:token] = @user.tokens.create.token unless session[:token]

# Decide on a lat lon to initialise potlatch with. Various ways of doing this
if params['lon'] and params['lat']
	lon =  h(params['lon'])
	lat =  h(params['lat'])
	zoom =  h(params['zoom'])

elsif params['mlon'] and params['mlat']
	lon =  h(params['mlon'])
	lat =  h(params['mlat'])
	zoom =  h(params['zoom'])

elsif params['gpx']
        # The user may pass a gpx and zoom
	if params['zoom']
	   zoom = h(params['zoom'])
	end
	#use gpx id to locate (dealt with below)

elsif cookies.key?("_osm_location")
	lon,lat,zoom,layers = cookies["_osm_location"].split("|")

elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil?
	lon =  @user.home_lon
	lat =  @user.home_lat

else
	#catch all.  Do nothing.  lat=nil, lon=nil
	#Currently this results in potlatch starting up at 0,0 (Atlantic ocean).
end

zoom='14' if zoom.nil?
%>

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

    Several other options are also available
    for editing OpenStreetMap.

<%= javascript_include_tag 'swfobject.js' %>

<% end %>

<% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %>

The OpenStreetMap database is currently offline while
   essential database maintenance work is carried out.

<% elsif OSM_STATUS == :database_readonly or OSM_STATUS == :api_readonly %>

The OpenStreetMap database is currently in read-only mode while
   essential database maintenance work is carried out.

<% elsif !@user.data_public? %>

You haven't set your edits to be public.

You can no longer edit the map unless you do so. You can set your edits as public from your
<%= link_to 'user page', {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}%>.

(Find out why this is the case.)

<% else %>
<% content_for :greeting do %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<% end %>
<% end %>

<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
<%= render :partial => 'search' %>

<%
session[:token] = @user.tokens.create.token unless session[:token]

# Decide on a lat lon to initialise potlatch with. Various ways of doing this
if params['lon'] and params['lat']
	lon =  h(params['lon'])
	lat =  h(params['lat'])
	zoom =  h(params['zoom'])

elsif params['mlon'] and params['mlat']
	lon =  h(params['mlon'])
	lat =  h(params['mlat'])
	zoom =  h(params['zoom'])

elsif params['gpx']
	#use gpx id to locate (dealt with below)

elsif cookies.key?("_osm_location")
	lon,lat,zoom,layers = cookies["_osm_location"].split("|")

elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil?
	lon =  @user.home_lon
	lat =  @user.home_lat

else
	#catch all.  Do nothing.  lat=nil, lon=nil
	#Currently this results in potlatch starting up at 0,0 (Atlantic ocean).
end

zoom='14' if zoom.nil?
%>

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

    Several other options are also available
    for editing OpenStreetMap.

<%= javascript_include_tag 'swfobject.js' %>

<% end %>


Prohibit work owners from deleting works that have text transcribed.

<%= render({ :partial => '/shared/work_tabs',
             :locals => { :selected => 6,
                          :work_id => @work.id }}) %>

Title: <span id="title_<%= @work.id %>"><%= @work.title %>
<%= in_place_editor("title_#{@work.id}",
                    { :url => url_for({ :action => "set_work_title",
                                        :id => @work.id }) }) %>

Description: <span id="description_<%= @work.id %>"><%= @work.description %>
<%= in_place_editor("description_#{@work.id}",
                    { :url => url_for({ :action => "set_work_description",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Owner: <%= link_to (@work.owner.display_name,
	                           { :controller => 'user',
	                               :action => 'profile',
	                               :user_id => @work.owner.id }) %>

Physical Description:

<span id="physical_description_<%= @work.id %>"><%= @work.physical_description || "none" %>
<%= in_place_editor("physical_description_#{@work.id}",
                    { :url => url_for({ :action => "set_work_physical_description",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Document History:

<span id="document_history_<%= @work.id %>"><%= @work.document_history || "none" %>
<%= in_place_editor("document_history_#{@work.id}",
                    { :url => url_for({ :action => "set_work_document_history",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Permissions:

<span id="permission_description_<%= @work.id %>"><%= @work.permission_description || "none" %>
<%= in_place_editor("permission_description_#{@work.id}",
                    { :url => url_for({ :action => "set_work_permission_description",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Location of Composition:

<span id="location_of_composition_<%= @work.id %>"><%= @work.location_of_composition || "none" %>
<%= in_place_editor("location_of_composition_#{@work.id}",
                    { :url => url_for({ :action => "set_work_location_of_composition",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Author:

<span id="author_<%= @work.id %>"><%= @work.author || "none" %>
<%= in_place_editor("author_#{@work.id}",
                    { :url => url_for({ :action => "set_work_author",
                                        :id => @work.id }) }) %>

Transcription Conventions:

<span id="transcription_conventions_<%= @work.id %>"><%= @work.transcription_conventions || "none" %>
<%= in_place_editor("transcription_conventions_#{@work.id}",
                    { :url => url_for({ :action => "set_work_transcription_conventions",
                                        :id => @work.id }),
                      :rows => 6  }) %>

	<% if @work.transcription_version < 10 %>
	<%= button_to("Delete",
	            { :controller => 'work',
	              :action => 'delete',
	              :work_id => @work.id },
	            { :confirm => "Are you sure you want to delete all of #{@work.title}?" }) %>
	<% end %>

      <%= html_block('right') %>

<%= render({ :partial => '/shared/work_tabs',
             :locals => { :selected => 6,
                          :work_id => @work.id }}) %>

Title: <span id="title_<%= @work.id %>"><%= @work.title %>
<%= in_place_editor("title_#{@work.id}",
                    { :url => url_for({ :action => "set_work_title",
                                        :id => @work.id }) }) %>

Description: <span id="description_<%= @work.id %>"><%= @work.description %>
<%= in_place_editor("description_#{@work.id}",
                    { :url => url_for({ :action => "set_work_description",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Owner: <%= link_to (@work.owner.display_name,
	                           { :controller => 'user',
	                               :action => 'profile',
	                               :user_id => @work.owner.id }) %>

Physical Description:

<span id="physical_description_<%= @work.id %>"><%= @work.physical_description || "none" %>
<%= in_place_editor("physical_description_#{@work.id}",
                    { :url => url_for({ :action => "set_work_physical_description",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Document History:

<span id="document_history_<%= @work.id %>"><%= @work.document_history || "none" %>
<%= in_place_editor("document_history_#{@work.id}",
                    { :url => url_for({ :action => "set_work_document_history",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Permissions:

<span id="permission_description_<%= @work.id %>"><%= @work.permission_description || "none" %>
<%= in_place_editor("permission_description_#{@work.id}",
                    { :url => url_for({ :action => "set_work_permission_description",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Location of Composition:

<span id="location_of_composition_<%= @work.id %>"><%= @work.location_of_composition || "none" %>
<%= in_place_editor("location_of_composition_#{@work.id}",
                    { :url => url_for({ :action => "set_work_location_of_composition",
                                        :id => @work.id }),
                      :rows => 6  }) %>

Author:

<span id="author_<%= @work.id %>"><%= @work.author || "none" %>
<%= in_place_editor("author_#{@work.id}",
                    { :url => url_for({ :action => "set_work_author",
                                        :id => @work.id }) }) %>

Transcription Conventions:

<span id="transcription_conventions_<%= @work.id %>"><%= @work.transcription_conventions || "none" %>
<%= in_place_editor("transcription_conventions_#{@work.id}",
                    { :url => url_for({ :action => "set_work_transcription_conventions",
                                        :id => @work.id }),
                      :rows => 6  }) %>

<%= button_to("Delete",
            { :controller => 'work',
              :action => 'delete',
              :work_id => @work.id },
            { :confirm => 'Are you sure?' }) %>

      <%= html_block('right') %>


* app/views/page/show.rhtml: I'm tired...fixed logic.

git-svn-id: ce004a3be656e491f060c65e2aab8dd2a5477e8b@36 f7b17897-190c-4688-811d-8cf59fb8cab0

<% @title = @page.title %>
<% @title = Siteinfo.main.name if @page.title == "Home" %>
<% @tab = "home" if @page.title == "Home" %>
<% @tab = "about" if @page.title == "About" %>

    <%= @page.content_html %>

  <%= link_to('Edit this page', :action => 'edit', :title => @page.title) -%>

  <%= link_to('What links here?', :action => 'refer', :title => @page.title) -%>

    Revision: #<%= @page.revisions.length %> -
    <%= link_to "View page edit history", :action => 'history', :title => @page.title %>

<% if @title != "Home" || Siteinfo.frontpagecomments? -%>

Comments

    <%= render :partial => '/comment/comments' %>

<% end %>

<% @title = @page.title %>
<% @title = Siteinfo.main.name if @page.title == "Home" %>
<% @tab = "home" if @page.title == "Home" %>
<% @tab = "about" if @page.title == "About" %>

    <%= @page.content_html %>

  <%= link_to('Edit this page', :action => 'edit', :title => @page.title) -%>

  <%= link_to('What links here?', :action => 'refer', :title => @page.title) -%>

    Revision: #<%= @page.revisions.length %> -
    <%= link_to "View page edit history", :action => 'history', :title => @page.title %>

<% if @title == "Home" && Siteinfo.frontpagecomments? -%>

Comments

    <%= render :partial => '/comment/comments' %>

<% end %>


Link from user profile to view traces and to set home location if none is set.

<%= @this_user.display_name %>

<%= simple_format(@this_user.description) %>

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

Your diary

<%= link_to 'View your diary', :controller => 'user', :action=>'diary', :display_name => @user.display_name %>

<%= link_to 'New diary post', :controller => 'diary_entry', :action=>'new', :display_name => @user.display_name %>

Your account

<%= link_to 'Edit your settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %>

<% else %>
<%= link_to 'Send message', :controller => 'message', :action => 'new', :user_id => @this_user.id %>

<%= link_to 'Add as friend', :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>

<%= link_to 'View diary', :controller => 'user', :action=>'diary', :display_name => @this_user.display_name %>

<%= link_to 'View traces', :controller => 'trace', :action=>'view', :display_name => @this_user.display_name %>

<% end %>

Nearby users

<% if @this_user.home_lat and @this_user.home_lon %>
  <% if @this_user.nearby.empty? %>
    There are no users who admit to mapping nearby.
  <% else %>

    <% @this_user.nearby.each do |nearby| %>

    <%= link_to nearby.display_name, :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
    <%= @this_user.distance(nearby).round %>km away
    (<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => nearby.id %>)

    <%end%>

  <%end%>
<% else %>
  No home location has been set.
  <% if @user and @this_user.id == @user.id %>
  You can set your home location on your <%= link_to 'settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %> page.
  <% end %>
<% end %>

<%= @this_user.display_name %>

<%= simple_format(@this_user.description) %>

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

Your diary

<%= link_to 'View your diary', :controller => 'user', :action=>'diary', :display_name => @user.display_name %>

<%= link_to 'New diary post', :controller => 'diary_entry', :action=>'new', :display_name => @user.display_name %>

Your account

<%= link_to 'Edit your settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %>

<% else %>
<%= link_to 'Send message', :controller => 'message', :action => 'new', :user_id => @this_user.id %>

<%= link_to 'Add as friend', :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>

<%= link_to 'View diary', :controller => 'user', :action=>'diary', :display_name => @this_user.display_name %>
<% end %>

Nearby users

<% if @this_user.home_lat and @this_user.home_lon %>
  <% if @this_user.nearby.empty? %>
    There are no users who admit to mapping nearby.
  <% else %>

    <% @this_user.nearby.each do |nearby| %>

    <%= link_to nearby.display_name, :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
    <%= @this_user.distance(nearby).round %>km away
    (<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => nearby.id %>)

    <%end%>

  <%end%>
<% else %>
  No home location has been set.
<% end %>


Fix article link in scribbish. Closes #977

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

<div class="atomentry" id="article-<%= article.id %>">

    <%= (controller.action_name.include? 'permalink') ? article.title : article_link(article.title, article) %>
    <%= content_tag(:span, article.comments.size, :class => 'comment_count') if article.comments.size > 0 %>

    Posted by <%= author_link(article) %>
    <abbr class="published" title="<%= article.created_at.xmlschema %>"><%= js_distance_of_time_in_words_to_now article.created_at %>

    <%= article_html(article, :body) %>

    <% if article.extended? -%>

        <% if controller.action_name == 'index' -%>

<%= article_link "Continue reading...", article %>

        <% else -%>
          <%= article_html(article, :extended) %>
        <% end -%>

    <% end -%>

    <%= content_tag(:li, category_links(article), :class => 'categories') unless article.categories.empty? %>
    <%= content_tag(:li, tag_links(article), :class => 'tags') unless article.tags.empty? %>

Meta
      <%= trackbacks_link(article) << ',' if article.allow_pings? %>
      <%= comments_link(article) << ',' if article.allow_comments? %>
      <a href="<%= article_url article %>" rel="bookmark"><%=h _('permalink')%>,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'rss',  :id => article %>">rss,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'atom', :id => article %>">atom

<div class="atomentry" id="article-<%= article.id %>">

    <%= (controller.action_name.include? 'permalink') ? article.title : article_link(article.title, article) %>
    <%= content_tag(:span, article.comments.size, :class => 'comment_count') if article.comments.size > 0 %>

    Posted by <%= author_link(article) %>
    <abbr class="published" title="<%= article.created_at.xmlschema %>"><%= js_distance_of_time_in_words_to_now article.created_at %>

    <%= article_html(article, :body) %>

    <% if article.extended? -%>

        <% if controller.action_name == 'index' -%>

<%= article_link "Continue reading...", article %>

        <% else -%>
          <%= article_html(article, :extended) %>
        <% end -%>

    <% end -%>

    <%= content_tag(:li, category_links(article), :class => 'categories') unless article.categories.empty? %>
    <%= content_tag(:li, tag_links(article), :class => 'tags') unless article.tags.empty? %>

Meta
      <%= trackbacks_link(article) << ',' if article.allow_pings? %>
      <%= comments_link(article) << ',' if article.allow_comments? %>
      <a href="<%= server_url_for :controller => 'articles',  :action => 'read', :id => article %>" rel="bookmark">permalink,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'rss',  :id => article %>">rss,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'atom', :id => article %>">atom


removed the stupid pets alt and replaced it with album alt.


Remove recruitment banner

Remove recruitment banner

<%# Google Analytics tracking code for WhatDoTheyKnow %>
<% if @total_hits %>
    <%# we're on a search page; make it look to Google Analytics like we're using a query string, so it can track the search keywords %>
    <script type="text/javascript">
        _gaq.push(['_gat._anonymizeIp']);
        _gaq.push(['_trackPageview', '<%= request.request_uri %>?query=<%=u @query %>']);
    </script>
<% end %>

 Would you like to work with the team that built this site? We’re recruiting.

<%# Google Analytics tracking code for WhatDoTheyKnow %>
<% if @total_hits %>
    <%# we're on a search page; make it look to Google Analytics like we're using a query string, so it can track the search keywords %>

<% end %>


the new add tag interface

the new add tag interface

Add a new <%=h params[:controller].singularize %>

<%= error_messages_for :item %>

<% form_for :item, :url => polymorphic_path(@item) do |f| -%>

  <% default_content_for :utility_fields do %><% end %>

    Title
    <%= f.text_field :title %>

  <% default_content_for :additional_fields do %><% end %>

    Review
    <%= f.text_area :description %>

    Tags

      <% str_tags = @tags.map { |t| t.to_s } %>

      <input id="tags" name="tags" value="<%=h str_tags.join(', ') %>" style="width:25em;">

    <% default_content_for :submit_button do %>
      <%= submit_tag 'Add Item' %>
    <% end %>

<% end -%>

Add a new <%=h params[:controller].singularize %>

<%= error_messages_for :item %>

<% form_for :item, :url => polymorphic_path(@item) do |f| -%>

  <% default_content_for :utility_fields do %><% end %>

    Title
    <%= f.text_field :title %>

  <% default_content_for :additional_fields do %><% end %>

    Review
    <%= f.text_area :description %>

    Tags

      <% str_tags = @tags.map { |t| t.to_s } %>

      <input id="tags" name="tags" value="<%=h str_tags.join(', ') %>" style="width:25em;"/>

    <% default_content_for :submit_button do %>
      <%= submit_tag 'Add Item' %>
    <% end %>

<% end -%>


[ClockingIT @ Localize 'by' which I forgot]

<fieldset>
<legend><%= @page.name %></legend>

<% if @page.revisions.empty? %>
<%= start_form_tag :action => 'create', :id => @page.name %>
<textarea name="body" rows="20" style="width:80%;">
h3. This wiki page doesn't exist yet. Create it by replacing this text and clicking the button below.

Use [[AnotherPage|another page]] or [[AnotherPage]] to link to and create other pages.

h4. Other things to do[1]

* Create lists
* [[http://google.com|Google]]
** _Experiment_
** *Add emphasis*
* And have fun!

|_. This |_. Is |
| pretty | fun  |
| and not too | hard|

@A man once said...@

fn1. If you're -bored- %{color:red}inspired%.

!http://www.clockingit.com/images/logo.gif!

</textarea>
<%= submit_tag _("Create"), :style => 'clear:both;float:left;' %>
<% else %>
<%= @page.to_html %>

<% if @page.pages_linking_here.size > 0 %>

<%=_ 'Linked from' %>: <%= @page.pages_linking_here.collect {|p| p.to_url }.join(', ') %>

<% end %>

<%=_ 'Revision' %>: <%= "#{@page.revisions.size}, " + tz.utc_to_local(@page.current_revision.created_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") + " #{_('by')} #{@page.current_revision.user.name}" %>

<% if @page.locked? %>
  <%=_ 'Under revision by' %> <%= @page.locked_by.name %> [<%= tz.utc_to_local(@page.locked_at).strftime(session[:user].time_format) %>]

<% end %>

<% if !@page.locked? || @page.locked_by.id == session[:user].id %>
  <%= link_to _("Edit"), :controller => "wiki", :action => "edit", :id => @page.name %>
<% end %>

<% end %>

<fieldset>
<legend><%= @page.name %></legend>

<% if @page.revisions.empty? %>
<%= start_form_tag :action => 'create', :id => @page.name %>
<textarea name="body" rows="20" style="width:80%;">
h3. This wiki page doesn't exist yet. Create it by replacing this text and clicking the button below.

Use [[AnotherPage|another page]] or [[AnotherPage]] to link to and create other pages.

h4. Other things to do[1]

* Create lists
* [[http://google.com|Google]]
** _Experiment_
** *Add emphasis*
* And have fun!

|_. This |_. Is |
| pretty | fun  |
| and not too | hard|

@A man once said...@

fn1. If you're -bored- %{color:red}inspired%.

!http://www.clockingit.com/images/logo.gif!

</textarea>
<%= submit_tag _("Create"), :style => 'clear:both;float:left;' %>
<% else %>
<%= @page.to_html %>

<% if @page.pages_linking_here.size > 0 %>

<%=_ 'Linked from' %>: <%= @page.pages_linking_here.collect {|p| p.to_url }.join(', ') %>

<% end %>

<%=_ 'Revision' %>: <%= "#{@page.revisions.size}, " + tz.utc_to_local(@page.current_revision.created_at).strftime("#{session[:user].time_format} #{session[:user].date_format}") + " by #{@page.current_revision.user.name}" %>

<% if @page.locked? %>
  <%=_ 'Under revision by' %> <%= @page.locked_by.name %> [<%= tz.utc_to_local(@page.locked_at).strftime(session[:user].time_format) %>]

<% end %>

<% if !@page.locked? || @page.locked_by.id == session[:user].id %>
  <%= link_to _("Edit"), :controller => "wiki", :action => "edit", :id => @page.name %>
<% end %>

<% end %>


Replaced disabled select with just the text to deal with a weird background issue on Macs

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

<%
desc       = @description
type       = desc.source_type
new_record = desc.new_record?
admin      = new_record || desc.is_admin?(@user)
author     = new_record || desc.is_author?(@user)
root       = is_in_admin_mode?
if new_record or admin or author or root %>

    <%= :form_description_source.t %>:

    <%=
      need_help = false
      if root
        form.select(:source_type, [
          [:form_description_source_public.l,  :public],
          [:form_description_source_foreign.l, :foreign],
          [:form_description_source_project.l, :project],
          [:form_description_source_source.l,  :source],
          [:form_description_source_user.l,    :user],
        ])
      elsif new_record and [:public, :source, :user].include?(type)
        need_help = true
        form.select(:source_type, [
          [:form_description_source_public.l, :public],
          [:form_description_source_source.l, :source],
          [:form_description_source_user.l,   :user],
        ])
      else
        "form_description_source_#{type}".to_sym.l
      end
    %>

    <%=
      args = { :size => 40 }
      if (type == :foreign or type == :project) and !root
        args[:disabled] = 'disabled'
      end
      indent + form.text_field(:source_name, args)
    %>

  <% if need_help %>

<%= :form_description_source_help.tpl %>

  <% end %>

    <%= :form_description_permissions.t %>:

    <% args = {}
    if [:public, :foreign].include?(type) and !root and !new_record
      args[:disabled] = 'disabled'
    end %>
    <%= form.check_box(:public_write, args) %>
      <%= :form_description_public_writable.t %>

    <%= form.check_box(:public, args) %>
      <%= :form_description_public_readable.t %>

    <%= :form_description_permissions_help.t %>

    <%= :License.t %>:

    <%= form.select(:license_id, @licenses) %>

    <%= :form_description_license_help.t %>

<% end %>

<%
desc       = @description
type       = desc.source_type
new_record = desc.new_record?
admin      = new_record || desc.is_admin?(@user)
author     = new_record || desc.is_author?(@user)
root       = is_in_admin_mode?
if new_record or admin or author or root %>

    <%= :form_description_source.t %>:

    <%=
      need_help = false
      if root
        form.select(:source_type, [
          [:form_description_source_public.l,  :public],
          [:form_description_source_foreign.l, :foreign],
          [:form_description_source_project.l, :project],
          [:form_description_source_source.l,  :source],
          [:form_description_source_user.l,    :user],
        ])
      elsif new_record and [:public, :source, :user].include?(type)
        need_help = true
        form.select(:source_type, [
          [:form_description_source_public.l, :public],
          [:form_description_source_source.l, :source],
          [:form_description_source_user.l,   :user],
        ])
      else
        form.select(:source_type, [
          ["form_description_source_#{type}".to_sym.l, type],
        ], {}, { :disabled => 'disabled' })
      end
    %>

    <%=
      args = { :size => 40 }
      if (type == :foreign or type == :project) and !root
        args[:disabled] = 'disabled'
      end
      indent + form.text_field(:source_name, args)
    %>

  <% if need_help %>

<%= :form_description_source_help.tpl %>

  <% end %>

    <%= :form_description_permissions.t %>:

    <% args = {}
    if [:public, :foreign].include?(type) and !root and !new_record
      args[:disabled] = 'disabled'
    end %>
    <%= form.check_box(:public_write, args) %>
      <%= :form_description_public_writable.t %>

    <%= form.check_box(:public, args) %>
      <%= :form_description_public_readable.t %>

    <%= :form_description_permissions_help.t %>

    <%= :License.t %>:

    <%= form.select(:license_id, @licenses) %>

    <%= :form_description_license_help.t %>

<% end %>


Substituting 'helps' -> With small tag for content

* This patch includes all the substitutions of help animations to
	  'small' tagged content.
	* This solutions was used because the contents in these cases were
	  important and shouldn't be removed.

<%= error_messages_for :user, :person %>

<% if !@wizard %>
  <% if ! defined? hidden_atention || ! hidden_atention %>

  <%= _('Dear user, welcome to the %s network. To start your participation in this space, fill in the fields below. After this operation, your login and password will be registered, allowing you to create %s and %s in this environment.') % [environment.name, __('communities'), __('enterprises')] %>

  <% end %>
<% end %>

<% labelled_form_for :user, @user,
   :html => { :help=>_('Fill all these fields to join in this environment.
 If you forgot your password, do not create a new account, click on the "I forgot my password!" link. ;-)'), :id => 'profile-data'
            } do |f| -%>
<%= icaptcha_field() %>

<%= hidden_field_tag :invitation_code, @invitation_code %>

<%= hidden_field_tag :wizard, @wizard %>

<%= required_fields_message %>

  <%= required f.text_field(:email) %>
  <%= content_tag(:small,_('This e-mail address will be used to contact you.')) %>

<%= required f.text_field(:login, :onchange => 'this.value = convToValidLogin( this.value )') %>
<%= content_tag(:small,_('Insert your login')) %>

<%= observe_field 'user_login', :url => {:action => 'check_url'}, :with => 'identifier', :update => 'url-check' %>

  <%= required f.password_field(:password) %>
  <%= content_tag(:small,_('Choose a password that you can remember easily. It must have at least 4 characters.')) %>

<%= required f.password_field(:password_confirmation) %>
<%= content_tag(:small,_('To confirm, repeat your password.')) %>

<% labelled_fields_for :profile_data, @person do |f| %>
  <%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %>
<% end %>

<% if @terms_of_use %>

    <%= _("By clicking on 'I accept the terms of use' below you are agreeing to the %s") %
    link_to_function(_('Terms of use'), nil) do |page|
      page['terms-of-use'].show
    end %>

      <%= @terms_of_use %>
      <%= link_to_function(_('Hide'), nil) do |page|
        page['terms-of-use'].hide
      end %>

<%= labelled_check_box(environment.terms_of_use_acceptance_text.blank? ? _('I accept the terms of use') : environment.terms_of_use_acceptance_text, 'user[terms_accepted]') %>

<% end %>

<% if params[:enterprise_code] %>
  <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
  <%= hidden_field_tag :answer, params[:answer] %>
  <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
  <%= hidden_field_tag :new_user, true %>
<% end %>

<% button_bar do %>
  <% if @wizard %>
    <%= submit_button('save', _('Sign up'), :class => 'icon-menu-login') %>
  <% else %>
    <%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
  <% end %>
<% end %>
<% end -%>

<%= error_messages_for :user, :person %>

<% if !@wizard %>
  <% if ! defined? hidden_atention || ! hidden_atention %>

  <%= _('Dear user, welcome to the %s network. To start your participation in this space, fill in the fields below. After this operation, your login and password will be registered, allowing you to create %s and %s in this environment.') % [environment.name, __('communities'), __('enterprises')] %>

  <% end %>
<% end %>

<% labelled_form_for :user, @user,
   :html => { :help=>_('Fill all these fields to join in this environment.
 If you forgot your password, do not create a new account, click on the "I forgot my password!" link. ;-)'), :id => 'profile-data'
            } do |f| -%>
<%= icaptcha_field() %>

<%= hidden_field_tag :invitation_code, @invitation_code %>

<%= hidden_field_tag :wizard, @wizard %>

<%= required_fields_message %>

<%= required f.text_field(:email,
    :help => help=_('This e-mail address will be used to contact you.')) %>

<%= help %>

<%= required f.text_field(:login,
      :help => help=_('Insert your login'),
      :onchange => 'this.value = convToValidLogin( this.value )') %>

<%= help %>

<%= observe_field 'user_login', :url => {:action => 'check_url'}, :with => 'identifier', :update => 'url-check' %>

<%= required f.password_field(:password,
    :help => help=_('Choose a password that you can remember easily. It must have at least 4 characters.')) %>

<%= help %>

<%= required f.password_field(:password_confirmation,
    :help => help=_('To confirm, repeat your password.')) %>

<%= help %>

<% labelled_fields_for :profile_data, @person do |f| %>
  <%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %>
<% end %>

<% if @terms_of_use %>

    <%= _("By clicking on 'I accept the terms of use' below you are agreeing to the %s") %
    link_to_function(_('Terms of use'), nil) do |page|
      page['terms-of-use'].show
    end %>

      <%= @terms_of_use %>
      <%= link_to_function(_('Hide'), nil) do |page|
        page['terms-of-use'].hide
      end %>

<%= labelled_check_box(environment.terms_of_use_acceptance_text.blank? ? _('I accept the terms of use') : environment.terms_of_use_acceptance_text, 'user[terms_accepted]') %>

<% end %>

<% if params[:enterprise_code] %>
  <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
  <%= hidden_field_tag :answer, params[:answer] %>
  <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
  <%= hidden_field_tag :new_user, true %>
<% end %>

<% button_bar do %>
  <% if @wizard %>
    <%= submit_button('save', _('Sign up'), :class => 'icon-menu-login') %>
  <% else %>
    <%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
  <% end %>
<% end %>
<% end -%>


change the admin/comments view so that clear comments works

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

<% content_for :action_nav do %>

<%= link_to_remote 'Clear Comments', :confirm => "Are you sure you wish to clear all visible comments?",
        :url  => { :controller => 'articles', :action => 'destroy_comment' },
        :with => "ArticleForm.getAvailableComments().toQueryString('comment')"
      %>

<% end %>

Unapproved Comments

  <% @comments.reverse.each_with_index do |comment, i| -%>
  <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">

<a name="comment-<%= comment.id %>"> <%= link_to comment.article.title, :controller => 'articles', :action => :edit, :id => comment.article %>

"<%= truncate strip_tags(comment.body), 255 %>"

      — <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %>

    <% if comment.approved? -%>
      <%= link_to_remote 'Unapprove', :url => { :action => 'unapprove', :controller => 'articles', :id => comment.article, :comment => comment } %> |
    <% else -%>
      <%= link_to_remote 'Approve',   :url => { :action => 'approve', :controller => 'articles', :id => comment.article, :comment => comment } %> |
    <% end -%>
      <%= link_to_remote 'Delete',    :url => { :action => 'destroy_comment', :controller => 'articles', :id => comment.article, :comment => comment } %>

  <% end -%>