Fixing a broken link

Fixing a broken link

git-svn-id: 50a8ad97cae5d6ab203d2d535a9b32cd3858a8ac@343 c04ce798-636b-4ca8-9149-0f9336831111

<% @sidebar = 'sidebar_index' %>

<%= link_to_download image_tag('download_now_orange.png') %>

        CruiseControl.rb is a
        continuous integration
        tool. Its basic purpose in life is to alert members of a software project when one of them checks
        something into source control that breaks the build.

        CC.rb is easy to install, pleasant to use and simple to hack. It's written in
        Ruby.

Get started

1

Download

                Believe it or not, you're gonna have to download CruiseControl.rb in order to use it.

                <%= link_to_download('Download it now') %>

2

Add Your Project

                cruise add <name> -u <url>
                You can <%= link_to "watch us", '/documentation/screencasts.html' %> setup a typical rails project, or read
                more on the getting started page.

3

Start Cruise

                cruise start
                That's it! If you have any issues,
                read the docs or <%= link_to_users_mailing_list('ask us')%>.

About ThoughtWorks

      Learn more about ThoughtWorks at
      ThoughtWorks.com

<% @sidebar = 'sidebar_index' %>

<%= link_to_download image_tag('download_now_orange.png') %>

        CruiseControl.rb is a
        continuous integration
        tool. Its basic purpose in life is to alert members of a software project when one of them checks
        something into source control that breaks the build.

        CC.rb is easy to install, pleasant to use and simple to hack. It's written in
        Ruby.

Get started

1

Download

                Believe it or not, you're gonna have to download CruiseControl.rb in order to use it.

                <%= link_to_download('Download it now') %>

2

Add Your Project

                cruise add <name> -u <url>
                You can <%= link_to "watch us", '/downloads/screencasts.html' %> setup a typical rails project, or read
                more on the getting started page.

3

Start Cruise

                cruise start
                That's it! If you have any issues,
                read the docs or <%= link_to_users_mailing_list('ask us')%>.

About ThoughtWorks

      Learn more about ThoughtWorks at
      ThoughtWorks.com


