modified view

modified view

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

Scores for <%= Assignment.find(@assignment_id).name %>

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>
<%
    review_no = 1
	grade = 0
    _time = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s
    for review_map in @review_mapping
        for review in review_map.reviews%>

            Review <%=review_no
                #review.id
                %>:

                Question
                Score
				Comment

             <%
             total = 0
             for review_score in review.review_scores
                #if (!Question.find(review_score.question_id).true_false)
                    total += review_score.score
                #end%>

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

            <%end
			  grade += total%>

Total	<%=total%>  	Score: <%=total*100/@sum_of_max%>%

           Additional comment : <%=review.additional_comment%>

           <% @mapping = ReviewMapping.find(review_map.id) %>
           <% @assgt_id = @mapping.assignment_id %>
           <% @author_id = @mapping.author_id %>

		     <%if(ReviewFeedback.find(:first,:conditions =>["review_id = ? and assignment_id = ?", review.id, @assignment_id]))%>

 View your previous feedback : <%= link_to "View", {:controller =>'review_feedback', :action=>'view_feedback', :id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id} %>

 Edit your previous feedback : <%= link_to "Edit", {:controller =>'review_feedback', :action =>'edit_feedback', :id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id} %>

		     <% else %>

Give feedback to reviewer:<%= link_to "Begin", {:controller => 'review_feedback', :action => 'new_feedback',:id1 =>@assgt_id, :id2 =>@author_id, :id3=>review.id} %>

				      <% end
					%>
		   <%review_no +=1
        end
	end%>
    <% if review_no-1 > 0 %>

Grade

		Average (of all reviews) = <%=grade/(review_no-1)%>
		<%if @final_penalty !=0%>

Penalty units= <%=@penalty_units%> Penalty per unit=<%=@late_policy.penalty_per_unit%> Maximum penalty=<%=@late_policy.max_penalty%>

		<%end%>
		  Final grade = <%=(grade/(review_no-1))*100/@sum_of_max-@final_penalty%>%

   	<%else%>
		<%if @assignment.wiki_type_id == 2 %>
			<%if @assignment.team_assignment %>
				There are no reviews of your work yet.
			<%else%>
				<%if review_mediawiki @assignment.directory_path, _time, @user_name == ''%>
					There are no reviews of your work because it seems that you have not submitted anything for this assignment.
				<%else%>
					There are no reviews of your work yet.
				<%end%>
			<%end%>
		<%else%>
			There are no reviews on your work yet.
		<%end%>
	<%end%>
<%if(@review_of_review_mappings.size > 0)%>

Reviews of reviews

  <%ror_no = 1%>
   <% for ror_map in @review_of_review_mappings %>
  <%
  @ror = ReviewOfReview.find_by_review_of_review_mapping_id(ror_map.id) %>
  <% if (@ror)%>

Review of Review <%=ror_no%>  <%= link_to "View",{:controller => 'review_of_review', :action => 'view_review_of_review', :id => @ror.id} %>
  <% end %>
  <%ror_no += 1
  	end
  end%>

Scores for <%= Assignment.find(@assignment_id).name %>

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>
<%
    review_no = 1
	grade = 0
    _time = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s
    for review_map in @review_mapping
        for review in review_map.reviews%>

            Review <%=review_no
                #review.id
                %>:

                Question
                Score
				Comment

             <%
             total = 0
             for review_score in review.review_scores
                #if (!Question.find(review_score.question_id).true_false)
                    total += review_score.score
                #end%>

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

            <%end
			  grade += total%>

Total	<%=total%>  	Score: <%=total*100/@sum_of_max%>%

           Additional comment : <%=review.additional_comment%>

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

Give feedback to reviewer:

		    <%if(ReviewFeedback.find(:first,:conditions =>["review_id = ? and assignment_id = ?", review.id, @assignment_id]))
      		  	review_feedback_text = ReviewFeedback.find(:first,:conditions =>["review_id = ? and assignment_id = ?", review.id, @assignment_id]).txt
		      end
			%>
		   	<%=text_area('author','text',:rows=>5,:value=>review_feedback_text)%>

			<%= hidden_field_tag ('participant_id', @student.id) %>
			<%= hidden_field_tag ('review_id', review.id) %>
			<%= hidden_field_tag ('assignment_id', @assignment_id) %>
			<input type='submit' value='Submit/Edit'/>
			<%= end_form_tag %>

		   <%review_no +=1
        end
	end%>
    <% if review_no-1 > 0 %>

Grade

		Average (of all reviews) = <%=grade/(review_no-1)%>
		<%if @final_penalty !=0%>

Penalty units= <%=@penalty_units%> Penalty per unit=<%=@late_policy.penalty_per_unit%> Maximum penalty=<%=@late_policy.max_penalty%>

		<%end%>
		  Final grade = <%=(grade/(review_no-1))*100/@sum_of_max-@final_penalty%>%

   	<%else%>
		<%if @assignment.wiki_type_id == 2 %>
			<%if @assignment.team_assignment %>
				There are no reviews of your work yet.
			<%else%>
				<%if review_mediawiki @assignment.directory_path, _time, @user_name == ''%>
					There are no reviews of your work because it seems that you have not submitted anything for this assignment.
				<%else%>
					There are no reviews of your work yet.
				<%end%>
			<%end%>
		<%else%>
			There are no reviews on your work yet.
		<%end%>
	<%end%>
<%if(@review_of_review_mappings.size > 0)%>

Reviews of reviews

  <%ror_no = 1%>
   <% for ror_map in @review_of_review_mappings %>
  <%
  @ror = ReviewOfReview.find_by_review_of_review_mapping_id(ror_map.id) %>
  <% if (@ror)%>

Review of Review <%=ror_no%>  <%= link_to "View",{:controller => 'review_of_review', :action => 'view_review_of_review', :id => @ror.id} %>
  <% end %>
  <%ror_no += 1
  	end
  end%>


Rename "Empty Page Cache" to "Empty Fragment Cache" in admin interface

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

<% @page_heading = 'Blog settings' %>

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

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

Resource Defaults

Cache

General Settings

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      URLs to ping automatically:

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

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

Text Filter

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

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

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

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

Notification

Typo can notify you when new articles or comments are posted

      Email address to use in From: field when Typo sends mail:
      <input name="setting[email_from]" size="20" id="email_from" type="text" value="<%= config_value(:email_from) %>" />

      Jabber account to use when sending Jabber notifications:
      <input name="setting[jabber_address]" size="20" id="jabber_address" type="text" value="<%= config_value(:jabber_address) %>" />

      Password for Jabber account:
      <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= config_value(:jabber_password) %>" />

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

Spam Protection

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

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

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

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

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

(Set to 0 to never disable comments)

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

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

(Set to 0 to never reject comments)

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

Resource Defaults

          The below settings act as defaults when you choose to publish an enclosure with iTunes metadata.

          Author:
          <input name="setting[itunes_author]" size="25" id="itunes_author" type="text" value="<%= config_value(:itunes_author) %>" />

          Subtitle:
          <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= config_value(:itunes_subtitle) %>" />(setting for channel)

        Summary:(setting for channel)

          <textarea name="setting[itunes_summary]" cols="40" rows="3"><%= config_value(:itunes_summary) %></textarea>

          Email:
          <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= config_value(:itunes_email) %>" />  Not Published by Apple

          Optional Name:
          <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= config_value(:itunes_name) %>" />  Not Published by Apple

          Copyright Information:
          <input name="setting[itunes_copyright]" size="25" id="itunes_copyright" type="text" value="<%= config_value(:itunes_copyright) %>" />

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

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

Cache

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

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

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

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

  <%= end_form_tag %>

<% @page_heading = 'Blog settings' %>

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

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

Resource Defaults

Cache

General Settings

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      URLs to ping automatically:

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

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

Text Filter

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

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

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

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

Notification

Typo can notify you when new articles or comments are posted

      Email address to use in From: field when Typo sends mail:
      <input name="setting[email_from]" size="20" id="email_from" type="text" value="<%= config_value(:email_from) %>" />

      Jabber account to use when sending Jabber notifications:
      <input name="setting[jabber_address]" size="20" id="jabber_address" type="text" value="<%= config_value(:jabber_address) %>" />

      Password for Jabber account:
      <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= config_value(:jabber_password) %>" />

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

