corrected action formatters

corrected action formatters

<div id="<%=@list_id%>_table_div" class="<%= @div_class %>">

  <%= form_remote_tag(:update => "#{@list_id}_div", :url => { :controller => "entities", :action => "entities_list"})%>
  <%= form_hidden_fields({ :id => params["id"], :popup => params["popup"]}) %>
<%# FIXME: use EntityDetail
%>

<% details_for_filter =  @entity.ordered_details.collect{|d| [ t(d.name, {:scope => "account" }), d.detail_id]} %>

<%= t("madb_filter_on") %> <select name="detail_filter">  <%= options_for_select(details_for_filter, params["detail_filter"])  %> </select> <%= t("madb_with_value")%> <input type="text" name="value_filter" value="<%=params["value_filter"]%>">
		<%=submit_tag t("madb_submit")%>
    <%= link_to_remote( t("madb_reset"), :update => "#{@list_id}_div", :url => { :controller => "entities", :action => "entities_list", :id => params["id"]}) %>
     <% if !params["popup"] or params["popup"]!="t" %>
     <%= link_to image_tag("icon/big/newWindow.png", :alt =>t("madb_open_in_new_window"), :title =>t("madb_open_in_new_window")  ), {:controller => "entities", :action => "entities_list", :id => params["id"], :overwrite_params => { :popup=>"t", :list_id => @list_id }},  {:target =>  "#{@list_id}_window", :class => "icon" }   %>
      <% end %>
     <%= link_to image_tag("icon/big/floppy.png", :alt =>t("madb_export"), :title =>t("madb_export")  ), {:controller => "entities", :action => "entities_list", :id => params["id"], :overwrite_params => { :format => "csv"  }}, { :class => "icon"}   %>

    </form>

<% if @list.length >0 %>

  <% if @paginator.length>1 %>
	<%= t("madb_page")%>:
	  <% @paginator.each do |page| %>

	      <% if page!=@paginator.current %>
	      <%= link_to_remote( page.number , :update => "#{@list_id}_div", :url => {  :overwrite_params=> { :controller => "entities", :action => "entities_list","#{@list_id}_page".to_sym => page.number, :highlight => nil}  }) %>
	      <% else %>
		<%= page.number %>
	      <% end %>

	  <% end %>
   <%end%>
   (<%= t("madb_number_of_records_in_list", :vars=> {"number" => @paginator.item_count}).send(@paginator.item_count>1 ? "pluralize" : "singularize") %>)

   <table id="entities_list_<%=@entity.name%>" class="entities_list">

  <% @ordered_fields.each do |c| %>
    <% next if @not_in_list_view.include? c or c == "id" %>
  <%=link_to_remote(t(c, { :scope => "account" } ), :update => "#{@list_id}_div", :url => {:controller => "entities", :action => "entities_list",:overwrite_params => {"#{@list_id}_order".to_sym => c}  })  %>
  <% end %>
    <%=t "madb_view"%>
    <%=t "madb_edit"%>
    <%=t "madb_delete"%>

  <% @list.each do |o| %>
    <tr id="<%="tr_#{@list_id}_#{o.id}"%>" <%= %{class="highlight"} if o.id==params["highlight"] %>>
      <%# o.attribute_names.each do |column|
      %>
    <% first_column = nil %>
    <% @ordered_fields.each  do |column| %>
    <% next if @not_in_list_view.include? column or column == "id" %>
    <% first_column||={ 'entity' => t(@entity.name, :scope => "account" ) ,'title'=> t(column, :scope => "account") , 'value'=> o[column] }%>
    <% detail_class = class_from_name(@details[column].data_type.class_name)%>
    <%=detail_class.format_detail :value => o[column], :controller => self %>
    <% end %>

      <%=link_to(image_tag("icon/big/view.png", :border =>0), { :controller => "entities", :action => "view", :id => o.id, :params => { :popup => params["popup"] } }, { :title=> t("madb_view")}) %>

	<%=link_to(image_tag("icon/big/edit.png", :border =>0), { :controller => "entities", :action => "edit", :id => o.id , :params => { :popup => params["popup"] }}, { :title=> t("madb_edit")}) %>

      <% first_column["value"] = @entity.details_in_list_view[0].value_class.format_detail(:value => first_column["value"], :format => :first_column) if @entity.details_in_list_view[0]%>
    <%= link_to_remote( image_tag("icon/big/delete.png", :border =>0), :update => "#{@list_id}_div", :url =>  { :controller => "entities",   :overwrite_params => {:action => "delete",:id => o.id, "#{@list_id}_page".to_sym => @paginator.current } }, :confirm => t("madb_really_delete_entity_question", :vars => first_column ), :title => t("madb_delete") ) %>

  <% end %>

<% else %>
  <%= t("madb_no_data_found") %>
  <%= link_to t("madb_you_can_add_an_entry"), :action => "add", :id => params["id"] %>
<% end %>

<% if flash["error"] %>

<%= flash["error"] %>

<% end %>

test widget


Add links to examples searches.

Add links to examples searches.

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

<% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %>

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Advanced tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby.nil?, "Show most relevant results first", search_url(@query, nil) %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= search_link(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

        <% for result in @xapian_requests.results %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. <%=search_link('climbing lane')%>

Use OR (in capital letters) where you don't mind which word,  e.g. <%=search_link('commons OR lords')%>

Use quotes when you want to find an exact phrase, e.g. <%=search_link('"Liverpool City Council"')%>

variety: with value sent, followup_sent, response, comment, authority or user to select type of thing to search for.

status: to select based on the status or historical status of the request, see table below.

<%=search_link('requested_from:home_office')%> to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

<%=search_link('requested_by:julian_todd')%> to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

<%=search_link('commented_by:tony_bowden')%> to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

<%=search_link('filetype:pdf')%> to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type <%=search_link('01/01/2008..14/01/2008')%> to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

Table of statuses

<%=search_link('status:waiting_response')%>	 Waiting for the public authority to reply

<%=search_link('status:not_held')%>	 The public authority does not have the information requested

<%=search_link('status:rejected')%>	 The request was rejected by the public authority

<%=search_link('status:partially_successful')%>	 Some of the information requested has been received

<%=search_link('status:successful')%>	 All of the information requested has been received

<%=search_link('status:waiting_clarification')%>	 The public authority would like part of the request explained

<%=search_link('status:gone_postal')%>	 The public authority would like to / has responded by post

<%=search_link('status:requires_admin')%>	 A strange reponse, required attention by the WhatDoTheyKnow team

<% end %>

<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %>

<% if @query.nil? %>
    <% @title = "Search Freedom of Information requests, public authorities and users" %>

<%=@title%>

<% elsif @total_hits == 0 %>
    <% @title = "Nothing found for '" + h(@query) + "'" %>
<% else %>
    <% @title = "Results page " + @page.to_s %>
<% end%>

<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %>

Next, select the public authority you'd like to make the request from.

Can't find it?  <%= link_to "Browse all", list_public_bodies_default %> or
            ask us to add it.

<% end %>

<% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %>

       <%= text_field_tag 'query', @query, { :size => 40 } %>
       <%= hidden_field_tag 'sortby', @sortby %>
       <% if @bodies %>
           <%= hidden_field_tag 'bodies', 1 %>
       <% end %>
       <%= submit_tag "Search" %>
       <% if not @show_tips %>
             Advanced tips
       <% end %>

<% end %>

<% if !@query.nil? %>

    <%=link_to_unless @sortby.nil?, "Show most relevant results first", search_url(@query, nil) %>
    |
    <%=link_to_unless @sortby == 'newest', "Newest results first", search_url(@query, 'newest') %>
    <% if @sortby == 'described' %>
    | Recently described results first
    <% end %>

<% end %>

<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %>

No public authorities found

    <% if @spelling_correction %>

Did you mean: <%= link_to @spelling_correction, search_url(@spelling_correction, @postfix) %>

    <% end %>

<%=link_to "Browse all", list_public_bodies_default %> or ask us to add one.

<% end %>

<% if @total_hits == 0 %>

<%=@title %>

<% end %>

<% if not @query.nil? %>
    <% if @spelling_correction %>

Did you mean: <%= link_to @spelling_correction, search_url(@spelling_correction, @postfix) %>

    <% end %>

    <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%>
        <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
    <% end %>

    <% if @xapian_bodies.results.size > 0 %>

<%= "Public authorities " + ((@page-1)*@bodies_per_page+1).to_s + "-" + [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s + " of " + @xapian_bodies.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_bodies.results %>
            <%= render :partial => 'body/body_listing_single', :locals => { :public_body => result[:model] }  %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %>
    <% end %>

    <% if @xapian_users.results.size > 0 %>

<%= "People " + ((@page-1)*@users_per_page+1).to_s + "-" + [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s + " of " + @xapian_users.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% for result in @xapian_users.results %>
            <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %>
    <% end %>

    <% if @xapian_requests.results.size > 0 %>

<%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %>

        <% if @track_thing %>
            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>

        <% for result in @xapian_requests.results %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>

        <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %>
        <% if @track_thing %>

            <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
        <% end %>
    <% end %>
<% end %>

<% if @show_tips %>

Search tips

Enter words that you want to find separated by spaces, e.g. climbing lane

Use OR (in capital letters) where you don't mind which word,  e.g. commons OR lords

Use quotes when you want to find an exact phrase, e.g. "Liverpool City Council"

variety: with value sent, followup_sent, response, comment, authority or user to select type of thing to search for.

status: to select based on the status or historical status of the request, see table below.

requested_from:home_office to search requests from the <%= link_to "Home Office", show_public_body_url(:url_name => 'home_office') %>, typing the name as in the URL.

requested_by:julian_todd to search requests made by <%= link_to "Julian Todd", show_user_url(:url_name => 'julian_todd') %>, typing the name as in the URL.

commented_by:tony_bowden to search annotations made by <%= link_to "Tony Bowden", show_user_url(:url_name => 'tony_bowden') %>, typing the name as in the URL.

request: to restrict to a specific request, typing the title as in the URL.

filetype:pdf to find all responses with PDF attachments. Or try these: <%= IncomingMessage.get_all_file_extentions%>.

Type 01/01/2008..14/01/2008 to only show things that happened in the first two weeks of January.

Read about advanced search operators, such as proximity and wildcards.

status:waiting_response	 Waiting for the public authority to reply

status:not_held	 The public authority does not have the information requested

status:rejected	 The request was rejected by the public authority

status:partially_successful	 Some of the information requested has been received

status:successful	 All of the information requested has been received

status:waiting_clarification	 The public authority would like part of the request explained

status:gone_postal	 The public authority would like to / has responded by post

status:requires_admin	 A strange reponse, required attention by the WhatDoTheyKnow team

<% end %>


Extra metadata for user listing table

Extra metadata for user listing table

  <% for user in users %>

        <%= link_to(''.html_safe, user_admin_url(user))%>
	 <% if user.admin_level == "super" %>
          superuser
	 <% end %>
        <a href="#user_<%=user.id%>" data-toggle="collapse" data-parent="users">
          <%=h user.name%> (<%=user.email%>)

	 updated <%=I18n.l(user.updated_at, :format => "%e %B %Y %H:%M:%S")%>

      <div id="user_<%=user.id%>" class="accordion-body collapse">

            <% user.for_admin_column do |name, value, type|%>

                  <%=h name%>

                  <% if type == 'datetime' %>
                    <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                    (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                  <% else %>
                    <%= h value %>
                  <% end %>

            <% end %>

  <% end %>

<%= will_paginate(users, :class => "paginator") %>

  <% for user in users %>

        <%= link_to(''.html_safe, user_admin_url(user))%>
        <a href="#user_<%=user.id%>" data-toggle="collapse" data-parent="users">
          <%=h user.name%> (<%=user.email%>)

	 I am metadata

      <div id="user_<%=user.id%>" class="accordion-body collapse">

            <% user.for_admin_column do |name, value, type|%>

                  <%=h name%>

                  <% if type == 'datetime' %>
                    <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
                    (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
                  <% else %>
                    <%= h value %>
                  <% end %>

            <% end %>

  <% end %>

<%= will_paginate(users, :class => "paginator") %>


Converted start_form_tag and end_form_tag to form_tag, changed @flash to flash, and added some copy to login page.

<%
	user = if defined? current_user then current_user else nil end
	extension = comment.commentable.class.comments_extension
%>
<div id="comment_<%=comment.id%>" class="comment comment-3" style="margin-left:<%= comment.depth * 50 %>px">
	<a name="comment_<%=comment.id%>">

	<%=hack_form_remote_tag :url => comment_path( comment ), :method => :put %>

<input name="comment[title]" type="text" style="width:100%" value="<%=comment.title%>"/>

			<textarea name="comment[body]" id="comment_text_area" style="width:100%"><%=comment.body%></textarea>

			<%=submit_tag 'Edit' %>

	</form>

<%
	user = if defined? current_user then current_user else nil end
	extension = comment.commentable.class.comments_extension
%>
<div id="comment_<%=comment.id%>" class="comment comment-3" style="margin-left:<%= comment.depth * 50 %>px">
	<a name="comment_<%=comment.id%>">

	<%=hack_form_remote_tag :url => comment_path( comment ), :method => :put %>

<input name="comment[title]" type="text" style="width:100%" value="<%=comment.title%>"/>

			<textarea name="comment[body]" id="comment_text_area" style="width:100%"><%=comment.body%></textarea>

			<%=submit_tag 'Edit' %>

	<%=end_form_tag%>


Wrong parent class...

Wrong parent class...

<% javascript_include("jquery.min") %>
<% javascript_include("semantic_vernacular") %>

Available Features:

Click [+] to see available values for each feature.

  <form>
    <button type="button" onclick="org.mo.sv.create.displayInput()">Submit</button>
    <%= build_feature_hierarchy(SemanticVernacularHelper::FEATURE_ROOT, @all_features) %>
    <button type="button" onclick="org.mo.sv.create.displayInput()">Submit</button>
  </form>

  <%= link_to("Go to all vernacular descriptions",
              :controller => "semantic_vernacular",
              :action => "index") %>

<% javascript_include("jquery.min") %>
<% javascript_include("semantic_vernacular") %>

Available Features:

  <form>
    <button type="button" onclick="org.mo.sv.create.displayInput()">Submit</button>
    <%= build_feature_hierarchy(SemanticVernacularHelper::FEATURE_ROOT, @all_features) %>
    <button type="button" onclick="org.mo.sv.create.displayInput()">Submit</button>
  </form>

  <%= link_to("Go to all vernacular descriptions",
              :controller => "semantic_vernacular",
              :action => "index") %>


Better CSS

Better CSS

<a class="menu" href="<%= spec.name %>.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, <%= spec.name %>, '300px')" onMouseout="delayhidemenu()"><%= spec.name.humanize %>


ActionItem93: login screen points to signup

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

<%= _('Login') %>

<% form_tag do -%>

 <%= _('Username') %>

<%= text_field_tag 'login' %>

 <%= _('Password') %>

<%= password_field_tag 'password' %>

<%= submit_tag 'Log in', {:class => 'submit'} %>

<% end -%>

<%= link_to _("I forgot my password!"), :action => 'forgot_password' %>

<%= link_to _("I want to be an user!"), :action => 'signup' %>

<%= _('Login') %>

<% form_tag do -%>

 <%= _('Username') %>

<%= text_field_tag 'login' %>

 <%= _('Password') %>

<%= password_field_tag 'password' %>

<%= submit_tag 'Log in', {:class => 'submit'} %>

<% end -%>

<%= link_to _("I forgot my password"), :action => 'forgot_password' %>


navigation menus: add class 'submenu'

navigation menus: add class 'submenu'

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

  <%- if logged_in? -%>
    <%- if current_site.network -%>
      <li id='menu_home' class='<%= @active_tab == :home ? 'active' : '' %>'>
        <%= link_to_active 'Home'[:menu_home], '/', @active_tab == :home %>

    <%- end -%>
    <li id='menu-me' class='<%= @active_tab == :me ? 'active' : '' %>'>
      <%= link_to_active 'Me'[:menu_me], '/me/dashboard', @active_tab == :me %>

Dashboard

Inbox

Search

Tasks

Requests

Trash

          Contribute

Recent Pages

A page name

Some other page

  <%- else -%>
    <li class='<%= @active_tab == :home ? 'active' : '' %>'>
      <%= link_to_active "Home"[:menu_home], '/', @active_tab == :home %>

  <%- end -%>

  <%# for now, i am disabling these tabs when not logged in. why? because
      the controllers currently bomb out in bad ways if you are not logged in. %>
  <%- if logged_in? -%>
  <li id='menu-people' class='<%= @active_tab == :people ? 'active' : '' %>'>
    <%= link_to_active "People"[:menu_people], people_url(:action => :friends), @active_tab == :people %>

Friends • More »

  <li id='menu-groups' class='<%= @active_tab == :groups ? 'active' : '' %>'>
    <% url = logged_in? ? group_directory_url(:action => :my) : group_directory_url %>
    <%= link_to_active "Groups"[:menu_groups], url, @active_tab == :groups %>

Crabgrass Dev Network

Crabgrass Dev Network

Crabgrass

Crabgrass Dev Network

Crabgrass Dev Network

Crabgrass

        See all »

  <%- if current_site.has_networks? -%>
    <li id='menu-networks' class='<%= @active_tab == :networks ? 'active' : '' %>'>
      <% url = logged_in? ? network_directory_url(:action => :my) : network_directory_url %>
      <%= link_to_active "Networks"[:menu_networks], url, @active_tab == :networks %>

Crabgrass Dev Network

Crabgrass Dev Network

Crabgrass

           See all »

  <%- end -%>

  <%- if logged_in? and current_site.chat? -%>
  <li class='<%= @active_tab == :chat ? 'active' : '' %>'>
    <%= link_to_active "Chat"[:menu_chat], '/chat', @active_tab == :chat %>

  <%- end -%>

  <%- end -%>
  <%= call_hook :top_menu %>


another slight change in the project list

  <% if @projects.any? %>

<a href="<%= projects_path %>"><%= l(:label_project_plural) %>

<%=l(:label_featured_projects)%>

      <% for project in @projects %>
        <% @project = project %>

        <%= link_to_project project %>
(<%= format_time(project.created_on) %>)

        <%= textilizable project.short_description, :project => project %>

      <% end %>
      <% @project = nil %>

  <% end %>
  <%= call_hook(:view_welcome_index_left, :projects => @projects) %>

<%= textilizable Setting.welcome_text %>

  <% if @news.any? %>

<%=l(:label_news_latest)%>

    <%= render :partial => 'news/news', :collection => @news %>
    <%= link_to l(:label_news_view_all), :controller => 'news' %>

  <% end %>
  <%= call_hook(:view_welcome_index_right, :projects => @projects) %>

<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:controller => 'news', :action => 'index', :key => User.current.rss_key, :format => 'atom'},
                                   :title => "#{Setting.app_title}: #{l(:label_news_latest)}") %>
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :key => User.current.rss_key, :format => 'atom'},
                                   :title => "#{Setting.app_title}: #{l(:label_activity)}") %>
<% end %>


fix a last bug before branching

fix a last bug before branching

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

<% @page_heading = _('Categories') %>

  <% content_for('tasks') do %>
    <%= task_show _('Show this category'), @category.id %>
  <% end %>

<%= _("Are you sure you want to delete the category ")%> '<%= @category.name %>'?

  <% form_tag :action => "destroy", :id => @category.id do %>
  <%= confirm_delete(_("Delete this category")) %>
  <% end %>

<% @page_heading = <%= _('Categories') %>

  <% content_for('tasks') do %>
    <%= task_show _('Show this category'), @category.id %>
  <% end %>

<%= _("Are you sure you want to delete the category ")%> '<%= @category.name %>'?

  <% form_tag :action => "destroy", :id => @category.id do %>
  <%= confirm_delete(_("Delete this category")) %>
  <% end %>


Update Ring Website.

Update Ring Website.

 	    Basic

Applications developed in little hours

Introduction

Getting Started

Getting Started - Second Style

Getting Started - Third Style

Variables

Operators

Control Structures

Control Structures - Second Style

Control Structures - Third Style

Getting Input

Functions

Program Structure

Lists

Strings

Date and Time

Check Data Type and Conversion

Mathematical Functions

Files

 	    Intermediate

System Functions

Eval() and Debugging

Demo Programs

ODBC Functions

MYSQL Functions

SQLite Functions

Security and Internet Functions

Object Oriented Programming

Functional Programming (FP)

Reflection and Meta-programming

Stdlib Functions

Stdlib Classes

Declarative Programming using Nested Structures

Natural language programming

Scope Rules for Variables and Attributes

Scope Rules for Functions and Methods

Syntax Flexibility

Distributing Ring Applications

Web Development (CGI Library)

 	    Advanced

Using RingLibCurl

Graphics and 2D Games programming using RingAllegro

Using RingLibSDL

Demo Project - Game Engine for 2D Games

Building Games for Android

Desktop and Mobile development using RingQt

Building RingQt Applications for Mobile

Objects Library for RingQt Application

Low Level Functions

Extension using the C/C++ languages

Embedding Ring Language in C/C++ Programs

Command Line Options

Code Generator for wrapping C/C++ Libraries

RingLibCurl Functions Reference

RingAllegro Functions Reference

RingLibSDL Functions Reference

RingQt Classes Reference

Frequently Asked Questions (FAQ)

Language Reference

              Group
              Resources
              Team

 	    Basic

Introduction

Getting Started

Getting Started - Second Style

Getting Started - Third Style

Variables

Operators

Control Structures

Control Structures - Second Style

Control Structures - Third Style

Getting Input

Functions

Program Structure

Lists

Strings

Date and Time

Check Data Type and Conversion

Mathematical Functions

Files

 	    Intermediate

System Functions

Eval() and Debugging

Demo Programs

ODBC Functions

MYSQL Functions

SQLite Functions

Security and Internet Functions

Object Oriented Programming

Functional Programming (FP)

Reflection and Meta-programming

Stdlib Functions

Stdlib Classes

Declarative Programming using Nested Structures

Natural language programming

Scope Rules for Variables and Attributes

Scope Rules for Functions and Methods

Syntax Flexibility

Distributing Ring Applications

 	    Advanced

Web Development (CGI Library)

Graphics and 2D Games programming using RingAllegro

Using RingLibSDL

Demo Project - Game Engine for 2D Games

Building Games for Android

Desktop and Mobile development using RingQt

Building RingQt Applications for Mobile

Low Level Functions

Extension using the C/C++ languages

Embedding Ring Language in C/C++ Programs

Command Line Options

Code Generator for wrapping C/C++ Libraries

RingAllegro Functions Reference

RingLibSDL Functions Reference

RingQt Classes Reference

Frequently Asked Questions (FAQ)

Language Reference

              Group
              Resources
              Team


Adds time stamp to comments in admin

Adds time stamp to comments in admin

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

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

Comments on "<%= link_to_article @article %>"

  <% if @comments.any? %>
  <% @comments.reverse.each_with_index do |comment, i| -%>
  <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
    <% if false %>
    <input type="checkbox" title="" />
    <% end %>
    <a name="comment-<%= comment.id %>">
    <% unless comment.body.blank? -%>

"<%= strip_tags(comment.body) %>"

    <% end -%>

      — <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %> said <%=  time_ago_in_words comment.created_at %> ago

    <% if comment.approved? -%>
      <%= link_to_remote 'Unapprove', :url => { :action => 'unapprove',       :id => @article, :comment => comment } %> |
    <% else -%>
      <%= link_to_remote 'Approve',   :url => { :action => 'approve',         :id => @article, :comment => comment } %> |
    <% end -%>
      <%= link_to_remote 'Delete',    :url => { :action => 'destroy_comment', :id => @article, :comment => comment } %>

  <% end -%>
  <% else %>

This article has no <%= params[:filter].to_s.humanize.downcase %> comments.

  <% end %>

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

Comments on "<%= link_to_article @article %>"

  <% if @comments.any? %>
  <% @comments.reverse.each_with_index do |comment, i| -%>
  <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
    <% if false %>
    <input type="checkbox" title="" />
    <% end %>
    <a name="comment-<%= comment.id %>">
    <% unless comment.body.blank? -%>

"<%= strip_tags(comment.body) %>"

    <% end -%>

      — <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %>

    <% if comment.approved? -%>
      <%= link_to_remote 'Unapprove', :url => { :action => 'unapprove',       :id => @article, :comment => comment } %> |
    <% else -%>
      <%= link_to_remote 'Approve',   :url => { :action => 'approve',         :id => @article, :comment => comment } %> |
    <% end -%>
      <%= link_to_remote 'Delete',    :url => { :action => 'destroy_comment', :id => @article, :comment => comment } %>

  <% end -%>
  <% else %>

This article has no <%= params[:filter].to_s.humanize.downcase %> comments.

  <% end %>


Fixed to only show site templates

Fixed to only show site templates

<tbody>
  <%= f.radio_buttons :send_type, [ ['Use custom message','message'],['Send a mail template','template']], :onchange => "SCMS.showHide('custom_message','template_message',this.value == 'template');", :description => 'Should this trigger send using a mail template or a custom message entered below' %>
</tbody>
<tbody id='custom_message' <%= "style='display:none;'" if @action_options.send_type != 'message' %>>
  <%= f.header 'Custom Message' %>
  <%= f.text_field :subject, :required => true %>
  <%= f.text_area :custom_message, :cols => 40, :rows => 5 %>
</tbody>
<tbody id='template_message' <%= "style='display:none;'" if @action_options.send_type != 'template' %>>
  <%= f.header 'Mail Template' %>
  <%= f.select :mail_template_id, MailTemplate.site_template_options %>
<tbody>
  <%= f.header 'Sending Details' %>
  <%= f.radio_buttons :email_to, [['A User profile','user_class'],['One or more specific addresses','addresses'],['Autorespond to submitter','autorespond']],  :label => 'Who to email', :required => true, :onchange => "SCMS.toggle(['email_user_classes','email_addresses'],[this.value=='user_class',this.value=='addresses']);", :separator => '<br/>' %>
  <%= f.text_field :message_from, :description => 'Email Address in "from" field (Leave blank for default or %%attribute_name%% for attribute' %>

</tbody>

<tbody id='email_user_classes' <%= "style='display:none;'" if @action_options.email_to != 'user_class' %>>
  <%= f.select :user_class, available_user_classes, :label => 'User Class to Email', :required => true %>
</tbody>
<tbody id='email_addresses' <%= "style='display:none;'" if @action_options.email_to != 'addresses' %>>
  <%= f.text_area :email_addresses, :cols => 40, :rows => 5, :description => 'Emails to send to - enter one per line (Or %%attribute_name%%)' %>
</tbody>

<tbody>
  <%= f.header "Message Body", :description => 'These elements are included in a template in the %%DATA%% variable or after the custom messsage information above' %>
  <%= f.radio_buttons :include_user_info, [['No','n'],['Yes','y']] %>
  <% if @triggered_action.trigger_type == 'ContentPublication'    %>
    <%= f.select :publication_id, available_display_publication, :label => 'Publication to Email' %>
  <% else   %>
    <%= f.radio_buttons :include_data, [['No','n'],['Yes','y']] %>
  <% end -%>
</tbody>

<tbody>
  <%= f.radio_buttons :send_type, [ ['Use custom message','message'],['Send a mail template','template']], :onchange => "SCMS.showHide('custom_message','template_message',this.value == 'template');", :description => 'Should this trigger send using a mail template or a custom message entered below' %>
</tbody>
<tbody id='custom_message' <%= "style='display:none;'" if @action_options.send_type != 'message' %>>
  <%= f.header 'Custom Message' %>
  <%= f.text_field :subject, :required => true %>
  <%= f.text_area :custom_message, :cols => 40, :rows => 5 %>
</tbody>
<tbody id='template_message' <%= "style='display:none;'" if @action_options.send_type != 'template' %>>
  <%= f.header 'Mail Template' %>
  <%= f.select :mail_template_id, MailTemplate.find_select_options(:all,:order => 'name') %>
<tbody>
  <%= f.header 'Sending Details' %>
  <%= f.radio_buttons :email_to, [['A User profile','user_class'],['One or more specific addresses','addresses'],['Autorespond to submitter','autorespond']],  :label => 'Who to email', :required => true, :onchange => "SCMS.toggle(['email_user_classes','email_addresses'],[this.value=='user_class',this.value=='addresses']);", :separator => '<br/>' %>
  <%= f.text_field :message_from, :description => 'Email Address in "from" field (Leave blank for default or %%attribute_name%% for attribute' %>

</tbody>

<tbody id='email_user_classes' <%= "style='display:none;'" if @action_options.email_to != 'user_class' %>>
  <%= f.select :user_class, available_user_classes, :label => 'User Class to Email', :required => true %>
</tbody>
<tbody id='email_addresses' <%= "style='display:none;'" if @action_options.email_to != 'addresses' %>>
  <%= f.text_area :email_addresses, :cols => 40, :rows => 5, :description => 'Emails to send to - enter one per line (Or %%attribute_name%%)' %>
</tbody>

<tbody>
  <%= f.header "Message Body", :description => 'These elements are included in a template in the %%DATA%% variable or after the custom messsage information above' %>
  <%= f.radio_buttons :include_user_info, [['No','n'],['Yes','y']] %>
  <% if @triggered_action.trigger_type == 'ContentPublication'    %>
    <%= f.select :publication_id, available_display_publication, :label => 'Publication to Email' %>
  <% else   %>
    <%= f.radio_buttons :include_data, [['No','n'],['Yes','y']] %>
  <% end -%>
</tbody>


git-svn-id: svn://beonebody.org/onebody/trunk@36 88fc0095-4724-0410-ab6c-c99dba55acc4

<%= SITE_TITLE %> (<%= SITE_URL %>) is a brand new site that connects members online. The site is currently in "beta" -- we're testing it out and finding bugs. You're welcome to sign in too, and help us improve the system!

<% if @msg.group -%>
The following message was posted to the group "<%= @msg.group.name %>" by <%= @msg.person.name %>:
<% elsif @msg.wall -%>
<%= @msg.person.name %> posted a message on your wall:
<% else -%>
<%= @msg.person.name %> sent you the following message:
<% end -%>
- - - - - - - - - - - - - - - - - - - - - - - -
<% if @msg.subject -%>
Subject: <%= @msg.subject %>
<% end -%>
<%= (@msg.group or @msg.wall) ? 'Posted' : 'Sent' %>: <%= @msg.created_at.strftime '%m/%d/%Y %I:%M %p' %>

<%= @msg.body %>
- - - - - - - - - - - - - - - - - - - - - - - -
<% if @msg.wall -%>
<%= WALL_DESCRIPTION %>

You can see your wall here: <%= SITE_URL %>people/view/<%= @msg.wall.id %>#wall

You can post a message to <%=h @msg.person.name_possessive %>
wall at the following link: <%= SITE_URL %>people/view/<%= @msg.person.id %>#wall
<% else -%>
<% if @msg.share_email -%>
To keep your email address private, reply at:
<% else -%>
To reply, please use the following link:
<% end -%>
<%= @msg.reply_url %>
<% end -%>

Report abuse of the system here: <%= SITE_URL %>messages/abuse


Show resume codes in response table for partial responses

<% if @count == 0 %>

No responses found.

<% else %>
    <% header_fields = @questionnaire.special_field_associations.select { |sfa| sfa.purpose != 'name' }%>

            Response from
            Submit Date
            <% header_fields.each do |header| %>
                <%= header.question.caption %>
            <% end %>
            ID

        <% @responses.each do |response| %>
            <tr class="<%=cycle "even", "odd" %>" style="height: 0">
                <%=link_to_function ellipsize(response.title,35), "showResponse(#{response.id})"%>

                  <% if response.submitted -%>
                    <%=response.submitted_at%>
                  <% else -%>
                    Partial
                    <% if @questionnaire.allow_finish_later -%>
                      (resume code: <%=response.session_code %>)
                    <% end -%>
                  <% end -%>

                <% header_fields.each do |header| %>
										<% answer = response.special_answer(header.purpose) -%>

												<% if answer -%>
														<%= response.special_answer(header.purpose).value %>
												<% end -%>

                <% end %>
                <%= response.id %>

        <% end %>
				<% (Response.per_page - @responses.length).times do %>

        <% end%>

    <%= will_paginate @responses %>
<% end %>

<% if @count == 0 %>

No responses found.

<% else %>
    <% header_fields = @questionnaire.special_field_associations.select { |sfa| sfa.purpose != 'name' }%>

            Response from
            Submit Date
            <% header_fields.each do |header| %>
                <%= header.question.caption %>
            <% end %>
            ID

        <% @responses.each do |response| %>
            <tr class="<%=cycle "even", "odd" %>" style="height: 0">
                <%=link_to_function ellipsize(response.title,35), "showResponse(#{response.id})"%>
                <%=response.submitted_at%>
                <% header_fields.each do |header| %>
										<% answer = response.special_answer(header.purpose) -%>

												<% if answer -%>
														<%= response.special_answer(header.purpose).value %>
												<% end -%>

                <% end %>
                <%= response.id %>

        <% end %>
				<% (Response.per_page - @responses.length).times do %>

        <% end%>

    <%= will_paginate @responses %>
<% end %>


Collapse info request metadata by default

<% @title = _("FOI request - {{title}}", :title => h(@info_request.title)) %>

<%=@title%>

<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
  <%= hidden_field_tag 'info_request_id', @info_request.id %>

    <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="info_request">Show metadata

 <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse">

      <% @info_request.for_admin_column do |name, value, type, column_name|%>

            <%= name %>:

            <% if type == 'datetime' %>
              <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
              (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
            <% else %>
              <%= h value %>
            <% end %>
            <% if column_name == 'described_state' %>

Initial request last sent at: <%= @info_request.calculate_status %>

Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %>

Date response required by: <%= @info_request.date_response_required_by %>

Very overdue after: <%= @info_request.date_very_overdue_after %>

            <% end %>

      <% end %>

          Created by

          <%= link_to("".html_safe, user_url(@info_request.user), :title => "view user's page on public website") %>
          <%= link_to(@info_request.user.name, user_admin_url(@info_request.user)) %>
          <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

              url_name of new user:
              <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
              <%= submit_tag "Move request to user", :class => "btn btn-info" %>

          Public authority:

          <%= link_to("".html_safe, public_body_url(@info_request.public_body), :title => "view authority on public website") %>
          <%= link_to(@info_request.public_body.name, public_body_admin_url(@info_request.public_body)) %>
          <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

            url_name of new authority:
            <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
            <%= submit_tag "Move request to authority", :class => "btn btn-info" %>

          <%=_("Incoming email address")%>

          <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>

          <%=_("Tags")%>

          <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>

<% end %>
<formset class="form-horizontal">
 <legend>Actions</legend>

     Other views of this request

    <%= link_to 'Public page', main_url(request_url(@info_request)), :class => "btn" %>
    <%= link_to 'Edit page', '../edit/' + @info_request.id.to_s, :class => "btn" %>

     FOI officer upload URL

    <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %>

(see also option to general URLs for individual incoming messages below)

   <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>

    Hide the request and notify the user:

     <% if ['hidden', 'requester_only'].include? @info_request.prominence %>

This request has already been hidden

     <% else %>

       <%= radio_button_tag "reason", "not_foi" %> <%= _("Not a valid FOI request") %>

       <%= radio_button_tag "reason", "vexatious" %> <%= _("A vexatious request") %>

     <% end %>

    <% if !['hidden', 'requester_only'].include? @info_request.prominence %>

     Reason for hiding the request (will be emailed to user):

         <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>

     <%= submit_tag _("Hide request"), :class => "btn" %>

    <% end %>
   <% end %>
</formset>

Events

  <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>

       <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="requests">
          <%= _("Event {{id}}", :id => info_request_event.id) %>:

           <%=h info_request_event.event_type.humanize %><% if !info_request_event.calculated_state.nil? %>; state: <%= info_request_event.calculated_state %><% end %>

           <%= info_request_event.created_at%>

      <div id="event_<%=info_request_event.id%>" class="accordion-body collapse">

	        <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
                  <% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %>
                    <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
                    <%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
                  <% end %>
                <% end %>

            <% info_request_event.for_admin_column do |name, value, type, column_name| %>

                  <%=h name%>

                  <% if column_name == 'params_yaml' %>
                    <%= info_request_event.params_yaml_as_html %>
                  <% elsif value.nil? %>
                    nil
                  <% elsif %w(text string).include?(type) %>
                    <%=h value.humanize %>
                  <% elsif type == 'datetime' %>
                    <%= admin_date value %>
                  <% else %>
                    <%=h value %>
                  <% end %>

            <% end %>

  <% end %>

Outgoing messages

  <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>

       <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="requests">
        <a href="../edit_outgoing/<%= outgoing_message.id %>" data-toggle="collapse" data-parent="outgoing_messages">
          #<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %>

	  <%= truncate(outgoing_message.body, :length => 400) %>

      <div id="outgoing_<%=outgoing_message.id%>" class="accordion-body collapse">

                <% form_tag '../resend', :class => "admin-table-form" do %>
                  <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
                  <%= submit_tag "Resend", :class => "btn" %>
                <% end %>

            <% outgoing_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name == 'body' %>
                    <%= simple_format(truncate(outgoing_message.body, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" ))) %>

<%= simple_format( outgoing_message.body ) %>

                  <% else %>
                    <%= admin_value(value) %>
                  <% end %>

            <% end %>

  <% end %>

Incoming messages

  <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>

       <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="requests">
          <%=incoming_message.id%> -- <%= h(incoming_message.mail_from) %> <%=_("at")%> <%=admin_value(incoming_message.sent_at)%>

       	  <% if !incoming_message.cached_main_body_text_folded.nil? %>
       	  <%= truncate(incoming_message.cached_main_body_text_folded.gsub('FOLDED_QUOTED_SECTION', ''), :length => 400) %>
          <% end %>

      <div id="incoming_<%=incoming_message.id%>" class="accordion-body collapse">

                <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

            <% incoming_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name =~ /^cached_.*?$/ %>
                    <%= simple_format( truncate(value, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden"))) %>

<%= simple_format(value) %>

                  <% else %>
                    <%= simple_format(value) %>
                  <% end %>

            <% end %>

  <% end %>

Annotations

<% if @info_request.comments.size > 0 %>

    <% for comment in @info_request.comments %>

         <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="requests">
          <a href="../edit_comment/<%= comment.id %>">
            #<%=comment.id%>
            --
            <%=h(comment.user.name)%>
            <%=admin_value(comment.created_at)%>

	  <%= truncate(comment.body, :length => 400) %>

        <div id="comment_<%=comment.id%>" class="accordion-body collapse">

                 By <%= link_to("".html_safe, user_url(comment.user), :title => "view user's page on public website") %>

                  <%= link_to(h(comment.user.name), user_admin_url(comment.user)) %>

              <% comment.for_admin_column do |name, value, type, column_name |%>

                    <%=name%>

                    <% if column_name == 'body' && !comment.visible %>
                      <s><%=h comment.send(column_name) %></s>
                    <% else %>
                      <%=h comment.send(column_name) %>
                    <% end %>

              <% end %>

    <% end %>

<% else %>

None yet.

<% end %>

Exim delivery logs

(Lines containing the request incoming email address, updated hourly.)

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>

<% @title = _("FOI request - {{title}}", :title => h(@info_request.title)) %>

<%=@title%>

<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
  <%= hidden_field_tag 'info_request_id', @info_request.id %>

      <% @info_request.for_admin_column do |name, value, type, column_name|%>

            <%= name %>:

            <% if type == 'datetime' %>
              <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
              (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
            <% else %>
              <%= h value %>
            <% end %>
            <% if column_name == 'described_state' %>

Initial request last sent at: <%= @info_request.calculate_status %>

Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %>

Date response required by: <%= @info_request.date_response_required_by %>

Very overdue after: <%= @info_request.date_very_overdue_after %>

            <% end %>

      <% end %>

          Created by

          <%= link_to("".html_safe, user_url(@info_request.user), :title => "view user's page on public website") %>
          <%= link_to(@info_request.user.name, user_admin_url(@info_request.user)) %>
          <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

              url_name of new user:
              <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
              <%= submit_tag "Move request to user", :class => "btn btn-info" %>

          Public authority:

          <%= link_to("".html_safe, public_body_url(@info_request.public_body), :title => "view authority on public website") %>
          <%= link_to(@info_request.public_body.name, public_body_admin_url(@info_request.public_body)) %>
          <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>

            url_name of new authority:
            <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
            <%= submit_tag "Move request to authority", :class => "btn btn-info" %>

          <%=_("Incoming email address")%>

          <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>

          <%=_("Tags")%>

          <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>

<% end %>
<formset class="form-horizontal">
 <legend>Actions</legend>

     Other views of this request

    <%= link_to 'Public page', main_url(request_url(@info_request)), :class => "btn" %>
    <%= link_to 'Edit page', '../edit/' + @info_request.id.to_s, :class => "btn" %>

     FOI officer upload URL

    <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %>

(see also option to general URLs for individual incoming messages below)

   <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>

    Hide the request and notify the user:

     <% if ['hidden', 'requester_only'].include? @info_request.prominence %>

This request has already been hidden

     <% else %>

       <%= radio_button_tag "reason", "not_foi" %> <%= _("Not a valid FOI request") %>

       <%= radio_button_tag "reason", "vexatious" %> <%= _("A vexatious request") %>

     <% end %>

    <% if !['hidden', 'requester_only'].include? @info_request.prominence %>

     Reason for hiding the request (will be emailed to user):

         <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>

     <%= submit_tag _("Hide request"), :class => "btn" %>

    <% end %>
   <% end %>
</formset>

Events

  <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>

       <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="requests">
          <%= _("Event {{id}}", :id => info_request_event.id) %>:

           <%=h info_request_event.event_type.humanize %><% if !info_request_event.calculated_state.nil? %>; state: <%= info_request_event.calculated_state %><% end %>

           <%= info_request_event.created_at%>

      <div id="event_<%=info_request_event.id%>" class="accordion-body collapse">

	        <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
                  <% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %>
                    <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
                    <%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
                  <% end %>
                <% end %>

            <% info_request_event.for_admin_column do |name, value, type, column_name| %>

                  <%=h name%>

                  <% if column_name == 'params_yaml' %>
                    <%= info_request_event.params_yaml_as_html %>
                  <% elsif value.nil? %>
                    nil
                  <% elsif %w(text string).include?(type) %>
                    <%=h value.humanize %>
                  <% elsif type == 'datetime' %>
                    <%= admin_date value %>
                  <% else %>
                    <%=h value %>
                  <% end %>

            <% end %>

  <% end %>

Outgoing messages

  <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>

       <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="requests">
        <a href="../edit_outgoing/<%= outgoing_message.id %>" data-toggle="collapse" data-parent="outgoing_messages">
          #<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %>

	  <%= truncate(outgoing_message.body, :length => 400) %>

      <div id="outgoing_<%=outgoing_message.id%>" class="accordion-body collapse">

                <% form_tag '../resend', :class => "admin-table-form" do %>
                  <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
                  <%= submit_tag "Resend", :class => "btn" %>
                <% end %>

            <% outgoing_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name == 'body' %>
                    <%= simple_format(truncate(outgoing_message.body, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" ))) %>

<%= simple_format( outgoing_message.body ) %>

                  <% else %>
                    <%= admin_value(value) %>
                  <% end %>

            <% end %>

  <% end %>

Incoming messages

  <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>

       <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="requests">
          <%=incoming_message.id%> -- <%= h(incoming_message.mail_from) %> <%=_("at")%> <%=admin_value(incoming_message.sent_at)%>

       	  <% if !incoming_message.cached_main_body_text_folded.nil? %>
       	  <%= truncate(incoming_message.cached_main_body_text_folded.gsub('FOLDED_QUOTED_SECTION', ''), :length => 400) %>
          <% end %>

      <div id="incoming_<%=incoming_message.id%>" class="accordion-body collapse">

                <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %>

            <% incoming_message.for_admin_column do |name, value, type, column_name| %>

                  <%=name%>

                  <% if column_name =~ /^cached_.*?$/ %>
                    <%= simple_format( truncate(value, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden"))) %>

<%= simple_format(value) %>

                  <% else %>
                    <%= simple_format(value) %>
                  <% end %>

            <% end %>

  <% end %>

Annotations

<% if @info_request.comments.size > 0 %>

    <% for comment in @info_request.comments %>

         <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="requests">
          <a href="../edit_comment/<%= comment.id %>">
            #<%=comment.id%>
            --
            <%=h(comment.user.name)%>
            <%=admin_value(comment.created_at)%>

	  <%= truncate(comment.body, :length => 400) %>

        <div id="comment_<%=comment.id%>" class="accordion-body collapse">

                 By <%= link_to("".html_safe, user_url(comment.user), :title => "view user's page on public website") %>

                  <%= link_to(h(comment.user.name), user_admin_url(comment.user)) %>

              <% comment.for_admin_column do |name, value, type, column_name |%>

                    <%=name%>

                    <% if column_name == 'body' && !comment.visible %>
                      <s><%=h comment.send(column_name) %></s>
                    <% else %>
                      <%=h comment.send(column_name) %>
                    <% end %>

              <% end %>

    <% end %>

<% else %>

None yet.

<% end %>

Exim delivery logs

(Lines containing the request incoming email address, updated hourly.)

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>


adjusted the video size

adjusted the video size

Welcome to Maximum Size Database!

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

  <% unless @current_logged_in_user %>

	<fieldset class="narrow">

Please Log In

    <% form_tag 'login/login' do %>

          Please log in if you want to add data or comments.

          Email Address	<%= text_field_tag :email_address, params[:email_address] %>

            Password

          <%= password_field_tag :password %>

            <%= submit_tag 'Login' %>

            <%= link_to("I forgot my password!", :controller => 'login', :action => "password_reset") %>

            <%= link_to("I am a new user and want to register.",:controller => 'register', :action => 'index') %>

    <% end %>
  </fieldset>
  <% end %>
  <% form_tag 'bodysize/list' do %>
		<input type="hidden" name="need_template" />
		<input type="hidden" name="group_by" value=""/>
		<input type="hidden" name="bodysize[graph]" value="0" />

		<fieldset  class="narrow">

Search Data

Start	<%= select("bodysize", "start_period_midpoint", @start_period_options) %>

End	<%= select("bodysize", "end_period_midpoint", @end_period_options) %>

Kingdom	<%= select("bodysize", "kingdom_id", @kingdom_options, {:include_blank => true}) %>

Phylum	<%= select("bodysize", "phylum_id", @phylum_options, {:include_blank => true}) %>

Class	<%= text_field_tag "bodysize[class_classification]" %>

Environment	<%= select("bodysize", "environment_id", @environment_options, {:include_blank => true}) %>

Motility	<%= select("bodysize", "motility_id", @motility_options, {:include_blank => true}) %>

<%= submit_tag 'Search', :id => "search_button" %>

	</fieldset>

	<% end %>
	<fieldset  class="narrow">

Educational Video

If you can see this text instead of a movie, you need to install or update Adobe's Flash Player (go to http://www.adobe.com/go/getflashplayer).

    </fieldset>


Fix id passing

Fix id passing

<div<%= user && " class='logged-in'" %>>

    <% if @page.allow_edit?(user) && !remove_content_button(:edit) %>
      <% content = content_tag('span', label_for_edit_article(@page)) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }) %>
      <%= expirable_button @page, :edit, content, url %>
    <% end %>

    <% if @page != profile.home_page && !@page.has_posts?  && @page.allow_delete?(user) && !remove_content_button(:delete)%>
      <% content = content_tag( 'span', _('Delete') ) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page.id}) %>
      <% options = {:method => :post, :confirm => delete_article_message(@page)} %>
      <%= expirable_button @page, :delete, content, url, options %>
    <% end %>

    <% if !@page.folder? && @page.allow_spread?(user) && !remove_content_button(:spread) %>
      <% content = content_tag( 'span', _('Spread this') ) %>
      <% url = nil %>
      <% if profile.kind_of?(Person) %>
        <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page.id }) %>
      <% elsif profile.kind_of?(Community) && environment.portal_community %>
        <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page.id }) %>
      <% end %>
      <%= expirable_button @page, :spread, content, url if url %>
    <% end %>

    <% if !@page.gallery? && (@page.allow_create?(user) || (@page.parent && @page.parent.allow_create?(user))) %>
      <% if @page.translatable? && !@page.native_translation.language.blank? && !remove_content_button(:locale) %>
        <% content = _('Add translation') %>
        <% parent_id = (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)) %>
        <% url = profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => parent_id, :type => @page.type, :article => { :translation_of_id => @page.native_translation.id })%>
        <%= expirable_button @page, :locale, content, url %>
      <% end %>

      <%= colorbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) unless remove_content_button(:new) %>
    <% end %>

    <% if @page.accept_uploads? && @page.allow_create?(user) %>
      <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) unless remove_content_button(:upload)%>
    <% end %>

    <% if !@page.allow_create?(user) && profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) && !remove_content_button(:suggest) %>
      <% content = content_tag( 'span', _('Suggest an article') ) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}) %>
      <% options = {:id => 'suggest-article-link'} %>
      <%= expirable_button @page, :suggest, content, url, options %>
    <% end %>

    <% if @page.display_versions? %>
      <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %>
    <% end %>

    <%= report_abuse(profile, :link, @page) %>

    <% if @page.blog? and !@page.image.nil? %>

