Wrap 'changeset.changeset.no_comment' in italics with <i></i>. Right now it's not possible to distinguish between a changeset that has no comment and one whose comment is equivalent to the text of 'changeset.changeset.no_comment'.

  <% cl = cycle('table0', 'table1') %>

  <td class="<%= cl %>">
    #<%= changeset.id %>

  <td class="<%= cl %> date">
    <% if changeset.closed_at > DateTime.now %> <%= t'changeset.changeset.still_editing' %>
    <% else %><%= changeset.closed_at.strftime("%d %b %Y %H:%M") %><% end %>

  <%if showusername %>
    <td class="<%= cl %> user">
    <% if changeset.user.data_public? %>
      <%= link_to h(changeset.user.display_name), :controller => "changeset", :action => "list_user", :display_name => changeset.user.display_name %>
    <% else %>
      <%= t'changeset.changeset.anonymous' %>
    <% end %>

  <% end %>

  <td class="<%= cl %> comment">
    <% if changeset.tags['comment'] %>
      <%= h(changeset.tags['comment']) %>
    <% else %>
      <%= t'changeset.changeset.no_comment' %>
    <% end %>

  <td class="<%= cl %> area">
    <% if changeset.min_lat.nil? %>
      <%= t'changeset.changeset.no_edits' %>
    <% else
      minlon = changeset.min_lon/GeoRecord::SCALE.to_f
      minlat = changeset.min_lat/GeoRecord::SCALE.to_f
      maxlon = changeset.max_lon/GeoRecord::SCALE.to_f
      maxlat = changeset.max_lat/GeoRecord::SCALE.to_f
    %>
      <a href='/?minlon=<%= minlon %>&minlat=<%= minlat %>&maxlon=<%= maxlon %>&maxlat=<%= maxlat %>&box=yes' title='<%= t'changeset.changeset.show_area_box' %>'><%= format("%0.3f",minlon) -%>,<%= format("%0.3f",minlat) -%>,<%= format("%0.3f",maxlon) -%>,<%= format("%0.3f",maxlat) -%>

    <%   if changeset.area > 1500000000000 %>
      <% t'changeset.changeset.big_area' %>
    <%
         end
       end
    %>

  <td class="<%= cl %>">
    <%= link_to t('changeset.changeset.more'), {:controller => 'browse', :action => 'changeset', :id => changeset.id}, {:title => t('changeset.changeset.view_changeset_details')} %>


git-svn-id: http://svn.castleproject.org:8080/svn/castle/trunk@130 73e77b4c-caa6-f847-a29a-24ab75ae54b6

<% @page_title = "Documentation" %>
<% @main_title = "Interceptors" %>
<%= render "/containerdocs/deflinks" %>

Some containers usually always proxy every component.
On other you have to proxy them to intercept something.
Others leave to you the burden of constructing a chain of interceptors.
The MicroKernel exposes an interesting
infrastructure to allow interceptors in a painless fashion.

Basically facilies can associate one or more interceptors with a component.
When the component is activated the MicroKernel checks whether
there's any interceptors associated with a component and if so, a proxy
is created and a interceptor chain is associated with the proxy.

if (Something())
{
  model.Interceptors.Add(
    new InteceptorReference( typeof(MyTransactionalInterceptor) ) );
}

Usually the facility that associates components to
interceptors is the same one that registered the interceptor. However,
if this is not your case, it would be nice to explicit say so to the kernel:

if (Something())
{
  model.Interceptors.Add(
    new InteceptorReference( typeof(MyTransactionalInterceptor) ) );
  model.Dependencies.Add(
    new DependencyModel(
      DependencyType.Service, "",
      typeof(MyTransactionalInterceptor), false ) );
}

The last code snippet says to the kernel "hey, this component
requires the existance of another component implementing the
service 'MyTransactionalInterceptor' and this component will not be
available until this dependency is satisfied.

The rationale behind this design

The whole principle behind Castle Project is orthogonality, so
by choosing this design, more than one facility could register
their inteceptors to handle different concerns on the same component.
Something that have been implemented, for example, is the
NHibernate facility that register an AutomaticSessionInterceptor,
and the Automatic Transaction Management facility that register an
TransactionInterceptor to carry on with the Begins/Committs/Rollbacks.

What's an interceptor exactly?

An interceptor is a component registered like any other
component. The only requirement is that the inteceptor
implements (correctly) the interface IMethodInterceptor.

As an example, we present you with the
transactional interceptor code:

public class TransactionInterceptor : IMethodInterceptor
{
	private ITransactionManager _manager;

	public TransactionInterceptor(ITransactionManager manager)
	{
		_manager = manager;
	}

	public object Intercept(IMethodInvocation invocation, params object[] args)
	{
		if (!invocation.Method.IsDefined( typeof(TransactionAttribute), true ))
		{
			return invocation.Proceed(args);
		}
		else
		{
			object[] attrs = invocation.Method.GetCustomAttributes(
				typeof(TransactionAttribute), true );

			TransactionAttribute transactionAtt =
				(TransactionAttribute) attrs[0];

			ITransaction transaction =
				_manager.CreateTransaction(
					transactionAtt.TransactionMode,
					transactionAtt.IsolationMode );

			object value = null;

			transaction.Begin();

			try
			{
				value = invocation.Proceed(args);

				transaction.Commit();
			}
			catch(Exception ex)
			{
				transaction.Rollback();
				throw ex;
			}
			finally
			{
				_manager.Dispose(transaction);
			}

			return value;
		}
	}
}


clean up ag failure table

clean up ag failure table

    ID
    Student
	Submitted
	Last Update
	Started
	Message

	<% count = 0 %>
 	<% for queue in @items %>
    <% count = count.next
	     odd = "odd"
	     odd = "even" if count.even?
	   %>
	  <tr class="<%=odd%> hover" id="queue_<%=queue.id%>">
	    <%= queue.id %>
		<%= queue.user_turnin.user.display_name rescue 'unknown' %>
	    <%= queue.created_at.to_formatted_s(:short) %>
		<%= queue.updated_at.to_formatted_s(:short) %>
		<% if queue.acknowledged %><%= image_tag 'accept.png' %><% end %>
		<%= queue.message %>

		Class:	<%= queue.assignment.course.title rescue 'unknown' %>
		Assignment:	<%= queue.assignment.title rescue 'unknown' %>
		<div id="area_<%=queue.id%>"><%= link_to_remote( 'Requeue', :update => "area_#{queue.id}", :url => { :action => 'reset_ag_item', :course => @course, :id => queue.id }, :success => visual_effect(:highlight, "area_#{queue.id}" ) ) %>
 <% if queue.course_id == @course.id || queue.course_id < 0 %>
			| <%= link_to_remote( 'Remove', :update => "area_#{queue.id}", :url => { :action => 'mark_ag_finished', :course => @course, :id => queue.id }, :confirm => 'Are you sure you want to permanently remove this item from the grading queue?', :success => visual_effect(:highlight, "area_#{queue.id}" ) ) %>
 <% end %>

    <% end %>

    ID
    Student
	Submitted
	Last Update
	Started
	Message

	<% count = 0 %>
 	<% for queue in @items %>
    <% count = count.next
	     odd = "odd"
	     odd = "even" if count.even?
	   %>
	  <tr class="<%=odd%> hover" id="queue_<%=queue.id%>">
	    <%= queue.id %>
		<%= queue.user_turnin.user.display_name rescue 'unknown' %>
	    <%= queue.created_at.to_formatted_s(:short) %>
		<%= queue.updated_at.to_formatted_s(:short) %>
		<% if queue.acknowledged %><%= image_tag 'accept.png' %><% end %>
		<%= queue.message %>

		Class:	<%= queue.assignment.course.title rescue 'unknown' %>
		Assignment:	<%= queue.assignment.title rescue 'unknown' %>
		<div id="area_<%=queue.id%>"><%= link_to_remote( 'Requeue', :update => "area_#{queue.id}", :url => { :action => 'reset_ag_item', :course => @course, :id => queue.id }, :success => visual_effect(:highlight, "area_#{queue.id}" ) ) %>
 <% if queue.course_id == @course.id || queue.course_id < 0 %>
			| <%= link_to_remote( 'Remove', :update => "area_#{queue.id}", :url => { :action => 'reset_ag_item', :course => @course, :id => queue.id }, :confirm => 'Are you sure you want to permanently remove this item from the grading queue?', :success => visual_effect(:highlight, "area_#{queue.id}" ) ) %>
 <% end %>

    <% end %>