Spam Protection

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

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

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

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

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

(Set to 0 to never disable comments)

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

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

(Set to 0 to never reject comments)

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

Resource Defaults

          The below settings act as defaults when you choose to publish an enclosure with iTunes metadata.

          Author:
          <input name="setting[itunes_author]" size="25" id="itunes_author" type="text" value="<%= config_value(:itunes_author) %>" />

          Subtitle:
          <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= config_value(:itunes_subtitle) %>" />(setting for channel)

        Summary:(setting for channel)

          <textarea name="setting[itunes_summary]" cols="40" rows="3"><%= config_value(:itunes_summary) %></textarea>

          Email:
          <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= config_value(:itunes_email) %>" />  Not Published by Apple

          Optional Name:
          <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= config_value(:itunes_name) %>" />  Not Published by Apple

          Copyright Information:
          <input name="setting[itunes_copyright]" size="25" id="itunes_copyright" type="text" value="<%= config_value(:itunes_copyright) %>" />

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

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

Cache

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

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

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

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

  <%= end_form_tag %>


Fix minor JS problem on admin settings page.  (closes #287)

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

<% @page_heading = 'Blog settings' %>

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

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

Cache

General Settings

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

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

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

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

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

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

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

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

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

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

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

Text Filter

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

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

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

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

Spam Protection

Enabling spam protection will make typo compare the IP address of posters against blacklists. Good defense against spam bots.

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

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

(Set to 0 to never disable comments)

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

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

(Set to 0 to never reject comments)

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

Cache

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

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

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

  <%= end_form_tag %>


Removed statistics tab from e-marketing

Removed statistics tab from e-marketing

<% ajax_tabs [ 'Site Visitors', 'Google Analytics' ], 'Site Visitors' do |t| -%>

<% t.tab do %>

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

<% end -%>

<% t.tab do %>

<%= "Options Updated".t %>

  <% tabled_form_for :options, @options, :html => { :onsubmit => 'return VisitorViewer.saveOptions(this);' } do |f| %>
    <%= f.radio_buttons :google_analytics, [ [ 'Enabled' , 'enabled' ], [ 'Disabled', 'disabled'] ], :label => "Google Analytics", :onchange => 'VisitorViewer.googleRadios()' %>
    <%= f.text_field :analytics_code, :disabled => @options.google_analytics == 'enabled' ? false : true %>
    <%= f.submit_tag 'Update', :id => 'submit_options' %>
  <% end -%>

  <div id='analytics_disabled' <%= "style='display:none;'" if @options.google_analytics == 'enabled'%>>
  <%= "Google Analytics is a free service that tracks visitors to your website and allows you to analyze your traffic.".t %>
  <%= "You must first".t %> <a target='_blank' href='<%= "http://www.google.com/analytics/".t %>'><%= "Register for Google Analytics".t %>.
  <%="Once you are registered, please click enabled and enter your analytics code from the code block as highlighted below. ".t %>

    <%= h('

      ') %>

<div id='analytics_enabled' <%= "style='display:none;'" unless @options.google_analytics == 'enabled'%>>
  <%= "Goto".t %><%= "Your Google Analytics Account".t %>

<% end -%>

<% end -%>

<% ajax_tabs [ 'Site Visitors', [ 'Site Statistics', "VisitorViewer.loadStatistics();" ],'Google Analytics' ], 'Site Visitors' do |t| -%>

<% t.tab do %>

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

<% end -%>

<% t.tab do %>

  Loading Site Statistics...

<% end -%>

<% t.tab do %>

<%= "Options Updated".t %>

  <% tabled_form_for :options, @options, :html => { :onsubmit => 'return VisitorViewer.saveOptions(this);' } do |f| %>
    <%= f.radio_buttons :google_analytics, [ [ 'Enabled' , 'enabled' ], [ 'Disabled', 'disabled'] ], :label => "Google Analytics", :onchange => 'VisitorViewer.googleRadios()' %>
    <%= f.text_field :analytics_code, :disabled => @options.google_analytics == 'enabled' ? false : true %>
    <%= f.submit_tag 'Update', :id => 'submit_options' %>
  <% end -%>

  <div id='analytics_disabled' <%= "style='display:none;'" if @options.google_analytics == 'enabled'%>>
  <%= "Google Analytics is a free service that tracks visitors to your website and allows you to analyze your traffic.".t %>
  <%= "You must first".t %> <a target='_blank' href='<%= "http://www.google.com/analytics/".t %>'><%= "Register for Google Analytics".t %>.
  <%="Once you are registered, please click enabled and enter your analytics code from the code block as highlighted below. ".t %>

    <%= h('

      ') %>

<div id='analytics_enabled' <%= "style='display:none;'" unless @options.google_analytics == 'enabled'%>>
  <%= "Goto".t %><%= "Your Google Analytics Account".t %>

<% end -%>

<% end -%>


Handle MySQL/Postgres boolean differences.

<%= h(@title) %>

<% content_for :head do %>
<%= auto_discovery_link_tag :atom, :action => 'georss', :display_name => @display_name, :tag => @tag %>
<% end %>

  <%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
  <% if @user.nil? or @display_name.nil? or @user.display_name != @display_name %>
    | <%= link_to 'See just your traces, or upload a trace', :action => 'mine' %>
  <% end %>
  <% if @tag or @display_name %>
    | <%= link_to 'See all traces', :controller => 'trace', :action => 'list' %>
  <% end %>
  <% if @tag and @user and @user.display_name == @display_name %>
    | <%= link_to 'See all your traces', :controller => 'trace', :action => 'mine' %>
  <% end %>

<% if @user and @user.traces.count(:conditions => ["inserted=?", false]) > 4 %>

    You have <%= @user.traces.count(:conditions => ["inserted=?", false]) %> traces
    waiting for upload. Please consider waiting for these to finish before
    uploading any more, so as not to block the queue for other users.

<% end %>

<%= h(@title) %>

<% content_for :head do %>
<%= auto_discovery_link_tag :atom, :action => 'georss', :display_name => @display_name, :tag => @tag %>
<% end %>

  <%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
  <% if @user.nil? or @display_name.nil? or @user.display_name != @display_name %>
    | <%= link_to 'See just your traces, or upload a trace', :action => 'mine' %>
  <% end %>
  <% if @tag or @display_name %>
    | <%= link_to 'See all traces', :controller => 'trace', :action => 'list' %>
  <% end %>
  <% if @tag and @user and @user.display_name == @display_name %>
    | <%= link_to 'See all your traces', :controller => 'trace', :action => 'mine' %>
  <% end %>

<% if @user and @user.traces.count(:conditions => "inserted=0") > 4 %>

    You have <%= @user.traces.count(:conditions => "inserted=0") %> traces
    waiting for upload. Please consider waiting for these to finish before
    uploading any more, so as not to block the queue for other users.

<% end %>


Fixes XML sidebar

Fixes XML sidebar

<%= _("Syndicate")%>

  <% if sidebar.articles -%>

<a href="<%= url_for :controller => 'articles', :action => 'index', :format => sidebar.format_strip %>" title="Articles feed"><%= _("Articles")%>

  <% end %>
  <% if sidebar.comments -%>

<a href="<%= admin_comments_url(:format=>sidebar.format_strip) %>" title="Comments feed"><%= _("Comments")%>

  <% end %>
  <% if sidebar.trackbacks -%>

<a href="<%= url_for :controller=>'xml', :action=>'feed', :format => sidebar.format_strip, :type => 'trackbacks' %>" title="Trackbacks feed"><%= _("Trackbacks")%>

  <% end %>
  <% if sidebar.category_feeds and controller.controller_name == 'categories' and controller.action_name == 'show' %>
    <% format = (sidebar.format_strip == 'rss') ? @auto_discovery_url_rss : @auto_discovery_url_atom  %>
    <%= content_tag(:li, _("Category %s",  link_to(@grouping.display_name, format))) %>
  <% end %>
  <% if sidebar.tag_feeds and controller.controller_name == 'tags' and controller.action_name == 'show' %>
    <% format = (sidebar.format_strip == 'rss') ? @auto_discovery_url_rss : @auto_discovery_url_atom  %>
    <%= content_tag(:li, _("Tag %s",  link_to(@grouping.display_name, format))) %>
  <% end %>
  <% if sidebar.article_comments and controller.controller_name == 'redirect' %>
    <% format = (sidebar.format_strip == 'rss') ? @auto_discovery_url_rss : @auto_discovery_url_atom  %>
    <%= content_tag(:li, link_to(@article.title, format)) %>
  <% end %>

<%= _("Syndicate")%>

  <% if @sidebar.articles -%>

<a href="<%= url_for :controller => 'articles', :action => 'index', :format => @sidebar.format_strip %>" title="Articles feed"><%= _("Articles")%>

  <% end %>
  <% if @sidebar.comments -%>

<a href="<%= admin_comments_url(:format=>@sidebar.format_strip) %>" title="Comments feed"><%= _("Comments")%>

  <% end %>
  <% if @sidebar.trackbacks -%>

<a href="<%= url_for :controller=>'xml', :action=>'feed', :format => @sidebar.format_strip, :type => 'trackbacks' %>" title="Trackbacks feed"><%= _("Trackbacks")%>

  <% end %>
  <% if @sidebar.category_feeds and controller.controller_name == 'categories' and controller.action_name == 'show' %>
    <% format = (@sidebar.format_strip == 'rss') ? @auto_discovery_url_rss : @auto_discovery_url_atom  %>
    <%= content_tag(:li, _("Category %s",  link_to(@grouping.display_name, format))) %>
  <% end %>
  <% if @sidebar.tag_feeds and controller.controller_name == 'tags' and controller.action_name == 'show' %>
    <% format = (@sidebar.format_strip == 'rss') ? @auto_discovery_url_rss : @auto_discovery_url_atom  %>
    <%= content_tag(:li, _("Tag %s",  link_to(@grouping.display_name, format))) %>
  <% end %>
  <% if @sidebar.article_comments and controller.controller_name == 'redirect' %>
    <% format = (@sidebar.format_strip == 'rss') ? @auto_discovery_url_rss : @auto_discovery_url_atom  %>
    <%= content_tag(:li, link_to(@article.title, format)) %>
  <% end %>


ActionItem16: marking TODO

ActionItem16: marking TODO

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

<%= _("%s's validation") % @pending.name  %>

<%= _('Provided information') %>

    <%= _('Name') %>
    <%= @pending.name %>

    <%= _('Address') %>
    <%= @pending.address %>

    <%= _('Contact Phone') %>
    <%= @pending.contact_phone %>

    <%= _('Contact Person') %>
    <%= @pending.contact_person %>

    <%= _('Acronym') %>
    <%= @pending.acronym %>

    <%= _('Identifier') %>
    <%= @pending.identifier %>

    <%= _('Foundation Year') %>
    <%= @pending.foundation_year %>

    <%= _('Legal Year') %>
    <%= @pending.legal_form %>

    <%= _('Economic Activity') %>
    <%= @pending.economic_activity %>

    <%= _('Management Information') %>
    <%= @pending.management_information %>

<%= _('Final decision') %>

<%# TODO %>


Fixed broken path for article status images

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

<tr class="<%= article.status %>" id="article_<%= article.id %>">
  <%= image_tag "mephisto/icons/#{status_icon[article.status][1]}", :class => "#{status_icon[article.status][0]} icon", :title => "This article is #{article.status}", :alt => "#{article.status}" %>
  <%= link_to(article.title, {:action => 'edit', :id => article}) %>

    <% if article.comments.size == 0 %>
      none
    <% else %>
      <%= link_to pluralize(article.comments.size, 'comment'), { :action => 'comments', :id => article } %>
    <% end %>

  <%= published_at_for article %>
  <%= article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style => 'vertical-align: middle'), article.full_permalink) : ' ' %>

<tr class="<%= article.status %>" id="article_<%= article.id %>">
  <%= image_tag "icons/mephisto/#{status_icon[article.status][1]}", :class => "#{status_icon[article.status][0]} icon", :title => "This article is #{article.status}", :alt => "#{article.status}" %>
  <%= link_to(article.title, {:action => 'edit', :id => article}) %>

    <% if article.comments.size == 0 %>
      none
    <% else %>
      <%= link_to pluralize(article.comments.size, 'comment'), { :action => 'comments', :id => article } %>
    <% end %>

  <%= published_at_for article %>
  <%= article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style => 'vertical-align: middle'), article.full_permalink) : ' ' %>