<%= image_tag(@page.image.public_filename())%>

    <% end %>
    <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
    <%= @plugins.dispatch(:article_header_extra_contents, @page).collect { |content| instance_eval(&content) }.join("") %>
    <%= article_title(@page, :no_link => true) %>
    <%= article_translations(@page) %>

<div<%= user && " class='logged-in'" %>>

    <% if @page.allow_edit?(user) && !remove_content_button(:edit) %>
      <% content = content_tag('span', label_for_edit_article(@page)) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }) %>
      <%= expirable_button @page, :edit, content, url %>
    <% end %>

    <% if @page != profile.home_page && !@page.has_posts?  && @page.allow_delete?(user) && !remove_content_button(:delete)%>
      <% content = content_tag( 'span', _('Delete') ) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page}) %>
      <% options = {:method => :post, :confirm => delete_article_message(@page)} %>
      <%= expirable_button @page, :delete, content, url, options %>
    <% end %>

    <% if !@page.folder? && @page.allow_spread?(user) && !remove_content_button(:spread) %>
      <% content = content_tag( 'span', _('Spread this') ) %>
      <% url = nil %>
      <% if profile.kind_of?(Person) %>
        <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }) %>
      <% elsif profile.kind_of?(Community) && environment.portal_community %>
        <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }) %>
      <% end %>
      <%= expirable_button @page, :spread, content, url if url %>
    <% end %>

    <% if !@page.gallery? && (@page.allow_create?(user) || (@page.parent && @page.parent.allow_create?(user))) %>
      <% if @page.translatable? && !@page.native_translation.language.blank? && !remove_content_button(:locale) %>
        <% content = _('Add translation') %>
        <% parent_id = (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)) %>
        <% url = profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => parent_id, :type => @page.type, :article => { :translation_of_id => @page.native_translation.id })%>
        <%= expirable_button @page, :locale, content, url %>
      <% end %>

      <%= colorbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) unless remove_content_button(:new) %>
    <% end %>

    <% if @page.accept_uploads? && @page.allow_create?(user) %>
      <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) unless remove_content_button(:upload)%>
    <% end %>

    <% if !@page.allow_create?(user) && profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) && !remove_content_button(:suggest) %>
      <% content = content_tag( 'span', _('Suggest an article') ) %>
      <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}) %>
      <% options = {:id => 'suggest-article-link'} %>
      <%= expirable_button @page, :suggest, content, url, options %>
    <% end %>

    <% if @page.display_versions? %>
      <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %>
    <% end %>

    <%= report_abuse(profile, :link, @page) %>

    <% if @page.blog? and !@page.image.nil? %>

