remove some stuff that accidentally snuck into a merge commit. I seem to have leaned on the keyboard at some point during a merge

<%
   object ||= nil
   set_parameters_for_sharing_form object
   disable_advanced_view ||= nil
   disable_can_publish_check ||= false
   show_advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?
   default_projects_access_type = @resource.is_asset? ? Policy::ACCESSIBLE : Policy::EDITING
   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]", "" -%>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>

    <%= 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 %>
          <% if !disable_advanced_view%>

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.

          <% end %>

<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 !disable_can_publish_check && @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 -%>

    <% if !disable_advanced_view %>
      <%= 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);" -%>

  <% end %>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>


Can't petition PM

Can't petition PM

Track this request

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

Act on what you've learnt

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

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

        <%= link_to '', "http://wordpress.com/"%>
        <%= link_to 'Start your own blog', "http://wordpress.com/"%>

    <% view_cache :ttl => 1.day, :tag => ['similar', @info_request.id] do %>
     <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>

Similar requests

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

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

        <% end %>

     <% end %>
    <% end %>

<%= link_to "Event history details", request_details_url(@info_request) %>

Are you the owner of
    any commercial copyright on this page?

Track this request

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

Act on what you've learnt

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

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

        <%= link_to '', "http://petitions.number10.gov.uk"%>
        <%= link_to 'Petition the PM', "http://petitions.number10.gov.uk"%>

        <%= link_to '', "http://wordpress.com/"%>
        <%= link_to 'Start your own blog', "http://wordpress.com/"%>

    <% view_cache :ttl => 1.day, :tag => ['similar', @info_request.id] do %>
     <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>

Similar requests

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

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

        <% end %>

     <% end %>
    <% end %>

<%= link_to "Event history details", request_details_url(@info_request) %>

Are you the owner of
    any commercial copyright on this page?


Fix xss issue at body_classes

Fix xss issue at body_classes

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

    <title><%= h page_title %></title>
    <%= yield(:feeds) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= noosfero_stylesheets %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%= h body_classes %>">
    <%= _("Go to the content") %>

    <%=
      @plugins.dispatch(:body_beginning).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

        <%= theme_header %>

        <%= render :partial => 'layouts/user' %>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>
    <%= theme_javascript_ng %>
    <%= addthis_javascript %>

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

    <title><%= h page_title %></title>
    <%= yield(:feeds) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= noosfero_stylesheets %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%= body_classes %>">
    <%= _("Go to the content") %>

    <%=
      @plugins.dispatch(:body_beginning).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

        <%= theme_header %>

        <%= render :partial => 'layouts/user' %>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>
    <%= theme_javascript_ng %>
    <%= addthis_javascript %>


Don't allow Potlatch to be started with a zoom below 11.

<% if API_READONLY %>

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

<% 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 => 'search', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>

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

<% if params['mlon'] and params['mlat'] %>
<% lon =  params['mlon'] %>
<% lat =  params['mlat']  %>
<% zoom =  params['zoom'] || '12' %>
<% elsif @user and params['lon'].nil? and params['lat'].nil? %>
<% lon =  @user.home_lon %>
<% lat =  @user.home_lat %>
<% zoom = '12' %>
<%else%>
<% lon =  params['lon'] || '-0.1' %>
<% lat =  params['lat'] || '51.5' %>
<% zoom =  params['zoom'] || '12' %>
<% end %>

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.

<% end %>


