fix (again) to sharing form for projects, which do not have a policy

<%
   set_parameters_for_sharing_form
   show_advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?
   default_projects_access_type = @resource.is_isa? ? Policy::EDITING : Policy::ACCESSIBLE
   default_consortium_access_type = Policy::VISIBLE
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

    <%= help_icon("Here you can specify who can see#{', download' if @resource.is_downloadable?} and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view the summary of<% if @resource.is_downloadable? %>, get access to the content of,<% end %> and edit the <%= @resource_type -%>.
        <%= link_to_function "More info " + expand_image, visual_effect(:toggle_blind, "more_sharing_info", :duration => 0.3) -%>

          You may:

Keep the <%= @resource_type -%> private, and only visible to yourself.

Share within the selected projects and with all other users that are a member of a <%= Seek::Config.project_name %> project.

          <% if try_block{@resource.can_publish?} %>

Share with the all visitors (including anonymous visitors with no login)

          <% end %>

Define more fine-grained sharing in the Advanced sharing: you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
            <input type="hidden" id='access_type_select_<%= Policy::PRIVATE -%>' name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
            <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                                value="<%= Policy::PRIVATE -%>" type="radio" />
            - Keep this <%= @resource_type -%> private (only visible to you)

          <%= additional_advanced_permissions_included @resource, Policy::PRIVATE -%>

Or share it with..

            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]" value="<%= Policy::ALL_SYSMO_USERS -%>" />
            - Members of projects associated with this <%= @resource_type -%>:

             <select name="sharing[your_proj_access_type]" id="sharing_your_proj_access_type">
                 <%= policy_selection_options([Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource, your_project_access_type(@policy, @resource) || default_projects_access_type) -%>
             </select>

            ... and all other project members:
             <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
               :sharing_scope => Policy::ALL_SYSMO_USERS, :access_type => (@resource.respond_to?(:policy?) && @resource.policy.try(:sharing_scope)==Policy::ALL_SYSMO_USERS ? @access_mode : default_consortium_access_type), :access_type_options=>[Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING] } -%>
             <%= additional_advanced_permissions_included @resource, Policy::ALL_SYSMO_USERS -%>

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>" <%= 'disabled="true"' if @resource.respond_to?(:can_publish?) && !@resource.can_publish? -%>/>
            - All visitors (including anonymous visitors with no login):

              <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::EVERYONE,
            :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>
           <%= additional_advanced_permissions_included @resource, Policy::EVERYONE -%>

    <% if @resource.new_record? && @resource.errors.empty? -%>

    <% end -%>

    <%= link_to_function "Advanced permissions " + expand_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'none;' : 'block;'), :id =>'advanced_sharing_expand_image' do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>
    <%= link_to_function "Advanced permissions " + collapse_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'block;' : 'none;'), :id =>'advanced_sharing_collapse_image'do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>

    <div id="advanced sharing" class='sharing_box_form' style="display:<%= show_advanced_permissions ? 'block;' : 'none;'-%>">