<%= image_tag(@page.image.public_filename())%>

    <% end %>
    <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
    <%= @plugins.dispatch(:article_header_extra_contents, @page).collect { |content| instance_eval(&content) }.join("") %>
    <%= article_title(@page, :no_link => true) %>
    <%= article_translations(@page) %>


Patch from crschmidt to add an obvious permalink to the bottom right
corner of the slippy map. Tested on FF2, IE7, Opera and Safari.

Closes #566.

<% content_for :greeting do %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<% end %>
<% end %>

<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
<%= render :partial => 'key' %>
<%= render :partial => 'search' %>

Permalink

<% if params['mlon'] and params['mlat'] %>
<% marker = true %>
<% mlon = params['mlon'] %>
<% mlat = params['mlat'] %>
<% end %>

<% if params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat'] %>
<% bbox = true %>
<% minlon = params['minlon'] %>
<% minlat = params['minlat'] %>
<% maxlon = params['maxlon'] %>
<% maxlat = params['maxlat'] %>
<% end %>

<% if params['lon'] and params['lat'] %>
<% lon =  params['lon'] %>
<% lat =  params['lat'] %>
<% zoom =  params['zoom'] || '5' %>
<% layers = params['layers'] %>
<% elsif params['mlon'] and params['mlat'] %>
<% lon = params['mlon'] %>
<% lat = params['mlat'] %>
<% zoom =  params['zoom'] || '12' %>
<% layers = params['layers'] %>
<% elsif cookies.key?("location") %>
<% lon,lat,zoom,layers = cookies["location"].value.first.split(",") %>
<% elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<% lon =  @user.home_lon %>
<% lat =  @user.home_lat %>
<% zoom = '10' %>
<% else %>
<% session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location] %>
<% if session[:location] %>
<% bbox = true %>
<% minlon = session[:location][:minlon] %>
<% minlat = session[:location][:minlat] %>
<% maxlon = session[:location][:maxlon] %>
<% maxlat = session[:location][:maxlat] %>
<% else %>
<% lon =  '-0.1' %>
<% lat =  '51.5' %>
<% zoom =  params['zoom'] || '5' %>
<% layers = params['layers'] %>
<% end %>
<% end %>

