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

<% @page_title = "Castle on Rails" %>
<% @subarea = "How to use" %>
<% @main_title = "How to use" %>
<%= render "/castleonrails/deflinks" %>

First of all, the idea of Castle on Rails is to have Controllers
to carry on the application logic and requesting data from the model
(by dispatch these calls to the appropriate entities), and
use the view just as a presentation, without any logic different from
the view logic. This is very different from how developers usually use
ASP.Net.

Configuration

One of Castle's goals is to rely less on configuration files. Usually in MVC
frameworks you have to declare the controllers, views, models, and map their interaction.
With Castle on Rails you must only tell the framework which assembly has the controllers
and what's the base path for the views.
Optionally you can customize the factories used by the framework.

A simple web.config would be similar to the following:

<configuration>

    <configSections>
        <section name="rails"
type="Castle.CastleOnRails.Engine.Configuration.RailsSectionHandler,
Castle.CastleOnRails.Engine" />
    </configSections>

    <rails>
		<controllers assembly="AspnetSample" />
		<views path="views" />
    </rails>

    <system.web>
        <httpHandlers>
            <add verb="*" path="*.rails"
type="Castle.CastleOnRails.Engine.RailsHttpHandlerFactory,
Castle.CastleOnRails.Engine" />
        </httpHandlers>
    </system.web>

</configuration>

So the rails configuration section tells the framework to inspect the assembly "AspnetSample"
for the controllers and that it must use the "views" physical directory as the base path for
the views.

Please note that we are using the extension rails for the URLs, and the files do not exists
so please map the *.rails extension in IIS to ASP.Net ISAPI and do not check the option for
"check file exists".

The basic Controller

Currently the name of the controller is used in the URL, and the file name is the name of
the action the controller must expose. For example, the following URL:

http://www.myserver.com/home/index.rails

Will be transformed in an instatiantion of the controller HomeController and the invocation
of a public method index (case insensitive). The method must must exists, otherwise the framework
will throw an exception.

The controller can perform any action, and then direct the user to a specific view. If the controller
don't specify a view, the framework will look for a view in the view path named home\index (for this example).
The default engine is the ASP.Net engine, so the ViewFactory will look for a file index.aspx in the views\home
directory.

The following is an example of a valid controller:

namespace AspnetSample.Controllers
{
	using System;

	using Castle.CastleOnRails.Framework;

	public class HomeController : Controller
	{
		public void Index()
		{
		}
	}
}

The controller can use a different view:

namespace AspnetSample.Controllers
{
	using System;

	using Castle.CastleOnRails.Framework;

	public class HomeController : Controller
	{
		public void Index()
		{
			RenderView("welcome");
		}
	}
}

In this case, the engine will look for a file named welcome.aspx in the views\home directory.

A smarter Controller

Castle on Rails also exposes a smarter controller, named SmartDispatcherController.
This controller is just a specialization of the base Controller class to implement a better
dispatch. In fact it maps the parameters in the get/post to method arguments.
For example, the following URL:

http://.../registration/save.rails?name=hammett&pass-xpto

Would be mapped to a method Save that exposes arguments for name and password.
Please note that the controller uses a heuristic to choose the method, so you can use method overload
and the controller will choose the method with more arguments that can be satified.
Basically it gives points to methods, for each argument that can be satisfied, it
adds more points, for arguments that cannot be matched, it subtract points. After the inspection
it will pick the method with more points.

The following is a sample usage:

public class Registration : SmartDispatcherController
{
	public void Index()
	{
	}

	public void Save(String name,
		String address, String city,
		String country, int age)
	{
		try
		{
		  // Inserting...
  		  RegistrationService.Insert(name,
  		    address, city, country, age);

  		  // Done!
		  RenderView( "success" );
  		}
  		catch(BusinessException ex)
  		{
  		  // Whoops!
		  RenderView( "error" );
  		}
	}
}

Using ASP.Net as the view layer

The default engine for view is ASP.Net. Why? Because ASP.Net is
also very effective and productive to write web applications.
The reutilization and the controls lifecycle were really well done
and very clever, so there is no point in trying to reinvent something similar.

There is nothing to be done to make ASP.Net work with Castle on Rails.
Any ordinary .aspx will work. But in some cases you will use ASP.Net to
show a form, gather and validate the input and then invoke a different action
in the controller. In this case your aspx must implement the IControllerAware
interface.

Before any complain, this is how MVC works. Layers in the MVC have a distinct and
well defined responsability. When developing with ASP.Net, usually each Page will
have the role of controller, view and sometimes model. In a better design, the controller
needs to deal with business and application logic and flow, the view needs to
handle presentation and validation of input, and the model will expose the data.

So, after your ASP.Net validates the input it can dispatch the current execution to a controller.
Follows an example of a code behind class:

public class index : System.Web.UI.Page, IControllerAware
{
	private Controller _controller;

	// implementation of IControllerAware
	public void SetController(Controller controller)
	{
		_controller = controller;
	}

	public void OnSave(object sender, EventArgs args)
	{
		// Validation
		// Work work work...
		// Ok, proceed

		_controller.Send( "Save" );

		Response.End();
	}
}

The Response.End is used to avoid the current page to proceed its lifecycle.

Windsor integration

As every subproject of Castle Project, Castle on Rails can be used as a standalone
application or you can use it together with the inversion of control container.
To do so, you only need to use a custom factory for controllers. So instead of inspecting
an assembly, the Castle on Rails framework will ask the container for controllers.

<configuration>

    <configSections>
        <section name="rails"
type="Castle.CastleOnRails.Engine.Configuration.RailsSectionHandler,
Castle.CastleOnRails.Engine" />

        <section name="castle"
type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler,
Castle.Windsor" />
    </configSections>

    <rails>
        <views path="views" />
        <customControllerFactory
type="Castle.CastleOnRails.Engine.WindsorExtension.WindsorControllerFactory,
Castle.CastleOnRails.Engine.WindsorExtension" />
    </rails>

	<castle>
      ...Container configuration...
	</castle>

    <system.web>
        <httpHandlers>
            <add verb="*" path="*.rails"
type="Castle.CastleOnRails.Engine.RailsHttpHandlerFactory,
Castle.CastleOnRails.Engine" />
        </httpHandlers>
    </system.web>

</configuration>

Questions? Comments? Please join our mailing list.

<% @page_title = "Castle on Rails" %>
<% @subarea = "How to use" %>
<% @main_title = "How to use" %>
<%= render "/castleonrails/deflinks" %>

First of all, the idea of Castle on Rails is to have Controllers
to carry on the application logic and requesting data from the model
(by dispatch these calls to the appropriate entities), and
use the view just as a presentation, without any logic different from
the view logic. This is very different from how developers usually works
with ASP.Net.