Got rid of form observer for comment previews in favour of an ajax-based link tag (fixes #xalsconcerns)

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

<%= form_remote_tag :url => {:action => "comment", :id => @article},
                    :position=> :bottom,
                    :update => {:success => 'commentList'},
                    :loading => "loading()",
                    :complete => "complete(request)",
                    :failure => "failure(request)",
                    :html => {:id=>"commentform",:class=>"commentform"} %>

Your name

       <%= text_field "comment", "author", :size => 20 %> <%= link_to_function("(leave url/email »)", "Element.toggle('guest_url'); Element.toggle('guest_email')") %>

Your blog

       <%= text_field "comment", "url" %>

Your email

       <%= text_field "comment", "email" %>

Your message

        <%= text_area "comment", "body" %>

      <%= image_tag "spinner.gif" %>
      Preview comment
      <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />

<%= end_form_tag %>

<%= form_remote_tag :url => {:action => "comment", :id => @article},
                    :position=> :bottom,
                    :update => {:success => 'commentList'},
                    :loading => "loading()",
                    :complete => "complete(request)",
                    :failure => "failure(request)",
                    :html => {:id=>"commentform",:class=>"commentform"} %>

Your name

       <%= text_field "comment", "author", :size => 20 %> <%= link_to_function("(leave url/email »)", "Element.toggle('guest_url'); Element.toggle('guest_email')") %>

Your blog

       <%= text_field "comment", "url" %>

Your email

       <%= text_field "comment", "email" %>

Your message

        <%= text_area "comment", "body" %>

      <%= image_tag "spinner.gif" %>
        <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />

<%= end_form_tag %>

<%= observe_form 'commentform',
  :frequency => 0.5,
  :update => 'preview',
  :url => { :controller => 'articles', :action => 'comment_preview' },
  :complete => "Element.show('preview')" %>


Removed stray quotes in wiki format Closes #86.

<%=h bold_around_pipes(subentry.paradigm + ".") || "<No principal parts>" %> <%= h headword.phonetic_forms.collect{|phonetic_form| "(#{phonetic_form.form})"}.to_sentence(:two_words_connector  => ', ', :last_word_connector => ", ''or'' ") %> <%=h "#{subentry.part_of_speech.present? ? "''" << subentry.part_of_speech << "''" : ""}"%> <%= render :partial => "shared/wiki/comment", :collection => subentry.notes %>
<% unless subentry.senses.empty? %><%= render :partial => "shared/wiki/sense", :collection => subentry.senses %><% end %>
<% unless subentry.etymologies.empty? %><%= render :partial => "shared/wiki/etymology", :collection => subentry.etymologies.compact %><% end %>

<%=h bold_around_pipes(subentry.paradigm + ".") || "<No principal parts>" %> <%= h headword.phonetic_forms.collect{|phonetic_form| "(#{phonetic_form.form})"}.to_sentence(:two_words_connector  => ', ', :last_word_connector => ", ''or'' ") %> <%=h "''#{subentry.part_of_speech || "<No part of speech>"}''"%> <%= render :partial => "shared/wiki/comment", :collection => subentry.notes %>
<% unless subentry.senses.empty? %><%= render :partial => "shared/wiki/sense", :collection => subentry.senses %><% end %>
<% unless subentry.etymologies.empty? %><%= render :partial => "shared/wiki/etymology", :collection => subentry.etymologies.compact %><% end %>


small wording improvement in ranked voting show.rhtml

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

<% @sorted_possibles.each do |possible| -%>
<% winner = 'winner' if (@result.winners.any? and @result.winners.include?possible.id) %>
<li class='<%=winner%>'>

<%= @result.rank(possible.id) %>

  <%= "(" + 'top pick'.t + ")" if winner.any? %>

<%= possible_name(possible) %>

  <div class='indent possible_details' id="<%=details_id(possible)%>" style='display: none'>
    <%= possible.description_html %>
    <% if @who_voted_for[possible.id].any? -%>

<%= 'first choice of'.t%>: <%= @who_voted_for[possible.id].join(', ') %>

    <% end -%>

<% end -%>

<% if @possibles_unvoted.any? %>
  You have not ranked:

  <% @possibles_unvoted.each do |possible| -%>

<%= possible_name(possible) %>

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

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

<% @sorted_possibles.each do |possible| -%>
<% winner = 'winner' if (@result.winners.any? and @result.winners.include?possible.id) %>
<li class='<%=winner%>'>

<%= @result.rank(possible.id) %>

  <%= "(" + 'top pick'.t + ")" if winner.any? %>

<%= possible_name(possible) %>

  <div class='indent possible_details' id="<%=details_id(possible)%>" style='display: none'>
    <%= possible.description_html %>
    <% if @who_voted_for[possible.id].any? -%>

<%= 'first choice of'.t%>: <%= @who_voted_for[possible.id].join(', ') %>

    <% end -%>

<% end -%>

Not yet ranked:

<% @possibles_unvoted.each do |possible| -%>

<%= possible_name(possible) %>

<% end -%>


[Mezuro]added show_configuration draft

[Mezuro]added show_configuration draft

<% @configuration_content = @page
@configuration = Kalibro::Entities::Configuration.new
@configuration.name = @configuration_content.name
@configuration.description = @configuration_content.description
@fake_metric_configuration = Kalibro::Entities::MetricConfiguration.new
@fake_metric_configuration.metric = {:name => "fake_name", :origin => "Analizo"}
@fake_metric_configuration.code = "fake_code"
@configuration.metric_configurations = [@fake_metric_configuration] %>

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

    <%= _('Description') %>
    <%= @configuration.description %>

<%= link_to "Add Metric", :controller => "mezuro_plugin_profile", :action => "add_metric", :params =>
{:configuration_name => @configuration.name} %>

<% @configuration.metric_configurations.each do |metric_configuration| %>

      <%= metric_configuration.metric.name %>
      <%= metric_configuration.metric.origin %>
      <%= metric_configuration.code %>
      <%= link_to "Edit", :controller => "mezuro_plugin_profile", :action => "edit_metric", :params =>
        {:configuration_name => @configuration.name, :metric_code => metric_configuration.code} %>

<% end %>

<% #link_to "Teste", "/profile/#{profile.identifier}/plugins/mezuro/teste" %>
<% #link_to "Teste", :controller => "mezuro_plugin_profile", :action => "teste", :params => {:configuration_name => @configuration.name} %>

<% @configuration_content = @page %>

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

    <%= _('Description') %>
    <%= @configuration_content.description %>

<%= link_to "Teste", "/profile/#{profile.identifier}/plugins/mezuro/teste" %>
<%= link_to "Teste", :controller => "mezuro_plugin_profile", :action => "teste", :params => {:configuration_name =>
@configuration_content.name}%>


added the start of a application wide throbber.

git-svn-id: 035394e0ea20290a56a73539b1ebfcd8236adefd@32 7bd17f4f-1217-0410-bbc5-bc4367116c30


Added wiki link, resolve #8

Added wiki link, resolve #8

	<%
	last_customer = 0
	for project in @projects
		if last_customer != project.customer_id && current_user.option_externalclients.to_i > 0
			if last_customer != 0
				%>

			<% end %>

			<%
			collapse = " <div id=\"indicator_#{project.customer_id}\" class=\""
			collapse << ((session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) ? "collapse-indicator-closed" : "collapse-indicator-open")
			collapse << "\">
"
			collapse << (project.customer.name == 'Internal' ? current_user.company.name : project.customer.name)
			%>

				<%= link_to_remote collapse, :url => { :controller => 'activities', :action => 'toggle_display', :id => project.customer_id },
																		 :loading => "Element.show('loading');",
																						 :complete => "Element.hide('loading');"
							 %>

<table width="100%" cellpadding="0" cellspacing="0" id="projects_customer_<%= project.customer_id %>" <%= "style=\"display:none;\"" if (session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) %>>

				<a href="/wiki/show/<%= project.customer.name %>" class="tooltip" title="View the Wiki for <%= project.customer.name %>" style="text-decoration: none; color: #423F54;"> Client Wiki

				<%
				last_customer = project.customer_id
			end

			 if @widget.order_by == 'work'
				 critical_count = project.overtime
				 normal_count = project.work_done - critical_count
				 low_count = project.total_estimate - normal_count - critical_count
				 low_count = 0 if low_count < 0
				 total_count = (critical_count + normal_count + low_count) * 1.0
			 else
				 critical_count = project.critical_count
				 normal_count = project.normal_count
				 low_count = project.low_count
				 total_count = (critical_count + normal_count + low_count) * 1.0
			 end

			 critical_percent = ((critical_count / total_count) * 100.0)
			 normal_percent = ((normal_count / total_count) * 100.0)

			 critical_percent = critical_percent.round unless critical_percent.nan?

			 normal_percent = normal_percent.round unless normal_percent.nan?

			 normal_percent = 100 - critical_percent if normal_percent + critical_percent > 100
			 low_percent = 100.0 - critical_percent - normal_percent

							 collapse = " <div id=\"small_indicator_#{project.id}\" class=\""
							 collapse << ((session[:collapse_milestones] && session[:collapse_milestones][project.id.to_s].to_i == 1) ? "small-collapse-indicator-closed" : "small-collapse-indicator-open")
							 collapse << "\">
 "
					%>
		<tr class="milestone" id="project_<%=project.id%>">

				<div id="edit_project_<%= project.id%>" class="popout" style="position: absolute; z-index:10; left:0; top:0; width: 16px; display:none; ">

					<% if current_user.can?(project, 'grant') || current_user.can?(project, 'milestone') %>

						<%= link_to content_tag(:span, '',  :title => _("Edit project %s", project.name), :class => "tooltip"),
						{ :controller => 'projects', :action => 'edit', :id => project } -%>

					<% end %>

<%= link_to_remote collapse,
																							:url => { :controller => 'activities', :action => 'toggle_display_milestones', :id => project.id },
																							:loading => "Element.show('loading');",
																							:complete => "Element.hide('loading');" %> <%= link_to project.name, { :controller => 'views', :action => 'select_project', :id => project.id} %>

		<% if @widget.order_by == 'work' %>

		<% critical_tooltip = "#{number_to_percentage( critical_percent, :precision => 0)} (#{worked_nice(critical_count)}) #{_'Over Estimate'}
" +
																"#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
						 normal_tooltip   = "#{number_to_percentage( normal_percent, :precision => 0)} (#{worked_nice(normal_count)}) #{_'Estimated'}
" +
																"#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
						 low_tooltip      = "#{number_to_percentage( low_percent, :precision => 0)} (#{worked_nice(low_count)}) #{_'Left'}
" +
																"#{number_to_percentage( critical_percent + normal_percent + low_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count + low_count)}) #{_'Total'}
"
					%>
					<div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0)%>;position:absolute;" title="<%= critical_tooltip %>"

					<div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= normal_tooltip%>">

					<div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= low_tooltip %> ">

		<% else %>
					<div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0) %>;position:absolute;" title="<%= "#{number_to_percentage( critical_percent, :precision => 0)} (#{critical_count}/#{total_count.to_i})" %> <%=_'High Priority'%>">

					<div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( normal_percent, :precision => 0)} (#{normal_count}/#{total_count.to_i})"%> <%=_'Normal'%>">

					<div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( low_percent, :precision => 0)} (#{low_count}/#{total_count.to_i})" %>  <%=_'Low Priority'%> ">

				 <% end %>

					<%= render :partial => "activities/overall_progress", :locals => { :project => project } %>
					<% for milestone in project.milestones.select{|m| m.completed_at.nil?} %>
							<%= render :partial => "activities/milestone_row", :locals => { :milestone => milestone } %>
					<% end %>
	<% @completed_milestones = project.total_milestones_count - project.open_milestones_count
		 if @completed_milestones > 0
	%>

<%= link_to _('%d completed milestone', @completed_milestones), :controller => 'milestones', :action => 'list_completed', :id => project %>

	<% end %>

	<% end
		 if last_customer != 0 %>

	<% end %>

	<% if @completed_projects > 0 %>

<%= link_to _('%d completed project', @completed_projects), :controller => 'projects', :action => 'list_completed' %>

	<% end %>

	<%
	last_customer = 0
	for project in @projects
		if last_customer != project.customer_id && current_user.option_externalclients.to_i > 0
			if last_customer != 0
				%>

			<% end %>

			<%
			collapse = " <div id=\"indicator_#{project.customer_id}\" class=\""
			collapse << ((session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) ? "collapse-indicator-closed" : "collapse-indicator-open")
			collapse << "\">
"
			collapse << (project.customer.name == 'Internal' ? current_user.company.name : project.customer.name)
			%>

				<%= link_to_remote collapse, :url => { :controller => 'activities', :action => 'toggle_display', :id => project.customer_id },
				                             :loading => "Element.show('loading');",
                                             :complete => "Element.hide('loading');"
               %>

<table width="100%" cellpadding="0" cellspacing="0" id="projects_customer_<%= project.customer_id %>" <%= "style=\"display:none;\"" if (session[:collapse_projects] && session[:collapse_projects][project.customer_id.to_s].to_i == 1) %>>

				<%
				last_customer = project.customer_id
			end

       if @widget.order_by == 'work'
         critical_count = project.overtime
         normal_count = project.work_done - critical_count
         low_count = project.total_estimate - normal_count - critical_count
         low_count = 0 if low_count < 0
         total_count = (critical_count + normal_count + low_count) * 1.0
       else
         critical_count = project.critical_count
         normal_count = project.normal_count
         low_count = project.low_count
         total_count = (critical_count + normal_count + low_count) * 1.0
       end

       critical_percent = ((critical_count / total_count) * 100.0)
       normal_percent = ((normal_count / total_count) * 100.0)

       critical_percent = critical_percent.round unless critical_percent.nan?

       normal_percent = normal_percent.round unless normal_percent.nan?

       normal_percent = 100 - critical_percent if normal_percent + critical_percent > 100
       low_percent = 100.0 - critical_percent - normal_percent

               collapse = " <div id=\"small_indicator_#{project.id}\" class=\""
               collapse << ((session[:collapse_milestones] && session[:collapse_milestones][project.id.to_s].to_i == 1) ? "small-collapse-indicator-closed" : "small-collapse-indicator-open")
               collapse << "\">
 "
          %>
    <tr class="milestone" id="project_<%=project.id%>">

        <div id="edit_project_<%= project.id%>" class="popout" style="position: absolute; z-index:10; left:0; top:0; width: 16px; display:none; ">

          <% if current_user.can?(project, 'grant') || current_user.can?(project, 'milestone') %>

            <%= link_to content_tag(:span, '',  :title => _("Edit project %s", project.name), :class => "tooltip"),
            { :controller => 'projects', :action => 'edit', :id => project } -%>

          <% end %>

<%= link_to_remote collapse,
                                              :url => { :controller => 'activities', :action => 'toggle_display_milestones', :id => project.id },
                                              :loading => "Element.show('loading');",
                                              :complete => "Element.hide('loading');" %> <%= link_to project.name, { :controller => 'views', :action => 'select_project', :id => project.id} %>

	  <% if @widget.order_by == 'work' %>

	  <% critical_tooltip = "#{number_to_percentage( critical_percent, :precision => 0)} (#{worked_nice(critical_count)}) #{_'Over Estimate'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
             normal_tooltip   = "#{number_to_percentage( normal_percent, :precision => 0)} (#{worked_nice(normal_count)}) #{_'Estimated'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count)}) #{_'Total Done'}
"
             low_tooltip      = "#{number_to_percentage( low_percent, :precision => 0)} (#{worked_nice(low_count)}) #{_'Left'}
" +
                                "#{number_to_percentage( critical_percent + normal_percent + low_percent, :precision => 0)} (#{worked_nice(critical_count + normal_count + low_count)}) #{_'Total'}
"
          %>
          <div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0)%>;position:absolute;" title="<%= critical_tooltip %>"

          <div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= normal_tooltip%>">

          <div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= low_tooltip %> ">

	  <% else %>
          <div class="prog-bar-high tooltip" style="width:<%= number_to_percentage( critical_percent, :precision => 0) %>;position:absolute;" title="<%= "#{number_to_percentage( critical_percent, :precision => 0)} (#{critical_count}/#{total_count.to_i})" %> <%=_'High Priority'%>">

          <div class="prog-bar-medium tooltip" style="width:<%= number_to_percentage( normal_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( normal_percent, :precision => 0)} (#{normal_count}/#{total_count.to_i})"%> <%=_'Normal'%>">

          <div class="prog-bar-low tooltip" style="width:<%= number_to_percentage( low_percent, :precision => 0)%>;position:absolute;left:<%= number_to_percentage( critical_percent + normal_percent, :precision => 0)%>" title="<%= "#{number_to_percentage( low_percent, :precision => 0)} (#{low_count}/#{total_count.to_i})" %>  <%=_'Low Priority'%> ">

         <% end %>

          <%= render :partial => "activities/overall_progress", :locals => { :project => project } %>
          <% for milestone in project.milestones.select{|m| m.completed_at.nil?} %>
              <%= render :partial => "activities/milestone_row", :locals => { :milestone => milestone } %>
          <% end %>
  <% @completed_milestones = project.total_milestones_count - project.open_milestones_count
     if @completed_milestones > 0
  %>