<%= javascript_include_tag 'map.js' %>

<% content_for :greeting do %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<% end %>
<% end %>

<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
<%= render :partial => 'key' %>
<%= render :partial => 'search' %>

<% if params['mlon'] and params['mlat'] %>
<% marker = true %>
<% mlon = params['mlon'] %>
<% mlat = params['mlat'] %>
<% end %>

<% if params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat'] %>
<% bbox = true %>
<% minlon = params['minlon'] %>
<% minlat = params['minlat'] %>
<% maxlon = params['maxlon'] %>
<% maxlat = params['maxlat'] %>
<% end %>

<% if params['lon'] and params['lat'] %>
<% lon =  params['lon'] %>
<% lat =  params['lat'] %>
<% zoom =  params['zoom'] || '5' %>
<% layers = params['layers'] %>
<% elsif params['mlon'] and params['mlat'] %>
<% lon = params['mlon'] %>
<% lat = params['mlat'] %>
<% zoom =  params['zoom'] || '12' %>
<% layers = params['layers'] %>
<% elsif cookies.key?("location") %>
<% lon,lat,zoom,layers = cookies["location"].value.first.split(",") %>
<% elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<% lon =  @user.home_lon %>
<% lat =  @user.home_lat %>
<% zoom = '10' %>
<% else %>
<% session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location] %>
<% if session[:location] %>
<% bbox = true %>
<% minlon = session[:location][:minlon] %>
<% minlat = session[:location][:minlat] %>
<% maxlon = session[:location][:maxlon] %>
<% maxlat = session[:location][:maxlat] %>
<% else %>
<% lon =  '-0.1' %>
<% lat =  '51.5' %>
<% zoom =  params['zoom'] || '5' %>
<% layers = params['layers'] %>
<% end %>
<% end %>

