Update help section 'How quickly will I get a response?'

<% @title = "Making requests" %>

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

<%= @title %> #

I'm not sure which authority to make my request to, how can I find out? #

It can be hard to untangle government's complicated structured, and work out
who knows the information that you want. Here are a few tips:

Browse or search <%= site_name %> looking for similar requests to yours.

When you've found an authority you think might have the information, use
the "home page" link on the right hand side of their page to check what they do
on their website.

Contact the authority by phone or email to ask if they hold the kind of
information you're after.

Don't worry excessively about getting the right authority. If you get it
wrong, they will transfer your request to the correct authority for you.

If you've got a thorny case, please contact us for help.

Who can make a request? #

Any person, of any nationality, anywhere in the world, however young or old can make a request under Federal Australian Freedom of Information (FOI) law.

The Freedom of Information Act simply says that "every person has a legally enforceable right to obtain access in accordance with this Act". A "person" can also be a body corporate, such as a company.

See the Attorney General's department FOI Guidelines – Fundamental principles and procedures - section 3.2 for more.

You're missing the public authority that I want to request from! #

At the moment we aim to cover all Australian Federal public authorities. We plan to add State and Local Government authorities soon.

Please contact us with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.

If you'd like to help add a whole category (new state or local government region etc.) of public authority to the site, we'd love
to hear from you too.

Why do you include some authorities that aren't formally subject to FOI?#

<%= site_name %> lets you make requests for information to a range of
organisations:

 Those formally subject to the FOI Act

 Those which voluntarily comply with the FOI Act

 Those which aren't subject to the Act but we think should be, on grounds
  such as them having significant public responsibilities.

In the last case, we're using the site to lobby for expansion of the
scope of the FOI Act. Even if an organisation is not legally obliged to respond
to an FOI request, they can still do so voluntarily.

Why must I keep my request focused?#

Please put in your request only what is needed so that someone can
easily identify what information you are asking for. Please do
not include any of the following:

arguments about your cause

statements that could defame or insult others

If you do, we may have to remove your request to avoid problems with
libel law, which is a pain for both you and us. Short, succinct messages
make it easier for authorities to be clear what information you are
requesting, which means you will get a reply more quickly.

If you want information to support an argument or campaign, Freedom of
Information is a powerful tool. Although you may not use this site to
run your campaign, we encourage you to use it to get the information you
need. We also encourage to run your campaign elsewhere - one effective
and very easy way is to <%= link_to 'start your own blog',
"http://wordpress.com/"%>. You are welcome to link to your campaign
from this site in an annotation to your request (you can make
annotations after submitting the request).

Does it cost me anything to make a request?#

Making an FOI request is nearly always free.

Authorities often include unnecessary, scary, boilerplate in
acknowledgement messages saying they "may" charge a fee. Ignore such notices.
They hardly ever will actually charge a fee.  If they do, they can only charge you if
you have specifically agreed in advance to pay.  More
    details from the Information Commissioner.

The latest version of the FOI Act (s 3(4)) makes it clear that

… functions and powers given by this Act are to be performed and exercised, as far as possible, to facilitate and promote public access to information, promptly and at the lowest reasonable cost.

Sometimes an authority will refuse your request, saying that the cost
of handling it exceeds a level that would detriment their day to day work. At this point you can refine your
request. e.g. it would be much cheaper for an authority to tell you the amount
spent on marshmallows in the past year than in the past ten years.

How quickly will I get a response? #

By law, public authorities must respond promptly to
requests.

Even if they are not prompt, in nearly all cases they must respond within
30 calendar days and must have sent you an acknowledgment within 14 calendar days.
If you had to clarify your request, or one or two other cases, then they may have more time
(full details).

<%= site_name %> will email you if you don't get a timely response.  You can
then send the public authority a message to remind them, and tell them if they
are breaking the law.

What if I never get a response?#

There are several things you can do if you never get a response.

Sometimes there has been a genuine problem and the authority never
    received the request. It is worth telephoning the authority and politely
    checking that they received the request. It was sent to them by email.

If they have not received it, the problem is most likely due to
    "spam filters". Refer the authority to the measures in the answer
    'I can see a request on <%= site_name %>, but we never got it by email!'
    in the FOI officers section of this help.

If you're still having no luck, then you can ask for an internal review,
    and then complain to the Information Commissioner about the authority.
    Read our page 'Unhappy about the response you got?'.

What if I'm not satisfied with the response? #

If you didn't get the information you asked for, or you didn't get it in time,
then read our page 'Unhappy about the response you got?'.

It says I can't re-use the information I got!#

Authorities often add legal boilerplate about the
Commonwealth Copyright Adminstration, which at first glance implies you may not
be able do anything with the information. This is likely to be incorrect as the latest Statement of IP Principles for Australian Government Agencies explictly encourages reuse.

Consistent with the need for free and open re-use and adaptation, public sector
information should be licensed by agencies under the Creative Commons BY standard
as the default.

You can, of course, write articles about the information or summarise it, or
quote parts of it. We also think you should feel free to republish the
information in full, just as we do, even though in theory you might not be
allowed to do so.  See our policy on copyright.

Can you tell me more of the nitty gritty about the process of making requests? #

Have a look at the
Freedom of Information guidelines
pages on the Information Commissioner's website.

Can I request information about myself? #

No. Requests made using <%= site_name %> are public, made under the Freedom of
Information Act, and cannot help you find information about a private
individual.

If you see that somebody has included personal information, perhaps
unwittingly, in a request, please contact us
immediately so we can remove it.

I'd like to keep my request secret! (At least until I publish my story) #

<%= site_name %> is currently only designed for public requests. All
responses that we receive are automatically published on the website for anyone
to read.

You should contact the public authority directly if you would like to
make a request in private.  If you're interested in buying a system which helps
you manage FOI requests in secret, then contact us.

Can I make the same to request to lots of authorities, e.g. all departments? #

We ask you to first send a test version of your request to a few
authorities. Their responses will help you improve the wording of your request,
so that you get the best information when you send the request to all of
the authorities. There is currently no automated system for sending the request
to the other authorities, you must copy and paste it by hand.

I made a request off the site, how do I upload it to the archive?#

<%= site_name %> is an archive of requests made through the site,
and does not try to be an archive of all FOI requests. We'll never support uploading
other requests. For one thing, we wouldn't be able to verify that other
responses actually came from the authority. If this really matters to you,
you can always make the same request again via <%= site_name %>.

How do you moderate request annotations? #

Annotations on <%= site_name %> are to help
people get the information they want, or to give them pointers to places they
can go to help them act on it. We reserve the right to remove anything else.

Endless, political discussions are not allowed.
Post a link to a suitable forum or campaign site elsewhere.

Next, read about your privacy -->

<% @title = "Making requests" %>

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

<%= @title %> #

I'm not sure which authority to make my request to, how can I find out? #

It can be hard to untangle government's complicated structured, and work out
who knows the information that you want. Here are a few tips:

Browse or search <%= site_name %> looking for similar requests to yours.

When you've found an authority you think might have the information, use
the "home page" link on the right hand side of their page to check what they do
on their website.

Contact the authority by phone or email to ask if they hold the kind of
information you're after.

Don't worry excessively about getting the right authority. If you get it
wrong, they will transfer your request to the correct authority for you.

If you've got a thorny case, please contact us for help.

Who can make a request? #

Any person, of any nationality, anywhere in the world, however young or old can make a request under Federal Australian Freedom of Information (FOI) law.

The Freedom of Information Act simply says that "every person has a legally enforceable right to obtain access in accordance with this Act". A "person" can also be a body corporate, such as a company.

See the Attorney General's department FOI Guidelines – Fundamental principles and procedures - section 3.2 for more.

You're missing the public authority that I want to request from! #

At the moment we aim to cover all Australian Federal public authorities. We plan to add State and Local Government authorities soon.

Please contact us with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.

If you'd like to help add a whole category (new state or local government region etc.) of public authority to the site, we'd love
to hear from you too.

Why do you include some authorities that aren't formally subject to FOI?#

<%= site_name %> lets you make requests for information to a range of
organisations:

 Those formally subject to the FOI Act

 Those which voluntarily comply with the FOI Act

 Those which aren't subject to the Act but we think should be, on grounds
  such as them having significant public responsibilities.

In the last case, we're using the site to lobby for expansion of the
scope of the FOI Act. Even if an organisation is not legally obliged to respond
to an FOI request, they can still do so voluntarily.

Why must I keep my request focused?#

Please put in your request only what is needed so that someone can
easily identify what information you are asking for. Please do
not include any of the following:

arguments about your cause

statements that could defame or insult others