Configuration

One of Castle's goals is to rely less on configuration files. Usually in MVC
frameworks you have to declare the controllers, views, models, and map their interaction.
With Castle on Rails you must only tell the framework which assembly has the controllers
and what's the base path for the views.
Optionally you can customize the factories used by the framework.

A simple web.config would be similar to the following:

<configuration>

    <configSections>
        <section name="rails"
type="Castle.CastleOnRails.Engine.Configuration.RailsSectionHandler,
Castle.CastleOnRails.Engine" />
    </configSections>

    <rails>
		<controllers assembly="AspnetSample" />
		<views path="views" />
    </rails>

    <system.web>
        <httpHandlers>
            <add verb="*" path="*.rails"
type="Castle.CastleOnRails.Engine.RailsHttpHandlerFactory,
Castle.CastleOnRails.Engine" />
        </httpHandlers>
    </system.web>

</configuration>

So the rails configuration section tells the framework to inspect the assembly "AspnetSample"
for the controllers and that it must use the "views" physical directory as the base path for
the views.

Please note that we are using the extension rails for the URLs, and the files do not exists
so please map the *.rails extension in IIS to ASP.Net ISAPI and do not check the option for
"check file exists".

The basic Controller

Currently the name of the controller is used in the URL, and the file name is the name of
the action the controller must expose. For example, the following URL:

http://www.myserver.com/home/index.rails

Will be transformed in an instatiantion of the controller HomeController and the invocation
of a public method index (case insensitive). The method must must exists, otherwise the framework
will throw an exception.

The controller can perform any action, and then direct the user to a specific view. If the controller
don't specify a view, the framework will look for a view in the view path named home\index (for this example).
The default engine is the ASP.Net engine, so the ViewFactory will look for a file index.aspx in the views\home
directory.

The following is an example of a valid controller:

namespace AspnetSample.Controllers
{
	using System;

	using Castle.CastleOnRails.Framework;

	public class HomeController : Controller
	{
		public void Index()
		{
		}
	}
}

The controller dispatch the user to a different view by using the
RenderView method:

namespace AspnetSample.Controllers
{
	using System;

	using Castle.CastleOnRails.Framework;

	public class HomeController : Controller
	{
		public void Index()
		{
			RenderView("welcome");
		}
	}
}

In this case, the engine will look for a file named welcome.aspx in the views\home directory.

A smarter Controller

Castle on Rails also exposes a smarter controller, named SmartDispatcherController.
This controller is just a specialization of the base Controller class to implement a better
dispatch. In fact it maps the parameters in the get/post to method arguments.
For example, the following URL:

http://.../registration/save.rails?name=hammett&pass-xpto

Would be mapped to a method Save that exposes arguments for name and password.
Please note that the controller uses a heuristic to choose the method, so you can use method overload
and the controller will choose the method with more arguments that can be satified.
Basically it gives points to methods, for each argument that can be satisfied, it
adds more points, for arguments that cannot be matched, it subtract points. Finished this process it will
choose the method with more points.

The following is a sample usage:

public class Registration : SmartDispatcherController
{
	public void Index()
	{
	}

	public void Save(String name,
		String address, String city,
		String country, int age)
	{
		try
		{
		  // Inserting...
  		  RegistrationService.Insert(name,
  		    address, city, country, age);

  		  // Done!
		  RenderView( "success" );
  		}
  		catch(BusinessException ex)
  		{
  		  // Whoops!
		  RenderView( "error" );
  		}
	}
}

Using ASP.Net as the view layer

The default engine for view is ASP.Net. Why? Because ASP.Net is
also very effective and productive to write web applications.
The reutilization and the controls lifecycle were really well done
and very clever, so there is no point in trying to reinvent something similar.

There is nothing to be done to make ASP.Net work with Castle on Rails.
Any ordinary .aspx will work. But in some cases you will use ASP.Net to
show a form, gather and validate the input and then invoke a different action
in the controller. In this case your aspx must implement the IControllerAware
interface.

Before any complain, this is how MVC works. Layers in the MVC have a distinct and
well defined responsability. When developing with ASP.Net, usually each Page will
have the role of controller, view and sometimes model. In a better design, the controller
needs to deal with business and application logic and flow, the view needs to
handle presentation and validation of input, and the model will expose the data.

So, after your ASP.Net validates the input it can dispatch the current execution to a controller.
Follows an example of a code behind class:

public class index : System.Web.UI.Page, IControllerAware
{
	private Controller _controller;

    // implementation of IControllerAware
	public void SetController(Controller controller)
	{
		_controller = controller;
	}

	public void OnSave(object sender, EventArgs args)
	{
		// Validation
		// Work work work...
		// Ok, proceed

		_controller.Send( "Save" );

		Response.End();
	}
}

The Response.End is used to avoid the current page to proceed its lifecycle.

Windsor integration

As every subprojects of Castle Project, Castle on Rails can be used as a standalone
application or you can use it together with the inversion of control container.
To do so, you only need to use a custom factory for controllers. So instead of inspecting
an assembly, the Castle on Rails framework will ask the container for controllers.

<configuration>

    <configSections>
        <section name="rails"
type="Castle.CastleOnRails.Engine.Configuration.RailsSectionHandler,
Castle.CastleOnRails.Engine" />

        <section name="castle"
type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler,
Castle.Windsor" />
    </configSections>

    <rails>
		<views path="views" />
        <customControllerFactory
type="Castle.CastleOnRails.Engine.WindsorExtension.WindsorControllerFactory,
Castle.CastleOnRails.Engine.WindsorExtension" />
    </rails>

	<castle>
      ...Container configuration...
	</castle>

    <system.web>
        <httpHandlers>
            <add verb="*" path="*.rails"
type="Castle.CastleOnRails.Engine.RailsHttpHandlerFactory,
Castle.CastleOnRails.Engine" />
        </httpHandlers>
    </system.web>

</configuration>

Questions? Comments? Please join our mailing list.


Can exclude field options.

Can exclude field options.