<%= link_to _('%d completed milestone', @completed_milestones), :controller => 'milestones', :action => 'list_completed', :id => project %>

  <% end %>

  <% end
     if last_customer != 0 %>

  <% end %>

  <% if @completed_projects > 0 %>

<%= link_to _('%d completed project', @completed_projects), :controller => 'projects', :action => 'list_completed' %>

  <% end %>


[fix] typo

[fix] typo

git-svn-id: e099d366fb13ea49c9e8e170ced890dab3ea84f7@581 aaa19a3b-e121-0410-9d45-962fd44e537e

<% [:first_name, :name, :address, :zip, :city, :telephone, :mobile, :email, :birthday].each do |sym| %>
<label for="<%= sym %>"><%= _(sym.to_s) %></label>
<%= text_field 'node', "c_#{sym}", :size=>nil %>
<% end %>

<% [:first_name, :name, :address, :zip, :city, :telephone, :mobile, :email, :birthday].each do |sym| %>
<label for="<%= sym %>"><%= trans(sym.to_s) %></label>
<%= text_field 'node', "c_#{sym}", :size=>nil %>
<% end %>


fix 'edits' link. action was renamed 'list_user'

<% @this_user = User.find_by_display_name(@this_user.display_name) %>

<%= h(@this_user.display_name) %>

<% if @user and @this_user.id == @user.id %>

<%= link_to 'my diary', :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
| <%= link_to 'new diary entry', :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
| <%= link_to 'my edits', :controller => 'changeset', :action => 'list_user', :display_name => @user.display_name %>
| <%= link_to 'my traces', :controller => 'trace', :action=>'mine' %>
| <%= link_to 'my settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% else %>

<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => @this_user.id %>
| <%= link_to 'diary', :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
| <%= link_to 'edits', :controller => 'changeset', :action => 'list_user', :display_name => @this_user.display_name %>
| <%= link_to 'traces', :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %>
| <% if @user and @user.is_friends_with?(@this_user) %>
  <%= link_to 'remove as friend', :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
<% else %>
  <%= link_to 'add as friend', :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>
<% end %>
<% end %>

<% if @this_user != nil %>

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

<% end %>

User image

<% if @this_user.image %>
  <%= image_tag url_for_file_column(@this_user, "image") %>
  <% if @user and @this_user.id == @user.id %>
    <%= button_to 'Delete Image', :action => 'delete_image' %>
  <% end %>
<% end %>

<% if @user and @this_user.id == @user.id %>
  Upload an image

  <%= form_tag({:action=>'upload_image'}, :multipart => true)%>
    <%= file_column_field 'user', 'image' %>
    <%= submit_tag 'Add Image' %>
  </form>
<% end %>

Description

<%= htmlize(@this_user.description) %>

<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>

User location

  No home location has been set.
  <% if @user and @this_user.id == @user.id %>
  If you set your location, a pretty map and stuff will appear below. You can set your home location on your <%= link_to 'settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %> page.
  <% end %>
<% else %>

  <% if @user and @this_user.id == @user.id %>

Your friends

    <% if @this_user.friends.empty? %>
      You have not added any friends yet.
    <% else %>

      <% @this_user.friends.each do |friend| %>
      <% @friend = User.find_by_id(friend.friend_user_id) %>

      <% if @friend.image %>
        <%= image_tag url_for_file_column(@friend, "image") %>
      <% end %>

      <%= link_to h(@friend.display_name), :controller => 'user', :action => 'view',  :display_name => @friend.display_name %>
      <% if @friend.home_lon and @friend.home_lat %><%= @this_user.distance(@friend).round %>km away<% end %>
      (<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => @friend.id %>)

      <%end%>

    <%end%>

  <%end%>

  <% if @user and @this_user.id == @user.id %>

Nearby users:

    <% if @this_user.nearby.empty? %>
      There are no users who admit to mapping nearby yet.
    <% else %>

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

      <% @this_user.nearby.each do |nearby| %>

      <%= link_to h(nearby.display_name), :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
      <%= @this_user.distance(nearby).round %>km away
      (<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => nearby.id %>)

      <% end %>

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