<%= javascript_include_tag 'map.js' %>


Reenable trace uploads.

Reenable trace uploads.

<%= render :partial => 'trace_header' %>
<%= render :partial => 'trace_form' %>
<%= render :partial => 'trace_list' %>

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

GPX Uploading is currently unavailable

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


Put id at top

Put id at top

<% @title = "User - " + h(@admin_user.name) %>

<%=@title%>

ID: <%= @admin_user.id%>
<% for column in User.content_columns %>
    <%= column.human_name %>:
    <% if column.name == 'email' %>
        <a href="mailto:<%=h @admin_user.email %>"><%=h @admin_user.email%>
    <% else %>
        <%=h @admin_user.send(column.name) %>
    <% end %>

<% end %>

<%= link_to 'Public page', main_url(user_url(@admin_user)) %>

<% @title = "User - " + h(@admin_user.name) %>

<%=@title%>

<% for column in User.content_columns %>
    <%= column.human_name %>:
    <% if column.name == 'email' %>
        <a href="mailto:<%=h @admin_user.email %>"><%=h @admin_user.email%>
    <% else %>
        <%=h @admin_user.send(column.name) %>
    <% end %>

<% end %>
ID: <%= @admin_user.id%>

<%= link_to 'Public page', main_url(user_url(@admin_user)) %>