Fix cage_list, link to rooms and users not working

  <%= link_to_remote "Med",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_med',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

    <%= link_to_remote "Flight",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_flight_cage', :ids => cage_list, :div => @div_id,
      :weighing => @weighing, :list_all => @list_all } %>

  <%= link_to_remote "Name",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_name',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

  <%= link_to_remote "Bats",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_bats',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

  <%= link_to_remote "Avg Weight",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_bat_weight', :ids => cage_list, :div => @div_id,
      :weighing => @weighing, :list_all => @list_all } %>

  <%= link_to_remote "Weighed",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_weigh_date', :ids => cage_list,
      :div => @div_id, :weighing => @weighing, :list_all => @list_all } %>

    <%= link_to_remote "Flown",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_flown', :ids => cage_list, :div => @div_id,
      :weighing => @weighing, :list_all => @list_all } %>

    <%= link_to_remote "Feed Tasks",
      :update => @div_id,
      :url =>{:controller => 'cages', :action => 'list_by_feed_tasks',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

  Species
  <%= link_to_remote "Room",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_room', :ids => cage_list, :div => @div_id, :weighing => @weighing, :list_all => @list_all } %>

    <%= link_to_remote "Owner",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_owner', :ids => cage_list, :div => @div_id, :weighing => @weighing, :list_all => @list_all } %>

  <% if @list_all %>
    Destroyed
  <% end %>

  <% users_length = ((cage_list.collect{|b| b.user}).uniq).length %>
  <% current_user = User.find(session[:person]) %>

  <% for cage in cage_list %>

        <%= users_length > 1 && (cage.user == current_user) ? '>' : '' %>

        <%= cage.current_medical_problems.empty? ? '' : link_to(image_tag("med.svg"),
          :controller => :medical_problems, :action => :list,
          :medical_problems => cage.current_medical_problems) %>

        <%= cage.flight_cage ? image_tag("flight.svg") : '' %>

        <% if @weighing %>
          <%= button_to cage.name, :controller => 'cages', :action => 'weigh_cage', :id => cage %>
        <% else %>
          <%= link_to cage.name, :controller => 'cages', :action => 'show', :id => cage %>
        <% end %>

      <%= link_to(cage.bats.count, :controller => :bats, :action => :list, :bats => cage.bats) %>
      <%=h cage.average_bat_weight %>

        <% if (cage.last_weigh_date != 0) && cage.any_bats_monitored && Date.parse(cage.last_weigh_date.strftime('%Y/%m/%d')) <= Date.today - 7.days %>

        <% else %>

        <% end %>
        <%= cage.last_weigh_date!=0 ? nice_date_no_year(cage.last_weigh_date) : 'NA' %>

        <% if cage.flown_enough? %>

          <% else %>

            <% end %>
            <%= nice_date_no_year cage.last_flown %>

      <% feeding = cage.tasks.feeding_tasks.length %>

        <%= (cage.fed_every_day? ? "" : "<warning>") + link_to(feeding, :controller=> :tasks,
          :action=>:manage_feeding_tasks, :id => cage) + (cage.fed_every_day? ? "" : "</warning>") %>

          <% for species in cage.species.uniq %>
            <%= link_to species.name[0].chr + ". " + species.name.split(" ")[1], :controller => :species,
              :action => :show, :id => species %>

          <% end %>

      <%= link_to cage.room.name, :controller => :rooms, :action => :show, :id => cage.room %>
      <%=h cage.user ? link_to(cage.user.name, :controller => :users, :action => :show, :id => cage.user):
          'None' %>
      <% if @list_all %>
        <%=h nice_date(cage.date_destroyed) %>
      <% end %>
      <% if !@weighing %>
        <%= button_to 'Edit', :controller => 'cages', :action => 'edit', :id => cage %>

          <% if cage.date_destroyed == nil %>
            <%= button_to 'Deactivate', { :controller => 'cages', :action => 'deactivate', :id => cage }, :confirm => 'Are you sure?', :method => :post %>
          <% else %>
            <%=  button_to 'Reactivate', { :controller => 'cages', :action => 'reactivate', :id => cage }, :confirm => 'Are you sure?', :method => :post %>
          <% end %>

      <% end %>
      <%= !@weighing && !cage.bats.empty? ? button_to('Weigh', :controller => 'cages', :action => 'weigh_cage', :id => cage) : '' %>
      <%= cage.bats.empty? ? '' : button_to('Move', :controller => :bats, :action => :move_bats_from_cage, :id => cage) %>
      <%= cage.bats.empty? ? '' : button_to('Fly', :controller => :flights, :action => :new, :bats => cage.bats) %>

  <% end %>

  <%= link_to_remote "Med",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_med',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

    <%= link_to_remote "Flight",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_flight_cage', :ids => cage_list, :div => @div_id,
      :weighing => @weighing, :list_all => @list_all } %>

  <%= link_to_remote "Name",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_name',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

  <%= link_to_remote "Bats",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_bats',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

  <%= link_to_remote "Avg Weight",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_bat_weight', :ids => cage_list, :div => @div_id,
      :weighing => @weighing, :list_all => @list_all } %>

  <%= link_to_remote "Weighed",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_weigh_date', :ids => cage_list,
      :div => @div_id, :weighing => @weighing, :list_all => @list_all } %>

    <%= link_to_remote "Flown",
      :update => @div_id, :url =>{ :controller => 'cages',
      :action => 'list_by_flown', :ids => cage_list, :div => @div_id,
      :weighing => @weighing, :list_all => @list_all } %>

    <%= link_to_remote "Feed Tasks",
      :update => @div_id,
      :url =>{:controller => 'cages', :action => 'list_by_feed_tasks',
      :ids => cage_list, :div => @div_id, :weighing => @weighing,
      :list_all => @list_all } %>

  Species
  <%= link_to_remote "Room",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_room', :ids => cage_list, :div => @div_id, :weighing => @weighing, :list_all => @list_all } %>

    <%= link_to_remote "Owner",
      :update => @div_id,
      :url =>{ :controller => 'cages', :action => 'list_by_owner', :ids => cage_list, :div => @div_id, :weighing => @weighing, :list_all => @list_all } %>

  <% if @list_all %>
    Destroyed
  <% end %>

  <% users_length = ((cage_list.collect{|b| b.user}).uniq).length %>
  <% current_user = User.find(session[:person]) %>

  <% for cage in cage_list %>

        <%= users_length > 1 && (cage.user == current_user) ? '>' : '' %>

        <%= cage.current_medical_problems.empty? ? '' : link_to(image_tag("med.svg"),
          :controller => :medical_problems, :action => :list,
          :medical_problems => cage.current_medical_problems) %>

        <%= cage.flight_cage ? image_tag("flight.svg") : '' %>

        <% if @weighing %>
          <%= button_to cage.name, :controller => 'cages', :action => 'weigh_cage', :id => cage %>
        <% else %>
          <%= link_to cage.name, :controller => 'cages', :action => 'show', :id => cage %>
        <% end %>

      <%= link_to(cage.bats.count, :controller => :bats, :action => :list, :bats => cage.bats) %>
      <%=h cage.average_bat_weight %>

        <% if (cage.last_weigh_date != 0) && cage.any_bats_monitored && Date.parse(cage.last_weigh_date.strftime('%Y/%m/%d')) <= Date.today - 7.days %>

        <% else %>

        <% end %>
        <%= cage.last_weigh_date!=0 ? nice_date_no_year(cage.last_weigh_date) : 'NA' %>

        <% if cage.flown_enough? %>

          <% else %>

            <% end %>
            <%= nice_date_no_year cage.last_flown %>

      <% feeding = cage.tasks.feeding_tasks.length %>

        <%= (cage.fed_every_day? ? "" : "<warning>") + link_to(feeding, :controller=> :tasks,
          :action=>:manage_feeding_tasks, :id => cage) + (cage.fed_every_day? ? "" : "</warning>") %>

          <% for species in cage.species.uniq %>
            <%= link_to species.name[0].chr + ". " + species.name.split(" ")[1], :controller => :species,
              :action => :show, :id => species %>

          <% end %>

      <%= link_to cage.room.name, :controller => :cages, :action => :show, :id => cage.room %>
      <%=h cage.user ? link_to(cage.user.name, :controller => :cages, :action => :show, :id => cage.user):
          'None' %>
      <% if @list_all %>
        <%=h nice_date(cage.date_destroyed) %>
      <% end %>
      <% if !@weighing %>
        <%= button_to 'Edit', :controller => 'cages', :action => 'edit', :id => cage %>

          <% if cage.date_destroyed == nil %>
            <%= button_to 'Deactivate', { :controller => 'cages', :action => 'deactivate', :id => cage }, :confirm => 'Are you sure?', :method => :post %>
          <% else %>
            <%=  button_to 'Reactivate', { :controller => 'cages', :action => 'reactivate', :id => cage }, :confirm => 'Are you sure?', :method => :post %>
          <% end %>

      <% end %>
      <%= !@weighing && !cage.bats.empty? ? button_to('Weigh', :controller => 'cages', :action => 'weigh_cage', :id => cage) : '' %>
      <%= cage.bats.empty? ? '' : button_to('Move', :controller => :bats, :action => :move_bats_from_cage, :id => cage) %>
      <%= cage.bats.empty? ? '' : button_to('Fly', :controller => :flights, :action => :new, :bats => cage.bats) %>

  <% end %>


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

  <% if params[:complete] %>Completed<% else %>Pending<% end %>
  Updates

