updating links in demo for version 1.0

updating links in demo for version 1.0

git-svn-id: b6390d97d9ded5bc793696aad9e4256efc0f90b3@465 561dde7e-7729-0410-be8e-ef83869d6c7d

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">

  <title>ActiveScaffold :: Demo</title>
  <%= javascript_include_tag :defaults, "code_highlighter/code_highlighter", "code_highlighter/ruby" %>
  <%= active_scaffold_includes %>
  <%= stylesheet_link_tag "reset", "main", :media => 'all' %>

ActiveScaffold

A Ruby on Rails plugin from the makers of AjaxScaffold

Home

Documentation

Team

Help

Contribute

Blog

Demo

        Latest release is 1.0:

          download |
          svn

      <%= render :partial => "layouts/jump" %>

        Download the demo from SVN

      <%= render :partial => "layouts/menu" if @menu %>

    <%= yield %>

Source

      <%= render :partial => "demo/source" %>

  <% unless request.host.scan('activescaffold.com').empty? -%>

  <% end -%>

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">

  <title>ActiveScaffold :: Demo</title>
  <%= javascript_include_tag :defaults, "code_highlighter/code_highlighter", "code_highlighter/ruby" %>
  <%= active_scaffold_includes %>
  <%= stylesheet_link_tag "reset", "main", :media => 'all' %>

ActiveScaffold

A Ruby on Rails plugin from the makers of AjaxScaffold

Home

Documentation

Team

Help

Contribute

Blog

Demo

        Latest release is rc2:

          download |
          svn

      <%= render :partial => "layouts/jump" %>

        Download the demo from SVN

      <%= render :partial => "layouts/menu" if @menu %>

    <%= yield %>

Source

      <%= render :partial => "demo/source" %>

  <% unless request.host.scan('activescaffold.com').empty? -%>

  <% end -%>


Fix for search views forgetting facets when a new query was sent

  <% form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) },
                 :method => 'get', :class => 'search_form' ) do %>

    <%= hidden_field_tag :display, params[:display] %>

    <% CGI::unescape(request.request_uri).split("&").each do |part| %>
      <% if part.start_with? "facet" %>
        <% name_value = part.split("=") %>
        <%= hidden_field_tag name_value[0], name_value[1] %>
      <% end %>
    <% end %>

        <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50 %>
        <%= javascript_tag "jQuery('#search-input').attr('title', \"#{hint}\").hint()" if defined?(hint) %>
        <%= javascript_tag "jQuery('.search_form').submit(function() {
          if (jQuery('#search-input').val().length < 3) {
            jQuery('#search-empty-query-error').slideDown(200).delay(2500).slideUp(200);
            return false;
          }
        });" %>

      <%= submit_button(:search, _('Search')) %>

        <%= _("Type more than 2 characters to start a search") %>

    <% if @empty_query %>
      <% hint = environment.search_hints[@asset] %>
      <% if hint and !hint.blank? %>
        <%= hint %>
      <% end %>
    <% end %>

  <% end %>

  <% form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) },
                 :method => 'get', :class => 'search_form' ) do %>

    <%= hidden_field_tag :display, params[:display] %>

        <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50 %>
        <%= javascript_tag "jQuery('#search-input').attr('title', \"#{hint}\").hint()" if defined?(hint) %>
        <%= javascript_tag "jQuery('.search_form').submit(function() {
          if (jQuery('#search-input').val().length < 3) {
            jQuery('#search-empty-query-error').slideDown(200).delay(2500).slideUp(200);
            return false;
          }
        });" %>

      <%= submit_button(:search, _('Search')) %>

        <%= _("Type more than 2 characters to start a search") %>

    <% if @empty_query %>
      <% hint = environment.search_hints[@asset] %>
      <% if hint and !hint.blank? %>
        <%= hint %>
      <% end %>
    <% end %>

  <% end %>


Add from existing combo is now consistent with other AS combos - "- select -".

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

<% url_options = params_for(:action => :add_existing) -%>
<% if request.xhr? -%>
<%= form_remote_tag :url => url_options,
                    :after => "$('#{loading_indicator_id(:action => :add_existing, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{element_form_id(:action => :add_existing)}');",
                    :complete => "$('#{loading_indicator_id(:action => :add_existing, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{element_form_id(:action => :add_existing)}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :html => { :href => url_for(url_options),
                    :id => element_form_id(:action => :add_existing),
                    :class => 'create' } %>
<% else -%>
<%= form_tag url_options,
             :id => element_form_id(:action => :add_existing),
             :class => 'create' %>
<% end -%>

<%= active_scaffold_config.nested.label -%>

  <% if request.xhr? -%>
    <div id="<%= element_messages_id(:action => :add_existing) %>" class="messages-container">

  <% else -%>
    <%= render :partial => 'form_messages' %>
  <% end -%>

  <label for="<%= "record_#{active_scaffold_config.model}" %>"><%= active_scaffold_config.model %>
  <%# select_options = options_for_select(options_for_association(nested_association)) unless column.through_association? -%>
  <% select_options ||= options_for_select(active_scaffold_config.model.find(:all).collect {|c| [c.to_label, c.id]}) -%>
  <% unless select_options.empty? -%>
    <%= select_tag 'associated_id', '<option value="">' + as_('- select -') + '</option>' + select_options %>
  <% end -%>

    <%= submit_tag as_('Add'), :class => "submit" %>
    <%= link_to as_('Cancel'), params_for(:action => 'list'), :class => 'cancel' %>
    <%= loading_indicator_tag(:action => :add_existing, :id => params[:id]) %>

</form>

<% url_options = params_for(:action => :add_existing) -%>
<% if request.xhr? -%>
<%= form_remote_tag :url => url_options,
                    :after => "$('#{loading_indicator_id(:action => :add_existing, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{element_form_id(:action => :add_existing)}');",
                    :complete => "$('#{loading_indicator_id(:action => :add_existing, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{element_form_id(:action => :add_existing)}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :html => { :href => url_for(url_options),
                    :id => element_form_id(:action => :add_existing),
                    :class => 'create' } %>
<% else -%>
<%= form_tag url_options,
             :id => element_form_id(:action => :add_existing),
             :class => 'create' %>
<% end -%>