fix XSS issue in dispatch page-not-found view (closes #225)

Sorry, page <%= h params[:_page]%> does not exist.

  <% if @group and @user and @user.member_of?(@group) %>

<%= link_to "create #{h params[:_page]}", {:controller => 'pages', :action => :create_wiki, :name => params[:_page], :group => @group.name }, :method=>:post %>

  <% end %>

search for similar pages

  <% if request.env["HTTP_REFERER"] %>

<%= "return to previous page" % request.env["HTTP_REFERER"] %>

  <% end %>

Sorry, page <%= params[:_page]%> does not exist.

  <% if @group and @user and @user.member_of?(@group) %>

<%= link_to "create #{params[:_page]}", {:controller => 'pages', :action => :create_wiki, :name => params[:_page], :group => @group.name }, :method=>:post %>

  <% end %>

search for similar pages

  <% if request.env["HTTP_REFERER"] %>

<%= "return to previous page" % request.env["HTTP_REFERER"] %>

  <% end %>


Fixing list layout of person communities

(ActionItem2511)

<%= _("%s's communities") % profile.name %>

<% cache_timeout(profile.communities_cache_key(params), 4.hour) do %>

  <% @communities.each do |community| %>
    <%= profile_image_link(community)%>
  <% end %>

    <%= pagination_links @communities, :param_name => 'npage' %>

<% end %>

<% button_bar do %>
  <%= button :back, _('Go back'), { :controller => 'profile' } %>
  <%= button :add, _('Create a new community'),
      :controller => 'memberships', :action => 'new_community' if logged_in? && user == profile %>
<% end %>


Include node coordinates on the data browser view for a node. Fixes #1856.

  <%= render :partial => "common_details", :object => node_details %>

    Coordinates:

<a href="/?lat=<%= h(node_details.lat) %>&lon=<%= h(node_details.lon) %>&zoom=18"><%= h(node_details.lat) %>, <%= h(node_details.lon) %>

  <% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %>

      Part of:

          <% node_details.ways.each do |way| %>

<%= link_to h(printable_name(way)), :action => "way", :id => way.id.to_s %>

          <% end %>
          <%= render :partial => "containing_relation", :collection => node_details.containing_relation_members %>

  <% end %>

  <%= render :partial => "common_details", :object => node_details %>

  <% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %>

      Part of:

          <% node_details.ways.each do |way| %>

<%= link_to h(printable_name(way)), :action => "way", :id => way.id.to_s %>

          <% end %>
          <%= render :partial => "containing_relation", :collection => node_details.containing_relation_members %>

  <% end %>


add an example citation to the parse box

Paste in citation strings to be parsed. Separate multiple citations by a newline.
<%= form_tag :controller => "citations", :action => "create" %>
<textarea cols="80" id="citation_string" name="citation[string]" rows="10">
Udvarhelyi, I.S., Gatsonis, C.A., Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J. Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes. Journal of the American Medical Association, 1992; 18:2530-2536.
</textarea>
<%= submit_tag "Parse!" %>
</form>

Paste in citation strings to be parsed. Separate multiple citations by a newline.
<%= form_tag :controller => "citations", :action => "create" %>
<%= text_area "citation", "string", :cols => 80, :rows => 10
%><br />
<%= submit_tag "Parse!" %>
</form>


Take retry with breakpoint out until we fix it

git-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@2597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de

<% unless @exception.blamed_files.blank? %>
  <% if (hide = @exception.blamed_files.length > 8) %>
    Show blamed files
  <% end %>
  <pre id="blame_trace" <%='style="display:none"' if hide %>><%=h @exception.describe_blame %>

<% end %>

<% if false %>

  <% begin %>
    <%= form_tag(@request.request_uri, "method" => @request.method) %>
      <input type="hidden" name="BP-RETRY" value="1" />

      <% for key, values in @params %>
        <% next if key == "BP-RETRY" %>
        <% for value in Array(values) %>
          <input type="hidden" name="<%= key %>" value="<%= value %>" />
        <% end %>
      <% end %>

      <input type="submit" value="Retry with Breakpoint" />
    </form>
  <% rescue Exception => e %>
    <%=h "Couldn't render breakpoint link due to #{e.class} #{e.message}" %>
  <% end %>
<% end %>

<%
  request_parameters_without_action = @request.parameters.clone
  request_parameters_without_action.delete("action")
  request_parameters_without_action.delete("controller")

  request_dump  = request_parameters_without_action.inspect.gsub(/,/, ",\n")
  session_dump  = @request.session.instance_variable_get("@data").inspect.gsub(/,/, ",\n")
  response_dump = @response.inspect.gsub(/,/, ",\n")
%>

Request

Parameters: <%=h request_dump == "{}" ? "None" : request_dump %>

Show session dump

<%= debug(@request.session.instance_variable_get("@data")) %>

Response

Headers: <%=h @response.headers.inspect.gsub(/,/, ",\n") %>

<% unless @exception.blamed_files.blank? %>
  <% if (hide = @exception.blamed_files.length > 8) %>
    Show blamed files
  <% end %>
  <pre id="blame_trace" <%='style="display:none"' if hide %>><%=h @exception.describe_blame %>

<% end %>

<% if defined?(Breakpoint) %>

  <% begin %>
    <%= form_tag(@request.request_uri, "method" => @request.method) %>
      <input type="hidden" name="BP-RETRY" value="1" />

      <% for key, values in @params %>
        <% next if key == "BP-RETRY" %>
        <% for value in Array(values) %>
          <input type="hidden" name="<%= key %>" value="<%= value %>" />
        <% end %>
      <% end %>

      <input type="submit" value="Retry with Breakpoint" />
    </form>
  <% rescue Exception => e %>
    <%=h "Couldn't render breakpoint link due to #{e.class} #{e.message}" %>
  <% end %>
<% end %>

<%
  request_parameters_without_action = @request.parameters.clone
  request_parameters_without_action.delete("action")
  request_parameters_without_action.delete("controller")

  request_dump  = request_parameters_without_action.inspect.gsub(/,/, ",\n")
  session_dump  = @request.session.instance_variable_get("@data").inspect.gsub(/,/, ",\n")
  response_dump = @response.inspect.gsub(/,/, ",\n")
%>

Request

Parameters: <%=h request_dump == "{}" ? "None" : request_dump %>

Show session dump

<%= debug(@request.session.instance_variable_get("@data")) %>

Response

Headers: <%=h @response.headers.inspect.gsub(/,/, ",\n") %>


Added _() on agenda to translate strings

(ActionItem1989)

<%= show_month(params[:year], params[:month]) %>

        <%= link_to_previous_month(params[:year], params[:month], '« %s' % _('previous')) %>
        <%= link_to_next_month(params[:year], params[:month], '%s »' % _('next')) %>

      <%= render :partial => 'events/month', :locals => {:calendar => @calendar, :abbreviated => true} %>

<%= link_to_previous_month(params[:year], params[:month], show_month(params[:year], params[:month], :previous => true)) %>

      <%= render :partial => 'events/month', :locals => {:calendar => @previous_calendar, :abbreviated => true} %>

<%= link_to_next_month(params[:year], params[:month], show_month(params[:year], params[:month], :next => true)) %>

      <%= render :partial => 'events/month', :locals => {:calendar => @next_calendar, :abbreviated => true} %>

    <%= render :partial => 'events/events_by_day' %>

<%= show_month(params[:year], params[:month]) %>

        <%= link_to_previous_month(params[:year], params[:month], '« previous') %>
        <%= link_to_next_month(params[:year], params[:month], 'next »') %>

      <%= render :partial => 'events/month', :locals => {:calendar => @calendar, :abbreviated => true} %>

<%= link_to_previous_month(params[:year], params[:month], show_month(params[:year], params[:month], :previous => true)) %>

      <%= render :partial => 'events/month', :locals => {:calendar => @previous_calendar, :abbreviated => true} %>

<%= link_to_next_month(params[:year], params[:month], show_month(params[:year], params[:month], :next => true)) %>

      <%= render :partial => 'events/month', :locals => {:calendar => @next_calendar, :abbreviated => true} %>

    <%= render :partial => 'events/events_by_day' %>


Prueba con David Cabo

Prueba con David Cabo


Final:Corrected Bookmark Link

Final:Corrected Bookmark Link

View Bookmark

<% @check_mapping = Bmapping.find(:first, :conditions =>["bookmark_id = ? and user_id = ?",@bookmark_mapping.bookmark_id, session[:user].id ])
if (@check_mapping == nil ) %> You don't have this bookmark in your repository.
<% else %>  Bookmark in your repository:
<%= link_to('  Edit', :controller => 'bookmarks', :action => 'edit_bookmark_form', :id => @check_mapping.id) %>
<%end %>

<%= link_to('Add Tag', :controller => "bookmarks", :action =>"add_tag_bookmark", :id => @bookmark_mapping.id) %> to this bookmark.

	<% myurl = @result_tuple["url"] %>

    Bookmark URL:	 <%= (myurl) %>

		Bookmark Title:	 <%= @result_tuple["title"] %>

		Bookmark Discoverer: 	 <%= @result_tuple["discoverer"] %>

		Owner: 	 <%= @result_tuple["owner"] %>

		Copied by:	 <%= @result_tuple["user_count"] %>

		Tags:	 <%= @result_tuple["tags"] %>

		Description:	 <%= @result_tuple["description"] %>

		<%= link_to('Back', :back) %>

View Bookmark

<% @check_mapping = Bmapping.find(:first, :conditions =>["bookmark_id = ? and user_id = ?",@bookmark_mapping.bookmark_id, session[:user].id ])
if (@check_mapping == nil ) %> You don't have this bookmark in your repository.
<% else %>  Bookmark in your repository:
<%= link_to('  Edit', :controller => 'bookmarks', :action => 'edit_bookmark_form', :id => @check_mapping.id) %>
<%end %>

<%= link_to('Add Tag', :controller => "bookmarks", :action =>"add_tag_bookmark", :id => @bookmark_mapping.id) %> to this bookmark.

	<% myurl = @result_tuple["url"] %>

    Bookmark URL:	 <%= Rinku.auto_link(myurl) %>

		Bookmark Title:	 <%= @result_tuple["title"] %>

		Bookmark Discoverer: 	 <%= @result_tuple["discoverer"] %>

		Owner: 	 <%= @result_tuple["owner"] %>

		Copied by:	 <%= @result_tuple["user_count"] %>

		Tags:	 <%= @result_tuple["tags"] %>

		Description:	 <%= @result_tuple["description"] %>

		<%= link_to('Back', :back) %>


minor: fixed bug in person layout

minor: fixed bug in person layout

<% @leftbar ||= 'person/sidebar' -%>
<% inside_layout 'application' do -%>
<div id='maincolumn' class='leftbar' style="<%=sidebar_space%>">
  <%= sidebar %>

    <% unless params[:action] == 'show' -%>

<%= link_to_breadcrumbs %>

    <% end -%>
    <%= @title if @title %>

  <%= yield %>

<% end -%>

<% @leftbar = render :partial => 'person/sidebar' -%>
<% inside_layout 'application' do -%>
<div id='maincolumn' class='leftbar' style="<%=sidebar_space%>">
  <%= sidebar %>

    <% unless params[:action] == 'show' -%>

<%= link_to_breadcrumbs %>

    <% end -%>
    <%= @title if @title %>

  <%= yield %>

<% end -%>


ActionItem928: don't force going through the Rails stack for displaying images

    <% images.each do |image| %>

<%= image_tag image.public_filename %>

    <% end %>

    <%= pagination_links images, :param_name => 'ipage', :params => {:image_folder_id => params[:image_folder_id]} %>

    <% images.each do |image| %>

<%= image_tag url_for(image.url) %>

    <% end %>

    <%= pagination_links images, :param_name => 'ipage', :params => {:image_folder_id => params[:image_folder_id]} %>


Whitespace and target on bottom link

Whitespace and target on bottom link

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

			<% if logged_in? %>

Admin

<%= link_to image_tag("images.png")+" New Album", :controller=>"albums", :action=>"new" %>

<%= link_to image_tag("image_add.png")+" New Photo", :controller=>"gallery", :action=>"new" %>

<%= link_to image_tag("trash.gif")+" Delete Photo", "#" %>

		        <%= drop_receiving_element "image_destroy",
				          :update => "photos", :url => { :controller=>"gallery", :action=>"destroy" },
				          :accept => "photo", :hoverclass => "image_destroy_active",
				          :loading => "Element.show('image_destroy_spinner')",
				          :complete => "Element.hide('image_destroy_spinner')" if logged_in? %>

<%= image_tag "spinner.gif", :style=>"vertical-align:middle" %> Deleting Photo...

      <% end %>

Photo Albums

				  <% Album.find(:all).each do |album| %>
				    <li id="album_<%= album.id %>"><%= render(:partial=>"gallery/album",:locals=>{:album=>album}) %>

				    <%= drop_receiving_element "album_#{album.id}",
				          :update => "album_#{album.id}", :url => { :controller=>"albums", :action=>"add_photo", :album_id=>album },
				          :accept => "photo", :hoverclass => "album-active",
				          :loading => "Element.show('album_spinner')",
				          :complete => "Element.hide('album_spinner')" if logged_in? %>
				  <% end %>
				  <%= content_tag "li", link_to(image_tag("arrow_left.png")+" Back to gallery", :controller=>"gallery", :action=>"index") if current_page?(:controller=>"gallery", :action=>"album") %>

<%= image_tag "spinner.gif", :style=>"vertical-align:middle" %> Adding photo to album...

<%= logged_in? ? @curuser.full_name+" "+link_to("Logout", :controller=>"account", :action=>"logout") : link_to("Login", :controller=>"account", :action=>"login") %>

      <%= @content_for_layout %>

Powered by <%= link_to "Tableau", "http://github.com/bousquet/tableau/", :target => "_blank" %>

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

			<% if logged_in? %>

Admin

<%= link_to image_tag("images.png")+" New Album", :controller=>"albums", :action=>"new" %>

<%= link_to image_tag("image_add.png")+" New Photo", :controller=>"gallery", :action=>"new" %>

<%= link_to image_tag("trash.gif")+" Delete Photo", "#" %>

		        <%= drop_receiving_element "image_destroy",
				          :update => "photos", :url => { :controller=>"gallery", :action=>"destroy" },
				          :accept => "photo", :hoverclass => "image_destroy_active",
				          :loading => "Element.show('image_destroy_spinner')",
				          :complete => "Element.hide('image_destroy_spinner')" if logged_in? %>

<%= image_tag "spinner.gif", :style=>"vertical-align:middle" %> Deleting Photo...

      <% end %>

Photo Albums

				  <% Album.find(:all).each do |album| %>
				    <li id="album_<%= album.id %>"><%= render(:partial=>"gallery/album",:locals=>{:album=>album}) %>

				    <%= drop_receiving_element "album_#{album.id}",
				          :update => "album_#{album.id}", :url => { :controller=>"albums", :action=>"add_photo", :album_id=>album },
				          :accept => "photo", :hoverclass => "album-active",
				          :loading => "Element.show('album_spinner')",
				          :complete => "Element.hide('album_spinner')" if logged_in? %>
				  <% end %>
				  <%= content_tag "li", link_to(image_tag("arrow_left.png")+" Back to gallery", :controller=>"gallery", :action=>"index") if current_page?(:controller=>"gallery", :action=>"album") %>

<%= image_tag "spinner.gif", :style=>"vertical-align:middle" %> Adding photo to album...

<%= logged_in? ? @curuser.full_name+" "+link_to("Logout", :controller=>"account", :action=>"logout") : link_to("Login", :controller=>"account", :action=>"login") %>

      <%= @content_for_layout %>

Powered by <%= link_to "Tableau", "http://github.com/bousquet/tableau/" %>


fixed some links

fixed some links

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

<a href="<%= url_for :controller=>"articles", :action=>"read", :id=>article.id%>" title="Permanent link to this article"><%= h article.title %>

Posted by <%= h article.author %> <%= distance_of_time_in_words_to_now article.created_at %> ago
<%= article.body_html %>

<a href="<%= url_for :controller=>"article", :action=>"read", :id=>article.id%>" title="Permanent link to this article"><%= h article.title %>

Posted by <%= h article.author %> <%= distance_of_time_in_words_to_now article.created_at %> ago
<%= article.body_html %>


git-svn-id: svn+ssh://ko.meadowy.net/home/svn/inside/kozuchi/trunk@455 c938ebee-df10-0410-95fc-be8c4b0ebdd5

<% change_condition = remote_function(:update => 'settlement_details', :url => {:action => 'change_condition', :clear_selection => true}, :with => 'Form.serialize(\'settlement_conditions\')') %>
<%= start_form_tag ({:action => 'create'}, :id => 'settlement_conditions')%>

      口座
      <%= select_account('settlement', 'account_id', [:credit, :credit_card], true, {}, :onChange => change_condition)%>

      期間

<%= select_date(@start_date, :prefix => 'start_date', :use_month_numbers => true)%> ～ <%= select_date(@end_date, :prefix => 'end_date', :use_month_numbers => true) %> <button onClick="<%= change_condition%>;">表示内容を更新</button>

<% unless @settlement.errors.empty? %>

<%= error_messages_for 'settlement'%>

<% end %>

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

<%= end_form_tag %>

<% change_condition = remote_function(:update => 'settlement_details', :url => {:action => 'change_condition', :clear_selection => true}, :with => 'Form.serialize(\'settlement_conditions\')') %>
<%= start_form_tag ({:action => 'create'}, :id => 'settlement_conditions')%>

      口座
      <%= select_account('settlement', 'account_id', [:credit, :credit_card], true, {}, :onChange => change_condition)%>

      期間

<%= select_date(@start_date, :prefix => 'start_date', :use_month_numbers => true)%> ～ <%= select_date(@end_date, :prefix => 'end_date', :use_month_numbers => true) %> <button onClick="alert('change_conditions');<%= change_condition%>;return false;">表示内容を更新</button>

<% unless @settlement.errors.empty? %>

<%= error_messages_for 'settlement'%>

<% end %>

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

<%= end_form_tag %>


Remove spurious spaces from top of email.

<%  if @highlight_words.nil?
      @highlight_words = []
    end

    # Construct the main text of the mail
    main_text = ''
    for track_thing, alert_results in @email_about_things
        main_text += track_thing.params[:title_in_email] + "\n"
        main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
        for result in alert_results.reverse
            if result[:model].class.to_s == "InfoRequestEvent"
                event = result[:model]

                if not event.outgoing_message.nil?
                    extract = highlight_and_excerpt(event.outgoing_message.body_without_salutation, @highlight_words, 150, false)
                elsif not event.incoming_message.nil?
                    extract = highlight_and_excerpt(event.incoming_message.get_body_for_quoting, @highlight_words, 150, false)
                else
                    extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
                end
                extract.gsub!(/\s+/, ' ')

                if event.event_type == 'response'
                    url = main_url(incoming_message_url(event.incoming_message))
                    main_text += event.info_request.public_body.name + " sent a response to " + event.info_request.user.name
                elsif event.event_type == 'followup_sent'
                    url = main_url(outgoing_message_url(event.outgoing_message))
                    main_text += event.info_request.user.name + " sent a follow up message to " + event.info_request.public_body.name
                elsif event.event_type == 'sent'
                    # this is unlikely to happen in real life, but happens in the test code
                    url = main_url(request_url(event.info_request))+"#outgoing-"+event.outgoing_message.id.to_s
                    main_text += event.info_request.user.name + " sent a request to " + event.info_request.public_body.name
                else
                    raise "unknown type in event_digest " + event.event_type
                end
                main_text += " (" + simple_date(event.created_at) + ")\n"
                main_text += MySociety::Format.wrap_email_body('"' + extract + '"').gsub(/\n+$/, "") + "\n"
                main_text += url + "\n"

                main_text += "\n"
            else
                raise "need to add other types to TrackMailer.event_digest"
            end
        end
        main_text += "\n"
    end

    #STDERR.puts main_text
    #STDERR.puts @unsubscribe_url
%><%=main_text%>Alter your subscription
=======================

Please click on the link below to cancel or alter these emails.
<%=@unsubscribe_url%>

-- the WhatDoTheyKnow team

<% if @highlight_words.nil?
      @highlight_words = []
end %>

<%
        # Construct the main text of the mail
        main_text = ''
        for track_thing, alert_results in @email_about_things
            main_text += track_thing.params[:title_in_email] + "\n"
            main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
            for result in alert_results.reverse
                if result[:model].class.to_s == "InfoRequestEvent"
                    event = result[:model]

                    if not event.outgoing_message.nil?
                        extract = highlight_and_excerpt(event.outgoing_message.body_without_salutation, @highlight_words, 150, false)
                    elsif not event.incoming_message.nil?
                        extract = highlight_and_excerpt(event.incoming_message.get_body_for_quoting, @highlight_words, 150, false)
                    else
                        extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
                    end
                    extract.gsub!(/\s+/, ' ')

                    if event.event_type == 'response'
                        url = main_url(incoming_message_url(event.incoming_message))
                        main_text += event.info_request.public_body.name + " sent a response to " + event.info_request.user.name
                    elsif event.event_type == 'followup_sent'
                        url = main_url(outgoing_message_url(event.outgoing_message))
                        main_text += event.info_request.user.name + " sent a follow up message to " + event.info_request.public_body.name
                    elsif event.event_type == 'sent'
                        # this is unlikely to happen in real life, but happens in the test code
                        url = main_url(request_url(event.info_request))+"#outgoing-"+event.outgoing_message.id.to_s
                        main_text += event.info_request.user.name + " sent a request to " + event.info_request.public_body.name
                    else
                        raise "unknown type in event_digest " + event.event_type
                    end
                    main_text += " (" + simple_date(event.created_at) + ")\n"
                    main_text += MySociety::Format.wrap_email_body('"' + extract + '"').gsub(/\n+$/, "") + "\n"
                    main_text += url + "\n"

                    main_text += "\n"
                else
                    raise "need to add other types to TrackMailer.event_digest"
                end
            end
            main_text += "\n"
        end

        #STDERR.puts main_text
        #STDERR.puts @unsubscribe_url
%><%=main_text%>Alter your subscription
=======================

Please click on the link below to cancel or alter these emails.
<%=@unsubscribe_url%>

-- the WhatDoTheyKnow team


Escape HTML in Post bodies shown in activities

Conflicts:

	app/views/activities/_other_row.rhtml

<% date_format = current_user.time_format %>

  <%= "#{tz.utc_to_local(log.created_at).strftime(date_format)}"%>

    <%= image_tag('page_add.png', :alt => "Wiki page added") if log.event_type == EventLog::WIKI_CREATED %>
    <%= image_tag('page_edit.png', :alt => "Wiki page modified") if log.event_type == EventLog::WIKI_MODIFIED %>
    <%= image_tag('package_add.png', :alt => "File added") if log.event_type == EventLog::FILE_UPLOADED %>
    <%= image_tag('comments_add.png', :alt => "Post added") if log.event_type == EventLog::FORUM_NEW_POST %>

	<% if log.target.is_a? Post %>
	  <%= link_to "#{log.target.forum.name} / #{log.target.topic.title}", topic_path(log.target.forum_id, log.target.topic_id) %>
	<% elsif log.target.is_a? WikiPage %>
	  <%= log.target.to_url %>
	<% elsif log.target.is_a? ProjectFile %>
	  <%= "#{link_to_task(log.target.task)} [" if log.target.task %>
	  <%= "<a href=\"/project_files/show/#{log.target_id}\" title=\"\" class=\"tooltip\">#{log.target.full_name}" %>
	  <%= "]" if log.target.task %>
	<% else %>
	  <%= log_title_for(log) %>
	<% end %>
	<%= "
" if(log.user || (log.target.respond_to?(:task) && log.target.task) ) %>
	<%= "#{log.target.task.full_name} " if( log.target.respond_to?(:task) && log.target.task )%>
	<%= "[#{log.user.name}]" if log.user %>

<%= avatar_for log.user, 25 if log.user %>

      <% if log.target.is_a?(Post) && log.target.body && log.target.body.length > 0 %>
        <%= wrap_text(h(log.target.body), 100).gsub(/\n/, "
")  %>
      <% elsif log.body && log.body.length > 0 %>
        <%= wrap_text(log.body, 100).gsub(/\n/, "
")  %>
      <% end %>

<% date_format = current_user.time_format %>

  <%= "#{tz.utc_to_local(log.created_at).strftime(date_format)}"%>

    <%= image_tag('page_add.png', :alt => "Wiki page added") if log.event_type == EventLog::WIKI_CREATED %>
    <%= image_tag('page_edit.png', :alt => "Wiki page modified") if log.event_type == EventLog::WIKI_MODIFIED %>
    <%= image_tag('package_add.png', :alt => "File added") if log.event_type == EventLog::FILE_UPLOADED %>
    <%= image_tag('comments_add.png', :alt => "Post added") if log.event_type == EventLog::FORUM_NEW_POST %>

	<% if log.target.is_a? Post %>
	  <%= link_to "#{log.target.forum.name} / #{log.target.topic.title}", topic_path(log.target.forum_id, log.target.topic_id) %>
	<% elsif log.target.is_a? WikiPage %>
	  <%= log.target.to_url %>
	<% elsif log.target.is_a? ProjectFile %>
	  <%= "#{link_to_task(log.target.task)} [" if log.target.task %>
	  <%= "<a href=\"/project_files/show/#{log.target_id}\" title=\"\" class=\"tooltip\">#{log.target.full_name}" %>
	  <%= "]" if log.target.task %>
	<% else %>
	  <%= log_title_for(log) %>
	<% end %>
	<%= "
" if(log.user || (log.target.respond_to?(:task) && log.target.task) ) %>
	<%= "#{log.target.task.full_name} " if( log.target.respond_to?(:task) && log.target.task )%>
	<%= "[#{log.user.name}]" if log.user %>

<%= avatar_for log.user, 25 if log.user %>

      <% if log.target.is_a?(Post) && log.target.body && log.target.body.length > 0 %>
        <%= wrap_text(log.target.body, 100).gsub(/\n/, "
")  %>
      <% elsif log.body && log.body.length > 0 %>
        <%= wrap_text(log.body, 100).gsub(/\n/, "
")  %>
      <% end %>


minor fix: emails in profiles now save

minor fix: emails in profiles now save

<% index ||= params[:index] || random_dom_id -%>
<% dom_id = "profile_email_address_#{index}" -%>
<% email_types_options = options_for_select(
     Profile::EmailAddress.options,
     (email_address ? email_address.email_type : nil)
   )
-%>
<tr id="<%=dom_id%>" class='data_row'>

    <%= mark_as_primary(email_address, 'profile', 'email_address', index) %>

    <%= select_tag_with_id "profile[email_addresses][#{index}][email_type]", email_types_options, {:id => "profile_email_addresses_#{index}_email_type"} %>

    <input id="profile_email_addresses_<%= index %>_email_address" size="20" value="<%=h email_address.email_address %>" type="text" maxlength="100" name="profile[email_addresses][<%= index %>][email_address]" class="textInput profile_email_address" style="width:199px;" />

    <%= remove_link dom_id %>

<% index ||= params[:index] || random_dom_id -%>
<% dom_id = "person_email_address_#{index}" -%>
<% email_types_options = options_for_select(
     Profile::EmailAddress.options,
     (email_address ? email_address.email_type : nil)
   )
-%>
<tr id="<%=dom_id%>" class='data_row'>

    <%= mark_as_primary(email_address, 'person', 'email_address', index) %>

    <%= select_tag_with_id "person[email_addresses][#{index}][email_type]", email_types_options, {:id => "person_email_addresses_#{index}_email_type"} %>

    <input id="person_email_addresses_<%= index %>_email_address" size="20" value="<%=h email_address.email_address %>" type="text" maxlength="100" name="person[email_addresses][<%= index %>][email_address]" class="textInput person_email_address" style="width:199px;" />

    <%= remove_link dom_id %>


Add no-pdf

Add no-pdf


 Merge branch 'AI2911-comment_order_improvements' into 'rails235'

Ai2911 Comment Order Improvements

Corrections of https://gitlab.com/noosfero/noosfero/merge_requests/90

ActionItem: http://noosfero.org/Development/ActionItem2911

 - Add an option to order comments by the newest or oldest comments.

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

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

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

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

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

<% end %>

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

<% if @page.display_hits? || @page.license.present? %>

    <% if @page.display_hits? %>

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

    <% end %>

    <% if @page.license.present? %>

        <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>

    <% end %>

<% end %>

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

<% if NOOSFERO_CONF['addthis_enabled'] %>
  <%= render :partial => 'addthis' %>
<% end %>

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

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

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

<% end %>

<%= display_source_info(@page) %>

<%= @plugins.dispatch(:article_extra_contents, @page).collect { |content| instance_eval(&content) }.join("") %>

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

  <% end %>

  <% if @page.accept_comments? && @comments_count > 1 %>
    <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") %>

    <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier)) %>
    <%= javascript_include_tag "comment_order.js" %>

      <% form_tag({:controller=>'content_viewer' , :action=>'view_page'}, {:method=>'get', :id=>"form_order"}) do %>
        <%= select_tag 'comment_order', options_for_select({_('Oldest first')=>'oldest', _('Newest first')=>'newest'}, @comment_order) %>
      <% end %>

  <% end %>

  <% if @page.accept_comments? and @comments.count > 1 %>
    <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier)) %>
    <%= javascript_include_tag "comment_order.js" %>

      <% form_tag({:controller=>'content_viewer' , :action=>'view_page'}, {:method=>'get', :id=>"form_order"}) do %>
        <%= select_tag 'comment_order', options_for_select({_('Oldest first')=>'oldest', _('Newest first')=>'newest'}, @comment_order) %>
      <% end %>

  <% end %>

    <%= render :partial => 'comment/comment', :collection => @comments %>
    <%= pagination_links @comments, :param_name => 'comment_page' %>

  <% if @page.accept_comments? %>

<%= render :partial => 'comment/comment_form', :locals =>{:comment => Comment.new, :url => {:controller => :comment, :action => :create}, :display_link => true, :cancel_triggers_hide => true}%>

  <% end %>

<%= add_zoom_to_article_images %>

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

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

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

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

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

<% end %>

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

<% if @page.display_hits? || @page.license.present? %>

    <% if @page.display_hits? %>

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

    <% end %>

    <% if @page.license.present? %>

        <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>

    <% end %>

<% end %>

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

<% if NOOSFERO_CONF['addthis_enabled'] %>
  <%= render :partial => 'addthis' %>
<% end %>

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

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

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

<% end %>

<%= display_source_info(@page) %>

<%= @plugins.dispatch(:article_extra_contents, @page).collect { |content| instance_eval(&content) }.join("") %>

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

  <% end %>

  <% if @page.accept_comments? && @comments_count > 1 %>
    <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") %>

    <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier)) %>
    <%= javascript_include_tag "comment_order.js" %>

      <% form_tag({:controller=>'content_viewer' , :action=>'view_page'}, {:method=>'get', :id=>"form_order"}) do %>
        <%= select_tag 'comment_order', options_for_select({_('Oldest first')=>'oldest', _('Newest first')=>'newest'}, @comment_order) %>
      <% end %>

  <% end %>

    <%= render :partial => 'comment/comment', :collection => @comments %>
    <%= pagination_links @comments, :param_name => 'comment_page' %>

  <% if @page.accept_comments? %>

