Change lead in frontpage

Change lead in frontpage

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

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

1

2

3

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

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

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

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

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

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

Entrada en vigor de la ley de transparencia en Navarra

El 28 de diciembre entra en vigor la Ley Foral de Transparencia y Gobierno Abierto de Navarra, la primera ley de transparencia que se aprueba en España, único país de la Unión Europea que, junto a Malta y Chipre, aún no ha promulgado una norma semejante.

    			<form action="http://tuderechoasaber.us4.list-manage.com/subscribe/post?u=9416fe6b76f2c3f985c1f8e0f&id=36f187e6e2" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank">

¿Quieres estar informado de todas las novedades? Suscríbete a nuestro boletín:

<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="dirección de correo" required="true" style="width:90%">

<input type="submit" value="Suscríbeme" name="subscribe" id="mc-embedded-subscribe" style="border-color:silver">

    			</form>

Twittear

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

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

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

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

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

<%= h excerpt(item['description'].to_s, "", 200) %>

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

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

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

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

<% end %>

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

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

1

2

3

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

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

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

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

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

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

Ultimatum para la transparencia

El Proyecto de Ley de Transparencia está en manos de los diputados. Tienen hasta el 9 de octubre para hacer enmiendas. Lee las mejoras propuestas por la Coalición Pro Acceso.

    			<form action="http://tuderechoasaber.us4.list-manage.com/subscribe/post?u=9416fe6b76f2c3f985c1f8e0f&id=36f187e6e2" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank">

¿Quieres estar informado de todas las novedades? Suscríbete a nuestro boletín:

<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="dirección de correo" required="true" style="width:90%">

<input type="submit" value="Suscríbeme" name="subscribe" id="mc-embedded-subscribe" style="border-color:silver">

    			</form>

Twittear

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

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

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

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

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

<%= h excerpt(item['description'].to_s, "", 200) %>

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

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

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

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

<% end %>


Adjust 100 days counter

Adjust 100 days counter

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

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

1

2

3

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

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

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

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

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

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

<%= _("Cuenta atrás por la transparencia en España") %>

<%= _("Quedan  días para que el PP cumpla su promesa de presentar una ley de acceso a la información") %>

Twittear

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

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

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

              <% end %>

<%= _("Novedades") %>

Duis autem vel eum iriure dolor in hendret in vulputate velit esse molese consequat.

Vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio eros et accumsan et iusto odio dignissim...

Leer más

Duis autem vel eum iriure dolor in hendret in vulputate velit esse molese consequat.

Vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio eros et accumsan et iusto odio dignissim...

Leer más

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

Duis autem vel eum iriure dolor in hendret in velit esse molese consequat...

24

Personas siguiendo esta petición

También quiero saber

Duis autem vel eum iriure dolor in hendret in velit esse molese consequat...

24

Personas siguiendo esta petición

También quiero saber

<% end %>


Fix in cache duration for newer versions of memcached

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

You have the right to ask European Union bodies for information,

        they are legally obliged to respond

About
AsktheEU.org

Find out who we are
and how this website works

            <%= link_to _('More'), help_about_url %>

Make
Your Request

Ask a European Union body for information. (You will be asked to sign up/sign in first.)

            <%= link_to _("Request"), select_authority_url %>

Search
Requests

See what others are
 asking and the answers they are getting.

            <%= link_to _("Search"), request_list_successful_url %>

<%= link_to "EU institutions", body_index_path %>

                <a href="<%= body_index_path %>">

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

Follow us

Video

<a href="<%= blog_url %>">News

            <% for item in @blog_items[0..2]: %>

<%= simple_date(Time.parse(item['pubDate'][0])) %>

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

            <% end %>

<a href="<%= blog_url %>">View all news

<% end %>

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

You have the right to ask European Union bodies for information,

        they are legally obliged to respond

About
AsktheEU.org

Find out who we are
and how this website works

            <%= link_to _('More'), help_about_url %>

Make
Your Request

Ask a European Union body for information. (You will be asked to sign up/sign in first.)

            <%= link_to _("Request"), select_authority_url %>

Search
Requests

See what others are
 asking and the answers they are getting.

            <%= link_to _("Search"), request_list_successful_url %>

<%= link_to "EU institutions", body_index_path %>

                <a href="<%= body_index_path %>">

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

Follow us

Video

<a href="<%= blog_url %>">News

            <% for item in @blog_items[0..2]: %>

<%= simple_date(Time.parse(item['pubDate'][0])) %>

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

            <% end %>

<a href="<%= blog_url %>">View all news

<% end %>


add title to pdf attachment

add title to pdf attachment

	<% attachments.each do |attachment| %>

<%= link_to_attachment attachment, :class => "icon icon-attachment" -%>
		<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
		  (<%= number_to_human_size attachment.filesize %>)

			<% if( attachment.filename =~ /.pdf$/i )  %>
				<%= link_to image_tag('preview.png', :plugin => 'redmine_lightbox'), {:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }, :class => "pdf", :rel => 'attachments', :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" -%>
			<% end -%>

		  <% if options[:deletable] %>
		    <%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'destroy', :id => attachment},
		                                         :confirm => l(:text_are_you_sure),
		                                         :method => :post,
		                                         :class => "delete",
		                                         :title => l(:button_delete) %>
		  <% end %>

		  <% if options[:author] %>
		    <%= attachment.author %>, <%= format_time(attachment.created_on) %>
		  <% end %>

	<% end %>

<% images = attachments.select { |a| a.image? } %>

<% unless images.empty? %>

		<% images.each do |attachment| %>
			<%= link_to image_tag(url_for({:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }), :width => '180'),
			{:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }, :class => 'lightbox', :rel => 'attachments', :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" %>
		<% end -%>

<% end -%>

	<% attachments.each do |attachment| %>

<%= link_to_attachment attachment, :class => "icon icon-attachment" -%>
		<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
		  (<%= number_to_human_size attachment.filesize %>)

			<% if( attachment.filename =~ /.pdf$/i )  %>
				<%= link_to image_tag('preview.png', :plugin => 'redmine_lightbox'), {:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }, :class => "pdf" -%>
			<% end -%>

		  <% if options[:deletable] %>
		    <%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'destroy', :id => attachment},
		                                         :confirm => l(:text_are_you_sure),
		                                         :method => :post,
		                                         :class => "delete",
		                                         :title => l(:button_delete) %>
		  <% end %>

		  <% if options[:author] %>
		    <%= attachment.author %>, <%= format_time(attachment.created_on) %>
		  <% end %>

	<% end %>

