Output correct link for public URL of request

<% @title = _("FOI request – {{title}}", :title => h(@info_request.title)) %>

<%=@title%>

<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
  <%= hidden_field_tag 'info_request_id', @info_request.id %>

        <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request">Request metadata

    <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse in">

	      <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>

	    Public page:
	    <%= link_to main_url(request_url(@info_request)), main_url(request_url(@info_request)) %>

          <% @info_request.for_admin_column do |name, value, type, column_name|%>

                <%= name %>:

                <% if type == 'datetime' %>
                  <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                  (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                <% else %>
                  <%= h value %>
                <% end %>
                <% if column_name == 'described_state' %>

Initial request last sent at: <%= @info_request.calculate_status %>

Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %>

Date response required by: <%= @info_request.date_response_required_by %>

Very overdue after: <%= @info_request.date_very_overdue_after %>

                <% end %>

          <% end %>

              Created by

              <%= link_to("".html_safe, user_url(@info_request.user), :title => "view user's page on public website") %>
              <%= link_to(@info_request.user.name, user_admin_url(@info_request.user)) %>
              <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new user:
                <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to user", :class => "btn btn-info" %>

              Public authority:

              <%= link_to("".html_safe, main_url(public_body_url(@info_request.public_body)), :title => "view authority on public website") %>
              <%= link_to(@info_request.public_body.name, public_body_admin_url(@info_request.public_body)) %>
              <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new authority:
                <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to authority", :class => "btn btn-info" %>

              <%=_("Incoming email address")%>

              <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>

              <%=_("Tags")%>

              <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>

	      <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>

<% end %>
<formset class="form-horizontal">
  <legend>Actions</legend>

      FOI officer upload URL

      <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %>

(see also option to general URLs for individual incoming messages below)

  <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>

      Hide the request and notify the user:

        <% if ['hidden', 'requester_only'].include? @info_request.prominence %>

This request has already been hidden

        <% else %>

            <%= radio_button_tag "reason", "not_foi" %> <%= _("Not a valid FOI request") %>

            <%= radio_button_tag "reason", "vexatious" %> <%= _("A vexatious request") %>

        <% end %>

    <% if !['hidden', 'requester_only'].include? @info_request.prominence %>

        Subject of email:

          <%= text_field_tag "subject", "Your request on WhatDoTheyKnow.com hidden", {:id => "request_hidden_user_subject_field", :cols => 100} %>

        Reason for hiding the request (will be emailed to user):

          <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>

        <%= submit_tag _("Hide request"), :class => "btn" %>

    <% end %>
  <% end %>
</formset>

Events

  <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>

        <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="#events">
          <%= _("Event {{id}}", :id => info_request_event.id) %>:

            <%=h info_request_event.event_type.humanize %><% if !info_request_event.calculated_state.nil? %>; state: <%= info_request_event.calculated_state %><% end %>

            <%= info_request_event.created_at%>

      <div id="event_<%=info_request_event.id%>" class="accordion-body collapse">

                <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
                  <% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %>
                    <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
                    <%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
                  <% end %>
                <% end %>

            <% info_request_event.for_admin_column do |name, value, type, column_name| %>

                  <%=h name%>

                  <% if column_name == 'params_yaml' %>
                    <%= info_request_event.params_yaml_as_html %>
                  <% elsif value.nil? %>
                    nil
                  <% elsif %w(text string).include?(type) %>
                    <%=h value.humanize %>
                  <% elsif type == 'datetime' %>
                    <%= admin_date value %>
                  <% else %>
                    <%=h value %>
                  <% end %>

            <% end %>

  <% end %>

Outgoing messages

  <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>

        <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="#outgoing_messages">
        <a href="../edit_outgoing/<%= outgoing_message.id %>">
          #<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %>

          <%= truncate(outgoing_message.body, :length => 400) %>

      <div id="outgoing_<%=outgoing_message.id%>" class="accordion-body collapse">

                <% form_tag '../resend', :class => "admin-table-form" do %>
                  <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
                  <%= submit_tag "Resend", :class => "btn" %>
                <% end %>

            <% outgoing_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name == 'body' %>
                    <%= simple_format(truncate(outgoing_message.body, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" ))) %>

<%= simple_format( outgoing_message.body ) %>

                  <% else %>
                    <%= admin_value(value) %>
                  <% end %>

            <% end %>

  <% end %>

Incoming messages

  <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>

        <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="#incoming_messages">
        <%=incoming_message.id%> -- <%= h(incoming_message.mail_from) %> <%=_("at")%> <%=admin_value(incoming_message.sent_at)%>

          <% if !incoming_message.cached_main_body_text_folded.nil? %>
            <%= truncate(incoming_message.cached_main_body_text_folded.gsub('FOLDED_QUOTED_SECTION', ''), :length => 400) %>
          <% end %>

      <div id="incoming_<%=incoming_message.id%>" class="accordion-body collapse">

                <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

            <% incoming_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name =~ /^cached_.*?$/ %>
                    <%= simple_format( truncate(value, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden"))) %>

<%= simple_format(value) %>

                  <% else %>
                    <%= simple_format(value) %>
                  <% end %>

            <% end %>

  <% end %>

Annotations

<% if @info_request.comments.size > 0 %>

    <% for comment in @info_request.comments %>

         <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments">
          <a href="../edit_comment/<%= comment.id %>">
            #<%=comment.id%>
            --
            <%=h(comment.user.name)%>
            <%=admin_value(comment.created_at)%>

            <%= truncate(comment.body, :length => 400) %>

        <div id="comment_<%=comment.id%>" class="accordion-body collapse">

                 By <%= link_to("".html_safe, user_url(comment.user), :title => "view user's page on public website") %>

                  <%= link_to(h(comment.user.name), user_admin_url(comment.user)) %>

              <% comment.for_admin_column do |name, value, type, column_name |%>

                    <%=name%>

                    <% if column_name == 'body' && !comment.visible %>
                      <s><%=h comment.send(column_name) %></s>
                    <% else %>
                      <%=h comment.send(column_name) %>
                    <% end %>

              <% end %>

    <% end %>

<% else %>

None yet.

<% end %>

Exim delivery logs

(Lines containing the request incoming email address, updated hourly.)

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>

<% @title = _("FOI request – {{title}}", :title => h(@info_request.title)) %>

<%=@title%>

<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
  <%= hidden_field_tag 'info_request_id', @info_request.id %>

        <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request">Request metadata

    <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse in">

	      <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>

	    Public page:
	    main_url(request_url(@info_request))

          <% @info_request.for_admin_column do |name, value, type, column_name|%>

                <%= name %>:

                <% if type == 'datetime' %>
                  <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                  (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                <% else %>
                  <%= h value %>
                <% end %>
                <% if column_name == 'described_state' %>

Initial request last sent at: <%= @info_request.calculate_status %>

Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %>

Date response required by: <%= @info_request.date_response_required_by %>

Very overdue after: <%= @info_request.date_very_overdue_after %>

                <% end %>

          <% end %>

              Created by

              <%= link_to("".html_safe, user_url(@info_request.user), :title => "view user's page on public website") %>
              <%= link_to(@info_request.user.name, user_admin_url(@info_request.user)) %>
              <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new user:
                <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to user", :class => "btn btn-info" %>

              Public authority:

              <%= link_to("".html_safe, main_url(public_body_url(@info_request.public_body)), :title => "view authority on public website") %>
              <%= link_to(@info_request.public_body.name, public_body_admin_url(@info_request.public_body)) %>
              <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new authority:
                <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to authority", :class => "btn btn-info" %>

              <%=_("Incoming email address")%>

              <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>

              <%=_("Tags")%>

              <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>

	      <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>

<% end %>
<formset class="form-horizontal">
  <legend>Actions</legend>

      FOI officer upload URL

      <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %>

(see also option to general URLs for individual incoming messages below)

  <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>

      Hide the request and notify the user:

        <% if ['hidden', 'requester_only'].include? @info_request.prominence %>

This request has already been hidden

        <% else %>

            <%= radio_button_tag "reason", "not_foi" %> <%= _("Not a valid FOI request") %>

            <%= radio_button_tag "reason", "vexatious" %> <%= _("A vexatious request") %>

        <% end %>

    <% if !['hidden', 'requester_only'].include? @info_request.prominence %>

        Subject of email:

          <%= text_field_tag "subject", "Your request on WhatDoTheyKnow.com hidden", {:id => "request_hidden_user_subject_field", :cols => 100} %>

        Reason for hiding the request (will be emailed to user):

          <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>

        <%= submit_tag _("Hide request"), :class => "btn" %>

    <% end %>
  <% end %>
</formset>

Events

  <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>

        <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="#events">
          <%= _("Event {{id}}", :id => info_request_event.id) %>:

            <%=h info_request_event.event_type.humanize %><% if !info_request_event.calculated_state.nil? %>; state: <%= info_request_event.calculated_state %><% end %>

            <%= info_request_event.created_at%>

      <div id="event_<%=info_request_event.id%>" class="accordion-body collapse">

                <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
                  <% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %>
                    <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
                    <%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
                  <% end %>
                <% end %>

            <% info_request_event.for_admin_column do |name, value, type, column_name| %>

                  <%=h name%>

                  <% if column_name == 'params_yaml' %>
                    <%= info_request_event.params_yaml_as_html %>
                  <% elsif value.nil? %>
                    nil
                  <% elsif %w(text string).include?(type) %>
                    <%=h value.humanize %>
                  <% elsif type == 'datetime' %>
                    <%= admin_date value %>
                  <% else %>
                    <%=h value %>
                  <% end %>

            <% end %>

  <% end %>

Outgoing messages

  <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>

        <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="#outgoing_messages">
        <a href="../edit_outgoing/<%= outgoing_message.id %>">
          #<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %>

          <%= truncate(outgoing_message.body, :length => 400) %>

      <div id="outgoing_<%=outgoing_message.id%>" class="accordion-body collapse">

                <% form_tag '../resend', :class => "admin-table-form" do %>
                  <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
                  <%= submit_tag "Resend", :class => "btn" %>
                <% end %>

            <% outgoing_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name == 'body' %>
                    <%= simple_format(truncate(outgoing_message.body, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" ))) %>

<%= simple_format( outgoing_message.body ) %>

                  <% else %>
                    <%= admin_value(value) %>
                  <% end %>

            <% end %>

  <% end %>

Incoming messages

  <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>

        <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="#incoming_messages">
        <%=incoming_message.id%> -- <%= h(incoming_message.mail_from) %> <%=_("at")%> <%=admin_value(incoming_message.sent_at)%>

          <% if !incoming_message.cached_main_body_text_folded.nil? %>
            <%= truncate(incoming_message.cached_main_body_text_folded.gsub('FOLDED_QUOTED_SECTION', ''), :length => 400) %>
          <% end %>

      <div id="incoming_<%=incoming_message.id%>" class="accordion-body collapse">

                <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

            <% incoming_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name =~ /^cached_.*?$/ %>
                    <%= simple_format( truncate(value, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden"))) %>

<%= simple_format(value) %>

                  <% else %>
                    <%= simple_format(value) %>
                  <% end %>

            <% end %>

  <% end %>

Annotations

<% if @info_request.comments.size > 0 %>

    <% for comment in @info_request.comments %>

         <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments">
          <a href="../edit_comment/<%= comment.id %>">
            #<%=comment.id%>
            --
            <%=h(comment.user.name)%>
            <%=admin_value(comment.created_at)%>

            <%= truncate(comment.body, :length => 400) %>

        <div id="comment_<%=comment.id%>" class="accordion-body collapse">

                 By <%= link_to("".html_safe, user_url(comment.user), :title => "view user's page on public website") %>

                  <%= link_to(h(comment.user.name), user_admin_url(comment.user)) %>

              <% comment.for_admin_column do |name, value, type, column_name |%>

                    <%=name%>

                    <% if column_name == 'body' && !comment.visible %>
                      <s><%=h comment.send(column_name) %></s>
                    <% else %>
                      <%=h comment.send(column_name) %>
                    <% end %>

              <% end %>

    <% end %>

<% else %>

None yet.

<% end %>

Exim delivery logs

(Lines containing the request incoming email address, updated hourly.)

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>


Update Ring Website - website/cgi-bin/main.rhtml

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

      </button>

Home

Download

Download Ring 1.7

Download Ring 1.6

Download Ring 1.5.4

Download Ring 1.5.3

Download Ring 1.5.2

Download Ring 1.5.1

Download Ring 1.5

Download Ring 1.4.1

Download Ring 1.4

Download Ring 1.3

Download Ring 1.2

Download Ring 1.1

Download Ring 1.0

Why?

Documentation

Ring 1.7 Documentation

Ring 1.6 Documentation

Ring 1.5.4 Documentation

Ring 1.5.3 Documentation

Ring 1.5.2 Documentation

Ring 1.5.1 Documentation

Ring 1.5 Documentation

Ring 1.4.1 Documentation

Ring 1.4 Documentation

Ring 1.3 Documentation

Ring 1.2 Documentation

Ring 1.1 Documentation

Ring 1.0 Documentation

Community

Group

Resources

Team

		<form class="search" action="../doc1.7/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

					Documents

					Try Online

					Group

Innovative and practical general-purpose multi-paradigm language

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

      </button>

Home

Download

Why?

Documentation

Ring 1.7 Documentation

Ring 1.6 Documentation

Ring 1.5.4 Documentation

Ring 1.5.3 Documentation

Ring 1.5.2 Documentation

Ring 1.5.1 Documentation

Ring 1.5 Documentation

Ring 1.4.1 Documentation

Ring 1.4 Documentation

Ring 1.3 Documentation

Ring 1.2 Documentation

Ring 1.1 Documentation

Ring 1.0 Documentation

Community

Group

Resources

Team

		<form class="search" action="../doc1.7/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

					Documents

					Try Online

					Group

Innovative and practical general-purpose multi-paradigm language


Correct privacy message.

Correct privacy message.

<%= @name %>,

Please click on the link below to confirm your email address.
<%=@reasons[:email]%>

<%=@url%>

We will not reveal your email address to anybody unless you
or the law tell us to.

-- the WhatDoTheyKnow team

<%= @name %>,

Please click on the link below to confirm your email address.
<%=@reasons[:email]%>

<%=@url%>

We will never give away or sell your email address to anyone else
without your permission.

-- the WhatDoTheyKnow team


Fix tag links.

Fix tag links.

  <% cl = cycle('table0', 'table1') %>
  <td class="<%= cl %>">
    <% if trace.inserted %>
    <a href="<%= url_for :controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name %>"><img src="<%= url_for :controller => 'trace', :action => 'icon', :id => trace.id, :display_name => trace.user.display_name %>" border="0" alt="" />
    <% else %>
    PENDING
    <% end %>

  <td class="<%= cl %>"><%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %>
    <span class="gpxsummary" title="<%= trace.timestamp %>"> ...
      <% if trace.inserted %>
      (<%= trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> points)
      <% end %>
      ... <%= time_ago_in_words( trace.timestamp ) %>  ago
      <%= link_to 'more', {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => 'View Trace Details'} %> /
      <%= link_to 'map', {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'View Map'} %> /
      <%= link_to 'edit', {:controller => 'site', :action => 'edit', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'Edit Map'} %>

      <%= escape_once(trace.description) %>

    by <%= link_to trace.user.display_name, {:controller => 'user', :action => 'view', :display_name => trace.user.display_name} %>
    in
    <% if trace.tags %>
      <% trace.tags.each do |tag| %>
        <%= link_to tag.tag, :tag => tag.tag %>
      <% end %>
    <% end %>

  <% cl = cycle('table0', 'table1') %>
  <td class="<%= cl %>">
    <% if trace.inserted %>
    <a href="<%= url_for :controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name %>"><img src="<%= url_for :controller => 'trace', :action => 'icon', :id => trace.id, :display_name => trace.user.display_name %>" border="0" alt="" />
    <% else %>
    PENDING
    <% end %>

  <td class="<%= cl %>"><%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %>
    <span class="gpxsummary" title="<%= trace.timestamp %>"> ...
      <% if trace.inserted %>
      (<%= trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> points)
      <% end %>
      ... <%= time_ago_in_words( trace.timestamp ) %>  ago
      <%= link_to 'more', {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => 'View Trace Details'} %> /
      <%= link_to 'map', {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'View Map'} %> /
      <%= link_to 'edit', {:controller => 'site', :action => 'edit', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'Edit Map'} %>

      <%= escape_once(trace.description) %>

    by <%= link_to trace.user.display_name, {:controller => 'user', :action => 'view', :display_name => trace.user.display_name} %>
    in
    <% if trace.tags %>
      <% trace.tags.each do |tag| %>
        <%= link_to tag.tag, :controller => 'trace', :action => @paging_action, :tag => tag.tag %>
      <% end %>
    <% end %>


make public button a bit nicer

make public button a bit nicer

User details

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

Email	<%= @user.email %>

Mapper since	<%= @user.creation_time %> (<%= time_ago_in_words(@user.creation_time) %> ago)

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

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

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

Description	<%= f.text_area :description, :class => "editDescription" %>

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

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

<%= submit_tag 'Save Changes' %>
<% end %>

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

Public editing

<% if @user.data_public? %>
  All your edits are public.
<% else %>
Currently your edits are anonymous and people can't send you messages or see your location. To show what you edited and allow people to contact you through the website, click the button below.
You will need to do this if you want to use the online editor and it is encouraged (find out why).
This action cannot be reversed and all new users are now public by default.

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

User details

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

Email	<%= @user.email %>

Mapper since	<%= @user.creation_time %> (<%= time_ago_in_words(@user.creation_time) %> ago)

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

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

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

Description	<%= f.text_area :description, :class => "editDescription" %>

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

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

<%= submit_tag 'Save Changes' %>
<% end %>

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

Public editing

<% if @user.data_public? %>
  All your edits are public.
<% else %>
  Currently your edits are anonymous and people can't send you messages or see your location. To show what you edited and allow people to contact you through the website, click the button below. You will need to do this if you want to use the online editor (find out why). This action cannot be reversed.

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


Quick fix to reference relation rather than relation_member when linking to the relation, not sure when the bug was introduced. Tests still need to be written for the browse controller. Closes #1764

    <%= link_to "Relation " + containing_relation.relation.id.to_s, :action => "relation", :id => containing_relation.relation.id.to_s %>
    <% unless containing_relation.member_role.blank? %>
      (as <%= h(containing_relation.member_role) %>)
    <% end %>

    <%= link_to "Relation " + containing_relation.id.to_s, :action => "relation", :id => containing_relation.id.to_s %>
    <% unless containing_relation.member_role.blank? %>
      (as <%= h(containing_relation.member_role) %>)
    <% end %>


Another external request fix

Another external request fix

<% @title = _("FOI request – {{title}}", :title => h(@info_request.title)) %>

<%=@title%>

<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
  <%= hidden_field_tag 'info_request_id', @info_request.id %>

        <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request">Show metadata

    <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse">

          <% @info_request.for_admin_column do |name, value, type, column_name|%>

                <%= name %>:

                <% if type == 'datetime' %>
                  <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                  (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                <% else %>
                  <%= h value %>
                <% end %>
                <% if column_name == 'described_state' %>

Initial request last sent at: <%= @info_request.calculate_status %>

Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %>

Date response required by: <%= @info_request.date_response_required_by %>

Very overdue after: <%= @info_request.date_very_overdue_after %>

                <% end %>

          <% end %>

              Created by

              <%= link_to("".html_safe, user_link_for_request(@info_request), :title => "view user's page on public website") %>
              <%= user_admin_link_for_request(@info_request) %>
              <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new user:
                <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to user", :class => "btn btn-info" %>

              Public authority:

              <%= link_to("".html_safe, main_url(public_body_url(@info_request.public_body)), :title => "view authority on public website") %>
              <%= link_to(@info_request.public_body.name, public_body_admin_url(@info_request.public_body)) %>
              <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new authority:
                <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to authority", :class => "btn btn-info" %>

              <%=_("Incoming email address")%>

              <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>

              <%=_("Tags")%>

              <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>

<% end %>
<formset class="form-horizontal">
  <legend>Actions</legend>

      Other views of this request

      <%= link_to 'Public page', main_url(request_url(@info_request)), :class => "btn" %>
      <%= link_to 'Edit page', '../edit/' + @info_request.id.to_s, :class => "btn" %>

      FOI officer upload URL

      <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %>

(see also option to general URLs for individual incoming messages below)

  <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>

      Hide the request and notify the user:

        <% if ['hidden', 'requester_only'].include? @info_request.prominence %>

This request has already been hidden

        <% else %>

            <%= radio_button_tag "reason", "not_foi" %> <%= _("Not a valid FOI request") %>

            <%= radio_button_tag "reason", "vexatious" %> <%= _("A vexatious request") %>

        <% end %>

    <% if !['hidden', 'requester_only'].include? @info_request.prominence %>

        Subject of email:

          <%= text_field_tag "subject", "Your request on WhatDoTheyKnow.com hidden", {:id => "request_hidden_user_subject_field", :cols => 100} %>

        Reason for hiding the request (will be emailed to user):

          <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>

        <%= submit_tag _("Hide request"), :class => "btn" %>

    <% end %>
  <% end %>
</formset>

Events

  <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>

        <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="#events">
          <%= _("Event {{id}}", :id => info_request_event.id) %>:

            <%=h info_request_event.event_type.humanize %><% if !info_request_event.calculated_state.nil? %>; state: <%= info_request_event.calculated_state %><% end %>

            <%= info_request_event.created_at%>

      <div id="event_<%=info_request_event.id%>" class="accordion-body collapse">

                <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
                  <% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %>
                    <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
                    <%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
                  <% end %>
                <% end %>

            <% info_request_event.for_admin_column do |name, value, type, column_name| %>

                  <%=h name%>

                  <% if column_name == 'params_yaml' %>
                    <%= info_request_event.params_yaml_as_html %>
                  <% elsif value.nil? %>
                    nil
                  <% elsif %w(text string).include?(type) %>
                    <%=h value.humanize %>
                  <% elsif type == 'datetime' %>
                    <%= admin_date value %>
                  <% else %>
                    <%=h value %>
                  <% end %>

            <% end %>

  <% end %>

Outgoing messages

  <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>

        <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="#outgoing_messages">
        <a href="../edit_outgoing/<%= outgoing_message.id %>">
          #<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %>

          <%= truncate(outgoing_message.body, :length => 400) %>

      <div id="outgoing_<%=outgoing_message.id%>" class="accordion-body collapse">

                <% form_tag '../resend', :class => "admin-table-form" do %>
                  <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
                  <%= submit_tag "Resend", :class => "btn" %>
                <% end %>

            <% outgoing_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name == 'body' %>
                    <%= simple_format(truncate(outgoing_message.body, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" ))) %>

<%= simple_format( outgoing_message.body ) %>

                  <% else %>
                    <%= admin_value(value) %>
                  <% end %>

            <% end %>

  <% end %>

Incoming messages

  <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>

        <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="#incoming_messages">
        <%=incoming_message.id%> -- <%= h(incoming_message.mail_from) %> <%=_("at")%> <%=admin_value(incoming_message.sent_at)%>

          <% if !incoming_message.cached_main_body_text_folded.nil? %>
            <%= truncate(incoming_message.cached_main_body_text_folded.gsub('FOLDED_QUOTED_SECTION', ''), :length => 400) %>
          <% end %>

      <div id="incoming_<%=incoming_message.id%>" class="accordion-body collapse">

                <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

            <% incoming_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name =~ /^cached_.*?$/ %>
                    <%= simple_format( truncate(value, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden"))) %>

<%= simple_format(value) %>

                  <% else %>
                    <%= simple_format(value) %>
                  <% end %>

            <% end %>

  <% end %>

Annotations

<% if @info_request.comments.size > 0 %>

    <% for comment in @info_request.comments %>

         <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments">
          <a href="../edit_comment/<%= comment.id %>">
            #<%=comment.id%>
            --
            <%=h(comment.user.name)%>
            <%=admin_value(comment.created_at)%>

            <%= truncate(comment.body, :length => 400) %>

        <div id="comment_<%=comment.id%>" class="accordion-body collapse">

                 By <%= link_to("".html_safe, user_url(comment.user), :title => "view user's page on public website") %>

                  <%= link_to(h(comment.user.name), user_admin_url(comment.user)) %>

              <% comment.for_admin_column do |name, value, type, column_name |%>

                    <%=name%>

                    <% if column_name == 'body' && !comment.visible %>
                      <s><%=h comment.send(column_name) %></s>
                    <% else %>
                      <%=h comment.send(column_name) %>
                    <% end %>

              <% end %>

    <% end %>

<% else %>

None yet.

<% end %>

Exim delivery logs

(Lines containing the request incoming email address, updated hourly.)

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>

<% @title = _("FOI request – {{title}}", :title => h(@info_request.title)) %>

<%=@title%>

<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
  <%= hidden_field_tag 'info_request_id', @info_request.id %>

        <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request">Show metadata

    <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse">

          <% @info_request.for_admin_column do |name, value, type, column_name|%>

                <%= name %>:

                <% if type == 'datetime' %>
                  <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                  (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                <% else %>
                  <%= h value %>
                <% end %>
                <% if column_name == 'described_state' %>

Initial request last sent at: <%= @info_request.calculate_status %>

Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %>

Date response required by: <%= @info_request.date_response_required_by %>

Very overdue after: <%= @info_request.date_very_overdue_after %>

                <% end %>

          <% end %>

              Created by

              <%= link_to("".html_safe, user_url(@info_request.user), :title => "view user's page on public website") %>
              <%= user_admin_link_for_request(@info_request) %>
              <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new user:
                <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to user", :class => "btn btn-info" %>

              Public authority:

              <%= link_to("".html_safe, main_url(public_body_url(@info_request.public_body)), :title => "view authority on public website") %>
              <%= link_to(@info_request.public_body.name, public_body_admin_url(@info_request.public_body)) %>
              <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

                url_name of new authority:
                <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
                <%= submit_tag "Move request to authority", :class => "btn btn-info" %>

              <%=_("Incoming email address")%>

              <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>

              <%=_("Tags")%>

              <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>

<% end %>
<formset class="form-horizontal">
  <legend>Actions</legend>

      Other views of this request

      <%= link_to 'Public page', main_url(request_url(@info_request)), :class => "btn" %>
      <%= link_to 'Edit page', '../edit/' + @info_request.id.to_s, :class => "btn" %>

      FOI officer upload URL

      <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %>

(see also option to general URLs for individual incoming messages below)

  <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>

      Hide the request and notify the user:

        <% if ['hidden', 'requester_only'].include? @info_request.prominence %>

This request has already been hidden

        <% else %>

            <%= radio_button_tag "reason", "not_foi" %> <%= _("Not a valid FOI request") %>

            <%= radio_button_tag "reason", "vexatious" %> <%= _("A vexatious request") %>

        <% end %>

    <% if !['hidden', 'requester_only'].include? @info_request.prominence %>

        Subject of email:

          <%= text_field_tag "subject", "Your request on WhatDoTheyKnow.com hidden", {:id => "request_hidden_user_subject_field", :cols => 100} %>

        Reason for hiding the request (will be emailed to user):

          <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>

        <%= submit_tag _("Hide request"), :class => "btn" %>

    <% end %>
  <% end %>
</formset>

Events

  <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>

        <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="#events">
          <%= _("Event {{id}}", :id => info_request_event.id) %>:

            <%=h info_request_event.event_type.humanize %><% if !info_request_event.calculated_state.nil? %>; state: <%= info_request_event.calculated_state %><% end %>

            <%= info_request_event.created_at%>

      <div id="event_<%=info_request_event.id%>" class="accordion-body collapse">

                <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
                  <% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %>
                    <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
                    <%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
                  <% end %>
                <% end %>

            <% info_request_event.for_admin_column do |name, value, type, column_name| %>

                  <%=h name%>

                  <% if column_name == 'params_yaml' %>
                    <%= info_request_event.params_yaml_as_html %>
                  <% elsif value.nil? %>
                    nil
                  <% elsif %w(text string).include?(type) %>
                    <%=h value.humanize %>
                  <% elsif type == 'datetime' %>
                    <%= admin_date value %>
                  <% else %>
                    <%=h value %>
                  <% end %>

            <% end %>

  <% end %>

Outgoing messages

  <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>

        <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="#outgoing_messages">
        <a href="../edit_outgoing/<%= outgoing_message.id %>">
          #<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %>

          <%= truncate(outgoing_message.body, :length => 400) %>

      <div id="outgoing_<%=outgoing_message.id%>" class="accordion-body collapse">

                <% form_tag '../resend', :class => "admin-table-form" do %>
                  <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
                  <%= submit_tag "Resend", :class => "btn" %>
                <% end %>

            <% outgoing_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name == 'body' %>
                    <%= simple_format(truncate(outgoing_message.body, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" ))) %>

<%= simple_format( outgoing_message.body ) %>

                  <% else %>
                    <%= admin_value(value) %>
                  <% end %>

            <% end %>

  <% end %>

Incoming messages

  <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>

        <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="#incoming_messages">
        <%=incoming_message.id%> -- <%= h(incoming_message.mail_from) %> <%=_("at")%> <%=admin_value(incoming_message.sent_at)%>

          <% if !incoming_message.cached_main_body_text_folded.nil? %>
            <%= truncate(incoming_message.cached_main_body_text_folded.gsub('FOLDED_QUOTED_SECTION', ''), :length => 400) %>
          <% end %>

      <div id="incoming_<%=incoming_message.id%>" class="accordion-body collapse">

                <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

            <% incoming_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name =~ /^cached_.*?$/ %>
                    <%= simple_format( truncate(value, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden"))) %>

<%= simple_format(value) %>

                  <% else %>
                    <%= simple_format(value) %>
                  <% end %>

            <% end %>

  <% end %>

Annotations

<% if @info_request.comments.size > 0 %>

    <% for comment in @info_request.comments %>

         <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments">
          <a href="../edit_comment/<%= comment.id %>">
            #<%=comment.id%>
            --
            <%=h(comment.user.name)%>
            <%=admin_value(comment.created_at)%>

            <%= truncate(comment.body, :length => 400) %>

        <div id="comment_<%=comment.id%>" class="accordion-body collapse">

                 By <%= link_to("".html_safe, user_url(comment.user), :title => "view user's page on public website") %>

                  <%= link_to(h(comment.user.name), user_admin_url(comment.user)) %>

              <% comment.for_admin_column do |name, value, type, column_name |%>

                    <%=name%>

                    <% if column_name == 'body' && !comment.visible %>
                      <s><%=h comment.send(column_name) %></s>
                    <% else %>
                      <%=h comment.send(column_name) %>
                    <% end %>

              <% end %>

    <% end %>

<% else %>

None yet.

<% end %>

Exim delivery logs

(Lines containing the request incoming email address, updated hourly.)

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>


update the guide for the sharing_form

update the guide for the sharing_form

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

The gatekeeper can share with the all visitors right away

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

Or you can request the gatekeepers for their approval

          <% 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 -%>" />
            - All visitors (including anonymous visitors with no login):

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

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

    <% end -%>

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

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

Additional fine-grained sharing permissions

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

              Loading...

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

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

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

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

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

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

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

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

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

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

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

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

                  Step 3

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

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

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

                      Step 3: Choose access rights, review and
                      submit

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

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

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

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

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

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

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

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

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

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

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

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

  <% end %>

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

          <% 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 -%>" />
            - All visitors (including anonymous visitors with no login):

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

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

    <% end -%>

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

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

Additional fine-grained sharing permissions

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

              Loading...

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

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

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

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

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

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

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

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

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

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

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

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

                  Step 3

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

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

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

                      Step 3: Choose access rights, review and
                      submit

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

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

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

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

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

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

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

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

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

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

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

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

  <% end %>


fix grammar error

fix grammar error

This group does not have a public profile.

This group is not have a public profile.


git-svn-id: svn://beonebody.org/onebody/trunk@151 88fc0095-4724-0410-ab6c-c99dba55acc4

Private Message to <%=h @person.name %>

  This will send an email to <%=h @person.name %>.
  Please respect the privacy of others. Abusing this system will get you banned from the site.

<form method="post" id="email">

    Subject:
    <%= text_field_tag :subject, params[:subject] %>

    Message:
    <%= text_area_tag :body, params[:body], :rows => 5 %>

    <%= submit_tag 'Send Message' %>

</form>

Preview

<%= observe_field :subject, :url => {:action => 'preview_message'}, :function => 'preview()', :frequency => 2 %>
<%= observe_field :body, :url => {:action => 'preview_message'}, :function => 'preview()', :frequency => 2 %>
<%= observe_field :share_email, :url => {:action => 'preview_message'}, :function => 'preview()', :frequency => 2 %>

Private Message to <%=h @person.name %>

  This will send an email to <%=h @person.name %>.
  Please respect the privacy of others. Abusing this system will get you banned from the site.

<form method="post" id="email">

    Subject:
    <%= text_field_tag :subject, params[:subject] %>

    Message:
    <%= text_area_tag :body, params[:body], :rows => 5 %>

</form>

Preview

<%= observe_field :subject, :url => {:action => 'preview_message'}, :function => 'preview()', :frequency => 2 %>
<%= observe_field :body, :url => {:action => 'preview_message'}, :function => 'preview()', :frequency => 2 %>
<%= observe_field :share_email, :url => {:action => 'preview_message'}, :function => 'preview()', :frequency => 2 %>


Clean up gracefully after page destroyed

<%= error_messages_for :questionnaire %>
<%= javascript_include_tag "layout.js" %>

<%= render :partial => "toolbar" %>

    Pages

      <%= render :partial => "pagelist", :locals => {:questionnaire => @questionnaire} %>
      <button onClick="createPage();">Create New Page</button>


removed code for checking if survey is assigned

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

Submit or Review work for <%= @student.assignment.name %>

Next: Click the activity you wish to perform on the assignment titled: <%= @student.assignment.name %>

<% if @student.assignment.spec_location && @student.assignment.spec_location.length > 0 %>
  <a href="<%= @student.assignment.spec_location %>" target="new">Assignment Description
<% end %>

	<%if Assignment.find(:all, :conditions => ['id= ?', @student.parent_id])[0].team_assignment == true%>

 <%= link_to 'Your team', :action => 'view_team', :id => @student.id %>
		(View and manage your team)

	<%end%>

	    <% if @can_view_your_work == true %>
			<%= link_to 'Your work', :action => 'submit', :id => @student.id %>
		<% else %>
			Your work
		<% end%>
		<% if @student.assignment.wiki_type_id == 1%>
				(Submit and view feedback)
		<% else %>
		        (View feedback)
		<% end %>

		<% if @can_view_others_work == true %>
			<%= link_to "Others' work",{:controller => 'review', :action => 'list_reviews', :id => @student.parent_id} %>
		<% else %>
			Others' work
		<% end %> (Give feedback to others on their work)

<%= link_to "View scores",{:action => 'view_scores', :id => @student.id} %>

	<% if StudentAssignmentHelper::get_current_stage(@assignment_id) == "Complete" -%>

<%= link_to "Take Survey",{:controller => 'survey_response', :action => 'begin_survey', :id => @assignment_id} %> (This will log you out)

	<% end %>

Submit or Review work for <%= @student.assignment.name %>

Next: Click the activity you wish to perform on the assignment titled: <%= @student.assignment.name %>

<% if @student.assignment.spec_location && @student.assignment.spec_location.length > 0 %>
  <a href="<%= @student.assignment.spec_location %>" target="new">Assignment Description
<% end %>

	<%if Assignment.find(:all, :conditions => ['id= ?', @student.parent_id])[0].team_assignment == true%>

 <%= link_to 'Your team', :action => 'view_team', :id => @student.id %>
		(View and manage your team)

	<%end%>

	    <% if @can_view_your_work == true %>
			<%= link_to 'Your work', :action => 'submit', :id => @student.id %>
		<% else %>
			Your work
		<% end%>
		<% if @student.assignment.wiki_type_id == 1%>
				(Submit and view feedback)
		<% else %>
		        (View feedback)
		<% end %>

		<% if @can_view_others_work == true %>
			<%= link_to "Others' work",{:controller => 'review', :action => 'list_reviews', :id => @student.parent_id} %>
		<% else %>
			Others' work
		<% end %> (Give feedback to others on their work)

<%= link_to "View scores",{:action => 'view_scores', :id => @student.id} %>

	<% if StudentAssignmentHelper::get_current_stage(@assignment_id) == "Complete" && SurveyHelper::is_user_eligible_for_survey?	(@assignment_id, session[:user].id) -%>

<%= link_to "Take Survey",{:controller => 'survey_response', :action => 'begin_survey', :id => @assignment_id} %> (This will log you out)

	<% end %>


Revert previous commit - I don't know what I was thinking

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

<% form_tag(form_action, :id => "article_form", :enctype => "multipart/form-data") do %>

  <%= render :partial => "form" %>

  <%= save("Save this article") %> or <%= cancel %>

<% end %>

<%= observe_form "article_form",
      :frequency => 2,
      :with => 'value',
      :complete => "$('preview').src = request.responseText; Element.show('preview');",
      :url => { :action => "preview" } %>

<% form_tag(form_action, :id => article_form, :enctype => "multipart/form-data") do %>

  <%= render :partial => "form" %>

  <%= save("Save this article") %> or <%= cancel %>

<% end %>

<%= observe_form "article_form",
      :frequency => 2,
      :with => 'value',
      :complete => "$('preview').src = request.responseText; Element.show('preview');",
      :url => { :action => "preview" } %>


updated credits

updated credits

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

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="description" content="Compani.es - The alternative Open Companies House"/>
    <meta name="keywords" content="twitter,search,realtime"/>
    <title>Compani.es Open House</title>
    <%= stylesheet_link_tag("application") %>
    <%= javascript_include_tag("jquery-1.3.2.min", "application") %>
      <%= yield :head %>

                <%= link_to(image_tag('coh.png'), '/') %>
                Always Open 24/7 (unlike companies house)

                         <%= yield %>

                           <%= image_tag('logo/rs_bigger.png') %>

This service was constructed as part of the Rewired State Hackday.
 See <%= link_to('Rewired State','http://rewiredstate.org/') %> for details of the event.

                            Credits:
                            @delineator
                            @grahamashton
                            @jamespjh
                            @martinbtt
                            @metade

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

		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta name="description" content="Compani.es - The alternative Open Companies House"/>
		<meta name="keywords" content="twitter,search,realtime"/>
		<title>Compani.es Open House</title>
		<%= stylesheet_link_tag("application") %>
		<%= javascript_include_tag("jquery-1.3.2.min", "application") %>
	    <%= yield :head %>

					      <%= link_to(image_tag('coh.png'), '/') %>
					      Always Open 24/7 (unlike companies house)

                         <%= yield %>

                           <%= image_tag('logo/rs_bigger.png') %>

This service was constructed as part of the Rewired State Hackday.
 See <%= link_to('Rewired State','http://rewiredstate.org/') %> for details of the event.

														Credits:
														@delineator
														Graham Ashton
														@jamespjh
														@martinbtt
														@metade


working hours filter: submit form on Enter key in begin/end date

<%=l(:label_working_hours)%>

<% form_tag({ :action => 'index' }, :id => 'query_form') do %>
<fieldset><legend><%= l(:label_filter_plural) %></legend>
  Begin: <%= text_field_tag :begindate, params[:begindate], :size => 10, :onkeyup => "applyOnEnter(event)" %><%= calendar_for('begindate') %>
  End: <%= text_field_tag :enddate, params[:enddate], :size => 10, :onkeyup => "applyOnEnter(event)" %><%= calendar_for('enddate') %>
  <%= l(:field_project) %>: <%= select_tag "filter[project_id]", "<option value=\"\">#{l(:label_all)}</option>" + options_from_collection_for_select(User.current.projects, :id, :name, params[:filter][:project_id].to_s.to_i) %>

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

</fieldset>

<%= javascript_tag "function applyOnEnter(ev)
{
  if (ev.keyCode == 13)
  {
    $('query_form').submit();
  }
}"%>

<%= observe_field 'filter[project_id]', :update => 'issues_list', :url => {:action => 'update_issues'}, :with => "'change_project_id=' + encodeURIComponent(value)" %>

    <%= link_to_function l(:button_apply), "$('query_form').submit()", :class => 'icon icon-checked' %>

    <%= link_to l(:button_clear), {}, :class => 'icon icon-reload'  %>

    <%= link_to l(:label_export_to)+' CSV', {:overwrite_params => { :export => 'csv' }}, :class => 'icon icon-csv' %>
    <%= link_to 'iCalendar', {:overwrite_params => { :export => 'ics', :key => User.current.rss_key }}, :class => 'icon icon-ics' %>

<% end %>

<% if @working_hours.empty? %>

<%= l(:label_no_data) %>

<% else %>
<%= render :partial => 'working_hours/list', :locals => {:working_hours => @working_hours} %>
<% end %>

<%=l(:label_working_hours)%>

<% form_tag({ :action => 'index' }, :id => 'query_form') do %>
<fieldset><legend><%= l(:label_filter_plural) %></legend>
  Begin: <%= text_field_tag :begindate, params[:begindate], :size => 10 %><%= calendar_for('begindate') %>
  End: <%= text_field_tag :enddate, params[:enddate], :size => 10 %><%= calendar_for('enddate') %>
  <%= l(:field_project) %>: <%= select_tag "filter[project_id]", "<option value=\"\">#{l(:label_all)}</option>" + options_from_collection_for_select(User.current.projects, :id, :name, params[:filter][:project_id].to_s.to_i) %>

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

</fieldset>

<%= observe_field 'filter[project_id]', :update => 'issues_list', :url => {:action => 'update_issues'}, :with => "'change_project_id=' + encodeURIComponent(value)" %>

    <%= link_to_function l(:button_apply), "$('query_form').submit()", :class => 'icon icon-checked' %>

    <%= link_to l(:button_clear), {}, :class => 'icon icon-reload'  %>

    <%= link_to l(:label_export_to)+' CSV', {:overwrite_params => { :export => 'csv' }}, :class => 'icon icon-csv' %>
    <%= link_to 'iCalendar', {:overwrite_params => { :export => 'ics', :key => User.current.rss_key }}, :class => 'icon icon-ics' %>

<% end %>

<% if @working_hours.empty? %>

<%= l(:label_no_data) %>

<% else %>
<%= render :partial => 'working_hours/list', :locals => {:working_hours => @working_hours} %>
<% end %>


Removed @page.pager.count from _("Found"). The span is updated by delete/create rjs.

git-svn-id: b2ff2946fad280430023ee7ead77858f96a610fa@350 561dde7e-7729-0410-be8e-ef83869d6c7d

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

      <td colspan="<%= active_scaffold_config.list.columns.length + 1 -%>" class="messages-container">
        <div id="<%= active_scaffold_messages_id -%>">
          <%= render :partial => 'messages' %>

        <p id="<%= empty_message_id %>" class="empty-message" <%= ' style="display:none;" ' unless @page.items.empty? %>>
          <%= as_('No Entries') %>

  <tbody class="records" id="<%= active_scaffold_tbody_id %>">
    <% if !@records.empty? -%>
      <%= render :partial => 'list_record', :collection => @page.items, :locals => { :hidden => false } %>
      <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} -%>
        <%= render :partial => 'list_calculations' %>
      <% end -%>
    <% end -%>

    <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } unless @page.pager.number_of_pages == 1 %>

  <%= @page.pager.count -%> <%=as_('Found') %>

<%# a hack for the Rico Corner problem %>

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

      <td colspan="<%= active_scaffold_config.list.columns.length + 1 -%>" class="messages-container">
        <div id="<%= active_scaffold_messages_id -%>">
          <%= render :partial => 'messages' %>

        <p id="<%= empty_message_id %>" class="empty-message" <%= ' style="display:none;" ' unless @page.items.empty? %>>
          <%= as_('No Entries') %>

  <tbody class="records" id="<%= active_scaffold_tbody_id %>">
    <% if !@records.empty? -%>
      <%= render :partial => 'list_record', :collection => @page.items, :locals => { :hidden => false } %>
      <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} -%>
        <%= render :partial => 'list_calculations' %>
      <% end -%>
    <% end -%>

    <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } unless @page.pager.number_of_pages == 1 %>

  <%= @page.pager.count -%> <%=as_('Found') % @page.pager.count %>

<%# a hack for the Rico Corner problem %>


dont need to escape titles in mini event calendar anymore

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

<%=
calendar({:year => @date.year, :month => @date.month}) do |d|
  cell_text = "#{d.mday}"
  cell_attrs = { :class => 'day ' }
  cell_attrs[:class] += 'todayDay ' if (d.to_date == TzTime.now.to_date)
  @events.each do |e|
    if e.date.to_date == d
      cell_text = "#{ link_to d.mday, events_path, :id => 'cal-' + d.to_date.to_s, :rel => e.title }"
      cell_attrs[:class] += 'specialDay '
    end
  end
  [cell_text, cell_attrs]
end
%>

<script type="text/javascript">
Event.observe(window, 'load', function(){
  $$('a').each(function(element){
    if(element.rel != '') new Tip(element, element.rel, {delay: '0'});
  });
});
</script>

<%=
calendar({:year => @date.year, :month => @date.month}) do |d|
  cell_text = "#{d.mday}"
  cell_attrs = { :class => 'day ' }
  cell_attrs[:class] += 'todayDay ' if (d.to_date == TzTime.now.to_date)
  @events.each do |e|
    if e.date.to_date == d
      cell_text = "#{ link_to d.mday, events_path, :id => 'cal-' + d.to_date.to_s, :rel => escape_single_quotes(e.title) }"
      cell_attrs[:class] += 'specialDay '
    end
  end
  [cell_text, cell_attrs]
end
%>

<script type="text/javascript">
Event.observe(window, 'load', function(){
  $$('a').each(function(element){
    if(element.rel != '') new Tip(element, element.rel, {delay: '0'});
  });
});
</script>


Make sure the diary tab always links to the global diary rather than a specific user's diary. Closes #956.


grey instead of dotted line

grey instead of dotted line

<%
=begin
  jrochkind's alternative partial for displaying holdings. Displays more
  information to deal with the more information we need to display from
  our Horizon. In tabular format. Customized for JH's needs, but should
  be usable by anyone.
=end
%>

<%= ServiceTypeValue[:holding].display_name_pluralize.titleize %>

<% holdings = get_service_type('holding') %>

<%
holdings.each do |p|
  target = p.view_data
%>

<%= target[:collection_str] %>

      <%= link_to (target[:call_number] || 'catalog'), {:controller=>"link_router", :id=>p.id}, "target"=>"_blank" %>

      <% status_class = (target[:status] == "Not Charged" or target[:status] == "Available") ? 'available' : '' %>

      <%= target[:copy_str] %>
      <span class="<%= status_class %>"><%= target[:status]   %>

  <% unless target[:notes].blank? %>

<%= target[:notes] %>

  <% end %>

  <% unless target[:coverage_str].blank? %>

          <%
          # Only show first 5, with a 'more' link to make others visible if neccesary.
          hidden_div_id = "copies_#{p.id}"
          target[:coverage_str_array].each_index do |index|
              break if (index >= 5 &&
                        params['umlaut.holding_expand_all'] != 'true')
              s = target[:coverage_str_array][index]%>

<%= s %>

          <% end %>
          <% if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>

 <%= link_to_function("More...",
                     "Element.toggle('#{hidden_div_id}'); Element.update(this, 'Show/Hide...')",
                     :href => url_for( params.merge({ :'umlaut.holding_expand_all' => 'true'}))) %>

          <% end %>

          <% # okay, the rest in a hidden div, if more than 5
             if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>
          <div id=<%= hidden_div_id %> style="display:none; ">

            <% 5.upto( target[:coverage_str_array].length + 1) do |index| %>

<%= target[:coverage_str_array][index] %>

            <% end   %>

          <% end %>

  <% end %>
<%
end %>

<%
if holdings.empty?
   searches = get_service_type('holding_search')
    searches.each do | result_st |
      response = result_st.view_data %>

<%= link_to response[:display_text], {:controller=>'link_router', :id=>result_st.id}, 'target'=>"_blank" %>

<%
   end
end
if (holdings.blank? && searches.blank? && ! service_types_in_progress?(['holding', 'holding_search']))
%>

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

<%    session[:coins].each { | coins |
        unless coins[:text]
          label = image_tag(coins[:icon], :border=>0)
        else
          label = coins[:text]
        end
    %>

<a href="<%= coins[:host]%>?<%= @user_request.referent.to_context_object.kev %>" target="_blank"><%= label %>

    <%}%>

<%   end
%>
<% if service_types_in_progress?(['holding', 'holding_search']) %>

<%= render(:partial => "background_progress", :locals => { :svc_types => [ServiceTypeValue[:holding],ServiceTypeValue[:holding_search]], :current_set_empty => holdings.empty? } ) %>

<% end %>


Little writing mistake

Little writing mistake

<div class="common-profile-list-block"
     help="<%= _('Here are all %s\'s members.') % profile.name %>">

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

  <% @members.each do |member| %>
    <%= profile_image_link(member) %>
  <% end %>

<% button_bar do %>
  <%= button :back, _('Go back'), { :controller => 'profile' }, :help => _('Back to the page where you come from.') %>
  <% if profile.community? and user and user.has_permission?(:invite_members, profile) %>
    <%= button :search, _('Invite your friends to join %s') % profile.name, :controller => 'invite', :action => 'friends' %>
  <% end %>
<% end %>

<div class="common-profile-list-block"
     help="<%= _('Here are all %s\'s members.') % profile.name %>">

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

  <% @members.each do |member| %>
    <%= profile_image_link(member) %>
  <% end %>

<% button_bar do %>
  <%= button :back, _('Go back'), { :controller => 'profile' }, :help => _('Back to the page where you come from.') %>
  <% if profile.community? and user and user.has_permission?(:invite_members, profile) %>
    <%= button :search, _('Invite your friends to join %s') % profile.name, :controller => 'invite', :action => 'friends' %>
  <% end %>
<% end %>