If you do, we may have to remove your request to avoid problems with
libel law, which is a pain for both you and us. Short, succinct messages
make it easier for authorities to be clear what information you are
requesting, which means you will get a reply more quickly.

If you want information to support an argument or campaign, Freedom of
Information is a powerful tool. Although you may not use this site to
run your campaign, we encourage you to use it to get the information you
need. We also encourage to run your campaign elsewhere - one effective
and very easy way is to <%= link_to 'start your own blog',
"http://wordpress.com/"%>. You are welcome to link to your campaign
from this site in an annotation to your request (you can make
annotations after submitting the request).

Does it cost me anything to make a request?#

Making an FOI request is nearly always free.

Authorities often include unnecessary, scary, boilerplate in
acknowledgement messages saying they "may" charge a fee. Ignore such notices.
They hardly ever will actually charge a fee.  If they do, they can only charge you if
you have specifically agreed in advance to pay.  More
    details from the Information Commissioner.

The latest version of the FOI Act (s 3(4)) makes it clear that

… functions and powers given by this Act are to be performed and exercised, as far as possible, to facilitate and promote public access to information, promptly and at the lowest reasonable cost.

Sometimes an authority will refuse your request, saying that the cost
of handling it exceeds a level that would detriment their day to day work. At this point you can refine your
request. e.g. it would be much cheaper for an authority to tell you the amount
spent on marshmallows in the past year than in the past ten years.

How quickly will I get a response? #

By law, public authorities must respond promptly to
requests.

Even if they are not prompt, in nearly all cases they must respond within
20 working days. If you had to clarify your request,
or one or two other cases, then they may have more time
(full details).

<%= site_name %> will email you if you don't get a timely response.  You can
then send the public authority a message to remind them, and tell them if they
are breaking the law.

What if I never get a response?#

There are several things you can do if you never get a response.

Sometimes there has been a genuine problem and the authority never
    received the request. It is worth telephoning the authority and politely
    checking that they received the request. It was sent to them by email.

If they have not received it, the problem is most likely due to
    "spam filters". Refer the authority to the measures in the answer
    'I can see a request on <%= site_name %>, but we never got it by email!'
    in the FOI officers section of this help.

If you're still having no luck, then you can ask for an internal review,
    and then complain to the Information Commissioner about the authority.
    Read our page 'Unhappy about the response you got?'.

What if I'm not satisfied with the response? #

If you didn't get the information you asked for, or you didn't get it in time,
then read our page 'Unhappy about the response you got?'.

It says I can't re-use the information I got!#

Authorities often add legal boilerplate about the
Commonwealth Copyright Adminstration, which at first glance implies you may not
be able do anything with the information. This is likely to be incorrect as the latest Statement of IP Principles for Australian Government Agencies explictly encourages reuse.

Consistent with the need for free and open re-use and adaptation, public sector
information should be licensed by agencies under the Creative Commons BY standard
as the default.

You can, of course, write articles about the information or summarise it, or
quote parts of it. We also think you should feel free to republish the
information in full, just as we do, even though in theory you might not be
allowed to do so.  See our policy on copyright.

Can you tell me more of the nitty gritty about the process of making requests? #

Have a look at the
Freedom of Information guidelines
pages on the Information Commissioner's website.

Can I request information about myself? #

No. Requests made using <%= site_name %> are public, made under the Freedom of
Information Act, and cannot help you find information about a private
individual.

If you see that somebody has included personal information, perhaps
unwittingly, in a request, please contact us
immediately so we can remove it.

I'd like to keep my request secret! (At least until I publish my story) #

<%= site_name %> is currently only designed for public requests. All
responses that we receive are automatically published on the website for anyone
to read.

You should contact the public authority directly if you would like to
make a request in private.  If you're interested in buying a system which helps
you manage FOI requests in secret, then contact us.

Can I make the same to request to lots of authorities, e.g. all departments? #

We ask you to first send a test version of your request to a few
authorities. Their responses will help you improve the wording of your request,
so that you get the best information when you send the request to all of
the authorities. There is currently no automated system for sending the request
to the other authorities, you must copy and paste it by hand.

I made a request off the site, how do I upload it to the archive?#

<%= site_name %> is an archive of requests made through the site,
and does not try to be an archive of all FOI requests. We'll never support uploading
other requests. For one thing, we wouldn't be able to verify that other
responses actually came from the authority. If this really matters to you,
you can always make the same request again via <%= site_name %>.

How do you moderate request annotations? #

Annotations on <%= site_name %> are to help
people get the information they want, or to give them pointers to places they
can go to help them act on it. We reserve the right to remove anything else.

Endless, political discussions are not allowed.
Post a link to a suitable forum or campaign site elsewhere.

Next, read about your privacy -->


added a hacky little spinner to the dashboard to show that the recent page list is loading

A dashboard of interesting stuff. <%= link_to 'create page »', {:controller => '/pages', :action => 'create'} %>

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

<%= link_to 'Search recently updated pages', me_url(:action => 'search') + "/descending/updated_at" %>
<%= javascript_tag "new Insertion.Top('page_list', '" + image_tag('spinner.gif') + " Loading recently updated pages
');" %>
<%= javascript_tag remote_function( :update => "page_list", :url => { :action => :page_list }) %>

A dashboard of interesting stuff. <%= link_to 'create page »', {:controller => '/pages', :action => 'create'} %>

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

<%= link_to 'Search recently updated pages', me_url(:action => 'search') + "/descending/updated_at" %>
<%= javascript_tag remote_function( :update => "page_list", :url => { :action => :page_list }) %>


minor fix

minor fix

<%= image_tag 'spinner.gif' %>

Batch grading in progress ... please wait.

	 ID
	 Student
	 Submitted
	 Last Update
	 Started
	 Finished
	 Failed

	<% count = 0 %>
   	<% for queue in @queue %>
      <% count = count.next
	     odd = "odd"
	     odd = "even" if count.even?
	   %>
	  <tr class="<%=odd%> hover" id="queue_<%=queue.id%>">
	    <%= queue.id %>
	    <%= queue.user_turnin.user.display_name %>
	    <%= queue.created_at.to_formatted_s(:rfc822) %>
	    <%= queue.updated_at.to_formatted_s(:rfc822) %>
	    <% if queue.acknowledged %><%= image_tag 'accept' %><% end %>
	    <% if queue.serviced %><%= image_tag 'accept' %><% end %>
        <% if queue.failed %><%= image_tag 'exclamation' %><% end %>

      <% if queue.failed %>
        <tr class="<%=odd%> hover" id="queue_<%=queue.id%>">
	      <%= queue.message.to_html %>

      <% end %>
    <% end %>

This page will automatically refresh...

<%= image_tag 'spinner.gif' %>

Batch grading in progress ... please wait.

	 ID
	 Student
	 Submitted
	 Last Update
	 Started
	 Finished
	 Failed

	<% count = 0 %>
   	<% for queue in @queue %>
      <% count = count.next
	     odd = "odd"
	     odd = "even" if count.even?
	   %>
	  <tr class="<%=odd%> hover" id="queue_<%=queue.id%>">
	    <%= queue.id %>
	    <%= queue.user_turnin.user.display_name %>
	    <%= queue.created_at.to_formatted_s(:rfc822) %>
	    <%= queue.updated_at.to_formatted_s(:rfc822) %>
	    <% if queue.acknowledged %><%= image_tag 'accept' %><% end %>
	    <% if queue.serviced %><%= image_tag 'accept' %><% end %>
        <% if queue.failed %><%= image_tag 'exclamation' %><% end %>

    <% end %>

This page will automatically refresh...


added support for a helper method (list_row_class) that lets people customize the css class of a <tr> based on record attributes. this lets people do things like style a cell red based on a negative ledger entry. closes issue #47

<%
record = list_record if list_record # compat with render :partial :collection
tr_class = cycle("", "even-record")
tr_class += " #{list_row_class(record)}" if respond_to? :list_row_class
url_options = params_for(:action => :list, :id => record.id)
-%>

<tr class="record <%= tr_class %>" id="<%= element_row_id(:action => :list, :id => record.id) %>" class="record">
  <% active_scaffold_config.list.columns.each do |column| %>
    <% column_value = render_column(record, column) -%>
    <% column_value << " " if column_value.nil? or column_value.empty? # For IE6 -%>

    <td class="<%= column_class(column, column_value) %>" >
      <% if column.link -%>
        <% column.link.label = column_value %>
        <%= record.authorized_for?(:action => column.link.crud_type) ? render_action_link(column.link, url_options) : "#{column.link.label}" -%>
      <% else -%>
        <%= column_value %>
      <% end -%>

  <% end -%>
  <% if active_scaffold_config.action_links.any? {|link| link.type == :record } -%>

    <%= render :partial => 'list_actions', :locals => {:record => record, :url_options => url_options} %>

  <% end -%>

