add centuries

add centuries

<% new_numeric_start = false %>
<% new_numeric_end = false %>
<% new_text_start = false %>
<% new_text_end = false %>
<% if @record.begin_date_start == nil %>
	<% new_numeric_start=true %>
	<% new_text_start=true %>

	<%= link_to_function('Event',"evt_type='event';$('numeric_text_choice').show();$('event_duration_choice').hide();")%>

	<%= link_to_function('Duration',"evt_type='duration';$('event_duration_choice').hide();$('numeric_text_choice').show();$('end_day_fields').show();")%>

	<%= link_to_function('Day',"$('day_fields').show();if(evt_type=='duration') {$('end_day_fields').show();};$('numeric_text_choice').hide();$('date_metric').value='day';$('date_range_fields').hide();")%>

	<%= link_to_function('Year',"$('numeric_content_container_start').show();if(evt_type=='duration') {$('numeric_content_container_stop').show();$('date_metric2').value='year';};$('numeric_text_choice').hide();$('date_metric').value='year';$('visualize_all').show();")%>

	<%= link_to_function('Century',"$('numeric_text_choice').hide();$('textual_content_container_start').show();if(evt_type=='duration') {$('textual_content_container_stop').show();$('date_metric2').value='century';};$('date_metric').value='century';$('visualize_all').show();")%>

<% end %>
<% if @record.finish_date_start == nil %>
	<% new_numeric_end=true %>
	<% new_text_end=true %>
<% end %>
	<div id="day_fields" <% if (new_numeric_start == true) or (new_numeric_start == false and @record.begin_type!='day') %>style="display:none"<% end %>>
		Begin:
		<%= text_field("record",'date_start_year',{:size => "4"})%>/<%= text_field("record",'date_start_month',{:size => "2"})%>/<%= text_field("record",'date_start_day',{:size => "2"})%> (YYYY/MM/DD)

		<span id="end_day_fields" <% if (new_numeric_start == true) or (new_numeric_start == false and @record.begin_type=='day' and @record.date_end_year == 0) %>style="display:none" <% end %>>
			End:
			<%= text_field("record",'date_end_year',{:size => "4"})%>/<%= text_field("record",'date_end_month',{:size => "2"})%>/<%= text_field("record",'date_end_day',{:size => "2"})%> (YYYY/MM/DD)

	<% if new_numeric_start == true or @record.begin_type == 'day' or @record.begin_type == 'century'%>

	<% else %>

	<% end %>
		<fieldset id = "datefields">
			Begin Date:
			Start:  <input type = "text" id = "datestart" name="record[begin_date_start]" value="<%= @record.begin_date_start %>">

			Center:  <input type = "text" id = "datecenter" name="record[begin_date_center]" value="<%= @record.begin_date_center %>">
			End:  <input type = "text" id = "dateend" name="record[begin_date_end]" value="<%= @record.begin_date_end %>">

			<%= hidden_field('record', 'begin_type', {:id => 'date_metric'})%>
			<input type="button" value="Visualize" onclick="insert_slider_controls('begin_slider','datestart','datecenter','dateend','date_metric','precise')">
			<%#= link_to_function('Visualize','insert_slider_controls("begin_slider","datestart","datecenter","dateend","date_metric","precise")') %>

				</fieldset>

	<% if new_numeric_end == true or @record.begin_type == 'day' or @record.begin_type == 'century' %>

	<% else %>

	<% end %>
		<fieldset id = "datefields2">
			End Date:
			Start:  <input type = "text" id = "datestart2" name="record[finish_date_start]" value="<%= @record.finish_date_start %>">
			Center:  <input type = "text" id = "datecenter2" name="record[finish_date_center]" value="<%= @record.finish_date_center %>">
			End:  <input type = "text" id = "dateend2" name="record[finish_date_end]" value="<%= @record.finish_date_end %>">

			<%= hidden_field('record', 'finish_type', {:id => 'date_metric2'})%>
			<input type="button" value="Visualize" onclick="insert_slider_controls('begin_slider2','datestart2','datecenter2','dateend2','date_metric2','precise2')">
			<%#= link_to_function('Visualize','insert_slider_controls("begin_slider2","datestart2","datecenter2","dateend2","date_metric2","precise2")') %>

		</fieldset>

<% if new_text_start == true or @record.begin_type != 'century' %>

<% else %>