<% images = attachments.select { |a| a.image? } %>

<% unless images.empty? %>

		<% images.each do |attachment| %>
			<%= link_to image_tag(url_for({:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }), :width => '180'),
			{:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }, :class => 'lightbox', :rel => 'attachments', :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" %>
		<% end -%>

<% end -%>


fixed bug where the last edited item's background wasn't being cleared

<script>
lastEdited = null;

function editing(el) {
  el.classNameOrig = el.className;
  el.className += ' event_group_editing';

  if (lastEdited != null) {
    lastEdited.className = lastEdited.classNameOrig;
  }
  lastEdited = el;
}
</script>

<% if @user.is_projects_coordinator? %>
  <%= link_to_remote node.to_s, {
       :update => 'create',
       :url => edit_event_group_url(node.id),
       :method => :get,
       :loading => "$('loading').show();",
       :complete => "$('loading').hide(); editing($('link_#{node.id}'));"
      }, {
       :id => "link_#{node.id}",
       :class => node.classes
      }
   %>
<% else %>
  <%= node.to_s %>
<% end %>

<% if @user.is_projects_coordinator? %>
  <%= link_to_remote node.to_s, {
       :update => 'create',
       :url => edit_event_group_url(node.id),
       :method => :get,
       :loading => "$('loading').show();",
       :complete => "$('loading').hide(); $('link_#{node.id}').className += ' event_group_editing';"
      }, {
       :id => "link_#{node.id}",
       :class => node.classes
      }
   %>
<% else %>
  <%= node.to_s %>
<% end %>


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

Assign Reviewers for <%= @assignment.name %>

<%= start_form_tag ({:action => 'save_reviewer_mappings'}, {:method => 'post' }) %>

Number of reviews done by a student: <%= text_field 'assignment', 'num_reviews', "size" => 1 %>
Number of reviews of reviews done by a student: <%= text_field 'assignment', 'num_review_of_reviews', "size" => 1 %>

<%due_date = DueDate.find(:all,:conditions => ["assignment_id = ?",@assignment.id], :order => "round DESC", :limit =>1)
@round = 1
puts "assignment id", @assignment.id
if (due_date[0] && !due_date[0].round.nil?)
    puts "am in"
    @round = due_date[0].round - 1
else
    @round = 1
end
puts "rounddue date ",@round%>

Reviewer assignments vary for different rounds
<%= check_box('assign_reviewers','different_mapping',{:onclick =>
"Element.toggle('temp_bar'); "}, 1, nil)%>

<%for i in 1..@round%>

Round<%=i%>

Review strategy:
    <%= select("selection", "r_#{i}", @review_strategies.collect {|r| [r.name, r.id ] }) %>

    Mapping strategy:
    <%= select("selection", "m_#{i}", @mapping_strategies.collect {|m| [m.name, m.id ] }) %>

<%end%>

<%= hidden_field_tag 'assignment_id', @assignment.id %>
<input type='submit' value= 'Save' />
<%= end_form_tag %>

Assign Reviewers for <%= @assignment.name %>

<%= start_form_tag ({:action => 'save_reviewer_mappings'}, {:method => 'post' }) %>

Number of reviews done by a student: <%= text_field 'assignment', 'num_reviews', "size" => 1 %>
Number of reviews of reviews done by a student: <%= text_field 'assignment', 'num_review_of_reviews', "size" => 1 %>

Review strategy: <%= collection_select 'assignment', 'review_strategy_id', @review_strategies, :id, :name %>
Mapping strategy: <%= collection_select 'assignment', 'mapping_strategy_id', @mapping_strategies, :id, :name %>

<%= hidden_field_tag 'assignment_id', @assignment.id %>
<input type='submit' value= 'Save' />
<%= end_form_tag %>

<%
  session[:return_to] = request.request_uri
  session[:expected_fields] = 'Author, Reviewer1, Reviewer2, ... , ReviewerN'
  session[:assignment_id] = @assignment.id
%>
<%= link_to 'Import Reviewer Mappings', :controller=>'import_file', :action=>'start', :import_type => 'Review Mappings' %>

<%= link_to 'Back', :action => 'list' %>


small tweak to the inbox list

small tweak to the inbox list

git-svn-id: 035394e0ea20290a56a73539b1ebfcd8236adefd@866 7bd17f4f-1217-0410-bbc5-bc4367116c30

<% if @events.size > 0 %>

			Type
			<%= sort_header(:title => 'Subject',       :name => 'subject',    :url => { :controller => 'events', :action => 'list' }) %>
			<%= sort_header(:title => 'Date Received', :name => 'created_at', :url => { :controller => 'events', :action => 'list' }) %>
			Actions

	<% @events.each do |e| -%>
  		<% row_class =  cycle("even", "odd") %>
  		<%= render :partial=>'events/detail_row', :locals=>{:message=>e, :row_class=>row_class}%>
	<% end -%>

<% else -%>
	<% c = display_as_round_box do -%>
	Your inbox is empty.
	<% end -%>
  <%= c %>
<% end -%>

<% if @events.size > 0 %>

			Type
			<%= sort_header(:title => 'Subject',       :name => 'subject',    :url => { :controller => 'events', :action => 'list' }) %>
			<%= sort_header(:title => 'Date Received', :name => 'created_at', :url => { :controller => 'events', :action => 'list' }) %>
			Actions

	<% @events.each do |e| -%>
  		<% row_class =  cycle("even", "odd") %>
  		<%= render :partial=>'events/detail_row', :locals=>{:message=>e, :row_class=>row_class}%>
	<% end -%>

<% else -%>
	<% flash[:notice] = "No messages in your Inbox." -%>
<% end -%>


fixed id of minute issue.

fixed id of minute issue.

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Minutes", :property => nil} -%>

    Id
    Event
    Author
    Created on
    <%= "Published" if @current_user-%>