<%= render :partial => 'comment/comment_form', :locals =>{:comment => Comment.new, :url => {:controller => :comment, :action => :create}, :display_link => true, :cancel_triggers_hide => true}%>

  <% end %>

<%= add_zoom_to_article_images %>


Condensed cage show page.  Made links to some of the items associated with the cage.

Dossier on <%= @cage.name%>

<%= link_to 'List My Cages', :action => 'list', :cages => User.find(session[:person]).cages.active %> |
<%= link_to 'List Current Cages', :action => 'list' %> |
<%= button_to 'Edit', :action => 'edit', :id => @cage %> |
<%= button_to 'Weigh Cage', :action => 'weigh_cage', :id => @cage %> |

<% if @cage.date_destroyed == nil %>
  <%= button_to 'Deactivate', :controller => 'cages', :action => 'deactivate', :id => @cage %>
<% else %>
  <%= button_to 'Reactivate', :controller => 'cages', :action => 'reactivate', :id => @cage %>
<% end %>

  Owner: <%= @cage.user ?
    link_to(@cage.user.name, :controller => :users, :action => :show, :id => @cage.user) :
    'NP' %>
  |
  Room: <%= link_to @cage.room.name, :controller => :rooms, :action => :show, :id => @cage.room %>
  |
  Date Created: <%= nice_date @cage.date_created %>
  |
  Flight Cage: <%= @cage.flight_cage.to_s.capitalize %>

  Bats: <%= link_to @cage.bats.count, :controller => :bats, :action => :list, :bats => @cage.bats %>
  |
  Species:

    <% for species in @cage.species.uniq %>
      <%= link_to species.name, :controller => :species, :action => :show, :id => species %>
    <% end %>

  |
  <% average_bat_weight = @cage.average_bat_weight %>

  Average Weight: <%= average_bat_weight %> g

