Quote right thing.

Quote right thing.

    <% if not @highlighting.nil? and @highlighting['InfoRequestEvent'][event.id].include?('title') %>
        <%= link_to @highlighting['InfoRequestEvent'][event.id]["title"], request_url(info_request) %>
        <% @highlighting['InfoRequestEvent'][event.id].delete("title") %>
    <% elsif not event.incoming_message.nil? %>
        <%= link_to "Response to '" + h(info_request.title) + "'", request_url(info_request)+"#incoming-"+event.incoming_message.id.to_s %>
    <% elsif not event.outgoing_message.nil? and event.event_type == 'followup_sent' %>
        <%= link_to "Follow up message for '" + h(info_request.title) + "'", request_url(info_request)+"#outgoing-"+event.outgoing_message.id.to_s %>
    <% else %>
        <%= link_to h(info_request.title), request_url(info_request) %>
    <% end %>

    <% if not @highlighting.nil? and @highlighting['InfoRequestEvent'][event.id].size > 0 %>
        <%= @highlighting['InfoRequestEvent'][event.id].values.join(" ") %>
    <% elsif not event.outgoing_message.nil? %>
        <%= excerpt(event.outgoing_message.body_without_salutation, "", 150) %>
    <% elsif not event.incoming_message.nil? %>
        <%= excerpt(event.incoming_message.get_body_for_quoting, "", 150) %>
    <% else %>
        <%= excerpt(info_request.initial_request_text, "", 150) %>
    <% end %>

        <% if event.event_type == 'sent' %>
            Request sent to <%= public_body_link(info_request.public_body) %>
            by <%= user_link(info_request.user) %>
        <% elsif event.event_type == 'followup_sent' %>
            Follow up sent to <%= public_body_link(info_request.public_body) %>
            by <%= user_link(info_request.user) %>
        <% elsif event.event_type == 'response' %>
            <% if event.calculated_state.nil? %>
                Response
            <% else %>
                 <%=event.display_status %>
            <% end %>
            by <%= public_body_link(info_request.public_body) %>
            to <%= user_link(info_request.user) %>
        <% else %>
            <% raise "unknown event type indexed " + event.event_type %>
        <% end %>

        on <%= simple_date(event.created_at) %>.

    <% if not @highlighting.nil? and @highlighting['InfoRequestEvent'][event.id].include?('title') %>
        <%= link_to @highlighting['InfoRequestEvent'][event.id]["title"], request_url(info_request) %>
        <% @highlighting['InfoRequestEvent'][event.id].delete("title") %>
    <% elsif not event.incoming_message.nil? %>
        <%= link_to "Response to '" + h(info_request.title) + "'", request_url(info_request)+"#incoming-"+event.incoming_message.id.to_s %>
    <% elsif not event.outgoing_message.nil? and event.event_type == 'followup_sent' %>
        <%= link_to "Follow up message for '" + h(info_request.title) + "'", request_url(info_request)+"#outgoing-"+event.outgoing_message.id.to_s %>
    <% else %>
        <%= link_to h(info_request.title), request_url(info_request) %>
    <% end %>

    <% if not @highlighting.nil? and @highlighting['InfoRequestEvent'][event.id].size > 0 %>
        <%= @highlighting['InfoRequestEvent'][event.id].values.join(" ") %>
    <% else %>
        <%= excerpt(info_request.initial_request_text, "", 150) %>
    <% end %>

        <% if event.event_type == 'sent' %>
            Request sent to <%= public_body_link(info_request.public_body) %>
            by <%= user_link(info_request.user) %>
        <% elsif event.event_type == 'followup_sent' %>
            Follow up sent to <%= public_body_link(info_request.public_body) %>
            by <%= user_link(info_request.user) %>
        <% elsif event.event_type == 'response' %>
            <% if event.calculated_state.nil? %>
                Response
            <% else %>
                 <%=event.display_status %>
            <% end %>
            by <%= public_body_link(info_request.public_body) %>
            to <%= user_link(info_request.user) %>
        <% else %>
            <% raise "unknown event type indexed " + event.event_type %>
        <% end %>

        on <%= simple_date(event.created_at) %>.


Fix broken HTML

Fix broken HTML

  <meta name='button.add' value='<%= _('Add to the text') %>'/>
  <meta name='button.zoom' value='<%= _('Zoom in') %>'/>
  <meta name='button.close' value='<%= _('Close') %>'/>
  <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>

<%= _('Media upload') %>

      <% form_tag({ :action => 'media_upload' }, :multipart => true) do %>

          <%# TODO duplicated from partial upload_file_form %>
          <%= labelled_form_field(_('Choose folder to upload files:'), select_tag('parent_id', options_for_select([[profile.identifier, '']] + profile.folders.collect {|f| [ profile.identifier + '/' +  f.full_name, f.id ] }))) %>

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

        <% button_bar do %>
          <%= submit_button(:save, _('Upload')) %>
        <% end %>
      <% end %>

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

<%= link_to(_('Upload more files ...'), '#', :id => 'media-upload-more-files')%>

<%= _('Media search') %>

    <% form_tag({ :action => 'search' }) do %>

        <input name='q' type='text' id='media-search-query' style='width: 250px;'/>

      <%= submit_button :search, _('Search'), :id => 'media-search-button' %>
    <% end %>

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

  <meta name='button.add' value='<%= _('Add to the text') %>'/>
  <meta name='button.zoom' value='<%= _('Zoom in') %>'/>
  <meta name='button.close' value='<%= _('Close') %>'/>
  <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>

    <div class='header'<%= _('Media upload') %>

      <% form_tag({ :action => 'media_upload' }, :multipart => true) do %>

          <%# TODO duplicated from partial upload_file_form %>
          <%= labelled_form_field(_('Choose folder to upload files:'), select_tag('parent_id', options_for_select([[profile.identifier, '']] + profile.folders.collect {|f| [ profile.identifier + '/' +  f.full_name, f.id ] }))) %>

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

        <% button_bar do %>
          <%= submit_button(:save, _('Upload')) %>
        <% end %>
      <% end %>

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

<%= link_to(_('Upload more files ...'), '#', :id => 'media-upload-more-files')%>

<%= _('Media search') %>

    <% form_tag({ :action => 'search' }) do %>

        <input name='q' type='text' id='media-search-query' style='width: 250px;'/>

      <%= submit_button :search, _('Search'), :id => 'media-search-button' %>
    <% end %>

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


Application Log now has link to relevant objects

<% if application_logs.is_today? %>

<% elsif application_logs.is_yesterday? %>

<% else %>

<% end %>

    <img src="/themes/<%=AppConfig.site_theme%>/images/logtypes/<%= "#{application_logs.rel_object_type.downcase}s.gif" %>" alt="<%= application_logs.rel_object_type %>" title="<%= application_logs.rel_object_type %>" />

      <% if not ['Comment', 'ProjectMessage'].include?(application_logs.rel_object_type) %>
      <%= application_logs.friendly_action %>:
      <% end %>
      <%= application_logs.rel_object.nil? ? h(application_logs.object_name) : link_to(h(application_logs.object_name), application_logs.rel_object.object_url) %>