<%= f.check_boxes(:hidden, [['Hide field in forms',true]], :single => true, :label => '') unless @exclude_field_options && @exclude_field_options.include?(:hidden) -%>
<%= f.check_boxes(:exclude, [['Exclude field from search keywords',true]], :single => true, :label => '') unless @exclude_field_options && @exclude_field_options.include?(:exclude) -%>
<% field.module_class.field_options_widgets.each do |widget| -%>
  <% case widget
     when :required  -%>
     <%= f.check_boxes(:required, [['Required',true]], :single => true, :label => '', :description => 'This field must not be empty') unless @exclude_field_options && @exclude_field_options.include?(:required) %>
  <% when :unique  -%>
     <%= f.check_boxes(:unique, [['Field must be Unique',true]], :single => true, :label => '', :description => 'Each entry in this model must have a unique value for this field') unless @exclude_field_options && @exclude_field_options.include?(:unique) %>
  <% when :regexp  -%>
     <% f.custom_field :regexp, :label => '' do %>
         <%= uf.check_boxes :regexp, [['Value must match regular expression',true]], :single => true, :label => '', :onclick => "$('field_regexp_#{field_index}').style.display = this.checked ? '' : 'none';"  %>
         <div id='field_regexp_<%= field_index %>' <%= "style='display:none;'" unless uf.object.regexp %>>
             RegExp: <%= uf.text_field :regexp_code %>

             Message: <%= uf.text_field :regexp_message %>

     <% end -%>
  <% when :options -%>
     <%= f.text_area :options_text, :cols => 60, :rows => 4,:vertical => true, :label => 'Available Options (One per line or Text Value;;db_safe_value)' %>
  <% when :belongs_to -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Belongs to' %>
 <% when :has_many -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Has Many', :description => 'Changing relationship model will destroy existing connections'  %>
 <% when :on_off_value -%>
     <%= f.text_field :on %>
     <%= f.text_field :off %>
     <%= f.text_field :on_description, :description => 'This appears as a label next to the check box instead of the on value ' %>
  <% end -%>
<% end -%>

<%= f.check_boxes :hidden, [['Hide field in forms',true]], :single => true, :label => '' -%>
<%= f.check_boxes :exclude, [['Exclude field from search keywords',true]], :single => true, :label => '' -%>
<% field.module_class.field_options_widgets.each do |widget| -%>
  <% case widget
     when :required  -%>
     <%= f.check_boxes :required, [['Required',true]], :single => true, :label => '', :description => 'This field must not be empty' %>
  <% when :unique  -%>
     <%= f.check_boxes :unique, [['Field must be Unique',true]], :single => true, :label => '', :description => 'Each entry in this model must have a unique value for this field' %>
  <% when :regexp  -%>
     <% f.custom_field :regexp, :label => '' do %>
         <%= uf.check_boxes :regexp, [['Value must match regular expression',true]], :single => true, :label => '', :onclick => "$('field_regexp_#{field_index}').style.display = this.checked ? '' : 'none';"  %>
         <div id='field_regexp_<%= field_index %>' <%= "style='display:none;'" unless uf.object.regexp %>>
             RegExp: <%= uf.text_field :regexp_code %>

             Message: <%= uf.text_field :regexp_message %>

     <% end -%>
  <% when :options -%>
     <%= f.text_area :options_text, :cols => 60, :rows => 4,:vertical => true, :label => 'Available Options (One per line or Text Value;;db_safe_value)' %>
  <% when :belongs_to -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Belongs to' %>
 <% when :has_many -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Has Many', :description => 'Changing relationship model will destroy existing connections'  %>
 <% when :on_off_value -%>
     <%= f.text_field :on %>
     <%= f.text_field :off %>
     <%= f.text_field :on_description, :description => 'This appears as a label next to the check box instead of the on value ' %>
  <% end -%>
<% end -%>


fixes #690

fixes #690

<%= :create_a_new_thing.t%{ :thing => content_tag(:b, MessagePage.class_display_name.t) } %>

<%= header_for_page_create MessagePage %>

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

  <%= "subject".t %>
  <%= text_field_tag 'title', params[:title], :size => 80 %>

  <%= "recipients".t %>

    <% to = params[:to]+' ' if params[:to] -%>
    <%= text_field_tag 'to', to, :size => 80 %>

    <%= select_tag('contact_drop',
        options_for_select(
           [["#{'contacts'.t}…",'']] +
           current_user.contacts.sort_by{|c|c.both_names}.to_select(:both_names, :name), params[:user_ids]),
        :onchange => "$('to').value += $('contact_drop').value + ' '") %>
    <%= select_tag('peer_drop',
        options_for_select(
           [["#{'peers'.t}…",'']] +
           current_user.peers.sort_by{|c|c.both_names}.to_select(:both_names, :name), params[:user_ids]),
        :onchange => "$('to').value += $('peer_drop').value + ' '") %>

  <%= 'message'.t %>
  <%= text_area_tag 'message', params[:message], :rows => 20, :cols => 80, :size => "20x80", :id => "message-area" %>

  <input type="checkbox" name="email" value="true" /> Send email?

    <%= submit_tag "Send"[:send_button], :name => 'send' %>

<% end %>

<%= :create_a_new_thing.t%{ :thing => content_tag(:b, MessagePage.class_display_name.t) } %>

<%= header_for_page_create MessagePage %>

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

  <%= "subject".t %>
  <%= text_field_tag 'title', params[:title], :size => 80 %>

  <%= "recipients".t %>

    <% to = params[:to]+' ' if params[:to] -%>
    <%= text_field_tag 'to', to, :size => 80 %>

    <%= select_tag('contact_drop',
        options_for_select(
           [["#{'contacts'.t}…",'']] +
           current_user.contacts.sort_by{|c|c.both_names}.to_select(:both_names, :name), params[:user_ids]),
        :onchange => "$('to').value += $('contact_drop').value + ' '") %>
    <%= select_tag('peer_drop',
        options_for_select(
           [["#{'peers'.t}…",'']] +
           current_user.peers.sort_by{|c|c.both_names}.to_select(:both_names, :name), params[:user_ids]),
        :onchange => "$('to').value += $('peer_drop').value + ' '") %>

  <%= 'message'.t %>
  <%= text_area_tag 'message', params[:message], :rows => 20, :cols => 80 %>

  <input type="checkbox" name="email" value="true" /> Send email?

    <%= submit_tag "Send"[:send_button], :name => 'send' %>

<% end %>


Fix syntax

Fix syntax

<% @title = _("FOI email address for {{public_body}}", :public_body => h(@public_body.name)) %>

<%= _('FOI email address for {{public_body}}',:public_body=> public_body_link(@public_body))%>

<% if @public_body.is_requestable? %>
<%= _('{{site_name}} sends new requests to {{request_email}} for this authority.', :site_name=>site_name, :request_email=> h(@public_body.request_email))%>
<% else %>
    <% if @public_body.not_requestable_reason == 'not_apply' %>