<% target_id = element_row_id(:action => :list, :id => record.id) -%>

<% record = list_record if list_record # compat with render :partial :collection -%>
<% classAttr = cycle("", "even-record") -%>
<% url_options = params_for(:action => :list, :id => record.id) -%>

<tr class="record <%= classAttr %>" id="<%= element_row_id(:action => :list, :id => record.id) %>" class="record">
  <% active_scaffold_config.list.columns.each do |column| %>
    <% column_value = render_column(record, column) -%>
    <% column_value << " " if column_value.nil? or column_value.empty? # For IE6 -%>

    <td class="<%= column_class(column, column_value) %>" >
      <% if column.link -%>
        <% column.link.label = column_value %>
        <%= record.authorized_for?(:action => column.link.crud_type) ? render_action_link(column.link, url_options) : "#{column.link.label}" -%>
      <% else -%>
        <%= column_value %>
      <% end -%>

  <% end -%>
  <% if active_scaffold_config.action_links.any? {|link| link.type == :record } -%>

    <%= render :partial => 'list_actions', :locals => {:record => record, :url_options => url_options} %>

  <% end -%>

<% target_id = element_row_id(:action => :list, :id => record.id) -%>


Add display of current original file when original file and temp file exist.

<% @title = "Upload CSV of public authorities" %>

<%=@title%>

<% if not @notes.empty? %>

<%=@notes %>

<% end %>
<% if not @errors.empty? %>

<%=@errors %>

<% end %>

<% form_tag 'import_csv', :multipart => true do %>

        <% if @original_csv_file && @temporary_csv_file %>
            CSV file:
            <%= @original_csv_file %>
            <%= hidden_field_tag :original_csv_file, @original_csv_file %>
            <%= hidden_field_tag :temporary_csv_file, @temporary_csv_file %>
            <%= link_to 'Clear current file', 'import_csv', :class => "btn btn-warning" %>
        <% else %>
            CSV file:
            <%= file_field_tag :csv_file, :size => 40 %>
        <% end %>

    Optional: Tag to add entries to / alter entries for:
    <%= text_field_tag 'tag', params[:tag] %>

    What to do with existing tags?
    <%= select_tag 'tag_behaviour',
        "<option value='add' selected>Add new tags to existing ones</option>
         <option value='replace'>Replace existing tags with new ones</option>"
    %>

CSV file format:The first row should be a list
    of fields, starting with '#'. The fields 'name' and
    'request_email' are required; additionally, translated values are
    supported by adding the locale name to the field name,
    e.g. 'name.es', 'name.de'... Example:

            #id,name,request_email,name.es,tag_string

            1,An Authority,a@example.com,Un organismo,a_tag another_tag

            2,Another One,another@example.com,Otro organismo,a_tag

Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n),
    publication_scheme (i18n), home_page, tag_string (tags separated by spaces).

Note: Choose dry run to test, without
    actually altering the database. Choose upload to actually
    make the changes. In either case, you will be shown any errors, or details
    of the changes.  When uploading, any changes since last import will be
    overwritten – e.g.  email addresses changed back.

Note: The import tag will also be added to the imported bodies
    if no tags are provided in the CSV file or if the import mode is set to
    "Add new tags to existing ones".

<%= submit_tag 'Dry run' %> <%= submit_tag 'Upload' %>

<% end %>

Standard tags:
    <% for category, description in PublicBodyCategories::get().by_tag() %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>

<% @title = "Upload CSV of public authorities" %>

<%=@title%>

<% if not @notes.empty? %>

<%=@notes %>

<% end %>
<% if not @errors.empty? %>

<%=@errors %>

<% end %>

<% form_tag 'import_csv', :multipart => true do %>

    CSV file:
    <%= file_field_tag :csv_file, :size => 40 %>

    Optional: Tag to add entries to / alter entries for:
    <%= text_field_tag 'tag', params[:tag] %>

    What to do with existing tags?
    <%= select_tag 'tag_behaviour',
        "<option value='add' selected>Add new tags to existing ones</option>
         <option value='replace'>Replace existing tags with new ones</option>"
    %>

CSV file format:The first row should be a list
    of fields, starting with '#'. The fields 'name' and
    'request_email' are required; additionally, translated values are
    supported by adding the locale name to the field name,
    e.g. 'name.es', 'name.de'... Example:

            #id,name,request_email,name.es,tag_string

            1,An Authority,a@example.com,Un organismo,a_tag another_tag

            2,Another One,another@example.com,Otro organismo,a_tag

Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n),
    publication_scheme (i18n), home_page, tag_string (tags separated by spaces).

Note: Choose dry run to test, without
    actually altering the database. Choose upload to actually
    make the changes. In either case, you will be shown any errors, or details
    of the changes.  When uploading, any changes since last import will be
    overwritten – e.g.  email addresses changed back.

Note: The import tag will also be added to the imported bodies
    if no tags are provided in the CSV file or if the import mode is set to
    "Add new tags to existing ones".

<%= submit_tag 'Dry run' %> <%= submit_tag 'Upload' %>

<% end %>

Standard tags:
    <% for category, description in PublicBodyCategories::get().by_tag() %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>


changing topics/show header layout and posts quote/edit links

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

	<%= render :partial => 'topics/new' %>

	<%=h @topic.title %>

		« <%= link_to @topic.forum.name, forum_path(@topic.forum) %>
		« <%= link_to @topic.forum.category.name, category_path(@topic.forum.category) %>
		 |
		<%= @topic.private? ? 'Private' : 'Public' %><%= @topic.closed? ? ', Closed' : '' %>

		<%= link_to_remote "#{pluralize(@topic.posts_count, 'Post')} by #{pluralize(@topic.posters, 'User')}", :url => {:action => 'show_posters', :id => @topic.id} %>
		<% if @topic.last_page != 1 %>
		 |
			<%= will_paginate @posts,
					:prev_label => ' « ', :next_label => ' » ',
					:inner_window => 0, :outer_window => -1, :compact => true
					%>
		<% end %>

<% @posts.each_with_index do |post, index| index+=1 %>
	<table class="thread" cellspacing="0" id="p<%= post.id %>">

				<%= time_ago_in_words(post.created_at) %>

					<%= link_to "#" + (index + @padding).to_s, topic_path(:anchor => 'p' + post.id.to_s) %>

<%= link_to h(post.user.login), user_path(post.user.id) %>

<%= rank_for(post.user.posts_count, post.user.admin) %>

							<%= link_to avatar_for(post.user), user_path(post.user.id) unless post.user.avatar.nil? %>

Registered: <%= post.user.created_at.strftime("%b, %Y") %>

Last visit: <%= time_ago_in_words(post.user.online_at) %>

Posts: <%= post.user.posts_count %>

						<%= bb(post.body) %>
						<% if (post.updated_at > post.created_at+5.minutes) %>

								Last edited <%= time_ago_in_words(post.updated_at) %>
								<%= 'by ' + post.editor.login unless post.editor.nil? %>

						<% end %>
						<% if !post.user.signature.blank? %>

								<%= bb(post.user.signature) %>

						<% end %>

					<% if post.user.is_online? %>
						Online
					<% else %>
						Offline
					<% end %>

					<% if can_edit?(post) %>
						<%= link_to 'Edit', edit_post_path(post) %> |
					<% end %>
					<% if logged_in? && !@topic.closed %>
						<%= link_to 'Quote', quote_post_path(post) %>
					<% end %>

<% end %>

<% if logged_in? && !@topic.closed %>
	<%= render :partial => 'posts/new' %>
<% elsif logged_in? && @topic.closed %>

This Topic is Closed

<% else %>

			<%= link_to('Login', login_path) %> or
			<%= link_to('Register', register_path) %> to post a reply

<% end %>

	<%= render :partial => 'topics/new' %>

	<%=h @topic.title %>

		« <%= link_to @topic.forum.name, forum_path(@topic.forum) %>
		« <%= link_to @topic.forum.category.name, category_path(@topic.forum.category) %>
		 |
		<%= link_to_remote "#{pluralize(@topic.posts_count, 'Post')} by #{pluralize(@topic.posters, 'User')}", :url => {:action => 'show_posters', :id => @topic.id} %>

		<%= @topic.private? ? 'Private' : 'Public' %><%= @topic.closed? ? ', Closed' : '' %>
		 |
		<% if @topic.last_page != 1 %>
			<%= will_paginate @posts,
					:prev_label => ' « ', :next_label => ' » ',
					:inner_window => 0, :outer_window => -1, :compact => true
					%> |
		<% end %>
		 <%= link_to 'Reply', '#reply' %>