<% if show_project_column %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat.l)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format.l) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    , <%= link_to (h application_logs.taken_by.display_name), :controller => 'user', :action => 'card', :id => application_logs.taken_by.id %>
    <% end %>

<% end %>

<% if show_project_column %>

<% if not application_logs.project.nil? %>
      <%= link_to (h application_logs.project.name), :controller => 'project', :action => 'overview', :active_project => application_logs.project.id %>
<% end %>

<% else %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat.l)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format.l) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    , <%= link_to (h application_logs.taken_by.display_name), :controller => 'user', :action => 'card', :id => application_logs.taken_by.id %>
    <% end %>

<% end %>

<% if application_logs.is_today? %>

<% elsif application_logs.is_yesterday? %>

<% else %>

<% end %>

    <img src="/themes/<%=AppConfig.site_theme%>/images/logtypes/<%= "#{application_logs.rel_object_type.downcase}s.gif" %>" alt="<%= application_logs.rel_object_type %>" title="<%= application_logs.rel_object_type %>" />

      <% if not ['Comment', 'ProjectMessage'].include?(application_logs.rel_object_type) %>
      <%= application_logs.friendly_action %>:
      <% end %>
      <%= h application_logs.object_name %>

<% if show_project_column %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat.l)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format.l) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    , <%= link_to (h application_logs.taken_by.display_name), :controller => 'user', :action => 'card', :id => application_logs.taken_by.id %>
    <% end %>

<% end %>

<% if show_project_column %>

<% if not application_logs.project.nil? %>
      <%= link_to (h application_logs.project.name), :controller => 'project', :action => 'overview', :active_project => application_logs.project.id %>
<% end %>

<% else %>

    <% if application_logs.is_today? %>
        <%= :action_today_with_time.l_with_args(:time => format_usertime(application_logs.created_on, :action_today_fomat.l)) %>
    <% elsif application_logs.is_yesterday? %>
        <%= :action_yesterday.l %>
    <% else %>
        <%= format_usertime(application_logs.created_on, :action_past_format.l) %>
    <% end %>
    <% if not application_logs.taken_by.nil? %>
    , <%= link_to (h application_logs.taken_by.display_name), :controller => 'user', :action => 'card', :id => application_logs.taken_by.id %>
    <% end %>

<% end %>


[ClockingIT @ Fetch milestone_row from activities/]

<%=_ 'Projects'%>

<%= link_to _('New'), :controller => "projects", :action => 'new' %>

          <%
             last_customer = 0
             for project in @projects
               if last_customer != project.customer_id && session[:user].option_externalclients > 0
                  last_customer = project.customer_id
                  %>

<%= project.customer.name == 'Internal' ? session[:user].company.name : project.customer.name%>

               <%
               end

               critical_count = Task.count(["project_id = ? AND (severity_id + priority)/2 > 0  AND completed_at IS NULL", project.id])
               normal_count = Task.count(["project_id = ? AND (severity_id + priority)/2 = 0 AND completed_at IS NULL", project.id])
               low_count = Task.count(["project_id = ? AND (severity_id + priority)/2 < 0 AND completed_at IS NULL", project.id])
               total_count = (critical_count + normal_count + low_count) * 1.0

               critical_percent = ((critical_count / total_count) * 100.0)
               normal_percent = ((normal_count / total_count) * 100.0)

               unless critical_percent.nan?
                 critical_percent = critical_percent.round
               end
               unless normal_percent.nan?
                 normal_percent = normal_percent.round
               end

               if normal_percent + critical_percent > 100
                  normal_percent = 100 - critical_percent
               end

               low_percent = 100.0 - critical_percent - normal_percent

          %>
    <tr class="milestone" id="project_<%=project.id%>" onMouseOver="javascript:Hover('project', '<%=project.id%>')" onMouseOut="javascript:ClearHover()">

          <% if session[:user].can?(project, 'grant') %>
          <span id="edit_project_<%= project.id%>" style="display: none;">
            <%= link_to image_tag("application_form_edit.png", :border => 0, :title => _("Edit project %s", project.name), :class => "tooltip"),
            { :controller => 'projects', :action => 'edit', :id => project } -%>

          <% end %>