make link to unformatted build log prettier

<% @rss_feeds = {"#{@project.name} builds" => {:controller => 'projects', :action => 'show', :id => @project, :format => 'rss'}} -%>

    <% prev_build, next_build = @project.previous_build(@build), @project.next_build(@build)%>

    <%= link_to_unless !prev_build, '< prev',
                       {:project => @project, :build => prev_build}, :accesskey => 'k' %>
    <%= @build.label %>
    <%= link_to_unless !next_build, 'next >',
                       {:project => @project, :build => next_build}, :accesskey => 'j' %>
    <%= link_to_unless !next_build, 'latest >>', :project => @project.name %>

  <% @builds_for_navigation_list.each do |build| %>
    <div class="build-link<%= ' selected' if @build.label == build.label %>">
      <%= link_to_build(@project, build) %>

  <% end %>

    <%= image_tag "spinner.gif" %>

    <%= h @project.name %> build <%= h @build.label %>
    <% if @build.failed? %>FAILED<% end %>
    <% if @build.incomplete? %> (INCOMPLETE)<% end %>

    <%= display_build_time %>

Build Changeset

<%= format_changeset_log(@build.changeset) %>

  <% test_failures = failures_and_errors_if_any(@build.output) %>
  <% if test_failures %>

Test Failures and Errors

<%= test_failures %>

  <% end %>

  <% plugin_errors = @build.plugin_errors %>
  <% unless plugin_errors.empty? %>

Plugin Errors

<%= h plugin_errors %>

  <% end %>

  <div class="<%= @build.incomplete? ? 'section_open' : 'section_closed' %>">

Build Log

<%= format_build_log(@build.output) %>

<%= link_to "See unformatted build log…", build_artifact_path(:project => @project.name, :build => @build.label, :path => 'build.log') %>

  <% unless @build.additional_artifacts.empty? %>

Custom Build Artifacts

<% @build.additional_artifacts.each do |artifact| %>
<%= link_to artifact, build_artifact_path(:project => @project.name, :build => @build.label, :path => artifact) %>
<% end %>

  <% end %>

Project Settings

<%= format_project_settings(@build.project_settings) %>

<% @rss_feeds = {"#{@project.name} builds" => {:controller => 'projects', :action => 'show', :id => @project, :format => 'rss'}} -%>

    <% prev_build, next_build = @project.previous_build(@build), @project.next_build(@build)%>

    <%= link_to_unless !prev_build, '< prev',
                       {:project => @project, :build => prev_build}, :accesskey => 'k' %>
    <%= @build.label %>
    <%= link_to_unless !next_build, 'next >',
                       {:project => @project, :build => next_build}, :accesskey => 'j' %>
    <%= link_to_unless !next_build, 'latest >>', :project => @project.name %>

  <% @builds_for_navigation_list.each do |build| %>
    <div class="build-link<%= ' selected' if @build.label == build.label %>">
      <%= link_to_build(@project, build) %>

  <% end %>

    <%= image_tag "spinner.gif" %>

    <%= h @project.name %> build <%= h @build.label %>
    <% if @build.failed? %>FAILED<% end %>
    <% if @build.incomplete? %> (INCOMPLETE)<% end %>

    <%= display_build_time %>

Build Changeset

<%= format_changeset_log(@build.changeset) %>

  <% test_failures = failures_and_errors_if_any(@build.output) %>
  <% if test_failures %>

Test Failures and Errors

<%= test_failures %>

  <% end %>

  <% plugin_errors = @build.plugin_errors %>
  <% unless plugin_errors.empty? %>

Plugin Errors

<%= h plugin_errors %>

  <% end %>

  <div class="<%= @build.incomplete? ? 'section_open' : 'section_closed' %>">

Build Log