<% @posts.each_with_index do |post, index| index+=1 %>
	<table class="thread" cellspacing="0" id="p<%= post.id %>">

				<%= time_ago_in_words(post.created_at) %>

					<%= link_to "#" + (index + @padding).to_s, topic_path(:anchor => 'p' + post.id.to_s) %>

<%= link_to h(post.user.login), user_path(post.user.id) %>

<%= rank_for(post.user.posts_count, post.user.admin) %>

							<%= link_to avatar_for(post.user), user_path(post.user.id) unless post.user.avatar.nil? %>

Registered: <%= post.user.created_at.strftime("%b, %Y") %>

Last visit: <%= time_ago_in_words(post.user.online_at) %>

Posts: <%= post.user.posts_count %>

						<%= bb(post.body) %>
						<% if (post.updated_at > post.created_at+5.minutes) %>

								Last edited <%= time_ago_in_words(post.updated_at) %>
								<%= 'by ' + post.editor.login unless post.editor.nil? %>

						<% end %>
						<% if !post.user.signature.blank? %>

								<%= bb(post.user.signature) %>

						<% end %>

					<% if post.user.is_online? %>
						Online
					<% else %>
						Offline
					<% end %>

					<% if can_edit?(post) %>
						<%= link_to 'Edit', edit_post_path(post) %>
					<% end %>
					<% if logged_in? && !@topic.closed %>
						<%= link_to 'Quote', quote_post_path(post) %>
					<% end %>

<% end %>

<% if logged_in? && !@topic.closed %>
	<%= render :partial => 'posts/new' %>
<% elsif logged_in? && @topic.closed %>

This Topic is Closed

<% else %>

			<%= link_to('Login', login_path) %> or
			<%= link_to('Register', register_path) %> to post a reply

<% end %>


Fix typo. Closes #628.

Fix typo. Closes #628.

Hi,

Someone (hopefully you) would like to create an account over at
<%= SERVER_URL %>

If this is you, please click the link below to confirm that account.

<%= @url %>

Hi,

Somone (hopefully you) would like to create an account over at
<%= SERVER_URL %>

If this is you, please click the link below to confirm that account.

<%= @url %>


ActionItem0: Change div notice

ActionItem0: Change div notice

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

    <%= javascript_include_tag :defaults %>
    <%= stylesheet_link_tag 'common' %>
    <%= design_all_header_tags %>
    <%= javascript_include_tag 'comatose_admin' %>
    <% if params[:controller] == 'comatose_admin' %>
      <%= stylesheet_link_tag 'comatose_admin' %>
    <% end %>

    <%= image_tag 'loading.gif', :id => 'spinner', :style => "display:none; float:right;" %>

      <% unless flash[:notice].nil? %>

          <%= flash[:notice] %>
	  <%=  link_to_function( content_tag(:span, _('Close') ), {},{:onclick => visual_effect(:fade, "notice", :duration => 0.5), :id => 'button_close_notice'} ) %>

      <% end %>

          <%= _('Skip to:') %>
          <%= _('Content') %> |
          <%= _('Navigation') %> |
          <%= _('Footer') %>

          <%= header %>

          <% if params[:controller] == 'comatose_admin' %>

              <%= yield %>

          <% else %>
            <%= design_display(yield) %>
          <% end %>

          <%= footer %>
          <%= design_display_icon('back', :action => 'list')%>

    <%= javascript_include_tag :defaults %>
    <%= stylesheet_link_tag 'common' %>
    <%= design_all_header_tags %>
    <%= javascript_include_tag 'comatose_admin' %>
    <% if params[:controller] == 'comatose_admin' %>
      <%= stylesheet_link_tag 'comatose_admin' %>
    <% end %>

    <%= image_tag 'loading.gif', :id => 'spinner', :style => "display:none; float:right;" %>

          <%= _('Skip to:') %>
          <%= _('Content') %> |
          <%= _('Navigation') %> |
          <%= _('Footer') %>

          <%= header %>

        <% unless flash[:notice].nil? %>

            <%= flash[:notice] %>

        <% end %>

          <% if params[:controller] == 'comatose_admin' %>

              <%= yield %>

          <% else %>
            <%= design_display(yield) %>
          <% end %>

          <%= footer %>
          <%= design_display_icon('back', :action => 'list')%>


typos

typos

git-svn-id: e70f47238a868777ecefe75ba01929cffb2d8127@317 d8b24053-1f83-4035-b5c3-ce8b92cd91ad

Ubuntu-Derivate

Communtu setzt auf einer Ubuntu-Basisinstallation auf.
Es gibt nun eine ganze Reihe von Ubuntu-Derivaten, und viele Ubuntu-Nutzer fragen sich, ob sie statt Ubuntu lieber ein Derivat benutzen sollten.

Über Communtu nachinstallierbare Derivate

<%= link_to 'Ubuntu Studio', 'http://wiki.ubuntuusers.de/Ubuntu_Studio'%>
wird bei Communtu mitinstalliert, wenn du bei Audio, Film und/oder Grafik/Design "erweitert" anwählst.

<%= link_to 'Medibuntu', 'http://medibuntu.org' %> stellt Multimedia-Paketquellen bereit, die aus rechtlichen Gründen nicht von Ubuntu selbst angeboten wird. Medibuntu wird bei Communtu mit berücksichtigt (z.B. bei Audio und Film).

<%= link_to 'Mythbuntu', 'http://www.mythbuntu.org/' %> - der PC wird zum Videorekorder. Bei Film "Freak" auswählen, und es wird mitinstalliert.

Derivate, die mit einer eigenen Installations-CD installiert werden sollten

<%= link_to 'Linux MCE', 'http://de.wikipedia.org/wiki/LinuxMCE' %> - damit wird Ubuntu zum <%=link_to 'Fernsehcomputer', 'http://de.wikipedia.org/wiki/Home_Theater_Personal_Computer' %>. Aufgrund der notwendigen Treiberinstallation sollte Linux MCE direkt installiert werden, Communtu kann dann aber für die Installation weiterer Software genutzt werden.

<%= link_to 'Gobuntu', 'http://www.ubuntu.com/products/whatisubuntu/gobuntu' %> ist ein Ubuntu-Derivat komplett aus freier Software. Sollte mit der Gobuntu-CD installiert werden, damit es auch wirklich nur freie Software ist. Nachinstallationen mit Communtu möglich, sinnvollerweise sollten dann im Nutzerprofil "freie Software" angewählt werden.

Derivate, die wir uns noch genauer angucken müssen

<%= link_to 'Linux Mint', 'http://de.wikipedia.org/wiki/Linux_Mint' %> ist eine Ubuntu-Abspaltung mit eigener User-Community.

 <%= link_to 'Impi Linux', 'http://www.impi.org.za/' %>

 <%= link_to 'Nexenta OS', 'http://de.wikipedia.org/wiki/GNU-Varianten#Nexenta_OS'%>

 <%= link_to 'linex', 'http://de.wikipedia.org/wiki/LinEx'%>

 <%= link_to 'Ubuntulite', 'http://ubuntulite.tuxfamily.org/'%>

Ubuntu-Derivate

Communtu setzt auf einer Ubuntu-Basisinstallation auf.
Es gibt nun eine ganze Reihe von Ubuntu-Derivaten, und viele Ubuntu-Nutzer fragen sich, ob sie statt Ubuntu lieber ein Derivat benutzen sollten.

Über Communtu nachinstallierbare Derivate

<%= link_to 'Ubuntu Studio', 'http://wiki.ubuntuusers.de/Ubuntu_Studio'%>
wird bei Communtu mitinstalliert, wenn du bei Audio, Film und/oder Grafik/Design "erweitert" anwählst.

<%= link_to 'Medibuntu', 'http://medibuntu.org' %> stellt Multimedia-Paketquellen bereit, die aus rechtlichen Gründen nicht von Ubuntu selbst angeboten wird. Medibuntu wird bei Communtu mit berücksichtigt (z.B. bei Audio und Film).

<%= link_to 'Mythbuntu', 'http://www.mythbuntu.org/' %> - der PC wird zum Videorekorder. Bei Film "Freak" auswählen, und es wird mitinstalliert.

Derivate, die mit einger eigenen Installations-CD installiert werden sollten

<%= link_to 'Linux MCE', 'http://de.wikipedia.org/wiki/LinuxMCE' %> Damit wird Ubuntu zum <%=link_to 'Fernsehcomputer', 'http://de.wikipedia.org/wiki/Home_Theater_Personal_Computer' %>. Aufgrund der notwendigen Treiberinstallation sollte Linux MCE direkt installiert werden, Communtu kann dann aber für die Installation weiterer Software genutzt werden.