Yuck, needs a duplicate or erases actual list.

<% @title = "Public authority - " + h(@public_body.name) %>

<%=@title%>

<%
   columns = PublicBody.content_columns + [] # force dup
   columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}

   for column in columns %>
  <%= column.human_name %>:
  <% if column.name == 'home_page' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name))  %>
  <% elsif column.name == 'request_email' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), "mailto:" + @public_body.send(column.name))  %>
  <% else %>
      <%=h @public_body.send(column.name) %>
  <% end %>

<% end %>
Calculated home page:
<% if !@public_body.calculated_home_page.nil? %>
    <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
<% else %>
    *unknown*
<% end %>

Tags: <%= @public_body.public_body_tags.map { |t|
        link_to(h(t.name), list_public_bodies_url(:tag => t.name)) +
        ' (admin)' }.join(' ') %>

    <%= link_to 'Public page', main_url(public_body_url(@public_body)) %>
    | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>

History

<%
    history_columns = PublicBody.content_columns + [] # force dup
    history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter'].include?(c.name)}
    for column in history_columns %>
  <%= column.human_name %>
<% end %>
Updated at

<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %>
<% for historic_public_body in @public_body.versions.sort { |a,b| b.version <=> a.version } %>
      <tr class="<%= cycle('odd', 'even') %>">
    <% for column in history_columns %>
      <%
        value = h(historic_public_body.send(column.name))
        if column.name == 'last_edit_comment'
            value = historic_public_body.last_edit_comment_for_html_display
        end
        # Highlight entries which have changed since previous version
        changed = (not ['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
      <td <%= changed ? ' class="entry_changed" ': '' %> >
      <%=value%>

    <% end %>
      <%=h historic_public_body.updated_at %>

<% end %>

Requests

<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %>

Track things

<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %>

<% @title = "Public authority - " + h(@public_body.name) %>

<%=@title%>

<%
   columns = PublicBody.content_columns
   columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}

   for column in columns %>
  <%= column.human_name %>:
  <% if column.name == 'home_page' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name))  %>
  <% elsif column.name == 'request_email' and !column.name.empty? %>
    <%= link_to(h(@public_body.send(column.name)), "mailto:" + @public_body.send(column.name))  %>
  <% else %>
      <%=h @public_body.send(column.name) %>
  <% end %>

<% end %>
Calculated home page:
<% if !@public_body.calculated_home_page.nil? %>
    <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
<% else %>
    *unknown*
<% end %>

Tags: <%= @public_body.public_body_tags.map { |t|
        link_to(h(t.name), list_public_bodies_url(:tag => t.name)) +
        ' (admin)' }.join(' ') %>

    <%= link_to 'Public page', main_url(public_body_url(@public_body)) %>
    | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>

History

<%
    history_columns = PublicBody.content_columns
    history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter'].include?(c.name)}
    for column in history_columns %>
  <%= column.human_name %>
<% end %>
Updated at