<% end %>
	Century: <%= select("record", "date_start_century", [['2nd',100],['3rd',200],['4th',300],['5th',400],['6th',500],['7th',600],['8th',700],['9th',800],['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]],  {:include_blank => true},{:id => 'century_start_year', :onclick => "$('datestart').value=this.value;$('datecenter').value=this.value;$('dateend').value=this.value;"}) %>
	Encoding: <%= select("record", "begin_encoding_type", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'begin_encoding_type', :onclick => ""}) %>
	<% if @record.date_start_year_secondary == nil %>

			<%= link_to_function('Expand', "$('expand_begin').hide();$('begin_secondary').show();")%>

	<% end %>
	<% if @record.date_start_year_secondary == nil %>

	<% else %>

	<% end %>
		End:
		Century: <%= select("record", "date_start_century_secondary", [['2nd',100],['3rd',200],['4th',300],['5th',400],['6th',500],['7th',600],['8th',700],['9th',800],['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]],  {:include_blank => true},{:id => 'century_start_year_secondary'}) %>
		Encoding: <%= select("record", "begin_encoding_type_secondary", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'begin_encoding_type_secondary', :onclick => ""}) %>

 <% if new_text_end == true or @record.begin_type != 'century' %>

<% else %>

<% end %>
	Century: <%= select("record", "date_end_century", [['2nd',100],['3rd',200],['4th',300],['5th',400],['6th',500],['7th',600],['8th',700],['9th',800],['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]], {:include_blank => true}, {:id => 'century_finish_year', :onclick => "$('datestart2').value=this.value;$('datecenter2').value=this.value;$('dateend2').value=this.value;"}) %>
	Encoding: <%= select("record", "finish_encoding_type", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'finish_encoding_type', :onclick => ""}) %>
	<% if @record.date_start_year_secondary == nil %>

			<%= link_to_function('Expand', "$('expand_end').hide();$('end_secondary').show();")%>

	<% end %>
	<% if @record.date_end_year_secondary == nil %>

	<% else %>

	<% end %>
		End:
		Century: <%= select("record", "date_end_century_secondary", [['2nd',100],['3rd',200],['4th',300],['5th',400],['6th',500],['7th',600],['8th',700],['9th',800],['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]],  {:include_blank => true},{:id => 'century_end_year_secondary'}) %>
		Encoding: <%= select("record", "finish_encoding_type_secondary", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'end_encoding_type_secondary', :onclick => ""}) %>

<% new_numeric_start = false %>
<% new_numeric_end = false %>
<% new_text_start = false %>
<% new_text_end = false %>
<% if @record.begin_date_start == nil %>
	<% new_numeric_start=true %>
	<% new_text_start=true %>

	<%= link_to_function('Event',"evt_type='event';$('numeric_text_choice').show();$('event_duration_choice').hide();")%>

	<%= link_to_function('Duration',"evt_type='duration';$('event_duration_choice').hide();$('numeric_text_choice').show();$('end_day_fields').show();")%>

	<%= link_to_function('Day',"$('day_fields').show();if(evt_type=='duration') {$('end_day_fields').show();};$('numeric_text_choice').hide();$('date_metric').value='day';$('date_range_fields').hide();")%>

	<%= link_to_function('Year',"$('numeric_content_container_start').show();if(evt_type=='duration') {$('numeric_content_container_stop').show();$('date_metric2').value='year';};$('numeric_text_choice').hide();$('date_metric').value='year';$('visualize_all').show();")%>

	<%= link_to_function('Century',"$('numeric_text_choice').hide();$('textual_content_container_start').show();if(evt_type=='duration') {$('textual_content_container_stop').show();$('date_metric2').value='century';};$('date_metric').value='century';$('visualize_all').show();")%>

<% end %>
<% if @record.finish_date_start == nil %>
	<% new_numeric_end=true %>
	<% new_text_end=true %>
<% end %>
	<div id="day_fields" <% if (new_numeric_start == true) or (new_numeric_start == false and @record.begin_type!='day') %>style="display:none"<% end %>>
		Begin:
		<%= text_field("record",'date_start_year',{:size => "4"})%>/<%= text_field("record",'date_start_month',{:size => "2"})%>/<%= text_field("record",'date_start_day',{:size => "2"})%> (YYYY/MM/DD)

		<span id="end_day_fields" <% if (new_numeric_start == true) or (new_numeric_start == false and @record.begin_type=='day' and @record.date_end_year == 0) %>style="display:none" <% end %>>
			End:
			<%= text_field("record",'date_end_year',{:size => "4"})%>/<%= text_field("record",'date_end_month',{:size => "2"})%>/<%= text_field("record",'date_end_day',{:size => "2"})%> (YYYY/MM/DD)

	<% if new_numeric_start == true or @record.begin_type == 'day' or @record.begin_type == 'century'%>

	<% else %>

	<% end %>
		<fieldset id = "datefields">
			Begin Date:
			Start:  <input type = "text" id = "datestart" name="record[begin_date_start]" value="<%= @record.begin_date_start %>">

			Center:  <input type = "text" id = "datecenter" name="record[begin_date_center]" value="<%= @record.begin_date_center %>">
			End:  <input type = "text" id = "dateend" name="record[begin_date_end]" value="<%= @record.begin_date_end %>">

			<%= hidden_field('record', 'begin_type', {:id => 'date_metric'})%>
			<input type="button" value="Visualize" onclick="insert_slider_controls('begin_slider','datestart','datecenter','dateend','date_metric','precise')">
			<%#= link_to_function('Visualize','insert_slider_controls("begin_slider","datestart","datecenter","dateend","date_metric","precise")') %>

				</fieldset>

	<% if new_numeric_end == true or @record.begin_type == 'day' or @record.begin_type == 'century' %>

	<% else %>

	<% end %>
		<fieldset id = "datefields2">
			End Date:
			Start:  <input type = "text" id = "datestart2" name="record[finish_date_start]" value="<%= @record.finish_date_start %>">
			Center:  <input type = "text" id = "datecenter2" name="record[finish_date_center]" value="<%= @record.finish_date_center %>">
			End:  <input type = "text" id = "dateend2" name="record[finish_date_end]" value="<%= @record.finish_date_end %>">

			<%= hidden_field('record', 'finish_type', {:id => 'date_metric2'})%>
			<input type="button" value="Visualize" onclick="insert_slider_controls('begin_slider2','datestart2','datecenter2','dateend2','date_metric2','precise2')">
			<%#= link_to_function('Visualize','insert_slider_controls("begin_slider2","datestart2","datecenter2","dateend2","date_metric2","precise2")') %>

		</fieldset>

<% if new_text_start == true or @record.begin_type != 'century' %>

<% else %>

<% end %>
	Century: <%= select("record", "date_start_century", [['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]],  {:include_blank => true},{:id => 'century_start_year', :onclick => "$('datestart').value=this.value;$('datecenter').value=this.value;$('dateend').value=this.value;"}) %>
	Encoding: <%= select("record", "begin_encoding_type", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'begin_encoding_type', :onclick => ""}) %>
	<% if @record.date_start_year_secondary == nil %>

			<%= link_to_function('Expand', "$('expand_begin').hide();$('begin_secondary').show();")%>

	<% end %>
	<% if @record.date_start_year_secondary == nil %>

	<% else %>

	<% end %>
		End:
		Century: <%= select("record", "date_start_century_secondary", [['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]],  {:include_blank => true},{:id => 'century_start_year_secondary'}) %>
		Encoding: <%= select("record", "begin_encoding_type_secondary", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'begin_encoding_type_secondary', :onclick => ""}) %>

 <% if new_text_end == true or @record.begin_type != 'century' %>

<% else %>

<% end %>
	Century: <%= select("record", "date_end_century", [['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]], {:include_blank => true}, {:id => 'century_finish_year', :onclick => "$('datestart2').value=this.value;$('datecenter2').value=this.value;$('dateend2').value=this.value;"}) %>
	Encoding: <%= select("record", "finish_encoding_type", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'finish_encoding_type', :onclick => ""}) %>
	<% if @record.date_start_year_secondary == nil %>

			<%= link_to_function('Expand', "$('expand_end').hide();$('end_secondary').show();")%>

	<% end %>
	<% if @record.date_end_year_secondary == nil %>

	<% else %>

	<% end %>
		End:
		Century: <%= select("record", "date_end_century_secondary", [['10th',900],['11th',1000],['12th',1100],['13th',1200],['14th',1300],['15th',1400],['16th',1500],['17th',1600],['17th',1700],['19th',1800],['20th',1900],['21th',2000]],  {:include_blank => true},{:id => 'century_end_year_secondary'}) %>
		Encoding: <%= select("record", "finish_encoding_type_secondary", ['circa','Century','beginCent','midCent','endCent','turnCent','1st half','2nd half','1st third','2nd third','3rd third','1st quarter','2nd quarter','3rd quarter','4th quarter','openLeft','openRight'], {:include_blank => true}, {:id => 'end_encoding_type_secondary', :onclick => ""}) %>


add email link in booking page

add email link in booking page

Mina kommande spelrätt bokning

    <% if current_user.play_right_bookings.size == 0 %>

Du har ingen bokning

    <% else %>

Du har följande bokning.

          Golf banan
	        Datum

        <%current_user.play_right_bookings.forthcoming.each do | booking | %>

	        <%= h(booking.play_right.name) %>
          <%= booking.booked_on %>

            <%= link_to "Ta bort", {:action => "remove", :id => booking.id},
              :confirm => "Är du säker du vill ta bort bokningen den #{booking.booked_on} på #{booking.play_right.name}?",
              :method => :post %>

        <% end %>

    <% end %>

Boka nytt spelrätt

Här kan du boka golf banan. Du får bara har ett utstående bokning per gång.

    <% semantic_form_for [:member, PlayRightBooking.new] do |form| %>
      <% form.inputs do %>
        <%= form.input :play_right, :label => 'Golfsbanan', :include_blank => false %>
        <%= form.input :booked_on, :label => 'Datum', :start_year => Time.now.year, :end_year => Time.now.year %>
        <%= form.input :num_of_resource, :as => :hidden, :value => "1" %>
      <% end %>
      <% form.buttons do %>
        <%= form.commit_button :label => "Boka" %>
      <% end %>
    <% end %>

Dagens boking av spelrätter

      <% @play_rights.each do |pr| %>
      <%  booking_count = pr.play_right_bookings.today.count %>
      <%   if booking_count == 0 %>

<%= "Idag har  #{pr.name} ingen bokning" %>

      <%   else %>

             <%   booking_msg = (booking_count == 1) ? "bokning" : "bokningar" %>
             <%= "Idag har  #{pr.name} #{booking_count} #{booking_msg}" %>

                <% pr.play_right_bookings.today.each do |booking| %>

                      <%= "#{booking.user.name} - mobil = #{booking.user.mobile_phone} - " %>
                      <%= " maila till spelare" %>

               <% end %>

        <% end %>
     <% end %>

Mina kommande spelrätt bokning

    <% if current_user.play_right_bookings.size == 0 %>

Du har ingen bokning

    <% else %>

Du har följande bokning.

          Golf banan
	        Datum

        <%current_user.play_right_bookings.forthcoming.each do | booking | %>

	        <%= h(booking.play_right.name) %>
          <%= booking.booked_on %>

            <%= link_to "Ta bort", {:action => "remove", :id => booking.id},
              :confirm => "Är du säker du vill ta bort bokningen den #{booking.booked_on} på #{booking.play_right.name}?",
              :method => :post %>

        <% end %>

    <% end %>

Boka nytt spelrätt

Här kan du boka golf banan. Du får bara har ett utstående bokning per gång.

    <% semantic_form_for [:member, PlayRightBooking.new] do |form| %>
      <% form.inputs do %>
        <%= form.input :play_right, :label => 'Golfsbanan', :include_blank => false %>
        <%= form.input :booked_on, :label => 'Datum', :start_year => Time.now.year, :end_year => Time.now.year %>
        <%= form.input :num_of_resource, :as => :hidden, :value => "1" %>
      <% end %>
      <% form.buttons do %>
        <%= form.commit_button :label => "Boka" %>
      <% end %>
    <% end %>

Dagens boking av spelrätter

      <% @play_rights.each do |pr| %>
      <%  booking_count = pr.play_right_bookings.today.count %>
      <%   if booking_count == 0 %>

<%= "Idag har  #{pr.name} ingen bokning" %>

      <%   else %>

             <%   booking_msg = (booking_count == 1) ? "bokning" : "bokningar" %>
             <%= "Idag har  #{pr.name} #{booking_count} #{booking_msg}" %>

                <% pr.play_right_bookings.today.each do |booking| %>

<%= "#{booking.user.name} - #{booking.user.email} - #{booking.user.mobile_phone}" %>

               <% end %>

        <% end %>
     <% end %>


fix insert table.

fix insert table.

git-svn-id: d766b2a131eb5d649bacb6a45bc0bcd899bdfdb3@196 c938ebee-df10-0410-95fc-be8c4b0ebdd5

      <% if @flash[:notice] || @flash[:notice].to_s != ""%>

<%=@flash[:notice]%>

      <% end %>

          支出

        <% for summary in @expenses_summaries %>

            <%= summary.name %>
            <%= @expenses_sum != 0 ?
      (summary.sum * 100.0 / @expenses_sum).round : 0%>%
            <%= number_with_delimiter(summary.sum)%>

        <% end %>

          収入

        <% for summary in @incomes_summaries %>

            <%= summary.name %>
            <%= @incomes_sum != 0 ?
(summary.sum * 100.0 / @incomes_sum).round : 0 %>%
            <%= number_with_delimiter(summary.sum)%>

        <% end %>

          支出合計
          <%= number_with_delimiter(@expenses_sum)%>

<%
  labels = ''
  values = ''
  for summary in @expenses_summaries
     v = (@expenses_sum != 0 ? (summary.sum * 100.0 / @expenses_sum).round : 0)
     next if v == 100 || v == 0
     values += v.to_s + ','
     labels += summary.name + ','
  end
%>
<% if labels.count(',') > 1 then %>

	     <img src="<%= url_for(:controller=>'graph', :action=>'pie', :labels=>labels, :values=>values) %>" />

<% end %>

          収入合計
          <%= number_with_delimiter(@incomes_sum)%>

<%
  labels = ''
  values = ''
  for summary in @incomes_summaries
     v = (@incomes_sum != 0 ? (summary.sum * 100.0 / @incomes_sum).round : 0)
     next if v == 100 || v == 0
     values += v.to_s + ','
     labels += summary.name + ','
  end
%>
<% if labels.count(',') > 1 then %>

	      <img src="<%= url_for(:controller=>'graph', :action=>'pie', :labels=>labels, :values=>values) %>" />

<% end %>

    <div class="<%= @profit >= 0 ? "profit" : "loss" %>">
      <%= @profit >= 0 ? "利益" : "損失" %>合計
      <%= number_with_delimiter(@profit.abs)%>円

            資産減少

          <% for summary in @asset_minus_summaries %>

              <%= summary.account.name %>
              -<%= number_with_delimiter(summary.diff.abs)%>

          <% end %>

            資産増加

          <% for summary in @asset_plus_summaries %>

              <%= summary.account.name %>
              +<%= number_with_delimiter(summary.diff)%>

          <% end %>

            減少合計
            -<%= number_with_delimiter(@assets_minus_sum.abs)%>

            増加合計
            +<%= number_with_delimiter(@assets_plus_sum)%>

      <% if @flash[:notice] || @flash[:notice].to_s != ""%>

<%=@flash[:notice]%>

      <% end %>

          支出

        <% for summary in @expenses_summaries %>

            <%= summary.name %>
            <%= @expenses_sum != 0 ?
      (summary.sum * 100.0 / @expenses_sum).round : 0%>%
            <%= number_with_delimiter(summary.sum)%>

        <% end %>

          収入

        <% for summary in @incomes_summaries %>

            <%= summary.name %>
            <%= @incomes_sum != 0 ?
(summary.sum * 100.0 / @incomes_sum).round : 0 %>%
            <%= number_with_delimiter(summary.sum)%>

        <% end %>

          支出合計
          <%= number_with_delimiter(@expenses_sum)%>

          収入合計
          <%= number_with_delimiter(@incomes_sum)%>

<%
  labels = ''
  values = ''
  for summary in @expenses_summaries
     v = (@expenses_sum != 0 ? (summary.sum * 100.0 / @expenses_sum).round : 0)
     next if v == 100 || v == 0
     values += v.to_s + ','
     labels += summary.name + ','
  end
%>
<% if labels.count(',') > 1 then %>

	 <img src="<%= url_for(:controller=>'graph', :action=>'pie', :labels=>labels, :values=>values) %>" />

<% end %>

<%
  labels = ''
  values = ''
  for summary in @incomes_summaries
     v = (@incomes_sum != 0 ? (summary.sum * 100.0 / @incomes_sum).round : 0)
     next if v == 100 || v == 0
     values += v.to_s + ','
     labels += summary.name + ','
  end
%>
<% if labels.count(',') > 1 then %>

	 <img src="<%= url_for(:controller=>'graph', :action=>'pie', :labels=>labels, :values=>values) %>" />

<% end %>

    <div class="<%= @profit >= 0 ? "profit" : "loss" %>">
      <%= @profit >= 0 ? "利益" : "損失" %>合計
      <%= number_with_delimiter(@profit.abs)%>円

            資産減少

          <% for summary in @asset_minus_summaries %>

              <%= summary.account.name %>
              -<%= number_with_delimiter(summary.diff.abs)%>

          <% end %>

            資産増加

          <% for summary in @asset_plus_summaries %>

              <%= summary.account.name %>
              +<%= number_with_delimiter(summary.diff)%>

          <% end %>

            減少合計
            -<%= number_with_delimiter(@assets_minus_sum.abs)%>

            増加合計
            +<%= number_with_delimiter(@assets_plus_sum)%>


Adding jquery.

Adding jquery.

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

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

<link rel="stylesheet" type="text/css" href="/stylesheets/dddropdownpanel.css" />

<title><% if params[:controller] == 'content_pages' and
            ( params[:action] == 'view' or
              params[:action] == 'view_default') -%>
<%= @content_page.title %>
<% else -%>
<%= params[:controller] %> | <%= params[:action] %>
<% end -%></title>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

<link rel="stylesheet" href="/stylesheets/goldberg.css"
  type="text/css" media="screen" />
<link rel="stylesheet" href="/stylesheets/layout.css"
  type="text/css" media="screen" />

<%= stylesheet_link_tag 'redbox' %>
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag 'redbox' %>
<%= javascript_include_tag "jquery", "application"%>

<% if controller.controller_name == "submitted_content" %><% end %>
<% if controller.controller_name == "grades" %><% end %>

<% if defined?(RAILS_ROOT)
     if File.exists?("#{RAILS_ROOT}/public/stylesheets/ajax_scaffold.css") -%>
<%= stylesheet_link_tag 'ajax_scaffold', :media => 'all' %>
  <% end
     if File.exists?("#{RAILS_ROOT}/public/javascripts/ajax_scaffold.js") -%>
<%= javascript_include_tag 'rico_corner', 'ajax_scaffold' %>
  <% end
  end -%>

<%= @settings.site_name %>

<%= @settings.site_subtitle %>

      <%= render :partial => 'menu_items/suckerfish',
          :locals => {:items => session[:menu].get_menu(0)} %>

          <%= render :partial => 'menu_items/breadcrumbs',
	      :locals => {:crumbs => session[:menu].crumbs} %>

<% if flash[:note] -%>

<%= flash[:note] %>

<% elsif flash[:error] -%>

Error!
<%= flash[:error] %>

<% end -%>
<%= yield %>

      <%= render :partial => 'auth/login' %>

<%= @settings.footer_message %>

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

<link rel="stylesheet" type="text/css" href="/stylesheets/dddropdownpanel.css" />

<title><% if params[:controller] == 'content_pages' and
            ( params[:action] == 'view' or
              params[:action] == 'view_default') -%>
<%= @content_page.title %>
<% else -%>
<%= params[:controller] %> | <%= params[:action] %>
<% end -%></title>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

<link rel="stylesheet" href="/stylesheets/goldberg.css"
  type="text/css" media="screen" />
<link rel="stylesheet" href="/stylesheets/layout.css"
  type="text/css" media="screen" />

<%= stylesheet_link_tag 'redbox' %>
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag 'redbox' %>

<% if controller.controller_name == "submitted_content" %><% end %>
<% if controller.controller_name == "grades" %><% end %>

<% if defined?(RAILS_ROOT)
     if File.exists?("#{RAILS_ROOT}/public/stylesheets/ajax_scaffold.css") -%>
<%= stylesheet_link_tag 'ajax_scaffold', :media => 'all' %>
  <% end
     if File.exists?("#{RAILS_ROOT}/public/javascripts/ajax_scaffold.js") -%>
<%= javascript_include_tag 'rico_corner', 'ajax_scaffold' %>
  <% end
  end -%>

<%= @settings.site_name %>

<%= @settings.site_subtitle %>

      <%= render :partial => 'menu_items/suckerfish',
          :locals => {:items => session[:menu].get_menu(0)} %>

          <%= render :partial => 'menu_items/breadcrumbs',
	      :locals => {:crumbs => session[:menu].crumbs} %>

<% if flash[:note] -%>

<%= flash[:note] %>

<% elsif flash[:error] -%>

Error!
<%= flash[:error] %>

<% end -%>
<%= yield %>

      <%= render :partial => 'auth/login' %>

<%= @settings.footer_message %>


ActionItem1179: adding information about allowed image formats

<%= _('Profile settings for %s') % profile.name %>

<%= error_messages_for :profile %>

<% labelled_form_for :profile_data, @profile, :html => { :id => 'profile-data', :multipart => true } do |f| %>

  <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

<%= _('Change picture') %>

    <% f.fields_for :image_builder, @profile.image do |i| %>
      <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
    <% end %>

<%= _('Privacy options') %>

  <% if profile.person? %>

        <%= _('This profile is:') %>

        <%= radio_button 'profile_data', 'public_profile', 'true' %>
        <%= _('Public') %>

        <%= radio_button 'profile_data', 'public_profile', 'false' %>
        <%= _('Private') %>

       <%= _('Activate Intranet access (restricted area only for me)') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Show my website to all internet users') %> 	<%= _('Yes') %>	<%= _('No') %>

       <%= _('Show my website to my contacts (persons)') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Include my contact in directory of people') %> 	<%= _('Yes') %>	<%= _('No') %>

  <% else %>

        <%= _('This profile is:') %>

        <%= radio_button 'profile_data', 'public_profile', 'true' %>
        <%= _('Public') %>

        <%= radio_button 'profile_data', 'public_profile', 'false' %>
        <%= _('Private') %>

       <%= _('Activate Intranet access (restricted area only for members)') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Show website of this group to all internet users') %> 	<%= _('Yes') %>	<%= _('No') %>

       <%= _('Show my website to members') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Include this group directory of groups') %> 	<%= _('Yes') %>	<%= _('No') %>

  <% end %>

  <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
    <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
  <% end %>
<% end %>

<%# = generate_form :info, @info, {...} %>

<%= _('Profile settings for %s') % profile.name %>

<%= error_messages_for :profile %>

<% labelled_form_for :profile_data, @profile, :html => { :id => 'profile-data', :multipart => true } do |f| %>

  <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

<%= _('Change picture') %>

    <% f.fields_for :image_builder, @profile.image do |i| %>
      <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("(max size %s)")% Image.max_size.to_humanreadable %>
    <% end %>

<%= _('Privacy options') %>

  <% if profile.person? %>

        <%= _('This profile is:') %>

        <%= radio_button 'profile_data', 'public_profile', 'true' %>
        <%= _('Public') %>

        <%= radio_button 'profile_data', 'public_profile', 'false' %>
        <%= _('Private') %>

       <%= _('Activate Intranet access (restricted area only for me)') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Show my website to all internet users') %> 	<%= _('Yes') %>	<%= _('No') %>

       <%= _('Show my website to my contacts (persons)') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Include my contact in directory of people') %> 	<%= _('Yes') %>	<%= _('No') %>

  <% else %>

        <%= _('This profile is:') %>

        <%= radio_button 'profile_data', 'public_profile', 'true' %>
        <%= _('Public') %>

        <%= radio_button 'profile_data', 'public_profile', 'false' %>
        <%= _('Private') %>

       <%= _('Activate Intranet access (restricted area only for members)') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Show website of this group to all internet users') %> 	<%= _('Yes') %>	<%= _('No') %>

       <%= _('Show my website to members') %> 	<%= _('Yes') %>	<%= _('Yes') %>

       <%= _('Include this group directory of groups') %> 	<%= _('Yes') %>	<%= _('No') %>

  <% end %>

  <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
    <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
  <% end %>
<% end %>

<%# = generate_form :info, @info, {...} %>


Restore correct element id.

Restore correct element id.

  <%= _("Search over

  {{number_of_requests}} requests and

  {{number_of_authorities}} authorities",
  :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %>

<form id="search_form" method="post" action="/search">

    <input id="query" type="text" size="30" name="query">
    <input type="submit" value="<%= _('Search') %>">

</form>

  <%= _("Search over

  {{number_of_requests}} requests and

  {{number_of_authorities}} authorities",
  :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %>

<form id="navigation_search_form" method="post" action="/search">

    <input id="query" type="text" size="30" name="query">
    <input type="submit" value="<%= _('Search') %>">

</form>


include full url in response not just path

<partial_html_sections>

<% if any_services_in_progress? %>
  <in_progress>
    <refresh_url><%= REXML::Text.new( url_for(params.merge( :'umlaut.request_id' => @user_request.id, :only_path => false ) )).to_s %></refresh_url>
    <refresh_url_path><%= REXML::Text.new( url_for(params.merge( :'umlaut.request_id' => @user_request.id, :only_path => true ) )).to_s %></refresh_url_path>
    <requested_wait_seconds>4</requested_wait_seconds>
    <services_in_progress>
      <% @user_request.services_in_progress.collect { |s| s.service_types_generated}.flatten.uniq.each do |type| %>
          <service name="<%= type.name %>" />
      <% end %>
    </services_in_progress>
  </in_progress>
<% end %>

<% @partial_html_sections.each do |section| %>
  <html_section id="<%= section[:div_id] %>">
    <included_services>
       <% section[:service_type_values].each do |type_name| %>
         <service name="<%= type_name %>" />
       <% end %>
    </included_services>
    <service_load_complete value="<%= section[:complete?]  %>" />
    <response_count value="<%= section[:response_count] %>" />
    <html_content>
      <%=
          html = render(:partial => section[:partial])
          # xml-escape our html, so we can safely embed it in our xml
          # even if it's not valid xhtml, and in one XML 'string'.
          # We abuse REXML for it's XML-escaping powers.
          REXML::Text.new( html ).to_s
       %>
    </html_content>
  </html_section>
<% end %>
</partial_html_sections>

<partial_html_sections>

<% if any_services_in_progress? %>
  <in_progress>
    <refresh_url_path><%= REXML::Text.new( url_for(params.merge( :'umlaut.request_id' => @user_request.id, :only_path => true ) )).to_s %></refresh_url_path>
    <requested_wait_seconds>4</requested_wait_seconds>
    <services_in_progress>
      <% @user_request.services_in_progress.collect { |s| s.service_types_generated}.flatten.uniq.each do |type| %>
          <service name="<%= type.name %>" />
      <% end %>
    </services_in_progress>
  </in_progress>
<% end %>

<% @partial_html_sections.each do |section| %>
  <html_section id="<%= section[:div_id] %>">
    <included_services>
       <% section[:service_type_values].each do |type_name| %>
         <service name="<%= type_name %>" />
       <% end %>
    </included_services>
    <service_load_complete value="<%= section[:complete?]  %>" />
    <response_count value="<%= section[:response_count] %>" />
    <html_content>
      <%=
          html = render(:partial => section[:partial])
          # xml-escape our html, so we can safely embed it in our xml
          # even if it's not valid xhtml, and in one XML 'string'.
          # We abuse REXML for it's XML-escaping powers.
          REXML::Text.new( html ).to_s
       %>
    </html_content>
  </html_section>
<% end %>
</partial_html_sections>


changed the label to deleted event

changed the label to deleted event

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Minutes", :property => nil} -%>

    Id
    Event
    Author
    Created on
    <%= "Published" if @current_user-%>

<% for minute in @minutes %>

    <%= minute.id -%>
    <%= link_to "Minutes for " + (minute.event ? minute.event.title : " [Deleted event]"), :controller => 'minutes', :action => 'show', :id => minute-%>
    <%= link_to minute.author.fullname, :controller => 'people', :action => 'show', :id => minute.author -%>
    <%= minute.created_at.strftime("%d %b, %Y")-%>
    <%= (minute.published == true ? 'Yes' : 'No') if @current_user-%>

    <%= link_to('Edit', :action => 'edit', :id => minute) if @current_user -%>
    <%= link_to('Delete', { :action => 'destroy', :id => minute }, :confirm => 'Are you sure?', :method => :post) if @current_user -%>

<%= truncate(minute.body, 100) -%>

<% end %>

<%= link_to 'Previous page', { :page => @minute_pages.current.previous } if @minute_pages.current.previous %>
<%= link_to 'Next page', { :page => @minute_pages.current.next } if @minute_pages.current.next %>

<%= link_to 'New minute', :action => 'new' if @current_user%>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => 'layouts/categories_nav' -%>
<%end-%>

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => "Minutes", :property => nil} -%>

    Id
    Event
    Author
    Created on
    <%= "Published" if @current_user-%>

<% for minute in @minutes %>

    <%= minute.id -%>
    <%= link_to "Minutes for " + minute.event.title, :controller => 'minutes', :action => 'show', :id => minute-%>
    <%= link_to minute.author.fullname, :controller => 'people', :action => 'show', :id => minute.author -%>
    <%= minute.created_at.strftime("%d %b, %Y")-%>
    <%= (minute.published == true ? 'Yes' : 'No') if @current_user-%>

    <%= link_to('Edit', :action => 'edit', :id => minute) if @current_user -%>
    <%= link_to('Delete', { :action => 'destroy', :id => minute }, :confirm => 'Are you sure?', :method => :post) if @current_user -%>

<%= truncate(minute.body, 100) -%>

<% end %>

<%= link_to 'Previous page', { :page => @minute_pages.current.previous } if @minute_pages.current.previous %>
<%= link_to 'Next page', { :page => @minute_pages.current.next } if @minute_pages.current.next %>

<%= link_to 'New minute', :action => 'new' if @current_user%>
<%end-%>
<%content_for("right") do-%>
<%= render :partial => 'layouts/categories_nav' -%>
<%end-%>


make booking title link to edit, now show; drop edit link in booking list

Listing bookings

    <%= sort_header 'title' %>
    <%= sort_header 'value_date' %>
    <%= sort_header 'debit_account_id' %>

    <%= sort_header 'credit_account_id' %>
    <%= sort_header 'amount' %>

<% for booking in @bookings %>

    <%= link_to h(booking.title), :action => 'edit', :id => booking %>
    <span id="time_ago_in_words_<%=booking.id %>" style="display: none"><%= link_to_function time_ago_in_words(booking.value_date), "toggle('time_ago_in_words_#{booking.id}', 'date_#{booking.id}')" unless booking.value_date.nil?%><span id="date_<%=booking.id %>"><%= link_to_function booking.value_date.strftime('%d.%m.%Y'), "toggle('date_#{booking.id}', 'time_ago_in_words_#{booking.id}')"  unless booking.value_date.nil? %>
    <%= link_to h(booking.debit_account.title), :controller => :accounts, :action => :show, :id => booking.debit_account unless booking.debit_account.nil? %>
    <%= image_tag 'arrow-right.png' %>
    <%= link_to h(booking.credit_account.title), :controller => :accounts, :action => :show, :id => booking.credit_account unless booking.credit_account.nil? %>
    <%=h number_to_currency(booking.rounded_amount, :unit => "CHF ")  %>

    <%= link_to 'Destroy', { :action => 'destroy', :id => booking }, :confirm => 'Are you sure?', :method => :post %>

<% end %>

<%= link_to 'Previous page', { :page => @booking_pages.current.previous } if @booking_pages.current.previous %>
<%= link_to 'Next page', { :page => @booking_pages.current.next } if @booking_pages.current.next %>

<%= link_to 'New booking', :action => 'new' %>

Listing bookings

    <%= sort_header 'title' %>
    <%= sort_header 'value_date' %>
    <%= sort_header 'debit_account_id' %>

    <%= sort_header 'credit_account_id' %>
    <%= sort_header 'amount' %>

<% for booking in @bookings %>

    <%= link_to h(booking.title), :action => 'show', :id => booking %>
    <span id="time_ago_in_words_<%=booking.id %>" style="display: none"><%= link_to_function time_ago_in_words(booking.value_date), "toggle('time_ago_in_words_#{booking.id}', 'date_#{booking.id}')" unless booking.value_date.nil?%><span id="date_<%=booking.id %>"><%= link_to_function booking.value_date.strftime('%d.%m.%Y'), "toggle('date_#{booking.id}', 'time_ago_in_words_#{booking.id}')"  unless booking.value_date.nil? %>
    <%= link_to h(booking.debit_account.title), :controller => :accounts, :action => :show, :id => booking.debit_account unless booking.debit_account.nil? %>
    <%= image_tag 'arrow-right.png' %>
    <%= link_to h(booking.credit_account.title), :controller => :accounts, :action => :show, :id => booking.credit_account unless booking.credit_account.nil? %>
    <%=h number_to_currency(booking.rounded_amount, :unit => "CHF ")  %>

    <%= link_to 'Edit', :action => 'edit', :id => booking %>
    <%= link_to 'Destroy', { :action => 'destroy', :id => booking }, :confirm => 'Are you sure?', :method => :post %>

<% end %>

<%= link_to 'Previous page', { :page => @booking_pages.current.previous } if @booking_pages.current.previous %>
<%= link_to 'Next page', { :page => @booking_pages.current.next } if @booking_pages.current.next %>

<%= link_to 'New booking', :action => 'new' %>


Changed sorting on racer results page.

Changed sorting on racer results page.

<% @page_title = "Results: #{@racer.name}" %>

<%= @racer.name %>

		Race
		Category
		Date

	<%- for result in @event_results.sort {|x, y| y.race.standings.event.date <=> x.race.standings.event.date } -%>
	<tr class="<%= cycle("even", "odd") %>">
	  <%= result.place %>
	  <%= link_to(result.race.standings.full_name, :controller => 'results', :action => 'event', :id => result.race.standings.event.id, :anchor => result.race.id) %>
	  <%= result.race.name %>
	  <%= result.race.standings.event.date.strftime("%D") %>

	<%- end -%>

<% for result in @competition_results.sort {|x, y| y.race.standings.event.date <=> x.race.standings.event.date } %>

		<%= result.place.to_i.ordinalize %> — <%= result.race.standings.full_name %>

		Race
		Category
		Date
		Points

	<% for score in result.scores.sort {|x, y| y.source_result.race.standings.event.date <=> x.source_result.race.standings.event.date } %>
	<tr class="<%= cycle("even", "odd") %>">
		<%= score.source_result.place %>

			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'event', :id => score.source_result.race.standings.event.id, :anchor => score.source_result.race.id) unless score.source_result.race.standings.event.is_a?(Competition) %>
			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'competition', :competition_id => score.source_result.race.standings.event.id, :racer_id => @racer.id) if score.source_result.race.standings.event.is_a?(Competition)%>
		<%= score.source_result.race.name %>
		<%= score.source_result.race.standings.event.date.strftime("%D") %>
		<%= number_with_precision(score.points, 1) %>

	<% end %>

		TOTAL<%= number_with_precision(result.points, 1) %>

<% end %>

<% @page_title = "Results: #{@racer.name}" %>

<%= @racer.name %>

		Race
		Category
		Date

	<%- for result in @event_results.sort_by {|result| result.race.standings.event.date } -%>
	<tr class="<%= cycle("even", "odd") %>">
	  <%= result.place %>
	  <%= link_to(result.race.standings.full_name, :controller => 'results', :action => 'event', :id => result.race.standings.event.id, :anchor => result.race.id) %>
	  <%= result.race.name %>
	  <%= result.race.standings.event.date.strftime("%D") %>

	<%- end -%>

<% for result in @competition_results %>

		<%= result.place.to_i.ordinalize %> — <%= result.race.standings.full_name %>

		Race
		Category
		Date
		Points

	<% for score in result.scores %>
	<tr class="<%= cycle("even", "odd") %>">
		<%= score.source_result.place %>

			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'event', :id => score.source_result.race.standings.event.id, :anchor => score.source_result.race.id) unless score.source_result.race.standings.event.is_a?(Competition) %>
			<%= link_to(score.source_result.race.standings.full_name, :controller => 'results', :action => 'competition', :competition_id => score.source_result.race.standings.event.id, :racer_id => @racer.id) if score.source_result.race.standings.event.is_a?(Competition)%>
		<%= score.source_result.race.name %>
		<%= score.source_result.race.standings.event.date.strftime("%D") %>
		<%= number_with_precision(score.points, 1) %>

	<% end %>

		TOTAL<%= number_with_precision(result.points, 1) %>

<% end %>


fixed the 'zooom' typo

fixed the 'zooom' typo

Viewing trace <%= @trace.name %>

<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :user_login => @trace.user.display_name %>">

filename:	<%= @trace.name %> (<%= link_to 'download', :controller => 'trace', :action => 'data', :id => @trace.id %>)

uploaded at:	<%= @trace.timestamp %>

points:	<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>

start coordinate:	<%= @trace.latitude %>, <%= @trace.longitude %> (<%=link_to 'map', :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 6 %>)

owner:	<%= link_to @trace.user.display_name, {:controller => 'trace', :action => 'view', :display_name => @trace.user.display_name, :id => nil} %>

description:	<%= @trace.description %>

tags:
    <% if @trace.tags %>
      <% @trace.tags.each do |tag| %>
        <%= link_to tag.tag, { :controller => 'trace', :action => 'list', :tag => tag.tag, :id => nil } %>
      <% end %>
    <% end %>

<% unless @trace.public? %>

  <%= start_form_tag :controller => 'trace', :action => 'make_public', :id => @trace.id%>
  <%= submit_tag 'Make this track public permanently' %>
  <%= end_form_tag %>
<% end %>

Viewing trace <%= @trace.name %>

<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :user_login => @trace.user.display_name %>">

filename:	<%= @trace.name %> (<%= link_to 'download', :controller => 'trace', :action => 'data', :id => @trace.id %>)

uploaded at:	<%= @trace.timestamp %>

points:	<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>

start coordinate:	<%= @trace.latitude %>, <%= @trace.longitude %> (<%=link_to 'map', :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zooom => 6 %>)

owner:	<%= link_to @trace.user.display_name, {:controller => 'trace', :action => 'view', :display_name => @trace.user.display_name, :id => nil} %>

description:	<%= @trace.description %>

tags:
    <% if @trace.tags %>
      <% @trace.tags.each do |tag| %>
        <%= link_to tag.tag, { :controller => 'trace', :action => 'list', :tag => tag.tag, :id => nil } %>
      <% end %>
    <% end %>

<% unless @trace.public? %>

  <%= start_form_tag :controller => 'trace', :action => 'make_public', :id => @trace.id%>
  <%= submit_tag 'Make this track public permanently' %>
  <%= end_form_tag %>
<% end %>


Simplify template slightly.

Simplify template slightly.

<%=@title%>

<% if @search_results.empty? %>

No requests made yet.

<% else %>
    <% for search_result in @search_results %>
        <% if search_result.class.to_s == 'InfoRequestEvent' %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => search_result, :info_request => search_result.info_request } %>
        <% else %>

Unexpected search result type <%=search_result.class.to_s%>

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

<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @search_hits) %>

<%=@title%>

<% if @search_results.empty? %>

No requests made yet.

<% else %>
    <% for search_result in @search_results %>
        <% if search_result.class.to_s == 'PublicBody' %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => search_result } %>
        <% elsif search_result.class.to_s == 'User' %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => search_result } %>
        <% elsif search_result.class.to_s == 'InfoRequestEvent' %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => search_result, :info_request => search_result.info_request } %>
        <% else %>

Unknown search result type <%=search_result.class.to_s%>

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

<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @search_hits) %>


Add wording to rememeber me box

Add wording to rememeber me box

<% form_tag({:action => "signin"}, {:id => "signin_form"}) do %>
    <%= foi_error_messages_for :user_signin %>

If you've used WhatDoTheyKnow before

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

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

    <%= link_to "Forgotten your password?", signchange_url + "?pretoken=" + h(params[:token]) %>

    <%= check_box_tag 'remember_me', "1" %>
    Remember me (keeps you signed in longer;
    do not use on a public computer)

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

<% end %>

<% form_tag({:action => "signin"}, {:id => "signin_form"}) do %>
    <%= foi_error_messages_for :user_signin %>

If you've used WhatDoTheyKnow before

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

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

    <%= link_to "Forgotten your password?", signchange_url + "?pretoken=" + h(params[:token]) %>

    <%= check_box_tag 'remember_me', "1" %>
    Remember me

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

<% end %>


* app/views/page/_form.rhtml: Title shouldn't be editable.

git-svn-id: ce004a3be656e491f060c65e2aab8dd2a5477e8b@39 f7b17897-190c-4688-811d-8cf59fb8cab0

<%= error_messages_for 'page' %>

    <% unless logged_in? -%>

      You are not logged in.  That's ok - you can
      edit a page anonymously - but we'd like to encourage you to sign up or log in.

    <% end %>

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

     Title: <%= @page.title -%>

     Contents

      <%= text_area 'page', 'content', 'cols' => 80, 'rows' => 30 %>

    Describe your changes

      <%= text_field 'revision', 'comment', :size => 70 %>

<%= error_messages_for 'page' %>

    <% unless logged_in? -%>

      You are not logged in.  That's ok - you can
      edit a page anonymously - but we'd like to encourage you to sign up or log in.

    <% end %>

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

     Title

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

     Contents

      <%= text_area 'page', 'content', 'cols' => 80, 'rows' => 30 %>

    Describe your changes

      <%= text_field 'revision', 'comment', :size => 70 %>


Make the slippy map work properly on IE7 at last!

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

<% if params['mlon'] and params['mlat'] %>
<% marker = true %>
<% mlon = params['mlon'] %>
<% mlat = params['mlat'] %>
<% lon =  params['mlon'] %>
<% lat =  params['mlat']  %>
<% zoom =  params['zoom'] || '12' %>
<% elsif @user and params['lon'].nil? and params['lat'].nil? %>
<% lon =  @user.home_lon %>
<% lat =  @user.home_lat %>
<% zoom = '10' %>
<%else%>
<% lon =  params['lon'] || '-0.1' %>
<% lat =  params['lat'] || '51.5' %>
<% zoom =  params['zoom'] || '4' %>
<% end %>

<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
<%= javascript_include_tag 'map.js' %>

<% unless @user %>
<script src="http://www.mappam.com/javascripts/mappam.js" type="text/javascript"></script>
<% end %>

<script type="text/javascript">
  <!--
  var ie = navigator.appName.indexOf("Microsoft Internet Explorer") != -1;
  var map;

  function init(){
    var centre = lonLatToMercator(new OpenLayers.LonLat(<%= lon %>, <%= lat %>));
    var zoom = <%= zoom %>;

    <% if params['scale'] and params['scale'].length > 0 then %>
    zoom = scaleToZoom(<%= params['scale'].to_f() %>);
    <% end %>

    var map = createMap("map", centre, zoom);

    <% if marker %>
    addMarkerToMap(lonLatToMercator(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>)));
    <% end %>

    map.events.register("moveend", map, updateLocation);
    updateLocation();

    <% unless @user %>
    if ( window.location.hostname == "www.openstreetmap.org" ) {
      mappam.register( map, '10011756636067178496', '1');
    } else if( window.location.hostname == "openstreetmap.org" ) {
      mappam.register( map, '6738410720121976832', '1');
    }
    <% end %>

    document.getElementById('map_OpenLayers_ViewPort').style.position = 'absolute';
    if ( ie ) {
      handleResize();
    }
  }

  function updateLocation() {
    var lonlat = mercatorToLonLat(map.getCenter());
    var zoom = map.getZoom();

    updatelinks(lonlat.lon, lonlat.lat, zoom);
  }

  function getStyle( el, property ) {
    var style;
    if( el.currentStyle ) {
        style = el.currentStyle[property];
    } else if( window.getComputedStyle ) {
        style = document.defaultView.getComputedStyle(el,null).getPropertyValue(property);
    } else {
        style = el.style[property];
    }
    return style;
  }

  function handleResize() {
    var el = document.getElementById( 'map' );
    var left = getStyle( el, 'left' );
    var top = getStyle( el, 'top' );
    var bottom = getStyle( el, 'bottom' );
    var right = getStyle( el, 'right' );
    var width = el.old_width;
    var height;
    if( ! width ) {
        width = getStyle( el, 'width' );
    }
    var height = el.old_height;
    if( ! height ) {
        height = getStyle( el, 'height' );
    }
    var pwidth, pheight;
    if( el.offsetParent.nodeName == 'BODY' || el.offsetParent.nodeName == 'HTML' ) {
      if( typeof( window.innerWidth ) == 'number' ) {
          pwidth = window.innerWidth;
          pheight = window.innerHeight;
      } else if( document.documentElement &&
          ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
          pwidth = document.documentElement.clientWidth;
          pheight = document.documentElement.clientHeight;
      } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
          pwidth = document.body.clientWidth;
          pheight = document.body.clientHeight;
      }
    } else {
      pwidth = el.offsetParent.offsetWidth;
      pheight = el.offsetParent.offsetHeight;
    }
    if( left != 'auto' && right != 'auto' && width == 'auto' ) {
      el.old_width = width;
      var new_width = (pwidth - el.offsetLeft - parseInt( right ) );
      el.style.width = new_width + 'px';
    }
    if( top != 'auto' && bottom != 'auto' && height == 'auto' ) {
      el.old_height = height;
      var new_height = (pheight - el.offsetTop - parseInt( bottom ) );
      el.style.height = new_height + 'px';
    }
    map.updateSize();
    el.style.display = 'none';
    setTimeout( function() { el.style.display = ''; }, 200 );
  }

  if ( ie ) {
    window.onresize = handleResize;
  }

  window.onload = init;
// -->
</script>

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

<% if params['mlon'] and params['mlat'] %>
<% marker = true %>
<% mlon = params['mlon'] %>
<% mlat = params['mlat'] %>
<% lon =  params['mlon'] %>
<% lat =  params['mlat']  %>
<% zoom =  params['zoom'] || '12' %>
<% elsif @user and params['lon'].nil? and params['lat'].nil? %>
<% lon =  @user.home_lon %>
<% lat =  @user.home_lat %>
<% zoom = '10' %>
<%else%>
<% lon =  params['lon'] || '-0.1' %>
<% lat =  params['lat'] || '51.5' %>
<% zoom =  params['zoom'] || '4' %>
<% end %>

<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
<%= javascript_include_tag 'map.js' %>

<% unless @user %>
<script src="http://www.mappam.com/javascripts/mappam.js" type="text/javascript"></script>
<% end %>

<script type="text/javascript">
  <!--
  var ie6 = ! ( window.addEventListener || window.XMLHttpRequest );
  var map;

  function init(){
    var centre = lonLatToMercator(new OpenLayers.LonLat(<%= lon %>, <%= lat %>));
    var zoom = <%= zoom %>;

    <% if params['scale'] and params['scale'].length > 0 then %>
    zoom = scaleToZoom(<%= params['scale'].to_f() %>);
    <% end %>

    var map = createMap("map", centre, zoom);

    <% if marker %>
    addMarkerToMap(lonLatToMercator(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>)));
    <% end %>

    map.events.register("moveend", map, updateLocation);
    updateLocation();

    <% unless @user %>
    if ( window.location.hostname == "www.openstreetmap.org" ) {
      mappam.register( map, '10011756636067178496', '1');
    } else if( window.location.hostname == "openstreetmap.org" ) {
      mappam.register( map, '6738410720121976832', '1');
    }
    <% end %>

    document.getElementById('map_OpenLayers_ViewPort').style.position = 'absolute';
    if ( ie6 ) {
      handleResize();
    }
  }

  function updateLocation() {
    var lonlat = mercatorToLonLat(map.getCenter());
    var zoom = map.getZoom();

    updatelinks(lonlat.lon, lonlat.lat, zoom);
  }

  function getStyle( el, property ) {
    var style;
    if( el.currentStyle ) {
        style = el.currentStyle[property];
    } else if( window.getComputedStyle ) {
        style = document.defaultView.getComputedStyle(el,null).getPropertyValue(property);
    } else {
        style = el.style[property];
    }
    return style;
  }

  function handleResize() {
    var el = document.getElementById( 'map' );
    var left = getStyle( el, 'left' );
    var top = getStyle( el, 'top' );
    var bottom = getStyle( el, 'bottom' );
    var right = getStyle( el, 'right' );
    var width = el.old_width;
    var height;
    if( ! width ) {
        width = getStyle( el, 'width' );
    }
    var height = el.old_height;
    if( ! height ) {
        height = getStyle( el, 'height' );
    }
    var pwidth, pheight;
    if( el.offsetParent.nodeName == 'BODY' || el.offsetParent.nodeName == 'HTML' ) {
      if( typeof( window.innerWidth ) == 'number' ) {
          pwidth = window.innerWidth;
          pheight = window.innerHeight;
      } else if( document.documentElement &&
          ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
          pwidth = document.documentElement.clientWidth;
          pheight = document.documentElement.clientHeight;
      } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
          pwidth = document.body.clientWidth;
          pheight = document.body.clientHeight;
      }
    } else {
      pwidth = el.offsetParent.offsetWidth;
      pheight = el.offsetParent.offsetHeight;
    }
    if( left != 'auto' && right != 'auto' && width == 'auto' ) {
      el.old_width = width;
      var new_width = (pwidth - el.offsetLeft - parseInt( right ) );
      el.style.width = new_width + 'px';
    }
    if( top != 'auto' && bottom != 'auto' && height == 'auto' ) {
      el.old_height = height;
      var new_height = (pheight - el.offsetTop - parseInt( bottom ) );
      el.style.height = new_height + 'px';
    }
    map.updateSize();
    el.style.display = 'none';
    setTimeout( function() {
        el.style.display = '';
        }, 200 );
  }

  if ( ie6 ) {
    window.onresize = handleResize;
  }

  window.onload = init;
// -->
</script>


signup -> sign up

signup -> sign up

	  Wiki
	  Forum
	  Sign up!
	  Explore
	  Home

	  Wiki
	  Forum
	  Signup!
	  Explore
	  Home


WDTK-88 Add the world Australian

WDTK-88 Add the world Australian

  Your Right to Know

<%= link_to "Everyone", help_requesting_path(:anchor => "who") %> has the right to access information held by Australian public bodies. By law, they have to respond. <a href="<%= help_about_url %>">Find out more about Freedom of Information.

  Your Right to Know

<%= link_to "Everyone", help_requesting_path(:anchor => "who") %> has the right to access information held by public bodies. By law, they have to respond. <a href="<%= help_about_url %>">Find out more about Freedom of Information.


WDTK-79 Add simpler answer, basically 'yes'. Also update rest of section

<% @title = "Your privacy" %>

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

<%= @title %> #

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
@<%= MySociety::Config.get('INCOMING_EMAIL_DOMAIN', 'localhost') %> 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 <%= site_name %> 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 and my request appear publicly on the site? #

We publish your request on the Internet so that anybody can read it and
make use of the information that you have found. We do not normally delete
requests (more details).

Your name is tangled up with your request, so has to be published as well.
It is only fair, as we're going to publish the name of the civil servant who
writes the response to your request.  Using your real name also helps people
get in touch with you to assist you with your research or to campaign with you.

By law, you must use your real name for the request to be a valid Freedom of
Information request. See the next question for alternatives if you do not want
to publish your full name.

Can I make an FOI request using a pseudonym? #

Yes, you can use a pseudonym. Be careful though. It might make it impossible to follow up with the Information Commisioner if you think a decision needs to be reviewed.

 The Information Commissioner FOI guidelines say that "the FOI Act does not require an applicant to disclose their identity" but that the "agency or minister should consider whether collection of information about the applicant's identity is required to assess the request".

Please do not try to impersonate someone else.

They've asked for my postal address! #

If a public authority asks you for your full, physical address, reply to them directing them to the Information Commissioner guidance on Form of Access

8.102 Subject to limited exceptions, an applicant who requests access to a document in a particular form has a right to be given access in that form (s 20(2)).
8.104 As agencies and ministers obtain greater access to new technology it is expected that they will make reasonable efforts to facilitate access to documents that have not previously been accessible in a particular form. Wherever possible access to documents by means that do not require physical inspection should be preferred.

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 one particular case
embarrassed the organisation 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, mark your request as "They are going to reply by post", and it will
give you an email address to use for that purpose.

Can you delete my requests, or alter my name?  #

<%= site_name %> is a permanent, public archive of Freedom of
Information requests. Even though you may not find the response to
a request useful any more, it may be of interest to others. For this
reason, we will not delete requests.

Under exceptional circumstances we may remove or change your name
on the website, see the next question.
Similarly, we may also remove other personal information.

If you're worried about this before you make your request,
see the section on pseudonyms.

Can you take down personal information about me? #

If you see any personal information about you on the site which you'd like
us to remove or hide, then please let us know.
Specify exactly what information you believe to be problematic and why, and
where it appears on the site.

If it is sensitive personal information that has been accidentally
posted, then we will usually remove it. Normally we will only consider
requests to remove personal information which come from the individual
concerned, but for sensitive information we would appreciate anyone
pointing out anything they see.

We consider that there is a strong public interest in
retaining the names of officers or servants of public authorities. We will only
remove such names in exceptional circumstances, such as where the disclosure of
a name and position of employment would substantially risk an individual's
safety. If you are such an official and you wish to have your name removed for
such an urgent reason, you must supply us with a request to do so from your
line manager. This request must demonstrate that a risk has been perceived
which outweighs the public interest, and must demonstrate that efforts have
been made to conceal the name on the organisation's own website.

For all other requests we apply a public interest test to decide
whether information should be removed. We cannot easily edit many types of attachments (such
as PDFs, or Microsoft Word or Excel files), so we will usually ask
that authorities resend these with the personal information removed.

Learn more from the help for FOI officers -->

<% @title = "Your privacy" %>

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

<%= @title %> #

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
@<%= MySociety::Config.get('INCOMING_EMAIL_DOMAIN', 'localhost') %> 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 <%= site_name %> 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 and my request appear publicly on the site? #

We publish your request on the Internet so that anybody can read it and
make use of the information that you have found. We do not normally delete
requests (more details).

Your name is tangled up with your request, so has to be published as well.
It is only fair, as we're going to publish the name of the civil servant who
writes the response to your request.  Using your real name also helps people
get in touch with you to assist you with your research or to campaign with you.

By law, you must use your real name for the request to be a valid Freedom of
Information request. See the next question for alternatives if you do not want
to publish your full name.

Can I make an FOI request using a pseudonym? #

 The Information Commissioner says

3.28 A person who requests documents that do not contain their personal information may wish to do so without disclosing their identity or by use of a pseudonym. In such cases the agency or minister should consider whether collection of information about the applicant's identity is required to assess the request.

Be careful though, even if the public authority follows this guidance, the
pseudonym will probably make it impossible for you to complain to the
Information Commissioner later about the handling of your request.

There are several good alternatives to using a pseudonym.

Use a different form of your name. The guidance suggests
that "Mr Arthur Thomas Roberts" can make a valid request as "Arthur Roberts",
"A. T. Roberts", or "Mr Roberts".

Women may use their maiden name.

In most cases, you may use any name by which you are "widely known and/or
is regularly used".

Use the name of an organisation, the name of a company, the trading name of
a company, or the trading name of a sole trader.

Ask someone else to make the request on your behalf.

You may, if you are really stuck, ask us to make the request on
your behalf. Please contact us with
a good reason why you cannot make the request yourself and cannot
ask a friend to. We don't have the resources to do this for everyone.

Please do not try to impersonate someone else.

They've asked for my postal address! #

If a public authority asks you for your full, physical address, reply to them directing them to the Information Commissioner guidance on Form of Access

8.102 Subject to limited exceptions, an applicant who requests access to a document in a particular form has a right to be given access in that form (s 20(2)).
8.104 As agencies and ministers obtain greater access to new technology it is expected that they will make reasonable efforts to facilitate access to documents that have not previously been accessible in a particular form. Wherever possible access to documents by means that do not require physical inspection should be preferred.

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 one particular case
embarrassed the organisation 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, mark your request as "They are going to reply by post", and it will
give you an email address to use for that purpose.

Can you delete my requests, or alter my name?  #

<%= site_name %> is a permanent, public archive of Freedom of
Information requests. Even though you may not find the response to
a request useful any more, it may be of interest to others. For this
reason, we will not delete requests.

Under exceptional circumstances we may remove or change your name
on the website, see the next question.
Similarly, we may also remove other personal information.

If you're worried about this before you make your request,
see the section on pseudonyms.

Can you take down personal information about me? #

If you see any personal information about you on the site which you'd like
us to remove or hide, then please let us know.
Specify exactly what information you believe to be problematic and why, and
where it appears on the site.

If it is sensitive personal information that has been accidentally
posted, then we will usually remove it. Normally we will only consider
requests to remove personal information which come from the individual
concerned, but for sensitive information we would appreciate anyone
pointing out anything they see.

We consider that there is a strong public interest in
retaining the names of officers or servants of public authorities. We will only
remove such names in exceptional circumstances, such as where the disclosure of
a name and position of employment would substantially risk an individual's
safety. If you are such an official and you wish to have your name removed for
such an urgent reason, you must supply us with a request to do so from your
line manager. This request must demonstrate that a risk has been perceived
which outweighs the public interest, and must demonstrate that efforts have
been made to conceal the name on the organisation's own website.

For all other requests we apply a public interest test to decide
whether information should be removed. We cannot easily edit many types of attachments (such
as PDFs, or Microsoft Word or Excel files), so we will usually ask
that authorities resend these with the personal information removed.

Learn more from the help for FOI officers -->


Update lib/views/help/about.rhtml

Update lib/views/help/about.rhtml

added reference to "limited company"

<% @title = "About" %>

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

Introduction to WhatDoTheyKnow #

What is WhatDoTheyKnow for? #

To help you find out inside information about the UK Government and UK public bodies.
The site helps people access information about central government, local government,
Parliament, the NHS, the armed forces, state funded schools and universities and
other public authorities.

You can also use the site to find out information that regulators hold about businesses,
charities and other organisations.

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 received 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 health care 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.
Some people also use the site for research.

Why would the public authority bother to reply? #

Under Freedom of Information (FOI) law, they have to respond. The response
will either contain the information you want, or give a valid legal reason why
it has not been provided.

Does useful information get released through the site? #

Yes. Thousands of documents have been released through the site.
See also: 366
Interesting things that we know because of WhatDoTheyKnow.

How many people use the site? #

We have over 30,000 registered users and around 15% to 20% of requests to UK Central Government are made through the site.

Who makes WhatDoTheyKnow? #

WhatDoTheyKnow is run and maintained by
UK Citizens Online
Democracy (UKCOD) as part of its
mySociety project.
UKCOD is a registered charity in England and Wales (no.
1076346).
UKCOD is also a limited company registered in England and Wales (no.
03277032)
and a registered data controller (no.
Z9602302).
The address of UKCOD's registered office is 483 Green Lanes, London, N13 4BS.
UKCOD is not a public body.

The site was initially
funded by the JRSST
Charitable Trust.

If you like what we're doing, then you can
make a donation.

How can I keep up with news about WhatDoTheyKnow?#

We have a blog and a twitter feed.

Next, read about making requests -->

<% @title = "About" %>

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

Introduction to WhatDoTheyKnow #

What is WhatDoTheyKnow for? #

To help you find out inside information about the UK Government and UK public bodies.
The site helps people access information about central government, local government,
Parliament, the NHS, the armed forces, state funded schools and universities and
other public authorities.

You can also use the site to find out information that regulators hold about businesses,
charities and other organisations.

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 received 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 health care 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.
Some people also use the site for research.

Why would the public authority bother to reply? #

Under Freedom of Information (FOI) law, they have to respond. The response
will either contain the information you want, or give a valid legal reason why
it has not been provided.

Does useful information get released through the site? #

Yes. Thousands of documents have been released through the site.
See also: 366
Interesting things that we know because of WhatDoTheyKnow.

How many people use the site? #

We have over 30,000 registered users and around 15% to 20% of requests to UK Central Government are made through the site.

Who makes WhatDoTheyKnow? #

WhatDoTheyKnow is run and maintained by
UK Citizens Online
Democracy (UKCOD) as part of its
mySociety project.
UKCOD is a registered charity in England and Wales (no.
1076346).
UKCOD is also registered company (no.
03277032)
and a registered data controller (no.
Z9602302).
The address of UKCOD's registered office is 483 Green Lanes, London, N13 4BS.
UKCOD is not a public body.

The site was initially
funded by the JRSST
Charitable Trust.

If you like what we're doing, then you can
make a donation.

How can I keep up with news about WhatDoTheyKnow?#

We have a blog and a twitter feed.

Next, read about making requests -->


Give header lines in diff header the correct CSS class

<% commit = header %>

    SHA1:
    <%=h commit.sha1 %>

    Author:
    <%=h commit.author %>

    Committer:
    <%=h commit.committer %>

    Log message:

<%=h commit.log_message %>


[Mezuro] Adding repositories on show_project

<% @project = @page.project %>
<% unless @page.errors[:base].nil? %>
  <% if @page.errors[:base] =~ /There is no project named/ %>

Warning:

This project doesn't exist on the Web Service. Do you want to <%= link_to 'delete', :action => 'destroy', :controller => 'cms', :profile => @page.profile.identifier, :id => @page.id %> or <%= link_to 'save it again', :action => 'edit', :controller => 'cms', :profile => @page.profile.identifier, :id => @page.id %>?

  <% else %>
    <%= @page.errors[:base] %>
  <% end %>
<% else %>

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

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

  <%= _('Repositories') %>
  <% @page.repositories.each do |repository| %>
    <%  repository.name %>
  <% end %>

<% end %>

<% @project = @page.project %>
<% unless @page.errors[:base].nil? %>
  <% if @page.errors[:base] =~ /There is no project named/ %>

Warning:

This project doesn't exist on the Web Service. Do you want to <%= link_to 'delete', :action => 'destroy', :controller => 'cms', :profile => @page.profile.identifier, :id => @page.id %> or <%= link_to 'save it again', :action => 'edit', :controller => 'cms', :profile => @page.profile.identifier, :id => @page.id %>?

  <% else %>
    <%= @page.errors[:base] %>
  <% end %>
<% else %>

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

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

<% end %>


Replace front page message with notice about usage for Hasadna volunteers only

  הגשת בקשות פתוחה למתנדבי הסדנא לידע ציבורי בלבד

  על פי חוק, הפטור מהאגרה ניתן רק לעמותות ופעיליהן, ולכן לצערינו הגשת בקשות דרך אתר זה ניתנת אך ורק למתנדבי הסדנא.
  ניתן להגיש בקשות גם באתר משרד המשפטים. האגרה היא בסך הכל 20 ש"ח.

  רוצים להתנדב בסדנא? קראו כאן ומלאו את השאלון.

  Your Right to Know

Every citizen has the right to access information held by public authorities. By law, they have to respond. <a href="<%= help_about_path %>">Find out more about freedom of information.


Fix wrong HTML in footer

Fix wrong HTML in footer

tuderechoasaber.es

<%= link_to _("Contacto"), help_contact_path %>

<%= link_to _("Prensa"), help_press_path %>

<%= link_to _("Quiénes somos"), help_about_path %>

<%= link_to _("¿Cómo puedes colaborar?"), help_help_out_path %>

<%= link_to _("Patrocinadores"), help_about_path(:anchor => 'supporters') %>

<%= link_to _("Agradecimientos"), help_credits_path %>

<%= link_to _("Condiciones de uso"), help_terms_of_use_path %>

<%= link_to _("Política de privacidad"), help_privacy_policy_path %>

<%= _("Ayuda") %>

<%= link_to _("Guía para realizar solicitudes"), help_requesting_path %>

<%= link_to _("Tu privacidad"), help_privacy_path %>

<%= link_to _("Información para instituciones"), help_officers_path %>

<%= link_to _("Basado en Alaveteli"), help_alaveteli_path %>

<%= link_to _("API"), help_api_path %>

            <%= _("Contenido bajo licencia CC BY SA 3.0
Creative Commons Attribution Share-Alike") %>

<%= _("Un proyecto de") %>

<%= _("Con la ayuda de") %>


Make links to user edits work again.

Make links to user edits work again.

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

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

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

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

<% if @this_user != nil %>

<%= t 'user.view.mapper since' %><%= l @this_user.creation_time %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %>

<% end %>

<%= t 'user.view.user image heading' %>

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

<% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.upload an image' %>

  <%= form_tag({:action=>'upload_image'}, :multipart => true)%>
    <%= file_column_field 'user', 'image' %>
    <%= submit_tag t('user.view.add image') %>
  </form>
<% end %>

<%= t 'user.view.description' %>

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

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

<%= t 'user.view.user location' %>

  <%= t 'user.view.no home location' %>
  <% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name) %>
  <% end %>
<% else %>

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

<%= t 'user.view.your friends' %>

    <% if @this_user.friends.empty? %>
      <%= t 'user.view.no friends' %>
    <% 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 %><%= t 'user.view.km away', :distance => @this_user.distance(@friend).round %><% end %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @friend.id %>)

      <%end%>

    <%end%>

  <%end%>

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

<%= t 'user.view.nearby users' %>

    <% if @this_user.nearby.empty? %>
      <%= t 'user.view.no nearby users' %>
    <% 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 %>
      <%= t 'user.view.km away', :distance => @this_user.distance(nearby).round %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => nearby.id %>)

      <% end %>

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

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

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

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

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

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