Profile Updates

<%= link_to "Show #{params[:complete] ? 'Pending' : 'Complete'}", :complete => params[:complete].nil? %>

  <% @updates.each do |update| %>

        <a href="<%= url_for :controller => 'people', :action => 'view', :id => update.person %>">
          <%= render :partial => 'people/thumbnail', :locals => {:person => update.person} %>

        <%= link_to update.person.name, :controller => 'people', :action => 'view', :id => update.person %>
        updated
        <%= update.created_at.strftime 'on %m/%d/%Y at %I:%M %p' %>
        <% if update.complete %>
          <%= link_to 'Uncomplete', :action => 'toggle_complete', :id => update %>
        <% else %>
          <%= link_to 'Complete', :action => 'toggle_complete', :id => update %>
        <% end %>

          <% if update.first_name %>
First Name:	<%= update.first_name %>
<% end %>
          <% if update.last_name %>
Last Name:	<%= update.last_name %>
<% end %>
          <% if update.home_phone %>
Home Phone:	<%= number_to_phone update.home_phone, :area_code => true %>
<% end %>
          <% if update.mobile_phone %>
Mobile Phone:	<%= number_to_phone update.mobile_phone, :area_code => true %>
<% end %>
          <% if update.work_phone %>
Work Phone:	<%= number_to_phone update.work_phone, :area_code => true %>
<% end %>
          <% if update.fax %>
Fax:	<%= number_to_phone update.fax, :area_code => true %>
<% end %>
          <% if update.address1 %>
Address 1:	<%= update.address1 %>
<% end %>
          <% if update.address2 %>
Address 2:	<%= update.address2 %>
<% end %>
          <% if update.city %>
City:	<%= update.city %>
<% end %>
          <% if update.state %>
State:	<%= update.state %>
<% end %>
          <% if update.zip %>
Zip:	<%= update.zip %>
<% end %>
          <% if update.birthday %>

              Birthday:

                <% unless update.birthday.year == 1800 %>
                  <%= update.birthday.strftime '%m/%d/%Y' %>
                <% end %>

          <% end %>
          <% if update.anniversary %>

              Anniversary:

                <% unless update.anniversary.year == 1800 %>
                  <%= update.anniversary.strftime '%m/%d/%Y' %>
                <% end %>

          <% end %>

  <% end %>

<% unless params[:complete] %>

Groups Pending Approval

The following <%= @unapproved_groups.length == 1 ? 'group is' : 'groups are' %>
  pending approval: <%= @unapproved_groups.map { |g| link_to(g.name, :controller => 'groups', :action => 'view', :id => g) }.join(', ') %>
<% end %>

  <% if params[:complete] %>Completed<% else %>Pending<% end %>
  Updates

Profile Updates

<%= link_to "Show #{params[:complete] ? 'Pending' : 'Complete'}", :complete => params[:complete].nil? %>

  <% @updates.each do |update| %>

        <a href="<%= url_for :controller => 'people', :action => 'view', :id => update.person %>">
          <%= render :partial => 'people/thumbnail', :locals => {:person => update.person} %>

        <%= link_to update.person.name, :controller => 'people', :action => 'view', :id => update.person %>
        updated
        <%= update.created_at.strftime 'on %m/%d/%Y at %I:%M %p' %>
        <% if update.complete %>
          <%= link_to 'Uncomplete', :action => 'toggle_complete', :id => update %>
        <% else %>
          <%= link_to 'Complete', :action => 'toggle_complete', :id => update %>
        <% end %>

          <% if update.first_name %>
First Name:	<%= update.first_name %>
<% end %>
          <% if update.last_name %>
Last Name:	<%= update.last_name %>
<% end %>
          <% if update.home_phone %>
Home Phone:	<%= update.home_phone %>
<% end %>
          <% if update.mobile_phone %>
Mobile Phone:	<%= update.mobile_phone %>
<% end %>
          <% if update.work_phone %>
Work Phone:	<%= update.work_phone %>
<% end %>
          <% if update.fax %>
Fax:	<%= update.fax %>
<% end %>
          <% if update.address1 %>
Address 1:	<%= update.address1 %>
<% end %>
          <% if update.address2 %>
Address 2:	<%= update.address2 %>
<% end %>
          <% if update.city %>
City:	<%= update.city %>
<% end %>
          <% if update.state %>
State:	<%= update.state %>
<% end %>
          <% if update.zip %>
Zip:	<%= update.zip %>
<% end %>
          <% if update.birthday %>

              Birthday:

                <% unless update.birthday.year == 1800 %>
                  <%= update.birthday.strftime '%m/%d/%Y' %>
                <% end %>

          <% end %>
          <% if update.anniversary %>

              Anniversary:

                <% unless update.anniversary.year == 1800 %>
                  <%= update.anniversary.strftime '%m/%d/%Y' %>
                <% end %>

          <% end %>

  <% end %>

<% unless params[:complete] %>

Groups Pending Approval

The following <%= @unapproved_groups.length == 1 ? 'group is' : 'groups are' %>
  pending approval: <%= @unapproved_groups.map { |g| link_to(g.name, :controller => 'groups', :action => 'view', :id => g) }.join(', ') %>
<% end %>


Change the semantics of allow_comments slightly.  Previously, disabling comments kept Typo
from displaying any comments at all.  Now, disabling comments only stops new comments from
being added; old comments are still displayed.

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

<div class="post"<%= onhover_show_admin_tools(:article) %>>
  <%= link_to("edit", { :controller => "admin/content", :action => "edit", :id => @article },
        :class => "admintools", :style => "display: none", :id => "admin_article") %>

<%= @article.title %>

Posted by <%= author_link(@article) %>
  <%= js_distance_of_time_in_words_to_now @article.created_at.utc %>

  <%= @article.full_html %>

<% if @article.allow_comments? or @article.comments.size > 0 -%>

Comments

<% if @article.allow_comments? -%>

    Leave a response

<% end -%>
  <%= content_tag(:ol, render(:partial => "comment", :collection => @article.comments), :id => 'commentList', :class => 'comment-list') %>
<% end -%>

<% if @article.allow_pings? -%>

Trackbacks

    Use the following link to trackback from your own site:

    <%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %>

  <%= content_tag(:ol, render(:partial => "trackback", :collection => @article.trackbacks), :id => 'trackbackList', :class => 'trackback-list') %>
<% end -%>

  <a href="<%= xml_url(:action=>'articlerss', :id=>@article) %>" title="RSS Feed">RSS feed for this post
  <a href="<%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %>">trackback uri