<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %>
<% for historic_public_body in @public_body.versions.sort { |a,b| b.version <=> a.version } %>
      <tr class="<%= cycle('odd', 'even') %>">
    <% for column in history_columns %>
      <%
        value = h(historic_public_body.send(column.name))
        if column.name == 'last_edit_comment'
            value = historic_public_body.last_edit_comment_for_html_display
        end
        # Highlight entries which have changed since previous version
        changed = (not ['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
      <td <%= changed ? ' class="entry_changed" ': '' %> >
      <%=value%>

    <% end %>
      <%=h historic_public_body.updated_at %>

<% end %>

Requests

<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %>

Track things

<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %>


remove :cache on stylesheet_link_tag

remove :cache on stylesheet_link_tag

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

    <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
    <title>VIFF </title>
    <%= stylesheet_link_tag "main" , :media => "all" %>
    <%= javascript_include_tag :defaults %>
    <%= active_scaffold_includes %>
    <%= calendar_date_select_includes "gren"%>
    <%= stylesheet_link_tag 'formtastic', 'formtastic_changes'%>

VIFF -  <%= Option.get("section") %>

Hem

          <% if logged_in? %>
              <%= link_to "Logga ut", logout_url %>
        <% else %>
              <%= link_to "Logga in", login_url %>
        <% end %>

          <% if logged_in? %>
            Välkommen <%= current_user.name%>
          <% end %>

           <% if logged_in? %>
            (Din medlemsavgift är <%= current_user.paid ? "betalt" : "icke betalt"%>)
          <% end %>

        <%= render(:partial => "shared/left_menu") %>

           <% if flash[:notice] -%>

<%= flash[:notice] %>

           <% end -%>
           <% if flash[:error] -%>

<%= flash[:error] %>

           <% end -%>
        	 <%= yield :layout %>

Hemsidan designad av Le Chi Thu <%= render(:partial => "shared/version") %>

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

    <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
    <title>VIFF </title>
    <%= stylesheet_link_tag "main" , :media => "all" %>
    <%= javascript_include_tag :defaults %>
    <%= active_scaffold_includes %>
    <%= calendar_date_select_includes "gren"%>
    <%= stylesheet_link_tag 'formtastic', 'formtastic_changes', :cache => "base" %>

VIFF -  <%= Option.get("section") %>

Hem

          <% if logged_in? %>
              <%= link_to "Logga ut", logout_url %>
        <% else %>
              <%= link_to "Logga in", login_url %>
        <% end %>

          <% if logged_in? %>
            Välkommen <%= current_user.name%>
          <% end %>

           <% if logged_in? %>
            (Din medlemsavgift är <%= current_user.paid ? "betalt" : "icke betalt"%>)
          <% end %>

        <%= render(:partial => "shared/left_menu") %>

           <% if flash[:notice] -%>

<%= flash[:notice] %>

           <% end -%>
           <% if flash[:error] -%>

<%= flash[:error] %>

           <% end -%>
        	 <%= yield :layout %>

Hemsidan designad av Le Chi Thu <%= render(:partial => "shared/version") %>


arreglado para que mande el mail a la máquina sir

git-svn-id: 268669d3058f191005ae665964cd19b71efa10c4@14330 3f47a204-8049-4147-aab0-d444c64e7564

<%= @name %>,

Thank you for registering in SIR. To confirm your email address, please visit the following url:

http://sir.dit.upm.es:80/activate/<%= @hash %>

<%= @name %>,

Thank you for registering in SIR. To confirm your email address, please visit the following url:

http://yoshi.dit.upm.es:3000/activate/<%= @hash %>


avoid deprecation warnings

avoid deprecation warnings

<%= form_tag({:action => 'submit'}, {:id => 'form'}) %>
  Login: <%= text_field 'account', 'login', :id => 'account-new-login' %>

  Password: <%= password_field_tag 'account[password]', nil,
        :id => 'account-new-password' %>

  <%= check_box_tag 'remember' %> Remember login?

  Comments?
  <%= text_area 'account', 'comments' %>

  Country:
  <%= select 'account', 'country', ['US', 'Canada', 'Others'] %>

  <%= submit_tag 'Login' %>
</form>

<%= form_tag({:action => 'submit'}, {:id => 'form'}) %>
  Login: <%= text_field 'account', 'login', :id => 'account-new-login' %>

  Password: <%= password_field_tag 'account[password]', nil,
        :id => 'account-new-password' %>

  <%= check_box_tag 'remember' %> Remember login?

  Comments?
  <%= text_area 'account', 'comments' %>

  Country:
  <%= select 'account', 'country', ['US', 'Canada', 'Others'] %>

  <%= submit_tag 'Login' %>
<%= end_form_tag %>


Removed the description bit from the index page -- there's just no way to make it work gracefully.

--HG--
extra : convert_revision : svn%3A8c66a899-4b77-dc11-840b-00304827d434/trunk%408

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

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

	<title><%= h options.title %></title>

	<link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />

	<% $stderr.sync = true %>

<%= h options.title %>

	<% if options.main_page && files.key?( options.main_page ) %>

        <%= files[ options.main_page ]['description'].sub(%r{^\s*
}i, '') %>

	<% else %>

This is the API documentation for '<%= options.title %>'.

	<% end %>

Classes/Modules

		<% modsort.each do |classname| %>
		<% classdata = classes[classname] %>
		<li class="<%= classdata['classmod'].downcase %>"><a
			href="<%= classdata['full_name'].gsub( /::/, '/' ) + '.html' %>"><%= classdata['full_name'] %>

		<% end %>

[Validate]

Generated with the Darkfish
		Rdoc Generator.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

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

	<title><%= h options.title %></title>

	<link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />

	<% $stderr.sync = true %>

<%= h options.title %>

	<% if options.main_page && files.key?( options.main_page ) %>

        <%= files[ options.main_page ]['description'].sub(%r{^\s*
}i, '') %>

	<% else %>

This is the API documentation for '<%= options.title %>'.

	<% end %>

Classes/Modules

		<% modsort.each do |classname| %>
		<% classdata = classes[classname] %>
		<li class="<%= classdata['classmod'].downcase %>"><a
			href="<%= classdata['full_name'].gsub( /::/, '/' ) + '.html' %>"><%= classdata['full_name'] %>
			— <%= classdata['description'] ?
				classdata['description'].gsub( %r{^
|
$}, '' ).strip :
				"(no description)" %>

		<% end %>

[Validate]

Generated with the Darkfish
		Rdoc Generator.


Fixed zone id display. Added links to quests and NPCs, even though those pages don't exist yet.

<%
@id = id
run 'search.rb'

def questArea(row)
	z = row[:ZoneOrSort]
	return '' if(!z)
	a = AREA_TABLE[row[:ZoneOrSort]]
	return '' if(!a)
	return "#{a[:name]}"
end
%>

Search results for:
<%=
id[1]
%>

<%= @zones.size %>
Zones:

ID	Name

<% @zones.each do |id, name| %>
<%= "
#{id}	"+
"#{name}
" %>
<% end %>

<%= @quests.size %>
Quests:

ID	Zone	MinLevel	QuestLevel	Title

<% @quests.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{questArea(row)}	"+
"#{row[:MinLevel]}	"+
"#{row[:QuestLevel]}	"+
"#{row[:title]}
" %>
<% end %>

<%= @creatures.size %>
NPCs:

ID	MinLevel	MaxLevel	Rank	Name	Title

<% @creatures.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{row[:minlevel]}	"+
"#{row[:maxlevel]}	"+
"#{row[:rank]}	"+
"#{row[:name]}	"+
"#{row[:subname]}
" %>
<% end %>

<%
@id = id
run 'search.rb'

def questArea(row)
	z = row[:ZoneOrSort]
	return '' if(!z)
	a = AREA_TABLE[row[:ZoneOrSort]]
	return '' if(!a)
	return "#{a[:name]}"
end
%>

Search results for:
<%=
id[1]
%>

<%= @zones.size %>
Zones:

ID	Name

<% @zones.each do |id, name| %>
<%= "
id	"+
"#{name}
" %>
<% end %>

<%= @quests.size %>
Quests:

ID	Zone	MinLevel	QuestLevel	Title

<% @quests.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{questArea(row)}	"+
"#{row[:MinLevel]}	"+
"#{row[:QuestLevel]}	#{row[:title]}
" %>
<% end %>

<%= @creatures.size %>
Creatures:

ID	MinLevel	MaxLevel	Rank	Name	Title

<% @creatures.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{row[:minlevel]}	"+
"#{row[:maxlevel]}	"+
"#{row[:rank]}	"+
"#{row[:name]}	#{row[:subname]}
" %>
<% end %>


ActionItem31: listing tags with links to them

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

<%= @page.title %>

  <%= _('Tags: %s') % (@page.tags.map { |t| link_to(t, tag_url(:tag => t.name)) }.join(', ')) %>

<% if @page.parent && !@page.parent.path.blank? %>
  <%= link_to_document(@page.parent, _('Up')) %>
<% end %>
<% if logged_in?  && current_user.person.has_permission?('post_content', profile) %>
  <%= link_to _('Edit'), :controller => 'cms', :action => 'edit', :id => @page %>
<% end %>

<%= @page.to_html %>

<%= @page.title %>

  <%= _('Tags: %s') % @page.tags %>

<% if @page.parent && !@page.parent.path.blank? %>
  <%= link_to_document(@page.parent, _('Up')) %>
<% end %>
<% if logged_in?  && current_user.person.has_permission?('post_content', profile) %>
  <%= link_to _('Edit'), :controller => 'cms', :action => 'edit', :id => @page %>
<% end %>

<%= @page.to_html %>


Duplicating article-actions to avoid empty div

(ActionItem1911)

<%
  if @page.parent && @page.parent.has_posts? && @page.parent.feed
    add_rss_feed_to_head(@page.parent.name, @page.parent.feed.url)
  end
%>

<div id="article" class="<%= @page.css_class_name %>">

<div<%= " class='logged-in'" if user %>>
  <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %>

      <% if @page.allow_post_content?(user) %>
        <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
            profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
            :class => 'button with-text icon-edit' %>
        <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
          <% if @page != profile.home_page && !@page.has_posts? %>
            <%= link_to content_tag( 'span', _('Delete') ),
              profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }),
              :class => 'button with-text icon-delete' %>
          <% end %>
          <% if !environment.enabled?('disable_cms') && !@page.folder? %>
            <% if profile.kind_of?(Person) %>
              <%= link_to content_tag( 'span', _('Spread this') ),
                  profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
                  :class => 'button with-text icon-spread' %>
            <% elsif profile.kind_of?(Community) && environment.portal_community %>
              <%= link_to content_tag( 'span', _('Spread this') ),
                  profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }),
                  :class => 'button with-text icon-spread' %>
            <% end %>
          <% end %>
        <% end %>
      <% end %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if !@page.gallery? %>
          <%= link_to _('Add translation'),
              profile.admin_url.merge(:controller => 'cms', :action => 'new',
                                      :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)),
                                      :type => @page.type, :article => { :translation_of_id => @page.native_translation.id }),
              :class => 'button with-text icon-locale' if @page.translatable? && !@page.native_translation.language.blank? %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
        <% if (@page.folder? && !@page.has_posts?) || (@page.parent && @page.parent.folder? && !@page.parent.has_posts?) %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% end %>
      <% end %>
      <% if profile.kind_of?(Enterprise) && @page.gallery? %>
        <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
      <% end %>

  <% elsif profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) %>

      <%= link_to content_tag( 'span', _('Suggest an article') ), profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}), :id => 'suggest-article-link', :class => 'button with-text icon-new' %>

  <% end %>

    <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
    <%= article_title(@page, :no_link => true) %>
    <%= article_translations(@page) %>

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

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

<% end %>

<% if @page.display_hits? %>

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

<% end %>

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

  <%= button(:back, _('Go back to %s') % @page.parent.short_title, @page.parent.url) %>

<% end %>

<%= render :partial => 'shared/disabled_enterprise' %>

<% cache(@page.cache_key(params, user)) do %>
  <div class="<%="article-body article-body-" + @page.css_class_name %>">
    <% options = @page.image? ? {:gallery_view => true} : {} %>
    <%= article_to_html(@page, options) %>

<% end %>

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

<%= _('Categories') %>

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

<% end %>

<%= display_source_info(@page) %>

<% if NOOSFERO_CONF['addthis_enabled'] %>

<% end %>

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

  <% if @comments_count > 1 %>

<%= _('Post a comment') %>

  <% end %>

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

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

  <% end %>

<%= add_zoom_to_images %>


html escape the field values to be displayed, so we get the nicetag shown

git-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@502127 13f79535-47bb-0310-9956-ffa450edef68

<% @results[0]['features'].each do |f| %>
  <%= h f%>
<% end %>

<% @results[0]['features'].each do |f| %>
  <%= f%>
<% end %>