<%= format_build_log(@build.output) %>

<%= link_to "See unformatted build log", build_artifact_path(:project => @project.name, :build => @build.label, :path => 'build.log') %>

  <% unless @build.additional_artifacts.empty? %>

Custom Build Artifacts

<% @build.additional_artifacts.each do |artifact| %>
<%= link_to artifact, build_artifact_path(:project => @project.name, :build => @build.label, :path => artifact) %>
<% end %>

  <% end %>

Project Settings

<%= format_project_settings(@build.project_settings) %>


Fix display of empty lines

Fix display of empty lines

Diff is <%= @diff.inspect %>

<% @diff.chunks.each do |chunk| %>

      Src file:
      <%=h chunk.src_files.join(", ") %>

      Dst file:
      <%=h chunk.dst_file %>

  <% chunk.lines.each do |line| %>

      <% line.line_numbers.each do |n| %>
        <%=h n.nil? ? "-" : n %>
      <% end %>

        <% if line.line.empty? %>

        <% else %>

<%=h line.line %>

        <% end %>

  <% end %>

  Chunk: <%= chunk %>

<% end %>

Diff is <%= @diff.inspect %>

<% @diff.chunks.each do |chunk| %>

      Src file:
      <%=h chunk.src_files.join(", ") %>

      Dst file:
      <%=h chunk.dst_file %>

  <% chunk.lines.each do |line| %>

      <% line.line_numbers.each do |n| %>
        <%=h n.nil? ? "-" : n %>
      <% end %>

<%=h line.line.chomp %>

  <% end %>

  Chunk: <%= chunk %>

<% end %>


Add tick icon to New Task menu item Move Search menu text into the search field

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

    <%= javascript_include_merged :base %>
    <%= javascript_include_merged :tt %>

    <%= javascript_include_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>

    <%= stylesheet_link_merged :tt %>
    <%= stylesheet_link_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
    <%= javascript_include_tag "builder" if ['activities'].include? controller.controller_name %>
    <% if ['activities'].include? controller.controller_name %>
      <%= javascript_include_tag "portal" %>

      <%= javascript_include_tag "flotr" %>
    <% end %>

    <%= stylesheet_link_tag "print", { :media => "print" } %>
    <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'rss', :id => current_user.uuid }) %>

    <title><%= controller.controller_name + " / " + controller.action_name %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<% @internal = Customer.find(:first, :conditions => ["(name = 'Internal' or name = ?) AND company_id = ?", current_user.company.name, current_user.company.id]) %>

<% if session[:project] && session[:project].customer.css && session[:project].customer.css.length > 0 %>

<% elsif !@internal.nil? && !@internal.css.nil? && @internal.css.length > 0 %>

<% end %>

              <%= render(:partial => "layouts/menu") %>

              <% form_tag( {:controller => 'search', :action => 'search'}, {:method => 'get'}) do %>

                <% if current_user.seen_welcome.to_i == 0 %>
                  <% if controller.controller_name == "activities" && controller.action_name == 'welcome' %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'} %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "activities" && controller.action_name != 'welcome' %>

<%= link_to "#{_('Overview') }", { :controller => 'activities', :action => 'list'}, :class => "active"%>
                <% else %>

<%= link_to "#{_('Overview')}", { :controller => 'activities', :action => 'list'} %>
		<% end %>

<%= link_to_remote _('Add New Widget'), :url => { :controller => 'widgets', :action => 'add'} %>

                <% if controller.controller_name == "tasks" && !['timeline', 'new'].include?(controller.action_name) %>

