Update version number to 0.12.3

Update version number to 0.12.3

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <title><%= render :partial => "/sites/#{APP_CONFIG[:style]}/title" %><%=h ": " + @pagename if not @pagename.blank? %><%=h ": " + @content_for_pagename if not @content_for_pagename.blank? %></title>
  <%= stylesheet_link_tag 'common/common', APP_CONFIG[:style] %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag "ie_no_more.js" %>
  <%= active_scaffold_includes %>

  <%= yield :feed %>
  <link rel="shortcut icon" href="/images/<%= APP_CONFIG[:style] %>/favicon.ico" />
  <meta name="Keywords" content="carbon calculator, carbon footprint, climate change, global warming"/>
  <meta name="Description" content="Saving the planet, together! Calculate your daily carbon footprint, take action to reduce it, and share it with your friends!"/>
  <meta name="Author" content="James Smith"/>

<%= smack_down_ie6 %>

<% unless params[:controller] == "main" and params[:action] == "index" %>

  <% if @current_user.nil? %>
    <%= image_tag 'user.png' %>
    <%= link_to("Log In or Sign Up", { :controller => "/main", :action => "index" } ) %>
  <% else %>
    <%= image_tag @current_user.image %>
    <%= image_tag @current_user.flag %>
    <%= link_to h(@current_user.name), :controller => '/profile', :login => @current_user.login %>

    <%= link_to("Settings", { :controller => "/user", :action => "edit" } ) %>
    <%= link_to("Log Out", { :controller => "/user", :action => "logout" } ) %>
  <% end %>

<% end %>

<%= whitelabel_content 'header' %>

<%= render :partial => "/sites/#{APP_CONFIG[:style]}/linkbar" %>

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<% if @content_for_optionbar %>

  <%= yield :optionbar %>

<% end %>

<% unless (@pagename.nil? or @pagename.blank?) and @content_for_pagename.nil? %>

        <%= @content_for_pageicon unless @content_for_pageicon.nil? %>
        <%=h @content_for_pagename || @pagename %>

<% end %>
<%= yield %>

powered by The Carbon Diet: version 0.12.3

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <title><%= render :partial => "/sites/#{APP_CONFIG[:style]}/title" %><%=h ": " + @pagename if not @pagename.blank? %><%=h ": " + @content_for_pagename if not @content_for_pagename.blank? %></title>
  <%= stylesheet_link_tag 'common/common', APP_CONFIG[:style] %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag "ie_no_more.js" %>
  <%= active_scaffold_includes %>

  <%= yield :feed %>
  <link rel="shortcut icon" href="/images/<%= APP_CONFIG[:style] %>/favicon.ico" />
  <meta name="Keywords" content="carbon calculator, carbon footprint, climate change, global warming"/>
  <meta name="Description" content="Saving the planet, together! Calculate your daily carbon footprint, take action to reduce it, and share it with your friends!"/>
  <meta name="Author" content="James Smith"/>

<%= smack_down_ie6 %>

<% unless params[:controller] == "main" and params[:action] == "index" %>

  <% if @current_user.nil? %>
    <%= image_tag 'user.png' %>
    <%= link_to("Log In or Sign Up", { :controller => "/main", :action => "index" } ) %>
  <% else %>
    <%= image_tag @current_user.image %>
    <%= image_tag @current_user.flag %>
    <%= link_to h(@current_user.name), :controller => '/profile', :login => @current_user.login %>

    <%= link_to("Settings", { :controller => "/user", :action => "edit" } ) %>
    <%= link_to("Log Out", { :controller => "/user", :action => "logout" } ) %>
  <% end %>

<% end %>

<%= whitelabel_content 'header' %>

<%= render :partial => "/sites/#{APP_CONFIG[:style]}/linkbar" %>

<% if flash[:notice] %>

<%=h flash[:notice] %>

<% end %>

<% if @content_for_optionbar %>

  <%= yield :optionbar %>

<% end %>

<% unless (@pagename.nil? or @pagename.blank?) and @content_for_pagename.nil? %>

        <%= @content_for_pageicon unless @content_for_pageicon.nil? %>
        <%=h @content_for_pagename || @pagename %>

<% end %>
<%= yield %>

powered by The Carbon Diet: version 0.12.2


only display this select menu if @use_tags is true

<% -%>
<% if @use_tags -%>
  <div id="tags_selector" style="float:right;">
    Filter Tags:
    <%= collection_select :filter, :tag, @all_tags, :name, :name, {:include_blank => "All Tags"},
        {:onchange => "#{remote_function(:url => {:controller => 'simple_calendar', :action => 'render_all_with_tag'},
         :with => "'tag='+this.value+'&mode=#{@mode}&date=#{@date}'")}"} %>
  </div>
  <%= javascript_tag("$('filter_tag').value = \"#{@selected_tag}\";") %>
<% end -%>

<% -%>
<div id="tags_selector" style="float:right;">
  Filter Tags:
  <%= collection_select :filter, :tag, @all_tags, :name, :name, {:include_blank => "All Tags"},
      {:onchange => "#{remote_function(:url => {:controller => 'simple_calendar', :action => 'render_all_with_tag'},
       :with => "'tag='+this.value+'&mode=#{@mode}&date=#{@date}'")}"} %>
</div>
<%= javascript_tag("$('filter_tag').value = \"#{@selected_tag}\";") %>


Copied the wrong controller method into the view when revising. Had to point it back to add_assignment_participant

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

Assignment Participants

<%if @participants.length > 0%>

	E-mail on ...

Name	Full NameEmail Address	Role	Parent	Review	Submission	Review of Review

<% for user in @participants %>

    <%= link_to user.name, :action => 'show',
	    :id => user.id %>
    <%= user.fullname %>
    <%= user.email %>
    <%= link_to user.role.name, :controller => 'roles',
            :action => 'show', :id => user.role.id %>
    <%= (User.find_by_id(user.parent_id)).name %>
    <%= UsersController.yesorno(user.email_on_review) %>
    <%= UsersController.yesorno(user.email_on_submission) %>
    <%= UsersController.yesorno(user.email_on_review_of_review) %>
    <%= link_to 'Remove', {:action => 'remove_assignment_participant', :id => user.id, :assignment_id => @assignment},
:confirm => 'Remove this participant?', :post => true %>

<% end -%>

<% end -%>

<%=
	render :partial => 'add_individual',
		:locals => {:form_action => "add_assignment_participant",
					:obj_type => "assignment_id",
					:obj_id => @assignment.id}
%>
<%=
	render :partial => 'import_roster',
		:locals => {:obj_type => "assignment_id",
					:obj_id => @assignment.id}
%>

Assignment Participants

<%if @participants.length > 0%>

	E-mail on ...

Name	Full NameEmail Address	Role	Parent	Review	Submission	Review of Review

<% for user in @participants %>

    <%= link_to user.name, :action => 'show',
	    :id => user.id %>
    <%= user.fullname %>
    <%= user.email %>
    <%= link_to user.role.name, :controller => 'roles',
            :action => 'show', :id => user.role.id %>
    <%= (User.find_by_id(user.parent_id)).name %>
    <%= UsersController.yesorno(user.email_on_review) %>
    <%= UsersController.yesorno(user.email_on_submission) %>
    <%= UsersController.yesorno(user.email_on_review_of_review) %>
    <%= link_to 'Remove', {:action => 'remove_assignment_participant', :id => user.id, :assignment_id => @assignment},
:confirm => 'Remove this participant?', :post => true %>

<% end -%>

<% end -%>

<%=
	render :partial => 'add_individual',
		:locals => {:form_action => "add_participant",
					:obj_type => "assignment_id",
					:obj_id => @assignment.id}