<% if @user and @this_user.id == @user.id %>
<%= link_to 'change your settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% end %>

<% @this_user = User.find_by_display_name(@this_user.display_name) %>

<%= h(@this_user.display_name) %>

<% if @user and @this_user.id == @user.id %>

<%= link_to 'my diary', :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
| <%= link_to 'new diary entry', :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
| <%= link_to 'my edits', :controller => 'changeset', :action => 'list_user', :display_name => @user.display_name %>
| <%= link_to 'my traces', :controller => 'trace', :action=>'mine' %>
| <%= link_to 'my settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% else %>

<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => @this_user.id %>
| <%= link_to 'diary', :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
| <%= link_to 'edits', :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
| <%= link_to 'traces', :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %>
| <% if @user and @user.is_friends_with?(@this_user) %>
  <%= link_to 'remove as friend', :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
<% else %>
  <%= link_to 'add as friend', :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>
<% end %>
<% end %>

<% if @this_user != nil %>

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

<% end %>

User image

<% if @this_user.image %>
  <%= image_tag url_for_file_column(@this_user, "image") %>
  <% if @user and @this_user.id == @user.id %>
    <%= button_to 'Delete Image', :action => 'delete_image' %>
  <% end %>
<% end %>

<% if @user and @this_user.id == @user.id %>
  Upload an image

  <%= form_tag({:action=>'upload_image'}, :multipart => true)%>
    <%= file_column_field 'user', 'image' %>
    <%= submit_tag 'Add Image' %>
  </form>
<% end %>

Description

<%= htmlize(@this_user.description) %>

<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>

User location

  No home location has been set.
  <% if @user and @this_user.id == @user.id %>
  If you set your location, a pretty map and stuff will appear below. You can set your home location on your <%= link_to 'settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %> page.
  <% end %>
<% else %>

  <% if @user and @this_user.id == @user.id %>

Your friends

    <% if @this_user.friends.empty? %>
      You have not added any friends yet.
    <% else %>

      <% @this_user.friends.each do |friend| %>
      <% @friend = User.find_by_id(friend.friend_user_id) %>

      <% if @friend.image %>
        <%= image_tag url_for_file_column(@friend, "image") %>
      <% end %>

      <%= link_to h(@friend.display_name), :controller => 'user', :action => 'view',  :display_name => @friend.display_name %>
      <% if @friend.home_lon and @friend.home_lat %><%= @this_user.distance(@friend).round %>km away<% end %>
      (<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => @friend.id %>)

      <%end%>

    <%end%>

  <%end%>

  <% if @user and @this_user.id == @user.id %>

Nearby users:

    <% if @this_user.nearby.empty? %>
      There are no users who admit to mapping nearby yet.
    <% else %>

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

      <% @this_user.nearby.each do |nearby| %>

      <%= link_to h(nearby.display_name), :controller => 'user', :action => 'view',  :display_name => nearby.display_name %>
      <%= @this_user.distance(nearby).round %>km away
      (<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => nearby.id %>)

      <% end %>

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

<% if @user and @this_user.id == @user.id %>
<%= link_to 'change your settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% end %>


Update lib/views/help/credits.rhtml

Update lib/views/help/credits.rhtml

adding hyperlinks to the accounts of the volunteers who answer support emails.

This partly address issue 30: https://github.com/mysociety/whatdotheyknow-theme/issues/30

<% @title = "Credit where credit is due" %>

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

<%= @title%> #

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.

    The amazing team of volunteers who run the site, answer your support
    emails, maintain the database of public authorities and
    so much more.
    Thanks to
    Helen Cross,

    John Cross,

    Ben Harris,

    Adam McGreggor,

    Ganesh Sittampalam,

    Alex Skene,

    Richard Taylor.

    Volunteers who have provided patches to the code – thanks Peter Collingbourne,
    Tony Bowden, David Cabo, James McKinney.

    Everyone who has helped look up FOI email addresses.

    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.

    Finally, all the officers and servants who have answered the many requests
    made through the site. Their diligence, patience and professionalism is
    what has actually made the information that you see here. Thank them for
    helping make Government more transparent.

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.

Help people find successful requests, and monitor performance of authorities, by
    playing the categorisation game.

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 for our parent project, Alaveteli
    and tell us about patches we can pull. It's made in Ruby on Rails.

Read more about volunteering with mySociety.


Amended SIC link, fixes #33

Amended SIC link, fixes #33

<% @title = "Unhappy about a Freedom of Information request?" %>

<% if !@info_request.nil? %>

Unhappy about the response you got
to your request '<%=request_link(@info_request) %>'?

<% else %>

Unhappy about the response you got?

<% end %>

If ...

You didn't get a reply within 20 working days

You did not get all of the information that you requested or

Your request was refused, but without a reason valid under the law

... you can

Ask for an internal review at the public authority.

If that doesn't help, complain to the Information Commissioner.

Either way, also use other means to answer your question.

1. Asking for an internal review #

<% if !@info_request.nil? %>
    Choose <%= link_to "request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %> and then write a message asking the authority to review your request.
<% else %>
    At the bottom of the relevant request page on WhatDoTheyKnow choose
    "request an internal review". Then write a message asking for an internal
    review of your request. You may want to include a link to the
    request page, to make it clear which request you are talking about.
<% end %>

Internal reviews should be quick. If one takes longer than 20 working days
then the authority should write and let you know, and it should never take
longer than 40 working days (see this
good
practice guide).
You will then either get the information that
you originally requested, or you will be told that the review upholds the
original decision.

2. Complaining to the Information Commissioner #

If you are still unhappy after the public authority has done their internal review,
then you can complain to the Information Commissioner. To do this read
Complaints about Freedom of Information
on the Information Commissioner's website. If you requested information from a Scottish
authority, then  appeal
to the Scottish Information Commissioner.

To make it easier to send the relevant information to the
Information Commissioner, either
<% if !@info_request.nil? %>
    include a link to your request
    <%=h main_url(request_url(@info_request)) %>
<% else %>
    include a link to your request on WhatDoTheyKnow
<% end %>
in your complaint or print out the whole page of your request and all attachments.

WhatDoTheyKnow has no special facilities for handling a request at this stage - it
passes into the Information Commissioner's system. You can leave annotations on your
request keeping people informed of progress.

A warning. Although the Information Commissioner has worked hard to reduce their backlog of casework,
it can still take several months to get resolution from them in most circumstances.
One area where they have sped up things considerably is that they are able to prompt non-responsive
authorities to reply within a few weeks of receiving a complaint.

If you reach this point, you should accept that you won't get the information quickly by this means. Maybe
you want to help the fight to improve Freedom of Information, or maybe
getting the information slowly is still worthwhile. You can also try and
get the information by other means...

3. Using other means to answer your question #

You can try pursuing your problem or your research in other ways.

Make a new FOI request for summary information, or for
documentation relating indirectly to matters in your refused request.
Ask us for ideas if you're stuck.

If any other public authorities or publicly owned companies are involved,
then make FOI requests to them.

Write to your MP or other politician using WriteToThem and ask for their help
finding the answer. MPs can write directly to ministers or departments, and
can ask written questions in the House of Commons. Councillors in local authorities
can talk directly to council officers.

Ask other researchers who are interested in a similar
issue to yours for ideas. You can sometimes find them by browsing this site;
contact any registered user from their page. There may be an Internet
forum or group that they hang out in. If it is a local matter, use GroupsNearYou to find such a
forum.

Start a pledge on PledgeBank to get
others to act together with you. For example, you could arrange a meeting with
staff from the authority. Or you could form a small local campaigns group.