<% for minute in @minutes %>

    <%= minute.id -%>
    <%= link_to "Minutes for " + minute.event.title, :controller => 'minutes', :action => 'show', :id => minute-%>
    <%= link_to minute.author.fullname, :controller => 'people', :action => 'show', :id => minute.author -%>
    <%= minute.created_at.strftime("%d %b, %Y")-%>
    <%= (minute.published == true ? 'Yes' : 'No') if @current_user-%>

    <%= link_to('Edit', :action => 'edit', :id => minute) if @current_user -%>
    <%= link_to('Delete', { :action => 'destroy', :id => minute }, :confirm => 'Are you sure?', :method => :post) if @current_user -%>

<%= truncate(minute.body, 100) -%>

<% end %>

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

<%= link_to 'New minute', :action => 'new' if @current_user%>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => 'layouts/categories_nav' -%>
<%end-%>

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Minutes", :property => nil} -%>

    Id
    Event
    Author
    Created on
    <%= "Published" if @current_user-%>

<% for minute in @minutes %>

    <%= minute.id -%>
    <%= link_to "Minutes for " + minute.event.title, :controller => 'minutes', :action => 'show', :id => minute.event-%>
    <%= link_to minute.author.fullname, :controller => 'people', :action => 'show', :id => minute.author -%>
    <%= minute.created_at.strftime("%d %b, %Y")-%>
    <%= (minute.published == true ? 'Yes' : 'No') if @current_user-%>

    <%= link_to('Edit', :action => 'edit', :id => minute) if @current_user -%>
    <%= link_to('Delete', { :action => 'destroy', :id => minute }, :confirm => 'Are you sure?', :method => :post) if @current_user -%>

<%= truncate(minute.body, 100) -%>

<% end %>

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

<%= link_to 'New minute', :action => 'new' if @current_user%>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => 'layouts/categories_nav' -%>
<%end-%>


fix an error

fix an error

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

  <% @page_heading = _('Manage Resources') %>
  <% @page_title = _('Upload a new File') %>
  <% content_for('tasks') do %>
    <%= task_new _('Upload a new Resource') %>
	<%= tab _("Manage Articles"), :controller=>"content", :action=>"list"%>
	<%= tab _("Manage Pages"), :controller=>"pages", :action=>"list" %>
	<%= tab _("Manage Categories"), :controller=>"categories", :action=>"list" %>
	<%= tab _("Manage Text Filters"), :controller=>"textfilters", :action=>"list" %>
  <% end %>

  <div class="list" id="resources">
    <%= render :partial => 'resources' -%>
  </div>

  <% @page_heading = _('Manage Resources') %>
  <% @page_title = _('Upload a new File') %>
  <% content_for('tasks') do %>
    <%= task_new _('Upload a new Resource') %>
	<%= tab -("Manage Articles"), :controller=>"content", :action=>"list" %>
	<%= tab _("Manage Pages"), :controller=>"pages", :action=>"list" %>
	<%= tab _("Manage Categories"), :controller=>"categories", :action=>"list" %>
	<%= tab _("Manage Text Filters"), :controller=>"textfilters", :action=>"list" %>
  <% end %>

  <div class="list" id="resources">
    <%= render :partial => 'resources' -%>
  </div>


Adde link to results page when viewing admin results

git-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@731 2d86388d-c40f-0410-ad6a-a69da6a65d20

<table class="base" style="width: 100%;" id="racer_<%= racer.id %>">

<%= racer.name %> <%= [racer.team.blank? ? nil : racer.team.name, racer.city, racer.racing_age].compact.join(', ') %>

		<table id="results_<%= racer.id %>">

				Race
				Category
				Date
				Pts

			<%- for result in results.sort {|x, y| y.race.standings.event.date <=> x.race.standings.event.date} -%>
			<tr class="<%= cycle("even", "odd") %>" id="result_<%= result.id %>">
			  <%=
				link_to_function(image_tag('icons/collapsed.gif', :class => "collapsed", :id => "disclosure_#{result.id}"),
				"toggle_disclosure(#{result.id})",
				:class => 'disclosure') if result.competition_result? %>
			  <%= result.place %>
			  <%= link_to(image_tag('/images/icons/web_page.gif',
					:title => 'View public results web page', :alt => 'View public results web page'),
					 :controller => '/results', :action => 'event', :year => result.race.standings.event.date.year,
					 :discipline => result.race.standings.event.discipline, :id => result.race.standings.event.id) %>

			  <%= result.race.standings.name %>
			  <%= result.race.name %>
			  <%= result.race.standings.event.date.strftime("%D") %>
			  <%= number_with_precision(result.points, 1) if result.points > 0%>

			<%= draggable_element("result_#{result.id}", :revert => true, :ghosting => true, :scroll => 'window') unless result.competition_result? -%>
			<%- end -%>

			<%- if results.empty? -%>

			  No results

			<%- end -%>

<%= drop_receiving_element(
	"racer_#{racer.id}",
	:onDrop => 'function(dragged, dropped){dropped_result(dragged, dropped)}')
%>

<table class="base" style="width: 100%;" id="racer_<%= racer.id %>">

<%= racer.name %> <%= [racer.team.blank? ? nil : racer.team.name, racer.city, racer.racing_age].compact.join(', ') %>

		<table id="results_<%= racer.id %>">

				Race
				Category
				Date
				Pts

			<%- for result in results.sort {|x, y| y.race.standings.event.date <=> x.race.standings.event.date} -%>
			<tr class="<%= cycle("even", "odd") %>" id="result_<%= result.id %>">
			  <%=
				link_to_function(image_tag('icons/collapsed.gif', :class => "collapsed", :id => "disclosure_#{result.id}"),
				"toggle_disclosure(#{result.id})",
				:class => 'disclosure') if result.competition_result? %>
			  <%= result.place %>
			  <%= result.race.standings.name %>
			  <%= result.race.name %>
			  <%= result.race.standings.event.date.strftime("%D") %>
			  <%= number_with_precision(result.points, 1) if result.points > 0%>

			<%= draggable_element("result_#{result.id}", :revert => true, :ghosting => true, :scroll => 'window') unless result.competition_result? -%>
			<%- end -%>

			<%- if results.empty? -%>

			  No results

			<%- end -%>

<%= drop_receiving_element(
	"racer_#{racer.id}",
	:onDrop => 'function(dragged, dropped){dropped_result(dragged, dropped)}')
%>


access type dropdown for public defaults to accessible

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

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

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

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

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

          You may:

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

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

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

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

          <% end %>
          <% if !disable_advanced_view%>

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

          <% end %>

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

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