<% if @article.allow_comments? -%>
  <%= render :partial => 'comment_box' %>
<% else -%>

Comments are disabled

<% end -%>

<div class="post"<%= onhover_show_admin_tools(:article) %>>
  <%= link_to("edit", { :controller => "admin/content", :action => "edit", :id => @article },
        :class => "admintools", :style => "display: none", :id => "admin_article") %>

<%= @article.title %>

Posted by <%= author_link(@article) %>
  <%= js_distance_of_time_in_words_to_now @article.created_at.utc %>

  <%= @article.full_html %>

<% if @article.allow_comments? -%>

Comments

    Leave a response

  <%= content_tag(:ol, render(:partial => "comment", :collection => @article.comments), :id => 'commentList', :class => 'comment-list') %>
<% end -%>

<% if @article.allow_pings? -%>

Trackbacks

    Use the following link to trackback from your own site:

    <%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %>

  <%= content_tag(:ol, render(:partial => "trackback", :collection => @article.trackbacks), :id => 'trackbackList', :class => 'trackback-list') %>
<% end -%>

  <a href="<%= xml_url(:action=>'articlerss', :id=>@article) %>" title="RSS Feed">RSS feed for this post
  <a href="<%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %>">trackback uri

<% if @article.allow_comments? -%>
  <%= render :partial => 'comment_box' %>
<% else -%>

Comments are disabled

<% end -%>


add ability to accept as team leader from processor actions page

  <% locker = @profile.locked_by %>
  <% if locker != @viewer %>
      <% if @appln.status != 'completed' %>

Sorry, you have to wait until the application's status is completed before evaluating.

      <% elsif locker.nil? %>

Nobody has chosen to evaluate this project yet.  If you would like to, <%= link_to "click here",
        :controller => "processor", :action => "evaluate", :profile_id => @profile.id %>

      <% else %>

<%= locker.name %> has already chosen to evaluate this project.  Please contact
        him/her if you would like to perform any of the processor actions on this application.

      <% end %>
  <% else %>

This application is in <%= @project.title %>'s applications Pile.

You are evaluating <%= @appln.viewer.name %>'s <%= @appln.form.name %> application.

  You can:

<%= link_to "Release this application to be evaluated by someone else",
      :controller => 'processor', :action => 'release', :profile_id => @profile.id %>

    <% if !@invalid_pages.empty? %>

For legal reasons, we need processors to fill out a <%= link_to "processor form",
           processor_viewer_url(@profile.id) %>
      before accepting or declining an application. The following pages are missing answers for required
      fields:

        <% @invalid_pages.each do |page|%>

<%= page.title %>

        <% end %>

    <% else %>

          <%= form_tag :action => 'accept', :profile_id => @profile.id, :project_id => @project.id %>
            Accept Applicant to <%= @project.title %> with support coach
            <%= render :partial => 'main/support_coach_choice',
              :locals => { :name => 'support_coach_id', :current => '', :project => @project } %>
            <% if @appln.as_intern? %>
              <%= select_tag("as_intern",
              options_for_select([['as intern', true], ['not as intern', false]], true)) %>
            <% end %>
            <% if @appln.as_team_leader? %>
              <%= select_tag("as_team_leader",
              options_for_select([['as team_leader', true], ['not as team_leader', false]], true)) %>
            <% end %>
            <%= submit_tag "Accept", :confirm => "Are you sure you?" %>
          </form>

        <%= form_tag :action => 'decline', :profile_id => @profile.id, :project_id => @project.id %>
          Decline applicant from all of this year's summer projects.
          <%= submit_tag "Decline" %>
        </form>

          <%= form_tag :action => 'forward', :profile_id => @profile.id, :project_id => @project.id %>
            Forward this application from <%= "#{@project.title}" %> to
            <%= select_tag("forward_to_project_id",
            options_for_select(@eg.projects.find(:all, :order => :title).delete_if {
            |p| p.id == @project.id}.collect {|p| [ p.title, p.id ] })) %>
            where it will be evaluated by a processor for that project.
            <%= submit_tag "Forward" %>
          </form>

    <% end %>
  <% end %>

  <% locker = @profile.locked_by %>
  <% if locker != @viewer %>
      <% if @appln.status != 'completed' %>

Sorry, you have to wait until the application's status is completed before evaluating.

      <% elsif locker.nil? %>

Nobody has chosen to evaluate this project yet.  If you would like to, <%= link_to "click here",
        :controller => "processor", :action => "evaluate", :profile_id => @profile.id %>

      <% else %>

<%= locker.name %> has already chosen to evaluate this project.  Please contact
        him/her if you would like to perform any of the processor actions on this application.

      <% end %>
  <% else %>

This application is in <%= @project.title %>'s applications Pile.

You are evaluating <%= @appln.viewer.name %>'s <%= @appln.form.name %> application.

  You can:

<%= link_to "Release this application to be evaluated by someone else",
      :controller => 'processor', :action => 'release', :profile_id => @profile.id %>

    <% if !@invalid_pages.empty? %>

For legal reasons, we need processors to fill out a <%= link_to "processor form",
           processor_viewer_url(@profile.id) %>
      before accepting or declining an application. The following pages are missing answers for required
      fields:

        <% @invalid_pages.each do |page|%>

<%= page.title %>

        <% end %>

    <% else %>

          <%= form_tag :action => 'accept', :profile_id => @profile.id, :project_id => @project.id %>
            Accept Applicant to <%= @project.title %> with support coach
            <%= render :partial => 'main/support_coach_choice',
              :locals => { :name => 'support_coach_id', :current => '', :project => @project } %>
            <% if @appln.as_intern? %>
              <%= select_tag("as_intern",
              options_for_select([['as intern', true], ['not as intern', false]], 'as intern')) %>
            <% end %>
            <%= submit_tag "Accept", :confirm => "Are you sure you?" %>
          </form>

        <%= form_tag :action => 'decline', :profile_id => @profile.id, :project_id => @project.id %>
          Decline applicant from all of this year's summer projects.
          <%= submit_tag "Decline" %>
        </form>

          <%= form_tag :action => 'forward', :profile_id => @profile.id, :project_id => @project.id %>
            Forward this application from <%= "#{@project.title}" %> to
            <%= select_tag("forward_to_project_id",
            options_for_select(@eg.projects.find(:all, :order => :title).delete_if {
            |p| p.id == @project.id}.collect {|p| [ p.title, p.id ] })) %>
            where it will be evaluated by a processor for that project.
            <%= submit_tag "Forward" %>
          </form>

    <% end %>
  <% end %>


make banner icons pop

make banner icons pop

<%#
  # these are little group and users boxes used for the me banner
  #
-%>

  <% @user.contacts.each do |u| -%>

    <% url = person_url(:id => u, :action => 'show') -%>
    <%= link_to avatar_for(u, 'xsmall', :class=>'iconbox'), url -%>

      <%= link_to avatar_for(u, 'small', :class=>'bigiconbox'), url -%>

        <%= link_to u.login, url %>

  <% end %>

  <% @user.groups.each do |g| -%>

    <% url = group_url(:id => g, :action => 'show') -%>
    <%= link_to avatar_for(g, 'xsmall', :class=>'iconbox'), url -%>

      <%= link_to avatar_for(g, 'small', :class=>'bigiconbox'), url -%>

        <%= link_to g.name, url %>

  <% end %>

<%#
  # these are little group and users boxes used for the me banner
  #
-%>

  <% @user.contacts.each do |u| -%>

    <% url = person_url(:id => u) -%>
    <%= link_to avatar_for(u, 'xsmall', :class=>'iconbox'), url -%>

      <%= link_to avatar_for(u, 'small', :class=>'bigiconbox'), url -%>

        <%= link_to u.login, url %>

  <% end %>

  <% @user.groups.each do |g| -%>

    <% url = group_url(:id => g) -%>
    <%= link_to avatar_for(g, 'xsmall', :class=>'iconbox'), url -%>

      <%= link_to avatar_for(g, 'small', :class=>'bigiconbox'), url -%>

        <%= link_to g.name, url %>

  <% end %>


Fix typo.