remove rspec version from debug page (it's not there in a production deployment)

<% @title = "Debug" %>

<%=@title%>

You are <%= h @http_auth_user %>

Version numbers

Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %>

Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %>

RUBY_VERSION <%=h RUBY_VERSION %>

Rails::VERSION::STRING <%=h Rails::VERSION::STRING%>

TMail::VERSION::STRING <%=h TMail::VERSION::STRING%>

Xapian::version_string <%=h Xapian::version_string%>

Configuration

environment: <%=h Rails::configuration.environment %>

environment_path: <%=h Rails::configuration.environment_path %>

framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %>

Environment variables

<% for k,v in @request_env %>

<%=h k%>	<%=h v%>

<% end %>

Parameters

<% for k,v in params %>

<%=h k%>	<%=h v%>

<% end %>

Session

<% for k,v in session %>

<%=h k%>	<%=h v%>

<% end %>

<% @title = "Debug" %>

<%=@title%>

You are <%= h @http_auth_user %>

Version numbers

Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %>

Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %>

RUBY_VERSION <%=h RUBY_VERSION %>

Rails::VERSION::STRING <%=h Rails::VERSION::STRING%>

TMail::VERSION::STRING <%=h TMail::VERSION::STRING%>

Xapian::version_string <%=h Xapian::version_string%>

Spec::VERSION::STRING <%=h Spec::VERSION::STRING%>

Configuration

environment: <%=h Rails::configuration.environment %>

environment_path: <%=h Rails::configuration.environment_path %>

framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %>

Environment variables

<% for k,v in @request_env %>

<%=h k%>	<%=h v%>

<% end %>

Parameters

<% for k,v in params %>

<%=h k%>	<%=h v%>

<% end %>

Session

<% for k,v in session %>

<%=h k%>	<%=h v%>

<% end %>


change description behavior, popup desc window

git-svn-id: bd379d88a756ded56d998f9d005ecc36158942ed@52 6386c4cd-e34a-4fa8-8920-d93eb39b512e

Hello <%=h @user.full_name %>

Current time is <%= format_short_time(Time.new) %>.

<% form_tag({:action => 'submit'}, :multipart => true) do %>
Problem: <%= select 'submission', 'problem_id',
             	[['Specified in header','-1']] +
		@problems.collect {|p| [p.full_name, p.id]},
		:selected => '-1' %>
File: <%= file_field_tag 'file' %>
<%= submit_tag 'Submit' %>
<% end %>

<%= flash[:notice] %>

<% i = 0 %>
<% @problems.each do |p| %>

    <%= "#{i+1}: #{p.full_name} (#{p.name})" %>
    <%= link_to '[task description]', p.url, :popup => true if (p.url!=nil) and (p.url!='') %>

    <%= format_submission(@prob_submissions[i][1],
		@prob_submissions[i][0]) %>

  <% i = i+1 %>
<% end %>

Hello <%=h @user.full_name %>

Current time is <%= format_short_time(Time.new) %>.

<% form_tag({:action => 'submit'}, :multipart => true) do %>
Problem: <%= select 'submission', 'problem_id',
             	[['Specified in header','-1']] +
		@problems.collect {|p| [p.full_name, p.id]},
		:selected => '-1' %>
File: <%= file_field_tag 'file' %>
<%= submit_tag 'Submit' %>
<% end %>

<%= flash[:notice] %>

<% i = 0 %>
<% @problems.each do |p| %>

    <%= "#{i+1}: #{p.full_name} (#{p.name})" %>
    <%= link_to '[task description]', p.url if (p.url!=nil) and (p.url!='') %>

    <%= format_submission(@prob_submissions[i][1],
		@prob_submissions[i][0]) %>

  <% i = i+1 %>
<% end %>


Changing variable name to default convention

<% if @block.box.owner.kind_of?(Environment) and @block.box.owner.portal_community.nil? %>

  <%= _("You don't have an community defined as the portal community. Define it before use this block properly.") %>

<% else %>
  <%
    articles = @block.available_articles.select {|a| !a.folder? || a.blog? }
    first_text = articles[articles.find_index{|a| a.kind_of? TextArticle}||-1]
    selected = @block.article || first_text
  %>
  <%= select_tag(
    'block[article_id]',
    options_for_select_with_title(articles.map {|item| [item.path, item.id]}, selected.id),
    :onchange => 'this.changedTo(this.value)'
  )%>

    <%= labelled_form_field(
      _('Number of posts:'),
      text_field_tag('block[posts_per_page]', @block.posts_per_page)
    )%>

  <%= labelled_form_field(
    _('How to display this content:'),
    select_tag(
      'block[visualization_format]',
      options_for_select([[_('Lead'), 'short'], [_('Full post'), 'full']], @block.visualization_format)
    )
  )%>
  <% blogs = @block.available_articles.select{|a|a.blog?} %>

<% end %>

<% if @block.box.owner.kind_of?(Environment) and @block.box.owner.portal_community.nil? %>

  <%= _("You don't have an community defined as the portal community. Define it before use this block properly.") %>

<% else %>
  <%
    articles = @block.available_articles.select {|a| !a.folder? || a.blog? }
    firstText = articles[articles.find_index{|a| a.kind_of?TextArticle}||-1]
    selected = @block.article || firstText
  %>
  <%= select_tag(
    'block[article_id]',
    options_for_select_with_title(articles.map {|item| [item.path, item.id]}, selected.id),
    :onchange => 'this.changedTo(this.value)'
  )%>

    <%= labelled_form_field(
      _('Number of posts:'),
      text_field_tag('block[posts_per_page]', @block.posts_per_page)
    )%>

  <%= labelled_form_field(
    _('How to display this content:'),
    select_tag(
      'block[visualization_format]',
      options_for_select([[_('Lead'), 'short'], [_('Full post'), 'full']], @block.visualization_format)
    )
  )%>
  <% blogs = @block.available_articles.select{|a|a.blog?} %>

<% end %>


Passing aruments in the correct order.

Passing aruments in the correct order.

(ActionItem1372)

<div id="user_menu" class="top_extra_menu AOM_paddingBottom_6"<%=
  ' help="'+ _('This menu gives you access to your personal functionalities.') +'"' if logged_in?
  %>>

  <% if logged_in? %>

      <img src="<%=
      (current_user.person.image)?
      current_user.person.image.public_filename(:icon) : "/images/icons-bar/photo.png"
      %>" alt="<%= current_user.name %> Icon-Photo" title="" height="20" border="0"/>
      <%= _("%s's Menu") % current_user.person.short_name %>

          <%= link_to( '' + __('My Home Page'), user.url, :help => _('Go to your home page.'))%>

        <%= link_to('' + _('My groups'), { :controller => 'memberships', :profile => user.identifier, :action => 'index' }) %>

        <% for enterprise in user.enterprises %>

<%= link_to('' + (_('Manage %s') % enterprise.short_name), { :controller => 'profile_editor', :profile => enterprise.identifier, :action => 'index' }) %>

        <% end %>

        <% if MailConf.enabled? && current_user.enable_email %>

          <%= link_to '' + _('Webmail'), MailConf.webmail_url(user.identifier, current_user.email_domain) %>

        <% end %>

        <%= link_to(''+ _('Control panel'), { :controller => 'profile_editor', :action => 'index', :profile => user.identifier }, :id => 'link_edit_profile', :help => _('Control panel: change your picture, edit your personal information, create content or change the way your home page looks.')) %>

        <% if user.is_admin?(environment) %>

<%= link_to( ''+ _('Admin'),
                             {:controller => 'admin_panel' },
                             :id => 'link_admin_panel',
                             :help => _('Access the site administration panel.')
                             )%>

        <% end %>

<%= link_to( ''+ _('Logout'),
                                  {:controller => 'account', :action => 'logout'},
                                  :id => 'link_logout',
                                  :help => _('This link takes you out of the system. You should logout if other people are willing to use the same computer after you.')
                                ) %>

  <% else %>

    <% if params[:controller] != 'account' || params[:action] != 'signup' %>
      <% if theme_option( :menu_login ) == 'full_form' %>
        <%= render :file => 'account/login_block' %>
      <% else %>
        <%= thickbox_inline_popup_link(''+ _('Login'), login_url, 'inlineLoginBox', :id => 'link_login', :help => _('Click here to enter your username and password and be recognized by the system.')) %>

          <%= render :file => 'account/login' %>
          <%= thickbox_close_button _('Close') %>

      <% end %>
    <% end %>

  <% end %>

<%= javascript_tag 'setAutoOpenMenu( $("user_menu") )' if theme_option( :menu_login ) != 'full_form' %>

<div id="user_menu" class="top_extra_menu AOM_paddingBottom_6"<%=
  ' help="'+ _('This menu gives you access to your personal functionalities.') +'"' if logged_in?
  %>>

  <% if logged_in? %>

      <img src="<%=
      (current_user.person.image)?
      current_user.person.image.public_filename(:icon) : "/images/icons-bar/photo.png"
      %>" alt="<%= current_user.name %> Icon-Photo" title="" height="20" border="0"/>
      <%= _("%s's Menu") % current_user.person.short_name %>

          <%= link_to( '' + __('My Home Page'), user.url, :help => _('Go to your home page.'))%>

        <%= link_to('' + _('My groups'), { :controller => 'memberships', :profile => user.identifier, :action => 'index' }) %>

        <% for enterprise in user.enterprises %>

<%= link_to('' + (_('Manage %s') % enterprise.short_name), { :controller => 'profile_editor', :profile => enterprise.identifier, :action => 'index' }) %>

        <% end %>

        <% if MailConf.enabled? && current_user.enable_email %>

          <%= link_to '' + _('Webmail'), MailConf.webmail_url(user.identifier, current_user.email_domain) %>

        <% end %>

        <%= link_to(''+ _('Control panel'), { :controller => 'profile_editor', :action => 'index', :profile => user.identifier }, :id => 'link_edit_profile', :help => _('Control panel: change your picture, edit your personal information, create content or change the way your home page looks.')) %>

        <% if user.is_admin?(environment) %>

<%= link_to( ''+ _('Admin'),
                             {:controller => 'admin_panel' },
                             :id => 'link_admin_panel',
                             :help => _('Access the site administration panel.')
                             )%>

        <% end %>

<%= link_to( ''+ _('Logout'),
                                  {:controller => 'account', :action => 'logout'},
                                  :id => 'link_logout',
                                  :help => _('This link takes you out of the system. You should logout if other people are willing to use the same computer after you.')
                                ) %>

  <% else %>

    <% if params[:controller] != 'account' || params[:action] != 'signup' %>
      <% if theme_option( :menu_login ) == 'full_form' %>
        <%= render :file => 'account/login_block' %>
      <% else %>
        <%= thickbox_inline_popup_link(''+ _('Login'), 'inlineLoginBox', login_url, :id => 'link_login', :help => _('Click here to enter your username and password and be recognized by the system.')) %>

          <%= render :file => 'account/login' %>
          <%= thickbox_close_button _('Close') %>

      <% end %>
    <% end %>

  <% end %>

<%= javascript_tag 'setAutoOpenMenu( $("user_menu") )' if theme_option( :menu_login ) != 'full_form' %>


Refactor nav and remove dropdowns that don't work

<!DOCTYPE html>

  <title>ProtectedPlanet API</title>

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

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

          protected planet®

        About

        Resources

        Terms & Conditions

             Search

  <%= yield %>

       ProtectedPlanet 2014-<%= Date.today.year %>. All rights reserved

          Send Feedback

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

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

  <% end %>

<!DOCTYPE html>

  <title>ProtectedPlanet API</title>

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

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

        protected planet

About

          Resources
          </button>

Terms & Conditions

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

            WDPA
            PARCC
            ICCA
            PAME

          Search

  <%= yield %>

       ProtectedPlanet 2014-<%= Date.today.year %>. All rights reserved

          Send Feedback

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

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

  <% end %>


Improve wording on annotations slightly.


Only treat a user as logged in if the user object has an id value - this avoids problem when creating an account fails and leaves an unsaved user object with no id value.


 r416@bison:  gaspard | 2007-01-26 17:51:25 +0100
 mish mash between apache 2.0 and 2.2: not working

git-svn-id: e099d366fb13ea49c9e8e170ced890dab3ea84f7@204 aaa19a3b-e121-0410-9d45-962fd44e537e

# some configurations of this file have been taken from http://mongrel.rubyforge.org/docs/apache.html
# any errors and bugs are mine, though.

<Proxy balancer://mongrel_cluster>
<% ports.each do |port| %>
  BalancerMember http://127.0.0.1:<%= port %><% end %>
</Proxy>

<VirtualHost <%= address %>>
  ServerName <%= server_name %>

  DocumentRoot <%= deploy_to %>/current/public
  ErrorLog     <%= deploy_to %>/shared/log/apache2.error.log
  CustomLog    <%= deploy_to %>/shared/log/apache2.access.log combined

  <Directory "<%= deploy_to %>/current/public">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
  <% if static.include?('cgi-bin') %>
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
  </Directory>
  <% end %>
  <% if static.include?('awstats-icon') %>
  Alias /awstats-icon/ /usr/share/awstats/icon/
  <Directory "/usr/share/awstats/icon">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
  <% end %>

  RewriteEngine On
  <% if options[:debug_rewrite] %>
  # rewrite debugging
  RewriteLog <%= deploy_to %>/shared/log/rewrite.log
  RewriteLogLevel 9
  <% end %>

  # Check for maintenance file and redirect all requests
  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /system/maintenance.html [L]

  # Rewrite index to check for static
  RewriteRule ^/$ /index.html [QSA]

  # Rewrite to check for Rails cached page
  RewriteRule ^([^.]+)$ $1.html [QSA]

  # Redirect all non-static requests to cluster
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
  <% if options[:deflate] %>
  # Deflate (compress data before sending to browser)
  AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  <% end %>
  <% if options[:debug_deflate] && option[:deflate] %>
  # Deflate debugging
  DeflateFilterNote Input input_info
  DeflateFilterNote Output output_info
  DeflateFilterNote Ratio ratio_info
  LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
  CustomLog <%= deploy_to %>/shared/log/deflate.log deflate
  <% end %>
</VirtualHost>

<VirtualHost <%= address %>>
  ServerName <%= server_name %>

  DocumentRoot <%= doc_root %>
  ErrorLog <%= error_log %>
  CustomLog <%= access_log %>

  # Proxy and rails stuff below
  <Proxy *>
      Order deny,allow
      Allow from all
  </Proxy>

  <% if static.include?('cgi-bin') %>
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>
	<% end %>

	<% if static.include?('awstats-icon') %>
  Alias /awstats-icon/ /usr/share/awstats/icon/
  <Directory /usr/share/awstats/icon>
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
  <% end %>

  ProxyRequests Off
  <% ports.each do |port| %>
  ProxyPassReverse / http://localhost:<%= port %>/<% end %>

  ProxyPreserveHost On

  RewriteEngine On

  RewriteMap  servers rnd:<%= server_ports_file %>

  # Do not serve hidden files !!
  RewriteRule ^(.*)/\.(.*) /404 [R]
  # static content, never going to proxy
  RewriteRule ^/(<%= static.join("|") %>)/?(.*) $0 [L]

  # serve static content with apache, do not handle request to proxy
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}.html !-f

  RewriteRule ^/(.*)$ http://localhost:${servers:ports}/$1 [P,L]