<% if @cage.date_destroyed != nil %>

    Date Destroyed: <%= nice_date @cage.date_destroyed %>

<% end %>

Current Feeding Tasks:

    <%= render :partial => 'tasks/tasks_list', :locals =>{:tasks => @cage.tasks.feeding_tasks, :div_id => 'feeding_tasks',
      :same_type_task_list => true, :manage => true, :sorted_by => 'repeat_code'} %>

    [<%= link_to_remote "Quick-add feeding task", :url => {:controller => :tasks, :action => :remote_new_feed_cage_task, :id => @cage, :div_id => "feeding_tasks",
      :source => 'show_cage', :same_type_task_list => true, :users => User.current, :quick_add => true, :sorted_by => 'repeat_code'},
      :update => 'add_feeding_task' %>]

[<%= link_to 'Manage feeding tasks', :controller => :tasks, :action => :manage_feeding_tasks, :id => @cage %>]

  <% if @cage.bats.active.length == 0 %>
    No bats are in this cage.
  <% else %>
    Current Bats:

      Band
      Last Weight
      Weigh Date
      Date in
      Who
      Why
      <% for cih in @current_bats_cihs %>

          <%= link_to cih.bat.band, :controller => :bats, :action => :show, :id => cih.bat %>
          <% if cih.bat.weights.length > 0 %>
            <%=h cih.bat.weights.recent.weight %>
            <%=h nice_date(cih.bat.weights.recent.date) %>
          <% else %>
            N/A
            N/A
          <% end %>
          <%=h nice_date(cih.date) %>
          <%=h cih.user.initials %>
          <%=h cih.note %>

      <% end %>