Or share it with..

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

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

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

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

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

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

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

Additional fine-grained sharing permissions

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

              Loading...

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

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

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

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

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

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

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

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

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

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

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

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

                  Step 3

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

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

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

                      Step 3: Choose access rights, review and
                      submit

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

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

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

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

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

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

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

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

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

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

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

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

  <% end %>

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

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

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

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

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

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

          You may:

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

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

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

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

          <% end %>
          <% if !disable_advanced_view%>

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

          <% end %>

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

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

Or share it with..

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

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

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

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

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

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

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

Additional fine-grained sharing permissions

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

              Loading...

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

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

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

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

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

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

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

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

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

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

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

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

                  Step 3

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

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

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

                      Step 3: Choose access rights, review and
                      submit

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

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

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

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

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

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

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

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

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

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

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

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

  <% end %>

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


Status more important than variety methinks.

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

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

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Advanced tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby.nil?, "Show most relevant results first", search_url(@query, nil) %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

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

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. <%=search_link('climbing lane')%>

Use OR (in capital letters) where you don't mind which word,  e.g. <%=search_link('commons OR lords')%>

Use quotes when you want to find an exact phrase, e.g. <%=search_link('"Liverpool City Council"')%>

status: to select based on the status or historical status of the request, see the table of statuses below.

variety: to select type of thing to search for, see the table of varieties below.

<%=search_link('requested_from:home_office')%> to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

<%=search_link('requested_by:julian_todd')%> to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

<%=search_link('commented_by:tony_bowden')%> to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

<%=search_link('filetype:pdf')%> to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type <%=search_link('01/01/2008..14/01/2008')%> to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

Table of statuses

<%=search_link('status:waiting_response')%>	 Waiting for the public authority to reply

<%=search_link('status:not_held')%>	 The public authority does not have the information requested

<%=search_link('status:rejected')%>	 The request was rejected by the public authority

<%=search_link('status:partially_successful')%>	 Some of the information requested has been received

<%=search_link('status:successful')%>	 All of the information requested has been received

<%=search_link('status:waiting_clarification')%>	 The public authority would like part of the request explained

<%=search_link('status:gone_postal')%>	 The public authority would like to / has responded by post

<%=search_link('status:internal_review')%>	 Waiting for the public authority to complete an internal review of their handling of the request

<%=search_link('status:requires_admin')%>	 A strange reponse, required attention by the WhatDoTheyKnow team

Table of varieties

<%=search_link('variety:sent')%>	 Original request sent

<%=search_link('variety:followup_sent')%>	 Follow up message sent by requester

<%=search_link('variety:response')%>	 Response from a public authority

<%=search_link('variety:comment')%>	 Annotation added to request

<%=search_link('variety:authority')%>	 A public authority

<%=search_link('variety:user')%>	 A WhatDoTheyKnow user

<% end %>

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

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

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Advanced tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby.nil?, "Show most relevant results first", search_url(@query, nil) %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

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

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. <%=search_link('climbing lane')%>

Use OR (in capital letters) where you don't mind which word,  e.g. <%=search_link('commons OR lords')%>

Use quotes when you want to find an exact phrase, e.g. <%=search_link('"Liverpool City Council"')%>

variety: to select type of thing to search for, see the table of varieties below.

status: to select based on the status or historical status of the request, see the table of statuses below.

<%=search_link('requested_from:home_office')%> to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

<%=search_link('requested_by:julian_todd')%> to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

<%=search_link('commented_by:tony_bowden')%> to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

<%=search_link('filetype:pdf')%> to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type <%=search_link('01/01/2008..14/01/2008')%> to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

Table of varieties

<%=search_link('variety:sent')%>	 Original request sent

<%=search_link('variety:followup_sent')%>	 Follow up message sent by requester

<%=search_link('variety:response')%>	 Response from a public authority

<%=search_link('variety:comment')%>	 Annotation added to request

<%=search_link('variety:authority')%>	 A public authority

<%=search_link('variety:user')%>	 A WhatDoTheyKnow user

Table of statuses

<%=search_link('status:waiting_response')%>	 Waiting for the public authority to reply

<%=search_link('status:not_held')%>	 The public authority does not have the information requested

<%=search_link('status:rejected')%>	 The request was rejected by the public authority

<%=search_link('status:partially_successful')%>	 Some of the information requested has been received

<%=search_link('status:successful')%>	 All of the information requested has been received

<%=search_link('status:waiting_clarification')%>	 The public authority would like part of the request explained

<%=search_link('status:gone_postal')%>	 The public authority would like to / has responded by post

<%=search_link('status:internal_review')%>	 Waiting for the public authority to complete an internal review of their handling of the request

<%=search_link('status:requires_admin')%>	 A strange reponse, required attention by the WhatDoTheyKnow team

<% end %>


update link URLs

update link URLs

Welcome to Thoth!

  Version <%= h(Thoth::APP_VERSION) %>

Getting Started

    Use the icons in the admin toolbar above to create new blog posts and pages.
    To edit an existing blog post or page, simply browse to it and an edit icon
    will appear in the toolbar.

    When you want to login again in the future, you can either return to
    <a href="<%= Rs() %>">this page or use the keyboard shortcut
    Ctrl+Alt+A to login quickly from any Thoth URL.

Customizing Thoth

    Tired of the default template and want to design your own? Just fire up your
    favorite text editor and open up these directories:

Default Templates

<%= @template_root %>

Default CSS, JS, etc.

<%= @public_root %>

Custom Templates

<%= Thoth::Config.theme.view %>

Custom CSS, JS, etc.

<%= Thoth::Config.theme.public %>

    To customize your blog, find the default template or static resource you
    want to change and copy it to the corresponding custom directory, then make
    your changes to the copy. Thoth looks for a customized file first, then
    loads the default file if no customized version is found.

    You'll need to know some XHTML and CSS (and a wee touch of Ruby wouldn't
    hurt), but you should be able to figure it out. You seem like a smart sort
    of bean.

Useful Linkage

<a href="<%= Thoth::APP_URL %>">Thoth Website

Thoth Wiki

Bugs & Feature Requests

Source Code


ActionItem8: now we can use @virtual_community

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

Start page of Virtual Community <%= @virtual_community.name %>

Start page of Virtual Community <%# @virtual_community.name %>