Fix typo.

  <% if @page.nil? %>
    <%= "#{params[:status].titleize if params[:status]} Comments |
        #{link_to('Download CSV', {:format => 'csv', :status => params[:status]})}" %>
  <% else %>
    <%= "#{@page.comments_count} #{pluralize(@page.comments_count, "Comment")} on
         #{link_to(@page.title, page_edit_url(@page.id))}|
         #{link_to('Download CSV', {:format => 'csv', :status => params[:status], :page_id => @page.id})}
         " %>
  <% end %>

  View:
  <%= content_tag :span, link_to_unless_current("All Comments", :status => "all", :page_id => params[:page_id]) %>
  <%= content_tag :span, link_to_unless_current("Approved Comments", :status => "approved", :page_id => params[:page_id]) %>
  <%= content_tag :span, link_to_unless_current("Unapproved Comments", :status => "unapproved", :page_id => params[:page_id]) %>

    <%= render :partial => "comment", :collection => (@comments) %>

<%= link_to "Delete All Unapproved", destroy_unapproved_admin_comments_url, :method => :delete %>

<%= will_paginate @comments %>

<% if Comment.spam_filter == AkismetSpamFilter %>
  Protected by Akismet
<% elsif Comment.spam_filter == MollomSpamFilter %>
  Protected by Mollom
<% elsif Comment.spam_filter == SimpleSpamFilter && SimpleSpamFilter.required? %>
  Comments are protected from spam by a simple challenge/response field.  For more robust spam filtering, try Mollom or Akismet.
<% elsif current_user.developer? || current_user.admin? %>
  You have 3 built-in options for spam protection although currently comments are not automatically protected. Install Mollom or Akismet to protect against comment spam through an external service, or use the <r:comments:spam_answer_tag />. Instructions may be found in the README.
<% end %>

  <% if @page.nil? %>
    <%= "#{params[:status].titleize if params[:status]} Comments |
        #{link_to('Download CSV', {:format => 'csv', :status => params[:status]})}" %>
  <% else %>
    <%= "#{@page.comments_count} #{pluralize(@page.comments_count, "Comment")} on
         #{link_to(@page.title, page_edit_url(@page.id))}|
         #{link_to('Download CSV', {:format => 'csv', :status => params[:status], :page_id => @page.id})}
         " %>
  <% end %>

  View:
  <%= content_tag :span, link_to_unless_current("All Comments", :status => "all", :page_id => params[:page_id]) %>
  <%= content_tag :span, link_to_unless_current("Approved Comments", :status => "approved", :page_id => params[:page_id]) %>
  <%= content_tag :span, link_to_unless_current("Unapproved Comments", :status => "unapproved", :page_id => params[:page_id]) %>

    <%= render :partial => "comment", :collection => (@comments) %>

<%= link_to "Delete All Unapproved", destroy_unapproved_admin_comments_url, :method => :delete %>

<%= will_paginate @comments %>

<% if Comment.spam_filter == AkismetSpamFilter %>
  Protected by Akismet
<% elsif Comment.spam_filter == MollomSpamFilter %>
  Protected by Mollom
<% elsif Comment.spam_filter == SimpleSpamFilter && SimpleSpamFilter.required? %>
  Comments are protected from spam by a simple challenge/response field.  For more robust spam filtering, try Mollom or Akismet.
<% else current_user.developer? || current_user.admin? %>
  You have 3 built-in options for spam protection although currently comments are not automatically protected. Install Mollom or Akismet to protect against comment spam through an external service, or use the <r:comments:spam_answer_tag />. Instructions may be found in the README.
<% end %>


hide the 'create section' link from members

git-svn-id: 4158f9403e16ea83fe8a6e07a45f1f3b56a747ab@2351 567b1171-46fb-0310-a4c9-b4bef9110e78

<% content_for :action_nav do %>

<%= link_to "Create new article", :controller => 'articles', :action => "new" %>

  <% if admin? -%>

<%= link_to "Create new section", :controller => 'sections' %>

  <% end -%>

<%= link_to "Upload asset", new_asset_path %>

  <% if @articles.any? -%>

<%= link_to "Moderate Comments",  :controller => 'comments' %>

  <% end -%>

<% end %>

  <%= link_to 'Subscribe', overview_url, :class => 'feed right' %>

Today <%= todays_short_date %>

  <%= render_events @todays_events %>

Yesterday <%= yesterdays_short_date %>

  <%= render_events @yesterdays_events %>

Before <%= yesterdays_short_date %>

  <%= render_events @events, true %>

<% content_for :sidebar do %>
  <% if @articles.any? -%>

Comments awaiting your approval

    <% @articles.each do |article, count| -%>

<%= link_to "(#{count}) #{h(article.title)}", :controller => 'articles', :action => 'comments', :id => article.id, :filter => :unapproved %>

    <% end -%>

  <% end -%>

Recent activity

      <% @users.each do |user| -%>

<%= avatar_for user %><%= link_to who(user.login), :controller => 'users', :action => 'show', :id => user %>
 showed up <%= distance_of_time_in_words_to_now(user.updated_at) %> ago

      <% end -%>

<% end %>

<% content_for :action_nav do %>

<%= link_to "Create new article", :controller => 'articles', :action => "new" %>

<%= link_to "Create new section", :controller => 'sections' %>

  <% if @articles.any? -%>

<%= link_to "Moderate Comments",  :controller => 'comments' %>

  <% end -%>

<% end %>

  <%= link_to 'Subscribe', overview_url, :class => 'feed right' %>

Today <%= todays_short_date %>

  <%= render_events @todays_events %>

Yesterday <%= yesterdays_short_date %>

  <%= render_events @yesterdays_events %>

Before <%= yesterdays_short_date %>

  <%= render_events @events, true %>

<% content_for :sidebar do %>
  <% if @articles.any? -%>

Comments awaiting your approval

    <% @articles.each do |article, count| -%>

<%= link_to "(#{count}) #{h(article.title)}", :controller => 'articles', :action => 'comments', :id => article.id, :filter => :unapproved %>

    <% end -%>

  <% end -%>

Recent activity

      <% @users.each do |user| -%>

<%= avatar_for user %><%= link_to who(user.login), :controller => 'users', :action => 'show', :id => user %>
 showed up <%= distance_of_time_in_words_to_now(user.updated_at) %> ago

      <% end -%>

<% end %>


futher tweaking of the text about sharing permissions

<%# 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 to whom the <%= @resource_type -%> is visible, accessible and editable.
        <%= 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 see, access, or 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 %>

<%# 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 to whom the <%= @resource_type -%> is visible, accessible and editable.
        <%= 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 %>


warning message not needed anymore

warning message not needed anymore

Move Summary

Bats
Old Cage
New Cage
Note

<% for bat in @bats %>
<%= bat.band %>

<% end %>

<%= @old_cage ? @old_cage.name : 'Inactive' %>

<%= @new_cage ? @new_cage.name : 'Inactive' %>

<%= @note %>

<% if (@old_cage != nil) && (@new_cage != nil) %>
<%= render :partial => 'bats/manage_cage_tasks_after_move', :locals => {:step=>1, :old_cage=>@old_cage,
										:new_cage=>@new_cage} %>
<% else %>
<% if @old_cage != nil %>
<%= render :partial => 'bats/manage_cage_tasks_after_deactivate_or_reactivate', :locals => {:step=>1, :cage=>@old_cage, :deactivating => true} %>
<% elsif @new_cage != nil %>
<%= render :partial => 'bats/manage_cage_tasks_after_deactivate_or_reactivate', :locals => {:step=>1, :cage=>@new_cage, :deactivating => false} %>
<% end %>
<% end %>

Move Summary

Bats
Old Cage
New Cage
Note

<% for bat in @bats %>
<%= bat.band %>

<% end %>

<%= @old_cage ? @old_cage.name : 'Inactive' %>

<%= @new_cage ? @new_cage.name : 'Inactive' %>

<%= @note %>

<% if @new_cage != nil %>

<warning>Send email alert to owner of <%=h @new_cage.name %> that bat(s)
have been moved and are now under his/her care</warning>

<% end %>