<% end %>

  Past Bats:

  <% if @old_bats_cohs.length == 0 %>
    No previous bats were in this cage.
  <% else %>

      Band
      Date in
      Who
      Date out
      Moved To
      Who
      <% for coh in @old_bats_cohs %>
        <% cih = CageInHistory.find(:first, :conditions => "bat_id = #{coh.bat.id} and cage_id = #{coh.cage.id} and date < '#{coh.date}'") %>

          <%=link_to cih.bat.band, :controller => :bats, :action => :show, :id => cih.bat %>
          <%=nice_date(cih.date) %>
          <%=cih.user.initials %>
          <%=nice_date(coh.date) %>
          <%= coh.cage_in_history ? (link_to coh.cage_in_history.cage.name, :controller => :cages, :action => :show, :id => coh.cage_in_history.cage) : "Deactivated" %>
          <%=coh.user.initials %>

      <% end %>

  <% end %>

Dossier on <%= @cage.name%>

<%= link_to 'List My Cages', :action => 'list', :cages => User.find(session[:person]).cages.active %> |
<%= link_to 'List Current Cages', :action => 'list' %> |
<%= button_to 'Edit', :action => 'edit', :id => @cage %> |
<%= button_to 'Weigh Cage', :action => 'weigh_cage', :id => @cage %> |