small layout fix

small layout fix

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

Profile

<%= avatar_img(@user) %>

	<%=h @user.login %>
	<%=h rank_for(@user.posts_count, @user.admin) %>, <%= @user.posts_count %> posts

<%=h @user.bio %>

	<% if !@user.signature.blank? %>

<%=h @user.signature %>
	<% end %>

		Registered: <%= @user.created_at.strftime("%b %d, %Y") %>
		Last Visit: <%= time_ago_in_words(@user.last_login_at) %> ago
		Profile Updated: <%= time_ago_in_words(@user.profile_updated_at) %> ago

	<%= link_to 'Home', home_path %> »
	<%= link_to 'Users', users_path %> » <%=h @user.login %>

	<% if can_edit?(@user) && @user.avatar_id %>
		<%= link_to 'Change Avatar', avatars_path %>
		(<%= link_to 'x', deselect_avatar_path, :method => :post %>)
	<% elsif can_edit?(@user) && @user.avatar_id.nil? %>
		<%= link_to 'Get an Avatar', avatars_path %>
	<% end %>
	<% if can_edit?(@user) %>
		  <%= link_to 'Edit Profile', edit_user_path(@user) %>
	<% end %>


timezone fix

timezone fix


show sharing form by default

show sharing form by default

<%# 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]", "" -%>

<%# @resource_type -%>
<%# @favourite_groups -%>
<%# @all_projects -%>

<%# @policy_type -%>
<%# @sharing_mode -%>
<%# @access_mode -%>
<%# @use_custom_sharing -%>
<%# @use_whitelist -%>
<%# @use_blacklist -%>

    <%= help_icon("Here you can specify who can view, download and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view, download and edit this <%= @resource_type -%>.
        <%= link_to_function "More info " + expand_image, visual_effect(:toggle_blind, "more_sharing_info", :duration => 0.3) -%>

          Here you may specify the People, Projects or Groups that may View and Edit the details about your <%= @resource_type -%>.

          You may:

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

Share with all other users, including those that are not a member of a Sysmo project.

Share with all other users that are a member of a Sysmo project.

Define more fine-grained sharing, by selecting Custom sharing permissions.
 By using custom sharing permissions you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
        <input type="hidden" name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
        <input type="hidden" name="sharing[include_custom_sharing_<%= Policy::PRIVATE -%>]" value="0">

        <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                              value="<%= Policy::PRIVATE -%>" type="radio" onclick="javascript:setSharingElementVisibility(<%= Policy::PRIVATE -%>);" />
        - Keep this <%= @resource_type -%> private.

Or share it with..

      <label for="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_REGISTERED_USERS -%> id="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>" name="sharing[sharing_scope]"
               value="<%= Policy::ALL_REGISTERED_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_REGISTERED_USERS -%>);" />
        - All users, including those that are not members of SysMO projects, for

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

      <%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_REGISTERED_USERS,
        :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

      <label for="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>">
        <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 -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_SYSMO_USERS -%>);" />
        - All registered users that are members of a SysMO project for

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

      <%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_SYSMO_USERS,
        :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

      <label for="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY -%> id="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" name="sharing[sharing_scope]"
               value="<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>);" />
        - Use custom sharing permissions only

    <div id="specific_sharing" style="display: <%= (@use_custom_sharing || @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY) ? "block" : "none" -%>; margin-top: 2em;">

        Custom 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, :onchange => "javascript: replaceFavouriteGroupRedboxActionURL(); return(false);", :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() -%>

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

            <%= 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::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING] -%>
                  </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() -%>

            <%= 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 -%>
                    </select>

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

    <%= "
" unless @enable_black_white_listing %>

Also include people in my..

          <input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_whitelist]" id="cb_use_whitelist" <%= "checked='checked'" if @use_whitelist -%> />
          - "white list", who always get full access

        <% white_lst = current_user.get_whitelist -%>
        <%= hidden_field_tag "#{FavouriteGroup::WHITELIST_NAME}_group_id", (white_lst ? white_lst.id : "none") -%>
          [
          <span id="<%= FavouriteGroup::WHITELIST_NAME -%>_edit_span" style="display: <%= white_lst ? "inline" : "none" -%>;">
            <%= link_to "edit", "/", :onclick => "editWhitelistBlacklist('#{FavouriteGroup::WHITELIST_NAME}'); return(false);" -%>

          <% unless white_lst -%>
            <span id="<%= FavouriteGroup::WHITELIST_NAME -%>_create_span">
              <%= link_to "create", "/", :onclick => "createWhitelistBlacklist('#{FavouriteGroup::WHITELIST_NAME}'); return(false);" -%>

          <% end -%>
          ]
        <%= image_tag icon_filename_for_key("spinner"), :id => "#{FavouriteGroup::WHITELIST_NAME}_creation_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle;" -%>

          <input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_blacklist]" id="cb_use_blacklist" <%= "checked='checked'" if @use_blacklist -%> />
          - "black list", who have no access at all

        <% black_lst = current_user.get_blacklist -%>
        <%= hidden_field_tag "#{FavouriteGroup::BLACKLIST_NAME}_group_id", (black_lst ? black_lst.id : "none") -%>
          [
          <span id="<%= FavouriteGroup::BLACKLIST_NAME -%>_edit_span" style="display: <%= black_lst ? "inline" : "none" -%>;">
            <%= link_to "edit", "/", :onclick => "editWhitelistBlacklist('#{FavouriteGroup::BLACKLIST_NAME}'); return(false);" -%>

          <% unless black_lst -%>
            <span id="<%= FavouriteGroup::BLACKLIST_NAME -%>_create_span">
              <%= link_to "create", "/", :onclick => "createWhitelistBlacklist('#{FavouriteGroup::BLACKLIST_NAME}'); return(false);" -%>

          <% end -%>
          ]
        <%= image_tag icon_filename_for_key("spinner"), :id => "#{FavouriteGroup::BLACKLIST_NAME}_creation_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle;" -%>

  <%# this DIV is to hold the 'redbox' links generated by a method in application_helper, -%>
  <%# these will be "clicked" by javascript, because hidden divs that are present in the -%>
  <%# generated code causes IE to break layout by inserting extra line break otherwise -%>
        <div id="<%= FavouriteGroup::WHITELIST_NAME -%>_redbox_link_div">
          <%= whitelist_blacklist_edit_popup_link(FavouriteGroup::WHITELIST_NAME) -%>

        <div id="<%= FavouriteGroup::BLACKLIST_NAME -%>_redbox_link_div">
          <%= whitelist_blacklist_edit_popup_link(FavouriteGroup::BLACKLIST_NAME) -%>

    <%= "