<%= link_to "#{_('Browse')}", { :controller => 'views', :action => 'browse'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Browse')}", :controller => 'views', :action => 'browse' %>
                <% end %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                    <% project_ids = current_project_ids %>
                    <% client_ids = current_projects.collect(&:customer_id).join(',')
                       client_ids = "0" if client_ids.nil? || client_ids.empty?

                       views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                    for view in views %>

<%= link_to(view.name, { :controller => 'views', :action => 'select', :id => view }) %><%= link_to("[#{_('Edit')}]", {:controller => 'views', :action => 'edit', :id => view}) if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

		    <% end %>

<%= link_to "[#{_('New View')}]",  :controller => 'views', :action => 'new' %>

                <% if current_user.option_tracktime.to_i == 1%>
                  <% if controller.controller_name == "timeline" && controller.action_name == "list" %>

<%= link_to "#{_('Timeline')}", { :controller => 'timeline', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Timeline')}", :controller => 'timeline', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "project_files"  %>

<%= link_to "#{_('Files')}", {:controller => 'project_files', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Files')}", :controller => 'project_files', :action => 'list' %>

                <% end %>

                <% if current_user.option_tracktime.to_i == 1%>
                  <% if controller.controller_name == "reports"  %>

<%= link_to "#{_('Reports')}", {:controller => 'reports', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Reports')}", :controller => 'reports', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "schedule"  %>

<%= link_to "#{_('Schedule')}", {:controller => 'schedule', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Schedule')}", :controller => 'schedule', :action => 'list' %>

                <% end %>

                <% if controller.controller_name == "wiki"  %>

<%= link_to "#{_('Wiki')}", {:controller => 'wiki', :action => 'show', :id => nil}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Wiki')}", :controller => 'wiki', :action => 'show' %>

                <% end %>

                <% if controller.controller_name == "shout"  %>

<%= link_to "#{_('Chat')}", {:controller => 'shout', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Chat')}", :controller => 'shout', :action => 'list' %>

                <% end %>

                <% if ['forums', 'posts', 'topics'].include? controller.controller_name  %>

<%= link_to "#{_('Forums')}", {:controller => 'forums', :action => 'index'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Forums')}", :controller => 'forums', :action => 'index' %>

                <% end %>

                <% if controller.controller_name == "projects" %>

<%= link_to "#{_('Projects')}", {:controller => 'projects', :action => 'list'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Projects')}", :controller => 'projects', :action => 'list' %>
                <% end %>

<%= link_to _("New Project"), :controller => 'projects', :action => 'new' %>

                <% if controller.controller_name == "tasks" && controller.action_name == 'new'  %>

<%= link_to "#{_('New Task')}", {:controller => 'tasks', :action => 'new'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('New Task') +''}", {:controller => 'tasks', :action => 'new'} %>
                <% end %>

<%= link_to _("New Project"), :controller => 'projects', :action => 'new' %>

<%= link_to _("New View"), :controller => 'views', :action => 'new' %>

<%= link_to _("New Note"), :controller => 'pages', :action => 'new' %>

<%= link_to "#{_('Log Out')}", { :controller => 'login', :action => 'logout'}, :class => "right" %>

                <% if controller.controller_name == "users" && controller.action_name == "edit_preferences" %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right" %>

                <% end %>

                <% if current_user.admin > 0 %>

                <% if current_user.option_externalclients.to_i == 1%>
                <% if controller.controller_name == "customers" %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "right" %>

                <% end %>
                <% end %>

                <% if controller.controller_name == "users" && controller.action_name != "edit_preferences" %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right" %>

                <% end %>

                <% end %>

<%= text_field_tag 'query', _('Search'), {:size => 10, :style => "font-size:9px;", :class => 'optional', :onfocus => "if($('query').value == '#{_('Search')}') {$('query').value = ''; $('query').removeClassName('optional');};"  }%>

                <% end %>

        <% if current_user.respond_to?(:seen_news_id)%>
          <% news = NewsItem.find(:first, :order => "created_at desc", :conditions => ["id > ?", current_user.seen_news_id ]) %>
          <% unless news.nil? %>

[<%= tz.utc_to_local(news.created_at).strftime("#{current_user.time_format} #{current_user.date_format}") %>]	<%= news.body %>
                <%= link_to_remote "[#{_('Hide')}]", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id },
                :success => visual_effect(:fade, "news", :duration => 0.5) %>

          <% end %>
          <% end %>

          <div id="flash" <%="style=\"display:none\"" unless flash['notice']%>>

<%= flash['notice'] %>
	[<%=_ 'Hide'%>]

          <%= @content_for_layout %>

          <td align="right" valign="top" style="width:15%;<%= "display:none;" if session[:collapse_menu].to_i > 0 %>padding-left:1em;" id="left_menu">

<%=_ 'Views' %>

<%= link_to _('New'),  :controller => 'views', :action => 'new' %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                <% project_ids = current_project_ids %>
                <% client_ids = current_projects.collect(&:customer_id).join(',')
                   client_ids = "0" if client_ids.nil? || client_ids.empty?

                   views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                   for view in views %>

<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>	<%= link_to _('Edit'), :controller => 'views', :action => 'edit', :id => view if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

                   <% end %>

<%=_ 'Notes'%>

<%= link_to _('New'), :controller => 'pages', :action => 'new' %>

          <% for page in current_pages %>

                  <%= link_to "#{page.name} / #{page.project.name}", { :controller => 'pages', :action => 'show', :id => page} %> (<%=_('%s ago', time_ago_in_words( page.updated_at, false ) )%>)

          <% end %>

    Clocking IT v0.99.2 - <%=_ 'Feedback? Suggestions? Ideas? Bugs?'%> <%=_ 'Let me know'%> <%= link_to "[Admin]", :controller => "admin", :action => "index" if current_user.admin == 10 %>

<%= periodically_call_remote(:url => { :controller => 'tasks', :action => 'update_sheet_info' }, :frequency => 90 ) -%>

<%= flash_plugin(session[:channels]) %>

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

    <%= javascript_include_merged :base %>
    <%= javascript_include_merged :tt %>

    <%= javascript_include_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>

    <%= stylesheet_link_merged :tt %>
    <%= stylesheet_link_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
    <%= javascript_include_tag "builder" if ['activities'].include? controller.controller_name %>
    <% if ['activities'].include? controller.controller_name %>
      <%= javascript_include_tag "portal" %>

      <%= javascript_include_tag "flotr" %>
    <% end %>

    <%= stylesheet_link_tag "print", { :media => "print" } %>
    <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'rss', :id => current_user.uuid }) %>

    <title><%= controller.controller_name + " / " + controller.action_name %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<% @internal = Customer.find(:first, :conditions => ["(name = 'Internal' or name = ?) AND company_id = ?", current_user.company.name, current_user.company.id]) %>

<% if session[:project] && session[:project].customer.css && session[:project].customer.css.length > 0 %>

<% elsif !@internal.nil? && !@internal.css.nil? && @internal.css.length > 0 %>

<% end %>

              <%= render(:partial => "layouts/menu") %>

              <% form_tag( {:controller => 'search', :action => 'search'}, {:method => 'get'}) do %>

                <% if current_user.seen_welcome.to_i == 0 %>
                  <% if controller.controller_name == "activities" && controller.action_name == 'welcome' %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'} %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "activities" && controller.action_name != 'welcome' %>

<%= link_to "#{_('Overview') }", { :controller => 'activities', :action => 'list'}, :class => "active"%>
                <% else %>

<%= link_to "#{_('Overview')}", { :controller => 'activities', :action => 'list'} %>
		<% end %>

Add New Widget

                <% if controller.controller_name == "tasks" && !['timeline', 'new'].include?(controller.action_name) %>

<%= link_to "#{_('Browse')}", { :controller => 'views', :action => 'browse'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Browse')}", :controller => 'views', :action => 'browse' %>
                <% end %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                    <% project_ids = current_project_ids %>
                    <% client_ids = current_projects.collect(&:customer_id).join(',')
                       client_ids = "0" if client_ids.nil? || client_ids.empty?

                       views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                    for view in views %>

<%= link_to(view.name, { :controller => 'views', :action => 'select', :id => view }) %><%= link_to("[#{_('Edit')}]", {:controller => 'views', :action => 'edit', :id => view}) if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

		    <% end %>

<%= link_to "[#{_('New View')}]",  :controller => 'views', :action => 'new' %>

                <% if current_user.option_tracktime.to_i == 1%>
                  <% if controller.controller_name == "timeline" && controller.action_name == "list" %>

<%= link_to "#{_('Timeline')}", { :controller => 'timeline', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Timeline')}", :controller => 'timeline', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "project_files"  %>

<%= link_to "#{_('Files')}", {:controller => 'project_files', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Files')}", :controller => 'project_files', :action => 'list' %>

                <% end %>

                <% if current_user.option_tracktime.to_i == 1%>
                  <% if controller.controller_name == "reports"  %>

<%= link_to "#{_('Reports')}", {:controller => 'reports', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Reports')}", :controller => 'reports', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "schedule"  %>

<%= link_to "#{_('Schedule')}", {:controller => 'schedule', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Schedule')}", :controller => 'schedule', :action => 'list' %>

                <% end %>

                <% if controller.controller_name == "wiki"  %>

<%= link_to "#{_('Wiki')}", {:controller => 'wiki', :action => 'show', :id => nil}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Wiki')}", :controller => 'wiki', :action => 'show' %>

                <% end %>

                <% if controller.controller_name == "shout"  %>

<%= link_to "#{_('Chat')}", {:controller => 'shout', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Chat')}", :controller => 'shout', :action => 'list' %>

                <% end %>

                <% if ['forums', 'posts', 'topics'].include? controller.controller_name  %>

<%= link_to "#{_('Forums')}", {:controller => 'forums', :action => 'index'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Forums')}", :controller => 'forums', :action => 'index' %>

                <% end %>

                <% if controller.controller_name == "tasks" && controller.action_name == 'new'  %>

<%= link_to "#{_('New Task')}", {:controller => 'tasks', :action => 'new'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('New Task')}", :controller => 'tasks', :action => 'new' %>
                <% end %>

<%= link_to _("New Project"), :controller => 'projects', :action => 'new' %>

<%= link_to _("New View"), :controller => 'views', :action => 'new' %>

<%= link_to _("New Note"), :controller => 'pages', :action => 'new' %>

<%= link_to "#{_('Log Out')}", { :controller => 'login', :action => 'logout'}, :class => "right" %>

                <% if controller.controller_name == "users" && controller.action_name == "edit_preferences" %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right" %>

                <% end %>

                <% if current_user.admin > 0 %>

                <% if current_user.option_externalclients.to_i == 1%>
                <% if controller.controller_name == "customers" %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "right" %>

                <% end %>
                <% end %>

                <% if controller.controller_name == "users" && controller.action_name != "edit_preferences" %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right" %>

                <% end %>

                <% end %>

<%=_ 'Search' %> <%= text_field_tag 'query', "", {:size => 10, :style => "font-size:9px;"}%>

                <% end %>

        <% if current_user.respond_to?(:seen_news_id)%>
          <% news = NewsItem.find(:first, :order => "created_at desc", :conditions => ["id > ?", current_user.seen_news_id ]) %>
          <% unless news.nil? %>

[<%= tz.utc_to_local(news.created_at).strftime("#{current_user.time_format} #{current_user.date_format}") %>]	<%= news.body %>
                <%= link_to_remote "[#{_('Hide')}]", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id },
                :success => visual_effect(:fade, "news", :duration => 0.5) %>

          <% end %>
          <% end %>

          <div id="flash" <%="style=\"display:none\"" unless flash['notice']%>>

<%= flash['notice'] %>
	[<%=_ 'Hide'%>]

          <%= @content_for_layout %>

          <td align="right" valign="top" style="width:15%;<%= "display:none;" if session[:collapse_menu].to_i > 0 %>padding-left:1em;" id="left_menu">

<%=_ 'Views' %>

<%= link_to _('New'),  :controller => 'views', :action => 'new' %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                <% project_ids = current_project_ids %>
                <% client_ids = current_projects.collect(&:customer_id).join(',')
                   client_ids = "0" if client_ids.nil? || client_ids.empty?

                   views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                   for view in views %>

<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>	<%= link_to _('Edit'), :controller => 'views', :action => 'edit', :id => view if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

                   <% end %>

<%=_ 'Notes'%>

<%= link_to _('New'), :controller => 'pages', :action => 'new' %>

          <% for page in current_pages %>

                  <%= link_to "#{page.name} / #{page.project.name}", { :controller => 'pages', :action => 'show', :id => page} %> (<%=_('%s ago', time_ago_in_words( page.updated_at, false ) )%>)

          <% end %>

    Clocking IT v0.99.2 - <%=_ 'Feedback? Suggestions? Ideas? Bugs?'%> <%=_ 'Let me know'%> <%= link_to "[Admin]", :controller => "admin", :action => "index" if current_user.admin == 10 %>

<%= periodically_call_remote(:url => { :controller => 'tasks', :action => 'update_sheet_info' }, :frequency => 90 ) -%>

<%= flash_plugin(session[:channels]) %>


ActionItem0: modifing path of back icon

ActionItem0: modifing path of back icon

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

    <%= javascript_include_tag :defaults %>
    <%= design_all_header_tags %>
    <%= stylesheet_link_tag 'comatose_admin' %>
    <%= javascript_include_tag 'comatose_admin' %>

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

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

          <%= header %>

          <%= flash[:notice] %>

          <%= design_display(yield) %>

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

    <%= javascript_include_tag :defaults %>
    <%= design_all_header_tags %>
    <%= stylesheet_link_tag 'comatose_admin' %>
    <%= javascript_include_tag 'comatose_admin' %>

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

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

          <%= header %>

          <%= flash[:notice] %>

          <%= design_display(yield) %>

          <%= footer %>
          <%= design_display_icon('back')%>


update for not logging stats when user is not logged in (login page)

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

	<title><%=@title if @title%></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<%= javascript_include_tag :defaults %>

	<%= stylesheet_link_tag "master", :media => "all" %>
	<%= stylesheet_link_tag "calendar/red/style", :media => "all" %>

	<% if @course %>
	<%= auto_discovery_link_tag(:rss, {:controller => 'feed', :course => @course }) %>
	<% end %>

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

<% if flash[:notice] %>
<%= flash[:notice] %>
<% end %>
<% if flash[:badnotice] %>
<%= flash[:badnotice] %>
<% end %>

<% if @course && !@course.open %>

This course is now in archive mode, no changes may be made.

<% end  %>

<% if @course && @course.course_setting && @course.course_setting.enable_attendance && @user.student_in_course?(@course.id) && @course.open_class_period? %>

<%= link_to 'Attendance reporting is open right now for this class.', :controller => '/attendance', :course => @course %>

<% end %>

<%= @content_for_layout %>

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

<%= render :partial => "right" %>

<% if flash[:highlight] %>
  <%= javascript_tag visual_effect(:highlight, "#{flash[:highlight]}", :duration => 3.5 )  %>
<% end %>

<% if @user %>

<% end %>


Remove unwanted whitespace

Remove unwanted whitespace

<% @title = "Summary" %>

Things to do

  <% if @holding_pen_messages.size > 0 %>

        <%=@holding_pen_messages.size%> Put misdelivered responses with the right request

            <% for message in @holding_pen_messages %>

                  <% if message.get_body_for_quoting.strip.size == 0 %>
                      <%= link_to "(no body)", "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% else %>
                      <%= link_to excerpt(message.get_body_for_quoting, "", 60), "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% end %>

                  <%=simple_date(message.sent_at)%>

            <% end %>

  <% end %>

  <% if @error_message_requests.size > 0 %>

        <%=@error_message_requests.size%> Fix these delivery and other errors

            <% for @request in @error_message_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @attention_requests.size > 0 %>

        <%=@attention_requests.size%> Review requests marked by users as requiring your attention

            <% for @request in @attention_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @requires_admin_requests.size > 0 %>

        <%=@requires_admin_requests.size%> These require administrator attention

            <% for @request in @requires_admin_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= @request.title %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @blank_contacts.size > 0 %>

        <%=@blank_contacts.size%> Find missing FOI email for these public authorities (try phoning!)

            <% for @blank_contact in @blank_contacts %>

                  <%= link_to(''.html_safe, public_body_admin_url(@blank_contact))%>
                  <%= public_body_link(@blank_contact)%>

                  <%=simple_date(@blank_contact.updated_at)%>

            <% end %>

  <% end %>

  <% if @old_unclassified.size > 0 %>

        <%=@old_unclassified.size%> Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response

            <% for @request in @old_unclassified %>

                    <%= link_to("".html_safe, request_admin_url(@request)) %>
                    <%= request_link(@request) %>

                    <%=simple_date(@request.get_last_response_event.created_at)%>

            <% end %>

  <% end %>

<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %>

      No pending administration required.

<% end %>


Remove inline css

Remove inline css

<%= _('Links') %>

<%= _('Icon') %>	<%= _('Name') %>	<%= _('Address') %>	<%= _('Target') %>

  <% for link in @block.links do %>

         <%= icon_selector(link['icon']) %>

      <%= text_field_tag 'block[links][][name]', link[:name], :class => 'link-name', :maxlength => 20 %>
      <%= text_field_tag 'block[links][][address]', link[:address], :class => 'link-address' %>

        <%= select_tag('block[links][][target]', options_for_select(LinkListBlock::TARGET_OPTIONS, link[:target])) %>

  <% end %>

<%= link_to_function(_('New link'), nil, :class => 'button icon-add with-text') do |page|
    page.insert_html :bottom, 'links', content_tag('tr',
      content_tag('td', icon_selector('ok')) +
      content_tag('td', text_field_tag('block[links][][name]', '', :maxlength => 20)) +
      content_tag('td', text_field_tag('block[links][][address]', nil, :class => 'link-address'), :class => 'cel-address') +
      content_tag('td', select_tag('block[links][][target]',
options_for_select(LinkListBlock::TARGET_OPTIONS, '_self')))
    ) +
    javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight")
end %>


Escape URL properly.

Escape URL properly.

<% @title = "About" %>

Contents

Introduction

Making requests

Privacy policy

FOI officers

Credits

Contact us

If your question isn't answered here, or you just wanted to let us know
    something about the site, contact us.

Introduction to WhatDoTheyKnow #

What is WhatDoTheyKnow for? #

To help you find out inside information about what the UK government
is doing.

How does the site work? #

You choose the public authority that you would like information from, then
write a brief note describing what you want to know. We then send your request
to the public authority. Any response they make is automatically published on the
website for you and anyone else to find and read.

Why would I bother to do this? #

You pay taxes, and then government does things with the money. All sorts of
things that affect your life, from healthcare through to national defence. Some
it does badly, some it does well. The more we find out about how government
works, the better able we are to make suggestions to improve the things that
are done badly, and to celebrate the things that are done well.

Why would the public authority bother to reply? #

Under Freedom of Information (FOI) law, they have to respond.

Who makes it? #

WhatDoTheyKnow is created and run by mySociety,
and was initially funded by the JRSST Charitable Trust. mySociety is a project of the
registered charity UK Citizens Online Democracy.
If you like what we're doing, then you can
make a donation.

Making requests #

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

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 of public authority to the site, for example all
primary care trusts or all schools, then please
edit this shared spreadsheet (Google account required).

How quickly will I get a response? #

By law public authorities must respond "promptly", and in any event not later
than 20 working days after receiving your request. The date of that hard limit
is shown on the page for your request. You will be emailed if this date goes by
without a response, so you can send the public authority another note to remind
them that they are breaking the law. Note: If you had to
clarify your request, the clock starts from that date, instead of the date they
received your initial request.

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?'.

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

Have a look at the
access to official information
pages on the Information Commisioner's website.

If you're requesting information from a Scottish public authority, the process for accessing official information is very
similar to that to the rest of the UK, however there are a few notable differences (especially around time limits for compliance and
pseudonyms).  The Scottish Information Commissioner's website
contains specific guidance on the Scottish legislation.

Can I request information about myself? #

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

If you would like to know what information a public
authority holds about yourself, you should make a "Subject Access Request" in
private using Data Protection law.  The leaflet Subject
Access - A guide for data subjects (on the Information Commisioner's
website) explains how to do this.

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) #

WhatDoTheyKnow 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.

Why can I only request information about the environment from some authorities? #

Some public authorities, such as South East Water,
don't come under the Freedom of Information Act, but do come under another law called
the Environmental Information Regulations (EIR). It's a very similar law, so you make a request
to them using WhatDoTheyKnow in just the same way as an FOI request. The only difference
is that on the page where you write you request, it reminds you that you can only
request "environmental information" and tells you what that means. It is quite broad.

So can I request information using EIR from other authorities? #

Yes, just make a Freedom of Information (FOI) request as normal. The
authority has a duty to work out if the Environmental Information Regulations
(EIR) is the more appropriate legislation to reply under.

Privacy policy #

Who gets to see my email address? #

We will not disclose your email address to anyone unless we are obliged to by law,
or you ask us to. This includes the public authority that you are sending a
request to.  They only get to see an email address
@whatdotheyknow.com which is specific to that request.

If you send a message to another user on the site, then it will reveal your
email address to them. You will be told that this is going to happen.

Will you send nasty, brutish spam to my email address? #

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
relating to a request you made, an email alert that you have signed up for,
or for other reasons that you specifically authorise. We will never give or
sell your email addresses to anyone else, unless we are obliged to by law, or
you ask us to.

Why will my name appear publicly on the site? #

It means that someone researching the same area can get in touch with you,
and maybe give you more information or ideas relating to your request.  Also,
we're going to publish the response with the name of the civil servant who
wrote it, so it seems only fair that your name should be public too!
Therefore, we encourage you to use your real name, but you may use a pseudonym
if you would like to be anonymous.

So I can make an FOI request using a pseudonym? #

It is good practice for the public authority to reply to an anonymous request,
except in special circumstances such as if they suspect you of making vexatious
requests. See Freedom of Information Good Practice Guidance No 6
for details.  You should refer to this if a public authority attempts to refuse
a request because you used a pseudonym.

However, there are good reasons to use your real name: see the previous
question.  If nothing else, it avoids the risk of an authority being picky,
ignoring the guidance and refusing your request.

For requests to Scottish public authorities you should ideally provide a real name, especially if you forsee the possibility of
complaining later to the Scottish Information Commissioner - based on legal advice
they received in 2005, they will not accept complaints where they find out that the request was originally made under a pseudonym.

They've asked for my postal address! #

If a public authority asks you for your full, physical address, reply to them saying
that section 8.1.b of the FOI Act asks for an "address for correspondence",
and that the email address you are using is sufficient.

The Ministry of Justice has guidance
on this –
"As well as hard copy written correspondence, requests that are
transmitted electronically (for example, in emails) are acceptable
... If a request is received by email and no postal address is given, the email
address should be treated as the return address."

As if that isn't enough, the Information Commissioner's
Hints for Practitioners say
"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."

No no, they need a postal address to send a paper response! #

If an authority only has a paper copy of the information that you want,
they may ask you for a postal address. To start with, try persuading them
to scan in the documents for you. You can even offer to gift them a scanner, which in that particular case
embarrassed the authority into finding one they had already.

If that doesn't work, and you want to provide your postal address privately
in order to receive the documents, then please contact
us.

How do you moderate request annotations? #

Annotations on WhatDoTheyKnow 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.

FOI officer questions #

I just got here from bottom of an FOI request, what is going on? #

WhatDoTheyKnow is a service run by a charity. It helps ordinary members
of the public make FOI requests, and easily track and share the responses.

The FOI request you received was made by someone using WhatDoTheyKnow. You can
simply reply to the request as you would any other request from an individual.
The only difference is that your response will be automatically published on
the Internet.

If you have privacy or other concerns, please read the answers below.
You might also like to read this page from the top to find out more about what
the site does from the point of view of a user. You can also search the
site to find the authority that you work for, and view the status of
any requests made using the site.

Finally, we welcome comments and
thoughts from FOI officers, please get in touch.

Why are you publishing responses to FOI requests? #

We think there are lots of benefits. Most importantly it will encourage the
public to be more interested and involved in the work of government. We
also hope that it will reduce the number of duplicate requests on any
subject that a public body will receive. Given that Freedom of Information
responses contain public information, which anybody could easily request
again from the public authority, we think there should be no reason not to
publish it widely.

Are the people making requests real people? #

Yes. For the purposes of keeping track of responses we use
computer-generated email addresses for each request. However, before
they can send a request, each user must register on the site with a
unique email address that we then verify. You can search this site and
find a page listing all requests that each person has made.

An email isn't a sufficient address for an FOI request! #

Yes it is. This
letter from the ICO to Rother District Council gives guidance on the matter, specifically
in the context of requests made via WhatDoTheyKnow.

Aren't you making lots of vexatious requests? #

WhatDoTheyKnow is not making any requests. We are sending requests on
behalf of our users, who are real people making the requests.

Look at it like this - if lots of different people made requests from
different Hotmail email addresses, then you would not think that Microsoft were
making vexatious requests. It is exactly the same if lots of requests are made
via WhatDoTheyKnow. Moreover, since all requests are public it is much easier
for you to see if one of our users is making vexatious requests, and for us to
block them when that happens.

If that isn't enough for you, the
letter from the ICO to Rother District Council gives some guidance on the matter.

Isn't it a problem that you publish the names of civil servants and the text of emails? #

Officers or servants responding to requests are doing so on behalf of the
public as part of their job, and we publish their response on that
basis. Usually the names and phone numbers of FOI officers are already
available on authority websites. We also encourage our users to give their real
name too, so it is fair both ways.

Do you publish email addresses or mobile phone numbers? #

We automatically remove email addresses and labelled mobile phone numbers
that are in the email part of responses from public authorities. Please
contact us if we've missed one. We don't currently
remove these from attachments,
such as Word documents.

Can you take down private information about me? #

If you see any information on the site which you'd like us to remove or
hide, then please let us know. We'll then
remove it, provided it is genuinely private information. In particular, we
will remove remarks that are irrelevantly personal.

Credit where credit is due #

Which people made WhatDoTheyKnow? #

Oh, nearly everyone (and maybe you too)!

    Heather Brooke
    (vampy!) has
    been pushing the idea of a UK FOI archive for years now.

    Both Phil Rodgers and Francis Irving
    entered it in a mySociety competition for ideas for public interest websites to build.

    It won,
    and then Chris Lightfoot (RIP :()
    thought up the wheeze of intercepting email responses to requests and
    automatically publishing them.

    Tom Steinberg got the cash to pay for the site from
    a dead chocolate mogul (thank you!) ...

    ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville
    and Tom Steinberg could do the complex mixture of design and coding to build
    what you see today.

    Thanks particularly to Julian Todd (great blog!),
    Francis Davey, and Etienne Pollard for using the site early on and giving
    feedback (and/or legal advice!), and also to all our other users and
    testers.

    Lots of people have been looking up FOI email addresses, and a few
    volunteering to run the site - most especially Adam McGreggor, Alex
    Skene, John Cross and Tony Bowden.

Finally we couldn't do any of this without those
crazy people who volunteer,
amongst many other things, to do the accounts and fill in our VAT return.

You're all stars.

Can I help out?#

Yes please! We're built out of our supporters and volunteers.

You can make a donation. We're a registered charity.

Find out FOI email addresses of authorities that we're missing.

Write a blog post about either WhatDoTheyKnow or an interesting request that you've
    found. Post about it on a forum that you frequent. Tell friends about it.

If you're
    a programmer, get the
    source code
    and send us patches. It's made in Ruby on Rails.

Read more about volunteering with mySociety.


ActionItem501: fixed the role editing form

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

<%= error_messages_for :role %>

<% labelled_form_for :role, role, :url => (mode == :edit) ? {:action => 'update', :id => role} : {:action => 'create'} do |f| %>

  <%= f.text_field :name %>

  <%= _('Permissions:') %>

  <% permissions.keys.each do |p| %>
    <%= labelled_check_box(permission_name(p), "role[permissions][]", p, role.has_permission?(p)) %>

  <% end %>

  <% button_bar do %>
    <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
  <% end %>
<% end %>

<%= error_messages_for :role %>

<% labelled_form_for :role, @role, :url => (mode == :edit) ? {:action => 'update', :id => role} : {:action => 'create'} do |f| %>

  <%= f.text_field :name %>

  <%= _('Permissions:') %>

  <% permissions.keys.each do |p| %>
    <%= labelled_check_box(permission_name(p), (check_box_tag "role[permissions][]", p, @role.has_permission?(p))) %>

  <% end %>

  <% button_bar do %>
    <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
  <% end %>
<% end %>


comments + AJAX messages

comments + AJAX messages

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

<% @page_title = 'Admin: Racers' %>

<%= render "shared/admin/tabs" %>

<%= start_form_tag({}, {:method => 'get'}) %>
	Name: <%= text_field_tag 'name', @name, :size => 30 %>

	<%# Nasty code required to show consistent messages with and without AJAX. At least it could be in a helper. %>

		<%= image_tag('/images/icons/warn.gif', :height => 11, :width => 11, :id => 'warn_icon') %>
		<%= flash[:warn] %>
		<%= image_tag('/images/icons/confirmed.gif', :height => 11, :width => 11, :id => 'message_icon') %>
		<%= flash[:notice] %>

	<%= update_page_tag {|page| page.hide('message_icon')} unless flash[:notice] -%>
	<%= update_page_tag {|page| page.hide('warn_icon')} unless flash[:warn] -%>
<%= end_form_tag %>

				        Name
			            Team
			            Aliases
			            Road
			            MTB
			            DH
			            Cross
						Member

					<%= render :partial => "racer", :collection => @racers %>
					<% if @racers.empty? %>

						<%- if @name.blank? -%>
						Enter part of a racer's name
						<%- else -%>
						No racers found
						<%- end -%>

					<% end %>

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

						<%=  link_image_to '/images/buttons/add.gif', :action => 'new' %>

							Import New Members:
							<%= file_field_tag "racers_file" %>
							<%= submit_tag 'Import' %>

			<%= end_form_tag %>

<% @page_title = 'Admin: Racers' %>

<%= render "shared/admin/tabs" %>

<%= start_form_tag({}, {:method => 'get'}) %>
	Name: <%= text_field_tag 'name', @name, :size => 30 %>

	<%# Nasty code required to show consisten meesages with and without AJAX. At least it could be in a helper. %>

		<%= image_tag('/images/icons/warn.gif', :height => 11, :width => 11, :id => 'warn_icon') %>
		<%= flash[:warn] %>
		<%= image_tag('/images/icons/confirmed.gif', :height => 11, :width => 11, :id => 'message_icon') %>
		<%= flash[:notice] %>

	<%= update_page_tag {|page| page.hide('message_icon')} unless flash[:notice] -%>
	<%= update_page_tag {|page| page.hide('warn_icon')} unless flash[:warn] -%>
<%= end_form_tag %>

				        Name
			            Team
			            Aliases
			            Road
			            MTB
			            DH
			            Cross
						Member

					<%= render :partial => "racer", :collection => @racers %>
					<% if @racers.empty? %>

						<%- if @name.blank? -%>
						Enter part of a racer's name
						<%- else -%>
						No racers found
						<%- end -%>

					<% end %>

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

						<%=  link_image_to '/images/buttons/add.gif', :action => 'new' %>

							Import New Members:
							<%= file_field_tag "racers_file" %>
							<%= submit_tag 'Import' %>

			<%= end_form_tag %>


ActionItem1049: don't display remove button for blogs

<%
  # AddThis Button
  if block_given? and File.exists?( RAILS_ROOT + '/config/web2.0.yml')
    opts = YAML.load_file( RAILS_ROOT + '/config/web2.0.yml' )
    if opts['addthis']
      opts = opts['addthis']
%>

<% end; end %>

  <%= article_title(@page, :no_link => true) %>
  <% if logged_in? && current_user.person.has_permission?('post_content', profile) %>

      <% unless @page.blog? %>
      <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
          profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
          :class => 'button with-text icon-edit' %>
      <% end %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if @page != profile.home_page && !@page.blog? %>
          <%= link_to content_tag( 'span', _('Delete') ),
            profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }),
            :class => 'button with-text icon-delete' %>
        <% end %>
        <% if profile.kind_of?(Person) && !environment.enabled?('disable_cms') && !@page.folder? %>
          <%= link_to content_tag( 'span', _('Spread this') ),
              profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
              :class => 'button with-text icon-spread' %>
        <% end %>
        <% if !@page.display_as_gallery? %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
        <% if @page.folder? || (@page.parent && @page.parent.folder?) %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% end %>
      <% end %>
      <% if profile.kind_of?(Enterprise) && @page.display_as_gallery? %>
        <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
      <% end %>

  <% end %>

<% if !@page.tags.empty? %>

    <%= _("This article's tags:") %>
    <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tag', :id => t.name ) }.join("\n") %>

<% end %>

<% if @page.display_hits? %>

    <%= n_('Viewed one time', 'Viewed %{num} times', @page.hits) % { :num => @page.hits } %>

<% end %>

<% if @page.parent && !@page.parent.path.blank? %>

  <%= link_to _('Go back'), @page.parent.url %>

<% end %>

<% if profile.enterprise? and !profile.enabled? and !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>

    <%= environment.message_for_disabled_enterprise %>

<% end %>

<% cache(@page.cache_key(params)) do %>
  <div class="<%="article-body article-body-" + @page.css_class_name %>">
    <%= article_to_html(@page) %>

<% end %>

<% if ! @page.categories.empty? %>

<%= _('Categories') %>

    <%= @page.categories.map {|item| link_to_category(item, false) }.join(", ") %>

<% end %>

<% if ! @page.source.nil? and ! @page.source.empty?%>

  <%= _('Source: %s') % link_to(@page.source, @page.source) %>

<% end %>

  <% if @page.accept_comments? %>
  <h3 <%= 'class="no-comments-yet"' if @comments.size == 0 %>>
    <%= number_of_comments(@page) %>

  <%= render :partial => 'comment', :collection => @comments %>
  <%= render :partial => 'comment_form' %>
  <% end %>

<%
  # AddThis Button
  if block_given? and File.exists?( RAILS_ROOT + '/config/web2.0.yml')
    opts = YAML.load_file( RAILS_ROOT + '/config/web2.0.yml' )
    if opts['addthis']
      opts = opts['addthis']
%>

<% end; end %>

  <%= article_title(@page, :no_link => true) %>
  <% if logged_in? && current_user.person.has_permission?('post_content', profile) %>

      <% unless @page.blog? %>
      <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
          profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
          :class => 'button with-text icon-edit' %>
      <% end %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if @page != profile.home_page %>
          <%= link_to content_tag( 'span', _('Delete') ),
            profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }),
            :class => 'button with-text icon-delete' %>
        <% end %>
        <% if profile.kind_of?(Person) && !environment.enabled?('disable_cms') && !@page.folder? %>
          <%= link_to content_tag( 'span', _('Spread this') ),
              profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
              :class => 'button with-text icon-spread' %>
        <% end %>
        <% if !@page.display_as_gallery? %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
        <% if @page.folder? || (@page.parent && @page.parent.folder?) %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% end %>
      <% end %>
      <% if profile.kind_of?(Enterprise) && @page.display_as_gallery? %>
        <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
      <% end %>

  <% end %>

<% if !@page.tags.empty? %>

    <%= _("This article's tags:") %>
    <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tag', :id => t.name ) }.join("\n") %>

<% end %>

<% if @page.display_hits? %>

    <%= n_('Viewed one time', 'Viewed %{num} times', @page.hits) % { :num => @page.hits } %>

<% end %>

<% if @page.parent && !@page.parent.path.blank? %>

  <%= link_to _('Go back'), @page.parent.url %>

<% end %>

<% if profile.enterprise? and !profile.enabled? and !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>

    <%= environment.message_for_disabled_enterprise %>

<% end %>

<% cache(@page.cache_key(params)) do %>
  <div class="<%="article-body article-body-" + @page.css_class_name %>">
    <%= article_to_html(@page) %>

<% end %>

<% if ! @page.categories.empty? %>

<%= _('Categories') %>

    <%= @page.categories.map {|item| link_to_category(item, false) }.join(", ") %>

<% end %>

<% if ! @page.source.nil? and ! @page.source.empty?%>

  <%= _('Source: %s') % link_to(@page.source, @page.source) %>

<% end %>

  <% if @page.accept_comments? %>
  <h3 <%= 'class="no-comments-yet"' if @comments.size == 0 %>>
    <%= number_of_comments(@page) %>

  <%= render :partial => 'comment', :collection => @comments %>
  <%= render :partial => 'comment_form' %>
  <% end %>