<% if @cage.date_destroyed == nil %>
  <%= button_to 'Deactivate', :controller => 'cages', :action => 'deactivate', :id => @cage %>
<% else %>
  <%= button_to 'Reactivate', :controller => 'cages', :action => 'reactivate', :id => @cage %>
<% end %>

  Owner: <%= @cage.user ? @cage.user.name : 'NP' %>

  Room: <%= @cage.room.name %>

  Bats: <%= @cage.bats.count %>

<% average_bat_weight = @cage.average_bat_weight %>

  Average Weight: <%= average_bat_weight %> g

  Date Created: <%= nice_date @cage.date_created %>

  Flight Cage: <%= @cage.flight_cage.to_s.capitalize %>

  Species:

    <% for species in @cage.species.uniq %>
      <%= link_to species.name, :controller => :species, :action => :show, :id => species %>
    <% end %>

<% if @cage.date_destroyed != nil %>

    Date Destroyed: <%= nice_date @cage.date_destroyed %>

<% end %>

Current Feeding Tasks:

    <%= render :partial => 'tasks/tasks_list', :locals =>{:tasks => @cage.tasks.feeding_tasks, :div_id => 'feeding_tasks',
      :same_type_task_list => true, :manage => true, :sorted_by => 'repeat_code'} %>

    [<%= link_to_remote "Quick-add feeding task", :url => {:controller => :tasks, :action => :remote_new_feed_cage_task, :id => @cage, :div_id => "feeding_tasks",
      :source => 'show_cage', :same_type_task_list => true, :users => User.current, :quick_add => true, :sorted_by => 'repeat_code'},
      :update => 'add_feeding_task' %>]

[<%= link_to 'Manage feeding tasks', :controller => :tasks, :action => :manage_feeding_tasks, :id => @cage %>]

  <% if @cage.bats.active.length == 0 %>
    No bats are in this cage.
  <% else %>
    Current Bats:

      Band
      Last Weight
      Weigh Date
      Date in
      Who
      Why
      <% for cih in @current_bats_cihs %>

          <%= link_to cih.bat.band, :controller => :bats, :action => :show, :id => cih.bat %>
          <% if cih.bat.weights.length > 0 %>
            <%=h cih.bat.weights.recent.weight %>
            <%=h nice_date(cih.bat.weights.recent.date) %>
          <% else %>
            N/A
            N/A
          <% end %>
          <%=h nice_date(cih.date) %>
          <%=h cih.user.initials %>
          <%=h cih.note %>

      <% end %>

<% end %>

  Past Bats:

  <% if @old_bats_cohs.length == 0 %>
    No previous bats were in this cage.
  <% else %>

      Band
      Date in
      Who
      Date out
      Moved To
      Who
      <% for coh in @old_bats_cohs %>
        <% cih = CageInHistory.find(:first, :conditions => "bat_id = #{coh.bat.id} and cage_id = #{coh.cage.id} and date < '#{coh.date}'") %>

          <%=link_to cih.bat.band, :controller => :bats, :action => :show, :id => cih.bat %>
          <%=nice_date(cih.date) %>
          <%=cih.user.initials %>
          <%=nice_date(coh.date) %>
          <%= coh.cage_in_history ? (link_to coh.cage_in_history.cage.name, :controller => :cages, :action => :show, :id => coh.cage_in_history.cage) : "Deactivated" %>
          <%=coh.user.initials %>

      <% end %>

  <% end %>


make the chat text area be multiple lines long closes #1003

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

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

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

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

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

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

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

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

  <%= current_user.login %>

    <% default_text = "Type your messages here and press enter..."[:type_your_messages_here] -%>
    <textarea id="entryfield" name="message" rows="2"
      onkeypress="if (enterPressed(event)) {document.forms[0].onsubmit();}"
      onclick="if (this.value == '<%=default_text%>') {this.clear();}"><%= default_text %></textarea>
    <input type="submit" value="Say" style="display: none;" />

<% end -%>

<%= # update the user list
wait_time = 4
periodically_call_remote(:url => { :controller => 'chat',
			      	   :action => 'user_list',
				   :id => @channel},
			 :frequency => wait_time,
			 :update => 'userlist')

%>

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

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

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

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

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

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

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

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

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

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

  <%= current_user.login %>

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

<% end -%>

<%= # update the user list
wait_time = 4
periodically_call_remote(:url => { :controller => 'chat',
			      	   :action => 'user_list',
				   :id => @channel},
			 :frequency => wait_time,
			 :update => 'userlist')

%>

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

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


Apparently zero is not false in ruby.

Apparently zero is not false in ruby.


cleaned up some spacing and linked

cleaned up some spacing and linked

<%= stylesheet_link_tag 'twitter-sidebar' %>
<%= javascript_include_tag 'twitter-1.11.1.min.js' %>

<%= sidebar.title %>

	<ul id="<%= sidebar.twitter_user %>TypoTweets">
		<%= image_tag 'twitter-spinner.gif'  %>

Loading <a href="http://twitter.com/<%= sidebar.twitter_user %>" target="_blank">tweets...

Powered by Twitter
  Written by Luke Pillow


Removed the list action.

Removed the list action.

Navigation

<%= link_to "Articles", :controller => 'articles'-%>

<%= link_to "Events", :controller => 'events'-%>

<%= link_to "Minutes", :controller => 'minutes'-%>

<%= link_to "Venues", :controller => 'venues'-%>

<%= link_to "People", :controller => 'people'-%>

<%= link_to "Pages", :controller => 'pages'-%>

Navigation

<%= link_to "Articles", :controller => 'articles', :action => 'list'-%>

<%= link_to "Events", :controller => 'events', :action => 'list'-%>

<%= link_to "Minutes", :controller => 'minutes', :action => 'list'-%>

<%= link_to "Venues", :controller => 'venues', :action => 'list'-%>

<%= link_to "People", :controller => 'people', :action => 'list'-%>

<%= link_to "Pages", :controller => 'pages', :action => 'list'-%>


- Polished inline editor form.

- Polished inline editor form.

<%= gui.begin_form_for('Wiki::Text_Asset.perform_update',
                       :name => "container_form_#{text_asset_id}",
                       :id   => "container_form_#{text_asset_id}")
%>

  <%= gui.hidden_field(:text_asset_id     => text_asset_id,
                       :content_id_parent => content_id_parent,
                       :content_id_child  => content_id_child,
                       :content_id        => content_id)
  %>

      <%= gui.button(:icon => 'save.gif',  :onclick => "Aurita.submit_form('container_form_#{text_asset_id}');") %>
      <%= gui.button(:icon => 'close.gif', :onclick => "Aurita.Editor.save_all();" + gui.link_to(article) ) %>

    <textarea name="public.text_asset.text" class="fullwidth full editor" style="width: 100%; clear: both; " id="lore_textarea_<%= text_asset_id %>"><%= text %></textarea>

<%= gui.end_form %>

<%= gui.begin_form_for('Wiki::Text_Asset.perform_update',
                       :name => "container_form_#{text_asset_id}",
                       :id   => "container_form_#{text_asset_id}")
%>

  <%= gui.hidden_field(:text_asset_id     => text_asset_id,
                       :content_id_parent => content_id_parent,
                       :content_id_child  => content_id_child,
                       :content_id        => content_id)
  %>

      <img class="link" onclick="Aurita.submit_form('container_form_<%= text_asset_id %>');" src="/aurita/images/icons/save.gif" />
      <img class="link" onclick="Aurita.Editor.save_all(); <%= gui.link_to(article) %>" src="/aurita/images/icons/close.gif" />

    <textarea name="public.text_asset.text" class="fullwidth full editor" style="width: 100%; clear: both; " id="lore_textarea_<%= text_asset_id %>"><%= text %></textarea>

<%= gui.end_form %>