" unless @enable_black_white_listing %>


Increased width of the middle panel td to stop icons wrapping to next row in task edit page.
IE8, Firefox and Chrome display perfectly
IE7 still a bit too narrow, but it doesn't wrap the icons (and it was displaying even less before)

Signed-off-by: Ari Maniatis <7158a9e0f8e84a0a74ed148e0f652dfbd4913a18@ish.com.au>

<%= error_messages_for 'task' %>

<%
  perms = {}

  ['comment', 'edit', 'reassign', 'prioritize', 'close', 'milestone'].each do |p|
    if @task.project_id.to_i == 0 || current_user.can?( @task.project, p )
      perms[p] = {}
    else
      perms[p] = { :disabled => 'disabled' }
    end
  end
%>

		<fieldset id="task_information" style="padding-right:0.5em;"><legend><%=_ 'Information' %></legend>
			<%=_ 'Summary' %>
			<%= text_field 'task', 'name', { :size => 47, :maxlength => 200, :style => "width:80%;"}.merge( perms['edit'] )  %>

			<%=_ 'Tags' %>
			<%= text_field 'task', 'set_tags', { :size => 47, :value => @task.tags.collect{|t| t.name}.join(', '), :autocomplete => "off", :style => "width:80%;" }.merge( perms['edit'] ) %>

			<%=_ 'Description' %>
			<%= text_area 'task', 'description', { :rows => 15, :style => "width:80%;" }.merge( perms['edit'] )  %>

			<%=_ 'Comment' %>
			<%= text_area_tag 'comment', {}, { :rows => 8, :style => "width:80%;" }.merge( perms['comment'] )  %>

			<% if @task.new_record? %>
				<%= submit_tag _("Create"), :class => "button nolabel right" %>
				<%= check_box_tag 'notify', '1', (current_user.send_notifications > 0) %> <%=_ 'Send notification emails' %>
			<% else %>
				<%= submit_tag _("Save"), :class => "button nolabel right" %>

				<%
					options = []
					options << [_("Leave Open"), 0] if @task.status == 0
					options << [_("Revert to Open"), 0] if @task.status != 0
					options << [_("Set in Progress"), 1] if @task.status == 0
					options << [_("Leave as in Progress"), 1] if @task.status == 1
					options << [_("Close"), 2] if @task.status == 0 || @task.status == 1
					options << [_("Leave Closed"), 2] if @task.status == 2
					options << [_("Set as Won't Fix"), 3] if @task.status == 0 || @task.status == 1
					options << [_("Leave as Won't Fix"), 3] if @task.status == 3
					options << [_("Set as Invalid"), 4] if @task.status == 0 || @task.status == 1
					options << [_("Leave as Invalid"), 4] if @task.status == 4
					options << [_("Set as Duplicate"), 5] if @task.status == 0 || @task.status == 1
					options << [_("Leave as Duplicate"), 5] if @task.status == 5
					options << [_("Wait"), 6] if @task.status < 2

					can_close = {:disabled => "disabled"} unless current_user.can?( @task.project, 'close' )
					can_close ||= {}

					defer_options = []
					defer_options << [_("Tomorrow"), tz.local_to_utc(tz.now.at_midnight + 1.days).to_s(:db)  ]
					defer_options << [_("End of week"), tz.local_to_utc(tz.now.beginning_of_week + 4.days).to_s(:db)  ]
					defer_options << [_("Next week"), tz.local_to_utc(tz.now.beginning_of_week + 7.days).to_s(:db) ]
					defer_options << [_("One week"), tz.local_to_utc(tz.now.at_midnight + 7.days).to_s(:db) ]
					defer_options << [_("Next month"), tz.local_to_utc(tz.now.next_month.beginning_of_month).to_s(:db)]
					defer_options << [_("One month"), tz.local_to_utc(tz.now.next_month.at_midnight).to_s(:db)]
				%>

				<%= select 'task', 'status', options, {:selected => @task.status}, can_close %>  <%= _("until") %>   <%= select 'task', 'hide_until', defer_options %> <%=_ 'and' %>

				<%= check_box_tag 'notify', '1', (current_user.send_notifications > 0) %> <%=_ 'Send notification emails' %>
			<% end %>

		</fieldset>

<% unless @tags.nil? %>

<% end %>

      <fieldset id="task_project_selection" style="padding-right:0;">
        <legend><%=_ 'Target' %></legend>
          <%=_ 'Project' %>

          <select name="task[project_id]" id="task_project_id" <%= "disabled=\"disabled\"" unless perms['reassign'].empty? %>>
          <% @clients = Customer.find(:all, :conditions => ["company_id = ?", current_user.company_id], :order => "name") %>
          <% @clients.each do |c| %>
          <% @client_projects = current_user.projects.find(:all, :conditions => ["customer_id = #{c.id} AND completed_at IS NULL"], :order => "name" ) %>
            <% if @client_projects.size > 0 %>
            <optgroup class="select_heading" label="<%= h(c.name) %>">
              <% @client_projects.each do |p| %>
                 <option value="<%=p.id%>" class="select_item"<%= " selected" if p.id == selected_project%>><%= p.name %></option>
              <% end %>
            </optgroup>
           <% end %>

          <% end %>

           </select>

          <%=_ 'Milestone' %>
	  <%= milestone_select(perms) %>
          <% if current_user.can?( Project.find(selected_project), 'milestone' ) %>
	  <% end %>
	  <a href="/milestones/quick_new?project_id=<%=selected_project%>" rel="shadowbox;height=300;width=460;player=iframe">

<%

users = Project.find(selected_project).users.find(:all, :order => 'name' ) rescue []