<% if (@old_cage != nil) && (@new_cage != nil) %>
<%= render :partial => 'bats/manage_cage_tasks_after_move', :locals => {:step=>1, :old_cage=>@old_cage,
										:new_cage=>@new_cage} %>
<% else %>
<% if @old_cage != nil %>
<%= render :partial => 'bats/manage_cage_tasks_after_deactivate_or_reactivate', :locals => {:step=>1, :cage=>@old_cage, :deactivating => true} %>
<% elsif @new_cage != nil %>
<%= render :partial => 'bats/manage_cage_tasks_after_deactivate_or_reactivate', :locals => {:step=>1, :cage=>@new_cage, :deactivating => false} %>
<% end %>
<% end %>


add google analytics

add google analytics

<!DOCTYPE html>

  <title>ProtectedPlanet API</title>

    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="/protectedplanet-frontend/dist/style/main.css" rel="stylesheet">
  <link href="/custom.css" rel="stylesheet">

        protected planet

About

          Resources
          </button>

Terms & Conditions

        <button class="js-trigger">
          Thematic Areas
        </button>

            WDPA
            PARCC
            ICCA
            PAME

          Search

  <%= yield %>

     ProtectedPlanet 2014-2016. All rights reserved

        Send Feedback

  <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

  <% if settings.environment == :production %>

  <% end %>


regression

regression

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

<li class="graybox" id="comment-<%= comment.id %>" <%= 'style="display:none"' if controller.request.xml_http_request? %>>
  <a name="comment-<%= comment.id %>">
  <%= (comment.url.blank?) ? comment.author : link_to(comment.author, comment.url) %>  said <%= distance_of_time_in_words @article.created_at, comment.created_at %> later:

  <%= comment.body_html %>

<li class="graybox" id="comment-<%= comment.id %>" <%= 'style="display:none"' if request.xml_http_request? %>>
  <a name="comment-<%= comment.id %>">
  <%= (comment.url.blank?) ? comment.author : link_to(comment.author, comment.url) %>  said <%= distance_of_time_in_words @article.created_at, comment.created_at %> later:

  <%= comment.body_html %>


Fixed favicon.ico link

Fixed favicon.ico link

git-svn-id: 3ebd8a4fd9006ff03462623fffc479a1d4750d42@184 7a65b82a-1d14-0410-b525-e2835e71a0b4

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <%= auto_discovery_link_tag(:rss, {:controller => 'observer', :action  =>  'rss'}, {:title => 'Mushroom Observer RSS'}) %>
  <title>Mushroom Observer: <%= if @title.nil? then controller.action_name else @title end %></title>
  <%= css = nil
	if CSS.member?(controller.action_name)
		css = controller.action_name
	else
		unless session['user'].nil?
        	css = session['user'].theme
		end
	end
	unless CSS.member?(css)
		css = CSS[rand(CSS.length)]
	end
	stylesheet_link_tag 'general', css
  %>
  <%= "<link rel=\"SHORTCUT ICON\" href=\"#{DOMAIN}/images/favicon.ico\" />"%>

		<%= @page_title || "Mushroom Observer" %>

								<%= link_to('Introduction', :controller => 'observer',
								            :action => 'intro') %>

								<%= link_to('How To Use',
								            :controller => 'observer',
								            :action => 'how_to_use') %>

            					<%= link_to('Send a Comment', :controller => 'observer',
            								:action => 'ask_webmaster_question') %>

								<%= link_to('News', :controller => 'observer',
								            :action => 'news') %>

								<%= link_to('Latest Changes',
								            :controller => 'observer',
								            :action => 'list_rss_logs') %>

								<%= link_to('Index A->Z', :controller => 'observer',
								                          :action => 'observation_index') %>

								Observations:

								  <%= link_to('Create Observation',
								                        :controller => 'observer',
								                        :action => 'create_observation')
								                 %>

								  <%= link_to('Sort by Date',
								                        :controller => 'observer',
								                        :action => 'list_observations') %>

								  <%= link_to('Sort by Name',
								                        :controller => 'observer',
								                        :action => 'observations_by_name')
								                 %>

								Species Lists:

								  <%= link_to('Create List',
								                        :controller => 'observer',
								                        :action => 'create_species_list')
								                 %>

								  <%= link_to('Sort by Date',
								                        :controller => 'observer',
								                        :action => 'list_species_lists')
								                 %>

								  <%= link_to('Sort by Title',
								                        :controller => 'observer',
								                        :action => 'species_lists_by_title')
								                        %>

								<%= link_to('Newest Images', :controller => 'observer',
								            :action => 'list_images') %>

								<%= link_to('Comments', :controller => 'observer',
								            :action => 'list_comments') %>

                                <%= link_to('Contributors', :controller => 'observer',
                                            :action => 'users_by_contribution') %>

                                <%= link_to('Site Stats', :controller => 'observer',
                                            :action => 'show_site_stats') %>

								<% if session['user'].nil? %>
								Account:

								  <%= link_to('Login', :controller => 'account',
								                        :action => 'login') %>

								  <%= link_to('Create Account',
								                        :controller => 'account',
														:action => 'signup') %>
								<% else %>
								Current user:

								  <%= h(session['user'].login) %>

								  <%= link_to('Comments for You',
								                        :controller => 'observer',
								                        :action => 'show_comments_for_user',
								                        :id => session['user']) %>

								  <%= link_to('Your Observations',
								                        :controller => 'observer',
								                        :action => 'show_user_observations',
								                        :id => session['user']) %>

                                  <%= link_to('Your Summary',
                                                        :controller => 'observer',
                                                        :action => 'show_user',
                                                        :id => session['user']) %>

								  <%= link_to('Preferences',
								                        :controller => 'account',
								                        :action => 'prefs') %>

								  Join Mailing List

								  <%= link_to('Logout',
								                        :controller => 'account',
								                        :action => 'logout_user') %>
									<% if session['user'].id == 0 %>

										Admin:

										  <%= link_to('Users',
										                        :controller => 'observer',
										                        :action => 'users_by_name') %>

										  <%= link_to('Email Features',
										                        :controller => 'observer',
										                        :action => 'email_features') %>

									<% end %>
								<% end %>

									<%= link_to(sprintf('Colors from %s', css),
												:controller => 'observer', :action => 'color_themes') %>

									Powered by:

									Ruby on Rails

									Preferred browser:

									FireFox
									<% if @invalid.nil? %>

                                    <% end %>

            		<%
            		if @search.nil?
            		    pattern = session["pattern"]
            		else
            		    pattern = @search.pattern
            		end
            		form_tag(:action => 'pattern_search',
            		         :controller => 'observer', :id => @comment) do %>
                      Find: <%= text_field("search", "pattern", :size => 50, :value => pattern)%>
                      <%= submit_tag 'Observations' %>
                      <%= submit_tag 'Images' %>
                      <%= submit_tag 'Names' %>
                    <% end -%>
                    <% if flash[:notice] %>
					  <%= flash[:notice] %>

					<% end %>
					<%= @content_for_layout %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <%= auto_discovery_link_tag(:rss, {:controller => 'observer', :action  =>  'rss'}, {:title => 'Mushroom Observer RSS'}) %>
  <title>Mushroom Observer: <%= if @title.nil? then controller.action_name else @title end %></title>
  <%= css = nil
	if CSS.member?(controller.action_name)
		css = controller.action_name
	else
		unless session['user'].nil?
        	css = session['user'].theme
		end
	end
	unless CSS.member?(css)
		css = CSS[rand(CSS.length)]
	end
	stylesheet_link_tag 'general', css
  %>