<% if @this_user != nil %>

<%= t 'user.view.mapper since' %><%= l @this_user.creation_time %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %>

<% end %>

<%= t 'user.view.user image heading' %>

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

<% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.upload an image' %>

  <%= form_tag({:action=>'upload_image'}, :multipart => true)%>
    <%= file_column_field 'user', 'image' %>
    <%= submit_tag t('user.view.add image') %>
  </form>
<% end %>

<%= t 'user.view.description' %>

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

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

<%= t 'user.view.user location' %>

  <%= t 'user.view.no home location' %>
  <% if @user and @this_user.id == @user.id %>
  <%= t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name) %>
  <% end %>
<% else %>

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

<%= t 'user.view.your friends' %>

    <% if @this_user.friends.empty? %>
      <%= t 'user.view.no friends' %>
    <% 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 %><%= t 'user.view.km away', :distance => @this_user.distance(@friend).round %><% end %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @friend.id %>)

      <%end%>

    <%end%>

  <%end%>

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

<%= t 'user.view.nearby users' %>

    <% if @this_user.nearby.empty? %>
      <%= t 'user.view.no nearby users' %>
    <% 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 %>
      <%= t 'user.view.km away', :distance => @this_user.distance(nearby).round %>
      (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => nearby.id %>)

      <% end %>

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

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