</VirtualHost>


actually link to twitter profile

actually link to twitter profile

<% @title = "About" %>

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

Introduction to <%= site_name %> #

What is  <%= site_name %> for? #

To help you find out inside information about what the Australian 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 the Freedom of Information Act 1982, or FOI for short, they have to respond. The response
  will either contain the information you want, or give a valid legal reason why
  it must be kept confidential.

Who makes <%= site_name %>? #

<%= site_name %> is a project of the OpenAustralia Foundation, a charity, and was developed with software by the UK organisation mySociety. It was made possible by a donation from Guy King. If you like what we're doing, then you can make a donation.

How can I keep up with news about <%= site_name %>?#

We have a blog and a twitter feed.

Next, read about making requests -->


Don't show last comment column, so table more reasonable

<% @title = 'Listing public bodies' %>

<%=@title%>

<%= link_to 'New public body', 'new' %>

  <% for column in PublicBody.content_columns.map { |c| c.human_name } - [ "Last edit comment" ] %>
    <%= column %>
  <% end %>

<% for public_body in @public_bodies %>
  <tr class="<%= cycle('odd', 'even') %>">
    <%= link_to h(public_body.name), 'show/' + public_body.id.to_s %>
  <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name", "last_edit_comment" ] %>
    <%=h public_body.send(column) %>
  <% end %>