resource_string = "<select id=\"task_users\" name=\"users[]\" #{"disabled=\"disabled\"" if @task.project && !current_user.can?( @task.project, 'reassign' )}><option value=\"\">[#{_('Unassigned')}]</option>" + users.collect{|us| "<option value=\"#{us.id}\">#{us.name}</option>"}.join('') + "</select>"
resource_string = resource_string.split(/\n/).join('').gsub(/'/, "\\\\\'")

owner_string = ''
num = 0
unless @task.users.empty?
  @task.users.each do |u|
    owner_string << "
#{_('Assigned To')}" if num == 0
    owner_string << "
" if num != 0
    owner_string <<  "<select name=\"users[]\" id=\"task_users\" #{"disabled=\"disabled\"" if @task.project && !current_user.can?( @task.project, 'reassign' )}><option value=\"\">[#{_('No one')}]</option>" + users.collect{|us| "<option value=\"#{us.id}\" #{(u.id == us.id ? "selected=\"selected\"" : '')}>#{us.name}</option>"}.join('').gsub(/'/,"\\\\\'") + "</select>" #, perms['reassign'] )

    if( perms['reassign'].keys.size == 0 )
      owner_string << "" if num == 0
      owner_string << "" if num != 0
    end
    owner_string << "
"
    num = num + 1
  end
  owner_string = owner_string.split(/\n/).join('')