<link rel="SHORTCUT ICON" href="http://localhost:3000/images/favicon.ico" />

		<%= @page_title || "Mushroom Observer" %>

								<%= link_to('Introduction', :controller => 'observer',
								            :action => 'intro') %>

								<%= link_to('How To Use',
								            :controller => 'observer',
								            :action => 'how_to_use') %>

            					<%= link_to('Send a Comment', :controller => 'observer',
            								:action => 'ask_webmaster_question') %>

								<%= link_to('News', :controller => 'observer',
								            :action => 'news') %>

								<%= link_to('Latest Changes',
								            :controller => 'observer',
								            :action => 'list_rss_logs') %>

								<%= link_to('Index A->Z', :controller => 'observer',
								                          :action => 'observation_index') %>

								Observations:

								  <%= link_to('Create Observation',
								                        :controller => 'observer',
								                        :action => 'create_observation')
								                 %>

								  <%= link_to('Sort by Date',
								                        :controller => 'observer',
								                        :action => 'list_observations') %>

								  <%= link_to('Sort by Name',
								                        :controller => 'observer',
								                        :action => 'observations_by_name')
								                 %>

								Species Lists:

								  <%= link_to('Create List',
								                        :controller => 'observer',
								                        :action => 'create_species_list')
								                 %>

								  <%= link_to('Sort by Date',
								                        :controller => 'observer',
								                        :action => 'list_species_lists')
								                 %>

								  <%= link_to('Sort by Title',
								                        :controller => 'observer',
								                        :action => 'species_lists_by_title')
								                        %>

								<%= link_to('Newest Images', :controller => 'observer',
								            :action => 'list_images') %>

								<%= link_to('Comments', :controller => 'observer',
								            :action => 'list_comments') %>

                                <%= link_to('Contributors', :controller => 'observer',
                                            :action => 'users_by_contribution') %>

                                <%= link_to('Site Stats', :controller => 'observer',
                                            :action => 'show_site_stats') %>

								<% if session['user'].nil? %>
								Account:

								  <%= link_to('Login', :controller => 'account',
								                        :action => 'login') %>

								  <%= link_to('Create Account',
								                        :controller => 'account',
														:action => 'signup') %>
								<% else %>
								Current user:

								  <%= h(session['user'].login) %>

								  <%= link_to('Comments for You',
								                        :controller => 'observer',
								                        :action => 'show_comments_for_user',
								                        :id => session['user']) %>

								  <%= link_to('Your Observations',
								                        :controller => 'observer',
								                        :action => 'show_user_observations',
								                        :id => session['user']) %>

                                  <%= link_to('Your Summary',
                                                        :controller => 'observer',
                                                        :action => 'show_user',
                                                        :id => session['user']) %>

								  <%= link_to('Preferences',
								                        :controller => 'account',
								                        :action => 'prefs') %>

								  Join Mailing List

								  <%= link_to('Logout',
								                        :controller => 'account',
								                        :action => 'logout_user') %>
									<% if session['user'].id == 0 %>

										Admin:

										  <%= link_to('Users',
										                        :controller => 'observer',
										                        :action => 'users_by_name') %>

										  <%= link_to('Email Features',
										                        :controller => 'observer',
										                        :action => 'email_features') %>

									<% end %>
								<% end %>

									<%= link_to(sprintf('Colors from %s', css),
												:controller => 'observer', :action => 'color_themes') %>

									Powered by:

									Ruby on Rails

									Preferred browser:

									FireFox
									<% if @invalid.nil? %>

                                    <% end %>

            		<%
            		if @search.nil?
            		    pattern = session["pattern"]
            		else
            		    pattern = @search.pattern
            		end
            		form_tag(:action => 'pattern_search',
            		         :controller => 'observer', :id => @comment) do %>
                      Find: <%= text_field("search", "pattern", :size => 50, :value => pattern)%>
                      <%= submit_tag 'Observations' %>
                      <%= submit_tag 'Images' %>
                      <%= submit_tag 'Names' %>
                    <% end -%>
                    <% if flash[:notice] %>
					  <%= flash[:notice] %>

					<% end %>
					<%= @content_for_layout %>


Agregue otras formas de ayudar

Agregue otras formas de ayudar

<% @title = "¿Cómo nos puedes ayudar?" %>

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

¿Cómo nos puedes ayudar?

Aportaciones económicas

Toda pequeña contribución, incluso de $50 o $100, nos ayudará a realizar mejor las tareas de mantenimiento diario. Tu donación servirá para garantizar el buen funcionamiento de la web, ampliar nuestra red de contactos de instituciones y hacer llegar el mensaje de la necesidad de una administración abierta a mucha más gente.

Además:

Si donas más de 500 pesos te mencionaremos en los agradecimientos. (Somos muy transparentes con nuestra financiación, publicando quién dona y cómo gastamos el dinero. Pero también respetamos tu privacidad. Si prefieres que tu nombre no aparezca, hacenoslo saber.)

Si donas más de 10.000 pesos aparecerás como <%= link_to _("patrocinador"), help_about_path(:anchor => 'supporters') %> en la web.

Puedes hacernos llegar tu donación de las siguientes maneras:

Preferiblemente, por transferencia bancaria. En tal caso <%= link_to 'contactanos', help_contact_path %> para realizar la donación y te brindaremos los datos necesarios.

Voluntarios

Ayúdanos a difundir este proyecto, con un post en tu web o en tu blog, por ejemplo o con Twitter recomendando @uyquesabes.

Si ves algún problema con la web, avísanos, aún estamos trabajando en ella.

Si quieres ayudarnos con el diseño y la programación de la web, o con la administración del servidor, eres más que bienvenido, escríbenos a contacto arroba quesabes.org.

También puedes ayudarnos en el mantenimiento de los pedidos del sitio y apoyo a usuarios que quieran realizar pedidos. Contactanos.

Instituciones públicas

Si eres una institución pública, puedes ser entidad colaboradora. No puedes darnos dinero pero podemos colaborar para hacer que la web sea mejor y más colaborativa.

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

<% @title = "¿Cómo nos puedes ayudar?" %>

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

¿Cómo nos puedes ayudar?

Aportaciones económicas

Toda pequeña contribución, incluso de $50 o $100, nos ayudará a realizar mejor las tareas de mantenimiento diario. Tu donación servirá para garantizar el buen funcionamiento de la web, ampliar nuestra red de contactos de instituciones y hacer llegar el mensaje de la necesidad de una administración abierta a mucha más gente.

Además:

Si donas más de 500 pesos te mencionaremos en los agradecimientos. (Somos muy transparentes con nuestra financiación, publicando quién dona y cómo gastamos el dinero. Pero también respetamos tu privacidad. Si prefieres que tu nombre no aparezca, hacenoslo saber.)

Si donas más de 10.000 pesos aparecerás como <%= link_to _("patrocinador"), help_about_path(:anchor => 'supporters') %> en la web.

Puedes hacernos llegar tu donación de las siguientes maneras:

Preferiblemente, por transferencia bancaria. En tal caso <%= link_to 'contactanos', help_contact_path %> para realizar la donación y te brindaremos los datos necesarios.

Voluntarios

Ayúdanos a difundir este proyecto, con un post en tu web o en tu blog, por ejemplo o con Twitter recomendando @uyquesabes.

Si ves algún problema con la web, avísanos, aún estamos trabajando en ella.

Si quieres ayudarnos con el diseño y la programación de la web, o con la administración del servidor, eres más que bienvenido, escríbenos a contacto@quesabes.org.

Instituciones públicas

Si eres una institución pública, puedes ser entidad colaboradora. No puedes darnos dinero pero podemos colaborar para hacer que la web sea mejor y más colaborativa.

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


Rework text filter admin text; it doesn't make sense to refer to gems anymore.

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

<% @page_heading = 'Blog settings' %>

  <%= start_form_tag :action => 'update'%>

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

Cache

General Settings

      Blog name:
      <input name="setting[blog_name]" id="blog_name" type="text" value="<%=h config_value(:blog_name) %>" />

      Blog subtitle:
      <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%=h config_value(:blog_subtitle) %>" />

      <input name="setting[default_allow_comments]" id="default_allow_comments" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_comments)%> />
      <input name="setting[default_allow_comments]" type="hidden" value="0"/>
        Enable comments by default

      <input name="setting[default_allow_pings]" id="default_allow_pings" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_pings)%> />
      <input name="setting[default_allow_pings]" type="hidden" value="0"/>
        Enable Trackbacks by default

      Display
      <input name="setting[limit_article_display]" size="4" id="limit_article_display" type="text" value="<%= config_value(:limit_article_display) %>" /> articles on my homepage by default.

      Display
      <input name="setting[limit_rss_display]" size="4" id="limit_rss_display" type="text" value="<%= config_value(:limit_rss_display) %>" /> articles in my rss feed by default.

      <input name="setting[show_extended_on_rss]" id="show_extended_on_rss" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:show_extended_on_rss)%> />
      <input name="setting[show_extended_on_rss]" type="hidden" value="0"/>
        Show full article on rss feed