%>
<%=
	render :partial => 'import_roster',
		:locals => {:obj_type => "assignment_id",
					:obj_id => @assignment.id}
%>


tweakin stop button

tweakin stop button

<!DOCTYPE html>

    <title>Duke - The CIJoe Manager</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="/stylesheets/reset.css" />
    <link rel="stylesheet" href="/stylesheets/base.css" />
    <link rel="stylesheet" href="/stylesheets/custom.css" />
    <link rel="stylesheet" href="/stylesheets/button.css" />

    <hgroup>

Duke

The CIJoe Manager

    </hgroup>

          <form id="create" action="/projects" method="post">
            <input name="project[repo_url]" placeholder="Repository"/>
            <button type="submit" class="blue">Create</button>
          </form>

        <% @projects.each do |project| %>
          <li class="project<%= status_style(project) %>">
            <% if project.running? %>
              <a class="chunky-text" href="<%= project.url %>"><%= project.repo_dir %>
              <form class="stop" method="post" action="/projects/<%= project.repo_dir %>">
                <input type="hidden" name="_method" value="put">
                <button type="submit" class="black">Stop</button>
              </form>

<%= project.port %>

            <% else %>

<%= project.repo_dir %>

              <form class="start" method="post" action="/projects/<%= project.repo_dir %>">
                <input type="hidden" name="_method" value="put">
                <button type="submit" class="blue">Start</button>
                <input name="project[port]" placeholder="Port"/>
              </form>
            <% end %>

        <% end %>

<!DOCTYPE html>

    <title>Duke - The CIJoe Manager</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="/stylesheets/reset.css" />
    <link rel="stylesheet" href="/stylesheets/base.css" />
    <link rel="stylesheet" href="/stylesheets/custom.css" />
    <link rel="stylesheet" href="/stylesheets/button.css" />

    <hgroup>

Duke

The CIJoe Manager

    </hgroup>

          <form id="create" action="/projects" method="post">
            <input name="project[repo_url]" placeholder="Repository"/>
            <button type="submit" class="blue">Create</button>
          </form>

        <% @projects.each do |project| %>
          <li class="project<%= status_style(project) %>">
            <% if project.running? %>
              <a class="chunky-text" href="<%= project.url %>"><%= project.repo_dir %>
              <form class="stop" action="/projects/<%= project.repo_dir %>">
                <input type="hidden" name="_method" value="PUT">
                <button type="submit" class="black">Stop</button>
              </form>

<%= project.port %>

            <% else %>

<%= project.repo_dir %>

              <form class="start" method="post" action="/projects/<%= project.repo_dir %>">
                <input type="hidden" name="_method" value="put">
                <button type="submit" class="blue">Start</button>
                <input name="project[port]" placeholder="Port"/>
              </form>
            <% end %>

        <% end %>


git-svn-id: http://svn.castleproject.org:8080/svn/castle/trunk@129 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;
		}
	}
}

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

In others container you usually have to proxy a component
in order to implement a chain of interceptors. The MicroKernel
exposes an interesting infrastructure to allow interceptor in a
painless fashion.

Basically facilies can associate one or more interceptors with a component.
When the component is activated the MicroKernel checks whether
is there 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) ) );
}

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.
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 must
implement (correctly) the interface IMethodInterceptor.

The transactional interceptor code follows:

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;
		}
	}
}


tweaking pagination visibility according to ticket #464

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Typo in layout/text fixed.

Typo in layout/text fixed.

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

    <% if defined? feeds %>
      <% feeds.each do |title, feed| %>
        <link rel="alternate" type="application/atom+xml" href="<%= attr_h feed %>" title="<%= attr_h title %>" />
      <% end %>
    <% end %>

    <%= CortexReaver::MainController.render_view('head') %>

  <body class="<%= @body_class %>">
    <%= CortexReaver::MainController.render_view('js') %>

    <%= CortexReaver::MainController.render_view('adminbox') %>

        <% if @model %>
          <%= model_nav @model %>
        <% end %>

<%=h CortexReaver.config.site.name %>

        <%= sidebar %>

          <%= flashbox %>

          <%= @content %>

          Copyright © <% if @model %>
            <%= @model.updated_on.year %>
            <%= user_link @model %>
          <% else %>
            <%= CortexReaver.content_range.begin.year %>—<%= CortexReaver.content_range.end.year %>
            <%=h CortexReaver.config.site.author %>
          <% end %>

    <%= CortexReaver::MainController.render_view('tracker') %>

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

    <% if defined? feeds %>
      <% feeds.each do |title, feed| %>
        <link rel="alternate" type="application/atom+xml" href="<%= attr_h feed %>" title="<%= attr_h title %>" />
      <% end %>
    <% end %>

    <%= CortexReaver::MainController.render_view('head') %>

  <body class="<%= @body_class %>">
    <%= CortexReaver::MainController.render_view('js') %>

    <%= CortexReaver::MainController.render_view('adminbox') %>

        <% if @model %>
          <%= model_nav @model %>
        <% end %>

<%=h CortexReaver.config.site.name %>

        <%= sidebar %>

          <%= flashbox %>

          <%= @content %>

          Copyright © <% if @model %>
            <%= @model.updated_on.year %>
            <%= user_link @model %>
          <% else %>
            <%= CortexReaver.config.content_range.begin.year %>—<%= CortexReaver.config.content_range.end.year %>
            <%=h CortexReaver.config.site.author %>
          <% end %>

    <%= CortexReaver::MainController.render_view('tracker') %>


Improve the save constraints feature to only show the save box when save is clicked

git-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@540563 13f79535-47bb-0310-9956-ffa450edef68

  <% form_tag(:action=>'add_query') do %>
    <%= text_field_with_auto_complete :search, :query %>
    <%=submit_tag "search"%>
  <% end %>

<% if @flare.facet_queries.size > 0%>

  saved searches

<% @flare.facet_queries.each do |name,value|
     count = @response.data['facet_counts']['facet_queries'][value[:real_query]]
%>

  <%= image_tag "pie_#{(count * 100.0 / @response.total_hits).ceil rescue 0}.png"%>
  <%= link_to "#{name} (#{count})", {:action => 'add_saved_search', :name=>name}, {:title => value.inspect}%>
  <%= link_to "*", {:action => 'show_saved', :name => name}, {:target => '_blank'}%>
  <%=link_to image_tag("x-close.gif"), :action => :remove_saved_search, :name => name %>

<% end %>

<% end %>
<% @flare.facet_fields.each do |field|%>

<%= facet_label(field)%> <%=link_to "[browse]", :action => 'facet', :field => field%>

  <% @response.field_facets(field).each do |f| %>

      <%= image_tag "pie_#{(f.value * 100.0 / @response.total_hits).ceil}.png"%>
      <%= link_to "#{f.name} (#{f.value})", :action => 'add_filter', :field=>field, :value=>f.name%>

  <% end %>

<% end %>
<%=link_to image_tag("simile-exhibit.png"), :controller => :simile, :action => :exhibit %>

		<%=link_to '[clear constraints]', :action => 'clear'%>

  Saved searches:

      <% @flare.applied_facet_queries.each_with_index do |q, i| %>
            <%=link_to q[:negative] ? "-" : "+", :action => :invert_saved_constraint, :index => i%>
            <%=q[:name]%>
            <%=link_to image_tag("x-close.gif"), :action => :remove_saved_constraint, :index => i %>

      <% end %>

Queries:

<% @flare.queries.each_with_index do |q,i| %>
<%=link_to q[:negative] ? "-" : '+', :action => :invert_query, :index => i%>
<span id="query_<%=i%>"><%=q[:query]%>
<%= in_place_editor "query_#{i}", :url=> url_for(:action=>"update_query", :index=>i, :script=>true) %>
<%=link_to image_tag("x-close.gif"), :action => :remove_query, :index => i %>

<% end %>

Filters:

<% @flare.filters.each_with_index do |filter, i| %>
      <%=link_to filter[:negative] ? "-" : "+", :action => :invert_filter, :index => i%>
      <%=filter[:field]%>:<%=filter[:value]%>
      <%=link_to image_tag("x-close.gif"), :action => :remove_filter, :index => i %>

<% end %>

	<%=link_to '[clear constraints]', :action => 'clear'%>

<% form_tag({:action=>'save'},{:id => 'savesearch', :style => "display:none;"}) do %>
  <%= text_field_tag :name, "", {:size => 10, :id => "savesearch_name"} %>
  <%= link_to_function "save", "document.forms['savesearch'].submit();" -%>
  <%= link_to_function "cancel", "Element.toggle('savesearch'); Element.toggle('savesearch_link')" -%>
<% end %>
<%= link_to_function "[save these constraints]", "Element.toggle('savesearch'); Element.toggle('savesearch_link'); $('savesearch_name').focus()", {:id => "savesearch_link"} -%>

<% if @flare.empty_constraints? %>
  search or facet to see results
<% else %>

Results <%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%> of <%=@response.total_hits%>

  <% @response.each do |doc| %>
    <%= render :partial => "document/document_#{SOLR_ENV}", :locals => {:doc => doc, :response => @response}%>
  <% end %>

<%=link_to_if @flare.page != 1,  "<<", :page => @flare.page - 1%> Results <%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%> of <%=@response.total_hits%><%=link_to_if @flare.page < (@response.total_hits.to_f / @results_per_page).ceil, ">>", :page => @flare.page + 1%>

<% end %>

  <% form_tag(:action=>'add_query') do %>
    <%= text_field_with_auto_complete :search, :query %>
    <%=submit_tag "search"%>
  <% end %>

<% if @flare.facet_queries.size > 0%>

  saved searches

<% @flare.facet_queries.each do |name,value|
     count = @response.data['facet_counts']['facet_queries'][value[:real_query]]
%>

  <%= image_tag "pie_#{(count * 100.0 / @response.total_hits).ceil rescue 0}.png"%>
  <%= link_to "#{name} (#{count})", {:action => 'add_saved_search', :name=>name}, {:title => value.inspect}%>
  <%= link_to "*", {:action => 'show_saved', :name => name}, {:target => '_blank'}%>
  <%=link_to image_tag("x-close.gif"), :action => :remove_saved_search, :name => name %>

<% end %>

<% end %>
<% @flare.facet_fields.each do |field|%>

<%= facet_label(field)%> <%=link_to "[browse]", :action => 'facet', :field => field%>

  <% @response.field_facets(field).each do |f| %>

      <%= image_tag "pie_#{(f.value * 100.0 / @response.total_hits).ceil}.png"%>
      <%= link_to "#{f.name} (#{f.value})", :action => 'add_filter', :field=>field, :value=>f.name%>

  <% end %>

<% end %>
<%=link_to image_tag("simile-exhibit.png"), :controller => :simile, :action => :exhibit %>

		<%=link_to '[clear constraints]', :action => 'clear'%>

  Saved searches:

      <% @flare.applied_facet_queries.each_with_index do |q, i| %>
            <%=link_to q[:negative] ? "-" : "+", :action => :invert_saved_constraint, :index => i%>
            <%=q[:name]%>
            <%=link_to image_tag("x-close.gif"), :action => :remove_saved_constraint, :index => i %>

      <% end %>

Queries:

<% @flare.queries.each_with_index do |q,i| %>
<%=link_to q[:negative] ? "-" : '+', :action => :invert_query, :index => i%>
<span id="query_<%=i%>"><%=q[:query]%>
<%= in_place_editor "query_#{i}", :url=> url_for(:action=>"update_query", :index=>i, :script=>true) %>
<%=link_to image_tag("x-close.gif"), :action => :remove_query, :index => i %>

<% end %>

Filters:

<% @flare.filters.each_with_index do |filter, i| %>
      <%=link_to filter[:negative] ? "-" : "+", :action => :invert_filter, :index => i%>
      <%=filter[:field]%>:<%=filter[:value]%>
      <%=link_to image_tag("x-close.gif"), :action => :remove_filter, :index => i %>

<% end %>

	<%=link_to '[clear constraints]', :action => 'clear'%>

<% form_tag(:action=>'save') do %>
  <%= text_field_tag :name %>
  <%=submit_tag "save"%>
<% end %>

<% if @flare.empty_constraints? %>
click click click
<% else %>

Results <%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%> of <%=@response.total_hits%>

  <% @response.each do |doc| %>
    <%= render :partial => "document/document_#{SOLR_ENV}", :locals => {:doc => doc, :response => @response}%>
  <% end %>

<%=link_to_if @flare.page != 1,  "<<", :page => @flare.page - 1%> Results <%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%> of <%=@response.total_hits%><%=link_to_if @flare.page < (@response.total_hits.to_f / @results_per_page).ceil, ">>", :page => @flare.page + 1%>

<% end %>


colour-changing tabs!!!

colour-changing tabs!!!

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

	<%= stylesheet_link_tag 'andreas06' %>
	<%= javascript_include_tag :defaults %>
	<%= calendar_date_select_includes "freelibrary" %>
	<link rel="icon" href="<%= url_for '/favicon.ico' %>">

Skip to: site menu | section menu | main content

e.f.l.

		Edmonton Free Library

Site menu:

		<% uri = request.request_uri -%>
		<%= navitab 'Welcome', url_for('/'), uri == '/' %>
		<%= navitab "What's New!", url_for('/new'), uri.match(/^\/new/)  %>

		<%= navitab 'Books', books_path, uri.match(/\/books/) %>
		<%= navitab 'Videos', videos_path, uri.match(/\/videos/) %>

		<%= navitab 'Tags', tags_path, uri.match(/\/tags/) %>

		<%= navitab 'Find Out More', url_for('/about'), uri.match(/\/about/) %>

Back to top

e.f.l.

			<%= render :partial => 'layouts/menublock' %>

				<% if flash[:notice] %>

						Notice:

<%= flash[:notice].untaint %>

				<% elsif flash[:error] %>

						Error:

<%= flash[:error].untaint %>

				<% end %>

				<%= yield  %>

Back to top

Copyright 2009 Michael Edwards, Brendan Taylor (source) | Design by Andreas Viklund

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

	<%= stylesheet_link_tag 'andreas06' %>
	<%= javascript_include_tag :defaults %>
	<%= calendar_date_select_includes "freelibrary" %>
	<link rel="icon" href="<%= url_for '/favicon.ico' %>">

Skip to: site menu | section menu | main content

e.f.l.

		Edmonton Free Library

Site menu:

		<%= navitab 'Welcome', url_for('/'), true %>
		<%= navitab "What's New!", url_for('/new'), false %>

		<%= navitab 'Books', books_path, false %>
		<%= navitab 'Videos', videos_path, false %>

		<%= navitab 'Tags', tags_path, false %>

		<%= navitab 'Find Out More', url_for('/about'), false %>

Back to top

e.f.l.

			<%= render :partial => 'layouts/menublock' %>

				<% if flash[:notice] %>

						Notice:

<%= flash[:notice].untaint %>

				<% elsif flash[:error] %>

						Error:

<%= flash[:error].untaint %>

				<% end %>

				<%= yield  %>