<%= link_to project.name, { :controller => 'views', :action => 'select_project', :id => project.id} %>

                  <div class="prog-bar-high tooltip" style="width: <%= number_to_percentage( critical_percent, :precision => 0)  %>;" title="<%= number_to_percentage( critical_percent, :precision => 0) + " (#{critical_count}/#{total_count.to_i})" %>  High Priority">

                  <div class="prog-bar-medium tooltip" style="width: <%= number_to_percentage( normal_percent, :precision => 0)  %>;" title="<%= number_to_percentage( normal_percent, :precision => 0) + " (#{normal_count}/#{total_count.to_i})"%>  Normal">

                  <div class="prog-bar-low tooltip" style="width: <%= number_to_percentage( low_percent, :precision => 0)  %>;" title="<%= number_to_percentage( low_percent, :precision => 0) + " (#{low_count}/#{total_count.to_i})" %>  Low Priority ">

          <%
               total_count = Task.count(["project_id = ?", project.id]) * 1.0
             if total_count >= 1.0
               done_count = Task.count(["project_id = ? AND completed_at IS NOT NULL", project.id])
               done_percent = (done_count/total_count) * 100.0
          %>

<%=_ 'Overall Progress'%>

                  <div class="prog-bar-medium tooltip " style="width: <%= number_to_percentage( done_percent, :precision => 0)  %>;" title="<%= number_to_percentage( done_percent, :precision => 0) %> (<%= "#{done_count.to_i} / #{total_count.to_i}"%>)  Complete">

                  <div class="prog-bar-low tooltip" style="width: <%= number_to_percentage( 100-done_percent, :precision => 0)  %>;" title="<%= number_to_percentage( 100-done_percent, :precision => 0) %> (<%= "#{total_count.to_i - done_count.to_i} / #{total_count.to_i}"%>) Remaining">

          <% end

               for milestone in project.milestones.find(:all, :conditions => ["completed_at IS NULL"], :order => "due_at, name")
          %>
              <%= render :partial => "activities/milestone_row", :locals => { :milestone => milestone } %>
          <% end %>
  <% @completed_milestones = Milestone.count(["project_id = ? AND completed_at IS NOT NULL", project.id])
     if @completed_milestones > 0
  %>

<%= link_to _('%d completed milestone', @completed_milestones), :controller => 'milestones', :action => 'list_completed', :id => project %>

  <% end %>

  <% end %>

  <% if @completed_projects > 0 %>

<%= link_to _('%d completed project', @completed_projects), :controller => 'projects', :action => 'list_completed' %>

  <% end %>

<%=_ 'Projects'%>

<%= link_to _('New'), :controller => "projects", :action => 'new' %>

          <%
             last_customer = 0
             for project in @projects
               if last_customer != project.customer_id && session[:user].option_externalclients > 0
                  last_customer = project.customer_id
                  %>

<%= project.customer.name == 'Internal' ? session[:user].company.name : project.customer.name%>

               <%
               end

               critical_count = Task.count(["project_id = ? AND (severity_id + priority)/2 > 0  AND completed_at IS NULL", project.id])
               normal_count = Task.count(["project_id = ? AND (severity_id + priority)/2 = 0 AND completed_at IS NULL", project.id])
               low_count = Task.count(["project_id = ? AND (severity_id + priority)/2 < 0 AND completed_at IS NULL", project.id])
               total_count = (critical_count + normal_count + low_count) * 1.0

               critical_percent = ((critical_count / total_count) * 100.0)
               normal_percent = ((normal_count / total_count) * 100.0)

               unless critical_percent.nan?
                 critical_percent = critical_percent.round
               end
               unless normal_percent.nan?
                 normal_percent = normal_percent.round
               end

               if normal_percent + critical_percent > 100
                  normal_percent = 100 - critical_percent
               end

               low_percent = 100.0 - critical_percent - normal_percent

          %>
    <tr class="milestone" id="project_<%=project.id%>" onMouseOver="javascript:Hover('project', '<%=project.id%>')" onMouseOut="javascript:ClearHover()">

          <% if session[:user].can?(project, 'grant') %>
          <span id="edit_project_<%= project.id%>" style="display: none;">
            <%= link_to image_tag("application_form_edit.png", :border => 0, :title => _("Edit project %s", project.name), :class => "tooltip"),
            { :controller => 'projects', :action => 'edit', :id => project } -%>

          <% end %>

<%= link_to project.name, { :controller => 'views', :action => 'select_project', :id => project.id} %>

                  <div class="prog-bar-high tooltip" style="width: <%= number_to_percentage( critical_percent, :precision => 0)  %>;" title="<%= number_to_percentage( critical_percent, :precision => 0) + " (#{critical_count}/#{total_count.to_i})" %>  High Priority">

                  <div class="prog-bar-medium tooltip" style="width: <%= number_to_percentage( normal_percent, :precision => 0)  %>;" title="<%= number_to_percentage( normal_percent, :precision => 0) + " (#{normal_count}/#{total_count.to_i})"%>  Normal">

                  <div class="prog-bar-low tooltip" style="width: <%= number_to_percentage( low_percent, :precision => 0)  %>;" title="<%= number_to_percentage( low_percent, :precision => 0) + " (#{low_count}/#{total_count.to_i})" %>  Low Priority ">

          <%
               total_count = Task.count(["project_id = ?", project.id]) * 1.0
             if total_count >= 1.0
               done_count = Task.count(["project_id = ? AND completed_at IS NOT NULL", project.id])
               done_percent = (done_count/total_count) * 100.0
          %>

<%=_ 'Overall Progress'%>

                  <div class="prog-bar-medium tooltip " style="width: <%= number_to_percentage( done_percent, :precision => 0)  %>;" title="<%= number_to_percentage( done_percent, :precision => 0) %> (<%= "#{done_count.to_i} / #{total_count.to_i}"%>)  Complete">

                  <div class="prog-bar-low tooltip" style="width: <%= number_to_percentage( 100-done_percent, :precision => 0)  %>;" title="<%= number_to_percentage( 100-done_percent, :precision => 0) %> (<%= "#{total_count.to_i - done_count.to_i} / #{total_count.to_i}"%>) Remaining">

          <% end

               for milestone in project.milestones.find(:all, :conditions => ["completed_at IS NULL"], :order => "due_at, name")
          %>
              <%= render :partial => "milestone_row", :locals => { :milestone => milestone } %>
          <% end %>
  <% @completed_milestones = Milestone.count(["project_id = ? AND completed_at IS NOT NULL", project.id])
     if @completed_milestones > 0
  %>

<%= link_to _('%d completed milestone', @completed_milestones), :controller => 'milestones', :action => 'list_completed', :id => project %>

  <% end %>

  <% end %>

  <% if @completed_projects > 0 %>

<%= link_to _('%d completed project', @completed_projects), :controller => 'projects', :action => 'list_completed' %>

  <% end %>


ActionItem1112: s/events/Agenda Livre/

ActionItem1112: s/events/Agenda Livre/

This is a BAD HACK. When other theme needs to use the application-ng
layout, we must rethink it. We'll probably move the entire .rhtml
template to themes.

<!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><%= page_title %></title>
    <%= meta_tags_for_article(@page) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="shortcut icon" href="<%= '/designs/themes/' + current_theme + '/imgs/favicon.ico' %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= import_blocks_stylesheets %>
    <%= import_controller_stylesheets %>
    <%= stylesheet_import(
          %w( common help menu article button search ),
          %w( blocks forms login-box thickbox profiles),
          template_stylesheet_path(),
          icon_theme_stylesheet_path(),
          theme_stylesheet_path(),
          pngfix_stylesheet_path()
        ) %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template )
    %>" onresize="registerDocumentSize()">

    Ir para o conteúdo

        <%= theme_header %>

          <% if logged_in? %>
            <%= _('Welcome, %s.') % link_to('' + user.identifier + '', user.url, :id => "homepage-link", :title => _('Go to your homepage')) %>
            <% if user.is_admin?(environment) %>
              <%= link_to('' + _('Administration') + '', { :controller => 'admin_panel', :action => 'index' }, :id => "controlpanel", :title => _("Configure the environment")) %>
            <% end %>
            <% if (user.environment == environment) %>
              <%= link_to('' + _('Control panel') + '', user.admin_url, :id => "controlpanel", :title => _("Configure your personal account and content")) if (user.environment == environment) %>
            <% end %>
            <%= link_to('' + _('Logout') + '', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %>
          <% else %>
            <%= _('%s or %s') % [thickbox_inline_popup_link('' + _('Login') + '', 'inlineLoginBox', :id => 'link_login', :help => _('Click here to enter your username and password and be recognized by the system.')), link_to('' + _('Register') + '', :controller => 'account', :action => 'signup') ] %>

              <%= render :file => 'account/login' %>
              <%= thickbox_close_button _('Close') %>

          <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" value="<%=_('Search...')%>"
                onfocus="this.form.className='focused';
                         if(this.value=='<%=_('Search...')%>'){this.value=''}"
                onblur="this.form.className='';
                        if(/^\s*$/.test(this.value)){
                          this.value='<%=_('Search...')%>';
                          this.form.className='clean'
                        }" />

<%=_('Press Enter to send the search query.')%>

          </form>

          <%= link_to content_tag('span', environment.name), environment.top_url %>

<%= link_to '' + _('People') + '',
                            '/assets/people', :id=>'people'           %>

<%= link_to '' + _('Communities') + '',
                            '/assets/communities', :id=>'communities' %>

<%= link_to '' + 'Agenda Livre' + '',
                            '/assets/events', :id=>'events'           %>

          <%= insert_boxes(yield) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>

<!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><%= page_title %></title>
    <%= meta_tags_for_article(@page) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="shortcut icon" href="<%= '/designs/themes/' + current_theme + '/imgs/favicon.ico' %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= import_blocks_stylesheets %>
    <%= import_controller_stylesheets %>
    <%= stylesheet_import(
          %w( common help menu article button search ),
          %w( blocks forms login-box thickbox profiles),
          template_stylesheet_path(),
          icon_theme_stylesheet_path(),
          theme_stylesheet_path(),
          pngfix_stylesheet_path()
        ) %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template )
    %>" onresize="registerDocumentSize()">

    Ir para o conteúdo

        <%= theme_header %>

          <% if logged_in? %>
            <%= _('Welcome, %s.') % link_to('' + user.identifier + '', user.url, :id => "homepage-link", :title => _('Go to your homepage')) %>
            <% if user.is_admin?(environment) %>
              <%= link_to('' + _('Administration') + '', { :controller => 'admin_panel', :action => 'index' }, :id => "controlpanel", :title => _("Configure the environment")) %>
            <% end %>
            <% if (user.environment == environment) %>
              <%= link_to('' + _('Control panel') + '', user.admin_url, :id => "controlpanel", :title => _("Configure your personal account and content")) if (user.environment == environment) %>
            <% end %>
            <%= link_to('' + _('Logout') + '', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %>
          <% else %>
            <%= _('%s or %s') % [thickbox_inline_popup_link('' + _('Login') + '', 'inlineLoginBox', :id => 'link_login', :help => _('Click here to enter your username and password and be recognized by the system.')), link_to('' + _('Register') + '', :controller => 'account', :action => 'signup') ] %>

              <%= render :file => 'account/login' %>
              <%= thickbox_close_button _('Close') %>

          <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" value="<%=_('Search...')%>"
                onfocus="this.form.className='focused';
                         if(this.value=='<%=_('Search...')%>'){this.value=''}"
                onblur="this.form.className='';
                        if(/^\s*$/.test(this.value)){
                          this.value='<%=_('Search...')%>';
                          this.form.className='clean'
                        }" />

<%=_('Press Enter to send the search query.')%>

          </form>

          <%= link_to content_tag('span', environment.name), environment.top_url %>

<%= link_to '' + _('People') + '',
                            '/assets/people', :id=>'people'           %>

<%= link_to '' + _('Communities') + '',
                            '/assets/communities', :id=>'communities' %>

<%= link_to '' + _('Events') + '',
                            '/assets/events', :id=>'events'           %>

          <%= insert_boxes(yield) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>


ActionItem612: missed the new community screen

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

<%= __('Creating new community') %>

<%= error_messages_for :community %>

<% labelled_form_for :community, @community do |f| %>

  <%= f.text_field :name, :style => 'width: 100%' %>

  <%= f.text_area :description, :style => 'width: 100%; height: 150px;' %>

  <%= _('New members must be approved:')%>

    <%= radio_button 'community', 'closed', 'true', :style => 'float: left' %>

      <%= _('Before joining this group (a moderator has to accept the member in pending request before member can access the intranet and/or the website).') %>

    <%= radio_button 'community', 'closed', 'false', :style => 'float: left' %>

      <%= _('After joining this group (a moderator can always desactivate access for users later).') %>

  <% button_bar do %>
    <%= submit_button(:save, _('Create')) %>
    <%= button(:cancel, _('Cancel'), :action => 'index') %>
  <% end %>

<% end %>

<%= error_messages_for :community %>

<% labelled_form_for :community, @community do |f| %>

  <%= f.text_field :name %>

  <%= f.text_area :description %>

  <% button_bar do %>
    <%= submit_button(:save, _('Create')) %>
    <%= button(:cancel, _('Cancel'), :action => 'index') %>
  <% end %>

<% end %>


Fix favorite enterprises layout

Fix favorite enterprises layout

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

  <% @favorite_enterprises.each do |enterprise| %>
    <%= profile_image_link enterprise %>
  <% end %>

<% button_bar do %>
  <%= button :back, _('Go back'), { :controller => 'profile' }%>
<% end %>

<%= __("%s's favorite enterprises") % profile.name %>

<% @favorite_enterprises.each do |enterprise| %>

<%= profile_image_link(enterprise)%>

<% end %>

<% button_bar do %>
  <%= button :back, _('Go back'), { :controller => 'profile' }%>
<% end %>


Agrega aviso sobre sitio aun no lanzado.

<!DOCTYPE html>
<html lang="<%= I18n.locale %>" prefix="og: http://ogp.me/ns#">

        <% if @title %>
        <title><%=@title%> - <%= site_name %></title>
        <meta property="og:title" content="<%=@title%> - <%= site_name %>" />
        <% else %>
        <title><%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %></title>
        <meta property="og:title" content="<%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>" />
        <% end %>

        <meta property="og:type" content="website" />
        <meta property="og:image" content="http://www.quesabes.org/quesabes-theme/images/logo_cuadrado.png" />

        <link rel="shortcut icon" href="/quesabes-theme/images/favicon.gif">
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
        <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all"  %>
        <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
        <% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
        <% end %>
        <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js' %>

        <% if @profile_photo_javascript %>

            <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
        <% end %>

        <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
        <% end %>

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

        <%= render :partial => 'general/before_head_end' %>

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

Close

    Estamos aün trabajando. El egistro esta deshabilitado hasta que lanzemos la realizacion de pedidos el 3 de Octubre.

Close

        <%= render :partial => 'general/topnav' %>

        <%= render :partial => 'general/orglink' %>

        <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
		<%= render :partial => 'general/usernav' %>

        <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

    <%= render :partial => 'general/footer' %>

    <%= render :partial => 'general/before_body_end' %>

X
  <%= _("Paste this link into emails, tweets, and anywhere else:") %>

  <input type="text">

<!DOCTYPE html>
<html lang="<%= I18n.locale %>" prefix="og: http://ogp.me/ns#">

        <% if @title %>
        <title><%=@title%> - <%= site_name %></title>
        <meta property="og:title" content="<%=@title%> - <%= site_name %>" />
        <% else %>
        <title><%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %></title>
        <meta property="og:title" content="<%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>" />
        <% end %>

        <meta property="og:type" content="website" />
        <meta property="og:image" content="http://www.quesabes.org/quesabes-theme/images/logo_cuadrado.png" />

        <link rel="shortcut icon" href="/quesabes-theme/images/favicon.gif">
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
        <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all"  %>
        <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
        <% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
        <% end %>
        <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js' %>

        <% if @profile_photo_javascript %>

            <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
        <% end %>

        <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
        <% end %>

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

        <%= render :partial => 'general/before_head_end' %>

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

<% # code for popup advert for a campaign etc.
=begin

Close

    [ message goes here ]

Close

=end
%>

        <%= render :partial => 'general/topnav' %>

        <%= render :partial => 'general/orglink' %>

        <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
		<%= render :partial => 'general/usernav' %>

        <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

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

    <%= render :partial => 'general/footer' %>

    <%= render :partial => 'general/before_body_end' %>

X
  <%= _("Paste this link into emails, tweets, and anywhere else:") %>

  <input type="text">


Update Ring Website - Try Ring Online - Download/Help links.

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">

      </button>

Home

Download

Why?

Documentation

Ring 1.1 Documentation

Ring 1.0 Documentation

Community

Group

Resources

Team

		<form class="search" action="../doc/search.html" method="get" style="width:200px" >

				<input name="q" type="text" class="form-control" placeholder="Search for...">

				<button class="btn btn-default" type="submit">Go!</button>

			<input name="check_keywords" value="yes" type="hidden">
			<input name="area" value="default" type="hidden">
		</form>

					Download Ring

					Try Ring Online (Interactive Ring)

Innovative and practical general-purpose multi-paradigm language


Remove all modifications to application-ng.rhtml

<!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 %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag template_stylesheet_path %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
    <%
      plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') }
    %>
    <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %>
    <%= stylesheet_link_tag theme_stylesheet_path %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%= javascript_tag('render_all_jquery_ui_widgets()') %>
    <%
      plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
    %>
    <%= javascript_include_tag(plugins_javascripts, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template ) +
    (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
    %>" >

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

        <%= theme_header %>

            <%= usermenu_logged_in %>

              <%= _("%s") % thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login') %>
              <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %>

                <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>

              <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
              <%= _("or %s") % link_to('' + _('Sign up') + '', :controller => 'account', :action => 'signup')%>
              <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" />

<%=_('Press Enter to send the search query.')%>

            <%= javascript_tag 'jQuery("#user form input").hint();' %>
          </form>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

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

<!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 %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag template_stylesheet_path %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
    <%
      plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') }
    %>
    <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %>
    <%= stylesheet_link_tag theme_stylesheet_path %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%= javascript_tag('render_all_jquery_ui_widgets()') %>
    <%
      plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
    %>
    <%= javascript_include_tag(plugins_javascripts, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template ) +
    (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
    %>" >

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

        <%= theme_header %>

            <%= usermenu_logged_in %>

              <%= _("%s") % thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login') %>
              <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %>

                <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>

              <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
              <%= _("or %s") % link_to('' + _('Sign up') + '', :controller => 'account', :action => 'signup')%>
              <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" />

<%=_('Press Enter to send the search query.')%>

            <%= javascript_tag 'jQuery("#user form input").hint();' %>
          </form>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

          <% if controller.respond_to? 'custom_contents' %>
            <% Array(controller.custom_contents).each do |content| %>
              <%= yield content %>
            <% end %>
          <% end %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

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


added elapsed time to build page

added elapsed time to build page

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

  Build history
  <% @project.builds.reverse.each do |build| %>
    <div class="build-link<%= ' selected' if @build.label == build.label %>">
      <%= link_to_build(@project, build) %>

  <% end %>

  <%= h @project.name %> build <%= h @build.label %>
  <% if @build.failed? %>FAILED<% end %>

  finished at <%= format_time @build.time, :verbose %>. Total <%= @build.elapsed_time%> seconds.

<% if !@build.additional_artifacts.empty? %>

  <% @build.additional_artifacts.each do |artifact| %>

      <%= link_to artifact, :action => 'artifact', :project => @project.name, :build => @build.label, :artifact_path => artifact %>

  <% end %>

<% end %>

Build Changeset

    <%= format_changeset_log(@build.changeset) %>

<% test_failures = get_test_failures_and_errors_if_any(@build.output) %>
<% if test_failures %>

Test Failures and Errors

    <%= test_failures %>

<% end %>

Build Log

      <%= format_build_log(@build.output) %>

  Build history
  <% @project.builds.reverse.each do |build| %>
    <div class="build-link<%= ' selected' if @build.label == build.label %>">
      <%= link_to_build(@project, build) %>

  <% end %>

  <%= h @project.name %> build <%= h @build.label %>
  <% if @build.failed? %>FAILED<% end %>

  finished at <%= format_time @build.time, :verbose %>

<% if !@build.additional_artifacts.empty? %>

  <% @build.additional_artifacts.each do |artifact| %>

      <%= link_to artifact, :action => 'artifact', :project => @project.name, :build => @build.label, :artifact_path => artifact %>

  <% end %>

<% end %>

Build Changeset

    <%= format_changeset_log(@build.changeset) %>

<% test_failures = get_test_failures_and_errors_if_any(@build.output) %>
<% if test_failures %>

Test Failures and Errors

    <%= test_failures %>

<% end %>

Build Log

      <%= format_build_log(@build.output) %>


Disabling temporarily the publish event feature

* Using the type to filter Events while the feature isn't ready.

(ActionItem1479)

<%= _('Select the groups where you want to publish your article') %>

<% if !@failed.blank? %>

<%=_("There were errors with the following communities: ")%>

    <% @failed.each do |error, communities|%>
       <%= error %>:

        <% communities.each do |community| %>

 <%= community %>

        <% end %>

    <% end %>

<% end %>

<% if @article.type != "Event" %>
  <% form_tag do%>
    <%= hidden_field_tag :back_to, @back_to %>
    <% @groups.each do |group| %>
      <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

      <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>

    <% end %>

    <% button_bar do %>
      <%= submit_button 'spread', _('Publish') %>
    <% end %>
  <% end %>
<% else %>

    <%= _("This option is temporarily disabled.") %>

<% end %>

<%= _('Select the groups where you want to publish your article') %>

<% if !@failed.blank? %>

<%=_("There were errors with the following communities: ")%>

    <% @failed.each do |error, communities|%>
       <%= error %>:

        <% communities.each do |community| %>

 <%= community %>

        <% end %>

    <% end %>

<% end %>

<% form_tag do%>
 <%= hidden_field_tag :back_to, @back_to %>
 <% @groups.each do |group| %>
    <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

    <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>

  <% end %>

  <% button_bar do %>
    <%= submit_button 'spread', _('Publish') %>
  <% end %>
<% end %>


Make field names consistent with the account editing page.

Create a user account

Fill in the form and we'll send you a quick email to activate your account.

By creating an account, you agree that all work uploaded to openstreetmap.org and all data created by use of any tools which connect to openstreetmap.org is to be licensed under this Creative Commons license (by-sa).

<%= error_messages_for 'user' %>

<% form_tag :action => 'save' do %>

Email	<%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %>

Display Name	<%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %>

Password	<%= password_field('user', 'pass_crypt',{:size => 50, :maxlength => 255}) %>

Confirm Password	<%= password_field('user', 'pass_crypt_confirmation',{:size => 50, :maxlength => 255}) %>

<input type="submit" value="Signup">

<% end %>

Create a user account

Fill in the form and we'll send you a quick email to activate your account.

By creating an account, you agree that all work uploaded to openstreetmap.org and all data created by use of any tools which connect to openstreetmap.org is to be licensed under this Creative Commons license (by-sa).

<%= error_messages_for 'user' %>

<% form_tag :action => 'save' do %>

email:	<%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %>

login name	<%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %>

password:	<%= password_field('user', 'pass_crypt',{:size => 50, :maxlength => 255}) %>

retype password:	<%= password_field('user', 'pass_crypt_confirmation',{:size => 50, :maxlength => 255}) %>

<input type="submit" value="Signup">

<% end %>


small tweak in sharing guide

small tweak in sharing guide

<%
   object ||= nil
   set_parameters_for_sharing_form object
   disable_advanced_view ||= nil
   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
   can_publish = @resource.respond_to?(:can_publish?) ? @resource.can_publish? : true
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

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

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

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

          You may:

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

          <%
             through_resource = ''
             if @resource.kind_of?(Assay)
               through_resource = '(through projects associated with selected study)'
             elsif @resource.kind_of?(Study)
               through_resource = '(through projects associated with selected investigation)'
             end
          %>

Share within members of projects associated with this <%= @resource_type -%> <%= through_resource%> and with all other users that are a member of a <%= Seek::Config.project_name %> project.

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

You can share with the all visitors right away if you are the gatekeeper or if the projects associated with this <%= @resource_type -%> have no gatekeeper

Or you can request the gatekeepers for their approval to share with all visitors

          <% 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 !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 -%>

              <%= check_box_tag 'sharing[request_publish_approval]', 1, false, :disabled => can_publish%>
              - Request approval from the gatekeepers to share with all visitors

    <% 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 %>

<%
   object ||= nil
   set_parameters_for_sharing_form object
   disable_advanced_view ||= nil
   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
   can_publish = @resource.respond_to?(:can_publish?) ? @resource.can_publish? : true
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

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

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

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

          You may:

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

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

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

You can share with the all visitors right away if you are the gatekeeper or if the projects associated with this <%= @resource_type -%> have no gatekeeper

Or you can request the gatekeepers for their approval to share with all visitors

          <% 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 !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 -%>

              <%= check_box_tag 'sharing[request_publish_approval]', 1, false, :disabled => can_publish%>
              - Request approval from the gatekeepers to share with all visitors

    <% 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 %>


Remove stray tag.

Remove stray tag.

<% @title = "About" %>

<%= render :partial => 'help/alpha_notice' %>

Contact Us

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

Introduction to WhatDoTheyKnow

What is WhatDoTheyKnow for?

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

How does the site work?

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

Why would I bother to do this?

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

Why would the public authority bother to reply?

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

Who makes it?

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

Making requests

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

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

How quickly will I get a response?

By law public authorities must respond within 20 days, excluding weekends and
any UK bank holidays. The date that the response is due by is shown on the
page for your request. You will be emailed if this date goes by without
a response, so you can send the public authority another note to hurry them up.

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

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

Can I request information about myself?

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

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

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

Privacy policy

Who gets to see my email address?

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

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

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
about the site or related mySociety services. We will never give or sell
your email addresses to anyone else, unless we are obliged to by law, or you
ask us to.

Why will my name appear publically on the site?

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

So I can make an FOI request using a pseudonym?

Yes, you can. It is good practice for the public authority to reply to such
a request, except in special circumstances such as if they suspect you of
making vexatious requests. See Freedom of Information Good Practice Guidance No 6 for details. You
should refer to this if a public authority attempts to refuse a request because you used a pseudonym.
Saying that, you can avoid the problem by simply making your pseudonym look like a real person's name,
as there is no general obligation to prove your identity.

Why does the list of things that I'm tracking appear publically on the site?

This helps you find others who are researching the same area of government,
so you can form groups to investigate or campaign together. It also helps us
show requests which are related to other requests. If you've ever used a
"social bookmarking" website such as Delicious, Digg or reddit, think of it like
that.


Make the confrm button into a confirm button

Confirm a user account

Press the confirm button below to activate your account.

<form method="post">
<input type="hidden" name="confirm_string" value="<%= params[:confirm_string] %>">
<input type="submit" name="confirm_action" value="Confirm">
</form>

Confirm a user account

Press the confirm button below to activate your account.

<form method="post">
<input type="hidden" name="confirm_string" value="<%= params[:confirm_string] %>">
<input type="submit" name="confirm_action" value="Confrm">
</form>


Don't let people try to edit deleted attendances

    #
    Person
    Email
    Age (as of event)
    Gender
    <% if not waitlist -%>
      Is staff?
      Counts towards total?
    <% end -%>

<% count = 0 -%>
<% for attendance in attendances %>
  <% if attendance.counts or waitlist
    count += 1
  end -%>
  <tr id="attendance_<%=attendance.id%>" class="<%= attendance_class attendance %> <%= cycle :odd, :even %>">

      <% if attendance.counts or waitlist -%>
        <%= count %>
      <% end -%>

    <% if attendance.person -%>

        <%=h attendance.person.name %>

        <% if attendance.person.account -%>
          <%= mail_to attendance.person.primary_email_address %>
        <% end -%>

        <%= attendance.age %>

        <%=h attendance.gender %>
	<% if attendance.gender != attendance.person.gender -%>
	  (crosscast)
	<% end -%>

    <% else -%>

        No person attached to this attendance.  This is probably the result of a bug.

    <% end -%>
    <% if not waitlist -%>
      <%=h attendance.is_staff %>
      <%=h attendance.counts %>
    <% end -%>
	<% if @event.has_edit_permissions?(logged_in_person) && !attendance.deleted? -%>
	    <%= link_to 'Edit', edit_event_attendance_path(@event, attendance) %>
	    <%= link_to 'Drop', event_attendance_path(@event, attendance), :confirm => 'Are you sure?', :method => :delete %>
	<% end -%>
	<% if attendance.deleted? -%>
		Dropped <%= attendance.deleted_at %>
	<% end -%>

<% end %>

    #
    Person
    Email
    Age (as of event)
    Gender
    <% if not waitlist -%>
      Is staff?
      Counts towards total?
    <% end -%>

<% count = 0 -%>
<% for attendance in attendances %>
  <% if attendance.counts or waitlist
    count += 1
  end -%>
  <tr id="attendance_<%=attendance.id%>" class="<%= attendance_class attendance %> <%= cycle :odd, :even %>">

      <% if attendance.counts or waitlist -%>
        <%= count %>
      <% end -%>

    <% if attendance.person -%>

        <%=h attendance.person.name %>

        <% if attendance.person.account -%>
          <%= mail_to attendance.person.primary_email_address %>
        <% end -%>

        <%= attendance.age %>

        <%=h attendance.gender %>
	<% if attendance.gender != attendance.person.gender -%>
	  (crosscast)
	<% end -%>

    <% else -%>

        No person attached to this attendance.  This is probably the result of a bug.

    <% end -%>
    <% if not waitlist -%>
      <%=h attendance.is_staff %>
      <%=h attendance.counts %>
    <% end -%>
	<% if @event.has_edit_permissions?(logged_in_person) -%>
	    <%= link_to 'Edit', edit_event_attendance_path(@event, attendance) %>
	    <%= link_to 'Drop', event_attendance_path(@event, attendance), :confirm => 'Are you sure?', :method => :delete %>
	<% end -%>

<% end %>


Adapt unhappy page to Spain

Adapt unhappy page to Spain

<% @title = "¿No estás satisfecho con la respuesta obtenida?" %>

¿No estás satisfecho con la respuesta obtenida?

Si...

No has recibido una respuesta en 30 días siendo una solicitud sobre medio ambiente;

No has recibido una respuesta a cualquier solicitud de información en 3 meses;

No has obtenido toda la información solicitada; o

Tu petición ha sido rechazada y crees que no recae sobre <%= link_to _("ninguna de las excepciones que establece la ley"), help_requesting_path(:anchor => '16') %>.

... puedes

Contestar a la institución que te ha contestado explicándole por qué su contestación no ha respondido a tu solicitud.

Si con esto no consigues una respuesta adecuada, puedes plantearte comenzar a recurrir formalmente interponiendo un recurso de alzada, este recurso es un recurso administrativo que no tiene ningún coste.

Tras el recurso administrativo solo queda ir a los tribunales, para ello necesitarás un abogado y el proceso si tiene costes.

Otras opciones

Haz una nueva solicitud de información resumida, o de documentación indirectamente relacionada con los temas de la solicitud denegada. <%= link_to 'Pídenos', help_contact_path %> ayuda para más ideas.

Si crees que otra organismo o empresa pública puede tener en su posesión la información que buscas, solicítasela por si estos responden mejor.

Habla con organizaciones de la sociedad civil, periodistas e investigadores que estén interesados en temas similares a los tuyos y pídeles ideas para exigir la información que buscas.

<% @title = "Unhappy about the response you got?" %>

Unhappy about the response you got?

If ...

You didn't get a reply within 15 working days;

You did not get all of the information that you requested; or

Your request was refused, but with no reasoning based on the exceptions included in Regulation 1049/2001

... you can

Make an appeal (confirmatory application) by replying back to the same EU authority, telling them why you are unsatisfied with their reply.

If that doesn't help, complain to the European Ombudsman.

If you can find a lawyer who has done the bar in an EU country, go to the European Court of Justice, to the General Court.

1. Make an appeal (confirmatory application)

<% if !@info_request.nil? %>
    <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %> and then write a message asking the authority to review your request.
<% else %>
    At the bottom of the relevant request page on <%= site_name %> choose "make an appeal” . Then write a message asking for a review of the decision by the EU body not to grant you the information requested.
<% end %>

Appeals should be processed within 15 working days, and then the EU body should write and let you know the results of the “confirmatory application”, unless they apply another 15 working day extension. You will then either get the information that you originally requested, or you will be told that they are sticking with, or confirming, their original decision.

2. Complaining to the European Ombudsman

If you are still unhappy after the EU institution, office, body or agency has replied to your appeal (confirmatory application), or in the event that they fail to reply at all, you can then complain to the European Ombudsman. To do this fill in the form on the Ombudsman's website.

To make it easier to send the relevant information to the European Ombudsman, either include a link to your request
<% if !@info_request.nil? %>
    <%=h main_url(request_url(@info_request)) %>
<% else %>
    on <%= site_name %>
<% end %>
in your complaint or print out the whole page of your request and all attachments.

<%= site_name %> has no special facilities for handling a request at this stage - it passes into the European Ombudsman's system. You can, however, make comments about the progress of your complaint on this site, in order to keep other people informed.

The European Ombudsman's decisions are not legally binding on the institution, but they are usually taken into account by the EU bodies. Resolving a conflict in this way is also free, easy and fast.

3. European Court of Justice

The advantage of appealing in this way is that the Court’s decision is legally binding on an institution. This means that the European Court of Justice can annul a decision refusing public access to documents, thereby obliging the institution holding the documents to review the request for public access.

However, appeals to the European Court of Justice can take time (around 2 years), and since it requires the assistance of a lawyer registered at the bar in one of the 27 Member States it can also be expensive. Still, it is worth considering because legal challenges contribute to the long term development of the right of access to information and help to create jurisprudence on how the right of access to documents should be implemented in practice.

4. Think laterally!

Make a new access to information request for summary information, or for documentation relating indirectly to matters in your refused request. <%= link_to 'Ask us', help_contact_path %> for ideas if you're stuck.

If any other public authorities or publicly owned companies are involved,
    then make requests to them.

Talk to civil society organisations, journalists or researchers who are interested in a similar issue to yours for ideas.

Write to your MEPs or other politicians and ask for their help in finding the answer.


ActionItem31: listing tags in view_page

ActionItem31: listing tags in view_page

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

<%= @page.title %>

  <%= _('Tags: %s') % @page.tags %>

<% if @page.parent && !@page.parent.path.blank? %>
  <%= link_to_document(@page.parent, _('Up')) %>
<% end %>
<% if logged_in?  && current_user.person.has_permission?('post_content', profile) %>
  <%= link_to _('Edit'), :controller => 'cms', :action => 'edit', :id => @page %>
<% end %>

<%= @page.to_html %>

<%= @page.title %>

<% if @page.parent && !@page.parent.path.blank? %>
  <%= link_to_document(@page.parent, _('Up')) %>
<% end %>
<% if logged_in?  && current_user.person.has_permission?('post_content', profile) %>
  <%= link_to _('Edit'), :controller => 'cms', :action => 'edit', :id => @page %>
<% end %>

<%= @page.to_html %>


bugfix: subform headers weren't displaying for plural association columns, even though ui_type =>  :select now supports plural associations

    <%
    active_scaffold_config_for(@record.class).subform.columns.each :flatten => true do |column|
      next if column.association and column.association.klass == parent_record.class
      -%>
      <%= column.label %>
    <% end -%>

    <%
    active_scaffold_config_for(@record.class).subform.columns.each :flatten => true do |column|
      next if column.association and (column.association.klass == parent_record.class or !column.singular_association?)
      -%>
      <%= column.label %>
    <% end -%>


Improve wording

Improve wording

Mention that the user will be able to see the request themselves.

Dear <%= name_to %>,

Your request '<%= info_request.title %>' at <%= info_request_url %> has been reviewed by moderators.

We consider it <% if reason == 'not_foi' %>is not a valid FOI request<% else %>to be vexatious<% end%>, and have therefore hidden it from other users. You will still be able to view it while logged in to the site. Please reply to this email if you would like to discuss this decision further.

Yours,

The <%= site_name %> team.

Dear <%= name_to %>,

Your request '<%= info_request.title %>' at <%= info_request_url %> has been reviewed by moderators.

We consider it <% if reason == 'not_foi' %>is not a valid FOI request<% else %>to be vexatious<% end%>, and have therefore hidden it from other users.  Please reply to this email if you would like to discuss this decision further.

Yours,

The <%= site_name %> team.


fixed unwatch and repo link on the user console

Recent Activity For You

			<%=if @allevents.empty? then "
There are no events
" end%>
			<% for repo in @allevents %>

<%= repo.event %>

			<%end%>

Recent Activity From You

			<%=if @myevents.empty? then "
You havn't done anything yet
" end%>
			<% for event in @myevents %>

<%= event.event %>

			<%end%>

Your Repos <%= link_to_unless_current '[Add]', { :action => 'new', :controller => 'repo' }, :rel => 'facebox' %>

			<%=if @myrepos.empty? then "
You don't have any repos yet
" end%>

			<% for repo in @myrepos%>

<%=if repo.is_private then "" end%> <%= link_to(repo.name, :controller=>'repo', :action => 'show', :username => @user.username, :reponame => repo.unixname)%>

<%=repo.desc%>

			<% end %>
			<% for repo in @memberrepos%>

<%=if repo.repodb.is_private then "" end%> <%= link_to(repo.repodb.name, :controller=>'repo', :action => 'show', :id => repo.repodb.id)%>

<%=repo.repodb.desc%>

Owner: <%=link_to repo.repodb.user.username, :action=>'profile', :username => repo.repodb.user.username%>

			<% end %>

Your Watched Repos

			<%=if @watchedrepos.empty? then "
Your are not watching any repos
" end%>
			<% for repo in @watchedrepos%>

<%= link_to(repo.repodb.name, :controller=>'repo', :action => 'show', :username => repo.repodb.user.username, :reponame => repo.repodb.unixname)%> [<%=link_to 'Un-Watch', {:controller => 'repo', :action => "unwatch", :reponame => repo.repodb.name, :username => repo.repodb.user.username, :repo_id => repo.repodb.id}, :method => :post %>]

<%=repo.repodb.desc%>

Owner: <%=link_to repo.repodb.user.username, :action=>'profile', :username => repo.repodb.user.username%>

			<%end%>

Recent Activity For You

			<%=if @allevents.empty? then "
There are no events
" end%>
			<% for repo in @allevents %>

<%= repo.event %>

			<%end%>

Recent Activity From You

			<%=if @myevents.empty? then "
You havn't done anything yet
" end%>
			<% for event in @myevents %>

<%= event.event %>

			<%end%>

Your Repos <%= link_to_unless_current '[Add]', { :action => 'new', :controller => 'repo' }, :rel => 'facebox' %>

			<%=if @myrepos.empty? then "
You don't have any repos yet
" end%>

			<% for repo in @myrepos%>

<%=if repo.is_private then "" end%> <%= link_to(repo.name, :controller=>'repo', :action => 'show', :username => @user.username, :reponame => repo.unixname)%>

<%=repo.desc%>

			<% end %>
			<% for repo in @memberrepos%>

<%=if repo.repodb.is_private then "" end%> <%= link_to(repo.repodb.name, :controller=>'repo', :action => 'show', :id => repo.repodb.id)%>

<%=repo.repodb.desc%>

Owner: <%=link_to repo.repodb.user.username, :action=>'profile', :username => repo.repodb.user.username%>

			<% end %>

Your Watched Repos

			<%=if @watchedrepos.empty? then "
Your are not watching any repos
" end%>
			<% for repo in @watchedrepos%>

<%= link_to(repo.repodb.name, :controller=>'repo', :action => 'show', :id => repo.repodb.id)%> [<%=link_to 'Un-Watch', {:controller => 'repo', :action => "unwatch", :repo_id => repo.repodb.id}, :method => :post %>]

<%=repo.repodb.desc%>

Owner: <%=link_to repo.repodb.user.username, :action=>'profile', :username => repo.repodb.user.username%>

			<%end%>


Take out from cache home part

Take out from cache home part

<% view_cache :ttl => 5.minutes do %>

<%= _('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?).') % help_about_url %>

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

           <%= _('e.g.') %>
	   <% @popular_bodies.each_with_index do |body, i| %>
             <%=link_to body.name, search_url(body.name, 'bodies')%><% if i < 2 %>, <% else %>. <% break %><% end %>
	   <% end %>

           <%= _('OR, search for information others have requested using {{site_name}}', :site_name => site_name) %>

    <% end %>

    <% if @popular_bodies.size > 0 %>

            <% for popular_body in @popular_bodies %>

<%=public_body_link(popular_body)%>
                 <%= n_('%d request', '%d requests', popular_body.info_requests.count) % popular_body.info_requests.count %>

            <% 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, "", 30)), request_url(event.info_request)%>
                <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %>

            <% end %>

<%=link_to _('More successful requests...'), request_list_successful_url %>

    <% end %>

<% end %>


Fix to mobile login page

Fix to mobile login page

The Carbon Diet

Sign In

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<% form_tag :action => 'auth' do %>

Username:

<%= text_field 'user', 'login'  %>

Password:

<%= password_field 'user', 'password' %>

Remember me <%= check_box 'user', 'remember' %>

<%= submit_tag 'Log In' %>

<% end %>

The Carbon Diet

Sign In

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<%= form_tag :action => 'auth' %>

Username:

<%= text_field 'user', 'login'  %>

Password:

<%= password_field 'user', 'password' %>

Remember me <%= check_box 'user', 'remember' %>

<%= submit_tag 'Log In' %>

<%= end %>


Oops. Didn't mean to commit this. I was trying to use the wrapper template, but it overcomplicated the header, so I meant to revert.

--HG--
branch : kiss_enhancements
extra : convert_revision : svn%3A8c66a899-4b77-dc11-840b-00304827d434/branches/kiss_enhancements%4060

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

	<title><%= fileinfo[:title] %></title>

	<link type="text/css" media="screen" href="<%= rel_prefix %>/rdoc.css" rel="stylesheet" />

<% if fileinfo[:parser] == RDoc::Parser::Simple %>

			<% simple_files = files.select {|_, file| file[:parser] == RDoc::Parser::Simple } %>
			<% unless simple_files.empty? then %>

Files

				<% simple_files.sort_by {|name,_| name }.each do |name, file| %>

<a href="<%= rel_prefix %>/<%=
						file[:short_name] %>.html"><%= h file[:short_name] %>

				<% end %>

			<% end %>

Class Index
					<img src="<%= rel_prefix %>/images/find.png"
						height="16" width="16" alt="[+]"
						title="show/hide quicksearch" />

				<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
				<fieldset>
					<legend>Quicksearch</legend>
					<input type="text" name="quicksearch" value=""
						class="quicksearch-field" />
				</fieldset>
				</form>

				<% modsort.each do |cname| %>
				<% cinfo = classes[cname] %>

<a href="<%= rel_prefix %>/<%= cinfo[:outfile] %>"><%= cname %>

				<% end %>

No matching classes.

			<% if $DEBUG %>

<img src="<%= rel_prefix %>/images/bug.png"
				alt="toggle debugging" height="16" width="16" />

			<% end %>

		<%= fileinfo[:description] %>

[Validate]

Generated with the Darkfish
			Rdoc Generator <%= RDoc::Generator::Darkfish::VERSION %>.

<% else %>

Last Modified

<%= fileinfo[:dtm_modified] %>

			<% if fileinfo[:requires] %>

Requires

				<% fileinfo[:requires].each do |dependency| %>

<%= dependency[:name] %>

				<% end %>

			<% end %>

			<% if fileinfo[:cvsurl] %>

Trac URL

<a target="_top"
				href="<%= fileinfo[:cvsurl] %>"><%= fileinfo[:cvsurl] %>

			<% end %>

		<% if fileinfo[:description] %>

Description

			<%= fileinfo[:description] %>

		<% end %>

<% end %>