Should the blog show mailto: links to your email address?

<input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:link_to_author)%> /><input name="setting[link_to_author]" type="hidden" value="0"/> Enable E-Mail public display

Should the blog use of the Globally Recognized Avatar (Gravatar) service in comments?

      <input name="setting[use_gravatar]" id="use_gravatar" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:use_gravatar) %> />
      <input name="setting[use_gravatar]" type="hidden" value="0"/>
      Enable Gravatar integration

Would you like to include your latitude and longitude in your blog's HTML pages? See GeoURL for details.
Example: <tt>47.774,-122.201</tt>

      Latitude, Longitude:
      <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= config_value(:geourl_location) %>" />

Should Typo send trackbacks to websites that you link to?  This should be disabled
       for private blogs, as it will leak non-public information to sites that you're discussing.
       For public blogs, there's no real point in disabling this.

      <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:send_outbound_pings)%> />
         <input name="setting[send_outbound_pings]" type="hidden" value="0"/>
           Send trackbacks to external sites

      URLs to ping automatically:

      <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h config[:ping_urls] %></textarea>

<%= save("Save My Settings") %>

Text Filter

Typo supports a number of text filtering options.  To add new filters, see the "filters" tab on the toolbar above.

        <select name="setting[text_filter]" id="text_filter">
          <%= options_for_select text_filter_options, TextFilter.find_by_name(config_value(:text_filter)) %>
        </select>
        Article filter

        <select name="setting[comment_text_filter]" id="comment_text_filter">
        <%= options_for_select text_filter_options, TextFilter.find_by_name(config_value(:comment_text_filter)) %>
        </select>
        Comments filter

<%= save("Save My Settings") %>

Spam Protection

Enabling spam protection will make typo compare the IP address of posters as well as the contents of their posts against local and remote blacklists. Good defense against spam bots.

          <input name="setting[sp_global]" id="sp_global" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:sp_global)%> /><input name="setting[sp_global]" type="hidden" value="0"/>
          Enable spam protection

          <input name="setting[sp_allow_non_ajax_comments]" id="sp_allow_non_ajax_comments" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:sp_allow_non_ajax_comments)%> />
          <input name="setting[sp_allow_non_ajax_comments]" type="hidden" value="0" />
          Allow non-ajax comments

(Spam bots usually don't know anything about ajax comments)

          Disable comments after
          <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= config_value(:sp_article_auto_close) %>" /> days

(Set to 0 to never disable comments)

Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them.

          Max URLs:
          <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= config_value(:sp_url_limit) %>" /> links

(Set to 0 to never reject comments)

<%= save("Save My Settings") %>

Cache

   <%= link_to 'Empty Page Cache', :controller => 'cache', :action => 'sweep' %>

   <%= link_to 'Rebuild cached HTML', :controller => 'cache', :action => 'sweep_html' %>

There are <%= @page_cache_size %> entries in the page cache

    <%= save("Save My Settings") %>

  <%= end_form_tag %>

<% @page_heading = 'Blog settings' %>

  <%= start_form_tag :action => 'update'%>

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

Cache

General Settings

      Blog name:
      <input name="setting[blog_name]" id="blog_name" type="text" value="<%=h config_value(:blog_name) %>" />

      Blog subtitle:
      <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%=h config_value(:blog_subtitle) %>" />

      <input name="setting[default_allow_comments]" id="default_allow_comments" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_comments)%> />
      <input name="setting[default_allow_comments]" type="hidden" value="0"/>
        Enable comments by default

      <input name="setting[default_allow_pings]" id="default_allow_pings" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_pings)%> />
      <input name="setting[default_allow_pings]" type="hidden" value="0"/>
        Enable Trackbacks by default

      Display
      <input name="setting[limit_article_display]" size="4" id="limit_article_display" type="text" value="<%= config_value(:limit_article_display) %>" /> articles on my homepage by default.

      Display
      <input name="setting[limit_rss_display]" size="4" id="limit_rss_display" type="text" value="<%= config_value(:limit_rss_display) %>" /> articles in my rss feed by default.

      <input name="setting[show_extended_on_rss]" id="show_extended_on_rss" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:show_extended_on_rss)%> />
      <input name="setting[show_extended_on_rss]" type="hidden" value="0"/>
        Show full article on rss feed

Should the blog show mailto: links to your email address?

<input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:link_to_author)%> /><input name="setting[link_to_author]" type="hidden" value="0"/> Enable E-Mail public display

Should the blog use of the Globally Recognized Avatar (Gravatar) service in comments?

      <input name="setting[use_gravatar]" id="use_gravatar" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:use_gravatar) %> />
      <input name="setting[use_gravatar]" type="hidden" value="0"/>
      Enable Gravatar integration

Would you like to include your latitude and longitude in your blog's HTML pages? See GeoURL for details.
Example: <tt>47.774,-122.201</tt>

      Latitude, Longitude:
      <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= config_value(:geourl_location) %>" />

Should Typo send trackbacks to websites that you link to?  This should be disabled
       for private blogs, as it will leak non-public information to sites that you're discussing.
       For public blogs, there's no real point in disabling this.

      <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:send_outbound_pings)%> />
         <input name="setting[send_outbound_pings]" type="hidden" value="0"/>
           Send trackbacks to external sites

      URLs to ping automatically:

      <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h config[:ping_urls] %></textarea>

<%= save("Save My Settings") %>

Text Filter

Your options depend on which gems you have installed. Following configurations are supported. RedCloth, BlueCloth and RubyPants gems are supported.

        <select name="setting[text_filter]" id="text_filter">
          <%= options_for_select text_filter_options, TextFilter.find_by_name(config_value(:text_filter)) %>
        </select>
        Article filter

        <select name="setting[comment_text_filter]" id="comment_text_filter">
        <%= options_for_select text_filter_options, TextFilter.find_by_name(config_value(:comment_text_filter)) %>
        </select>
        Comments filter

<%= save("Save My Settings") %>

Spam Protection

Enabling spam protection will make typo compare the IP address of posters as well as the contents of their posts against local and remote blacklists. Good defense against spam bots.

          <input name="setting[sp_global]" id="sp_global" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:sp_global)%> /><input name="setting[sp_global]" type="hidden" value="0"/>
          Enable spam protection

          <input name="setting[sp_allow_non_ajax_comments]" id="sp_allow_non_ajax_comments" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:sp_allow_non_ajax_comments)%> />
          <input name="setting[sp_allow_non_ajax_comments]" type="hidden" value="0" />
          Allow non-ajax comments

(Spam bots usually don't know anything about ajax comments)

          Disable comments after
          <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= config_value(:sp_article_auto_close) %>" /> days

(Set to 0 to never disable comments)

Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them.

          Max URLs:
          <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= config_value(:sp_url_limit) %>" /> links

(Set to 0 to never reject comments)

<%= save("Save My Settings") %>

Cache

   <%= link_to 'Empty Page Cache', :controller => 'cache', :action => 'sweep' %>

   <%= link_to 'Rebuild cached HTML', :controller => 'cache', :action => 'sweep_html' %>

There are <%= @page_cache_size %> entries in the page cache

    <%= save("Save My Settings") %>

  <%= end_form_tag %>


new analytics js

new analytics js

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

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="description" content="Companies Open House, always open 24/7 (unlike UK's Companies House)"/>
    <meta name="keywords" content="twitter,search,realtime"/>
    <title><%= @title ? "#{@title} | Companies Open House" : "Companies Open House, always open 24/7 (unlike companies house)" %></title>
    <%= stylesheet_link_tag("application") %>
    <%= javascript_include_tag("jquery-1.3.2.min", "application") %>
      <%= yield :head %>

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

        <%= yield %>

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

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

Watch our Rewired State presentation for an <%= link_to('explanation of the site',rewired_state_presentation_url) %>.

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

<% if RAILS_ENV == 'production' %>

<% end %>