<%= active_scaffold_config.nested.label -%>

  <% if request.xhr? -%>
    <div id="<%= element_messages_id(:action => :add_existing) %>" class="messages-container">

  <% else -%>
    <%= render :partial => 'form_messages' %>
  <% end -%>

  <label for="<%= "record_#{active_scaffold_config.model}" %>"><%= active_scaffold_config.model %>
  <% select_options = active_scaffold_config.model.find(:all).collect {|c| [c.to_label, c.id]} -%>
  <% unless select_options.empty? -%>
    <%= select_tag 'associated_id', options_for_select(select_options) %>
  <% end -%>

    <%= submit_tag as_('Add'), :class => "submit" %>
    <%= link_to as_('Cancel'), params_for(:action => 'list'), :class => 'cancel' %>
    <%= loading_indicator_tag(:action => :add_existing, :id => params[:id]) %>

</form>


Agrega widget para el feedback en uservoice.

<!DOCTYPE html>
<html lang="<%= I18n.locale %>" prefix="og: http://ogp.me/ns#">

        <% if @title %>
        <title><%=@title%> - <%= site_name %></title>
        <meta property="og:title" content="<%=@title%> - <%= site_name %>" />
        <% else %>
        <title><%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %></title>
        <meta property="og:title" content="<%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>" />
        <% end %>

        <meta property="og:type" content="website" />
        <meta property="og:image" content="http://www.quesabes.org/quesabes-theme/images/logo_cuadrado.png" />

        <link rel="shortcut icon" href="/quesabes-theme/images/favicon.gif">
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
        <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all"  %>
        <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
        <% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
        <% end %>
        <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js' %>

        <% if @profile_photo_javascript %>

            <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
        <% end %>

        <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
        <% end %>

        <% if @no_crawl %>
            <meta name="robots" content="noindex, nofollow">
        <% end %>

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

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

<%  # Codigo para poner un mensaje popup en todas las paginas.
=begin

    ACA VA LA NOTA QUE QUEREMOS PONER.

Cerrar

=end
%>

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

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

        <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
		<%= render :partial => 'general/usernav' %>

        <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>" class="controller_<%= controller.controller_name %>">
            <%= yield :layout %>

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

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

X
  <%= _("Paste this link into emails, tweets, and anywhere else:") %>

  <input type="text">


Question mark

Question mark

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

        <%= javascript_include_tag :defaults %>

        <title>
        <% if @title %>
            <%=@title%> - WhatDoTheyKnow
        <% else %>
            WhatDoTheyKnow - file and explore Freedom of Information (FOI) requests
        <% end %>
        </title>
        <%= stylesheet_link_tag 'main' %>

            WhatDoTheyKnow?
            (<%= link_to "in development", about_url %>)

            Lift the lid on the UK public sector!

Make Request

<%= link_to "View Requests", request_list_url %>

<%= link_to "View Authorities", list_public_bodies_url(:tag => 'department') %>

        <% if @user %>

<%=link_to "My Requests", user_url(@user) %>

        <% end %>