Back to top

Copyright 2009 Michael Edwards, Brendan Taylor (source) | Design by Andreas Viklund


Fixed table IDs being generated in list view for multi-word model names.

<table class="sl_list" id="sl_list_<%= model_name.tableize %>">

  <% list_columns.each do |column| %>
    <%= column.render_th(streamlined_request_context, self )%>
  <% end %>
  <%= streamlined_table_row_button_header %>

  <% odd = false %>
  <% for item in @streamlined_items %>
    <% odd = !odd %>
    <tr class="<%= odd ? 'odd' : 'even'%> <%= model_ui.style_class_for(:list, :row, item) %>">
    <% list_columns.each do |column| %>
      <% if column.is_displayable_in_context?(self, item) %>
        <td class="<%= model_ui.style_class_for(:list, :cell, item) %>">
		      <% contents = column.render_td(self, item) %>
		      <%= contents.blank? ? ' ' : contents %>

        <% end %>
      <% end %>
    <%= streamlined_table_row_buttons(item) %>

  <% end %>

<% if @streamlined_item_pages != [] && @streamlined_item_pages.current.previous %>

<% else %>

<% end %>

<table class="sl_list" id="sl_list_<%= model_name.downcase.pluralize %>">

  <% list_columns.each do |column| %>
    <%= column.render_th(streamlined_request_context, self )%>
  <% end %>
  <%= streamlined_table_row_button_header %>

  <% odd = false %>
  <% for item in @streamlined_items %>
    <% odd = !odd %>
    <tr class="<%= odd ? 'odd' : 'even'%> <%= model_ui.style_class_for(:list, :row, item) %>">
    <% list_columns.each do |column| %>
      <% if column.is_displayable_in_context?(self, item) %>
        <td class="<%= model_ui.style_class_for(:list, :cell, item) %>">
		      <% contents = column.render_td(self, item) %>
		      <%= contents.blank? ? ' ' : contents %>

        <% end %>
      <% end %>
    <%= streamlined_table_row_buttons(item) %>

  <% end %>

<% if @streamlined_item_pages != [] && @streamlined_item_pages.current.previous %>

<% else %>

<% end %>


Apply path from <raidel@onemail.at> to fix the Archive sidebar's current month link when viewing an article's page. Fixes #642

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

<% unless @archives.blank? %>

Archives

  <% @archives.each do |month| %>

      <%= link_to month[:name], :controller => "articles", :action => "find_by_date", :year => month[:year], :month => month[:month], :day => nil %>
      <%= "(#{month[:count]})" if @sb_config['show_count'] %>

  <% end %>

<% end %>

<% unless @archives.blank? %>

Archives

  <% @archives.each do |month| %>

      <%= link_to month[:name], :controller => "articles", :action => "find_by_date", :year => month[:year], :month => month[:month] %>
      <%= "(#{month[:count]})" if @sb_config['show_count'] %>

  <% end %>

<% end %>


Remove SOTM advert from site.

Remove SOTM advert from site.


Give some space to the button

Give some space to the button

(ActionItem1675)

<%= _('Editing Appearance') %>

<%= _('Select template') %>

  <% for templates in @layout_templates.in_groups_of(3) %>

      <% for template in templates %>
        <%
          selected = (!template.nil? && (@current_template == template.id))
        %>

          <% if template %>
            <%= image_tag("/designs/templates/#{template.id}/thumbnail.png", :alt => _('The "%s" template')) %>
          <% end %>

        <td <%= 'class="selected template"' if selected %>>
          <% if template %>
            <%= template.id %> <%= _('(current)') if selected %>

            <%= link_to(_('Use this template'), :action => 'set_layout_template', :id => template.id) unless selected %>
          <% end %>

      <% end %>

  <% end %>

  <% if !@themes.empty? %>

<%= _('Select theme') %>

        <% button_bar do %>
          <%= button :home, _('Use the default theme'), { :action => 'unset'}, :method => 'post', :confirm => _('Are you sure you want to use the environment default theme?') %>
        <% end %>

    <% for themes in @themes.in_groups_of(3)  %>

        <% for theme in themes %>
          <%
            selected = (!theme.nil? && (theme.id == @current_theme))
          %>

            <%# FIXME add proper thumbnails %>
            <% if theme %>
              <%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) %>
            <% end %>

          <td <%= 'class="selected theme"' if selected %>>
            <% if theme %>
              <%= theme.name %> <%= _('(current)') if selected %>

              <%= link_to(_('Use this theme'), :action => 'set', :id => theme.id) unless selected %>
            <% end %>

        <% end %>

    <% end %>
  <% end %>

  <% if environment.enabled?('user_themes') %>

<%= _('My themes') %>

    <% for themes in profile.themes.in_groups_of(3)  %>

        <% for theme in themes %>

            <%# FIXME add proper thumbnails %>
            <%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) if theme %>

            <%= theme.name if theme%>

            <%= link_to(_('Edit this theme'), :action => 'edit', :id => theme.id) if theme %>

            <%= link_to(_('Test this theme'), :action => 'start_test', :id => theme.id) if theme %>

        <% end %>

    <% end %>
  <% end %>

<% button_bar do %>
  <% if environment.enabled?('user_themes') %>
    <%= lightbox_button(:add, _('New theme ...'), :action => 'new') %>
  <% end %>
  <%= button(:back, _('Back'), :controller => 'profile_editor', :action => 'index') %>
<% end %>

<%= _('Editing Appearance') %>

<%= _('Select template') %>

  <% for templates in @layout_templates.in_groups_of(3) %>

      <% for template in templates %>
        <%
          selected = (!template.nil? && (@current_template == template.id))
        %>

          <% if template %>
            <%= image_tag("/designs/templates/#{template.id}/thumbnail.png", :alt => _('The "%s" template')) %>
          <% end %>

        <td <%= 'class="selected template"' if selected %>>
          <% if template %>
            <%= template.id %> <%= _('(current)') if selected %>

            <%= link_to(_('Use this template'), :action => 'set_layout_template', :id => template.id) unless selected %>
          <% end %>

      <% end %>

  <% end %>

  <% if !@themes.empty? %>

<%= _('Select theme') %>

        <%= button :home, _('Use the default theme'), { :action => 'unset'}, :method => 'post', :confirm => _('Are you sure you want to use the environment default theme?') %>

    <% for themes in @themes.in_groups_of(3)  %>

        <% for theme in themes %>
          <%
            selected = (!theme.nil? && (theme.id == @current_theme))
          %>

            <%# FIXME add proper thumbnails %>
            <% if theme %>
              <%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) %>
            <% end %>

          <td <%= 'class="selected theme"' if selected %>>
            <% if theme %>
              <%= theme.name %> <%= _('(current)') if selected %>

              <%= link_to(_('Use this theme'), :action => 'set', :id => theme.id) unless selected %>
            <% end %>

        <% end %>

    <% end %>
  <% end %>

  <% if environment.enabled?('user_themes') %>

<%= _('My themes') %>

    <% for themes in profile.themes.in_groups_of(3)  %>

        <% for theme in themes %>

            <%# FIXME add proper thumbnails %>
            <%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) if theme %>

            <%= theme.name if theme%>

            <%= link_to(_('Edit this theme'), :action => 'edit', :id => theme.id) if theme %>

            <%= link_to(_('Test this theme'), :action => 'start_test', :id => theme.id) if theme %>

        <% end %>

    <% end %>
  <% end %>

<% button_bar do %>
  <% if environment.enabled?('user_themes') %>
    <%= lightbox_button(:add, _('New theme ...'), :action => 'new') %>
  <% end %>
  <%= button(:back, _('Back'), :controller => 'profile_editor', :action => 'index') %>