Use CSS rather than (according to "validate") obsolete align attribute

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

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

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

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

        <% if @no_crawl %>
            <meta name="robots" content="noindex, nofollow">
        <% end %>

Close

Blimey. It looks like the Internets won – a message from WhatDoTheyKnow

Sorry to interrupt, but we thought you’d like to know that you won!

On the 16th of May 2008 the High Court ruled that MPs’ expenses must be published under the Freedom of Information Act.

Tomorrow, MPs were going to vote on changing the law to keep their expenses secret after all,
    just before publication was due and after spending nearly a million of your pounds and seven months
    compiling the data.

However, after a tremendous response from you, with over 7,000 members
    on our Facebook group, 4,000 messages sent to MPs, help from

    Stephen Fry, and a helpful
    4th Report of the House of Lords
    Merits of Statutory Instruments Committee,
    it appears that the vote has been cancelled –
    Guardian,
    Times,
    BBC.

As President Obama said in his inauguration speech: “And
    those of us who manage the public’s dollars will be held to account – to
    spend wisely, reform bad habits, and do our business in the light of day –

    because only then can we restore the vital trust between a people and their
    government.”

Read our victory blog post. :-)

Close

            WhatDoTheyKnow?

            Make and explore Freedom of Information requests

		a site by mysociety.org

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

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

        <% end %>

Make request

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

<%= link_to "View authorities", list_public_bodies_default %>

			<% if @user %>

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

			<% end %>

<%= link_to "Help", about_url %>

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

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

		<% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

        Contact WhatDoTheyKnow.com
        |
        Built by mySociety ...
        and you
        |
        Dedicated to Chris Lightfoot

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

<% end %>


A slightly better administrator panel

A slightly better administrator panel

ActionItem2391

<%= _('Administrator Panel') %>

<%= _('System settings') %>

<%= link_to _('Environment settings'), :action => 'site_info' %>

<%= link_to _('Features'), :controller => 'features' %>

<%= link_to _('Plugins'), :controller => 'plugins' %>

<%= link_to _('Sideboxes'), :controller => 'environment_design'%>

<%= link_to _('Homepage'), :action => 'set_portal_community' %>

<%= _('Profiles') %>

<%= link_to _('User roles'), :controller => 'role' %>

<%= link_to _('Users'), :controller => 'users' %>

<%= link_to _('Profile templates'), :action => 'edit_templates' %>

<%= link_to _('Fields'), :controller => 'features', :action => 'manage_fields' %>

<%
  plugin_links = @plugins.dispatch(:admin_panel_links)
%>
<% unless plugin_links.empty? %>

<%= _('Plugins') %>

  <% plugin_links.each do |link| %>

<%= link_to link[:title], link[:url] %>

  <% end %>

<% end %>

<%= _('Enterprise-related settings') %>

<%= link_to __('Message for disabled enterprises'), :action => 'message_for_disabled_enterprise' %>

<%= link_to _('Validators by region'), :controller => 'region_validators' %>

<%= link_to _('Categories'), :controller => 'categories'%>

<%= _('Administrator Panel') %>

<%= _('You, as an environment administrator, has the following options:')%>

<%= link_to _('Edit environment settings'), :action => 'site_info' %>

<%= link_to __('Edit message for disabled enterprises'), :action => 'message_for_disabled_enterprise' %>

<%= link_to _('Enable/disable features'), :controller => 'features' %>

<%= link_to _('Enable/disable plugins'), :controller => 'plugins' %>

<%= link_to _('Edit sideboxes'), :controller => 'environment_design'%>

<%= link_to _('Manage Categories'), :controller => 'categories'%>

<%= link_to _('Manage User roles'), :controller => 'role' %>

<%= link_to _('Manage users'), :controller => 'users' %>

<%= link_to _('Manage Validators by region'), :controller => 'region_validators' %>

<%= link_to _('Edit Templates'), :action => 'edit_templates' %>

<%= link_to _('Manage Fields'), :controller => 'features', :action => 'manage_fields' %>

<%= link_to _('Set Portal'), :action => 'set_portal_community' %>

  <% @plugins.dispatch(:admin_panel_links).each do |link| %>

<%= link_to link[:title], link[:url] %>

  <% end %>