Additional fine-grained sharing permissions

              So far you have selected to share this <%= @resource_type -%> with:

              Loading...

              Build up the list of people and groups to share with.
              Select from the options below and click "Add" to apply
              your choices and add collaborators to your current selection:

                <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
                Favourite Groups

                  <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
                  <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

                  <%= select_tag "favourite_group_select", f_group_select_options, :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

                  <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                    :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

                  <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit(@resource.class.name) -%>

                  <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                    <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new(@resource.class.name) -%>

                <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
                Projects and Institutions

                  <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

                  Step 1
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 2
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 3

                    <input type="hidden" id="proj_select_step_index" value="1">

                      <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                      Step 1: Select a project
                      <%= select("proj_project", "select",
                        Project.find(:all).collect {|p| [ p.name, p.id ] },
                        {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 2: Select scope of the project
                      <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 3: Choose access rights, review and submit

                      <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                        <%= policy_selection_options [Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource -%>
                      </select>

                        <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                            <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link(@resource.class.name) -%>

                <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
                Individual People

                    Please type names of people to share this <%= @resource_type -%> with into the box below - suggestions will be displayed as you type.
                    Select access rights from drop-down menu; these will be applied to all chosen people.
                    Clicking "Add" will add selected people to the list.

                          ^_^<input type="text" id="ip_hidden_input" tabindex="-1" >

                            <input type="text" size="1" tabindex="" id="ip_autocomplete_input" />

Type the name of a friend, friend list, or email address

                        <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                          <%= policy_selection_options nil, @resource -%>
                        </select>

                        <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>

<%
   set_parameters_for_sharing_form
   show_advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?
   default_projects_access_type = @resource.is_isa? ? Policy::EDITING : Policy::ACCESSIBLE
   default_consortium_access_type = Policy::VISIBLE
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

    <%= help_icon("Here you can specify who can see#{', download' if @resource.is_downloadable?} and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view the summary of<% if @resource.is_downloadable? %>, get access to the content of,<% end %> and edit the <%= @resource_type -%>.
        <%= link_to_function "More info " + expand_image, visual_effect(:toggle_blind, "more_sharing_info", :duration => 0.3) -%>

          You may:

Keep the <%= @resource_type -%> private, and only visible to yourself.

Share within the selected projects and with all other users that are a member of a <%= Seek::Config.project_name %> project.

          <% if try_block{@resource.can_publish?} %>

Share with the all visitors (including anonymous visitors with no login)

          <% end %>

Define more fine-grained sharing in the Advanced sharing: you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
            <input type="hidden" id='access_type_select_<%= Policy::PRIVATE -%>' name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
            <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                                value="<%= Policy::PRIVATE -%>" type="radio" />
            - Keep this <%= @resource_type -%> private (only visible to you)

          <%= additional_advanced_permissions_included @resource, Policy::PRIVATE -%>

Or share it with..

            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]" value="<%= Policy::ALL_SYSMO_USERS -%>" />
            - Members of projects associated with this <%= @resource_type -%>:

             <select name="sharing[your_proj_access_type]" id="sharing_your_proj_access_type">
                 <%= policy_selection_options([Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource, your_project_access_type(@policy, @resource) || default_projects_access_type) -%>
             </select>

            ... and all other project members:
             <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
               :sharing_scope => Policy::ALL_SYSMO_USERS, :access_type => (@resource.policy.sharing_scope==Policy::ALL_SYSMO_USERS ? @access_mode : default_consortium_access_type), :access_type_options=>[Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING] } -%>
             <%= additional_advanced_permissions_included @resource, Policy::ALL_SYSMO_USERS -%>

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>" <%= 'disabled="true"' if @resource.respond_to?(:can_publish?) && !@resource.can_publish? -%>/>
            - All visitors (including anonymous visitors with no login):

              <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::EVERYONE,
            :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>
           <%= additional_advanced_permissions_included @resource, Policy::EVERYONE -%>

    <% if @resource.new_record? && @resource.errors.empty? -%>

    <% end -%>

    <%= link_to_function "Advanced permissions " + expand_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'none;' : 'block;'), :id =>'advanced_sharing_expand_image' do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>
    <%= link_to_function "Advanced permissions " + collapse_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'block;' : 'none;'), :id =>'advanced_sharing_collapse_image'do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>

    <div id="advanced sharing" class='sharing_box_form' style="display:<%= show_advanced_permissions ? 'block;' : 'none;'-%>">

Additional fine-grained sharing permissions

              So far you have selected to share this <%= @resource_type -%> with:

              Loading...

              Build up the list of people and groups to share with.
              Select from the options below and click "Add" to apply
              your choices and add collaborators to your current selection:

                <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
                Favourite Groups

                  <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
                  <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

                  <%= select_tag "favourite_group_select", f_group_select_options, :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

                  <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                    :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

                  <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit(@resource.class.name) -%>

                  <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                    <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new(@resource.class.name) -%>

                <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
                Projects and Institutions

                  <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

                  Step 1
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 2
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 3

                    <input type="hidden" id="proj_select_step_index" value="1">

                      <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                      Step 1: Select a project
                      <%= select("proj_project", "select",
                        Project.find(:all).collect {|p| [ p.name, p.id ] },
                        {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 2: Select scope of the project
                      <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 3: Choose access rights, review and submit

                      <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                        <%= policy_selection_options [Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource -%>
                      </select>

                        <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                            <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link(@resource.class.name) -%>

                <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
                Individual People

                    Please type names of people to share this <%= @resource_type -%> with into the box below - suggestions will be displayed as you type.
                    Select access rights from drop-down menu; these will be applied to all chosen people.
                    Clicking "Add" will add selected people to the list.

                          ^_^<input type="text" id="ip_hidden_input" tabindex="-1" >

                            <input type="text" size="1" tabindex="" id="ip_autocomplete_input" />

Type the name of a friend, friend list, or email address

                        <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                          <%= policy_selection_options nil, @resource -%>
                        </select>

                        <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>


[Mezuro] Fixed module name on source tree navigation

<% render :partial => "source_tree", :locals => {:module_result => @module_result} %>

<%= _"Metric results for: #{@module_result.module.name} (#{@module_result.module.granularity})" %>

  <%= render :partial => "metric_results", :locals => {:metric_results => @metric_results, :module_result_id => @module_result.id} %>

        <a href="#" show-grade-history="<%= @module_result.id %>" data-module-id="<%= @module_result.id %>" >

            <%= _('Grade:') %>
            <%= "%.02f" % @module_result.grade %>

<% render :partial => "source_tree", :locals => {:module_result => @module_result} %>

<%= _('Metric results for: #{@module_result.module.name} (#{@module_result.module.granularity}) ') %>

  <%= render :partial => "metric_results", :locals => {:metric_results => @metric_results, :module_result_id => @module_result.id} %>

        <a href="#" show-grade-history="<%= @module_result.id %>" data-module-id="<%= @module_result.id %>" >

            <%= _('Grade:') %>
            <%= "%.02f" % @module_result.grade %>


Fix failing test/functional/admin/articles_controller_test.rb

<%= error_messages_for 'article' %>
<% @style = has_excerpt? ? "" : "display:none" %>

Title

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

    <dt id="x-lbl" style="<%= @style %>"><%= form.label_for :excerpt %> (<%= link_to_function 'Cancel', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

    <dd id="x-body" style="<%= @style %>"><%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

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

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

Tags Enter one or more tags separated by a comma or a space (for example, "Web Dev" Tutorials or Web Dev, Tutorials).

<%= form.text_field :tag %>

Save as Draft?

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

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

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @published -%>>
    <%= form.datetime_select :published_at,
          :start_year => (@article.published_at || Time.now.utc).year-1, :end_year => (Time.now.utc.year + 5), :order => [:month, :day, :year] %>

<%= error_messages_for 'article' %>
<% @style = has_excerpt? ? "" : "display:none" %>

Title

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

    <dt id="x-lbl" style="<%= @style %>"><%= form.label_for :excerpt %> (<%= link_to_function 'Cancel', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

    <dd id="x-body" style="<%= @style %>"><%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

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

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

Tags Enter one or more tags separated by a comma or a space (for example, "Web Dev" Tutorials or Web Dev, Tutorials).

<%= form.text_field :tag %>

Save as Draft?

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

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

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @published -%>>
    <%= form.datetime_select :published_at,
          :start_year => (@article.published_at || Time.now.utc).year-1, :order => [:month, :day, :year] %>


Don't show p if empty

Don't show p if empty

<% if block.title.present? %>

<%= block.title %>

<% end %>

      <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>

<% if show_name %>

<%= h block.owner.short_name %>

<% end %>

<div style="text-align: center; font-size: 75%; clear: both" id="profile-admin-url-<%= block.id %>">

<div class="profile-info-options" id="profile-info-options-<%= block.id %>">

<%= block.title %>

      <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>

<% if show_name %>

<%= h block.owner.short_name %>

<% end %>

<div style="text-align: center; font-size: 75%; clear: both" id="profile-admin-url-<%= block.id %>">

<div class="profile-info-options" id="profile-info-options-<%= block.id %>">


Commit SteveC's removal of the mappam ads.

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

<% if params['mlon'] and params['mlat'] %>
<% marker = true %>
<% mlon = params['mlon'] %>
<% mlat = params['mlat'] %>
<% end %>

<% if params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat'] %>
<% bbox = true %>
<% minlon = params['minlon'] %>
<% minlat = params['minlat'] %>
<% maxlon = params['maxlon'] %>
<% maxlat = params['maxlat'] %>
<% end %>

<% if params['lon'] and params['lat'] %>
<% lon =  params['lon'] %>
<% lat =  params['lat'] %>
<% zoom =  params['zoom'] || '5' %>
<% layers = params['layers'] %>
<% elsif params['mlon'] and params['mlat'] %>
<% lon = params['mlon'] %>
<% lat = params['mlat'] %>
<% zoom =  params['zoom'] || '12' %>
<% layers = params['layers'] %>
<% elsif cookies.key?("location") %>
<% lon,lat,zoom,layers = cookies["location"].value.first.split(",") %>
<% elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<% lon =  @user.home_lon %>
<% lat =  @user.home_lat %>
<% zoom = '10' %>
<% else %>
<% lon =  '-0.1' %>
<% lat =  '51.5' %>
<% zoom =  params['zoom'] || '5' %>
<% layers = params['layers'] %>
<% end %>

<%= javascript_include_tag 'map.js' %>

<% unless @user %>

<% end %>


fixed login view when accessed from /

fixed login view when accessed from /

<% @login_form_already_rendered = true -%>

<% 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], { :controller => '/account', :action => 'signup', :redirect => params[:redirect] } %>

      <%= link_to 'I forgot my password'[:forgot_password_link], :controller => '/account', :action => 'forgot_password' %>
      <%= hidden_field_tag 'redirect', params[:redirect] %>

<% end # form -%>

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

<%# flash[:error] %>

<% @login_form_already_rendered = true -%>

<% 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], :action => 'forgot_password' %>
      <%= hidden_field_tag 'redirect', params[:redirect] %>

<% end # form -%>

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

<%# flash[:error] %>


some layout fixes in accont view

some layout fixes in accont view

Account <%= @account.title %>

    Datum
    Text
    Belastung
    Gutschrift
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%=h booking.value_date.strftime('%d.%m.%Y') unless booking.value_date.nil? %>

      <%= in_place_editor_field :booking, :title %>
      <%= '
' unless booking.comments.empty? %>
      <%= in_place_editor_field :booking, :comments %>

    <%= in_place_editor_field :booking, :in_place_amount if booking.debit_account == @account %>
    <%= in_place_editor_field :booking, :in_place_amount if booking.credit_account == @account %>
    <%= currency_fmt(total_credit - total_debit) %>
    <%= link_to h(booking.value_date.strftime("%d.%m.%Y")), :controller => :bookings, :action => :show, :id => booking  unless booking.value_date.nil? %>

  <% end %>

    Umsatz

    <%= total_credit %>
    <%= total_debit %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= total_credit - total_debit %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>

Account <%= @account.title %>

    Datum
    Text
    Belastung
    Gutschrift
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%=h booking.value_date.strftime('%d.%m.%Y') unless booking.value_date.nil? %>

      <%= in_place_editor_field :booking, :title %>
      <%= "
" unless booking.comments.empty? %>
      <%= in_place_editor_field :booking, :comments %>

    <%= in_place_editor_field :booking, :in_place_amount if booking.debit_account == @account %>
    <%= in_place_editor_field :booking, :in_place_amount if booking.credit_account == @account %>
    <%= currency_fmt(total_credit - total_debit) %>
    <%= link_to h(booking.value_date.strftime("%d.%m.%Y")), :controller => :bookings, :action => :show, :id => booking  unless booking.value_date.nil? %>

  <% end %>

    Umsatz

    <%= total_credit %>
    <%= total_debit %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= total_credit - total_debit %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>


ActionItem1165: make sure to always point into the current domain

<div id='join-community-popup'>
  <h3> <%= __('Do you want to join this community?') %> </h3>

  <% button_bar do %>
    <% if logged_in? %>
      <%= button(:ok, _('Yes'), profile.join_url.merge(:confirmation => '1'), :method => :post) %>
    <% else %>
      <%= button(:ok, _('Yes'), profile.join_url) %>
    <% end %>
    <%= button_to_remote(:cancel, _('Not now'), :url => profile.join_url.merge({:controller => 'profile', :action => 'refuse_for_now', :profile => profile.identifier}), :loaded => '$("join-community-popup").hide()') %>
    <%= button(:cancel, _('No and don\'t ask again'), :controller => 'profile', :action => 'refuse_join', :profile => profile.identifier) if logged_in? %>
  <% end %>
</div>
<%= draggable_element('join-community-popup') %>

<div id='join-community-popup'>
  <h3> <%= __('Do you want to join this community?') %> </h3>

  <% button_bar do %>
    <% if logged_in? %>
      <%= button(:ok, _('Yes'), profile.join_url.merge(:confirmation => '1'), :method => :post) %>
    <% else %>
      <%= button(:ok, _('Yes'), profile.join_url) %>
    <% end %>
    <%= button_to_remote(:cancel, _('Not now'), :url => profile.url.merge({:controller => 'profile', :action => 'refuse_for_now', :profile => profile.identifier}), :loaded => '$("join-community-popup").hide()') %>
    <%= button(:cancel, _('No and don\'t ask again'), :controller => 'profile', :action => 'refuse_join', :profile => profile.identifier) if logged_in? %>
  <% end %>
</div>
<%= draggable_element('join-community-popup') %>


Don't accidentally save article when user searches for assets

When the user clicks on the search tab, types some text, and hits
enter, it triggers a form submission for the main article form.  This is
very annoying.

So now we intercept the keypress event on this field, stop it from
propagating, and instead trigger the same logic as the "Search" button.
I found the following helpful for getting started:

  http://ne0phyte.com/blog/2008/09/02/javascript-keypress-event/

Publish in these sections

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

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

    <% end %>

Latest

Attached

Search

Upload

Bucket

        <%= render :partial => "admin/assets/widget", :collection => @assets, :locals => { :prefix => 'latest' } %>

        <%= render :partial => "admin/assets/widget", :collection => @article.assets, :locals => { :prefix => 'attached' } %>

        Search by tag or title

      <input class="searchbox" type="text" size="30" name="q" id="search-files-q" />
      <input type="button" value="Search" onclick="TinyTab.callbacks['search-files']($F('search-files-q'))" />

      <% javascript_tag do -%>
        // Don't save the entire article when the user presses enter.
        Event.observe('search-files-q', 'keypress', function (event) {
          if (event.keyCode == Event.KEY_RETURN) {
            Event.stop(event);
            TinyTab.callbacks['search-files']($F('search-files-q'))
          }
        });
      <% end -%>

        1.
        <%= file_field_tag 'asset[uploaded_data]', :size => 15, :id => 'asset_uploaded_data' %>

2. <input type="button" value="Upload" onclick="Asset.upload('article-form');" />

        <%= render :partial => "admin/assets/widget", :collection => @bucket_assets, :locals => { :prefix => 'bucket' } %>

Optional settings

Format with:

        <select name="article[filter]" id="article_filter">
        <%= options_for_select(filter_options, @article.filter) %>
      </select>

Comments

<%= form.select :comment_age, comment_expiration_options %>

Permanent link:

<%= form.text_field :permalink %>

Publish in these sections

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

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

    <% end %>

Latest

Attached

Search

Upload

Bucket

        <%= render :partial => "admin/assets/widget", :collection => @assets, :locals => { :prefix => 'latest' } %>

        <%= render :partial => "admin/assets/widget", :collection => @article.assets, :locals => { :prefix => 'attached' } %>

        Search by tag or title

      <input class="searchbox" type="text" size="30" name="q" id="search-files-q" />
      <input type="button" value="Search" onclick="TinyTab.callbacks['search-files']($F('search-files-q'))" />

        1.
        <%= file_field_tag 'asset[uploaded_data]', :size => 15, :id => 'asset_uploaded_data' %>

2. <input type="button" value="Upload" onclick="Asset.upload('article-form');" />

        <%= render :partial => "admin/assets/widget", :collection => @bucket_assets, :locals => { :prefix => 'bucket' } %>

Optional settings

Format with:

        <select name="article[filter]" id="article_filter">
        <%= options_for_select(filter_options, @article.filter) %>
      </select>

Comments

<%= form.select :comment_age, comment_expiration_options %>

Permanent link:

<%= form.text_field :permalink %>


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

Scores for <%= Assignment.find(@assignment_id).name %>

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>
<%
    review_no = 1
	grade = 0
    _time = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s
    for review_map in @review_mapping
        for review in review_map.reviews%>
            Review <%=review_no%> done on <%= review.created_at.strftime('%A %B %d %Y, %I:%M%p') %><a href="#1" onClick="toggleVis('<%=review_no %>');">
		<span class="inline" id="<%=review_no %>_show">View
              	<span class="inline" id="<%=review_no %>_hide" style="display: none">Hide

			<div id="<%=review_no%>_myDiv" style="display:none">

                Question
                Score
				Comment

             <%
             total = 0
             for review_score in review.review_scores
                #if (!Question.find(review_score.question_id).true_false)
                    total += review_score.score
                #end%>

                    <%=Question.find(review_score.question_id).txt%>	<%=review_score.score%>  	<%=review_score.comments%>

            <%end
			  grade += total%>

Total	<%=total%>  	Score: <%=sprintf("%.2f",total.to_f*100/@sum_of_max.to_f)%>%

           Additional comment : <%=review.additional_comment%>

           <% @mapping = ReviewMapping.find(review_map.id) %>
           <% @assgt_id = @mapping.assignment_id %>
           <% @assignment = Assignment.find(@assgt_id)
		if @assignment.team_assignment
			@team_id = @mapping.team_id
		else
			@author_id = @mapping.author_id
		end
	   %>

		     <%if(ReviewFeedback.find(:first,:conditions =>["review_id = ? and assignment_id = ?", review.id, @assignment_id]))%>

 View feedback : <%= link_to "View", {:controller =>'review_feedback', :action=>'view_feedback', :id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id, :id4=>@team_id} %>

 Edit feedback : <%= link_to "Edit", {:controller =>'review_feedback', :action =>'edit_feedback', :id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id, :id4=>@team_id} %>

		     <% else %>

Give feedback to reviewer:<%= link_to "Begin", {:controller => 'review_feedback', :action => 'new_feedback',:id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id, :id4=>@team_id} %>

				      <% end
					%>

		   <%review_no +=1
        end
	end%>
    <% if review_no-1 > 0 %>

Grade

		Average (of all reviews) = <%=sprintf("%.2f",grade.to_f/(review_no-1).to_f) %>
		<%if @final_penalty !=0%>

Penalty units= <%=@penalty_units%> Penalty per unit=<%=@late_policy.penalty_per_unit%> Maximum penalty=<%=@late_policy.max_penalty%>

		<%end%>
		  Final grade = <%=sprintf("%.2f",(grade.to_f/(review_no-1).to_f)*100/@sum_of_max.to_f-@final_penalty.to_f)%>%

   	<%else%>
		<%if @assignment.wiki_type_id == 2 %>
			<%if @assignment.team_assignment %>
				There are no reviews of your work yet.
			<%else%>
				<%if review_mediawiki @assignment.directory_path, _time, @user_name == ''%>
					There are no reviews of your work because it seems that you have not submitted anything for this assignment.
				<%else%>
					There are no reviews of your work yet.
				<%end%>
			<%end%>
		<%else%>
			There are no reviews on your work yet.
		<%end%>
	<%end%>
<%if(@review_of_review_mappings.size > 0)%>

Reviews of reviews

  <%ror_no = 1%>
   <% for ror_map in @review_of_review_mappings %>
  <%
  @ror = ReviewOfReview.find_by_review_of_review_mapping_id(ror_map.id) %>
  <% if (@ror)%>

Review of Review <%=ror_no%>  <%= link_to "View",{:controller => 'review_of_review', :action => 'view_review_of_review', :id => @ror.id} %>
  <% end %>
  <%ror_no += 1
  	end
  end%>

Scores for <%= @assignment.name %>

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>
<%
    review_no = 1
	grade = 0
    _time = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s

    for review_map in @review_mapping
        for review in review_map.reviews%>
			Review <%=review_no%> done on <%= review.created_at.strftime('%A %B %d %Y, %I:%M%p') %><a href="#1" onClick="toggleVis('<%=review_no %>');">
            	<span class="inline" id="<%=review_no %>_show">View
              	<span class="inline" id="<%=review_no %>_hide" style="display: none">Hide

			<div id="<%=review_no%>_myDiv" style="display:none">

                Question
                Score
				Comment

             <%
             total = 0
             for review_score in review.review_scores
                #if (!Question.find(review_score.question_id).true_false)
                    total += review_score.score
                #end%>

                    <%=Question.find(review_score.question_id).txt%>	<%=review_score.score%>  	<%=review_score.comments%>

            <%end
			  grade += total%>

Total	<%=total%>  	Score: <%=total*100/@assignment.get_max_review_score%>%

           Additional comment : <%=review.additional_comment%>

           <% @mapping = ReviewMapping.find(review_map.id) %>
           <% @assgt_id = @mapping.assignment_id %>
		   <% @assignment = Assignment.find_by_id (@assgt_id)
			if @assignment.team_assignment
				@team_id = @mapping.team_id
			else
				@author_id = @mapping.author_id
			end
			%>

		     <%if(ReviewFeedback.find(:first,:conditions =>["review_id = ? and assignment_id = ?", review.id, @assignment_id]))%>

 View feedback : <%= link_to "View", {:controller =>'review_feedback', :action=>'view_feedback', :id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id, :id4=>@team_id} %>

 Edit feedback : <%= link_to "Edit", {:controller =>'review_feedback', :action =>'edit_feedback', :id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id, :id4=>@team_id} %>

		     <% else %>

Give feedback to reviewer:<%= link_to "Begin", {:controller => 'review_feedback', :action => 'new_feedback',:id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id, :id4=>@team_id} %>

				      <% end
					%>
		   <%review_no +=1
        end
	end%>
    <% if review_no-1 > 0 %>

Grade

		Average (of all reviews) = <%=grade/(review_no-1)%>
		<%if @final_penalty !=0%>

Penalty units= <%=@penalty_units%> Penalty per unit=<%=@late_policy.penalty_per_unit%> Maximum penalty=<%=@late_policy.max_penalty%>

		<%end%>
		  Final grade = <%=(grade/(review_no-1))*100/@assignment.get_max_review_score-@final_penalty%>%

   	<%else%>
		<%if @assignment.wiki_type_id == 2 %>
			<%if @assignment.team_assignment %>
				There are no reviews of your work yet.
			<%else%>
				<%if review_mediawiki @assignment.directory_path, _time, @user_name == ''%>
					There are no reviews of your work because it seems that you have not submitted anything for this assignment.
				<%else%>
					There are no reviews of your work yet.
				<%end%>
			<%end%>
		<%else%>
			There are no reviews on your work yet.
		<%end%>
	<%end%>
<%if(@review_of_review_mappings.size > 0)%>

Reviews of reviews

  <%ror_no = 1%>
   <% for ror_map in @review_of_review_mappings %>
  <%
  @ror = ReviewOfReview.find_by_review_of_review_mapping_id(ror_map.id) %>
  <% if (@ror)%>

Review of Review <%=ror_no%>  <%= link_to "View",{:controller => 'review_of_review', :action => 'view_review_of_review', :id => @ror.id} %>
  <% end %>
  <%ror_no += 1
  	end
  end%>


Don't let non-editors go to the editing UI; send them straight to answering the survey

<% p = logged_in? ? logged_in_person : nil-%>

	<% for questionnaire in @questionnaires %>
          <% authors = questionnaire.permitted_people("edit").collect {|p| p.name}.join(", ") -%>

            <div id="questionnairesummary_<%=questionnaire.id%>">

				  <% if logged_in? and logged_in_person.permitted?(questionnaire, "edit") -%>
                  	<%= link_to questionnaire.title, questionnaire %>
				  <% else -%>
				    <%=h questionnaire.title%>
					(<%= link_to "Answer", :controller => "answer", :action => "index", :id => questionnaire.id -%>)
				  <% end -%>

                  <% if questionnaire.tags.length > 0 %>
                    Tags:

                     <%=h questionnaire.tag_names.join(", ") %>

                  <% end -%>

                  <%= h authors %>

	<% end %>
  <%= will_paginate @questionnaires, :renderer => "RemoteLinkRenderer" %>

<% p = logged_in? ? logged_in_person : nil-%>

	<% for questionnaire in @questionnaires %>
          <% authors = questionnaire.permitted_people("edit").collect {|p| p.name}.join(", ") -%>

            <div id="questionnairesummary_<%=questionnaire.id%>">

                  <%= link_to questionnaire.title, questionnaire %>

                  <% if questionnaire.tags.length > 0 %>
                    Tags:

                     <%=h questionnaire.tag_names.join(", ") %>

                  <% end -%>

                  <%= h authors %>

	<% end %>
  <%= will_paginate @questionnaires, :renderer => "RemoteLinkRenderer" %>


Fix duration == nil

Fix duration == nil

<% if @current_sheet && @current_sheet.task -%>
<%
   task = Task.find(@current_sheet.task_id, :conditions => ["tasks.company_id = ?", current_user.company_id], :include => [:project] )
   info = []
   info << "#{worked_nice(task.worked_minutes + @current_sheet.duration / 60)}" if task.worked_minutes > 0 || task.duration.to_i > 0
   info << "#{worked_nice(task.duration)}" if task.duration.to_i > 0

   info_string = " (#{info.join(" / ")})" if info.size > 0
   info_string ||= ""

-%>
  <%= link_to( image_tag("time_add.png", :border => 0, :class => "tooltip", :title => _("Done working on %s for now.", task.name) ), {:controller => 'tasks', :action => 'stop_work'} )  -%>
  <%= link_to( task.issue_name + " - " + task.project.name + " / " + task.full_tags, :controller => 'tasks', :action => 'edit', :id => task ) %>

  <%= link_to_remote image_tag("time_delete.png", :border => 0, :title => _("Cancel working on %s.", task.name), :class => "tooltip"),
          :url => { :controller => 'tasks', :action => 'cancel_work_ajax', :id => task },
          :loading => "Element.show('loading');",
          :complete => "Element.hide('loading');",
          :confirm => _("Really abort work?")
            -%>
  <% if @current_sheet.paused? %>
    <%= link_to_remote image_tag("time_resume.png", :border => 0, :title => _("Resume working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%> [<%= _('Paused') %>]
  <% else %>
    <%= link_to_remote image_tag("time_pause.png", :border => 0, :title => _("Pause working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%>
  <% end %>
  <%= worked_nice(@current_sheet.duration/60) -%><%= info_string -%><%= " - " if total_today > 0 %>
<% end %>
<% if total_today > 0 %>
 <%= distance_of_time_in_words(total_today.minutes) %> <%=_ 'worked today'%>
<% end %>

<% if @current_sheet && @current_sheet.task -%>
<%
   task = Task.find(@current_sheet.task_id, :conditions => ["tasks.company_id = ?", current_user.company_id], :include => [:project] )
   info = []
   info << "#{worked_nice(task.worked_minutes + @current_sheet.duration / 60)}" if task.worked_minutes > 0 || task.duration > 0
   info << "#{worked_nice(task.duration)}" if task.duration.to_i > 0

   info_string = " (#{info.join(" / ")})" if info.size > 0
   info_string ||= ""

-%>
  <%= link_to( image_tag("time_add.png", :border => 0, :class => "tooltip", :title => _("Done working on %s for now.", task.name) ), {:controller => 'tasks', :action => 'stop_work'} )  -%>
  <%= link_to( task.issue_name + " - " + task.project.name + " / " + task.full_tags, :controller => 'tasks', :action => 'edit', :id => task ) %>

  <%= link_to_remote image_tag("time_delete.png", :border => 0, :title => _("Cancel working on %s.", task.name), :class => "tooltip"),
          :url => { :controller => 'tasks', :action => 'cancel_work_ajax', :id => task },
          :loading => "Element.show('loading');",
          :complete => "Element.hide('loading');",
          :confirm => _("Really abort work?")
            -%>
  <% if @current_sheet.paused? %>
    <%= link_to_remote image_tag("time_resume.png", :border => 0, :title => _("Resume working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%> [<%= _('Paused') %>]
  <% else %>
    <%= link_to_remote image_tag("time_pause.png", :border => 0, :title => _("Pause working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%>
  <% end %>
  <%= worked_nice(@current_sheet.duration/60) -%><%= info_string -%><%= " - " if total_today > 0 %>
<% end %>
<% if total_today > 0 %>
 <%= distance_of_time_in_words(total_today.minutes) %> <%=_ 'worked today'%>
<% end %>


added a clear div after project list

added a clear div after project list

<% content_for :header_tags do %>
    <%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
    <%= stylesheet_link_tag "redmine_project_filtering.css", :plugin => "redmine_project_filtering" %>
<% end %>

    <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
    <%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
    <%= link_to(l(:label_overall_spent_time), { :controller => 'time_entries' }) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
    <%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%>

<%=l(:label_project_plural)%>

<% form_tag('/projects', :method => :get, :id => :project_filtering) do %>

  <fieldset id="filters" class="collapsible">
    <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>

        <%= label_tag 'q', l('project_filtering_q_label') %>
        <%= text_field_tag 'q', @question, :size => 30, :id => 'search-input' %>

      <%= render :partial => 'custom_field', :collection => @custom_fields_used_for_project_filtering %>

<%= submit_tag( l(:button_send), :id => 'filter_button') -%>

  </fieldset>

<% end %>

<%= javascript_tag "Field.focus('search-input');" %>
<%= javascript_tag "$('filter_button').hide();" %>
<%= observe_form( :project_filtering,
  :frequency => 0.5,
  :url => { :controller => :projects, :action => :index, :format => :js },
  :method => :get
  )
%>

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

<% if User.current.logged? %>

<%= l(:label_my_projects) %>

<% end %>

<% other_formats_links do |f| %>
	<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<% end %>

<% html_title(l(:label_project_plural)) -%>


New frontpage leads

New frontpage leads

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

Anteproyecto de Ley de Transparencia

El Gobierno ha abierto a consulta pública un anteproyecto de ley de transparencia muy mejorable.
            Puedes dar tu opinión hasta mañana 10 de abril, nosotros ya lo hemos hecho. Te animamos a que des la tuya.

Sentimos las molestias

Por un problema técnico el miércoles 4 hemos perdido las cuentas de usuarios creadas ese día. Si intentas iniciar sesión y no te reconoce, regístrate de nuevo. Escríbenos si tienes cualquier duda o si hiciste una pregunta ese miércoles.

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <%
                  # XXX: The ugliest hack, for launch day only
                  leads = [
                    'Más de 50 naciones presentan en Brasilia sus planes de Gobierno Abierto. Lee lo que presenta nuestro país.',
                    'Más de 85.000 personas han firmado ya una campaña para exigir una ley más fuerte y exhaustiva.',
                    'Identificamos innovaciones que permiten la participación de la sociedad en leyes y contenidos periodísticos.',
                    'Mañana cierra la consulta pública del anteproyecto de ley de transparencia. Aquí tienes sugerencias concretas.',
                    'El Gobierno publicó el pasado lunes 26 de marzo el borrador del anteproyecto de la Ley de Transparencia, Acceso a la Información Pública y Buen Gobierno.',
                    'Se pregunta sobre todo a ministerios sobre subvenciones, facturas impagadas o denuncias a los cuerpos de seguridad.',
                    'El texto del borrador del anteproyecto de ley se podrá consultar desde hoy.',
                    'Los políticos la han prometido desde 2004, pero España sigue aún sin ley de transparencia.',
                    'Ya estamos en marcha. Entra con nosotros en el fascinante mundo de pedir información que es tuya.'
                  ];

                  position = 0;
                  for item in @blog_items[0..3]:
                    position = position + 1; %>

                  <div class="frontpage-blog-post <%= position.even? ? 'right' : 'left' %>" <%= position == 3 ? '' 'style="clear:left"' : '' %> >
                    <img src="/tuderechoasaber-theme/images/posts/<%= item['title'].to_s.gsub(/[^A-Za-z]/,'').downcase %>.jpg" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(leads[position-1], "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                <% end %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

Anteproyecto de Ley de Transparencia

El Gobierno ha abierto a consulta pública un anteproyecto de ley de transparencia muy mejorable.
            Puedes dar tu opinión hasta mañana 10 de abril, nosotros ya lo hemos hecho. Te animamos a que des la tuya.

Sentimos las molestias

Por un problema técnico el miércoles 4 hemos perdido las cuentas de usuarios creadas ese día. Si intentas iniciar sesión y no te reconoce, regístrate de nuevo. Escríbenos si tienes cualquier duda o si hiciste una pregunta ese miércoles.

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <%
                  # XXX: The ugliest hack, for launch day only
                  leads = [
                    'Identificamos innovaciones que permiten la participación de la sociedad en leyes y contenidos periodísticos.',
                    'Mañana cierra la consulta pública del anteproyecto de ley de transparencia. Aquí tienes sugerencias concretas.',
                    'El Gobierno publicó el pasado lunes 26 de marzo el borrador del anteproyecto de la Ley de Transparencia, Acceso a la Información Pública y Buen Gobierno.',
                    'Se pregunta sobre todo a ministerios sobre subvenciones, facturas impagadas o denuncias a los cuerpos de seguridad.',
                    'El texto del borrador del anteproyecto de ley se podrá consultar desde hoy.',
                    'Los políticos la han prometido desde 2004, pero España sigue aún sin ley de transparencia.',
                    'Ya estamos en marcha. Entra con nosotros en el fascinante mundo de pedir información que es tuya.'
                  ];

                  position = 0;
                  for item in @blog_items[0..3]:
                    position = position + 1; %>

                  <div class="frontpage-blog-post <%= position.even? ? 'right' : 'left' %>" <%= position == 3 ? '' 'style="clear:left"' : '' %> >
                    <img src="/tuderechoasaber-theme/images/posts/<%= item['title'].to_s.gsub(/[^A-Za-z]/,'').downcase %>.jpg" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(leads[position-1], "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                <% end %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>


Add default support for hiding body overflow

<% # SPROUTCORE DEFAULT INDEX TEMPLATE
   # This template provide provides a basic wrapper for a SproutCore client.
   # Most of the time, it will be sufficient for your own needs.  However, if
   # you need to create your own template, you can do so by copying this file
   # into your client, naming it 'index.rhtml' and then adding the options
   # :layout => 'lib/index' to your Buildfile.
   #
   # See the comments in this file for more information on what you can
   # change.
-%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
<% # Set the 'title' in your config to alter this setting %>
    <title><%= title %></title>
<% #
   # You may choose to load one or more bootstrap resources.  These are
   # JS targets that you would like to load at the top of the page.  Specify
   # these in your Buildfile with the 'bootstrap' config.
-%>
  <%= bootstrap %>

<% #
   # This line should appear in your head area to include the stylesheets
   # generated by your client.  If you need to include your own
   # stylesheets, you don't need to change it here.  Instead use the
   # required option in your config.
-%>
   <%= stylesheets_for_client %>
   <%= @content_for_page_styles %>

<% # The theme CSS class is added automatically based on your chosen theme.
   # If you need to specify a custom theme name, use CONFIG.theme_name
-%>
  <body class="<%= [theme_name(:default => 'sc-theme'), 'focus'].compact.join(' ') %>" <%= config.hide_body_overflow ? 'style="overflow:hidden;"' : '' %> >
<% # This section is used to setup additional optional class names on the
   # body content based on JS-selected conditions.  Use this to make sure you
   # show the proper CSS as soon as the page appears.
-%>
<%= inline_javascript('sproutcore/bootstrap:setup_body_class_names') %>

<% #
   # This is where you root body element will appear.  To cause your
   # content to appear here, just declare content_for('body') in one of
   # your partials.
-%>
<%= @content_for_body %>
<% #
   # This is where your loading screen will appear.  To add a loading screen
   # just declare content_for('loading') in one of your partials. If you use
   # sc-gen to generate your app, it will create a file called loading.rhtml
   # under english.lproj. You can insert the desired content there.
-%>
<% unless @content_for_loading.blank? %>

<%= @content_for_loading %>

<% end -%>
<% #
   # This is where the resources you declare will appear.  By default anything
   # you add to partials will be added to this section unless you specify
   # otherwise.  Note that resources are initially hidden so you can pull them
   # apart as needed on page load.
-%>
<% unless @content_for_resources.blank? %>

      <%= @content_for_resources -%>

<% end -%>
<% #
   # This line should appear at the bottom of your page to include your
   # generated JavaScript and any libraries you reference.  If you need
   # to include other javascripts, add them to the :requires option of
   # your client in routes.rb instead of changing it here.
-%>
<%= javascripts_for_client %>
<% unless @content_for_page_javascript.blank? %>
<%= @content_for_page_javascript %>
<% end -%>
<% #
   # If you use old-style view helpers in your page, this method must be
   # called to actually add the page views to your HTML.  Normally this will
   # not generate any content.
-%>
<% #render_page_views -%>
<% # Older SproutCore applications need SC.didLoad to be called after onload.
   # This is no longer required by SproutCore so it is off by default.  To
   # reenable set use_window_onload = true in yur config.
-%>
<% if config.use_window_onload %>

<% end -%>
<% #
   # The final content section can be used to add any last minute setup you
   # need to do before the page ends.  This is required for loading unit
   # tests among other things.
-%>
<%= @content_for_final -%>

<% # SPROUTCORE DEFAULT INDEX TEMPLATE
   # This template provide provides a basic wrapper for a SproutCore client.
   # Most of the time, it will be sufficient for your own needs.  However, if
   # you need to create your own template, you can do so by copying this file
   # into your client, naming it 'index.rhtml' and then adding the options
   # :layout => 'lib/index' to your Buildfile.
   #
   # See the comments in this file for more information on what you can
   # change.
-%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
<% # Set the 'title' in your config to alter this setting %>
    <title><%= title %></title>
<% #
   # You may choose to load one or more bootstrap resources.  These are
   # JS targets that you would like to load at the top of the page.  Specify
   # these in your Buildfile with the 'bootstrap' config.
-%>
  <%= bootstrap %>

<% #
   # This line should appear in your head area to include the stylesheets
   # generated by your client.  If you need to include your own
   # stylesheets, you don't need to change it here.  Instead use the
   # required option in your config.
-%>
   <%= stylesheets_for_client %>
   <%= @content_for_page_styles %>

<% # The theme CSS class is added automatically based on your chosen theme.
   # If you need to specify a custom theme name, use CONFIG.theme_name
-%>
  <body class="<%= [theme_name(:default => 'sc-theme'), 'focus'].compact.join(' ') %>">
<% # This section is used to setup additional optional class names on the
   # body content based on JS-selected conditions.  Use this to make sure you
   # show the proper CSS as soon as the page appears.
-%>
<%= inline_javascript('sproutcore/bootstrap:setup_body_class_names') %>

<% #
   # This is where you root body element will appear.  To cause your
   # content to appear here, just declare content_for('body') in one of
   # your partials.
-%>
<%= @content_for_body %>
<% #
   # This is where your loading screen will appear.  To add a loading screen
   # just declare content_for('loading') in one of your partials. If you use
   # sc-gen to generate your app, it will create a file called loading.rhtml
   # under english.lproj. You can insert the desired content there.
-%>
<% unless @content_for_loading.blank? %>

<%= @content_for_loading %>

<% end -%>
<% #
   # This is where the resources you declare will appear.  By default anything
   # you add to partials will be added to this section unless you specify
   # otherwise.  Note that resources are initially hidden so you can pull them
   # apart as needed on page load.
-%>
<% unless @content_for_resources.blank? %>

      <%= @content_for_resources -%>

<% end -%>
<% #
   # This line should appear at the bottom of your page to include your
   # generated JavaScript and any libraries you reference.  If you need
   # to include other javascripts, add them to the :requires option of
   # your client in routes.rb instead of changing it here.
-%>
<%= javascripts_for_client %>
<% unless @content_for_page_javascript.blank? %>
<%= @content_for_page_javascript %>
<% end -%>
<% #
   # If you use old-style view helpers in your page, this method must be
   # called to actually add the page views to your HTML.  Normally this will
   # not generate any content.
-%>
<% #render_page_views -%>
<% # Older SproutCore applications need SC.didLoad to be called after onload.
   # This is no longer required by SproutCore so it is off by default.  To
   # reenable set use_window_onload = true in yur config.
-%>
<% if config.use_window_onload %>

<% end -%>
<% #
   # The final content section can be used to add any last minute setup you
   # need to do before the page ends.  This is required for loading unit
   # tests among other things.
-%>
<%= @content_for_final -%>


Fix leaked i18n

Fix leaked i18n

git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@1093 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">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="<%= 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


added some people

added some people

<% unless logged_in? -%>

About

MethodBox enables you to browse and download datasets, share methods and scripts, find fellow researchers with similar interests and share your knowledge.

Who?

 MethodBox is brought to you by a team from the University of Manchester in the UK, led by Carole Goble, Iain Buchan and Angela Dale.

MethodBox is part of the myGrid consortium, which brought you the Taverna Workflow Workbench for creating and executing scientific workflows, myExperiment for sharing workflows and Bio-catalogue for curating life science web-services.

Log in / Register

        <% form_tag session_path do %>
          <%= hidden_field_tag "called_from[controller]", controller.controller_name -%>
          <%= hidden_field_tag "called_from[action]", controller.action_name -%>
          <%= hidden_field_tag "called_from[id]", params[:id] -%>

              Login:

              <%= text_field_tag 'login', nil, :class => 'field', :style => "width: 140px;" %>

                  Password:

              <%= password_field_tag 'password', nil, :class => 'field', :style => "width: 140px;" %>

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

            <%= submit_tag "Log in", :disable_with => "Logging in..." %>

        <% end %>
        <% if !REGISTRATION_CLOSED -%>

            Need an account?

            <%= link_to "Sign up", signup_url %>

        <% else -%>

            New user registration is currently closed

        <% end -%>

          <%= link_to "Forgotten password?", forgot_password_url %>

<% end -%>

<% unless logged_in? -%>

About

MethodBox enables you to browse and download datasets, share methods and scripts, find fellow researchers with similar interests and share your knowledge.

Who?

 MethodBox is brought to you by a team from the University of Manchester in the UK, led by Carole Goble and Iain Buchan.

MethodBox is part of the myGrid consortium, which brought you the Taverna Workflow Workbench for creating and executing scientific workflows, myExperiment for sharing workflows and Bio-catalogue for curating life science web-services.

Log in / Register

    <% form_tag session_path do %>
      <%= hidden_field_tag "called_from[controller]", controller.controller_name -%>
      <%= hidden_field_tag "called_from[action]", controller.action_name -%>
      <%= hidden_field_tag "called_from[id]", params[:id] -%>

          Login:

       	  <%= text_field_tag 'login', nil, :class => 'field', :style => "width: 140px;" %>

	      Password:

      	  <%= password_field_tag 'password', nil, :class => 'field', :style => "width: 140px;" %>

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

        <%= submit_tag "Log in", :disable_with => "Logging in..." %>

    <% end %>
    <% if !REGISTRATION_CLOSED -%>

      Need an account?

      <%= link_to "Sign up", signup_url %>

<% else -%>

  New user registration is currently closed

<% end -%>

      <%= link_to "Forgotten password?", forgot_password_url %>

<% end -%>


Switch Back link to Goto Observsation

Switch Back link to Goto Observsation

<%= link_to 'Goto Observation', :action => 'show_observation', :id => @comment.observation %>
<% if check_permission(@comment.user_id) %>
	| <%= link_to 'Edit', :action => 'edit_comment', :id => @comment %>
	| <%= link_to 'Destroy', :action => 'destroy_comment', :id => @comment %>
<% end %>

Comment on <%= h @comment.observation.unique_name %>

Created: <%= @comment.created.to_formatted_s(:db) %>

By: <%= @comment.user.unique_name %>

Summary: <%= @comment.summary %>

Comment: <%= textilize @comment.comment %>

<%= link_to 'Back', :action => 'show_observation', :id => @comment.observation %>
<% if check_permission(@comment.user_id) %>
	| <%= link_to 'Edit', :action => 'edit_comment', :id => @comment %>
	| <%= link_to 'Destroy', :action => 'destroy_comment', :id => @comment %>
<% end %>

Comment on <%= h @comment.observation.unique_name %>

Created: <%= @comment.created.to_formatted_s(:db) %>

By: <%= @comment.user.unique_name %>

Summary: <%= @comment.summary %>

Comment: <%= textilize @comment.comment %>


Update Rother guidance link

Update Rother guidance link

<% @title = "FOI officer questions" %>

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

<%= @title %> #

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 received 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 other concerns, please read the answers below.
You might also like to read the introduction to WhatDoTheyKnow 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? #

We think there are lots of benefits. Most importantly it will encourage the
public to be more interested and involved in the work of government. We
also hope that it will reduce the number of duplicate requests on any
subject that a public body will receive. Given that Freedom of Information
responses contain public information, which anybody could easily request
again from the public authority, we think there should be no reason not to
publish it widely.

Are the people making requests real people? #

Yes. For the purposes of keeping track of responses we use
computer-generated email addresses for each request. However, before
they can send a request, each user must register on the site with a
unique email address that we then verify. 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.

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

I can see a request on WhatDoTheyKnow, but we never got it by email!#

If a request appears on the site, then we have attempted to send it to
the authority by email. Any delivery failure messages will automatically
appear on the site. You can check the address we're using with the "View FOI
email address" link which appears on the page for the authority. Contact us if there is a better address we can
use.

Requests are sometimes not delivered because they are quietly removed by
"spam filters" in the IT department of the authority. Authorities can make
sure this doesn't happen by asking their IT departments to "whitelist"
any email from @whatdotheyknow.com.
If you ask us we will resend any request,
and/or give technical details of delivery so an IT department can chase
up what happened to the message.

Finally, you can respond to any request from your web browser, without
needing any email, using the "respond to request" link at the bottom of
each request page.

How do you calculate the deadline shown on request pages?#

The Freedom of Information Act says:

A public authority must comply with section 1(1) promptly and
in any event not later than the twentieth working day following the date of
receipt.

The nerdy detail of exactly how weekends are counted, and what happens if
the request arrives out of office hours, is just that - detail. What matters
here is that the law says authorities must respond promptly.

If you've got a good reason why the request is going to take a while to
process, requesters find it really helpful if you can send a quick email with a
sentence or two saying what is happening.

FOI officers often have to do a lot of hard work to answer
requests, and this is hidden from the public. We think it would help everyone
to have more of that complexity visible.

But really, how do you calculate the deadline?#

Please read the answer to the previous question first. Legally, authorities
must respond promptly to FOI requests. If they fail to do that,
it is best if they show the hard work they are doing by explaining what is
taking the extra time to do.

That said, WhatDoTheyKnow does show the maximum legal deadline
for response on each request. Here's how we calculate it.

If the day we deliver the request by email is a working day, we count that
as "day zero", even if it was delivered late in the evening. Days end at
midnight.  We then count the next working day as "day one", and so on up to
20 working days.

If the day the request email was delivered was a non-working day, we count
the next working day as "day one". Delivery is delivery, even if it happened on
the weekend. Some authorities disagree with this, our lawyer disagrees with them.

Requesters are encouraged to mark when they have clarified
their request so the clock resets, but sometimes they get this wrong. If you
see a problem with a particular request, let us know and we'll fix it.

The date thus calculated is shown on requests with the text "By law,
Liverpool City Council should normally have responded by...". There is only
one case which is not normal, see the next question about
public interest test time extensions.

Schools are also a special case, which WhatDoTheyKnow displays differently.

Since June 2009, schools have "20 working days
disregarding any working day which is not a school day, or 60 working days,
whichever is first" (FOI (Time for Compliance with Request) Regulations 2009). WhatDoTheyKnow indicates on requests to schools that the 20 day deadline is only
during term time, and shows them as definitely overdue after 60 working days

If you're getting really nerdy about all this, read the detailed ICO guidance.
Meanwhile, remember that the law says authorities must respond
promptly. That's really what matters.

How do you reflect time extensions for public interest tests?#

The Freedom of Information Act lets authorities claim an indefinite time
extension when applying a public interest test.  Information
Commissioner guidance says that it should only be used in "exceptionally
complex" cases
(FOI Good Practice Guidance No. 4).
WhatDoTheyKnow doesn't specifically handle this case, which is why we use the
phrase "should normally have responded by" when the 20 working day time is
exceeded.

The same guidance says that, even in exceptionally complex cases, no
Freedom of Information request should take more than 40 working days
to answer.  WhatDoTheyKnow displays requests which are overdue by that much
with stronger wording to indicate they are definitely late.

The Freedom of Information (Scotland) Act does not allow such a public
interest extension. WhatDoTheyKnow would like to see the law changed to either
remove the extension from the UK Act, or to reintroduce an absolute time limit
of 40 working days even with the extension (the House of Lords voted
to remove provision for such a time limit during the initial passage
of the UK Act through Parliament).

How can I send a large file, which won't go by email?#

Instead of email, you can respond to a request directly from your web
browser, including uploading a file. To do this, choose "respond to request" at
the bottom of the request's page. Contact us if it
is too big for even that (more than, say, 50Mb).

Why do you publish the names of civil servants and the text of emails? #

We consider what officers or servants do in the course of their employment
to be public information. We will only remove content in exceptional
circumstances, see our take down policy.

Do you publish email addresses or mobile phone numbers? #

To prevent spam, we automatically remove most emails and some mobile numbers from
responses to requests.  Please contact us if we've
missed one.
For technical reasons we don't always remove them from attachments, such as certain PDFs.

If you need to know what an address was that we've removed, please get in touch with us. Occasionally, an email address
forms an important part of a response and we will post it up in an obscured
form in an annotation.

What is your policy on copyright of documents?#

Our Freedom of Information law is "applicant blind", so anyone in the
world can request the same document and get a copy of it.

If you think our making a document available on the internet infringes your
copyright, you may contact us and ask us
to take it down.  However, to save tax payers' money by preventing duplicate
requests, and for good public relations, we'd advise you not to do that.

If you haven't already, read the introduction -->

Otherwise, the credits or the programmers API -->


refer to maillist in _no_projects message

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

Welcome to CruiseControl.rb!

There are no projects in the projects directory yet.

      To add a project, open command line in the directory where you unpacked this tool, and type:

  cruise add my_project --url http://my/project/subversion/trunk

      If you have a problem with this command, you may find that
      cruise help is ... helpful.
      If it isn't, there is always <%= link_to 'the manual', document_url('manual') %> and
      cruisecontrolrb-users@rubyforge.org mailing list.

Welcome to CruiseControl.rb!

There are no projects in the projects directory yet.

      To add a project, open command line in the directory where you unpacked this tool, and type:

  cruise add my_project --url http://my/project/subversion/trunk

      If you have a problem with this command, you may find that
      cruise help is ... helpful.
      If it doesn't help, there is always <%= link_to 'the manual', document_url('manual') %>.


search box is optional

search box is optional

<!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><%= @page.title %></title>
<% @page.css.each do |css| -%>
<%= stylesheet_link_tag(css) %>
<% end -%>
<%= stylesheet_link_tag(@page.template_base + "mollio_fix.css") %>
<link rel="stylesheet" type="text/css" href="<%= @page.template_base %>css/main.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<%= @page.template_base %>css/print.css" media="print" />
<%= javascript_include_tag(:defaults) %>

<%= @page.site_name %>

<% unless @page.search_url.blank? -%>

			<form action="<%= @page.search_url %>">
			Search:
			<input id="searchsite" name="searchsite" type="text" value="<%= params['searchsite'] %>"/>
			<input type="submit" value="Go" class="f-submit" />
			</form>

<% end -%>

		<%= build_menu(@page.menu) %>

			<%= build_breadcrumb(@page.breadcrumb) %>

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

			<%= yield %>

<%= @page.copyright %>

<img src="<%= @page.template_base %>wsimages/mollio.gif" alt="FarCry - Mollio" />

<!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><%= @page.title %></title>
<% @page.css.each do |css| -%>
<%= stylesheet_link_tag(css) %>
<% end -%>
<%= stylesheet_link_tag(@page.template_base + "mollio_fix.css") %>
<link rel="stylesheet" type="text/css" href="<%= @page.template_base %>css/main.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<%= @page.template_base %>css/print.css" media="print" />
<%= javascript_include_tag(:defaults) %>

<%= @page.site_name %>

			<form action="<%= @page.search_url %>">
			Search:
			<input id="searchsite" name="searchsite" type="text" value="<%= params['searchsite'] %>"/>
			<input type="submit" value="Go" class="f-submit" />
			</form>

		<%= build_menu(@page.menu) %>

			<%= build_breadcrumb(@page.breadcrumb) %>

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

			<%= yield %>

<%= @page.copyright %>

<img src="<%= @page.template_base %>wsimages/mollio.gif" alt="FarCry - Mollio" />