<% end %>


fixed so user email is not displayed

fixed so user email is not displayed

User details

<%= error_messages_for 'user' %>
<%= start_form_tag :controller => 'user', :action => 'edit', :display_name => @user.display_name %>

Name	<%= @user.email %>

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

Display Name	<%= text_field :user, :display_name, :value => @user.display_name %>

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

Description	<%= text_area :user, :description, :value => @user.description, :class => "editDescription" %>

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

<% nearest_str = "" %>
<% if @user.home_lat and @user.home_lon %>

Users in your area

    <% if @user.nearby.empty? %>
    There are no users who admit to mapping in your area.  Better go out and spread the word about OSM!
    <% else %>

These users are mapping in your area:

    Name
    Contact

    <% @user.nearby(1,1).each do |nearby| %>
    <% nearest_str = "nearest.push( { 'display_name' : '#{nearby.display_name}', 'home_lat' : #{nearby.home_lat}, 'home_lon' : #{nearby.home_lon} } )" %>

    <%= link_to nearby.display_name, :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
    <%= link_to 'send message', :controller => 'message', :action => 'new', :display_name => nearby.display_name %>

    <%end%>

    <%end%>

<% end %>

Click on the map to (re)set your location

<% if @user.home_lat and @user.home_lon %>
    <% marker = true %>
    <% mlon = @user.home_lon %>
    <% mlat = @user.home_lat %>
    <% lon =  @user.home_lon %>
    <% lat =  @user.home_lat  %>
    <% zoom =  '12' %>

<% else %>
    <% lon =  params['lon'] || '-0.1' %>
    <% lat =  params['lat'] || '51.5' %>
    <% zoom =  params['zoom'] || '4' %>
<% end %>

Privacy

<% if @user.data_public? %>
  All your edits are public.
<% else %>
  Currently your edits are anonymous and people can't find out where you are located. To show what you edited and allow people to contact you through the website, click the button below. This action cannot be reversed.

  <%= start_form_tag :controller => 'user', :action => 'go_public'%>
  <%= submit_tag 'Make all my edits public, forever' %>
  <%= end_form_tag %>
<% end %>

User details

<%= error_messages_for 'user' %>
<%= start_form_tag :controller => 'user', :action => 'edit', :display_name => @user.display_name %>

Email	<%= @user.email %>

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

Display Name	<%= text_field :user, :display_name, :value => @user.display_name %>

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

Description	<%= text_area :user, :description, :value => @user.description, :class => "editDescription" %>

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

<% nearest_str = "" %>
<% if @user.home_lat and @user.home_lon %>

Users in your area

    <% if @user.nearby.empty? %>
    There are no users who admit to mapping in your area.  Better go out and spread the word about OSM!
    <% else %>

These users are mapping in your area:

    Email
    Name
    Contact

    <% @user.nearby(1,1).each do |nearby| %>
    <% nearest_str = "nearest.push( { 'display_name' : '#{nearby.display_name}', 'home_lat' : #{nearby.home_lat}, 'home_lon' : #{nearby.home_lon} } )" %>

    <%= nearby.email %>
    <%= nearby.display_name %>
    <%= link_to 'send message', :controller => 'message', :action => 'new', :display_name => nearby.display_name %>

    <%end%>

    <%end%>

<% end %>

Click on the map to (re)set your location

<% if @user.home_lat and @user.home_lon %>
    <% marker = true %>
    <% mlon = @user.home_lon %>
    <% mlat = @user.home_lat %>
    <% lon =  @user.home_lon %>
    <% lat =  @user.home_lat  %>
    <% zoom =  '12' %>

<% else %>
    <% lon =  params['lon'] || '-0.1' %>
    <% lat =  params['lat'] || '51.5' %>
    <% zoom =  params['zoom'] || '4' %>
<% end %>

Privacy

<% if @user.data_public? %>
  All your edits are public.
<% else %>
  Currently your edits are anonymous and people can't find out where you are located. To show what you edited and allow people to contact you through the website, click the button below. This action cannot be reversed.

  <%= start_form_tag :controller => 'user', :action => 'go_public'%>
  <%= submit_tag 'Make all my edits public, forever' %>
  <%= end_form_tag %>
<% end %>


changing review, author feedback, meta review and teammate review scores to refer to the scores table.

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

Feedback for <%= @student.assignment.name %>

<% @assgt = @assignment %>
<% @author = @student %>
<%= render :partial => '/review/wiki' %>
<%
    review_no = 1
    grade = 0
    for review_map in @review_mapping
        for review in review_map.reviews%>
                Review <%=review_no%> done on <%= review.created_at.strftime('%A %B %d %Y, %I:%M%p') %>  <a href="#1" onClick="toggleVis('<%=review_no %>');">
                                <span class="inline" id="<%=review_no %>_show">View
                                <span class="inline" id="<%=review_no %>_hide" style="display: none">Hide

                                <div id="<%=review_no%>_myDiv" style="display:none">

                        Question
                        Score
                        Comment

                     <%
                     for review_score in Score.find(:all, :conditions=>["instance_id=? and questionnaire_type_id=?",review.id, QuestionnaireType.find_by_name("Review").id])%>

                            <%=Question.find(review_score.question_id).txt%>	<%=review_score.score%>  	<%=review_score.comments%>

                    <%end%>

                    Additional comment : <%=review.additional_comment%>

				<%review_no +=1%>
        <%end
    end%>

    <% if review_no-1 <= 0 %>
        <%if @assignment.wiki_type_id == 2 %>
            <%if @assignment.team_assignment %>
                There is no feedback on your work yet.
            <%else%>
				<%_time1 = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s%>
                <%if review_mediawiki @assignment.directory_path, _time1, @user_name == ''%>
                    There is no feedback on your work because it seems that you have not submitted anything for this assignment.
                <%else%>
                    There is no feedback on your work yet.
                <%end%>
            <%end%>
        <%else%>
            There is no feedback on your work yet.
        <%end%>
    <%end%>

Back

Feedback for <%= @student.assignment.name %>

<% @assgt = @assignment %>
<% @author = @student %>
<%= render :partial => '/review/wiki' %>
<%
    review_no = 1
    grade = 0
    for review_map in @review_mapping
        for review in review_map.reviews%>
                Review <%=review_no%> done on <%= review.created_at.strftime('%A %B %d %Y, %I:%M%p') %>  <a href="#1" onClick="toggleVis('<%=review_no %>');">
                                <span class="inline" id="<%=review_no %>_show">View
                                <span class="inline" id="<%=review_no %>_hide" style="display: none">Hide

                                <div id="<%=review_no%>_myDiv" style="display:none">

                        Question
                        Score
                        Comment

                     <%
                     for review_score in ReviewScore.find(:all, :conditions=>["review_id=? and questionnaire_type_id=?",review.id, QuestionnaireType.find_by_name("Author Feedback").id])%>

                            <%=Question.find(review_score.question_id).txt%>	<%=review_score.score%>  	<%=review_score.comments%>

                    <%end%>

                    Additional comment : <%=review.additional_comment%>

				<%review_no +=1%>
        <%end
    end%>

    <% if review_no-1 <= 0 %>
        <%if @assignment.wiki_type_id == 2 %>
            <%if @assignment.team_assignment %>
                There is no feedback on your work yet.
            <%else%>
				<%_time1 = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s%>
                <%if review_mediawiki @assignment.directory_path, _time1, @user_name == ''%>
                    There is no feedback on your work because it seems that you have not submitted anything for this assignment.
                <%else%>
                    There is no feedback on your work yet.
                <%end%>
            <%end%>
        <%else%>
            There is no feedback on your work yet.
        <%end%>
    <%end%>

