Change menu rights

Change menu rights

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

  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="robots" content="all">
  <title>Tools - BAM</title>
  <link rel="stylesheet" type="text/css" href="/stylesheets/styles.css" />
  <link rel="stylesheet" type="text/css" href="/stylesheets/tools.css" />
  <link rel="stylesheet" type="text/css" href="/stylesheets/chat.css" />
	<link href='http://fonts.googleapis.com/css?family=Stardos+Stencil&v1' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=Zeyada&v1' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Kameron&v1' rel='stylesheet' type='text/css'>
  <%= javascript_include_tag :defaults %>

  <link rel="Shortcut Icon" type="image/x-icon" href="/images/favicon.ico" />

<%
  cu = current_user
  cu.last_view = Time.now
  cu.save
%>

<%#= render :file => 'chat/main' %>

  <%= render :file => 'layouts/context_select' %>

Tools

    <% b = get_bandeau; if b %>

<%= b.text %>

<%= b.person.name %>

    <% end %>

      <%= link_to('Add something', {:controller=>'bandeaus', :action=>'new'}) %> |
      <%= link_to('See all', {:controller=>'bandeaus', :action=>'index'}) %>

<%= link_to('SDP', {:controller=>'tools', :action=>'sdp_index'}, {:class=>menu_style('tools','sdp_index')}) %>

Index

<%= link_to('SDP index',        {:controller=>'tools', :action=>'sdp_index'}) %>

<%= link_to('SDP index by specific type',        {:controller=>'tools', :action=>'sdp_index_by_type'}) %>

      <% if current_user.has_role?('Admin') %>

<%= link_to('Gains conso',     {:controller=>'tools', :action=>'sdp_conso'}) %>

      <% end %>

Imports

<%= link_to('SDP import',       {:controller=>'tools', :action=>'sdp_import'}) %>

<%= link_to('RMT to SDP task import',          {:controller=>'tools', :action=>'sdp_add'}) %>

<%= link_to('Monthly tasks SDP import', {:controller=>'tools', :action=>'import_monthly_tasks'}) %>

Checks

<%= link_to('CHECK Loads',{:controller=>'tools', :action=>'load_errors'}) %>

<%= link_to('CHECK RMT <=> SDP',{:controller=>'tools', :action=>'sdp_yes_check'}) %>

<%= link_to('CHECK RMT ended',  {:controller=>'tools', :action=>'requests_ended_check'}) %>

<%= link_to('CHECK RMT should be ended',  {:controller=>'tools', :action=>'requests_should_be_ended_check'}) %>

<%= link_to('CHECK wrong Remaining Workload', {:controller=>'tools', :action=>'check_sdp_remaining_workload'}) %>

<%= link_to('CHECK QS/Spiders Counters', {:controller=>'tools', :action=>'show_counter_history'}) %>

<%= link_to('CHECK QS/Spiders Counters without RMT', {:controller=>'tools', :action=>'show_counter_history_without_rmt'}) %>

<%= link_to('WS Reporting', {:controller=>'workstreams', :action=>'index'}, {:class=>menu_style('workstreams','*')}) %>

WS Reporting

<%= link_to('Reporting',        {:controller=>'workstreams', :action=>'index'}) %>

<%= link_to('Manage',        {:controller=>'workstreams', :action=>'manage'}) %>

<%= link_to('Requests', {:controller=>'welcome', :action=>'index'}, {:class=>menu_style('welcome','index')}) %>

<%= link_to('People', {:controller=>'people', :action=>'index'}, {:class=>menu_style('people','*')}) %>

<%= link_to('Reminders', {:controller=>'welcome', :action=>'reminders'}, {:class=>menu_style('welcome','reminders')}) %>

<%= link_to('Bandeaux', {:controller=>'bandeaus', :action=>'index'}, {:class=>menu_style('bandeaus','*')}) %>

    <% if cu.has_role?('Admin') %>

<%= link_to('Import', {:controller=>'welcome', :action=>'update'}, {:class=>menu_style('welcome','update')}) %>

    <% end %>

      <%= link_to('Tools', "", {:class=>menu_style('tools','*'), :onclick=>"return false;"}) %>

Management

<%= link_to('Requirements',   {:controller=>'requirements',           :action=>'index'})  %>

<%= link_to('Checklists',     {:controller=>'checklist_templates',    :action=>'index'})  %>

<%= link_to('Risks',          {:controller=>'risks',                  :action=>'list'})   %>

<%= link_to('Generic Risks',  {:controller=>'generic_risk_questions', :action=>'index'})  %>

<%= link_to('Capi',           {:controller=>'notes',                  :action=>'list'})   %>

<%= link_to('Capi Axes',      {:controller=>'capi_axes',              :action=>'index'})  %>

<%= link_to('Suite Tags',     {:controller=>'suite_tags',             :action=>'index'})  %>

        <% if cu.has_role?('Admin') %>

<%= link_to('Monthly tasks',     {:controller=>'monthly_tasks',          :action=>'index'})  %>

<%= link_to('Monthly task Types',     {:controller=>'monthly_task_types',          :action=>'index'})  %>

<%= link_to('Stream Review Types', {:controller=>'tools', :action=>'show_stream_review_type'}) %>

        <% end %>

Stats

<%= link_to('Requests by year', {:controller=>'tools', :action=>'requests_by_year'}) %>

<%= link_to('Projects length',  {:controller=>'tools', :action=>'projects_length'}) %>

<%= link_to('Check dates RMT <=> BAM', {:controller=>'tools', :action=>'rmt_date_check'}) %>

<%= link_to('QR per DWS',     {:controller=>'tools', :action=>'qr_per_ws'}) %>

<%= link_to('Last projects',  {:controller=>'tools', :action=>'last_projects'}) %>

<%= link_to('Projects status',{:controller=>'tools', :action=>'project_list'}) %>

<%= link_to('Next milestones',{:controller=>'tools', :action=>'next_milestones'}) %>

<%= link_to('Check RMT Milestone Dates <=> po',{:controller=>'tools', :action=>'check_difference_po_milestone_date'}) %>

Old stuff

<%= link_to('Workload Gantt', {:controller=>'welcome', :action=>'workload_schedule'}) %>

<%= link_to('Stats open projects', {:controller=>'tools', :action=>'stats_open_projects'}) %>

<%= link_to('Test email',     {:controller=>'tools', :action=>'test_email'}) %>

		<% if (cu.has_role?('Admin') or (cu.is_cpdp==1) or cu.has_role?('ServiceLineResp'))  %>

<%= link_to('Spider', "", {:class=>menu_style('workstreams','*')}) %>

KPI