<%= link_to "About", about_url %>

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

               <%= text_field_tag 'query', params[:query], { :size => 25, :id => "navigation_search_query" } %>
               <%= submit_tag "Search" %>

        <% end %>

    <% if MySociety::Config.getbool("STAGING_SITE", 1) %>

            This is a test version of the site. FOI requests will not be sent to real public bodies.

    <% end %>

    <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>

        <% if @user %>
            Hello, <%=h(@user.name)%>!
            (<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
        <% else %>
            Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
        <% end %>

    <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>">
            <%= yield :layout %>

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.

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

        <%= javascript_include_tag :defaults %>

        <title>
        <% if @title %>
            <%=@title%> - WhatDoTheyKnow
        <% else %>
            WhatDoTheyKnow - file and explore Freedom of Information (FOI) requests
        <% end %>
        </title>
        <%= stylesheet_link_tag 'main' %>

            WhatDoTheyKnow
            (<%= link_to "in development", about_url %>)

            Lift the lid on the UK public sector!

Make Request

<%= link_to "View Requests", request_list_url %>

<%= link_to "View Authorities", list_public_bodies_url(:tag => 'department') %>

        <% if @user %>

<%=link_to "My Requests", user_url(@user) %>

        <% end %>

<%= link_to "About", about_url %>

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

               <%= text_field_tag 'query', params[:query], { :size => 25, :id => "navigation_search_query" } %>
               <%= submit_tag "Search" %>

        <% end %>

    <% if MySociety::Config.getbool("STAGING_SITE", 1) %>

            This is a test version of the site. FOI requests will not be sent to real public bodies.

    <% end %>

    <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>

        <% if @user %>
            Hello, <%=h(@user.name)%>!
            (<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
        <% else %>
            Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
        <% end %>

    <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

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

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>">
            <%= yield :layout %>

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.


Update commerical text

Update commerical text

      Are you in the right place?

      Are you sure you need the API? Please consider using other formats
      (Shapefile, KML, CSV, GDB) we provide on
      Protected Planet.

      If you are making a map or need to query very large amounts of
      protected areas, the
      ESRI Web Service is a better solution.

If you are unsure about the API capabilities, please visit the documentation.

The API is not available for commercial use. Our definition of commercial use includes any use by or for a commercial entity, whether revenue-generating or not, or any use that generates revenue for any type of entity. To access the data for uses of these types please visit the Integrated Biodiversity Assessment Tool.


What an extraordinary bug

What an extraordinary bug

The admin timeline code was fetching *all* outgoing messages, rather than
just the one particular one we wanted; and similarly for comments.

Unsurprising this was rather slow.

<% @title = "Timeline" %>

<%=h @events_title%>

Hour
| Day
| 2 days
| Week
| Month
| All time

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

        <% end %>

<%= simple_date(event.created_at) %>

    <% else %>

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

    <%= simple_time(event.created_at) %>

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

<% end %>

<% @title = "Timeline" %>

<%=h @events_title%>

Hour
| Day
| 2 days
| Week
| Month
| All time

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

        <% end %>

<%= simple_date(event.created_at) %>

    <% else %>

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

    <%= simple_time(event.created_at) %>

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

<% end %>


added additional links to other parsing tools

About FreeCite

FreeCite is an open-source application that parses document citations into fielded data. You can use
    it as a web application
    or a <%= link_to "service", :controller => "welcome", :action => "api_instructions" %>. You can also
    download the source and run FreeCite on your
    own server. FreeCite is distributed under the MIT license.

Parse a Citation

<%= render :partial => "citations/parse_string" %>

Where did FreeCite come from?

FreeCite was developed through a partnership between the
    Brown
    University Library and Providence-based start-up
    Public Display,
    with funding from the Mellon Foundation.
    FreeCite was inspired by
    ParsCit.
    Much thanks to ParsCit's maintainer, Isaac Councill.

FreeCite is implemented in Ruby on Rails and
    uses the CRF++ library
    implementation of conditional random fields. Our model is trained on the
    CORA dataset
    with lexical augmentation from the Directory of Research and Researchers at Brown (DRR-B).

Other Citation Tools

If you're interested in a tool like FreeCite, you should check out these other
    citation tools:

ParaCite

ParsCit

A citation metadata extraction tool from the California Digital Library

CrossRef's DOI retriever

Biblio Citation Parser

    <%= link_to "Please let us know", :action => "feedback" %> of any other tools you'd like to see listed here.

Feedback Welcomed!

<%= link_to "Please get in touch with us", :action => "feedback" %> if you have any feedback to share.

About FreeCite

FreeCite is an open-source application that parses document citations into fielded data. You can use
    it as a web application
    or a <%= link_to "service", :controller => "welcome", :action => "api_instructions" %>. You can also
    download the source and run FreeCite on your
    own server. FreeCite is distributed under the MIT license.

Parse a Citation

<%= render :partial => "citations/parse_string" %>

Where did FreeCite come from?

FreeCite was developed through a partnership between the
    Brown
    University Library and Providence-based start-up
    Public Display,
    with funding from the Mellon Foundation.
    FreeCite was inspired by
    ParsCit.
    Much thanks to ParsCit's maintainer, Isaac Councill.

FreeCite is implemented in Ruby on Rails and
    uses the CRF++ library
    implementation of conditional random fields. Our model is trained on the
    CORA dataset
    with lexical augmentation from the Directory of Research and Researchers at Brown (DRR-B).

Other Citation Tools

If you're interested in a tool like FreeCite, you should check out these other
    citation tools:

ParaCite

ParsCit

    <%= link_to "Please let us know", :action => "feedback" %> of any other tools you'd like to see listed here.

Feedback Welcomed!

<%= link_to "Please get in touch with us", :action => "feedback" %> if you have any feedback to share.


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 %>


Removed no treatment warning if medical problem is deactivated.

    <% if show_bat %>
    <%= link_to medical_problem.bat.band, :controller => 'bats', :action => 'show', :id => medical_problem.bat %>
    <% end %>

      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>

      <%=h nice_date(medical_problem.date_opened) %>

    <% if medical_problem.date_closed == nil %>
      <% if @list_all %>

          <%=h nice_date(medical_problem.date_closed) %>

      <% end %>

        <%= link_to 'Edit', :controller => 'medical_problems', :action => 'edit', :id => medical_problem %>

        <%= link_to 'Close', :controller => 'medical_problems', :action => 'deactivate', :id => medical_problem %>

    <% else %>

        <%=h nice_date(medical_problem.date_closed) %>

        <%= link_to 'Reactivate', :controller => 'medical_problems', :action => 'reactivate', :id => medical_problem %>

    <% end %>

    <% for medical_treatment in medical_problem.medical_treatments.current %>

        <%= link_to medical_treatment.title, :controller => 'medical_treatments', :action => 'show', :id => medical_treatment%>

        <% if medical_treatment.done_today == true %>
          Done
        <% elsif medical_treatment.tasks.medical_tasks_today.length > 0 %>
          [<%= link_to 'Do', :controller => 'tasks', :action => 'do_medical_task', :id => medical_treatment.todays_task %>]
				<% else %>
          [<%= link_to 'Create Medical Tasks', :controller => 'medical_treatments', :action=>:show, :id=> medical_treatment %>]
        <% end %>

        [<%= link_to 'End', {:controller => 'medical_treatments', :action => 'destroy_medical_treatment', :id => medical_treatment}, :confirm => 'Are you sure?', :method => :post %>]

			<% if medical_treatment.tasks.current.length < 7 %>
			<warning>Treatment not given every day</warning>
			<% end %>

      <% if @list_all %>

      <% end %>
      <% if show_bat %>

      <% end %>
    <% end %>
    <% if medical_problem.date_closed == nil %>
      [<%= link_to 'Add New Treatment', :controller => 'medical_treatments', :action => 'new', :id => medical_problem %>]
    <% end %>
		<% if (medical_problem.medical_treatments.current.length == 0) && (medical_problem.date_closed == nil) %>

			<warning>No treatment</warning>
		<% end %>

    <% if show_bat %>
    <%= link_to medical_problem.bat.band, :controller => 'bats', :action => 'show', :id => medical_problem.bat %>
    <% end %>

      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>

      <%=h nice_date(medical_problem.date_opened) %>

    <% if medical_problem.date_closed == nil %>
      <% if @list_all %>

          <%=h nice_date(medical_problem.date_closed) %>

      <% end %>

        <%= link_to 'Edit', :controller => 'medical_problems', :action => 'edit', :id => medical_problem %>

        <%= link_to 'Close', :controller => 'medical_problems', :action => 'deactivate', :id => medical_problem %>

    <% else %>

        <%=h nice_date(medical_problem.date_closed) %>

        <%= link_to 'Reactivate', :controller => 'medical_problems', :action => 'reactivate', :id => medical_problem %>

    <% end %>

    <% for medical_treatment in medical_problem.medical_treatments.current %>

        <%= link_to medical_treatment.title, :controller => 'medical_treatments', :action => 'show', :id => medical_treatment%>

        <% if medical_treatment.done_today == true %>
          Done
        <% elsif medical_treatment.tasks.medical_tasks_today.length > 0 %>
          [<%= link_to 'Do', :controller => 'tasks', :action => 'do_medical_task', :id => medical_treatment.todays_task %>]
				<% else %>
          [<%= link_to 'Create Medical Tasks', :controller => 'medical_treatments', :action=>:show, :id=> medical_treatment %>]
        <% end %>

        [<%= link_to 'End', {:controller => 'medical_treatments', :action => 'destroy_medical_treatment', :id => medical_treatment}, :confirm => 'Are you sure?', :method => :post %>]

			<% if medical_treatment.tasks.current.length < 7 %>
			<warning>Treatment not given every day</warning>
			<% end %>

      <% if @list_all %>

      <% end %>
      <% if show_bat %>

      <% end %>
    <% end %>
    <% if medical_problem.date_closed == nil %>
      [<%= link_to 'Add New Treatment', :controller => 'medical_treatments', :action => 'new', :id => medical_problem %>]
    <% end %>
		<% if medical_problem.medical_treatments.current.length == 0 %>

			<warning>No treatment</warning>
		<% end %>


Added proper entity quoting to dc:description excerpt in article partial (fixes #88)

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

    <%= article_link article.title, article %>

Posted by <%=h article.author %> <%= distance_of_time_in_words_to_now article.created_at %> ago

  <%= article.body_html %>


removed priority and severity in ig feeds

<% if task.active? %>
<div id="task_<%=task.id%>"
<%
 depth ||= 1
 depth = 1 if depth < 1
 classes = ""

 classes << " #{task.project.to_css_name}"
 classes << " override_filter" if defined?(override_filter) && override_filter
 classes << " waiting_deferred" unless task.active?

 classes << " task_active_others" if task.worked_on?
 classes << " task_active" if @current_sheet && @current_sheet.task_id == task.id
 classes << " task_done" if task.done?
 classes << " task_paused" if @current_sheet && @current_sheet.task_id == task.id && @current_sheet.paused?
-%>
class="task <%=classes%>" style="position:relative; <%= color_style(task) %>">
<% @task = task %>
<div id="row-<%=task.dom_id%>" class="task-row" style="width:100%;">

   <%=     "#{task.issue_num} #{h(truncate(task.name,80))}" -%>

     <%= "(#{worked_nice(task.worked_minutes)} / #{worked_nice( task.duration )})" if task.duration.to_i > 0 -%>
     <%= "(#{worked_nice(task.worked_minutes)})" if( task.duration.to_i == 0 && task.worked_minutes > 0) -%>
     <%= "[#{task.milestone.name}]" unless task.milestone_id.to_i == 0 -%>

   <% name = _("No one")
      name = task.users.collect{|u| u.name}.join(', ') unless task.users.empty?
   %>

   <%= task.full_name %>
   <%= "[#{name}]" %>
   <%= due_in_words(task) if (task.due_at != nil || task.milestone_id.to_i > 0) && !task.done?%>

<% end %>

<% if task.active? %>
<div id="task_<%=task.id%>"
<%
 depth ||= 1
 depth = 1 if depth < 1
 classes = ""
 classes = " task_raised_pri" if (task.priority + task.severity_id)/2.0 >= 0.1 && !task.done?
 classes = " task_high_pri" if (task.priority + task.severity_id)/2.0 >= 0.51 && !task.done?
 classes = " task_crit_pri" if (task.priority + task.severity_id)/2.0 >= 1.5 && !task.done?
 classes = " task_low_pri" if (task.priority + task.severity_id)/2 < -0.51 && !task.done?
 classes = " task_lowest_pri" if (task.priority + task.severity_id)/2 < -1.5 && !task.done?

 classes << " #{task.project.to_css_name}"
 classes << " override_filter" if defined?(override_filter) && override_filter
 classes << " waiting_deferred" unless task.active?

 classes << " task_active_others" if task.worked_on?
 classes << " task_active" if @current_sheet && @current_sheet.task_id == task.id
 classes << " task_done" if task.done?
 classes << " task_paused" if @current_sheet && @current_sheet.task_id == task.id && @current_sheet.paused?
-%>
class="task <%=classes%>" style="position:relative;">
<% @task = task %>
<div id="row-<%=task.dom_id%>" class="task-row" style="width:100%;">

   <%=     "#{task.issue_num} #{h(truncate(task.name,80))}" -%>

     <%= "(#{worked_nice(task.worked_minutes)} / #{worked_nice( task.duration )})" if task.duration.to_i > 0 -%>
     <%= "(#{worked_nice(task.worked_minutes)})" if( task.duration.to_i == 0 && task.worked_minutes > 0) -%>
     <%= "[#{task.milestone.name}]" unless task.milestone_id.to_i == 0 -%>

   <% name = _("No one")
      name = task.users.collect{|u| u.name}.join(', ') unless task.users.empty?
   %>

   <%= task.full_name %>
   <%= "[#{name}]" %>
   <%= due_in_words(task) if (task.due_at != nil || task.milestone_id.to_i > 0) && !task.done?%>

<% end %>


Make things a bit more styleable

Make things a bit more styleable

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

<% if @site_template -%>

<% else -%>

<% end -%>

  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  <%= stylesheet_link_tag 'global.css' %>
  <%= ae_form_stylesheet %>
  <%= javascript_include_tag :defaults %>
  <% if @rss_url %>
    <link rel="alternate" title="RSS Feed" href="<%=@rss_url%>" type="application/rss+xml"/>
  <% end %>

  <% if @site_template.css -%>

  <% end -%>
  <title><%= page_title %></title>

<% if @site_template.header and @site_template.header.length > 0 -%>
  <%= ERB.new(@site_template.header).result %>
<% end -%>

<%= page_title %>

          <% if @context and @context.parent -%>

Part of
              <%= link_to @context.parent.fullname, :controller => params[:controller], :context => @context.parent.id %>

          <% end -%>

<%= link_to "Home", :controller => :main, :action => :index %>

<%= link_to "My Events", :controller => :agenda, :action => :index %>

            <% if @context and @context.schedules.size == 1 -%>

<%= link_to "Event Schedule", schedule_path(@context.schedules[0]) %>

            <% else -%>

<%= link_to "Event Schedules", schedules_path %>

            <% end -%>
            <% if logged_in_person_can_edit?(@context) -%>

Administration »

                  «
                  <%= link_to "Events", events_path %>
                  <%= link_to "Site Templates", site_templates_path %>
                  <%= link_to "Schedules", schedules_path %>

            <% end -%>

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

<% if flash[:error_messages] and flash[:error_messages].length > 0 -%>

There were some errors processing your request:

      <% flash[:error_messages].each do |msg| -%>

<%= msg%>

      <% end -%>

<% end -%>

  <%= @content_for_layout %>

<% if @site_template.footer and @site_template.footer.length > 0 -%>
  <%= ERB.new(@site_template.footer).result %>
<% end -%>


freeテンプレートを使うメリットが無いので消します。普通にファイルを作ればいいので。


move post creation/editing into PostController; move page creation/editing into PageController

git-svn-id: 6ed4032d55824b87387cea7ca50eb066630d6e73@9 c93d8143-eb44-0410-8798-7b17b0fd9f9b

<div id="adminToolbar" class="toolbar robots-nocontent<%= check_auth ? '' : ' hidden' %>">
  <% if check_auth %>

        <a href="<%= R(PostController, :new) %>"
            title="Create a new blog post">

      <% if @post && !@post.new? %>

          <a href="<%= R(PostController, :edit, @post.id) %>"
              title="Edit this blog post">

      <% end %>

        <a href="<%= R(PageController, :new) %>"
            title="Create a new page">

      <% if @page && !@page.new? %>

          <a href="<%= R(PageController, :edit, @page.id) %>"
              title="Edit this page">

      <% end %>

    <form action="<%= R(AdminController, :logout) %>" method="post">

<input type="submit" value="Log out" />

    </form>
  <% else %>
    <form id="login" action="<%= R(AdminController, :login) %>"
        method="post">

        Username:
        <input type="text" id="username" name="username" maxlength="64"
            title="Enter your username" />

        Password:
        <input type="password" id="password" name="password"
            maxlength="64" title="Enter your password" />

        <input type="submit" value="Login" />

    </form>
  <% end %>

<div id="adminToolbar" class="toolbar robots-nocontent<%= check_auth ? '' : ' hidden' %>">
  <% if check_auth %>

        <a href="<%= R(AdminController, :post_new) %>"
            title="Create a new blog post">

      <% if @post && !@post.new? %>

          <a href="<%= R(AdminController, :post_edit, @post.id) %>"
              title="Edit this blog post">

      <% end %>

        <a href="<%= R(AdminController, :page_new) %>"
            title="Create a new page">

      <% if @page && !@page.new? %>

          <a href="<%= R(AdminController, :page_edit, @page.id) %>"
              title="Edit this page">

      <% end %>

    <form action="<%= R(AdminController, :logout) %>" method="post">

<input type="submit" value="Log out" />

    </form>
  <% else %>
    <form id="login" action="<%= R(AdminController, :login) %>"
        method="post">

        Username:
        <input type="text" id="username" name="username" maxlength="64"
            title="Enter your username" />

        Password:
        <input type="password" id="password" name="password"
            maxlength="64" title="Enter your password" />

        <input type="submit" value="Login" />

    </form>
  <% end %>


Added page title.

Added page title.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title><%= "#{@page_title} | " if @page_title-%>Indian GNU/Linux Users Group of Mumbai</title>
  <%= stylesheet_link_tag "style" -%>
</head>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Open Source Free Pet Website Template</title>
  <%= stylesheet_link_tag "style" -%>
</head>


Update Ring Website - footer.rhtml

Update Ring Website - footer.rhtml

 	    Basic

Applications developed in little hours

Introduction

Language Design

Building From Source Code

How to contribute?

Using Ring Notepad

Getting Started - First Style

Getting Started - Second Style

Getting Started - Third Style

Variables

Operators

Control Structures - First Style

Control Structures - Second Style

Control Structures - Third Style

Getting Input

Functions - First Style

Functions - Second Style

Functions - Third Style

Program Structure

Lists

Strings

Date and Time

Check Data Type and Conversion

Mathematical Functions

Files

System Functions

Eval() and Debugging

Demo Programs

 	    Intermediate

ODBC Functions

MYSQL Functions

SQLite Functions

PostgreSQL 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

Using the Natural Library

Scope Rules for Variables and Attributes

Scope Rules for Functions and Methods

Syntax Flexibility

Distributing Ring Applications

Distributing Ring Applications using Ring2EXE

The Type Hints Library

Web Development (CGI Library)

Deploying Web Applications in the Cloud

Using RingLibCurl

Using RingZip

Graphics and 2D Games programming using RingAllegro

Using RingLibSDL

Demo Project - Game Engine for 2D Games

Building Games for Android

 	    Advanced

Using RingOpenGL and RingFreeGLUT for 3D Graphics

Using RingOpenGL and RingAllegro for 3D Graphics

The Gold Magic 800 Game

Desktop and Mobile development using RingQt

Building RingQt Applications for Mobile

Objects Library for RingQt Application

Using the Form Designer

Low Level Functions

The Trace Library and the Interactive Debugger

Extension using the C/C++ languages

Embedding Ring Language in C/C++ Programs

Command Line Options

Code Generator for wrapping C/C++ Libraries

Create your first extension

Frequently Asked Questions (FAQ)

			  Reference

RingLibCurl Functions Reference

RingLibZip Functions Reference

RingAllegro Functions Reference

RingLibSDL Functions Reference

RingFreeGLUT Functions Reference

RingOpenGL (OpenGL 4.6) Functions Reference

RingQt Classes Reference

General Information

Language Reference

              Group
              Resources
              Team

 	    Basic

Applications developed in little hours

Introduction

Language Design

Getting Started - First Style

Getting Started - Second Style

Getting Started - Third Style

Variables

Operators

Control Structures - First Style

Control Structures - Second Style

Control Structures - Third Style

Getting Input

Functions - First Style

Functions - Second Style

Functions - Third Style

Program Structure

Lists

Strings

Date and Time

Check Data Type and Conversion

Mathematical Functions

Files

System Functions

Eval() and Debugging

Demo Programs

 	    Intermediate

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

Using the Natural Library

Scope Rules for Variables and Attributes

Scope Rules for Functions and Methods

Syntax Flexibility

Distributing Ring Applications

Distributing Ring Applications using Ring2EXE

The Type Hints Library

Web Development (CGI Library)

Using RingLibCurl

Using RingZip

Graphics and 2D Games programming using RingAllegro

Using RingLibSDL

Demo Project - Game Engine for 2D Games

 	    Advanced

Building Games for Android

Using RingOpenGL and RingFreeGLUT for 3D Graphics

Using RingLibuv

Desktop and Mobile development using RingQt

Building RingQt Applications for Mobile

Objects Library for RingQt Application

Using the Form Designer

Low Level Functions

The Trace Library and the Interactive Debugger

Extension using the C/C++ languages

Embedding Ring Language in C/C++ Programs

Command Line Options

Code Generator for wrapping C/C++ Libraries

Frequently Asked Questions (FAQ)

			  Reference

RingLibCurl Functions Reference

RingLibZip Functions Reference

RingAllegro Functions Reference

RingLibSDL Functions Reference

RingFreeGLUT Functions Reference

RingOpenGL (OpenGL 4.6) Functions Reference

RingQt Classes Reference

Language Reference

              Group
              Resources
              Team


Fix String can't be coerced to float in _project_overview.rhtml

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

         <% end %>

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

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

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

               <%
                  last_customer = project.customer_id
               end

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

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

       critical_percent = critical_percent.round unless critical_percent.nan?

       normal_percent = normal_percent.round unless normal_percent.nan?

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

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

        <div id="edit_project_<%= project.id%>" class="popout" style="position: absolute; z-index:10; left:0; top:0; width: 16px; display:none; ">
          <% if current_user.can?(project, 'grant') || current_user.can?(project, 'milestone') %>
            <%= link_to image_tag("application_form_edit.png", :border => 0, :title => _("Edit project %s", project.name), :class => "tooltip"),
            { :controller => 'projects', :action => 'edit', :id => project } -%>
          <% end %>

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

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

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

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

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

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

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

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

         <% end %>

          <%= render :partial => "activities/overall_progress", :locals => { :project => project } %>
          <% for milestone in project.milestones.find(:all, :conditions => ["completed_at IS NULL"], :order => "due_at, milestones.name", :include => [:user]) %>
              <%= render :partial => "activities/milestone_row", :locals => { :milestone => milestone } %>
          <% end %>
  <% @completed_milestones = Milestone.count(:conditions => ["project_id = ? AND completed_at IS NOT NULL", project.id])
     if @completed_milestones > 0
  %>

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

  <% end %>

  <% end
     if last_customer != 0 %>

  <% end %>

  <% if @completed_projects > 0 %>

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

  <% end %>

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

         <% end %>

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

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

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

               <%
                  last_customer = project.customer_id
               end

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

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

       critical_percent = critical_percent.round unless critical_percent.nan?

       normal_percent = normal_percent.round unless normal_percent.nan?

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

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

        <div id="edit_project_<%= project.id%>" class="popout" style="position: absolute; z-index:10; left:0; top:0; width: 16px; display:none; ">
          <% if current_user.can?(project, 'grant') || current_user.can?(project, 'milestone') %>
            <%= link_to image_tag("application_form_edit.png", :border => 0, :title => _("Edit project %s", project.name), :class => "tooltip"),
            { :controller => 'projects', :action => 'edit', :id => project } -%>
          <% end %>

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

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

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

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

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

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

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

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

         <% end %>

          <%= render :partial => "activities/overall_progress", :locals => { :project => project } %>
          <% for milestone in project.milestones.find(:all, :conditions => ["completed_at IS NULL"], :order => "due_at, milestones.name", :include => [:user]) %>
              <%= render :partial => "activities/milestone_row", :locals => { :milestone => milestone } %>
          <% end %>
  <% @completed_milestones = Milestone.count(:conditions => ["project_id = ? AND completed_at IS NOT NULL", project.id])
     if @completed_milestones > 0
  %>

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

  <% end %>

  <% end
     if last_customer != 0 %>

  <% end %>

  <% if @completed_projects > 0 %>

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

  <% end %>


Revert "Remove the Alaveteli logo until we add our own"

This reverts commit 4a8b6c49b64394a4fe9d63fd1905b267a49d0d82.

<%= link_to image_tag('/alavetelitheme/images/logo.png'), frontpage_url, :id=>'logo' %>


Feedback when searching & filtering updated

<%= link_to @model.to_s.capitalize, :model => params[:model], :action => "index" %>

<%= link_to image_tag('typus/arrow_right.gif'), { :page => @item_pages.current.previous, :filter_by => params[:filter_by], :filter_id => params[:filter_id], :model => params[:model], :status => params[:status], :search => params[:search], :order_by => params[:order_by], :sort_order => params[:sort_order] } if @item_pages.current.previous %> <%= link_to image_tag('typus/arrow_left.gif'), { :page => @item_pages.current.next, :filter_by => params[:filter_by], :filter_id => params[:filter_id], :model => params[:model], :status => params[:status], :search => params[:search], :order_by => params[:order_by], :sort_order => params[:sort_order] } if @item_pages.current.next %><%= " " if @item_pages.current.next %><%= link_to_function image_tag("typus/search_right.gif"), "['search'].each(Element.toggle);" if @model.search_fields.size > 0 %> <%= link_to image_tag("typus/add.gif", :title => "New #{@model}"), :action => "new" %>

<%= feedback %>

<div id="search" <%= "style=\"display: none;\"" if !params[:search] %> class="box">
	<% form_tag ({:action => 'index', :model => params[:model]}, :method => 'get') do %>

<%= text_field_tag :search, params[:search] %>  <%= submit_tag "Search", :name => nil %>

	<% end %>

<% if @model.count > 0 -%>

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

		<% @fields.each do |column| %>

		<a href="?order_by=<%= column %>&sort_order=<% if params[:order_by].include? column %><%= (@status = (params[:sort_order] == "asc") ? "desc" : "asc" ) %><% else %><%= "asc" %><% end %>"><div class="<% if params[:order_by].include? column %><%= (@status = (params[:sort_order] == "asc") ? "order_desc" : "order_asc" ) %><% else %><%= "order" %><% end %>"><%= column.humanize %>

		<% end %>

		<% @items.each do |item| %>
		  <tr class="<%= cycle('even', 'odd') %>" id="item_<%= item.id %>">
		  <% @fields.each do |column| %>
		    <% if %w(id title name full_name first_name last_name).include? column -%>
		    <%= link_to item.send(column), :action => 'edit', :id => item.id %>
		    <% elsif %w(email).include? column -%>
		    <%= mail_to item.send(column), item.send(column), :title => "" %>
		    <% elsif %w(status).include? column -%>
		      <%= image_tag(status = item.send(column)? "typus/status_true.gif" : "typus/status_false.gif") %>
		    <% elsif %w(verified is_admin).include? column -%>
		      <%= status = item.send(column)? "Yes" : "No" %>
		    <% elsif %w(created_at updated_at).include? column -%>
		      <%= fmt_date(item.send(column)) %>
		    <% else -%>
		      <%=h item.send(column) %>
		    <% end -%>
		  <% end %>
		    <%= link_to image_tag("typus/trash.gif"), { :action => 'destroy', :id => item }, :confirm => "Remove this entry?" %>

		<% end %>

	<% else -%>

		<% if params[:search] %>

No <%= params[:model] %> match the search <%= params[:search] %>

		<% else %>

There are no <%= params[:model] %> with the filter <%= params[:filter_by] %> set to <%= params[:filter_id] %>. <%= link_to "Remove filter?", :action => "index", :model => params[:model] %>

		<% end %>

	<% end -%>

<% else -%>

<%= link_to "Add the first #{params[:model].singularize}", :action => "new", :model => params[:model] %>

<% end -%>

<%= link_to @model.to_s.capitalize, :model => params[:model], :action => "index" %>

<%= link_to image_tag('typus/arrow_right.gif'), { :page => @item_pages.current.previous, :filter_by => params[:filter_by], :filter_id => params[:filter_id], :model => params[:model], :status => params[:status], :search => params[:search], :order_by => params[:order_by], :sort_order => params[:sort_order] } if @item_pages.current.previous %> <%= link_to image_tag('typus/arrow_left.gif'), { :page => @item_pages.current.next, :filter_by => params[:filter_by], :filter_id => params[:filter_id], :model => params[:model], :status => params[:status], :search => params[:search], :order_by => params[:order_by], :sort_order => params[:sort_order] } if @item_pages.current.next %><%= " " if @item_pages.current.next %><%= link_to_function image_tag("typus/search_right.gif"), "['search'].each(Element.toggle);" if @model.search_fields.size > 0 %> <%= link_to image_tag("typus/add.gif", :title => "New #{@model}"), :action => "new" %>

<%= feedback %>

<div id="search" <%= "style=\"display: none;\"" if !params[:search] %> class="box">
	<% form_tag ({:action => 'index', :model => params[:model]}, :method => 'get') do %>

<%= text_field_tag :search, params[:search] %>  <%= submit_tag "Search", :name => nil %>

	<% end %>

<% if @model.count > 0 -%>

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

		<% @fields.each do |column| %>

		<a href="?order_by=<%= column %>&sort_order=<% if params[:order_by].include? column %><%= (@status = (params[:sort_order] == "asc") ? "desc" : "asc" ) %><% else %><%= "asc" %><% end %>"><div class="<% if params[:order_by].include? column %><%= (@status = (params[:sort_order] == "asc") ? "order_desc" : "order_asc" ) %><% else %><%= "order" %><% end %>"><%= column.humanize %>

		<% end %>

		<% @items.each do |item| %>
		  <tr class="<%= cycle('even', 'odd') %>" id="item_<%= item.id %>">
		  <% @fields.each do |column| %>
		    <% if %w(id title name full_name first_name last_name).include? column -%>
		    <%= link_to item.send(column), :action => 'edit', :id => item.id %>
		    <% elsif %w(email).include? column -%>
		    <%= mail_to item.send(column), item.send(column), :title => "" %>
		    <% elsif %w(status).include? column -%>
		      <%= image_tag(status = item.send(column)? "typus/status_true.gif" : "typus/status_false.gif") %>
		    <% elsif %w(verified is_admin).include? column -%>
		      <%= status = item.send(column)? "Yes" : "No" %>
		    <% elsif %w(created_at updated_at).include? column -%>
		      <%= fmt_date(item.send(column)) %>
		    <% else -%>
		      <%=h item.send(column) %>
		    <% end -%>
		  <% end %>
		    <%= link_to image_tag("typus/trash.gif"), { :action => 'destroy', :id => item }, :confirm => "Remove this entry?" %>

		<% end %>

	<% else -%>

There are no <%= params[:model] %> under this filter.

	<% end -%>

<% else -%>

<%= link_to "Add the first #{params[:model].singularize}", :action => "new", :model => params[:model] %>

<% end -%>


When only a single authority is found use the singular

<%=_('Show only...')%>

<%=_('Beginning with') %>

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

    <% first_row = true %>
    <% for row in PublicBodyCategories::get().with_headings() %>
        <% if row.instance_of?(Array) %>

            <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_url(:tag => row[0]) %>

        <% else %>
            <% if not first_row %>

            <% else %>
                <% first_row = false %>
            <% end %>

<%=h row%>

        <% end %>
    <% end %>
    <% if not first_row %>

    <% end %>

	<%= _('Are we missing a public authority?') % [help_requesting_path + '#missing_body'] %>

      <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %>

<% @title = @description.empty? ? _("Public authorities") : _("Public authorities - {{description}}", :description => @description) %>

<%= _('Public authorities') %>

<% form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %>

  <%= text_field_tag(:public_body_query, params[:public_body_query]) %>
  <%= submit_tag(_("Search")) %>

<% end %>

<%= n_('Found %d public authority %s', 'Found %d public authorities %s', @public_bodies.total_entries) % [@public_bodies.total_entries, @description] %>

<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %>

  <%= will_paginate(@public_bodies) %>

  <%= _('Can\'t find the one you want?') % [help_requesting_path + '#missing_body'] %>

<%=_('Show only...')%>

<%=_('Beginning with') %>

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

    <% first_row = true %>
    <% for row in PublicBodyCategories::get().with_headings() %>
        <% if row.instance_of?(Array) %>

            <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_url(:tag => row[0]) %>

        <% else %>
            <% if not first_row %>

            <% else %>
                <% first_row = false %>
            <% end %>

<%=h row%>

        <% end %>
    <% end %>
    <% if not first_row %>

    <% end %>

	<%= _('Are we missing a public authority?') % [help_requesting_path + '#missing_body'] %>

      <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %>

<% @title = @description.empty? ? _("Public authorities") : _("Public authorities - {{description}}", :description => @description) %>

<%= _('Public authorities') %>

<% form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %>

  <%= text_field_tag(:public_body_query, params[:public_body_query]) %>
  <%= submit_tag(_("Search")) %>

<% end %>

<%= _('Found {{count}} public authorities {{description}}', :count=>@public_bodies.total_entries, :description=>@description) %>

<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %>

  <%= will_paginate(@public_bodies) %>

  <%= _('Can\'t find the one you want?') % [help_requesting_path + '#missing_body'] %>


Replace lead box in frontpage

Replace lead box in frontpage

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

¡Se busca!

Estamos buscando desarrolladores
            para mejorar la aplicación de tuderechoasaber.es

Si estás interesad@,

              escríbenos a contacto@civio.es.

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(item['description'].to_s, "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

España presenta su plan de Gobierno Abierto en #OGP2012

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

                <%= text_field_tag 'query', params[:query], { :size => 80 } %>
                <%= submit_tag _('Search') %>

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(item['description'].to_s, "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>


Replace checking of type attribute with is_a? call

<%= _('Select the groups where you want to publish your article') %>

<% if !@failed.blank? %>

<%=_("There were errors with the following communities: ")%>

    <% @failed.each do |error, communities|%>
       <%= error %>:

        <% communities.each do |community| %>

 <%= community %>

        <% end %>

    <% end %>

<% end %>

<% unless @article.is_a?(Event) %>
  <% form_tag do%>
    <%= hidden_field_tag :back_to, @back_to %>
    <% @groups.each do |group| %>
      <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

      <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>

    <% end %>

    <% button_bar do %>
      <%= submit_button 'spread', _('Publish') %>
    <% end %>
  <% end %>
<% else %>

    <%= _("This option is temporarily disabled.") %>

<% end %>

<%= _('Select the groups where you want to publish your article') %>

<% if !@failed.blank? %>

<%=_("There were errors with the following communities: ")%>

    <% @failed.each do |error, communities|%>
       <%= error %>:

        <% communities.each do |community| %>

 <%= community %>

        <% end %>

    <% end %>

<% end %>

<% if @article.type != "Event" %>
  <% form_tag do%>
    <%= hidden_field_tag :back_to, @back_to %>
    <% @groups.each do |group| %>
      <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

      <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>

    <% end %>

    <% button_bar do %>
      <%= submit_button 'spread', _('Publish') %>
    <% end %>
  <% end %>
<% else %>

    <%= _("This option is temporarily disabled.") %>

<% end %>


Make it clear responses are published too.

<% @title = "New FOI request" %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

<% form_for(:info_request, @info_request, :url => { :action => :create }, :html => { :id => 'writeForm' }  ) do |f| %>

New public Freedom of Information request

        Public body:
        <%=
        @public_bodies = PublicBody.find(:all, :order => "name")
        f.collection_select(:public_body_id, @public_bodies, :id, :name)
        %>

        Summary:
        <%= f.text_field :title, :size => 50 %>

        (a one line summary of the information you are requesting,
        e.g. 'Crime statistics by ward level for Wales')

    <% fields_for :outgoing_message do |o| %>

        Your letter:
        <%= o.text_area :body, :rows => 20, :cols => 60 %>

    <% end %>

        Privacy warning: All information that you enter, except
        for your email address, will be displayed publically on this website. Any
        response you get will also be published.

    <%= submit_tag "Create public request >>" %>

<% end %>

<% @title = "New FOI request" %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

<% form_for(:info_request, @info_request, :url => { :action => :create }, :html => { :id => 'writeForm' }  ) do |f| %>

New public Freedom of Information request

        Public body:
        <%=
        @public_bodies = PublicBody.find(:all, :order => "name")
        f.collection_select(:public_body_id, @public_bodies, :id, :name)
        %>

        Summary:
        <%= f.text_field :title, :size => 50 %>

        (a one line summary of the information you are requesting,
        e.g. 'Crime statistics by ward level for Wales')

    <% fields_for :outgoing_message do |o| %>

        Your letter:
        <%= o.text_area :body, :rows => 20, :cols => 60 %>

    <% end %>

        Privacy warning: All information that you enter, except
        for your email address, will be displayed publically on this website.

    <%= submit_tag "Create public request >>" %>

<% end %>


Issue unsaved changes alerts on IE.

Issue unsaved changes alerts on IE.

<% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %>

<%= t 'layouts.osm_offline' %>

<% elsif OSM_STATUS == :database_readonly or OSM_STATUS == :api_readonly %>

<%= t 'layouts.osm_read_only' %>

<% elsif !@user.data_public? %>

<%= t 'site.edit.not_public' %>

<%= t 'site.edit.not_public_description',
:user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %>

<%= t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edit_link_text'), t('site.edit.anon_edits_link')) %> ()

<% else %>
<% 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 => 'search' %>

<%
session[:token] = @user.tokens.create.token unless session[:token]

# Decide on a lat lon to initialise potlatch with. Various ways of doing this
if params['lon'] and params['lat']
	lon =  h(params['lon'])
	lat =  h(params['lat'])
	zoom =  h(params['zoom'])

elsif params['mlon'] and params['mlat']
	lon =  h(params['mlon'])
	lat =  h(params['mlat'])
	zoom =  h(params['zoom'])

elsif params['gpx']
	#use gpx id to locate (dealt with below)

elsif cookies.key?("_osm_location")
	lon,lat,zoom,layers = cookies["_osm_location"].split("|")

elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil?
	lon =  @user.home_lon
	lat =  @user.home_lat

else
	#catch all.  Do nothing.  lat=nil, lon=nil
	#Currently this results in potlatch starting up at 0,0 (Atlantic ocean).
end

zoom='14' if zoom.nil?
%>

	<%= t 'site.edit.flash_player_required' %>

<%= javascript_include_tag 'swfobject.js' %>

<% end %>