Back


Improve wording regarding pseudonyms on signup form.

<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %>
    <%= foi_error_messages_for :user_signup %>

If you're new to WhatDoTheyKnow

        Your e-mail:
        <%= text_field 'user_signup', 'email', { :size => 20 } %>

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

        Your name:
        <%= text_field 'user_signup', 'name', { :size => 20 } %>

        Your name will appear publically
        (why?)
        on this website and in search engines. We encourage you
        to use your real name, but you may use a
        pseudonym if you read this first.

        Password:
        <%= password_field 'user_signup', 'password', { :size => 15 } %>

        Password: (again)
        <%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %>

        <%= hidden_field_tag 'token', params[:token], { :id => 'signup_token' } %>
        <%= submit_tag "Sign up" %>

<% end %>

<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %>
    <%= foi_error_messages_for :user_signup %>

If you're new to WhatDoTheyKnow

    Your e-mail:
    <%= text_field 'user_signup', 'email', { :size => 20 } %>

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

    Your name:
    <%= text_field 'user_signup', 'name', { :size => 20 } %>

Your name will appear
    publically
    (details)
    on this website and in search engines. We encourage you
    to use your real name, but you may use a pseudonym if you would like to be
    anonymous.

    Password:
    <%= password_field 'user_signup', 'password', { :size => 15 } %>

    Password: (again)
    <%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %>

    <%= hidden_field_tag 'token', params[:token], { :id => 'signup_token' } %>
    <%= submit_tag "Sign up" %>

<% end %>


r511: refer to maillist in _no_projects message

Welcome to CruiseControl.rb!

There are no projects in the projects directory yet.

      To add a project, open command line in the directory where you unpacked this tool, and type:

  cruise add my_project --url http://my/project/subversion/trunk

      If you have a problem with this command, you may find that
      cruise help is ... helpful.
      If it isn't, there is always <%= link_to 'the manual', document_url('manual') %> and
      cruisecontrolrb-users@rubyforge.org mailing list.

Welcome to CruiseControl.rb!

There are no projects in the projects directory yet.

      To add a project, open command line in the directory where you unpacked this tool, and type:

  cruise add my_project --url http://my/project/subversion/trunk

      If you have a problem with this command, you may find that
      cruise help is ... helpful.
      If it doesn't help, there is always <%= link_to 'the manual', document_url('manual') %>.


Better message for new community under moderation

(ActionItem1254)

<% if @wizard %>
  <%= render :partial => 'account/wizard_steps' %>
<% end %>

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

<% if environment.enabled?('admin_must_approve_new_communities') %>

    <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%>

<%end %>

<%= error_messages_for :community %>

<% labelled_form_for :community, @community, :html => { :multipart => true } do |f| %>

  <%= required_fields_message %>

  <%= required f.text_field(:name) %>

  <%= hidden_field_tag :wizard, params[:wizard] %>

  <%= render :partial => 'shared/custom_fields', :locals => { :f => f, :object_name => 'community', :profile => @community, :only_required => true } %>

  <%= f.text_field('tag_list', :size => 64) %>
  <%= content_tag( 'small', _('Separate tags with commas.') + '
' + __("Tags are important to new users, they'll be able to find your new community more easily.") ) %>

  <% f.fields_for :image_builder, @community.image do |i| %>
    <%= file_field_or_thumbnail(_('Image:'), @community.image, i) %>
  <% end %>

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

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

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

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

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

  <% button_bar do %>
    <%= submit_button(:save, _('Create')) %>
    <% if @wizard %>
      <%= button(:back, _('Back'), {:controller => 'search', :action => 'assets', :asset => 'communities', :wizard => true}) %>
    <% else %>
      <%= button(:cancel, _('Cancel'), :action => 'index') %>
    <% end %>
  <% end %>

<% end %>

<% if @wizard %>
  <%= render :partial => 'account/wizard_steps' %>
<% end %>

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

<% if environment.enabled?('admin_must_approve_new_communities') %>

    <%= _("Your request for registering a community will be sent to %{environment} administrator and will be approved or rejected according to his methods and creteria.") % { :environment => environment.name }%>

<%end %>

<%= error_messages_for :community %>

<% labelled_form_for :community, @community, :html => { :multipart => true } do |f| %>

  <%= required_fields_message %>

  <%= required f.text_field(:name) %>

  <%= hidden_field_tag :wizard, params[:wizard] %>

  <%= render :partial => 'shared/custom_fields', :locals => { :f => f, :object_name => 'community', :profile => @community, :only_required => true } %>

  <%= f.text_field('tag_list', :size => 64) %>
  <%= content_tag( 'small', _('Separate tags with commas.') + '
' + __("Tags are important to new users, they'll be able to find your new community more easily.") ) %>

  <% f.fields_for :image_builder, @community.image do |i| %>
    <%= file_field_or_thumbnail(_('Image:'), @community.image, i) %>
  <% end %>

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

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

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

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

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

  <% button_bar do %>
    <%= submit_button(:save, _('Create')) %>
    <% if @wizard %>
      <%= button(:back, _('Back'), {:controller => 'search', :action => 'assets', :asset => 'communities', :wizard => true}) %>
    <% else %>
      <%= button(:cancel, _('Cancel'), :action => 'index') %>
    <% end %>
  <% end %>

<% end %>


Added line breaks in comment list.

Added line breaks in comment list.

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

<%= link_to 'Add Comment', :action => 'add_comment', :id => @observation %> |
<%= link_to 'Edit Observation', :action => 'edit_observation', :id => @observation %>

Observation: <%= h @observation.unique_name %>

When: <%= @observation.when %>

Where: <%= h @observation.where %>

What: <%= h @observation.what %>

Who: <%= h @observation.who %>

<%= if @observation.specimen
            'Herbarium specimen available'
         else
            'No herbarium specimen'
         end %>

Notes:
<%= textilize @observation.notes %>

      Comments:

      <% for comment in @observation.comments.sort {|x,y| y.created <=> x.created } %>
        <%= link_to sprintf("%s: %s", truncate(h(comment.who), MAX_WHO_LENGTH),
                            truncate(h(comment.summary), MAX_FIELD_LENGTH)),
                    :action => 'show_comment', :id => comment %>

      <% end %>

      Observation created: <%= @observation.created %>

      Last modified: <%= @observation.modified %>

    <%= link_to 'Add Image', :action => 'add_image', :id => @observation %>

    <% for image in @observation.images %>

<%= link_to(' "img_thumb", :id => image.id) +
              '"/>
' + h(image.unique_name),
            :action => 'show_image', :id => image.id) %>

    <% end %>


added active table wrapper

added active table wrapper

<% action_panel do |p| %>
  <%= p.link "Create a new Custom Content Model", :action => "new", :icon => "add.png" %>
<% end -%>

<% table_for @content_models, ['Name','Entries','Description','Publications' ,'Fields'], :class => 'active_table'  do |mdl| %>
<tr <%= highlight_row "tools",mdl.id %>>

    <% if mdl.table_name -%>
    <%= link_to mdl.name, :action => 'view',:path => mdl.id %>
  <% else -%>
    <%= link_to "INVALID MODEL: #{mdl.name} (Destroy)", :action => 'destroy', :path => mdl.id %>
  <% end -%>

  <%= mdl.table_name ?  mdl.content_model.count : "INVALID" %>
  <%= mdl.description %>
  <% unless !mdl.table_name -%>

    <a href='<%=  url_for :action => 'publications',:path => mdl.id %>'><%= theme_image_tag 'icons/table_actions/publications.gif' %>

    <a href='<%=  url_for :action => 'edit',:path => mdl.id %>'><%= theme_image_tag 'icons/table_actions/edit.gif' %>

<% end -%>

<% end -%>


environment_features: Add redirection option for signup on admin
features page.

(ActionItem2998)

<%= _('System features') %>

<%= _('Enable/Disable features') %>

<%=  _('Here you can enable or disable several features of your environment. Each feature represents some funcionality that your environment can use if you enable it.

Check all the features you want to enable for your environment, uncheck all the ones you don\'t want, and use the "Save changes" button to confirm your changes.') %>

<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>

    <%= _('Feature') %>
    <%= _('Enabled?') %>

  <%= hidden_field_tag('environment[enabled_features][]', '') %>
  <% @features.each do |feature, text|   %>

    <%= text %>
    <%= check_box_tag "environment[enabled_features][]", feature, @environment.enabled?(feature) %>

  <% end %>

<%= _('Configure features') %>

<%= _('Page to redirect after signup') %>

  <%=  select 'environment', 'redirection_after_signup', Environment.signup_redirection_options.map{|key,value|[value,key]} %>

<%= _('Page to redirect after login') %>

  <%=  select 'environment', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]} %>