<%= _('Freedom of Information law no longer applies to this authority.Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>.

    <% elsif @public_body.not_requestable_reason == 'defunct' %>

<%=h @public_body.name %> no longer exists.
        <%= _('Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>.

    <% elsif @public_body.not_requestable_reason == 'bad_contact' %>

<%= _('We do not have a working request email address for this authority.')%>

    <% else %>
        <% raise "unknown reason " + @reason %>
    <% end %>

<% end %>

    <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %>
        <%= _('If the address is wrong, or you know a better address, please contact us.', :url => help_contact_path) %>
    <% else %>
        <%= _(' If you know the address to use, then please send it to us.
        You may be able to find the address on their website, or by phoning them up and asking.', :url => help_contact_path) %>
    <% end %>

        <% if @public_body.eir_only? %>
        <%= link_to "Make a new EIR request", new_request_to_body_url(:url_name => @public_body.url_name)%>
        <% else %>
        <%= link_to "Make a new OIA request", new_request_to_body_url(:url_name => @public_body.url_name)%>
        <% end %>
        to <%= h(@public_body.name) %>

<% @title = _("FOI email address for {{public_body}}", :public_body => h(@public_body.name)) %>

<%= _('FOI email address for {{public_body}}',:public_body=> public_body_link(@public_body))%>

<% if @public_body.is_requestable? %>
<%= _('{{site_name}} sends new requests to {{request_email}} for this authority.', :site_name=>site_name, :request_email=> h(@public_body.request_email))%>
<% else %>
    <% if @public_body.not_requestable_reason == 'not_apply' %>

<%= _('Freedom of Information law no longer applies to this authority.Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>.

    <% elsif @public_body.not_requestable_reason == 'defunct' %>

<%=h @public_body.name %> no longer exists.
        <%= _('Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>.

    <% elsif @public_body.not_requestable_reason == 'bad_contact' %>

<%= _('We do not have a working request email address for this authority.')%>

    <% else %>
        <% raise "unknown reason " + @reason %>
    <% end %>

<% end %>

    <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %>
        <%= _('If the address is wrong, or you know a better address, please contact us.', :url => help_contact_path)% %>
    <% else %>
        <%= _(' If you know the address to use, then please send it to us.
        You may be able to find the address on their website, or by phoning them up and asking.', :url => help_contact_path)%  %>
    <% end %>

        <% if @public_body.eir_only? %>
        <%= link_to "Make a new EIR request", new_request_to_body_url(:url_name => @public_body.url_name)%>
        <% else %>
        <%= link_to "Make a new OIA request", new_request_to_body_url(:url_name => @public_body.url_name)%>
        <% end %>
        to <%= h(@public_body.name) %>


ActionItem172: make link to friends in profile controller

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

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

  <%= _('Name:') %>
  <%= profile.name %>

  <%= _('Homepage: ') %>
  <%= link_to url_for(profile.url), profile.url %>

  <%# FIXME %>

<%= link_to _('Friends'), :action => 'friends' %>

<%= link_to _('Communities'), :action => 'communities' %>

<%= link_to _('Enterprises'), :action => 'enterprises' %>

  <% if profile.kind_of? Organization %>

<%= link_to _('Members'), :action => 'members' %>

  <% end %>

    <%= _('Tags:') %>
    <%= tag_cloud @tags, :id, { :action => 'tag' }, :max_size => 18, :min_size => 10%>

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

  <%= _('Name:') %>
  <%= profile.name %>

  <%= _('Homepage: ') %>
  <%= link_to url_for(profile.url), profile.url %>

  <%# FIXME %>

<%= link_to_function _('Friends'), 'alert(%s)' % _('This function is not available yet.').inspect %>

<%= link_to _('Communities'), :action => 'communities' %>

<%= link_to _('Enterprises'), :action => 'enterprises' %>

  <% if profile.kind_of? Organization %>

<%= link_to _('Members'), :action => 'members' %>

  <% end %>

    <%= _('Tags:') %>
    <%= tag_cloud @tags, :id, { :action => 'tag' }, :max_size => 18, :min_size => 10%>


ActionItem65: removing boilerplate text

ActionItem65: removing boilerplate text

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

<%= flash[:notice] %>

<%= @environment.name %>

<%= flash[:notice] %>
Start page of Virtual Community <%= @environment.name %>


Fix bug in sidebar

Fix bug in sidebar

    <% if session[:person] %>

      <% @user ? user = @user : user = User.find(session[:person]) %>

      <% if user.has_jobs %>

<%= link_to 'My Jobs', :controller => :users, :action => :edit, :id => user %>

          <% for job in user.jobs %>

<%= job %>

          <% end %>

      <% end %>

To do:

        <% bats_not_weighed = Bat.not_weighed(user.bats,Time.now+1.day) %>
        <%= bats_not_weighed.empty? ? '' : '
Weigh: ' +
          link_to(bats_not_weighed.length, :controller=>:bats,
          :action=>:choose_bat_to_weigh, :bats=>bats_not_weighed) + '
' %>

        <%  users_tasks_not_done = Task.tasks_not_done_today(user.all_tasks) %>
        <%= users_tasks_not_done.empty? ? '' : '
Tasks: ' +
          link_to(users_tasks_not_done.length, :controller=>:tasks,
          :action=>:list_by_ids, :ids=>users_tasks_not_done) + '
' %>

        <%  users_bats_not_flown = Bat.not_flown(user.bats) %>
        <%= users_bats_not_flown.empty? ? '' : '
Fly: ' +
          link_to(users_bats_not_flown.length, :controller=>:flights,
          :action=>:new, :bats=>users_bats_not_flown) + '
' %>

        <%  users_bats_not_vaccinated = Bat.not_vaccinated(user.bats) %>
        <%= users_bats_not_vaccinated.empty? ? '' : '
Not vaccinated: ' +
          link_to(users_bats_not_vaccinated.length, :controller=>:bats,
          :action=>:list, :bats=>users_bats_not_vaccinated) + '
' %>

Done:

        <%  users_protocol_changes = ProtocolHistory.users_todays_histories(user) %>
        <%= users_protocol_changes.empty? ? '' : '
Protocol Δs: ' +
          link_to(users_protocol_changes.length, :controller=>:protocols, :action =>:index, :ids=>users_protocol_changes.collect{|pc| pc.protocol}.uniq) +
          '
' %>

        <% bats_add_rem = Bat.find( (BatChange.users_bats_deactivated_today(user).collect{|bc| bc.bat}).uniq ) %>
        <%= bats_add_rem.empty? ? '' : '
Bats +/-: ' +
          link_to(bats_add_rem.length, :controller=>:bats, :action=>:list,
          :bats=>bats_add_rem) + '
' %>

<%= link_to 'My Protocols', :controller => :protocols, :ids=>user.protocols.current %>

        <% if user.protocols.current.length > 0 %>
          <% for protocol in user.protocols.current %>

<%= link_to protocol.number, :controller => :protocols, :action => :show, :id => protocol %>

          <% end %>
        <% else %>

No protocols

        <% end %>

<%= link_to 'Add/remove', :controller => :protocols, :action => :edit_protocols_on_user, :id => user %>

<%= link_to 'Trainings', :controller => :trainings, :action => :index, :selected_user => user %>

        <% if user.trainings.length > 0 %>
          <% for training in user.trainings %>

<%= link_to training.training_type.name, :controller => :training_types, :action => :show, :id => training.training_type %>

          <% end %>
        <% else %>

Not trained

        <% end %>

<%= link_to 'Add training', :controller => :trainings, :action => :new, :selected_user => user %>

    <% end %>

Send Email

<%= link_to('Entire Lab', {:controller => 'main', :action => 'lab_email', :users => User.current}, {:title => User.current.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Animal Care', {:controller => 'main', :action => 'lab_email', :users => User.current_animal_care}, {:title => User.current_animal_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Medical Care', {:controller => 'main', :action => 'lab_email', :users => User.current_medical_care}, {:title => User.current_medical_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Weekend Care', {:controller => 'main', :action => 'lab_email', :users => User.current_weekend_care}, {:title => User.current_weekend_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Administrators', {:controller => 'main', :action => 'lab_email', :users => User.administrator}, {:title => User.administrator.collect{|u| [u.name+" \n"]}}) %>

    <% if session[:person] %>

      <% @user ? user = @user : user = User.find(session[:person]) %>

      <% if user.has_jobs %>

<%= link_to 'My Jobs', :controller => :users, :action => :edit, :id => user %>

          <% for job in @user.jobs %>

<%= job %>

          <% end %>

      <% end %>

To do:

        <% bats_not_weighed = Bat.not_weighed(user.bats,Time.now+1.day) %>
        <%= bats_not_weighed.empty? ? '' : '
Weigh: ' +
          link_to(bats_not_weighed.length, :controller=>:bats,
          :action=>:choose_bat_to_weigh, :bats=>bats_not_weighed) + '
' %>

        <%  users_tasks_not_done = Task.tasks_not_done_today(user.all_tasks) %>
        <%= users_tasks_not_done.empty? ? '' : '
Tasks: ' +
          link_to(users_tasks_not_done.length, :controller=>:tasks,
          :action=>:list_by_ids, :ids=>users_tasks_not_done) + '
' %>

        <%  users_bats_not_flown = Bat.not_flown(user.bats) %>
        <%= users_bats_not_flown.empty? ? '' : '
Fly: ' +
          link_to(users_bats_not_flown.length, :controller=>:flights,
          :action=>:new, :bats=>users_bats_not_flown) + '
' %>

        <%  users_bats_not_vaccinated = Bat.not_vaccinated(user.bats) %>
        <%= users_bats_not_vaccinated.empty? ? '' : '
Not vaccinated: ' +
          link_to(users_bats_not_vaccinated.length, :controller=>:bats,
          :action=>:list, :bats=>users_bats_not_vaccinated) + '
' %>

Done:

        <%  users_protocol_changes = ProtocolHistory.users_todays_histories(user) %>
        <%= users_protocol_changes.empty? ? '' : '
Protocol Δs: ' +
          link_to(users_protocol_changes.length, :controller=>:protocols, :action =>:index, :ids=>users_protocol_changes.collect{|pc| pc.protocol}.uniq) +
          '
' %>

        <% bats_add_rem = Bat.find( (BatChange.users_bats_deactivated_today(user).collect{|bc| bc.bat}).uniq ) %>
        <%= bats_add_rem.empty? ? '' : '
Bats +/-: ' +
          link_to(bats_add_rem.length, :controller=>:bats, :action=>:list,
          :bats=>bats_add_rem) + '
' %>

<%= link_to 'My Protocols', :controller => :protocols, :ids=>user.protocols.current %>

        <% if user.protocols.current.length > 0 %>
          <% for protocol in user.protocols.current %>

<%= link_to protocol.number, :controller => :protocols, :action => :show, :id => protocol %>

          <% end %>
        <% else %>

No protocols

        <% end %>

<%= link_to 'Add/remove', :controller => :protocols, :action => :edit_protocols_on_user, :id => user %>

<%= link_to 'Trainings', :controller => :trainings, :action => :index, :selected_user => user %>

        <% if user.trainings.length > 0 %>
          <% for training in user.trainings %>

<%= link_to training.training_type.name, :controller => :training_types, :action => :show, :id => training.training_type %>

          <% end %>
        <% else %>

Not trained

        <% end %>

<%= link_to 'Add training', :controller => :trainings, :action => :new, :selected_user => user %>

    <% end %>

Send Email

<%= link_to('Entire Lab', {:controller => 'main', :action => 'lab_email', :users => User.current}, {:title => User.current.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Animal Care', {:controller => 'main', :action => 'lab_email', :users => User.current_animal_care}, {:title => User.current_animal_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Medical Care', {:controller => 'main', :action => 'lab_email', :users => User.current_medical_care}, {:title => User.current_medical_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Weekend Care', {:controller => 'main', :action => 'lab_email', :users => User.current_weekend_care}, {:title => User.current_weekend_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Administrators', {:controller => 'main', :action => 'lab_email', :users => User.administrator}, {:title => User.administrator.collect{|u| [u.name+" \n"]}}) %>


Fixed typo

Fixed typo

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

<% @title = 'News' %>

<%= @title %>

This page lists the latest changes to and news about the Mushroom Observer website.

Friday October 5, 2007

Fixed a bug where genera were mistakenly getting deprecated when species they contain were deprecated.

Monday September 17, 2007

Did a whole bunch of cleanup using the W3C validator to ensure that
        as much of the site as possible is valid XHTML 1.0.  In the process found many little formatting problems.  In
        general the layout should be unchanged.  However, with browsers other than Firefox there may be significant
        changes, but those should be more consistent with the layout in Firefox.  Please let me know if you see any
        significant layout problems.

For anyone who cares, the Show Image and Show Original pages are not completely valid due to the use of the
        proposed RDFa standard used to describe the Creative Commons licensing terms.  This standard is expected to be
        ratified in the near future.

Sunday September 2, 2007

Contributors now have options for the license they contribute their images under.  The license that has
        been used so far (Creative Commons Attribution,
        Non-Commercial, Share Alike License v2.5, or by-nc-sa v2.5 for short) only permits non-commercial
        uses.  This license is not enough to allow their use on Wikipedia
        which requires the option for all contributed material
        to be used commercially.  Support has been added for a license Wikipedia does accept,
        the Creative Commons Attribution, Share Alike
        License v3.0 license (by-sa v3.0).  While I was working on this problem I also deprecated the use of
        by-nc-sa v2.5 in favor of the 3.0 version.

This means when you add a new image you can choose between the Wikipedia compatible license and the
        non-commercial 3.0 license.  The initial default for all users when adding new images is the Wikipedia
        compatible, by-sa v3.0 license.  You can change this default on your <%= link_to('Preferences',
        :controller => 'account', :action => 'prefs') %> page.

You can change the license for any existing image by going to that
        image and selecting 'Edit Image'.  You will see a new drop down menu listing the license options.
        If the image is currently under the by-nc-sa v2.5, then that option will still be in the list and will
        be the default.  Finally for power users, there is a new page available off the Preferences page, the
        <%= link_to('Bulk License Updater', :action => 'license_updater') %>, which groups your images based
        on license and copyright holder and allows you to update each group in one go.

Image search now includes the copyright holder field in the search.

Updated the <%= link_to('Introduction', :controller => 'observer', :action => 'intro') %> and
    <%= link_to('How to Use', :controller => 'observer', :action => 'how_to_use') %> pages to reflect many
    of the recent changes.

Saturday September 1, 2007

Fixed bugs in handling version numbers and user assignment for some name changing functions.

Monday August 20, 2007

Fixed bugs in adding author and creating new species indirectly by creating or editing observations.

Sunday August 12, 2007

Re-enabled Bulk Name Edit after substantially revising past name generation and compensating for lost history.

Friday August 3, 2007

Added citations to Names.

Search improvements:

        Box is larger.

        Search value stays in all cases.

        Switched from just matching the beginning of the name string (unless there's a %), to searching anywhere in multple fields.

        Removed Location search since that's included in the Observation search now.

Updated the past name page to explicitly show previous statuses and citations.

Thursday August 2, 2007

Added Approve or Deprecate links to Show Name pages based on whether the name is deprecated or not.

Removed 'Deprecated' checkbox from the Edit Name page.

Fixed a bug in Edit Observation where providing a totally new name lost any other changes or edits made on the page.

Fixed some of the handling of 'Unknown'.

Fixed a bug in recording if a Name used to be deprecated.

Friday July 20, 2007

Allowed system to assume that a non-deprecated name is preferred over a deprecated name if there is ambiguity.

Fixed bug in saving author changes when the name can't be changed that was introduced in the July 6 update.

Friday July 6, 2007

Reorganized the links on the observation, image and name pages to hopefully be more intuitive.

Limited the ability to change the name and author of name to avoid changes to other people's observations without
        their approval.

Fixed a few minor bugs.

Sunday July 1, 2007

Updated the checklist code to give long lists after a visit to either the Observation Index or Name Index pages.

Cleaned up the naming of Observation Index and Name Index.  All Names is still maintained, but is now the same as the Name Index.

Saturday June 30, 2007

Valid names are now in bold.  Deprecated names are not.

Thursday June 28, 2007

Moved to new hosting service.

Sunday June 24, 2007

If there are two names that have exactly the same name and author and at least one of them has no notes, then they will get automatically merged if one of them is edited.

Added a facility for testing the performance of image uploading.

Fixed an omission in the error reporting code that caused alert emails to not get sent.

Monday June 18, 2007

Names can now be marked as deprecated.  The setting can be changed using the Edit Name page.

Synonyms support added.  Synonyms are used to verify names of observations and in species lists.

Synonyms can be changed for one name by selecting 'Change Synonyms' from any Show Name page.

Larger sets of names and synonyms can be added from the Bulk Name Edit page available from any Show
        Name page, the Name Index page or the All Names page.

The Name Index page only lists names that have observations.

The All Names page lists all names in the database and can be accessed from the Name Index page.

Fixed bug with Creating Observations immediately after creating a new account.

Monday May 21, 2007

One year anniversary!

Added Site Stats, Contributors, Show User, User Observations and Comments for User pages.

Sunday May 13, 2007

Fixed a variety of minor issues.

Added 'sanitize' calls to avoid cross-site scripting vulnerabilities.

Thursday May 10, 2007

Fixed bug in creating new names when creating a species list.

Sunday April 29, 2007

Substantially improved error handling.

Fixed problem with Google Web Accelerator.

Sunday April 22, 2007

Reorganized and simplified observation editing and creation.

Completed unit testing for existing pages.

Friday February 23, 2007

Adjusted the size of some of the notes widgets to fill more of the screen.

Monday February 19, 2007

Added note snippet and comment count to Show Image page for easier review.

Adjusted options available for the number of rows in list displays.

Fixed database migration scripts.

Internal data simplification (removed observations.what field).

Tuesday February 13, 2007

Added multiple upload option for Add Images.

Changed some of the links in the left hand panel based on user feedback.

Saturday February 10, 2007

Added image and location search within the site.

Thursday February 8, 2007

Added Google image search links to Observation and Name pages.

Wednesday February 7, 2007

Added checklists.  Items in the checklist are the results of the
            latest search or viewed species list.  Viewing large lists like
            'Latest Changes' or 'Name Index' will reset the checklist to all
            names.

Moved loading species lists from files to a separate page off of
            Edit Species List to avoid an interaction between the checklist
            and file loading.

Saturday January 27, 2007

Name edits now appear in the RSS feed.

Sunday January 21, 2007

Added How To Use page.

Changed 'New' links to 'Create'.

Fixed a bug with the search box.

Fixed a couple of bugs with the next/prev links.

Thursday January 11, 2007

Fixed a bug with creating new species.

Fixed many bugs with page titles, some of which were preventing pages from loading.

Tuesday January 9, 2007

Names are now database objects rather than just strings.  They have a
    rank, a text name an author and notes.

A show_name page shows this information as well as a list of all
    observations that use that Name.  The show_pages can be accessed from
    each show_observation page as well as the name_index page that is
    available in the left-side panel.

Names can be edited on the edit_name pages that are accessible from
    the show_name pages.  Anyone is allowed to edit any name, but
    following the Wikipedia model,
    a record is kept of every version.  The previous versions are stored as
    'past names'.  A show_past_name page shows the name information for a
    previous version of a name and is accessible from each show_name page.

Names are associated with observations through the 'what' field of the
    observation.  When the 'what' field is changed, the names are searched
    for a match.  The 'what' field can either be the text_name or the
    text_name and the author for a name.  No match is found for a 'what'
    value, then the user is given the option to create the new name.  If a
    'what' value matches more than one name (due to different authors
    publishing the same name), then the user is given a choice between the
    options.  The options list how many observations use each version of
    the name.  If you add an author to a 'what' field for a name that does
    not have an author already, it will ask you if you want to create the
    new name, but it will actually update the existing name.

Names given in species lists are treated in the exact same manner,
    except that all the new names and all of the multiple matches are
    dealt with on the same page.  There is also an option on the
    new_species_list and edit_species_list pages to 'Just Create New
    Names'.  This adds the names without updating the species list or
    creating the corresponding observations.

The search box is now available on every page.

Removed the Observation Index in favor of the Name Index.

Fixed some of the list ordering to make it more intuitive.

A filter was added to the account creation process that should reduce the
    number of bot created users.

Fixed a bug with bouncing between observations and images and using the
    next/prev links.

Monday December 18, 2006

Added prev/next links that follow the RSS feed.

Improved prev/next functionality throughout the site.

RSS feed descriptions now have appropriate line breaks.

Monday December 4, 2006

Species lists can now be uploaded from files.

Separated note for species list from note that applies to member observations.

Fixed use of multiple tabs by switching from session data to hidden fields.

mushroomobserver.org/# == mushroomobserver.org/observer/show_observation/#

Monday October 26, 2006

Switched Observations->By Name to include thumbnails and follow layout.

Maintained old By Name behavior as Observations->Index.

Added simple search box to Activity Log (Latest Changes) and Observation list pages.

Monday October 23, 2006

Changed default page to the RSS feed.

Changed page layout for observation and image list pages.

Added layout controls to user preferences.  Set to 10 rows x 1 column
		and turn off 'Put text below images' to get old layout.

Changed thumbnail image size from 100px to 160px with lower quality (jpeg 50 vs. 75).

Provided Prev/Next buttons for images.

Added link to ask the webmaster a question about the site.

Split up 'Manage Images' into 'Add Image', 'Reuse Image' and 'Remove Images' and made
		them more visible.

'Reuse Image' allows you to look at the images.

Added links for viewing the log for observations and species lists.

Made database lookup for all observations much more efficient.

Rearranged left-hand panel.

Images no longer have titles.  They are derived from the observation(s) they are
		connected to.

Removed Edit and Destroy links from view pages.

Add mini-icon for webpages.

Sunday September 9, 2006

Links to email the creator of observations or images with questions or commerical inquiries.  The creator receives an email with the address of the user who wants to contact them.  It is up to the creator whether they want to respond.

User preferences added to disable the above email feature and to stop receiving emails like this letting you know about new features.

RSS feed has been overhauled to reduce the number of entries and make them more relevant.

Copyright holder now has an option to be something other than a registered user.  The user who uploads the image is the default, but it can now be changed on a per image basis.

Monday August 21, 2006

Added RSS feed for all interesting events that happen on the site.

Added 'Create Account' link on login page to make it more obvious.

Tweaked page titles to make the site easier to index.

Sunday August 13, 2006

Added this news page.

List pages now have a better interface for paging than just next/previous,
and its at the top and bottom of each page.

Saturday August 12, 2006

Added email verification system to user signup.

<% @title = 'News' %>

<%= @title %>

This page lists the latest changes to and news about the Mushroom Observer website.

Friday October 5, 2007

Fixed a bug where genera were mistakenly getting deprecated when species they contain were deprecated.

Monday September 17, 2007

Did a whole bunch of cleanup using the W3C validator to ensure that
        as much of the site as possible is valid XHTML 1.0.  In the process found many little formatting problems.  In
        general the layout should be unchanged.  However, with browser other than Firefox there may have be significant
        changes, but those should be more consistent with the layout in Firefox.  Please let me know if you see any
        significant layout problems.

For anyone who cares, the Show Image and Show Original pages are not completely valid due to the use of the
        proposed RDFa standard used to describe the Creative Commons licensing terms.  This standard is expected to be
        ratified in the near future.

Sunday September 2, 2007

Contributors now have options for the license they contribute their images under.  The license that has
        been used so far (Creative Commons Attribution,
        Non-Commercial, Share Alike License v2.5, or by-nc-sa v2.5 for short) only permits non-commercial
        uses.  This license is not enough to allow their use on Wikipedia
        which requires the option for all contributed material
        to be used commercially.  Support has been added for a license Wikipedia does accept,
        the Creative Commons Attribution, Share Alike
        License v3.0 license (by-sa v3.0).  While I was working on this problem I also deprecated the use of
        by-nc-sa v2.5 in favor of the 3.0 version.

This means when you add a new image you can choose between the Wikipedia compatible license and the
        non-commercial 3.0 license.  The initial default for all users when adding new images is the Wikipedia
        compatible, by-sa v3.0 license.  You can change this default on your <%= link_to('Preferences',
        :controller => 'account', :action => 'prefs') %> page.

You can change the license for any existing image by going to that
        image and selecting 'Edit Image'.  You will see a new drop down menu listing the license options.
        If the image is currently under the by-nc-sa v2.5, then that option will still be in the list and will
        be the default.  Finally for power users, there is a new page available off the Preferences page, the
        <%= link_to('Bulk License Updater', :action => 'license_updater') %>, which groups your images based
        on license and copyright holder and allows you to update each group in one go.

Image search now includes the copyright holder field in the search.

Updated the <%= link_to('Introduction', :controller => 'observer', :action => 'intro') %> and
    <%= link_to('How to Use', :controller => 'observer', :action => 'how_to_use') %> pages to reflect many
    of the recent changes.

Saturday September 1, 2007

Fixed bugs in handling version numbers and user assignment for some name changing functions.

Monday August 20, 2007

Fixed bugs in adding author and creating new species indirectly by creating or editing observations.

Sunday August 12, 2007

Re-enabled Bulk Name Edit after substantially revising past name generation and compensating for lost history.

Friday August 3, 2007

Added citations to Names.

Search improvements:

        Box is larger.

        Search value stays in all cases.

        Switched from just matching the beginning of the name string (unless there's a %), to searching anywhere in multple fields.

        Removed Location search since that's included in the Observation search now.

Updated the past name page to explicitly show previous statuses and citations.

Thursday August 2, 2007

Added Approve or Deprecate links to Show Name pages based on whether the name is deprecated or not.

Removed 'Deprecated' checkbox from the Edit Name page.

Fixed a bug in Edit Observation where providing a totally new name lost any other changes or edits made on the page.

Fixed some of the handling of 'Unknown'.

Fixed a bug in recording if a Name used to be deprecated.

Friday July 20, 2007

Allowed system to assume that a non-deprecated name is preferred over a deprecated name if there is ambiguity.

Fixed bug in saving author changes when the name can't be changed that was introduced in the July 6 update.

Friday July 6, 2007

Reorganized the links on the observation, image and name pages to hopefully be more intuitive.

Limited the ability to change the name and author of name to avoid changes to other people's observations without
        their approval.

Fixed a few minor bugs.

Sunday July 1, 2007

Updated the checklist code to give long lists after a visit to either the Observation Index or Name Index pages.

Cleaned up the naming of Observation Index and Name Index.  All Names is still maintained, but is now the same as the Name Index.

Saturday June 30, 2007

Valid names are now in bold.  Deprecated names are not.

Thursday June 28, 2007

Moved to new hosting service.

Sunday June 24, 2007

If there are two names that have exactly the same name and author and at least one of them has no notes, then they will get automatically merged if one of them is edited.

Added a facility for testing the performance of image uploading.

Fixed an omission in the error reporting code that caused alert emails to not get sent.

Monday June 18, 2007

Names can now be marked as deprecated.  The setting can be changed using the Edit Name page.

Synonyms support added.  Synonyms are used to verify names of observations and in species lists.

Synonyms can be changed for one name by selecting 'Change Synonyms' from any Show Name page.

Larger sets of names and synonyms can be added from the Bulk Name Edit page available from any Show
        Name page, the Name Index page or the All Names page.

The Name Index page only lists names that have observations.

The All Names page lists all names in the database and can be accessed from the Name Index page.

Fixed bug with Creating Observations immediately after creating a new account.

Monday May 21, 2007

One year anniversary!

Added Site Stats, Contributors, Show User, User Observations and Comments for User pages.

Sunday May 13, 2007

Fixed a variety of minor issues.

Added 'sanitize' calls to avoid cross-site scripting vulnerabilities.

Thursday May 10, 2007

Fixed bug in creating new names when creating a species list.

Sunday April 29, 2007

Substantially improved error handling.

Fixed problem with Google Web Accelerator.

Sunday April 22, 2007

Reorganized and simplified observation editing and creation.

Completed unit testing for existing pages.

Friday February 23, 2007

Adjusted the size of some of the notes widgets to fill more of the screen.

Monday February 19, 2007

Added note snippet and comment count to Show Image page for easier review.

Adjusted options available for the number of rows in list displays.

Fixed database migration scripts.

Internal data simplification (removed observations.what field).

Tuesday February 13, 2007

Added multiple upload option for Add Images.

Changed some of the links in the left hand panel based on user feedback.

Saturday February 10, 2007

Added image and location search within the site.

Thursday February 8, 2007

Added Google image search links to Observation and Name pages.

Wednesday February 7, 2007

Added checklists.  Items in the checklist are the results of the
            latest search or viewed species list.  Viewing large lists like
            'Latest Changes' or 'Name Index' will reset the checklist to all
            names.

Moved loading species lists from files to a separate page off of
            Edit Species List to avoid an interaction between the checklist
            and file loading.

Saturday January 27, 2007

Name edits now appear in the RSS feed.

Sunday January 21, 2007

Added How To Use page.

Changed 'New' links to 'Create'.

Fixed a bug with the search box.

Fixed a couple of bugs with the next/prev links.

Thursday January 11, 2007

Fixed a bug with creating new species.

Fixed many bugs with page titles, some of which were preventing pages from loading.

Tuesday January 9, 2007

Names are now database objects rather than just strings.  They have a
    rank, a text name an author and notes.

A show_name page shows this information as well as a list of all
    observations that use that Name.  The show_pages can be accessed from
    each show_observation page as well as the name_index page that is
    available in the left-side panel.

Names can be edited on the edit_name pages that are accessible from
    the show_name pages.  Anyone is allowed to edit any name, but
    following the Wikipedia model,
    a record is kept of every version.  The previous versions are stored as
    'past names'.  A show_past_name page shows the name information for a
    previous version of a name and is accessible from each show_name page.

Names are associated with observations through the 'what' field of the
    observation.  When the 'what' field is changed, the names are searched
    for a match.  The 'what' field can either be the text_name or the
    text_name and the author for a name.  No match is found for a 'what'
    value, then the user is given the option to create the new name.  If a
    'what' value matches more than one name (due to different authors
    publishing the same name), then the user is given a choice between the
    options.  The options list how many observations use each version of
    the name.  If you add an author to a 'what' field for a name that does
    not have an author already, it will ask you if you want to create the
    new name, but it will actually update the existing name.

Names given in species lists are treated in the exact same manner,
    except that all the new names and all of the multiple matches are
    dealt with on the same page.  There is also an option on the
    new_species_list and edit_species_list pages to 'Just Create New
    Names'.  This adds the names without updating the species list or
    creating the corresponding observations.

The search box is now available on every page.

Removed the Observation Index in favor of the Name Index.

Fixed some of the list ordering to make it more intuitive.

A filter was added to the account creation process that should reduce the
    number of bot created users.

Fixed a bug with bouncing between observations and images and using the
    next/prev links.

Monday December 18, 2006

Added prev/next links that follow the RSS feed.

Improved prev/next functionality throughout the site.

RSS feed descriptions now have appropriate line breaks.

Monday December 4, 2006

Species lists can now be uploaded from files.

Separated note for species list from note that applies to member observations.

Fixed use of multiple tabs by switching from session data to hidden fields.

mushroomobserver.org/# == mushroomobserver.org/observer/show_observation/#

Monday October 26, 2006

Switched Observations->By Name to include thumbnails and follow layout.

Maintained old By Name behavior as Observations->Index.

Added simple search box to Activity Log (Latest Changes) and Observation list pages.

Monday October 23, 2006

Changed default page to the RSS feed.

Changed page layout for observation and image list pages.

Added layout controls to user preferences.  Set to 10 rows x 1 column
		and turn off 'Put text below images' to get old layout.

Changed thumbnail image size from 100px to 160px with lower quality (jpeg 50 vs. 75).

Provided Prev/Next buttons for images.

Added link to ask the webmaster a question about the site.

Split up 'Manage Images' into 'Add Image', 'Reuse Image' and 'Remove Images' and made
		them more visible.

'Reuse Image' allows you to look at the images.

Added links for viewing the log for observations and species lists.

Made database lookup for all observations much more efficient.

Rearranged left-hand panel.

Images no longer have titles.  They are derived from the observation(s) they are
		connected to.

Removed Edit and Destroy links from view pages.

Add mini-icon for webpages.

Sunday September 9, 2006

Links to email the creator of observations or images with questions or commerical inquiries.  The creator receives an email with the address of the user who wants to contact them.  It is up to the creator whether they want to respond.

User preferences added to disable the above email feature and to stop receiving emails like this letting you know about new features.

RSS feed has been overhauled to reduce the number of entries and make them more relevant.

Copyright holder now has an option to be something other than a registered user.  The user who uploads the image is the default, but it can now be changed on a per image basis.

Monday August 21, 2006

Added RSS feed for all interesting events that happen on the site.

Added 'Create Account' link on login page to make it more obvious.

Tweaked page titles to make the site easier to index.

Sunday August 13, 2006

Added this news page.

List pages now have a better interface for paging than just next/previous,
and its at the top and bottom of each page.

Saturday August 12, 2006

Added email verification system to user signup.