<% end %>

<%= will_paginate(@public_bodies) %>

<% @title = 'Listing public bodies' %>

<%=@title%>

<%= link_to 'New public body', 'new' %>

  <% for column in PublicBody.content_columns %>
    <%= column.human_name %>
  <% end %>

<% for public_body in @public_bodies %>
  <tr class="<%= cycle('odd', 'even') %>">
    <%= link_to h(public_body.name), 'show/' + public_body.id.to_s %>
  <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name" ] %>
    <%=h public_body.send(column) %>
  <% end %>

<% end %>

<%= will_paginate(@public_bodies) %>


Removed the SEO preferences which Frederic accidentally re added.

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

<% @page_heading = _('Blog advanced settings') %>

    <% form_tag :action => 'update' do %>

<%= _("Things you can do")%>?

<%= link_to(_("Basic settings"), {:controller=>"general"}) %>

    <fieldset id="write" class="set">
        <legend><%= _("Write")%></legend>

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

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

    </fieldset>

    <fieldset id="publish" class="set">
        <legend><%= _("Publish")%></legend>

                <%= _("When publishing articles, Typo can 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.")%>

              <%= _("Send trackbacks")%>:
              <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.send_outbound_pings%> />
             <input name="setting[send_outbound_pings]" type="hidden" value="0" />

                <%= _("URLs to ping automatically")%>:
                <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h this_blog.ping_urls %></textarea>

                <%= _("Latitude, Longitude")%>:
                <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= this_blog.geourl_location %>" />
                <%= _("Display")%> <%= _("your lattitude and longitude")%> (<%= _("exemple")%> <tt>47.774,-122.201</tt>)

    </fieldset>

    <fieldset id="seo" class="set" style="margin-top:10px;">
        <legend><%= _("Search Engine Optimisation")%></legend>

                <%= _("Show blog name")%>:
                <input type="radio" name="setting[title_prefix]" value="1" id="blog_title_prefix_1" <%= 'checked="checked"' if this_blog.title_prefix == 1 %>/>
                <%= _("At the beginning of page title")%>

                    <input type="radio" name="setting[title_prefix]" value="2" id="blog_title_prefix_2" <%= 'checked="checked"' if this_blog.title_prefix == 2 %>/>
                    <%= _("At the end of page title")%>

                    <input type="radio" name="setting[title_prefix]" value="0" id="blog_title_prefix_0" <%= 'checked="checked"' if this_blog.title_prefix == 0 %>/>
                    <%= _("Don't show blog name in page title")%>

    </fieldset>

    <fieldset id="discuss" class="set">
        <legend><%= _("Discuss")%></legend>

                <%= _("This setting allows you to disable trackbacks for every article in your blog.  It won't remove existing trackbacks, but it will prevent any further attempt to add a trackback anywhere on your blog.")%>

                <%= _("Disable trackbacks site-wide")%>:
                <input name="setting[global_pings_disable]" id="global_pings_disable" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.global_pings_disable%> />
                <input name="setting[global_pings_disable]" type="hidden" value="0" />

<%= _("You can enable site wide feeback moderation. If you do so, no comment or trackback will appear on your blog unless you validate it")%>.

                <%= _("Enable feedback moderation")%>:
                <input name="setting[default_moderate_comments]" id="default_moderate_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_moderate_comments %> />
                <input name="setting[default_moderate_comments]" type="hidden" value="0" />

                <%= _("Show your email address") %>:
                <input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.link_to_author%> />
                <input name="setting[link_to_author]" type="hidden" value="0" />

                <%= _("You can optionally disable non-Ajax comments. Typo will always use Ajax for comment submission if Javascript is enabled, so non-Ajax comments are either from spammers or users without Javascript.")%>

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

                <%= _("Disable comments after")%>
                <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= this_blog.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 Links")%>:
                <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= this_blog.sp_url_limit %>" />
                <%= _("Set to 0 to never reject comments")%>

    </fieldset>

    <fieldset id="notification" class="set">
        <legend><%= _("Notification")%></legend>

<%= _("Typo can notify you when new articles or comments are posted")%>

                <%= _("Source Email")%>:
                <input name="setting[email_from]" size="25" id="email_from" type="text" value="<%= this_blog.email_from %>" />
                <%= _("Email address used by Typo to send notifications")%>.

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

                <%= _("Jabber password")%>:
                <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= this_blog.jabber_password %>" />

    </fieldset>

    <fieldset id="resources" class="set">
        <legend><%= _("Resource Settings")%></legend>