<%= _('Organization Approval Method') %>

  <%= select_organization_approval_method('environment', 'organization_approval_method') %>

  <% button_bar do %>
    <%= submit_button('save', _('Save changes')) %>
    <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
  <% end %>

<% end %>

<%= _('System features') %>

<%= _('Enable/Disable features') %>

<%=  _('Here you can enable or disable several features of your environment. Each feature represents some funcionality that your environment can use if you enable it.

Check all the features you want to enable for your environment, uncheck all the ones you don\'t want, and use the "Save changes" button to confirm your changes.') %>

<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>

    <%= _('Feature') %>
    <%= _('Enabled?') %>

  <%= hidden_field_tag('environment[enabled_features][]', '') %>
  <% @features.each do |feature, text|   %>

    <%= text %>
    <%= check_box_tag "environment[enabled_features][]", feature, @environment.enabled?(feature) %>

  <% end %>

<%= _('Configure features') %>

<%= _('Page to redirect after login') %>

  <%=  select 'environment', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]} %>

<%= _('Organization Approval Method') %>

  <%= select_organization_approval_method('environment', 'organization_approval_method') %>

  <% button_bar do %>
    <%= submit_button('save', _('Save changes')) %>
    <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
  <% end %>

<% end %>


update the guide for the sharing_form

update the guide for the sharing_form

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

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

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

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

          You may:

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

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

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

The gatekeeper can share with the all visitors right away

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

Or you can request the gatekeepers for their approval

          <% if !disable_advanced_view%>

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

          <% end %>

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

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

Or share it with..

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

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

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

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>" />
            - All visitors (including anonymous visitors with no login):

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

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

    <% end -%>

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

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

Additional fine-grained sharing permissions

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

              Loading...

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

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

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

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

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

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

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

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

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

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

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

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

                  Step 3

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

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

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

                      Step 3: Choose access rights, review and
                      submit

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

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

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

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

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

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

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

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

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

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

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

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

  <% end %>

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

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

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

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

          You may:

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

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

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

          <% if !disable_advanced_view%>

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

          <% end %>

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

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

Or share it with..

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

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

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

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>" />
            - All visitors (including anonymous visitors with no login):

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

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

    <% end -%>

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

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

Additional fine-grained sharing permissions

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

              Loading...

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

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

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

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

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

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

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

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

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

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

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

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

                  Step 3

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

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

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

                      Step 3: Choose access rights, review and
                      submit

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

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

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

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

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

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

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

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

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

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

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

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

  <% end %>


Another minor tweak to show_project page

<% @title = @title || "#{:show_project_title.l}: #{@project.title}" %>

<% # List Projects | Edit Project %>
<%=
    tabs = [[:show_project_list_projects.l,
             url_for(:action => 'list_projects')]]
    tabs.push([:show_project_admin_request.l,
        url_for(:action => 'admin_request', :id => @project.id)])
    if check_permission(@project.user_id)
        tabs.push([:show_project_edit.l,
                   url_for(:action => 'edit_project', :id => @project.id)])
    end
    if @project.is_admin?(@user)
      tabs.push([:show_project_add_members.l,
                 url_for(:action => 'add_members', :id => @project.id)])
    end
    show_tabs tabs
%>

<%= @title %>

<%= "#{:show_project_created.l}: #{@project.created_at.to_formatted_s(:db)}"%>

<%= "#{:show_project_by.l}: #{user_link(@project.user)}" %>

<%= "#{:show_project_user_group.l}: #{@project.user_group.name}" %>

<%= "#{:show_project_admin_group.l}: #{@project.admin_group.name}" %>

<%= "#{:show_project_summary.l}: #{textilize(sanitize(@project.summary))}" %>

      <% if @user and @project.user_group.users.member?(@user) %>
        <%= render(:partial => 'show_groups', :locals => { :project => @project, :user => @user }) %>
      <% end %>

      <%= :show_project_drafts.l %>:

      <% for draft in @project.draft_names %>
          <%= link_to(textilize_without_paragraph(draft.name.display_name),
                    :action => "show_draft", :id => draft.id) %>
        (<%= user_link(draft.user) %>)

      <% end %>


enabling through associations for nested scaffolds

<h4> </h4>
<%
  # This assumes that the association is included as a column in the active_scaffold_config.columns collection
  associated_columns = []
  associated_columns = params[:associations].split(" ") unless params[:associations].nil?
  unless associated_columns.empty?
    parent_id = params[:id]
    associated_columns.each do | column_name |
      column = active_scaffold_config.columns[column_name]
      association = column.association
      begin
        controller, controller_path = active_scaffold_controller_for(association.klass)
      rescue ActiveScaffold::ControllerNotFound => error %>
        <%= "#{error.class} - #{error.message}"%>
<%    else %>
    <%= render :active_scaffold => controller_path,
               :constraints => { association.reverse => parent_id},
               :label => active_scaffold_config_for(association.klass).label + _("FOR") + format_column(@record.to_label),
               :params => {:nested => true, :parent_column => column_name, :parent_model => association.active_record} %>
<%    end
    end
  end
%>

<h4> </h4>
<%
  # This assumes that the association is included as a column in the active_scaffold_config.columns collection
  associated_columns = []
  associated_columns = params[:associations].split(" ") unless params[:associations].nil?
  unless associated_columns.empty?
    parent_id = params[:id]
    associated_columns.each do | column_name |
      column = active_scaffold_config.columns[column_name]
      if column.through_association? %>
:through associations are not supported. exclude this colum in your config block (config.list.exclude :column). If you want to edit the association create a has_many association to the intermediary table.
<%      next
      end
      association = column.association
      begin
        controller, controller_path = active_scaffold_controller_for(association.klass)
      rescue ActiveScaffold::ControllerNotFound => error %>
        <%= "#{error.class} - #{error.message}"%>
<%    else %>
    <%= render :active_scaffold => controller_path,
               :constraints => { association.reverse => parent_id},
               :label => active_scaffold_config_for(association.klass).label + _("FOR") + format_column(@record.to_label),
               :params => {:nested => true, :parent_column => column_name, :parent_model => association.active_record} %>
<%    end
    end
  end
%>


template view tweak

template view tweak

git-svn-id: 3551c6e76a45777ca67e5c8385b599cca19d6692@555 567b1171-46fb-0310-a4c9-b4bef9110e78

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