<%= link_to('KPI by PM Types',        {:controller=>'spider_kpis', :action=>'kpi_charts_by_pm_types', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('KPI by axes',        {:controller=>'spider_kpis', :action=>'kpi_charts_by_axes', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('Cumul KPI by PM Types',        {:controller=>'spider_kpis', :action=>'kpi_cumul_charts_by_pm_types', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('Cumul KPI by axes',        {:controller=>'spider_kpis', :action=>'kpi_cumul_charts_by_axes', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('Configure export excel columns', {:controller=>'pm_type_axe_excels', :action=>'index'}) %>

Spider administration

<%= link_to('Import',       						  {:controller=>'spiders', :action=>'project_spider_import'}) %>

<%= link_to('Manage Axes',        				{:controller=>'pm_type_axes', :action=>'index'}) %>

<%= link_to('Manage Questions',        		{:controller=>'lifecycle_questions', :action=>'index'}) %>

<%= link_to('Manage Questions References',{:controller=>'question_references', :action=>'index'}) %>

		<% end %>

<%= link_to('Lessons Learnt', {:controller=>'lesson_collects', :action=>'index'}, {:class=>menu_style('welcome','update')}) %>

    <% if cu.has_role?('Super') %>

<%= link_to('Logs', {:controller=>'logs'}, {:class=>'menu'}) %>

    <% end %>
    <% new_requests = Request.count(:conditions=>"status='new' or status='acknowledged'"); if new_requests > 0 %>

<%=new_requests%> new or ackn requests

    <% end %>

  <%= yield %>

<%= render :file => 'layouts/footer.erb' %>

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

  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="robots" content="all">
  <title>Tools - BAM</title>
  <link rel="stylesheet" type="text/css" href="/stylesheets/styles.css" />
  <link rel="stylesheet" type="text/css" href="/stylesheets/tools.css" />
  <link rel="stylesheet" type="text/css" href="/stylesheets/chat.css" />
	<link href='http://fonts.googleapis.com/css?family=Stardos+Stencil&v1' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=Zeyada&v1' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Kameron&v1' rel='stylesheet' type='text/css'>
  <%= javascript_include_tag :defaults %>

  <link rel="Shortcut Icon" type="image/x-icon" href="/images/favicon.ico" />

<%
  cu = current_user
  cu.last_view = Time.now
  cu.save
%>

<%#= render :file => 'chat/main' %>

  <%= render :file => 'layouts/context_select' %>

Tools

    <% b = get_bandeau; if b %>

<%= b.text %>

<%= b.person.name %>

    <% end %>

      <%= link_to('Add something', {:controller=>'bandeaus', :action=>'new'}) %> |
      <%= link_to('See all', {:controller=>'bandeaus', :action=>'index'}) %>

<%= link_to('SDP', {:controller=>'tools', :action=>'sdp_index'}, {:class=>menu_style('tools','sdp_index')}) %>

Index

<%= link_to('SDP index',        {:controller=>'tools', :action=>'sdp_index'}) %>

<%= link_to('SDP index by specific type',        {:controller=>'tools', :action=>'sdp_index_by_type'}) %>

      <% if current_user.has_role?('Admin') %>

<%= link_to('Gains conso',     {:controller=>'tools', :action=>'sdp_conso'}) %>

      <% end %>

Imports

<%= link_to('SDP import',       {:controller=>'tools', :action=>'sdp_import'}) %>

<%= link_to('RMT to SDP task import',          {:controller=>'tools', :action=>'sdp_add'}) %>

<%= link_to('Monthly tasks SDP import', {:controller=>'tools', :action=>'import_monthly_tasks'}) %>

Checks

<%= link_to('CHECK Loads',{:controller=>'tools', :action=>'load_errors'}) %>

<%= link_to('CHECK RMT <=> SDP',{:controller=>'tools', :action=>'sdp_yes_check'}) %>

<%= link_to('CHECK RMT ended',  {:controller=>'tools', :action=>'requests_ended_check'}) %>

<%= link_to('CHECK RMT should be ended',  {:controller=>'tools', :action=>'requests_should_be_ended_check'}) %>

<%= link_to('CHECK wrong Remaining Workload', {:controller=>'tools', :action=>'check_sdp_remaining_workload'}) %>

<%= link_to('CHECK QS/Spiders Counters', {:controller=>'tools', :action=>'show_counter_history'}) %>

<%= link_to('CHECK QS/Spiders Counters without RMT', {:controller=>'tools', :action=>'show_counter_history_without_rmt'}) %>

<%= link_to('WS Reporting', {:controller=>'workstreams', :action=>'index'}, {:class=>menu_style('workstreams','*')}) %>

WS Reporting

<%= link_to('Reporting',        {:controller=>'workstreams', :action=>'index'}) %>

<%= link_to('Manage',        {:controller=>'workstreams', :action=>'manage'}) %>

<%= link_to('Requests', {:controller=>'welcome', :action=>'index'}, {:class=>menu_style('welcome','index')}) %>

<%= link_to('People', {:controller=>'people', :action=>'index'}, {:class=>menu_style('people','*')}) %>

<%= link_to('Reminders', {:controller=>'welcome', :action=>'reminders'}, {:class=>menu_style('welcome','reminders')}) %>

<%= link_to('Bandeaux', {:controller=>'bandeaus', :action=>'index'}, {:class=>menu_style('bandeaus','*')}) %>

    <% if cu.has_role?('Admin') %>

<%= link_to('Import', {:controller=>'welcome', :action=>'update'}, {:class=>menu_style('welcome','update')}) %>

    <% end %>

      <%= link_to('Tools', "", {:class=>menu_style('tools','*'), :onclick=>"return false;"}) %>

Management

<%= link_to('Requirements',   {:controller=>'requirements',           :action=>'index'})  %>

<%= link_to('Checklists',     {:controller=>'checklist_templates',    :action=>'index'})  %>

<%= link_to('Risks',          {:controller=>'risks',                  :action=>'list'})   %>

<%= link_to('Generic Risks',  {:controller=>'generic_risk_questions', :action=>'index'})  %>

<%= link_to('Capi',           {:controller=>'notes',                  :action=>'list'})   %>

<%= link_to('Capi Axes',      {:controller=>'capi_axes',              :action=>'index'})  %>

<%= link_to('Suite Tags',     {:controller=>'suite_tags',             :action=>'index'})  %>

<%= link_to('Monthly tasks',     {:controller=>'monthly_tasks',          :action=>'index'})  %>

<%= link_to('Monthly task Types',     {:controller=>'monthly_task_types',          :action=>'index'})  %>

<%= link_to('Stream Review Types', {:controller=>'tools', :action=>'show_stream_review_type'}) %>

Stats

<%= link_to('Requests by year', {:controller=>'tools', :action=>'requests_by_year'}) %>

<%= link_to('Projects length',  {:controller=>'tools', :action=>'projects_length'}) %>

<%= link_to('Check dates RMT <=> BAM', {:controller=>'tools', :action=>'rmt_date_check'}) %>

<%= link_to('QR per DWS',     {:controller=>'tools', :action=>'qr_per_ws'}) %>

<%= link_to('Last projects',  {:controller=>'tools', :action=>'last_projects'}) %>

<%= link_to('Projects status',{:controller=>'tools', :action=>'project_list'}) %>

<%= link_to('Next milestones',{:controller=>'tools', :action=>'next_milestones'}) %>

<%= link_to('Check RMT Milestone Dates <=> po',{:controller=>'tools', :action=>'check_difference_po_milestone_date'}) %>

Old stuff

<%= link_to('Workload Gantt', {:controller=>'welcome', :action=>'workload_schedule'}) %>

<%= link_to('Stats open projects', {:controller=>'tools', :action=>'stats_open_projects'}) %>

<%= link_to('Test email',     {:controller=>'tools', :action=>'test_email'}) %>

		<% if (cu.has_role?('Admin') or (cu.is_cpdp==1) or cu.has_role?('ServiceLineResp'))  %>

<%= link_to('Spider', "", {:class=>menu_style('workstreams','*')}) %>

KPI

<%= link_to('KPI by PM Types',        {:controller=>'spider_kpis', :action=>'kpi_charts_by_pm_types', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('KPI by axes',        {:controller=>'spider_kpis', :action=>'kpi_charts_by_axes', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('Cumul KPI by PM Types',        {:controller=>'spider_kpis', :action=>'kpi_cumul_charts_by_pm_types', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('Cumul KPI by axes',        {:controller=>'spider_kpis', :action=>'kpi_cumul_charts_by_axes', :lifecycle_id=>1, :workstream=>0, :milestone_name_id=>0}) %>

<%= link_to('Configure export excel columns', {:controller=>'pm_type_axe_excels', :action=>'index'}) %>

Spider administration

<%= link_to('Import',       						  {:controller=>'spiders', :action=>'project_spider_import'}) %>

<%= link_to('Manage Axes',        				{:controller=>'pm_type_axes', :action=>'index'}) %>

<%= link_to('Manage Questions',        		{:controller=>'lifecycle_questions', :action=>'index'}) %>

<%= link_to('Manage Questions References',{:controller=>'question_references', :action=>'index'}) %>

		<% end %>

<%= link_to('Lessons Learnt', {:controller=>'lesson_collects', :action=>'index'}, {:class=>menu_style('welcome','update')}) %>

    <% if cu.has_role?('Super') %>

<%= link_to('Logs', {:controller=>'logs'}, {:class=>'menu'}) %>

    <% end %>
    <% new_requests = Request.count(:conditions=>"status='new' or status='acknowledged'"); if new_requests > 0 %>

<%=new_requests%> new or ackn requests

    <% end %>

  <%= yield %>

<%= render :file => 'layouts/footer.erb' %>


Fix extra \n\t\t that ended up inside the <pre> tag for code lines

  <% # iterate over lines %>
  <% chunk.lines.each do |line| %>

    <%
      best_idx = line.best_file_index
      blob = file_change_set.blobs[best_idx]
      blob_line_number = line.line_numbers[ best_idx ]
      line_id = blob + '_line_' + blob_line_number.to_s
     %>

    <tr class="diff_line" id="<%= line_id %>">
      <% if ! @review.nil? %>

          <a href="#" onclick="new Ajax.Request('/review/<%= @review.id %>/new_comment_ajax?comment%5Bindex_hash%5D=<%= blob %>&comment%5Bline_number%5D=<%= blob_line_number %>&comment%5Breview_id%5D=<%= @review.id %>', {asynchronous:true, evalScripts:true}); return false;">+
          <%= true ? '' : link_to_remote('+', :url => {
                :controller => 'review',
                :action => 'new_comment_ajax',
                'comment[review_id]'   => @review.id,
                'comment[index_hash]'  => blob,
                'comment[line_number]' => blob_line_number
              }) %>

      <% end %>
    <% # Line numbers %>
      <% line.line_numbers.each do |n| %>
        <%=h n.nil? ? "-" : n %>
      <% end %>
      <td class="<%= (line_classes line).join(" ") %>">
        <% if line.line.empty? %>

        <% else %>
          <%= # Get rid of trailing ^Ms and replace
                    # tabs with "->" characters
                   h(line.line.sub(/\r$/,'').
                               gsub(/\t/, "\xE2\x9E\x94   "))

          %>

        <% end %>

  <% comments = comments_for_line(blob, blob_line_number) %>
  <% comments.each do |comment| %>

      <%= render_partial 'comment/show', comment %>

  <% end %>

  <% end %>


Remove a couple of residual WDTK-specific things from the admin layout.

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

      <meta http-equiv="content-type" content="text/html;charset=UTF-8" >
      <title>WhatDoTheyKnow admin<%= @title ? ":" : "" %> <%=@title%></title>
      <%= stylesheet_link_tag 'admin', :title => "Main", :rel => "stylesheet"  %>

    <%= link_to 'Alaveteli', main_url('/') %> admin:
    <%= link_to 'Summary', admin_general_index_path %>
    | <%= link_to 'Timeline', admin_timeline_path %>
    | <%= link_to 'Stats', admin_stats_path %>
    | <%= link_to 'Debug', admin_debug_path %>
    View:
    <%= link_to 'Authorities', admin_body_list_path %>
    | <%= link_to 'Requests', admin_request_list_path %>
    | <%= link_to 'Users', admin_user_list_path %>
    | <%= link_to 'Tracks', admin_track_list_path %>

    <%= render :partial => 'general/locale_switcher' %>

    <% if flash[:error] %>

<%= flash[:error] %>

    <% end %>

    <% if flash[:notice] %>

<%= flash[:notice] %>

    <% end %>

    <%= yield  %>

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

      <meta http-equiv="content-type" content="text/html;charset=UTF-8" >
      <title>WhatDoTheyKnow admin<%= @title ? ":" : "" %> <%=@title%></title>
      <%= stylesheet_link_tag 'admin', :title => "Main", :rel => "stylesheet"  %>

    <%= link_to 'WhatDoTheyKnow', main_url('/') %> admin:
    <%= link_to 'Summary', admin_general_index_path %>
    | <%= link_to 'Timeline', admin_timeline_path %>
    | <%= link_to 'Stats', admin_stats_path %>
    | <%= link_to 'Debug', admin_debug_path %>
    | <%= link_to 'Wiki', "https://secure.mysociety.org/intranet/ProductionSites/WhatDoTheyKnow/WebHome" %>
    View:
    <%= link_to 'Authorities', admin_body_list_path %>
    | <%= link_to 'Requests', admin_request_list_path %>
    | <%= link_to 'Users', admin_user_list_path %>
    | <%= link_to 'Tracks', admin_track_list_path %>

    <%= render :partial => 'general/locale_switcher' %>

    <% if flash[:error] %>

<%= flash[:error] %>

    <% end %>

    <% if flash[:notice] %>

<%= flash[:notice] %>

    <% end %>

    <%= yield  %>


Prettify timeline with icons

Prettify timeline with icons

<% @title = "Timeline" %>

    Hour
    Day
    2 days
    Week
    Month
    All time

<%=h @events_title%>

<% last_date = nil %>
<% for event in @events %>
    <% if last_date != event.created_at.to_date %>
        <% if last_date.nil? %>

        <% end %>

<%= simple_date(event.created_at) %>

    <% else %>

    <% end %>
    <% last_date = event.created_at.to_date %>

    <%= simple_time(event.created_at) %>

    <% if event.class.to_s == 'InfoRequestEvent' %>
        <%= link_to(''.html_safe, request_admin_url(event.info_request), :title => "view full details")%>
        <%= link_to(event.info_request.title, request_url(event.info_request), :title => "view request on public website")%>

        <% if event.event_type == 'edit' %>
            was edited by administrator <%=h event.params[:editor] %>.
            <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
                    if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                        %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                    end
               end
            %>
        <% elsif event.event_type == 'edit_outgoing' %>
            <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %>
            had outgoing message edited by administrator <%=h event.params[:editor] %>.
            <% if outgoing_messages.size > 0 %>
                <% outgoing_message = outgoing_messages[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing outgoing message, internal error.
            <% end %>
        <% elsif event.event_type == 'edit_comment' %>
            <% comment = Comment.find(event.params[:comment_id].to_i) %>
            had annotation edited by administrator <%=h event.params[:editor] %>.
            <% if comments.size > 0 %>
                <% comment = comments[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing annotation, internal error.
            <% end %>
        <% elsif event.event_type == 'destroy_incoming' %>
            had incoming message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'destroy_outgoing' %>
            had outgoing message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'redeliver_outgoing' %>
            had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>.
         <% elsif event.event_type == 'response' %>
            <% incoming_message = event.incoming_message %>
            received
            <%= link_to 'a response', main_url(incoming_message_url(incoming_message)) %>
            from <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'sent' %>
            was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'resent' %>
            had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'followup_sent' %>
            had a follow up message sent to <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'comment' %>
            had an annotation posted by <%=h event.comment.user.name %>.
        <% elsif event.event_type == 'status_update' %>
                had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'.
        <% else %>
            had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>.
        <% end %>
    <% else %>
        <%= link_to(''.html_safe, public_body_admin_url(event.public_body), :title => "view full details")%>
        <%= link_to(event.public_body.name, public_body_url(event.public_body), :title => "view authority on public website")%>
        was created/updated by administrator <%=h event.last_edit_editor %>
    <% end %>
<% end %>
<% if not @events.empty? %>

<% end %>

<% @title = "Timeline" %>

    Hour
    Day
    2 days
    Week
    Month
    All time

<%=h @events_title%>

<% last_date = nil %>
<% for event in @events %>
    <% if last_date != event.created_at.to_date %>
        <% if last_date.nil? %>

        <% end %>

<%= simple_date(event.created_at) %>

    <% else %>

    <% end %>
    <% last_date = event.created_at.to_date %>

    <%= simple_time(event.created_at) %>

    <% if event.class.to_s == 'InfoRequestEvent' %>
        <%= request_both_links(event.info_request) %>
        <% if event.event_type == 'edit' %>
            was edited by administrator <%=h event.params[:editor] %>.
            <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
                    if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                        %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                    end
               end
            %>
        <% elsif event.event_type == 'edit_outgoing' %>
            <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %>
            had outgoing message edited by administrator <%=h event.params[:editor] %>.
            <% if outgoing_messages.size > 0 %>
                <% outgoing_message = outgoing_messages[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing outgoing message, internal error.
            <% end %>
        <% elsif event.event_type == 'edit_comment' %>
            <% comment = Comment.find(event.params[:comment_id].to_i) %>
            had annotation edited by administrator <%=h event.params[:editor] %>.
            <% if comments.size > 0 %>
                <% comment = comments[0] %>
                <% for p in ['body']
                        if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
                            %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
                        end
                   end
                %>
            <% else %>
                Missing annotation, internal error.
            <% end %>
        <% elsif event.event_type == 'destroy_incoming' %>
            had incoming message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'destroy_outgoing' %>
            had outgoing message deleted by administrator <%=h event.params[:editor] %>.
        <% elsif event.event_type == 'redeliver_outgoing' %>
            had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>.
         <% elsif event.event_type == 'response' %>
            <% incoming_message = event.incoming_message %>
            received
            <%= link_to 'a response', main_url(incoming_message_url(incoming_message)) %>
            from <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'sent' %>
            was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'resent' %>
            had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'followup_sent' %>
            had a follow up message sent to <%=h event.info_request.public_body.name %>.
        <% elsif event.event_type == 'comment' %>
            had an annotation posted by <%=h event.comment.user.name %>.
        <% elsif event.event_type == 'status_update' %>
                had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'.
        <% else %>
            had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>.
        <% end %>
    <% else %>
        <%= public_body_both_links(event.public_body) %>
        was created/updated by administrator <%=h event.last_edit_editor %>
    <% end %>
<% end %>
<% if not @events.empty? %>

<% end %>


ActionItem25: better page title

ActionItem25: better page title

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

 <%= _('Search results')  %>

 <%= _('Searching for: %s') % @query  %>

<% @results.each do |hit| %>
  <%= render :partial => partial_for_hit(hit.class), :locals => { :hit => hit } %>

    <%= _('Relevance: %d%%') % (hit.respond_to?(:ferret_score) ? (hit.ferret_score * 100.0).round : 100) %>

<% end %>

 <%= _('Listing articles found')  %>

 <%= _('Searching for ') + @query  %>

<% @results.each do |hit| %>
  <%= render :partial => partial_for_hit(hit.class), :locals => { :hit => hit } %>

    <%= _('Relevance: %d%%') % (hit.respond_to?(:ferret_score) ? (hit.ferret_score * 100.0).round : 100) %>

<% end %>


Check @rev, @rev_to, not params[:rev], etc.

<%= l(:label_revision) %> <%= format_revision(@rev_to) + ':' if @rev_to %><%= format_revision(@rev) %> <%=h @path %>

<% link_to("Return to diff overview", {:controller => 'repositories', :action => 'revision', :id => params[:project], :rev => @rev}, :title => "Return to overview") if @rev %>
<% link_to("Return to diff overview", {:controller => 'repositories', :action => 'revision', :id => params[:project], :rev => @rev_to}, :title => "Return to overview") if @rev_to %>

<% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
  <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
  <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>

<%= l(:label_view_diff) %>
  <%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %>

<% end %>

<% cache(@cache_key) do -%>
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
<% end -%>

<% other_formats_links do |f| %>
	<%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
<% end %>

<% html_title(with_leading_slash(@path), 'Diff') -%>

<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<% end %>

<%= l(:label_revision) %> <%= format_revision(@rev_to) + ':' if @rev_to %><%= format_revision(@rev) %> <%=h @path %>

<% link_to("Return to diff overview", {:controller => 'repositories', :action => 'revision', :id => params[:project], :rev => @rev}, :title => "Return to overview") if params[:rev] %>
<% link_to("Return to diff overview", {:controller => 'repositories', :action => 'revision', :id => params[:project], :rev => @rev_to}, :title => "Return to overview") if params[:rev_to] %>

<% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
  <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
  <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>

<%= l(:label_view_diff) %>
  <%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %>

<% end %>

<% cache(@cache_key) do -%>
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
<% end -%>

<% other_formats_links do |f| %>
	<%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
<% end %>

<% html_title(with_leading_slash(@path), 'Diff') -%>

<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<% end %>


git-svn-id: svn+ssh://ko.meadowy.net/home/svn/inside/kozuchi/trunk@476 c938ebee-df10-0410-95fc-be8c4b0ebdd5

    <% if flash[:notice] %>

<%= flash[:notice]%>

    <% end %>

        精算日
        精算データ名
        精算対象口座
        対象取引数
        精算額
        登録日時
		状態
        詳細

      <% for s in @settlements %>

	      <% unless s.result_entry -%>
		  請求(ID:<%= s.id%>、「<%= s.name %>」、相手先：<%= s.account ? s.account.name : '？' %>)のデータが破損しています。精算取引がありません。管理者に連絡してください。
		  <% else -%>
          <%= format_date s.result_entry.deal.date %>
          <%= s.name %>
          <%= s.account.name %>
          <%= s.target_entries.size %>
          <%= number_with_delimiter s.target_sum.abs %>
          <%= format_datetime s.created_at %>
		  <% end -%>

		  	<% if s.submitted_settlement_id -%>
			  提出済
			<% elsif s.kind_of?(SubmittedSettlement) %>
			  受理
			<% end -%>

          <%= link_to '詳細', :action => 'view', :id => s.id %>

      <% end %>

    <% if flash[:notice] %>

<%= flash[:notice]%>

    <% end %>

        精算日
        精算データ名
        精算対象口座
        対象取引数
        精算額
        登録日時
        詳細

      <% for s in @settlements %>

	      <% unless s.result_entry -%>
		  請求(ID:<%= s.id%>、「<%= s.name %>」、相手先：<%= s.account ? s.account.name : '？' %>)のデータが破損しています。精算取引がありません。管理者に連絡してください。
		  <% else -%>
          <%= format_date s.result_entry.deal.date %>
          <%= s.name %>
          <%= s.account.name %>
          <%= s.target_entries.size %>
          <%= number_with_delimiter s.target_sum.abs %>
          <%= format_datetime s.created_at %>
		  <% end -%>

		  	<% if s.submitted_settlement_id -%>
			  提出済
			<% elsif s.kind_of?(SubmittedSettlement) %>
			  受理
			<% end -%>

          <%= link_to '詳細', :action => 'view', :id => s.id %>

      <% end %>


changes to sharing form

changes to sharing form

<% # initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<input type="hidden" id="const_private" value="<%= Policy::PRIVATE -%>">
<input type="hidden" id="const_everyone" value="<%= Policy::EVERYONE -%>">
<input type="hidden" id="const_all_registered_users" value="<%= Policy::ALL_REGISTERED_USERS -%>">
<input type="hidden" id="const_all_sysmo_users" value="<%= Policy::ALL_SYSMO_USERS -%>">
<input type="hidden" id="const_custom_permissions_only" value="<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>">

<input type="hidden" id="const_determined_by_group" value="<%= Policy::DETERMINED_BY_GROUP -%>">
<input type="hidden" id="const_no_access" value="<%= Policy::NO_ACCESS -%>">
<input type="hidden" id="const_viewing" value="<%= Policy::VIEWING -%>">
<input type="hidden" id="const_downloading" value="<%= Policy::DOWNLOADING -%>">
<input type="hidden" id="const_editing" value="<%= Policy::EDITING -%>">

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

<% # @resource_type -%>
<% # @favourite_groups -%>
<% # @all_projects -%>

<% # @policy_type -%>
<% # @sharing_mode -%>
<% # @access_mode -%>
<% # @use_custom_sharing -%>
<% # @use_whitelist -%>
<% # @use_blacklist -%>

    <%= help_icon("Here you can specify who can view, download and edit this #{@resource_type}.") -%>
    Sharing

    		Here you can specify who can view, download and edit this <%= @resource_type -%>.
				<%= link_to_function "Click here" + expand_image, visual_effect(:toggle_blind, "more_info", :duration => 0.3) -%> for more information.

				MORE INFO TO BE PUT HERE

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
    	<input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
            value="<%= Policy::PRIVATE -%>" type="radio" onclick="javascript:setSharingElementVisibility(<%= Policy::PRIVATE -%>);" />
        - Keep this <%= @resource_type -%> private.

Or share it with..

    	<label for="sharing_scope_<%= Policy::EVERYONE -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
              value="<%= Policy::EVERYONE -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::EVERYONE -%>);" />
          - Everyone (including not-registered guest users) for

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

			<%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::EVERYONE,
			                                                                             :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

    	<label for="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_REGISTERED_USERS -%> id="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>" name="sharing[sharing_scope]"
              value="<%= Policy::ALL_REGISTERED_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_REGISTERED_USERS -%>);" />
          - All registered users for

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

			<%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_REGISTERED_USERS,
			                                                                             :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

    	<label for="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]"
              value="<%= Policy::ALL_SYSMO_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_SYSMO_USERS -%>);" />
          - All users associated with any of the SysMO projects for

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

			<%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_SYSMO_USERS,
			                                                                             :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

    	<label for="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY -%> id="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" name="sharing[sharing_scope]"
              value="<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>);" />
          - Use custom sharing permissions only

		<div id="specific_sharing" style="display: <%= (@use_custom_sharing || @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY) ? "block" : "none" -%>; margin-top: 2em;">

		  	Custom sharing permissions

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

	        Loading...

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

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

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

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

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

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

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

<%= favourite_group_popup_link_action_new() -%>

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

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

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

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

              Step 3

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

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

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

                  Step 3: Choose access rights, review and submit

                  <select name="proj_access_type_select" id="proj_access_type_select" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                    <option value="<%= Policy::VIEWING -%>" >Viewing only</option>
                    <option value="<%= Policy::DOWNLOADING -%>" >Viewing and downloading only</option>
                    <option value="<%= Policy::EDITING -%>" >Viewing, downloading and editing</option>
                  </select>

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

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

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

Also include people in my..

				<input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_whitelist]" id="cb_use_whitelist" <%= "checked='checked'" if @use_whitelist -%> />
			  - "white list", who always get full access

			  [ <%= link_to "edit", "/", :onclick => "alert('This function will be implemented shortly.'); return(false);" -%> ]

				<input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_blacklist]" id="cb_use_blacklist" <%= "checked='checked'" if @use_blacklist -%> />
			  - "black list", who have no access at all

			  [ <%= link_to "edit", "/", :onclick => "alert('This function will be implemented shortly.'); return(false);" -%> ]

<% # initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<input type="hidden" id="const_private" value="<%= Policy::PRIVATE -%>">
<input type="hidden" id="const_everyone" value="<%= Policy::EVERYONE -%>">
<input type="hidden" id="const_all_registered_users" value="<%= Policy::ALL_REGISTERED_USERS -%>">
<input type="hidden" id="const_all_sysmo_users" value="<%= Policy::ALL_SYSMO_USERS -%>">
<input type="hidden" id="const_custom_permissions_only" value="<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>">

<input type="hidden" id="const_determined_by_group" value="<%= Policy::DETERMINED_BY_GROUP -%>">
<input type="hidden" id="const_no_access" value="<%= Policy::NO_ACCESS -%>">
<input type="hidden" id="const_viewing" value="<%= Policy::VIEWING -%>">
<input type="hidden" id="const_downloading" value="<%= Policy::DOWNLOADING -%>">
<input type="hidden" id="const_editing" value="<%= Policy::EDITING -%>">

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

<% # @resource_type -%>
<% # @favourite_groups -%>
<% # @all_projects -%>

<% # @policy_type -%>
<% # @sharing_mode -%>
<% # @access_mode -%>
<% # @use_custom_sharing -%>
<% # @use_whitelist -%>
<% # @use_blacklist -%>

    <%= help_icon("Here you can specify who can view, download and edit this #{@resource_type}.") -%>
    Sharing

    		Here you can specify who can view, download and edit this <%= @resource_type -%>.
				<%= link_to_function "Click here" + expand_image, visual_effect(:toggle_blind, "more_info", :duration => 0.3) -%> for more information.

				MORE INFO TO BE PUT HERE

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
    	<input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
            value="<%= Policy::PRIVATE -%>" type="radio" onclick="javascript:setSharingElementVisibility(<%= Policy::PRIVATE -%>);" />
        - Keep this <%= @resource_type -%> private.

Or share it with..

    	<label for="sharing_scope_<%= Policy::EVERYONE -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
              value="<%= Policy::EVERYONE -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::EVERYONE -%>);" />
          - Everyone (including not-registered guest users) for

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

			<%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::EVERYONE,
			                                                                             :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

    	<label for="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_REGISTERED_USERS -%> id="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>" name="sharing[sharing_scope]"
              value="<%= Policy::ALL_REGISTERED_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_REGISTERED_USERS -%>);" />
          - All registered users for

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

			<%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_REGISTERED_USERS,
			                                                                             :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

    	<label for="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]"
              value="<%= Policy::ALL_SYSMO_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_SYSMO_USERS -%>);" />
          - All users associated with any of the SysMO projects for

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

			<%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_SYSMO_USERS,
			                                                                             :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

    	<label for="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>">
      	<input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY -%> id="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" name="sharing[sharing_scope]"
              value="<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>);" />
          - Use custom sharing permissions only

		<div id="specific_sharing" style="display: <%= (@use_custom_sharing || @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY) ? "block" : "none" -%>; margin-top: 2em;">

		  	Custom sharing permissions

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

	        Loading...

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

									<%= image_tag method_to_icon_filename("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
								  <%= help_icon("Select from your favourite groups.") -%>
									My Favourite Groups

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

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

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

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

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

<%= favourite_group_popup_link_action_new() -%>

									<%= help_icon("Select a project / institution.") -%>
									Projects and Institutions

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

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

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

									Step 3

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

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

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

										  Step 3: Choose access rights, review and submit

											<select name="proj_access_type_select" id="proj_access_type_select" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
											  <option value="<%= Policy::VIEWING -%>" >Viewing only</option>
											  <option value="<%= Policy::DOWNLOADING -%>" >Viewing and downloading only</option>
											  <option value="<%= Policy::EDITING -%>" >Viewing, downloading and editing</option>
											</select>

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

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

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

Also include people in my..

				<input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_whitelist]" id="cb_use_whitelist" <%= "checked='checked'" if @use_whitelist -%> />
			  - "white list", who always get full access

			  [ <%= link_to "edit", "/" -%> ]

				<input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_blacklist]" id="cb_use_blacklist" <%= "checked='checked'" if @use_blacklist -%> />
			  - "black list", who have no access at all

			  [ <%= link_to "edit", "/" -%> ]


Now displaying category names on the subject article screen.

<%= render( :partial => '/shared/article_tabs',
            :locals => { :selected => 1,
                         :article_id => @article.id }) %>

	      <%= link_to("articles",
	                  {:controller => 'article',
	                   :action => 'list',
                                :collection_id => @article.collection_id,
 		                 :ol => 'a_art_articles' }) %>

<%= @article.title %>

		  <% if @article.xml_text != nil && !@article.xml_text.empty? %>
		    <%= xml_to_html(@article.xml_text) %>
		  <% else %>
		    No Contents Provided
		  <% end %>

	<% if logged_in? %>

Possible Duplicates

				<% @article.possible_duplicates.each do |dup| %>
					<%= link_to(dup.title, :article_id => dup.id) %>
					<%= button_to("Combine",
									{ :action => 'combine_duplicate',
									  :from_article_id => dup.id,
									  :article_id => @article.id},
									{ :title => "Combines #{dup.title} into #{@article.title}",
										:confirm => "Are you sure you want to delete #{dup.title} and change all links to point to #{@article.title}?"})%>

				<% end %>

	<% end %>

  		<% unless html_block('right').blank? %>

              <%= html_block('right') %>

		<% end %>

Categories

      	<% for cat in @article.categories %>

	      		<%= cat.title %>

		<% end %>

References

		    Search the text for:

        <%=link_to("All references to #{@article.title}",
                   { :controller => 'display',
                     :action => 'search',
                     :article_id => @article.id }) %>

  <%= link_to("All references to #{@article.title} in pages that do not link to this article",
              :controller => 'display',
              :action => 'search',
              :article_id => @article.id,
              :unlinked_only => true) %>

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

<%= render( :partial => '/shared/article_tabs',
            :locals => { :selected => 1,
                         :article_id => @article.id }) %>

	      <%= link_to("articles",
	                  {:controller => 'article',
	                   :action => 'list',
                                :collection_id => @article.collection_id,
 		                 :ol => 'a_art_articles' }) %>

<%= @article.title %>

		  <% if @article.xml_text != nil && !@article.xml_text.empty? %>
		    <%= xml_to_html(@article.xml_text) %>
		  <% else %>
		    No Contents Provided
		  <% end %>

	<% if logged_in? %>

Possible Duplicates

				<% @article.possible_duplicates.each do |dup| %>
					<%= link_to(dup.title, :article_id => dup.id) %>
					<%= button_to("Combine",
									{ :action => 'combine_duplicate',
									  :from_article_id => dup.id,
									  :article_id => @article.id},
									{ :title => "Combines #{dup.title} into #{@article.title}",
										:confirm => "Are you sure you want to delete #{dup.title} and change all links to point to #{@article.title}?"})%>

				<% end %>

	<% end %>

              <%= html_block('right') %>

References

		    Search the text for:

        <%=link_to("All references to #{@article.title}",
                   { :controller => 'display',
                     :action => 'search',
                     :article_id => @article.id }) %>

  <%= link_to("All references to #{@article.title} in pages that do not link to this article",
              :controller => 'display',
              :action => 'search',
              :article_id => @article.id,
              :unlinked_only => true) %>

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


browseclass no longer used

browseclass no longer used


Fixed display of notices on list all page.

	<%= render :partial => "partials/notice", :collection => @organisation.notices %>

All done?

<%= link_to "Back home", home_url %>

<% for notice in @organisation.notices %>

<%= link_to notice.heading, notice_url(:notice => notice) %>

By <%= notice.author.name %> <%= time_ago_in_words notice.created_on %> ago.
	<% if notice.comments_count > 0 %>
	<%= link_to pluralize(notice.comments_count, 'comment'), notice_url(:notice => 'notice', :anchor => 'comments') %>
	<% end %>

	<%= safely_display(truncate(notice.content, 72)) %>

<% end %>

All done?

<%= link_to "Back home", home_url %>


enabling through associations for nested scaffolds

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

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

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


convert cached_pages to will_paginate

convert cached_pages to will_paginate

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

<% unless @cached_pages.empty? -%>
  <%= will_paginate @cached_pages, :class => 'pages' if @cached_pages.page_count > 1 %>

Cached Pages

        URL
        Date
        Actions

      <%= render :partial => 'page', :collection => @cached_pages %>

  <%= will_paginate @cached_pages, :id => 'pagination' if @cached_pages.page_count > 1 %>
<% else -%>

There currently aren't any pages being cached by Mephisto.

<% end -%>

<% if @cached_pages.size > 0 -%>

<% if @cached_page_pages.page_count > 1 %>
Pages: <%= pagination_remote_links @cached_page_pages, :params => { :action => 'index' } %>
<% end %>

Cached Pages

      URL
      Date
      Actions

    <%= render :partial => 'page', :collection => @cached_pages %>

<% else -%>

There currently aren't any pages being cached by Mephisto.

<% end -%>

<% if @cached_page_pages.page_count > 1 %>
Pages: <%= pagination_links @cached_page_pages, :params => { :action => 'index' } %>
<% end %>


Don't display the build button if it's disabled.

<div id="project_<%= project.name %>" class="project build_<%= project.last_complete_build_status %>">

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

      <% recent_builds = project.last_five_builds %>

        <%= recent_builds.first ? 'build ' : 'Never built' %>

        <%= link_to image_tag('rss_light.gif'), :action => 'show', :id => project.name, :format => 'rss' %>

      <% unless recent_builds.empty? %>

          <% recent_builds.each do |build| %>
            <% if build == recent_builds.first %>

<%= link_to_build_with_elapsed_time(project, build) %>

            <% else %>

<%= link_to_build(project, build) %>

            <% end %>
          <% end %>

      <% end %>

    <% if Configuration.disable_build_now -%>

        <% form_remote_tag(
             :url => { :action => 'build', :id => project },
             :before => "$('build_#{project.to_param}').disabled = true; " +
                        "$('build_#{project.to_param}').className = 'build_button_disabled'; " +
                        "Element.update('build_#{project.to_param}', 'Wait...')"
           ) do %>
          <button id="build_<%= project.to_param %>"
            type="submit" class="build_button" value="txt" alt="Build Now">
            <% if project.builder_state_and_activity == 'builder_down' %>
              Start Builder
            <% else %>
              Build Now
            <% end %>
          </button>
        <% end %>

    <% end %>
    <%= display_builder_state(project.builder_state_and_activity) %>

    <% latest_build = recent_builds.first %>
    <% if latest_build %>
      <% if latest_build.incomplete? %>

          Now building: <%= latest_build.label %>
          for <%= format_seconds(latest_build.elapsed_time_in_progress, :general) %>

      <% end %>
      <%= show_revisions_in_build(revisions_in_build(latest_build)) %>

      <% if latest_build.brief_error %>

<%= link_to latest_build.brief_error, {:action => 'show', :id => project.name}, {:class => "failed"} %>

      <% end %>

<%= project.builder_error_message %>

    <% end %>

<div id="project_<%= project.name %>" class="project build_<%= project.last_complete_build_status %>">

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

      <% recent_builds = project.last_five_builds %>

        <%= recent_builds.first ? 'build ' : 'Never built' %>

        <%= link_to image_tag('rss_light.gif'), :action => 'show', :id => project.name, :format => 'rss' %>

      <% unless recent_builds.empty? %>

          <% recent_builds.each do |build| %>
            <% if build == recent_builds.first %>

<%= link_to_build_with_elapsed_time(project, build) %>

            <% else %>

<%= link_to_build(project, build) %>

            <% end %>
          <% end %>

      <% end %>

      <% form_remote_tag(
             :url => { :action => 'build', :id => project },
             :before => "$('build_#{project.to_param}').disabled = true; " +
                        "$('build_#{project.to_param}').className = 'build_button_disabled'; " +
                        "Element.update('build_#{project.to_param}', 'Wait...')"
           ) do %>
        <button
            <% if Configuration.disable_build_now -%>
              onclick="alert('Build Now button is disabled on this site.'); return false;"
            <% end -%>
              id="build_<%= project.to_param %>" type="submit" class="build_button" value="txt" alt="Build Now">
          <% if project.builder_state_and_activity == 'builder_down' %>
            Start Builder
          <% else %>
            Build Now
          <% end %>
        </button>
      <% end %>

    <%= display_builder_state(project.builder_state_and_activity) %>

    <% latest_build = recent_builds.first %>
    <% if latest_build %>
      <% if latest_build.incomplete? %>

          Now building: <%= latest_build.label %>
          for <%= format_seconds(latest_build.elapsed_time_in_progress, :general) %>

      <% end %>
      <%= show_revisions_in_build(revisions_in_build(latest_build)) %>

      <% if latest_build.brief_error %>

<%= link_to latest_build.brief_error, {:action => 'show', :id => project.name}, {:class => "failed"} %>

      <% end %>

<%= project.builder_error_message %>

    <% end %>


Create a 'browse' tab, which will be used to display data on the main page


Don't indicate if a message has been read in the outbox view.

<% this_colour = cycle('lightgrey', 'white') # can only call once for some dumb reason %>

  <td class="inbox-sender" bgcolor='<%= this_colour %>'><%= link_to sent_message_summary.recipient.display_name , :controller => 'user', :action => sent_message_summary.recipient.display_name %>
  <td class="inbox-subject" bgcolor='<%= this_colour %>'><%= link_to  sent_message_summary.title , :controller => 'message', :action => 'read', :message_id => sent_message_summary.id  %>
 <td class="inbox-sent" bgcolor='<%= this_colour %>'><%= sent_message_summary.sent_on %>

<% this_colour = cycle('lightgrey', 'white') # can only call once for some dumb reason %>

<tr class="inbox-row<%= "-unread" if not sent_message_summary.message_read? %>">
  <td class="inbox-sender" bgcolor='<%= this_colour %>'><%= link_to sent_message_summary.recipient.display_name , :controller => 'user', :action => sent_message_summary.recipient.display_name %>
  <td class="inbox-subject" bgcolor='<%= this_colour %>'><%= link_to  sent_message_summary.title , :controller => 'message', :action => 'read', :message_id => sent_message_summary.id  %>
 <td class="inbox-sent" bgcolor='<%= this_colour %>'><%= sent_message_summary.sent_on %>


Look here, braces: gimme some elbow room.  #2418

git-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@2492 5ecf4fe2-1ee6-0310-87b1-e25e094e27de

Listing <%= plural_name %>

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

<%% for <%= singular_name %> in @<%= plural_name %> %>

  <%% for column in <%= model_name %>.content_columns %>
    <%%=h <%= singular_name %>.send(column.name) %>
  <%% end %>
    <%%= link_to 'Show', :action => 'show<%= suffix %>', :id => <%= singular_name %> %>
    <%%= link_to 'Edit', :action => 'edit<%= suffix %>', :id => <%= singular_name %> %>
    <%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :confirm => 'Are you sure?' %>

<%% end %>

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

<%%= link_to 'New <%= singular_name %>', :action => 'new<%= suffix %>' %>

Listing <%= plural_name %>

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

<%% for <%= singular_name %> in @<%= plural_name %> %>

  <%% for column in <%= model_name %>.content_columns %>
    <%%=h <%= singular_name %>.send(column.name) %>
  <%% end %>
    <%%= link_to 'Show', :action => 'show<%= suffix %>', :id => <%= singular_name %> %>
    <%%= link_to 'Edit', :action => 'edit<%= suffix %>', :id => <%= singular_name %> %>
    <%%= link_to 'Destroy', {:action => 'destroy<%= suffix %>', :id => <%= singular_name %>}, :confirm => 'Are you sure?' %>

<%% end %>

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

<%%= link_to 'New <%= singular_name %>', :action => 'new<%= suffix %>' %>


WDTK-78 Update personal information section with details on how you can request personal information in Australia

<% @title = "Making requests" %>

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

<%= @title %> #

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

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

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

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

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

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

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

Who can make a request? #

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

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

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

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

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

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

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

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

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

 Those formally subject to the FOI Act

 Those which choose to voluntarily comply with the FOI Act

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

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

Why must I keep my request focused?#

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

arguments about your cause

statements that could defame or insult others

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

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

Does it cost me anything to make a request?#

  Making an FOI request is always free. A public body may choose to impose
  certain charges to provide the information but they can only charge you if
  you have specifically agreed in advance to pay.

  The
  law contains a 'lowest reasonable cost' objective, meaning that if
  the public body chooses to impose a charge it should fairly reflect the work
  involved in providing access to documents and must not be used to discourage
  you from exercising your right of access.

  If a public body decides to charge you for access to documents there are
  certain circumstances where the
  charges may be reduced or waived, such as:

Releasing the information is in the general public interest

The charges would cause you financial hardship (e.g. you're a pensioner)

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

How quickly will I get a response? #

  By law, the public authority must keep you informed about the progress of your FOI request.

  Within 14 days after they receive your request they must give you
  written acknowledgement and within 30 days they
  must provide you with either the documents you have asked for or a written
  decision on your request.

  For various reasons,
  this timeframe can be extended.

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

What if I never get a response?#

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

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

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

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

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

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

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

  Authorities often add legal boilerplate about the Commonwealth Copyright
  Administration, which at first glance implies you may not be able do
  anything with the information. This is likely to be incorrect as the latest

    Statement of IP Principles for Australian Government Agencies

  explicitly encourages reuse.

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

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

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

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

Can I request information about myself? #

  No. Requests made using <%= site_name %> are publicly
  visible so cannot help you find information about a private individual.

  If you'd like to
  request personal information
  you can do so privately by asking the public body directly. Agencies will
  often give you this information when you ask for it or you can formally
  request it using the Privacy Act or Freedom of Information Act.

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

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

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

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

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

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

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

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

How do you moderate request annotations? #

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

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

Next, read about your privacy -->

<% @title = "Making requests" %>

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

<%= @title %> #

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

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

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

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

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

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

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

Who can make a request? #

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

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

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

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

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

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

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

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

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

 Those formally subject to the FOI Act

 Those which choose to voluntarily comply with the FOI Act

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

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

Why must I keep my request focused?#

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

arguments about your cause

statements that could defame or insult others

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

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

Does it cost me anything to make a request?#

  Making an FOI request is always free. A public body may choose to impose
  certain charges to provide the information but they can only charge you if
  you have specifically agreed in advance to pay.

  The
  law contains a 'lowest reasonable cost' objective, meaning that if
  the public body chooses to impose a charge it should fairly reflect the work
  involved in providing access to documents and must not be used to discourage
  you from exercising your right of access.

  If a public body decides to charge you for access to documents there are
  certain circumstances where the
  charges may be reduced or waived, such as:

Releasing the information is in the general public interest

The charges would cause you financial hardship (e.g. you're a pensioner)

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

How quickly will I get a response? #

  By law, the public authority must keep you informed about the progress of your FOI request.

  Within 14 days after they receive your request they must give you
  written acknowledgement and within 30 days they
  must provide you with either the documents you have asked for or a written
  decision on your request.

  For various reasons,
  this timeframe can be extended.

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

What if I never get a response?#

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

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

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

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

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

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

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

  Authorities often add legal boilerplate about the Commonwealth Copyright
  Administration, which at first glance implies you may not be able do
  anything with the information. This is likely to be incorrect as the latest

    Statement of IP Principles for Australian Government Agencies

  explicitly encourages reuse.

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

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

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

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

Can I request information about myself? #

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

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

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

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

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

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

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

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

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

How do you moderate request annotations? #

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

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

Next, read about your privacy -->


ActionItem890: forgot to close the tag

ActionItem890: forgot to close the tag

 <%= _('Access denied') %>

  <% unless @message.nil? %>

<%= @message %>

  <% else %>

<%= _('You are not allowed to view this page.') %>

<%= _("If you are supposed to have access to this area, you'll probably want to talk to the people responsible and ask them to give you access.") %>

  <% end %>

<%= link_to _('Go to the site home page'), :controller => 'home' %>

<%= link_to _('Go back'), :back %>


fixed typo in api

fixed typo in api

<%= stylesheet_link_tag "code" %>

API Instructions

Parse a citation

(POST) (FIXME:hostname)/citations/create

Required argument: citation or citation[] - The string(s) to parse.

Header: Accept: text/xml

Returns a list of parsed citations in xml format. Each parsed citation includes a ContextObject with the citation as the referent.

Status code: 201

Examples

 Using Ruby:

require 'net/http'

Net::HTTP.start('localhost', 3000) do |http|
  response = http.post('/citations/create',
    'citation=A. Bookstein and S. T. Klein,  \
    Detecting content-bearing words by serial clustering,  \
    Proceedings of the Nineteenth Annual International ACM SIGIR Conference \
    on Research and Development in Information Retrieval,   \
    pp. 319327,   1995.',
    'Accept' => 'text/xml')

  puts "Code: #{response.code}"
  puts "Message: #{response.message}"
  puts "Body:\n #{response.body}"
end

 Using curl:

Parsing a single citation:

curl -H 'Accept: text/xml' -d "citation=Udvarhelyi, I.S., Gatsonis,
C.A., Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J.
Acute Myocardial Infarction in the Medicare population: process of
care and clinical outcomes. Journal of the American Medical
Association, 1992; 18:2530-2536.  "
http://0.0.0.0:3000/citations/create

Parsing multiple citations:

curl -H 'Accept: text/xml' -d "citation[]=Fielderman, A., Silvester,
G., Gatsonis, C.A., Hoenig, J., Flynn, S. Prognostic significance of
flow cytometric DNA analysis and proliferative index in stage I
non-small cell lung cancer. American Review of Respiratory Disease,
1992; 146:707-710.&citation[]=Udvarhelyi, I.S., Gatsonis, C.A.,
Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J. Acute
Myocardial Infarction in the Medicare population: process of care and
clinical outcomes. Journal of the American Medical Association, 1992;
18:2530-2536.  " http://0.0.0.0:3000/citations/create

Example Return:

<citations>
<citation valid=true>
<authors>
<author>I S Udvarhelyi</author>
<author>C A Gatsonis</author>
<author>A M Epstein</author>
<author>C L Pashos</author>
<author>J P Newhouse</author>
<author>B J McNeil</author>
</authors>
<title>Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes</title>
<journal>Journal of the American Medical Association</ journal>
<pages>18--2530</pages>
<year>1992</year>
<raw_string>Udvarhelyi, I.S., Gatsonis, C.A., Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J. Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes. Journal of the American Medical Association, 1992; 18:2530-2536.</raw_string>
<ctx:context-objects xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='info:ofi/fmt:xml:xsd:ctx http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:ctx' xmlns:ctx='info:ofi/fmt:xml:xsd:ctx'>
  <ctx:context-object timestamp='2008-07-11T00:57:33-04:00'
  encoding='info:ofi/enc:UTF-8' version='Z39.88-2004' identifier=''>
    <ctx:referent>
      <ctx:metadata-by-val>
        <ctx:format>info:ofi/fmt:xml:xsd:journal</ctx:format>
        <ctx:metadata>
          <journal xmlns:rft='info:ofi/fmt:xml:xsd:journal' xsi:schemaLocation='info:ofi/fmt:xml:xsd:journal http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:journal'>
            <rft:atitle>Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes</rft:atitle>
            <rft:spage>18</rft:spage>
            <rft:date>1992</rft:date>
            <rft:stitle>Journal of the American Medical Association</rft:stitle>
            <rft:genre>article</rft:genre>
            <rft:epage>2530</rft:epage>
            <rft:au>I S Udvarhelyi</rft:au>
            <rft:au>C A Gatsonis</rft:au>
            <rft:au>A M Epstein</rft:au>
            <rft:au>C L Pashos</rft:au>
            <rft:au>J P Newhouse</rft:au>
            <rft:au>B J McNeil</rft:au>
          </journal>
        </ctx:metadata>
      </ctx:metadata-by-val>
    </ctx:referent>
  </ctx:context-object>
</ctx:context-objects>
</citation>
</citations>

<%= stylesheet_link_tag "code" %>

API Instructions

Parse a citation

(POST) (FIXME:hostname)/citations/create

Required argument: citation or citation[] - The string(s) to parse.

Header: Accept: text/xml

Returns a list of parsed citations in xml format. Each parsed citation includes a ContextObject with the citation as the referent.

Status code: 201

Examples

 Using Ruby:

require 'net/http'

Net::HTTP.start('localhost', 3000) do |http|
  response = http.post('/citations/create',
    'citation=A. Bookstein and S. T. Klein,  \
    Detecting content-bearing words by serial clustering,  \
    Proceedings of the Nineteenth Annual International ACM SIGIR Conference \
    on Research and Development in Information Retrieval,   \
    pp. 319327,   1995.',
    'Accept' => 'text/xml')

  puts "Code: #{response.code}"
  puts "Message: #{response.message}"
  puts "Body:\n #{response.body}"
end

 Using curl:

Parsing a single citation:

curl -H 'Accept: text/xml' -d "citation=Udvarhelyi, I.S., Gatsonis,
C.A., Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J.
Acute Myocardial Infarction in the Medicare population: process of
care and clinical outcomes. Journal of the American Medical
Association, 1992; 18:2530-2536.  "
http://0.0.0.0:3000/citations/create

Parsing multiple citations:

curl -H 'Accept: text/xml' -d "citation[]=Fielderman, A., Silvester,
G., Gatsonis, C.A., Hoenig, J., Flynn, S. Prognostic significance of
flow cytometric DNA analysis and proliferative index in stage I
non-small cell lung cancer. American Review of Respiratory Disease,
1992; 146:707-710.&citation[]=Udvarhelyi, I.S., Gatsonis, C.A.,
Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J. Acute
Myocardial Infarction in the Medicare population: process of care and
clinical outcomes. Journal of the American Medical Association, 1992;
18:2530-2536.  " http://0.0.0.0:3000/citations/create

Example Return:

<citations>
<citation valid=true>
<authors>
<author>I S Udvarhelyi</author>
<author>C A Gatsonis</author>
<author>A M Epstein</author>
<author>C L Pashos</author>
<author>J P Newhouse</author>
<author>B J McNeil</author>
</authors>
<title>Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes</title>
<journal>Journal of the American Medical Association</ journal>
<pages>18--2530</pages>
<year>1992</year>
<raw_string>Udvarhelyi, I.S., Gatsonis, C.A., Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J. Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes. Journal of the American Medical Association, 1992; 18:2530-2536.</raw_string>
<ctx:context-objects xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='info:ofi/fmt:xml:xsd:ctx http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:ctx' xmlns:ctx='info:ofi/fmt:xml:xsd:ctx'>
  <ctx:context-object timestamp='2008-07-11T00:57:33-04:00'
  encoding='info:ofi/enc:UTF-8' version='Z39.88-2004' identifier=''>
    <ctx:referent>
      <ctx:metadata-by-val>
        <ctx:format>info:ofi/fmt:xml:xsd:journal</ctx:format>
        <ctx:metadata>
          <journal xmlns:rft='info:ofi/fmt:xml:xsd:journal' xsi:schemaLocation='info:ofi/fmt:xml:xsd:journal http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:journal'>
            <rft:atitle>Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes</rft:atitle>
            <rft:spage>18</rft:spage>
            <rft:date>1992</rft:date>
            <rft:stitle>Journal of the American Medical Association</rft:stitle>
            <rft:genre>article</rft:genre>
            <rft:epage>2530</rft:epage>
            <rft:au>I S Udvarhelyi</rft:au>
            <rft:au>C A Gatsonis</rft:au>
            <rft:au>A M EpsteinC</rft:au>
            <rft:au>L Pashos</rft:au>
            <rft:au>J P Newhouse</rft:au>
            <rft:au>B J McNeil</rft:au>
          </journal>
        </ctx:metadata>
      </ctx:metadata-by-val>
    </ctx:referent>
  </ctx:context-object>
</ctx:context-objects>
</citation>
</citations>