<%= link_to 'Gobuntu', 'http://www.ubuntu.com/products/whatisubuntu/gobuntu' %> ist ein Ubuntu-Derivat komplett aus freier Software. Sollte mit der Gobuntu-CD installiert werden, damit es auch wirklich nur freie Software ist. Nachinstallationen mit Communtu möglich, sinnvollerweise sollten dann im Nutzerprofil "freie Software" angewählt werden.

Derivate, die wir uns noch genauer angucken müssen

<%= link_to 'Linux Mint', 'http://de.wikipedia.org/wiki/Linux_Mint' %> ist eine Ubuntu-Abspaltung mit eigener User-Community.

 <%= link_to 'Impi Linux', 'http://www.impi.org.za/' %>

 <%= link_to 'Nexenta OS', 'http://de.wikipedia.org/wiki/GNU-Varianten#Nexenta_OS'%>

 <%= link_to 'linex', 'http://de.wikipedia.org/wiki/LinEx'%>

 <%= link_to 'Ubuntulite', 'http://ubuntulite.tuxfamily.org/'%>


When making follow up, say must relate to this request

    <% if @internal_review %>

Request an internal review
        from <%=h OutgoingMailer.name_for_followup(@info_request, nil) %>

    <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %>

Send a public follow up message
        to <%=h OutgoingMailer.name_for_followup(@info_request, nil) %>

    <% else %>

Send a public reply to
        <%=h OutgoingMailer.name_for_followup(@info_request, incoming_message) %>

    <% end %>

    <% if @info_request.allow_new_responses_from == 'nobody' %>

Follow ups and new responses to this request have been stopped to prevent spam. Please
        contact us if you are <%= user_link(@info_request.user) %>
        and need to send a follow up.

    <% else %>

Please only write messages directly relating to your
        request '<%= request_link(@info_request) %>'. If you would like to ask for information
        that was not in your original request, then
        <%= link_to "file a new request", new_request_to_body_url(:public_body_id => @info_request.public_body.id.to_s) %>.

        <% if @internal_review %>

            If you are dissatisfied by the response you got from
            the public authority, you have the right to
            complain (details).

        <% end %>

        <% if @info_request.calculate_status == 'waiting_response_overdue' %>

            <% if @info_request.working_days_20_overdue? %>
                This request is long overdue a response.
            <% else %>
                This request is overdue a response.
            <% end %>
            You can say that, by law, the authority should have answered
            promptly. If they have not given you a legal
            reason why they need extra time
            (<%= link_to "more details", about_url + "#quickly_response" %>), then
            you can say they are breaking the law to have not replied by
            <%= simple_date(@info_request.date_response_required_by) %>.
            <% if @info_request.public_body.is_school? %>
                This is a school, so legally they get lots of extra slack if it is
                holiday time.
            <% end %>

        <% end %>

        <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %>

                <%= o.text_area :body, :rows => 10, :cols => 55 %>

            <% if @internal_review %>
                <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %>
            <% else %>