<%= _("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="<%= this_blog.itunes_author %>" />

                <%= _("Subtitle")%>: *
                <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= this_blog.itunes_subtitle %>" />

                <%= _("Summary")%>: *
                <textarea name="setting[itunes_summary]" cols="40" rows="3"><%=h this_blog.itunes_summary %></textarea>
                * <%= _("Setting for channel")%>

              <%= _("Email")%>: **
              <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= this_blog.itunes_email %>" />

                <%= _("Optional Name")%>: **
                <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= this_blog.itunes_name %>" />
                ** <%= _("Not published by Apple")%>

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

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

    </fieldset>

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

  <% end %>

<% @page_heading = _('Blog advanced settings') %>

    <% form_tag :action => 'update' do %>

<%= _("Things you can do")%>?

<%= link_to(_("Basic settings"), {:controller=>"general"}) %>

    <fieldset id="write" class="set">
        <legend><%= _("Write")%></legend>

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

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

    </fieldset>

    <fieldset id="publish" class="set">
        <legend><%= _("Publish")%></legend>

                <%= _("When publishing articles, Typo can 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.")%>

              <%= _("Send trackbacks")%>:
              <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.send_outbound_pings%> />
             <input name="setting[send_outbound_pings]" type="hidden" value="0" />

                <%= _("URLs to ping automatically")%>:
                <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h this_blog.ping_urls %></textarea>

                <%= _("Latitude, Longitude")%>:
                <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= this_blog.geourl_location %>" />
                <%= _("Display")%> <%= _("your lattitude and longitude")%> (<%= _("exemple")%> <tt>47.774,-122.201</tt>)

    </fieldset>

    <fieldset id="seo" class="set" style="margin-top:10px;">
        <legend><%= _("Search Engine Optimisation")%></legend>

                <%= _("Show blog name")%>:
                <input type="radio" name="setting[title_prefix]" value="1" id="blog_title_prefix_1" <%= 'checked="checked"' if this_blog.title_prefix == 1 %>/>
                <%= _("At the beginning of page title")%>

                    <input type="radio" name="setting[title_prefix]" value="2" id="blog_title_prefix_2" <%= 'checked="checked"' if this_blog.title_prefix == 2 %>/>
                    <%= _("At the end of page title")%>

                    <input type="radio" name="setting[title_prefix]" value="0" id="blog_title_prefix_0" <%= 'checked="checked"' if this_blog.title_prefix == 0 %>/>
                    <%= _("Don't show blog name in page title")%>

You can use either Typo traditional permalinks /articles/yyyy/mm/dd/title or search engine friendly permalinks /title

		 	  <%= _("Permalinks")%>:
			  <input type="radio" name="setting[seopermalinks]" value="0" id="blog_seopermalinks_1" <%= 'checked="checked"' if this_blog.seopermalinks == 0 %>/>
			  <%= _("Use Typo traditional permalinks")%>

			    <input type="radio" name="setting[seopermalinks]" value="1" id="blog_seopermalinks_2" <%= 'checked="checked"' if this_blog.seopermalinks == 1 %>/>
			    <%= _("Use search engine friendly permalinks")%>

    </fieldset>

    <fieldset id="discuss" class="set">
        <legend><%= _("Discuss")%></legend>

                <%= _("This setting allows you to disable trackbacks for every article in your blog.  It won't remove existing trackbacks, but it will prevent any further attempt to add a trackback anywhere on your blog.")%>

                <%= _("Disable trackbacks site-wide")%>:
                <input name="setting[global_pings_disable]" id="global_pings_disable" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.global_pings_disable%> />
                <input name="setting[global_pings_disable]" type="hidden" value="0" />

<%= _("You can enable site wide feeback moderation. If you do so, no comment or trackback will appear on your blog unless you validate it")%>.

                <%= _("Enable feedback moderation")%>:
                <input name="setting[default_moderate_comments]" id="default_moderate_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_moderate_comments %> />
                <input name="setting[default_moderate_comments]" type="hidden" value="0" />

                <%= _("Show your email address") %>:
                <input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.link_to_author%> />
                <input name="setting[link_to_author]" type="hidden" value="0" />

                <%= _("You can optionally disable non-Ajax comments. Typo will always use Ajax for comment submission if Javascript is enabled, so non-Ajax comments are either from spammers or users without Javascript.")%>

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

                <%= _("Disable comments after")%>
                <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= this_blog.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 Links")%>:
                <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= this_blog.sp_url_limit %>" />
                <%= _("Set to 0 to never reject comments")%>

    </fieldset>

    <fieldset id="notification" class="set">
        <legend><%= _("Notification")%></legend>

<%= _("Typo can notify you when new articles or comments are posted")%>

                <%= _("Source Email")%>:
                <input name="setting[email_from]" size="25" id="email_from" type="text" value="<%= this_blog.email_from %>" />
                <%= _("Email address used by Typo to send notifications")%>.

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

                <%= _("Jabber password")%>:
                <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= this_blog.jabber_password %>" />

    </fieldset>

    <fieldset id="resources" class="set">
        <legend><%= _("Resource Settings")%></legend>

<%= _("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="<%= this_blog.itunes_author %>" />

                <%= _("Subtitle")%>: *
                <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= this_blog.itunes_subtitle %>" />

                <%= _("Summary")%>: *
                <textarea name="setting[itunes_summary]" cols="40" rows="3"><%=h this_blog.itunes_summary %></textarea>
                * <%= _("Setting for channel")%>

              <%= _("Email")%>: **
              <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= this_blog.itunes_email %>" />

                <%= _("Optional Name")%>: **
                <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= this_blog.itunes_name %>" />
                ** <%= _("Not published by Apple")%>

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

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

    </fieldset>

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

  <% end %>


change excerpt link to 'hide'

change excerpt link to 'hide'

<%= error_messages_for 'article' %>
<% @style = has_excerpt? ? "" : "display:none" %>

Title

<%= form.text_field :title, :class => 'big'  %>

    <dt id="x-lbl" style="<%= @style %>"><%= form.label_for :excerpt %> (<%= link_to_function 'Hide', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

    <dd id="x-body" style="<%= @style %>"><%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

Write your article (<%= link_to_function 'Add an excerpt', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

<%= form.text_area :body, :class => 'fat', :rows => 25  %>

Tags Enter one or more tags separated by a comma or a space (for example, "Web Dev" Tutorials or Web Dev, Tutorials).

<%= form.text_field :tag %>

Save as Draft?

<%= check_box_tag :draft, '1', !@article.new_record? && !@published, :id => 'article-draft' %> Yes, save this article as a draft.

  <dt id="publish-date-lbl"<%= %( style="display:none") unless @article.new_record? || @published -%>><%= label_tag 'article_created_at', 'Publish on this date:' %>

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @published -%>>
    <%= form.datetime_select :published_at,
          :start_year => (@article.published_at || Time.now.utc).year-1, :end_year => (Time.now.utc.year + 5), :order => [:month, :day, :year] %>

<%= error_messages_for 'article' %>
<% @style = has_excerpt? ? "" : "display:none" %>

Title

<%= form.text_field :title, :class => 'big'  %>

    <dt id="x-lbl" style="<%= @style %>"><%= form.label_for :excerpt %> (<%= link_to_function 'Cancel', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

    <dd id="x-body" style="<%= @style %>"><%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

Write your article (<%= link_to_function 'Add an excerpt', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

<%= form.text_area :body, :class => 'fat', :rows => 25  %>

Tags Enter one or more tags separated by a comma or a space (for example, "Web Dev" Tutorials or Web Dev, Tutorials).

<%= form.text_field :tag %>

Save as Draft?

<%= check_box_tag :draft, '1', !@article.new_record? && !@published, :id => 'article-draft' %> Yes, save this article as a draft.

  <dt id="publish-date-lbl"<%= %( style="display:none") unless @article.new_record? || @published -%>><%= label_tag 'article_created_at', 'Publish on this date:' %>

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @published -%>>
    <%= form.datetime_select :published_at,
          :start_year => (@article.published_at || Time.now.utc).year-1, :end_year => (Time.now.utc.year + 5), :order => [:month, :day, :year] %>


Fixed a deprecation warning from the tests. item.type throws warnings.

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

<tr <%= alternate_class %>>
  <input class= "feedback_check" type="checkbox" name="feedback_check[<%= item.id %>]"/>
  <%= item.state %>
  <%= link_to_article_edit item.article %>

    <%= link_to_unless item.url.blank?, ((item.author || '(unknown)').slice(0,40)), item.url %>

    <%=h item.email.to_s.slice(0,40) %>

  <%=h truncate(item.body,100)%>
  <%=h item.ip %>
  <%= link_to image_tag('show.png', :alt => "show", :title => "Show content"), :controller => (item.class.to_s == 'Comment') ? 'comments' : 'trackbacks', :article_id => item.article_id, :action => 'show', :id => item.id %>
  <%= link_to image_tag('edit.png', :alt => "edit", :title => "Edit content"), :controller => 'comments', :article_id => item.article_id, :action => 'edit', :id => item.id %>
  <%= link_to image_tag('delete.png'), {:action => 'delete', :id => item.id, :search => params[:search], :page => params[:page] },  :confirm => "Are you sure?", :method => :post %>

<tr <%= alternate_class %>>
  <input class= "feedback_check" type="checkbox" name="feedback_check[<%= item.id %>]"/>
  <%= item.state %>
  <%= link_to_article_edit item.article %>

	<%= link_to_unless item.url.blank?, ((item.author || '(unknown)').slice(0,40)), item.url %>

    <%=h item.email.to_s.slice(0,40) %>

  <%=h truncate(item.body,100)%>
  <%=h item.ip %>
  <%= link_to image_tag('show.png', :alt => "show", :title => "Show content"), :controller => (item.type.to_s == 'Comment') ? 'comments' : 'trackbacks', :article_id => item.article_id, :action => 'show', :id => item.id %>
  <%= link_to image_tag('edit.png', :alt => "edit", :title => "Edit content"), :controller => 'comments', :article_id => item.article_id, :action => 'edit', :id => item.id %>
  <%= link_to image_tag('delete.png'), {:action => 'delete', :id => item.id, :search => params[:search], :page => params[:page] },  :confirm => "Are you sure?", :method => :post %>