<% form_remote_for :template, @tmpl, :url => { :action => 'update', :id => @tmpl }, :html => { :id => 'template_form' },
     :loading  => "Form.saving('template')",
     :complete => "Form.saved('template')" do |f| -%>

<%=h @tmpl.name %>

<%= f.text_area :data %>

<%= submit_tag 'Save' %> saving...

<% end -%>


Add syntax for code to textile quick reference

  <%= _('Textile markup quick reference') %>
  <%= link_to(_('(show)'), '#', :id => 'textile-quickref-show') %>
  <%= link_to(_('(hide)'), '#', :id => 'textile-quickref-hide', :style => 'display: none') %>

<%= _('Simple formatting:') %> _<%= _('italics') %>_ *<%= _('bold') %>*, -<%= _('striked')%>-.

<%= _('Links:') %> "Noosfero":http://noosfero.org/

<%= _('Images:') %> !http://example.com/image.png!

<%= _('Bullet lists:') %>

* <%= _('first item') %>
* <%= _('second item') %>

<%= _('Numbered lists:') %>

# <%= _('first item') %>
# <%= _('second item') %>

<%= h(_('For code, use HTML tags
 and , and indent the code inside them:')) %>

<pre>
<code>
  a.gsub!( /</, '' )
</code>
</pre>

<%= _('See also a more complete Textile Reference.') % 'http://redcloth.org/hobix.com/textile/' %>

  <%= _('Textile markup quick reference') %>
  <%= link_to(_('(show)'), '#', :id => 'textile-quickref-show') %>
  <%= link_to(_('(hide)'), '#', :id => 'textile-quickref-hide', :style => 'display: none') %>

<%= _('Simple formatting:') %> _<%= _('italics') %>_ *<%= _('bold') %>*, -<%= _('striked')%>-.

<%= _('Links:') %> "Noosfero":http://noosfero.org/

<%= _('Images:') %> !http://example.com/image.png!

<%= _('Bullet lists:') %>

* <%= _('first item') %>
* <%= _('second item') %>

<%= _('Numbered lists:') %>

# <%= _('first item') %>
# <%= _('second item') %>

<%= _('See also a more complete Textile Reference') % 'http://redcloth.org/hobix.com/textile/' %>


Refactor view

Refactor view

<% @title = "Incoming message #{@raw_email.incoming_message.id} of FOI request '#{@raw_email.incoming_message.info_request.title}'" %>

Incoming message <%=@raw_email.incoming_message.id %>

    FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %>
    <% if @holding_pen %>

This is in the holding pen because: <%= @rejected_reason %>
        <% if @public_bodies.size > 0 %>

Guessed authority:
            <% @public_bodies.each do |public_body| %>
                <%=public_body_both_links(public_body)%>
            <% end %>
            (based on From: email domain)
        <% end %>
        <% if @info_requests.size > 0 %>

Guessed request:
            <% @info_requests.each do |info_request|  %>
                <%=request_both_links(info_request)%>
            <% end %>
            (based on id, not hash, in To/Cc email)
        <% end %>
    <% end %>

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

Raw email

<%= link_to "Download", admin_request_download_raw_email_path(@raw_email) %>

<%=h(@raw_email.data).gsub(/\n/, '
').html_safe %>

<% @title = 'Incoming message ' + @raw_email.incoming_message.id.to_s + ' of FOI request \'' + h(@raw_email.incoming_message.info_request.title) + "'" %>

Incoming message <%=@raw_email.incoming_message.id.to_s %>

    FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %>
    <% if @holding_pen %>

This is in the holding pen because: <%= @rejected_reason %>
        <% if @public_bodies.size > 0 %>

Guessed authority:
            <% for public_body in @public_bodies %>
                <%=public_body_both_links(public_body)%>
            <% end %>
            (based on From: email domain)
        <% end %>
        <% if @info_requests.size > 0 %>

Guessed request:
            <% for info_request in @info_requests %>
                <%=request_both_links(info_request)%>
            <% end %>
            (based on id, not hash, in To/Cc email)
        <% end %>
    <% end %>

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

Raw email

<%= link_to "Download", "../download_raw_email/" + @raw_email.id.to_s %>

<%=h(@raw_email.data).gsub(/\n/, '
').html_safe %>


Update frontpage lead

Update frontpage lead

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

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

1

2

3

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

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

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

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

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

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

Ultimatum para la transparencia

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

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

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

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

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

    			</form>

Twittear

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

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

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

              <% end %>

<%= _("Novedades") %>

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

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

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

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

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

                  <% if position.odd? %>

                  <% end %>
                <% end %>

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

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

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

<% end %>

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

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

1

2

3

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

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

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

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

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

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

Pregunta a los diputados

27 de septiembre, 18h. Te esperamos para hablar sobre transparencia con los políticos clave en la Facultad de Ciencias de la Información de la Univ. Complutense. Aquí más detalles.

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

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

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

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

    			</form>

Twittear

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

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

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

              <% end %>

<%= _("Novedades") %>

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

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

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

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

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

                  <% if position.odd? %>

                  <% end %>
                <% end %>

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

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

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

<% end %>


Un-break static sidebars

Un-break static sidebars

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

<%= @sb_config['title'] %>

<%= @sb_config['body'] %>

<%= @sb_config['title'] %>

<%=h @sb_config['body'] %>


makes account name take focus automatically when creating a new account

Create Your Account

	Choose your user name and password.

	After clicking "signup", login to crabgrass, and join or create a group.

<%= error_messages_for :user %>
<% form_for :user do |f| -%>

Your login name

<%= f.text_field :login %>

Your Password

<%= f.password_field :password %>

Confirm Password

<%= f.password_field :password_confirmation %>

<%= submit_tag 'Sign up' %>

<% end -%>


order accounts alphabetically

order accounts alphabetically

<%= error_messages_for 'booking' %>

Value date

<%= text_field 'booking', 'value_date'  %>

Amount

<%= text_field 'booking', 'amount'  %>

Title

<%= text_field 'booking', 'title'  %>

Soll

<%= select 'booking', 'credit_account_id', Account.find(:all, :order => :title).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'credit_amount_foreign_currency', :size => 6, :tabindex => 20 %>
<%= text_field 'booking', 'credit_currency', :size => 3, :tabindex => 21 %>

Haben

<%= select 'booking', 'debit_account_id', Account.find(:all, :order => :title).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'debit_amount_foreign_currency', :size => 6, :tabindex => 22 %>
<%= text_field 'booking', 'debit_currency', :size => 3, :tabindex => 23 %>

Scan

<%= file_column_field "booking", "scan" %>

Comments

<%= text_area 'booking', 'comments', :cols => 40, :rows => 5  %>

<%= error_messages_for 'booking' %>

Value date

<%= text_field 'booking', 'value_date'  %>

Amount

<%= text_field 'booking', 'amount'  %>

Title

<%= text_field 'booking', 'title'  %>

Soll

<%= select 'booking', 'credit_account_id', Account.find(:all, :order => :number).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'credit_amount_foreign_currency', :size => 6, :tabindex => 20 %>
<%= text_field 'booking', 'credit_currency', :size => 3, :tabindex => 21 %>

Haben

<%= select 'booking', 'debit_account_id', Account.find(:all, :order => :number).collect {|a| [ a.title, a.id ] } %>
<%= text_field '', 'debit_amount_foreign_currency', :size => 6, :tabindex => 22 %>
<%= text_field 'booking', 'debit_currency', :size => 3, :tabindex => 23 %>

Scan

<%= file_column_field "booking", "scan" %>

Comments

<%= text_area 'booking', 'comments', :cols => 40, :rows => 5  %>