What are you doing?

                <% if !@outgoing_message.errors[:what_doing_dummy].nil? %>

                <% else %>

                <% end %>

                        <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %>
                        I am requesting an internal review
                        (what's that?)

                        <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %>
                        Anything else, such as clarifying, prompting, thanking

            <% end %>

            <% if @internal_review %>

Edit and add more details to the message above,
                explaining why you would like a review.

Say that you are dissatisfied by their response

Set out your reasons why

Ask them to review their response

            <% end %>

                <%= hidden_field_tag 'submitted_followup', 1 %>
                <%= hidden_field_tag(:preview, 1 ) %>
                <% if @internal_review_pass_on %>
                    <%= hidden_field_tag(:internal_review, 1 ) %>
                <% end %>
                <%= submit_tag "Preview your message" %>

        <% end %>

            <% if not @is_owning_user %>
            (You will be asked to sign in as <%= user_link(@info_request.user) %>)
            <% end %>

    <% end %>

    <% if @internal_review %>

Request an internal review
        from <%=h OutgoingMailer.name_for_followup(@info_request, nil) %>

    <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %>

Send a public follow up message
        to <%=h OutgoingMailer.name_for_followup(@info_request, nil) %>

    <% else %>

Send a public reply to
        <%=h OutgoingMailer.name_for_followup(@info_request, incoming_message) %>

    <% end %>

    <% if @info_request.allow_new_responses_from == 'nobody' %>

Follow ups and new responses to this request have been stopped to prevent spam. Please
        contact us if you are <%= user_link(@info_request.user) %>
        and need to send a follow up.

    <% else %>

        <% if @internal_review %>

            If you are dissatisfied by the response you got from
            the public authority, you have the right to
            complain (details).

        <% end %>

        <% if @info_request.calculate_status == 'waiting_response_overdue' %>

            <% if @info_request.working_days_20_overdue? %>
                This request is long overdue a response.
            <% else %>
                This request is overdue a response.
            <% end %>
            You can say that, by law, the authority should have answered
            promptly. If they have not given you a legal
            reason why they need extra time
            (<%= link_to "more details", about_url + "#quickly_response" %>), then
            you can say they are breaking the law to have not replied by
            <%= simple_date(@info_request.date_response_required_by) %>.
            <% if @info_request.public_body.is_school? %>
                This is a school, so legally they get lots of extra slack if it is
                holiday time.
            <% end %>

        <% end %>

        <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %>

                <%= o.text_area :body, :rows => 10, :cols => 55 %>

            <% if @internal_review %>
                <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %>
            <% else %>

What are you doing?

                <% if !@outgoing_message.errors[:what_doing_dummy].nil? %>

                <% else %>

                <% end %>

                        <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %>
                        I am requesting an internal review
                        (what's that?)

                        <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %>
                        Anything else, such as clarifying, prompting, thanking

            <% end %>

            <% if @internal_review %>

Edit and add more details to the message above,
                explaining why you would like a review.

Say that you are dissatisfied by their response

Set out your reasons why

Ask them to review their response

            <% end %>

                <%= hidden_field_tag 'submitted_followup', 1 %>
                <%= hidden_field_tag(:preview, 1 ) %>
                <% if @internal_review_pass_on %>
                    <%= hidden_field_tag(:internal_review, 1 ) %>
                <% end %>
                <%= submit_tag "Preview your message" %>

        <% end %>

            <% if not @is_owning_user %>
            (You will be asked to sign in as <%= user_link(@info_request.user) %>)
            <% end %>

    <% end %>


Fix form link on front page to use new controller layout.

Make requests for information from the UK Government

        <% form_for(:info_request, @info_request, :url => { :controller => :request, :action => :new }, :html => { :id => 'public_body_form', :class => 'plaque' }  ) do |f| %>

Choose which public body you would like information from.

           <%= @public_bodies = PublicBody.find(:all, :order => "name")
               f.collection_select(:public_body_id, @public_bodies, :id, :name) %>

<%= submit_tag "Submit >>" %>

        <% end %>

Find information that others requested

View all information

Make requests for information from the UK Government

        <% form_for(:info_request, @info_request, :url => { :controller => :new, :action => :index }, :html => { :id => 'public_body_form', :class => 'plaque' }  ) do |f| %>

Choose which public body you would like information from.

           <%= @public_bodies = PublicBody.find(:all, :order => "name")
               f.collection_select(:public_body_id, @public_bodies, :id, :name) %>

<%= submit_tag "Submit >>" %>

        <% end %>

Find information that others requested

View all information


adjusting presentation for timezone

adjusting presentation for timezone

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

		<title><%= @page_title || @item.title %></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-au" />
    <%= javascript_include_tag 'jquery-1.3.2.min.js' %>

    <%= javascript_include_tag 'jquery.flot.js' %>

Requirements Burndown

 Table

        Date
        <% statuses = Status.find_all_by_type_name('Requirement', :conditions => ["generic_stage in (?) and enabled = 't'", Status.in_progress], :order => 'sequence') %>
        <% statuses.each do |s| %>
          <%= s.value %>
        <% end %>

      <% dates = @burndown.inject([]) {|m,o| m + o[1].keys }.sort.uniq %>
      <% dates.each do |d| %>

          <%= d.to_formatted_s(time_format) %>
          <% statuses.each do |s| %>
            <%= @burndown[s.id][d] %>
          <% end %>

      <% end %>

 Graph

    <%
      series = statuses.collect do |s|
        dates = @burndown[s.id].keys.sort
        utc_offset = Time.now.utc_offset
        points = dates.collect do |date|
          "[ #{(date.to_f + utc_offset)*1000}, #{@burndown[s.id][date]} ]"
        end
        " { label: \"#{s.value}\", data: [ #{points.join(',')} ] } "
      end
      flot_data = series.join(',')
    %>

 Debug

    <%= debug @burndown %>

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

		<title><%= @page_title || @item.title %></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-au" />
    <%= javascript_include_tag 'jquery-1.3.2.min.js' %>

    <%= javascript_include_tag 'jquery.flot.js' %>

Requirements Burndown

 Table

        Date
        <% statuses = Status.find_all_by_type_name('Requirement', :conditions => ["generic_stage in (?) and enabled = 't'", Status.in_progress], :order => 'sequence') %>
        <% statuses.each do |s| %>
          <%= s.value %>
        <% end %>

      <% dates = @burndown.inject([]) {|m,o| m + o[1].keys }.sort.uniq %>
      <% dates.each do |d| %>

          <%= d.to_formatted_s(time_format) %>
          <% statuses.each do |s| %>
            <%= @burndown[s.id][d] %>
          <% end %>

      <% end %>

 Graph

    <%
      series = statuses.collect do |s|
        dates = @burndown[s.id].keys.sort
        points = dates.collect do |date|
          "[ #{(date.to_f)*1000}, #{@burndown[s.id][date]} ]"
        end
        " { label: \"#{s.value}\", data: [ #{points.join(',')} ] } "
      end
      flot_data = series.join(',')
    %>

 Debug

    <%= debug @burndown %>


Added content-type header for admin layout

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

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

  <title>Typo admin: <%= controller.controller_name %></title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <%= stylesheet_link_tag "admin.css" %>
  <%= javascript_include_tag "prototype" %>

<%= link_to "Typo admin - #{config_value('blog_name')}", "/admin/" %>

    <%= current_user_notice rescue nil %>

<%= link_to_section "General", :controller=>"/admin/general" rescue nil %>

<%= link_to_section "Articles", :controller=>"/admin/content" rescue nil %>

<%= link_to_section "Users", :controller=>"/admin/users" rescue nil %>

<%= link_to_section "Categories", :controller=>"/admin/categories" rescue nil %>

<%= link_to_section "Blacklist", :controller=>"/admin/blacklist" rescue nil %>

    <%= render_flash rescue nil %>

  <%= @content_for_layout %>

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

  <title>Typo admin: <%= controller.controller_name %></title>
  <%= stylesheet_link_tag "admin.css" %>
  <%= javascript_include_tag "prototype" %>

<%= link_to "Typo admin - #{config_value('blog_name')}", "/admin/" %>

    <%= current_user_notice rescue nil %>

<%= link_to_section "General", :controller=>"/admin/general" rescue nil %>

<%= link_to_section "Articles", :controller=>"/admin/content" rescue nil %>

<%= link_to_section "Users", :controller=>"/admin/users" rescue nil %>

<%= link_to_section "Categories", :controller=>"/admin/categories" rescue nil %>

<%= link_to_section "Blacklist", :controller=>"/admin/blacklist" rescue nil %>

    <%= render_flash rescue nil %>

  <%= @content_for_layout %>


Use titleize to display the name of each module.

<% if @available_modules.length == 0 %>

<%= "No Available Modules".t %>

<% else %>

<%= form_tag '' -%>
  <% table_for @available_modules, ['Name','Status','Activate','Deactivate','Dependencies','Description'], :class=>'active_table',:width => '100%' do |t| %>
  <tr id='elem_mod_<%= t[:module] -%>_row'   onmouseover='SCMS.highlightRow(this);'  onmouseout='SCMS.lowlightRow(this);' onclick='SCMS.clickRow("mod","<%= t[:module] -%>"); ModuleEditor.updateButtons(); '>

      <% if (t[:status] == 'active' || t[:status] == 'initialized') && "#{t[:name].to_s.camelcase}::AdminController".constantize.method_defined?('options') %>
        <%= link_to t[:name].underscore.titleize, { :action => 'edit', :path => t[:module] } %>
      <% elsif t[:status] == 'active' -%>
          <%= t[:name].underscore.titleize %>
      <% else -%>
          <%= t[:name].underscore.titleize %>
      <% end -%>

    <%= t[:status].humanize.t %>
    <% if t[:status] == 'available' %>

        <input type='checkbox' class='activators'  id='elem_mod_<%= t[:module] -%>' name='modules[activate][]' value="<%= t[:module] -%>" onclick='this.checked = !this.checked;'/>

    <% elsif t[:status] == 'active' || t[:status] == 'initialized' %>

        <input type='checkbox' class='deactivators'id='elem_mod_<%= t[:module] -%>'  name='modules[deactivate][]' value="<%= t[:module] -%>" onclick='this.checked = !this.checked;'/>
    <% else %>

    <% end -%>

       <%= t[:dependencies].map { |dep| SiteModule.module_enabled?(dep) ? dep.humanize : "#{dep.humanize}"}.to_sentence %>

    <%= t[:description].t %>

  <% if t == @available_modules.last -%>

    <input type='submit' id='activate_button' name='activate' value='<%= "Activate".t -%>' disabled='disabled'/>
    <input type='submit' id='deactivate_button' name='deactivate' value='<%= "Deactivate".t -%>' disabled='disabled' onclick='return ModuleEditor.confirmDeactivation();' />

  <% end -%>
<% end -%>

</form>

<% end -%>

<% if @available_modules.length == 0 %>

<%= "No Available Modules".t %>

<% else %>

<%= form_tag '' -%>
  <% table_for @available_modules, ['Name','Status','Activate','Deactivate','Dependencies','Description'], :class=>'active_table',:width => '100%' do |t| %>
  <tr id='elem_mod_<%= t[:module] -%>_row'   onmouseover='SCMS.highlightRow(this);'  onmouseout='SCMS.lowlightRow(this);' onclick='SCMS.clickRow("mod","<%= t[:module] -%>"); ModuleEditor.updateButtons(); '>

      <% if (t[:status] == 'active' || t[:status] == 'initialized') && "#{t[:name].to_s.camelcase}::AdminController".constantize.method_defined?('options') %>
        <%= link_to t[:name].humanize.capitalize, { :action => 'edit', :path => t[:module] } %>
      <% elsif t[:status] == 'active' -%>
          <%= t[:name].humanize.capitalize %>
      <% else -%>
          <%= t[:name].humanize.capitalize %>
      <% end -%>

    <%= t[:status].humanize.t %>
    <% if t[:status] == 'available' %>

        <input type='checkbox' class='activators'  id='elem_mod_<%= t[:module] -%>' name='modules[activate][]' value="<%= t[:module] -%>" onclick='this.checked = !this.checked;'/>

    <% elsif t[:status] == 'active' || t[:status] == 'initialized' %>

        <input type='checkbox' class='deactivators'id='elem_mod_<%= t[:module] -%>'  name='modules[deactivate][]' value="<%= t[:module] -%>" onclick='this.checked = !this.checked;'/>
    <% else %>

    <% end -%>

       <%= t[:dependencies].map { |dep| SiteModule.module_enabled?(dep) ? dep.humanize : "#{dep.humanize}"}.to_sentence %>

    <%= t[:description].t %>

  <% if t == @available_modules.last -%>

    <input type='submit' id='activate_button' name='activate' value='<%= "Activate".t -%>' disabled='disabled'/>
    <input type='submit' id='deactivate_button' name='deactivate' value='<%= "Deactivate".t -%>' disabled='disabled' onclick='return ModuleEditor.confirmDeactivation();' />

  <% end -%>
<% end -%>

</form>

<% end -%>


ActionItem831: reviewing texts

ActionItem831: reviewing texts

<%= error_messages_for :user %>
<% labelled_form_for :user, @user,
   :html => { :help=>_('Fill all this fields to join in this environment.
 If you forgot your password, do not create a new account, click on the "I forgot my password!" link. ;-)'), :id => 'profile-data'
            } do |f| -%>

<%= f.text_field :login,
    :onchange => 'this.value = convToValidLogin( this.value )' %>
<%= help %>

<%= f.text_field :email,
    :help => help=_('We\'ll send you an e-mail to validate your registration.') %>
<%= help %>

<%= f.password_field :password,
    :help => help=_('Choose a password that you can remember easily.') %>
<%= help %>

<%= f.password_field :password_confirmation,
    :help => help=_('To confirm, repeat your password.') %>
<%= help %>

<%= icaptcha_field() %>

<% if @terms_of_use %>

    <%= @terms_of_use %>

    <%= check_box 'user', 'terms_accepted' %>
    <%= _('I accept the terms of use') %>

<% end %>

<% if params[:enterprise_code] %>
  <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
  <%= hidden_field_tag :answer, params[:answer] %>
  <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
  <%= hidden_field_tag :new_user, true %>
<% end %>

<% if ! defined? hidden_atention || ! hidden_atention %>

<%= _('Dear user, welcome to the %s network. To start your participation
in this space, fill in the fields below. After this operation, your login and
password will be registered, allowing you to create communities and enterprises
in this environment.') %>

<% end %>

<% button_bar do %>
  <%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
<% end %>
<% end -%>

<%= error_messages_for :user %>
<% labelled_form_for :user, @user,
   :html => { :help=>_('Fill all this fields to join in this environment.
 If you forgot your password, do not create a new account, click on the "I forgot my password!" link. ;-)'), :id => 'profile-data'
            } do |f| -%>

<%= f.text_field :login,
    :help => help=_('"Username" is a simple nickname to recognize you on this environment.'),
    :onchange => 'this.value = convToValidLogin( this.value )' %>
<%= help %>

<%= f.text_field :email,
    :help => help=_('We\'ll send you an e-mail to validate your registration.') %>
<%= help %>

<%= f.password_field :password,
    :help => help=_('Do not use a obviously password, but try some unforgettable word.') %>
<%= help %>

<%= f.password_field :password_confirmation,
    :help => help=_('We need to be sure that you wrote correctly your password.') %>
<%= help %>

<%= icaptcha_field() %>

<% if @terms_of_use %>

    <%= @terms_of_use %>

    <%= check_box 'user', 'terms_accepted' %>
    <%= _('I accept the terms of use') %>

<% end %>

<% if params[:enterprise_code] %>
  <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
  <%= hidden_field_tag :answer, params[:answer] %>
  <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
  <%= hidden_field_tag :new_user, true %>
<% end %>

<% if ! defined? hidden_atention || ! hidden_atention %>

<%= _('Here you can create an account for you as a person.

Do not enter a login for a group nor for an entreprise.
With your user account, you can create several group or enterprise
accounts through your person control panel.') %>

<% end %>

<% button_bar do %>
  <%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
<% end %>
<% end -%>


Add project links back onto recommended page

  <%= link_to 'All history', :action=>'historylist' %> |
  Recommended projects

Recommended Projects

    Name
    Grades
    Description
    Actions

  <% for project in @oldprojects %>

      <%= link_to project.name, :action=>'show', :id=>project %>

    <%= grade_range(project) %>

      <%= project.description %>

      <%= button_to 'unrecommend', :action=>'unrecommend', :id=>project %>
      <%= link_to 'Merge with...', :action=>'historymerge', :id=>project %>

  <% end %>

  <%= link_to 'All history', :action=>'historylist' %> |
  Recommended projects

Recommended Projects

    Name
    Grades
    Description
    Actions

  <% for project in @oldprojects %>

      <%= project.name %>

    <%= grade_range(project) %>

      <%= project.description %>

      <%= button_to 'unrecommend', :action=>'unrecommend', :id=>project %>
      <%= link_to 'Merge with...', :action=>'historymerge', :id=>project %>

  <% end %>


[Mezuro] Bugfix: Results wouldn't show if there was only one decimal space

<% the_module = module_result.module %>
<% module_label = "#{the_module.name} (#{the_module.granularity})" %>

<%= _('Metric results for: ') + module_label %>

      Metric
      Value
      Weight
      Threshold

    <% module_result.metric_results.each do |metric_result|  %>
      <% range = metric_result.range %>
      <tr title="<%= range.nil? ? '' : range.comments %>">
        <%= metric_result.metric.name %>
        <%= metric_result.value.slice(/[0-9]+\.[0-9]{1,2}/) %>
        <%= metric_result.weight %>
        <% if range.nil? %>

        <% else %>
          <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %>
        <% end %>

    <% end %>

          <%= _('Grade:') %>
          <%=  module_result.grade.slice(/[0-9]+\.[0-9]{1,2}/) %>

<% the_module = module_result.module %>
<% module_label = "#{the_module.name} (#{the_module.granularity})" %>

<%= _('Metric results for: ') + module_label %>

      Metric
      Value
      Weight
      Threshold

    <% module_result.metric_results.each do |metric_result|  %>
      <% range = metric_result.range %>
      <tr title="<%= range.nil? ? '' : range.comments %>">
        <%= metric_result.metric.name %>
        <%= metric_result.value.slice(/[0-9]+\.[0-9]{2}/) %>
        <%= metric_result.weight %>
        <% if range.nil? %>

        <% else %>
          <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %>
        <% end %>

    <% end %>

          <%= _('Grade:') %>
          <%=  module_result.grade.slice(/[0-9]+\.[0-9]{2}/) %>


fix string escaping error in 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
   can_publish = @resource.respond_to?(:can_publish?) ? @resource.can_publish? : true
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

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

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

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

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

          You may:

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

          <%
             through_resource = ''
             if @resource.kind_of?(Assay)
               through_resource = '(through projects associated with selected study)'
             elsif @resource.kind_of?(Study)
               through_resource = '(through projects associated with selected investigation)'
             end
          %>

Share within members of projects associated with this <%= @resource_type -%> <%= through_resource%> 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)

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

Or you can request the gatekeepers for their approval to share with all visitors

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

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


Don't show p if empty

Don't show p if empty

<% if block.title.present? %>

<%= block.title %>

<% end %>

      <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>

<% if show_name %>

<%= h block.owner.short_name %>

<% end %>

<div style="text-align: center; font-size: 75%; clear: both" id="profile-admin-url-<%= block.id %>">

<div class="profile-info-options" id="profile-info-options-<%= block.id %>">

<%= block.title %>

      <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>

<% if show_name %>

<%= h block.owner.short_name %>

<% end %>

<div style="text-align: center; font-size: 75%; clear: both" id="profile-admin-url-<%= block.id %>">

<div class="profile-info-options" id="profile-info-options-<%= block.id %>">


fixing a couple problems in subforms related to trying to create new records and failing validation. the resulting redrawn form first failed to sort the records
because new records have no id, and then ended up not giving new records another random id for valid input names.

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

<%
parent_record = @record
associated = column.singular_association? ? [parent_record.send(column.name)].compact : parent_record.send(column.name)
associated = associated.sort_by {|r| r.new_record? ? 99999999999 : r.id} unless column.association.options.has_key?(:order)

show_blank_record = (column.plural_association? or (column.singular_association? and associated.empty?))
show_blank_record = false if column.through_association?
show_blank_record = false unless column.association.klass.authorized_for?(:action => :create)

-%>

<%= column.label -%> (<%= link_to_visibility_toggle(:default_visible => !column.collapsed) -%>)

<div <%= 'style="display: none;"' if column.collapsed -%>>

  <% @record = column.association.klass.new -%>
  <%= render :partial => 'form_association_header', :locals => {:parent_record => parent_record} %>

  <tbody id="<%= sub_form_list_id(:association => column.name) %>">
    <% associated.each_index do |index| %>
    <% @record = associated[index] -%>
    <% if @record.errors.count -%>

      <td colspan="<%= active_scaffold_config_for(@record.class).subform.columns.length + 1 %>">
        <%= error_messages_for :record %>

    <% end %>
    <tr class="association-record <%= 'association-record-new' if @record.new_record? -%>">
      <% scope = column.plural_association? ? "[#{column.name}][#{@record.id || generate_temporary_id}]" : "[#{column.name}]" -%>
      <%= render :partial => 'form_association_record', :locals => {:scope => scope, :parent_record => parent_record} %>

    <% end -%>

    <% if show_blank_record -%>
    <% @record = column.association.klass.new -%>

      <% scope = column.plural_association? ? "[#{column.name}][#{generate_temporary_id}]" : "[#{column.name}]" -%>
      <%= render :partial => 'form_association_record', :locals => {:scope => scope, :parent_record => parent_record} %>

    <% end -%>

<%= render :partial => 'form_association_footer', :locals => {:parent_record => parent_record, :column => column, :associated => associated} -%>

<% @record = parent_record -%>

<%
parent_record = @record
associated = column.singular_association? ? [parent_record.send(column.name)].compact : parent_record.send(column.name)
associated = associated.sort_by {|r| r.id} unless column.association.options.has_key?(:order)

show_blank_record = (column.plural_association? or (column.singular_association? and associated.empty?))
show_blank_record = false if column.through_association?
show_blank_record = false unless column.association.klass.authorized_for?(:action => :create)

-%>

<%= column.label -%> (<%= link_to_visibility_toggle(:default_visible => !column.collapsed) -%>)

<div <%= 'style="display: none;"' if column.collapsed -%>>

  <% @record = column.association.klass.new -%>
  <%= render :partial => 'form_association_header', :locals => {:parent_record => parent_record} %>

  <tbody id="<%= sub_form_list_id(:association => column.name) %>">
    <% associated.each_index do |index| %>
    <% @record = associated[index] -%>
    <% if @record.errors.count -%>

      <td colspan="<%= active_scaffold_config_for(@record.class).subform.columns.length + 1 %>">
        <%= error_messages_for :record %>

    <% end %>
    <tr class="association-record <%= 'association-record-new' if @record.new_record? -%>">
      <% scope = column.plural_association? ? "[#{column.name}][#{@record.id}]" : "[#{column.name}]" -%>
      <%= render :partial => 'form_association_record', :locals => {:scope => scope, :parent_record => parent_record} %>

    <% end -%>

    <% if show_blank_record -%>
    <% @record = column.association.klass.new -%>

      <% scope = column.plural_association? ? "[#{column.name}][#{generate_temporary_id}]" : "[#{column.name}]" -%>
      <%= render :partial => 'form_association_record', :locals => {:scope => scope, :parent_record => parent_record} %>

    <% end -%>

<%= render :partial => 'form_association_footer', :locals => {:parent_record => parent_record, :column => column, :associated => associated} -%>

<% @record = parent_record -%>


Slightly better wording of first privacy question.


was sometimes eating a holdings line

was sometimes eating a holdings line

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

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

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

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

<%= target[:collection_str] %>

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

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

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

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

<%= target[:notes] %>

  <% end %>

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

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

<%= s %>

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

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

          <% end %>

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

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

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

            <% end   %>

          <% end %>

  <% end %>
<%
end %>

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

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

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

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

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

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

    <%}%>

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

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

<% end %>

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

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

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

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

<%= target[:collection_str] %>

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

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

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

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

<%= target[:notes] %>

  <% end %>

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

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

<%= s %>

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

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

          <% end %>

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

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

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

            <% end   %>

          <% end %>

  <% end %>
<%
end %>

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

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

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

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

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

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

    <%}%>

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

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

<% end %>


More help.

More help.

<%= error_messages_for 'censor_rule' %>

Text (that you want to remove, case sensitive)

<%= text_field 'censor_rule', 'text', :size => 60  %>

Replacement (put it in [square brackets], e.g. [personal information removed]. applies only to text in emails; binaries must stay the same length and the replacement is just a bunch of 'x's)

<%= text_field 'censor_rule', 'replacement', :size => 60  %>

Comment for this edit (put purpose of the rule, and why the change)

<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60  %>

Rule is for request '<%=request_link(info_request)%>'
    <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>

<%= error_messages_for 'censor_rule' %>

Text (that you want to remove)

<%= text_field 'censor_rule', 'text', :size => 60  %>

Replacement (put is in [square brackets], e.g. [personal information removed]. applies only to text in emails; binaries must stay the same length and the replacement is just a bunch of 'x's)

<%= text_field 'censor_rule', 'replacement', :size => 60  %>

Comment for this edit (put purpose of the rule, and why the change)

<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60  %>

Rule is for request '<%=request_link(info_request)%>'
    <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>


Fix media search (WTF?)

Fix media search (WTF?)

      <%= _('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/' %>

Media upload

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

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

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

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

      <%= _('Drag item names to the text to add their URL') %>

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

Media search

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

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

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

      <%= _('Drag item names to the text to add their URL') %>

      <%= _('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/' %>

Media upload

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

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

<%= file_field_tag('file1') %>

<%= file_field_tag('file2') %>

<%= file_field_tag('file3') %>

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

      <%= _('Drag item names to the text to add their URL') %>

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

Media search

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

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

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

      <%= _('Drag item names to the text to add their URL') %>


remove some pagination that leaked out of its branch


Escape HTML in Post bodies shown in activities

<% date_format = current_user.time_format %>

  <%= "#{tz.utc_to_local(log.created_at).strftime(date_format)}"%>

  <%= image_tag('page_add.png', :alt => "Wiki page added") if log.event_type == EventLog::WIKI_CREATED %>
  <%= image_tag('page_edit.png', :alt => "Wiki page modified") if log.event_type == EventLog::WIKI_MODIFIED %>
  <%= image_tag('package_add.png', :alt => "File added") if log.event_type == EventLog::FILE_UPLOADED %>
  <%= image_tag('comments_add.png', :alt => "Post added") if log.event_type == EventLog::FORUM_NEW_POST %>

<% if log.target.is_a? Post %>
<%= link_to "#{log.target.forum.name} / #{log.target.topic.title}", topic_path(log.target.forum_id, log.target.topic_id) %>
<% elsif log.target.is_a? WikiPage %>
<%= log.target.to_url %>
<% elsif log.target.is_a? ProjectFile %>
<%= "#{link_to_task(log.target.task)} [" if log.target.task %>
<%= "<a href=\"/project_files/show/#{log.target_id}\" title=\"\" class=\"tooltip\">#{log.target.full_name}" %>
<%= "]" if log.target.task %>
<% end %>
    <%= "
" if(log.user || (log.target.respond_to?(:task) && log.target.task) ) %>
    <%= "#{log.target.task.full_name} " if( log.target.respond_to?(:task) && log.target.task )%>
    <%= "[#{log.user.name}]" if log.user %>

<%= avatar_for log.user, 25 if log.user %>

<% if log.target.is_a?(Post) && log.target.body && log.target.body.length > 0 %>
<%= wrap_text(h(log.target.body), 100).gsub(/\n/, "
")  %>
<% elsif log.target.is_a?(WikiPage) && log.body && log.body.length > 0 %>
<%= wrap_text(log.body, 100).gsub(/\n/, "
")  %>
<% end %>

<% date_format = current_user.time_format %>

  <%= "#{tz.utc_to_local(log.created_at).strftime(date_format)}"%>

  <%= image_tag('page_add.png', :alt => "Wiki page added") if log.event_type == EventLog::WIKI_CREATED %>
  <%= image_tag('page_edit.png', :alt => "Wiki page modified") if log.event_type == EventLog::WIKI_MODIFIED %>
  <%= image_tag('package_add.png', :alt => "File added") if log.event_type == EventLog::FILE_UPLOADED %>
  <%= image_tag('comments_add.png', :alt => "Post added") if log.event_type == EventLog::FORUM_NEW_POST %>

<% if log.target.is_a? Post %>
<%= link_to "#{log.target.forum.name} / #{log.target.topic.title}", topic_path(log.target.forum_id, log.target.topic_id) %>
<% elsif log.target.is_a? WikiPage %>
<%= log.target.to_url %>
<% elsif log.target.is_a? ProjectFile %>
<%= "#{link_to_task(log.target.task)} [" if log.target.task %>
<%= "<a href=\"/project_files/show/#{log.target_id}\" title=\"\" class=\"tooltip\">#{log.target.full_name}" %>
<%= "]" if log.target.task %>
<% end %>
    <%= "
" if(log.user || (log.target.respond_to?(:task) && log.target.task) ) %>
    <%= "#{log.target.task.full_name} " if( log.target.respond_to?(:task) && log.target.task )%>
    <%= "[#{log.user.name}]" if log.user %>

<%= avatar_for log.user, 25 if log.user %>

<% if log.target.is_a?(Post) && log.target.body && log.target.body.length > 0 %>
<%= wrap_text(log.target.body, 100).gsub(/\n/, "
")  %>
<% elsif log.target.is_a?(WikiPage) && log.body && log.body.length > 0 %>
<%= wrap_text(log.body, 100).gsub(/\n/, "
")  %>
<% end %>


tracked down the POST /browse problem! hooray.

<% search_url = url_for(params.merge(:controller => controller, :action => :browse, :page => 1, :update => 1, :escape => false)) -%>
<% form_remote_tag :url => search_url, :method => :get,
                   :html => { :action => search_url, :id => record_select_search_id } do %>
  <%= text_field_tag 'search', params[:search], :autocomplete => 'off', :class => 'text-input' %>
<% end %>

<script type="text/javascript">
//<![CDATA[
  var i = $(<%= record_select_search_id.to_json %>).down('input.text-input');
  new Form.Element.Observer(i, 1.0, function(element, value) {
    element.up('form').onsubmit();
    return false;
  });
//]]>
</script>

<% search_url = url_for(params.merge(:controller => controller, :action => :browse, :page => 1, :update => 1, :escape => false)) -%>
<% form_remote_tag :url => search_url, :method => :post,
                   :html => { :action => search_url, :id => record_select_search_id } do %>
  <%= text_field_tag 'search', params[:search], :autocomplete => 'off', :class => 'text-input' %>
<% end %>

<script type="text/javascript">
//<![CDATA[
  var i = $$('#<%= record_select_search_id %> input').first();
  new Form.Element.Observer(i, 1.0, function(element, value) {
    element.parentNode.onsubmit();
    return false;
  });
//]]>
</script>