else
  owner_string = "<select name=\"users[]\" id=\"task_users\" #{"disabled=\"disabled\"" if @task.project && !current_user.can?( @task.project, 'reassign' )}><option value=\"\">[#{_('No one')}]</option>" + users.collect{|us| "<option value=\"#{us.id}\" #{"selected" if (us.id == current_user.id && @task.created_at.nil?) }>#{us.name}</option>"}.join('') + "</select>" #, perms['reassign']
  owner_string = owner_string.split(/\n/).join('').gsub(/'/, "\\\\\'")

  if perms['reassign'].keys.size == 0
    owner_string = "
#{_('Assigned To')}#{owner_string}"
    owner_string << "
"
  end
  num = num + 1
end

%>

      <% if current_user.option_tracktime.to_i == 1%>
       <%=_ 'Time Estimate' %>
      <%= text_field 'task', 'duration', {:size => 12, :value => (@task.duration.to_i > 0 ? worked_nice(@task.duration) : ""), :class => 'tooltip', :title => _('2w 3d 1h')}.merge(perms['prioritize']) %>

<% else %>
      <%= hidden_field_tag "task[duration]", "#{(@task.duration.to_i > 0 ? worked_nice(@task.duration) : "")}" %>
<% end %>
      <%=_ 'Due Date' %>
        <% if perms['prioritize'].empty? %>
          <% if( (current_user.locale || 'en_US') == 'en_US' )
               date_tooltip = _("Enter task due date, or click calendar button.
For recurring tasks, try:
every day
every thursday
every last friday
every 14 days
every 3rd monday (of a month)")
             else
               date_tooltip = _("Enter task due date, or click calendar button.")
             end %>
          <% if @task.repeat && @task.repeat.length > 0 %>
          <%= calendar_field 'task', 'due_at', { :class => 'date tooltip', :field_title => date_tooltip, :button_title => _('Show Calendar'), :value => @task.repeat_summary }, { :ifFormat => current_user.date_format, :firstDay => 1, :range => [2006, 2010], :step => 1, :showOthers => true } %>
          <% else %>
	  <input type="text" name="task[due_at]" id="task_due_at" size="12"/>
          <%#= calendar_field 'task', 'due_at', { :class => 'date tooltip', :field_title => date_tooltip, :button_title => _('Show Calendar') }, { :ifFormat => current_user.date_format, :firstDay => 1, :range => [2006, 2010], :step => 1, :showOthers => true } %>
          <% end %>

        <% else %>
          <% if @task.repeat && @task.repeat.length > 0 %>
        <%= text_field 'task', 'due_at', {:size => 12, :value => @task.repeat_summary}.merge(perms['prioritize']) %>

          <% else %>
        <%= text_field 'task', 'due_at', {:size => 12}.merge(perms['prioritize']) %>

          <% end %>
        <% end %>

      </fieldset>

      <fieldset id="task_notify" style="padding-right:0;">
        <legend><%=_ 'Notifications' %></legend>

       <%= owner_string %>

      <%=_ 'Requested By' %>
      <%= text_field 'task', 'requested_by', {:size => 12}.merge(perms['edit']) %>

        <%= _"Notify" %>  <a href="#" onclick="javascript:updateList('<%= current_user.name %>');false">add me
        <input type="text" size="12" name="watchers[]" id="notification-input" title="<%=_("Add users by name or email")%>" class="tooltip">

      </fieldset>
      <fieldset id="task_attr" style="padding-right:0;">
        <legend><%=_ 'Attributes' %></legend>
	<%
	   current_user.company.properties.each do |p|
	     selected = @task.new_record? ? p.default_value : @task.property_value(p)
	 -%>
	  <% name = "property_#{ p.id }" -%>
  	  <label for="<%= name %>"><%= h(p.name) %>
	  <select name="task[properties][<%= p.id %>]" id="<%= name %>">
	    <option></option>
	    <% p.property_values.each do |pv| -%>
	      <option value="<%= pv.id %>" <%= selected == pv ? "selected" : ""  %>>
		<%= h(pv.value) %>
	      </option>
	    <% end -%>
	  </select>
	<% end -%>
      </fieldset>

      <fieldset id="task_dependencies" style="padding-right:0;">
        <legend><%=_ "Dependencies"%></legend>

        <%=_ 'Depends on'%>
        <% if perms['prioritize'].empty? %>
          <input name="dependencies[]" size="12" type="text" id="dependencies_input" title="<%=_("Search by task number or title")%>" class="tooltip" >

	  <%= auto_complete_for_dependencies %>
        <% else %>
          <input name="dependencies[]" size="12" type="text" disabled="disabled">
        <% end %>

	  <%= render :partial => "dependency", :collection => @task.dependencies, :locals => { :perms => perms } %>

	 <% unless @task.dependants.empty? %>

	     <%=_ "Depended on by"%>
	     <% @task.dependants.each do |d| %>
	     <%= link_to_task(d) %>

	     <% end %>

	 <% end %>
	</fieldset>

	<fieldset id="task_attachments" style="padding-right:0;">
		<legend><%=_ "Attachments" %></legend>
		<% for file in @task.attachments %>
			<% if file.thumbnail? %>

					<%= link_to image_tag("/project_files/thumbnail/#{file.id}", {:border=>0, :style=>'float:none'}), {:controller => 'project_files', :action => 'download', :id => file.id.to_s + "." + file.file_extension}, {:rel=>'shadowbox'} %>

			<% end %>
			<%= link_to h(file.name), {:controller => 'project_files', :action => 'download', :id => file.id.to_s + "." + file.file_extension}, {:rel=>'shadowbox'} %> (<%=number_to_human_size(file.file_size)%>)
			<%= link_to image_tag("/images/cross_small.png", :border=>0), {:controller => 'project_files', :action => 'destroy', :id => file.id}, :confirm => _("Really delete %s?", file.name), :class => 'close-cross' %>

		<% end %>

		<%=_ 'Attach file' %>

			<%= file_field_tag 'tmp_files[]', { :size => 15, :class => "file" }.merge( perms['comment'] ) %>

		<% if perms['comment'].empty? %>
			<%= link_to_function _("Upload more files") do |page|
	              page.insert_html :bottom, :upload_container, " <input type=\"file\" size=\"15\" class\"file\" name=\"tmp_files[]\"/>
"
	              end %>
		<% end %>
	</fieldset>

        <% if current_user.use_resources? %>
          <fieldset id="task_resources">
	    <legend><%=_ "Resources" %></legend>
            <%=_ "Linked resources" %>
	    <% customer_id = @task.project.customer_id if @task.project %>
	    <%= auto_complete_for_resources(customer_id) %>

	    <%= render :partial => "resource", :collection => @task.resources %>
          </fieldset>
        <% end %>


Dyn attributes edit fields should be on top of list.

<%= _("title")  %>
<%= text_field 'node', 'v_title', :size=>nil, :class => 'full_width' %>

<% @node.dyn_attribute_keys.each do |k| -%>
<label for="d_<%= k %>"><%= _(k) %>
<%= text_area 'node', "d_#{k}", :cols=>nil, :rows=>2, :class => 'full_width' %>
<% end -%>

<%= _("language") %>
<%= select 'node', 'v_lang', current_site.lang_list.map {|l| [_(l), l]} %>

<% if @node.kind_of?(Note) -%>
<%= _("event date") %>
<%= date_box('node', 'event_at')%>
<% end -%>
<%= _('publication date') %>
<%= date_box('node', 'v_publish_from') %>
<%= _("summary")  %>
<%= text_area 'node', 'v_summary', :cols=>nil, :rows=>6, :value=>@node.v_summary, :class => 'full_width' %>

<%= _("comment") %>
<%= text_area 'node', 'v_comment', :cols=>nil, :rows=>2, :class => 'full_width' %>

<%= _("title")  %>
<%= text_field 'node', 'v_title', :size=>nil, :class => 'full_width' %>

<%= _("language") %>
<%= select 'node', 'v_lang', current_site.lang_list.map {|l| [_(l), l]} %>

<% if @node.kind_of?(Note) -%>
<%= _("event date") %>
<%= date_box('node', 'event_at')%>
<% end -%>
<%= _('publication date') %>
<%= date_box('node', 'v_publish_from') %>
<%= _("summary")  %>
<%= text_area 'node', 'v_summary', :cols=>nil, :rows=>6, :value=>@node.v_summary, :class => 'full_width' %>

<%= _("comment") %>
<%= text_area 'node', 'v_comment', :cols=>nil, :rows=>2, :class => 'full_width' %>

<% @node.dyn_attribute_keys.each do |k| -%>
<label for="d_<%= k %>"><%= _(k) %>
<%= text_area 'node', "d_#{k}", :cols=>nil, :rows=>2, :class => 'full_width' %>
<% end -%>


Mark box titles for translation

Mark box titles for translation

  <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>

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

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

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

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

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

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

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

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

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

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

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

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

  <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>

Media upload

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

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

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

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

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

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

Media search

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

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

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

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


Fixed label for attributes on article creation form (closes #229) [kevin@sb.org]

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

<%= error_messages_for 'article' %>

  Title:

  <%= text_field 'article', 'title'  %>
  (<%= link_to_function "» edit permalink", "Toggle.display('permalink')" %>)

  Permalink:

  <%= text_field 'article', 'permalink'  %>

  Categories:

  <select id="categories" name="categories[]" multiple="multiple" size="10" style="width:250px;">
  <%= options_from_collection_for_select(@categories, "id", "name", @selected) %>
  </select>

  Article:

  <%= text_area 'article', 'body', :rows => 25  %>

  Add Extended Content

  Extended:

  <%= text_area 'article', 'extended', :rows => 30  %>

Toggle Advanced Options (+/-)

Allow comments: <%= check_box 'article', 'allow_comments'  %>

Allow pings: <%= check_box 'article', 'allow_pings'  %>

Published:<%= check_box 'article', 'published'  %>

Textfilter: <%= select 'article', 'text_filter', text_filter_options %>

Creation date:<%= datetime_select 'article', 'created_at'  %>

<%= error_messages_for 'article' %>

  Title:

  <%= text_field 'article', 'title'  %>
  (<%= link_to_function "» edit permalink", "Toggle.display('permalink')" %>)

  Permalink:

  <%= text_field 'article', 'permalink'  %>

  Categories:

  <select name="categories[]" multiple="multiple" size="10" style="width:250px;">
  <%= options_from_collection_for_select(@categories, "id", "name", @selected) %>
  </select>

  Article:

  <%= text_area 'article', 'body', :rows => 25  %>

  Add Extended Content

  Extended:

  <%= text_area 'article', 'extended', :rows => 30  %>

Toggle Advanced Options (+/-)

Allow comments: <%= check_box 'article', 'allow_comments'  %>

Allow pings: <%= check_box 'article', 'allow_pings'  %>

Published:<%= check_box 'article', 'published'  %>

Textfilter: <%= select 'article', 'text_filter', text_filter_options %>

Creation date:<%= datetime_select 'article', 'created_at'  %>


Revert to using join instead of to_sentence for now as to_sentence is
broken in rails 2.2 when I18N is in use. We can go back to using
to_sentence once we have gone to rails 2.3 which fixes the problem.

Close #1906.

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

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

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

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

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

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

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

  <% end %>

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

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

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

            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
            <% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %>
	    <% if related_ways.size > 0 then %>
              (<%= t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.to_sentence %>)
            <% end %>

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

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

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

  <% end %>