Must be way of doing whole front page better :(

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority you'd

like information from. By law, they have to respond
           (why?).

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

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

           OR, search for information others have requested using WhatDoTheyKnow.com

    <% end %>

    <% if @popular_bodies.size > 0 %>

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>
                <%=h popular_body.info_requests.count%> requests

            <% end%>

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

    <% end %>

    <% if @successful_request_events.size > 0 %>

            <% for event in @successful_request_events %>

<%=link_to h(excerpt(event.info_request.title, "", 35)), request_url(event.info_request)%>
                <%=h time_ago_in_words(event.described_at).gsub("about ", "") %> ago

            <% end %>

More successful requests...

    <% end %>

Make or explore Freedom of Information requests

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

           First, type in the name of the UK public authority you'd

like information from. By law, they have to respond
           (why?).

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

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

           OR, search for information others have requested.

    <% end %>

    <% if @popular_bodies.size > 0 %>

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>
                <%=h popular_body.info_requests.count%> requests

            <% end%>

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

    <% end %>

    <% if @successful_request_events.size > 0 %>

            <% for event in @successful_request_events %>

<%=link_to h(excerpt(event.info_request.title, "", 35)), request_url(event.info_request)%>
                <%=h time_ago_in_words(event.described_at).gsub("about ", "") %> ago

            <% end %>

More successful requests...

    <% end %>


Made minor changes so that invitations work correctly.

git-svn-id: f67d969b640da65cb7bc1d229e09fd6d2db44ae1@659 392d7b7b-3f31-0410-9dc3-c95a9635ea79

View team for <%= @student.assignment.name %>

Team members

<% if @student.team == nil%>
	You don't have a team yet!
<%else%>
	Team Name: <%= @student.team.name %>
	<%= link_to "Edit Name",
					{:controller => 'student_team', :action => 'edit', :team_id => @student.team.id, :student_id => @student.id}%>

	Username &nbsp
	Full Name &nbsp
	Email &nbsp

	<%for member in @student.team.get_participants%>

		<%= member.user.name%>
		<%= member.user.fullname%>
		<%= member.user.email%>
		<% if @student.assignment.questionnaires.find_by_type('TeammateReviewQuestionnaire') != nil and member.user.id != session[:user].id %>

		   <%  map = TeammateReviewResponseMap.find(:first, :conditions => ['reviewer_id = ? and reviewee_id = ?',@student.id, member.id])
		       if map.nil?
		         map = TeammateReviewResponseMap.create(:reviewer_id => @student.id, :reviewee_id => member.id, :reviewed_object_id => @student.assignment.id)
		       end
		       review = map.response
               if review.nil? %>

		     <%= link_to "Review", {:controller => 'response', :action => 'new', :id => map.id, :return => "teammate" }%>

			 <% else %>

			   <%= link_to "View", {:controller => 'response', :action => 'view', :id => review.id }%>

			   <%= link_to "Edit", {:controller => 'response', :action => 'edit', :id => review.id, :return => "teammate" } %>

		     <% end %>
	    <% end %>

	<%end%>

	<%= link_to "Leave Team",
					{:controller => 'student_team', :action => 'leave', :student_id  => @student.id, :team_id => @student.team.id}%>
<%end%>

Sent Invitations

To &nbsp
Reply Status &nbsp

<%if @send_invs.length == 0%>

	--
	--

<%else%>
	<%for inv in @send_invs%>

		<%= inv.to_user.name%>
		<%if inv.reply_status == 'A'%>
			Accepted
		<%elsif inv.reply_status == 'D'%>
				Declined
		<%else%>
			Waiting for reply
			<%= link_to "Retract",
				{:controller => 'invitation', :action => 'cancel', :inv_id => inv.id, :student_id => @student.id}%>
		<%end%>

	<%end%>
<%end%>

Received Invitations

From &nbsp
Team Name &nbsp
Reply &nbsp

<%if @received_invs.length == 0%>

	--
	--
	--

<%else%>
	<%for inv in @received_invs%>

			<%= inv.from_user.name%>
			<%teamsusers = TeamsUser.find(:all, :conditions => ['user_id = ?', inv.from_id])%>
			    <%for teamsuser in teamsusers%>
			      <%current_team = Team.find(:first, :conditions => ['id = ? and parent_id = ?', teamsuser.team_id, @student.assignment.id])%>
			      <%if current_team != nil%>
			        <%=Team.find(current_team.id).name%>
			      <%end%>
			    <%end%>

            <% if @student.team == nil
                @team_id = 0
               else
                @team_id = @student.team.id
               end
            %>
			<%= link_to "Accept",
					{:controller => 'invitation', :action => 'accept', :inv_id => inv.id, :student_id => @student.id, :team_id => @team_id}%>
			|
			<%= link_to "Decline",
						{:controller => 'invitation', :action => 'decline', :inv_id => inv.id, :student_id => @student.id}%>

	<%end%>
<%end%>

<% if @student.team == nil%>

Create Team

	<%= form_tag :controller => 'student_team', :action => 'create'%>
	<%= hidden_field_tag 'id', @student.id %>
	Team Name:
	<%= text_field 'team', 'name'  %>
	<%= submit_tag "Create Team" %>
	<%= end_form_tag %>
<%else%>

Invite people

	<%= form_tag :controller => 'invitation', :action => 'create' %>
	<%= hidden_field_tag 'team_id', @student.team.id %>
	<%= hidden_field_tag 'student_id', @student.id %>
	<%= hidden_field_tag 'session[:dummy][:assignment_id]', @student.parent_id %>

	Enter user login: <%= text_field_with_auto_complete :user, :name, {:size => 41} %>
	<input type='submit' value='Invite'/>
	<%= end_form_tag %>
<%end%>
Back

View team for <%= @student.assignment.name %>

Team members

<% if @student.team == nil%>
	You don't have a team yet!
<%else%>
	Team Name: <%= @student.team.name %>
	<%= link_to "Edit Name",
					{:controller => 'student_team', :action => 'edit', :team_id => @student.team.id, :student_id => @student.id}%>

	Username &nbsp
	Full Name &nbsp
	Email &nbsp

	<%for member in @student.team.get_participants%>

		<%= member.user.name%>
		<%= member.user.fullname%>
		<%= member.user.email%>
		<% if @student.assignment.questionnaires.find_by_type('TeammateReviewQuestionnaire') != nil and member.user.id != session[:user].id %>

		   <%  map = TeammateReviewResponseMap.find(:first, :conditions => ['reviewer_id = ? and reviewee_id = ?',@student.id, member.id])
		       if map.nil?
		         map = TeammateReviewResponseMap.create(:reviewer_id => @student.id, :reviewee_id => member.id, :reviewed_object_id => @student.assignment.id)
		       end
		       review = map.response
               if review.nil? %>

		     <%= link_to "Review", {:controller => 'response', :action => 'new', :id => map.id, :return => "teammate" }%>

			 <% else %>

			   <%= link_to "View", {:controller => 'response', :action => 'view', :id => review.id }%>

			   <%= link_to "Edit", {:controller => 'response', :action => 'edit', :id => review.id, :return => "teammate" } %>

		     <% end %>
	    <% end %>

	<%end%>

	<%= link_to "Leave Team",
					{:controller => 'student_team', :action => 'leave', :id  => @student.team.id}%>
<%end%>

Sent Invitations

To &nbsp
Reply Status &nbsp

<%if @send_invs.length == 0%>

	--
	--

<%else%>
	<%for inv in @send_invs%>

		<%= inv.to_user.name%>
		<%if inv.reply_status == 'A'%>
			Accepted
		<%elsif inv.reply_status == 'D'%>
				Declined
		<%else%>
			Waiting for reply
			<%= link_to "Retract",
				{:controller => 'invitation', :action => 'cancel', :id => inv.id, :student_id => @student.id}%>
		<%end%>

	<%end%>
<%end%>

Received Invitations

From &nbsp
Team Name &nbsp
Reply &nbsp

<%if @received_invs.length == 0%>

	--
	--
	--

<%else%>
	<%for inv in @received_invs%>

			<%= inv.from_user.name%>
			<%teamsusers = TeamsUser.find(:all, :conditions => ['user_id = ?', inv.from_id])%>
			    <%for teamsuser in teamsusers%>
			      <%current_team = Team.find(:first, :conditions => ['id = ? and parent_id = ?', teamsuser.team_id, @student.assignment.id])%>
			      <%if current_team != nil%>
			        <%=Team.find(current_team.id).name%>
			      <%end%>
			    <%end%>

			<%= link_to "Accept",
					{:action => 'accept', :id => inv.id, :student_id => @student.id, :team_id =>@student.team.id}%>
			|
			<%= link_to "Decline",
						{:action => 'decline', :id => inv.id, :student_id => @student.id}%>

	<%end%>
<%end%>

<% if @team_id == nil%>

Create Team

	<%= form_tag :controller => 'student_team', :action => 'create'%>
	<%= hidden_field_tag 'id', @student.id %>
	Team Name:
	<%= text_field 'team', 'name'  %>
	<%= submit_tag "Create Team" %>
	<%= end_form_tag %>
<%else%>

Invite people

	<%= form_tag :controller => 'invitation', :action => 'create' %>
	<%= hidden_field_tag 'team_id', @team_id %>
	<%= hidden_field_tag 'student_id', @student.id %>
	<%= hidden_field_tag 'session[:dummy][:assignment_id]', @student.parent_id %>

	Enter user login: <%= text_field_with_auto_complete :user, :name, {:size => 41} %>
	<input type='submit' value='Invite'/>
	<%= end_form_tag %>
<%end%>
Back


clean odd stuff

clean odd stuff

<%
   object ||= nil
   set_parameters_for_sharing_form object
   disable_advanced_view ||= nil
   disable_can_publish_check ||= false
   show_advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?
   default_projects_access_type = @resource.is_asset? ? Policy::ACCESSIBLE : Policy::EDITING
   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]", "" -%>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>

    <%= 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 %>
          <% if !disable_advanced_view%>

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.

          <% end %>

<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 !disable_can_publish_check && @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 -%>

    <% if !disable_advanced_view %>
      <%= 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);" -%>

  <% end %>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>


Handle nodes which are in the same way multiple times.

  <%= render :partial => "common_details", :object => way_details %>

    <%= t'browse.way_details.nodes' %>

        <% way_details.way_nodes.each do |wn| %>

            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
            <% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %>
	    <% if related_ways.size > 0 then %>
	      (also part of <%= related_ways.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.join(", ") %>)
            <% end %>

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

      <%= t'browse.way_details.part_of' %>

          <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>

  <% end %>

  <%= render :partial => "common_details", :object => way_details %>

    <%= t'browse.way_details.nodes' %>

        <% way_details.way_nodes.each do |wn| %>

            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
	    <% if wn.node.ways.size > 1 then %>
	      (also part of <%= wn.node.ways.reject { |w| w.id == way_details.id }.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.join(", ") %>)
            <% end %>

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

      <%= t'browse.way_details.part_of' %>

          <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>

  <% end %>


change get involved link, change link to revision history

<% # see README -%>
<!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" />
  <%= favicon %>
  <title><%=h title_from_context %></title>
  <link rel="stylesheet" href="/bundles/<%=CSS_VERSION%>/base.css" type="text/css" media="screen" charset="utf-8" />
  <%= stylesheet_link_tag stylesheet if stylesheet %>

  <% if need_extra_javascript? %><% end %>

<body class="<%=body_class||=''%>">

 <%= render 'layouts/menu' %>

<% if banner -%>

  <%= render :partial => banner %>

<% end -%>

    <%= display_messages %>

  <%= yield %>

    get involved |
    bugs |
    feature requests |
    help

  <% if SVN_REVISION -%>
    crabgrass r<%= SVN_REVISION %>
  <% end -%>