quoting the scaffold id for report_500_response()

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

<%
begin
  remote_controller = active_scaffold_controller_for(column.association.klass)
rescue ActiveScaffold::ControllerNotFound
  remote_controller = nil
end

show_add_existing = (!column.through_association? and options_for_association_count(column.association) > 0)

show_add_new = !column.through_association? and (column.plural_association? or (column.singular_association? and not associated.empty?))
show_add_new = false unless @record.class.authorized_for?(:action => :create)

edit_associated_url = url_for(:action => 'edit_associated', :id => parent_record.id, :association => column.name, :associated_id => '--ID--', :_method => :get, :escape => false)
add_new_url = url_for(:action => 'edit_associated', :id => parent_record.id, :association => column.name, :_method => :get);

return unless show_add_new or show_add_existing

-%>

    <% if show_add_new -%>
    <% add_label = column.plural_association? ? as_('Create Another') : as_('Replace With New') -%>
    <%= button_to_function add_label, "new Ajax.Request(#{add_new_url.to_json}, {asynchronous: true, evalScripts: true, onFailure: function(){ActiveScaffold.report_500_response(#{active_scaffold_id.to_json})}})" %>
    <% end -%>

    <%= '|' if show_add_new and show_add_existing %>

    <% if show_add_existing -%>
      <% if remote_controller and remote_controller.respond_to? :uses_record_select? and remote_controller.uses_record_select? -%>
        <%= link_to_record_select as_('Add Existing'), remote_controller.controller_path, :onselect => "new Ajax.Request(#{edit_associated_url.to_json}.sub('--ID--', id), {asynchronous: true, evalScripts: true, onFailure: function(){ActiveScaffold.report_500_response(#{active_scaffold_id})}});" -%>
      <% else -%>
        <% select_options = options_for_select(options_for_association(column.association)) unless column.through_association? -%>
        <%= select_tag 'associated_id', '<option value="">' + as_('- select -') + '</option>' + select_options %>
        <%= button_to_function as_('Add Existing'), "new Ajax.Request(#{edit_associated_url.to_json}.sub('--ID--', Element.previous(this).value), {asynchronous: true, evalScripts: true, onFailure: function(){ActiveScaffold.report_500_response(#{active_scaffold_id})}})" %>
      <% end -%>
    <% end -%>

<%
begin
  remote_controller = active_scaffold_controller_for(column.association.klass)
rescue ActiveScaffold::ControllerNotFound
  remote_controller = nil
end

show_add_existing = (!column.through_association? and options_for_association_count(column.association) > 0)

show_add_new = !column.through_association? and (column.plural_association? or (column.singular_association? and not associated.empty?))
show_add_new = false unless @record.class.authorized_for?(:action => :create)

edit_associated_url = url_for(:action => 'edit_associated', :id => parent_record.id, :association => column.name, :associated_id => '--ID--', :_method => :get, :escape => false)
add_new_url = url_for(:action => 'edit_associated', :id => parent_record.id, :association => column.name, :_method => :get);

return unless show_add_new or show_add_existing

-%>

    <% if show_add_new -%>
    <% add_label = column.plural_association? ? as_('Create Another') : as_('Replace With New') -%>
    <%= button_to_function add_label, "new Ajax.Request(#{add_new_url.to_json}, {asynchronous: true, evalScripts: true, onFailure: function(){ActiveScaffold.report_500_response(#{active_scaffold_id})}})" %>
    <% end -%>

    <%= '|' if show_add_new and show_add_existing %>

    <% if show_add_existing -%>
      <% if remote_controller and remote_controller.respond_to? :uses_record_select? and remote_controller.uses_record_select? -%>
        <%= link_to_record_select as_('Add Existing'), remote_controller.controller_path, :onselect => "new Ajax.Request(#{edit_associated_url.to_json}.sub('--ID--', id), {asynchronous: true, evalScripts: true, onFailure: function(){ActiveScaffold.report_500_response(#{active_scaffold_id})}});" -%>
      <% else -%>
        <% select_options = options_for_select(options_for_association(column.association)) unless column.through_association? -%>
        <%= select_tag 'associated_id', '<option value="">' + as_('- select -') + '</option>' + select_options %>
        <%= button_to_function as_('Add Existing'), "new Ajax.Request(#{edit_associated_url.to_json}.sub('--ID--', Element.previous(this).value), {asynchronous: true, evalScripts: true, onFailure: function(){ActiveScaffold.report_500_response(#{active_scaffold_id})}})" %>
      <% end -%>
    <% end -%>


Showing protection mode in comments index screen

  <% if @page.nil? %>
    <%= "#{params[:status].titleize if params[:status]} Comments |
        #{link_to('Download CSV', {:format => 'csv', :status => params[:status]})}" %>
  <% else %>
    <%= "#{@page.comments_count} #{pluralize(@page.comments_count, "Comment")} on
         #{link_to(@page.title, page_edit_url(@page.id))}|
         #{link_to('Download CSV', {:format => 'csv', :status => params[:status], :page_id => @page.id})}
         " %>
  <% end %>

  View:
  <%= content_tag :span, link_to_unless_current("All Comments", :status => "all", :page_id => params[:page_id]) %>
  <%= content_tag :span, link_to_unless_current("Approved Comments", :status => "approved", :page_id => params[:page_id]) %>
  <%= content_tag :span, link_to_unless_current("Unapproved Comments", :status => "unapproved", :page_id => params[:page_id]) %>

    <%= render :partial => "comment", :collection => (@comments) %>

<%= will_paginate @comments %>

<% if Comment.new.akismet.valid? %>
  Protected by Akismet
<% elsif Comment.new.mollom.key_ok? %>
  Protected by Mollom
<% elsif current_user.developer? %>
  Comments are not protected. Install Mollom or Akismet to protect against comment spam. Instructions can be found in the README.
<% end %>


change wording of approve comment setting

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

<% content_for :action_nav do %>

<%= link_to "General", '#general' %>

<%= link_to "Publishing", '#publish' %>

<%= link_to "Comments", '#spam' %>

<% end %>

<% form_for :site, :url => { :action => "update" } do |f| %>

General site settings

Website title

<%= f.text_field :title %>

Website subtitle

<%= f.text_field :subtitle %>

      Administrator email
      Shown in emails sent from your site

<%= f.text_field :email %>

<% if false -%>

Publishing and reading

      Urls to ping when publishing

      Each one should be on a separate line.

<%= text_area 'site', 'ping_urls', :rows => 5, :cols => 45 %>

Articles shown on homepage

<%= text_field 'site', 'articles_per_page', :class => 'tiny' %>

      Permalink style
      (How articles are linked to)

      <select name="permalink_style">
        <%= options_for_select(%w(permalink year/month/permalink year/month/day/permalink section/permalink), '') %>
      </select>

<% end -%>

Spam prevention

At the moment Mephisto uses <%= link_to 'Akismet', 'http://akismet.com' %> to automatically handle spam.

Akismet API Key

<%= f.text_field :akismet_key %>

Blog url

<%= f.text_field :akismet_url %>

Allow comments?

<%= f.check_box 'accept_comments' %> Yes, I would like to accept comments.

Will you approve comments?

<%= f.check_box 'approve_comments' %> Yes, approve and publish all comments automatically.

Close comments

      <%= f.select :comment_age, [['Never', 0],
          ['24 hours after publishing',     1],
          ['1 week after publishing',       7],
          ['2 weeks after publishing',      14],
          ['1 month after publishing',      30],
          ['3 months after publishing',     90],
          ['6 months after publishing',     180],
          ['1 year after publishing',       365]] %>

<%= submit_tag 'Save and apply settings' %>

<% end %>

<% content_for :action_nav do %>

<%= link_to "General", '#general' %>

<%= link_to "Publishing", '#publish' %>

<%= link_to "Comments", '#spam' %>

<% end %>

<% form_for :site, :url => { :action => "update" } do |f| %>

General site settings

Website title

<%= f.text_field :title %>

Website subtitle

<%= f.text_field :subtitle %>

      Administrator email
      Shown in emails sent from your site

<%= f.text_field :email %>

<% if false -%>

Publishing and reading

      Urls to ping when publishing

      Each one should be on a separate line.

<%= text_area 'site', 'ping_urls', :rows => 5, :cols => 45 %>

Articles shown on homepage

<%= text_field 'site', 'articles_per_page', :class => 'tiny' %>

      Permalink style
      (How articles are linked to)

      <select name="permalink_style">
        <%= options_for_select(%w(permalink year/month/permalink year/month/day/permalink section/permalink), '') %>
      </select>

<% end -%>

Spam prevention

At the moment Mephisto uses <%= link_to 'Akismet', 'http://akismet.com' %> to automatically handle spam.

Akismet API Key

<%= f.text_field :akismet_key %>

Blog url

<%= f.text_field :akismet_url %>

Allow comments?

<%= f.check_box 'accept_comments' %> Yes, I would like to accept comments.

Will you approve comments?

<%= f.check_box 'approve_comments' %> Yes, All comments require approval before being published.

Close comments

      <%= f.select :comment_age, [['Never', 0],
          ['24 hours after publishing',     1],
          ['1 week after publishing',       7],
          ['2 weeks after publishing',      14],
          ['1 month after publishing',      30],
          ['3 months after publishing',     90],
          ['6 months after publishing',     180],
          ['1 year after publishing',       365]] %>

<%= submit_tag 'Save and apply settings' %>

<% end %>


Fix public body creation

Fix public body creation

Use a relative link for creating a new public body, so it works
when the admin pages are proxied.

<% @title = 'New public authority' %>

<%=@title%>

      <% form_for :public_body, @public_body, :url => "create", :html => {:class => "form form-horizontal"} do |f| %>
          <%= render :partial => 'form', :locals => {:f => f} %>

            <%= f.submit "Create", :class => "btn btn-primary"  %>

        <% end %>

              <%= link_to _('List all'), 'list' %>

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

<% @title = 'New public authority' %>

<%=@title%>

      <% form_for :public_body, @public_body, :url => {:action => "create"}, :html => {:class => "form form-horizontal"} do |f| %>
          <%= render :partial => 'form', :locals => {:f => f} %>

            <%= f.submit "Create", :class => "btn btn-primary"  %>

        <% end %>

              <%= link_to _('List all'), 'list' %>

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


Because we support exim and postfix changing how it's labelled in the admin interface

<% @title = "FOI request - " + h(@info_request.title) %>
<%= javascript_include_tag :defaults %>

<%=@title%>

<% form_tag '../move_request', { :class => "inline" } do %>

<%= hidden_field_tag 'info_request_id', @info_request.id %>
<% for column in InfoRequest.content_columns %>
  <%= column.human_name %>: <%=h @info_request.send(column.name) %>
  <% if column.name == 'described_state' %>
    Calculated status: <%= @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 %>
  <% if ![ 'allow_new_responses_from' ].include?(column.name) %>

  <% end %>
<% end %>
  Created by:
  <% if @info_request.is_external? %>
        <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API)
  <% else %>
    <%= user_both_links(@info_request.user) %>
  <% end %>

            (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>)

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

Public authority: <%= public_body_both_links(@info_request.public_body) %>

            (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>)

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

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

    <%= link_to 'Public page', main_url(request_url(@info_request)) %>
    | <%= link_to 'Edit', '../edit/' + @info_request.id.to_s %>
    | <%= link_to 'FOI officer upload URL', '../generate_upload_url/' + @info_request.id.to_s %> (see also links on incoming messages below)

Events

  Id
  <% for column in InfoRequestEvent.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h info_request_event.id %>
  <% for column in InfoRequestEvent.content_columns %>

      <% if column.name == 'params_yaml' %>
        <%= info_request_event.params_yaml_as_html %>
      <% elsif column.text? %>
        <%=h (info_request_event.send(column.name) || '').gsub(/_/,' ') %>
      <% else %>
        <%=h info_request_event.send(column.name) %>
      <% end %>

  <% end %>

    <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
        <% form_tag '../mark_event_as_clarification' do %>

              <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
              <%= submit_tag "Was clarification request" %>

        <% end %>
    <% end %>

<% end %>

Outgoing messages

    Id
    <% for column in OutgoingMessage.content_columns %>
      <%= column.human_name %>
    <% end %>
    Actions

<% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h outgoing_message.id %>
  <% for column in OutgoingMessage.content_columns.map { |c| c.name } %>

    <% if column == 'body' %>

<%= simple_format( truncate(outgoing_message.body, :length => 400,
                 :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')")
            )) %>

<%= simple_format( outgoing_message.body ) %>

    <% else %>
      <%= simple_format( outgoing_message.send(column) ) %>
    <% end %>

  <% end %>

  <% form_tag '../resend' do %>

          <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
          <%= submit_tag "Resend" %>

  <% end %>
  <%= link_to "Edit", '../edit_outgoing/' + outgoing_message.id.to_s %>

<% end %>

Incoming messages

  Id
  <% for column in IncomingMessage.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>">
  <%=h incoming_message.id %>
  <% for column in IncomingMessage.content_columns.map { |c| c.name } %>
    <% if column =~ /^cached_.*?$/ %>

<%= simple_format( truncate(incoming_message.send(column), :length => 400,
               :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')")
            )) %>

<%= simple_format( incoming_message.send(column) ) %>

    <% else %>
      <%= simple_format( incoming_message.send(column) ) %>
    <% end %>
  <% end %>

        <% if !incoming_message.raw_email_id.nil? %>

            <%= link_to "View raw email", "../show_raw_email/" + incoming_message.raw_email_id.to_s %>

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

<% end %>

Annotations

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

    Id
    Posted by
    <% for column in Comment.content_columns %>
      <%= column.human_name %>
    <% end %>
    Actions

  <% for comment in @info_request.comments %>
    <tr class="<%= cycle('odd', 'even') %>">
    <%=h comment.id %>
    <%= user_both_links(comment.user) %>
    <% for column in Comment.content_columns.map { |c| c.name } %>
      <% if column == 'body' && !comment.visible %>
          <s><%=h comment.send(column) %></s>
      <% else %>
          <%=h comment.send(column) %>
      <% end %>
    <% end %>

        <%= link_to "Edit", '../edit_comment/' + comment.id.to_s %>

  <% end %>

<% else %>

None yet.

<% end %>

Mailer 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 - " + h(@info_request.title) %>
<%= javascript_include_tag :defaults %>

<%=@title%>

<% form_tag '../move_request', { :class => "inline" } do %>

<%= hidden_field_tag 'info_request_id', @info_request.id %>
<% for column in InfoRequest.content_columns %>
  <%= column.human_name %>: <%=h @info_request.send(column.name) %>
  <% if column.name == 'described_state' %>
    Calculated status: <%= @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 %>
  <% if ![ 'allow_new_responses_from' ].include?(column.name) %>

  <% end %>
<% end %>
  Created by:
  <% if @info_request.is_external? %>
        <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API)
  <% else %>
    <%= user_both_links(@info_request.user) %>
  <% end %>

            (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>)

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

Public authority: <%= public_body_both_links(@info_request.public_body) %>

            (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>)

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

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

    <%= link_to 'Public page', main_url(request_url(@info_request)) %>
    | <%= link_to 'Edit', '../edit/' + @info_request.id.to_s %>
    | <%= link_to 'FOI officer upload URL', '../generate_upload_url/' + @info_request.id.to_s %> (see also links on incoming messages below)

Events

  Id
  <% for column in InfoRequestEvent.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h info_request_event.id %>
  <% for column in InfoRequestEvent.content_columns %>

      <% if column.name == 'params_yaml' %>
        <%= info_request_event.params_yaml_as_html %>
      <% elsif column.text? %>
        <%=h (info_request_event.send(column.name) || '').gsub(/_/,' ') %>
      <% else %>
        <%=h info_request_event.send(column.name) %>
      <% end %>

  <% end %>

    <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
        <% form_tag '../mark_event_as_clarification' do %>

              <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
              <%= submit_tag "Was clarification request" %>

        <% end %>
    <% end %>

<% end %>

Outgoing messages

    Id
    <% for column in OutgoingMessage.content_columns %>
      <%= column.human_name %>
    <% end %>
    Actions

<% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h outgoing_message.id %>
  <% for column in OutgoingMessage.content_columns.map { |c| c.name } %>

    <% if column == 'body' %>

<%= simple_format( truncate(outgoing_message.body, :length => 400,
                 :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')")
            )) %>

<%= simple_format( outgoing_message.body ) %>

    <% else %>
      <%= simple_format( outgoing_message.send(column) ) %>
    <% end %>

  <% end %>

  <% form_tag '../resend' do %>

          <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
          <%= submit_tag "Resend" %>

  <% end %>
  <%= link_to "Edit", '../edit_outgoing/' + outgoing_message.id.to_s %>

<% end %>

Incoming messages

  Id
  <% for column in IncomingMessage.content_columns %>
    <%= column.human_name %>
  <% end %>
  Actions

<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>">
  <%=h incoming_message.id %>
  <% for column in IncomingMessage.content_columns.map { |c| c.name } %>
    <% if column =~ /^cached_.*?$/ %>

<%= simple_format( truncate(incoming_message.send(column), :length => 400,
               :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')")
            )) %>

<%= simple_format( incoming_message.send(column) ) %>

    <% else %>
      <%= simple_format( incoming_message.send(column) ) %>
    <% end %>
  <% end %>

        <% if !incoming_message.raw_email_id.nil? %>

            <%= link_to "View raw email", "../show_raw_email/" + incoming_message.raw_email_id.to_s %>

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

<% end %>

Annotations

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

    Id
    Posted by
    <% for column in Comment.content_columns %>
      <%= column.human_name %>
    <% end %>
    Actions

  <% for comment in @info_request.comments %>
    <tr class="<%= cycle('odd', 'even') %>">
    <%=h comment.id %>
    <%= user_both_links(comment.user) %>
    <% for column in Comment.content_columns.map { |c| c.name } %>
      <% if column == 'body' && !comment.visible %>
          <s><%=h comment.send(column) %></s>
      <% else %>
          <%=h comment.send(column) %>
      <% end %>
    <% end %>

        <%= link_to "Edit", '../edit_comment/' + comment.id.to_s %>

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


use deborphan for package list generation

git-svn-id: e70f47238a868777ecefe75ba01929cffb2d8127@595 d8b24053-1f83-4035-b5c3-ce8b92cd91ad

Bündel aus einer Paketliste erstellen

Hier kannst du ein Bündel aus einer vorhandenen Paketliste erstellen.
Die Liste muss in Form einter Textdatei vorliegen (plain text),
mit einem Paketnamen pro Zeile.

Die Liste der auf deinem Computer installierten Pakete kannst du zum Beispiel mit

deborphan -a | awk '{print $2}' > packages.list

herausfinden. (Dazu muss das Paket <%= link_to 'deborphan', package_url(Package.find(:first,:conditions =>{:name => "deborphan"}))%> installiert sein. Die erzeugte Liste enthält nur eine minimal notwendige Anzahl von (Meta-)Paketen, um deine
Installation komplett wiederherzustellen.)

<%= form_tag({:controller => :cart, :id => :current_user.id, :action => :create_from_list}, :multipart => true)%>

Datei, die die Paketliste enthält, auswählen:

<%= file_field(:datei, :attachment) %>

<%= submit_tag('Erstellen') %>

</form>

Bündel aus einer Paketliste erstellen

Hier kannst du ein Bündel aus einer vorhandenen Paketliste erstellen.
Die Liste muss in Form einter Textdatei vorliegen (plain text),
mit einem Paketnamen pro Zeile.

Die Liste der auf deinem Computer installierten Pakete kannst du zum Beispiel mit

dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}' > packages.list

herausfinden.

<%= form_tag({:controller => :cart, :id => :current_user.id, :action => :create_from_list}, :multipart => true)%>

Datei, die die Paketliste enthält, auswählen:

<%= file_field(:datei, :attachment) %>

<%= submit_tag('Erstellen') %>

</form>


Properly close a p tag

Properly close a p tag

<%= Configuration::site_name %> is another project from the
        <% link_to "http://www.openaustraliafoundation.org.au" do %>
          <%= image_tag "/alavetelitheme/images/openaustralia_foundation.png", :width => "200", :id => "oaf_logo" %>
        <% end %>

Like it? Then also take a look at

<%= image_tag "/alavetelitheme/images/oa_logo.png"%> <%= link_to "OpenAustralia.org", "http://www.openaustralia.org" %>

<%= image_tag "/alavetelitheme/images/el_logo.png"%> <%= link_to "ElectionLeaflets.org.au", "http://www.electionleaflets.org.au" %>

<%= image_tag "/alavetelitheme/images/pa_logo.png"%> <%= link_to "PlanningAlerts.org.au", "http://www.planningalerts.org.au" %>

        <%= _('Powered by Alaveteli') %>

            <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_url %>

             <a href="https://twitter.com/<%= Configuration::twitter_username %>"><%= _("Follow us on twitter") %>

<%= Configuration::site_name %> is another project from the
        <% link_to "http://www.openaustraliafoundation.org.au" do %>
          <%= image_tag "/alavetelitheme/images/openaustralia_foundation.png", :width => "200", :id => "oaf_logo" %>
        <% end %>
      </p

Like it? Then also take a look at

<%= image_tag "/alavetelitheme/images/oa_logo.png"%> <%= link_to "OpenAustralia.org", "http://www.openaustralia.org" %>

<%= image_tag "/alavetelitheme/images/el_logo.png"%> <%= link_to "ElectionLeaflets.org.au", "http://www.electionleaflets.org.au" %>

<%= image_tag "/alavetelitheme/images/pa_logo.png"%> <%= link_to "PlanningAlerts.org.au", "http://www.planningalerts.org.au" %>

        <%= _('Powered by Alaveteli') %>

            <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_url %>

             <a href="https://twitter.com/<%= Configuration::twitter_username %>"><%= _("Follow us on twitter") %>


Minimize number of HTTP requests for plugin assets

(ActionItem2314)

<!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" xml:lang="<%= html_language %>" lang="<%= html_language %>">

    <title><%= h page_title %></title>
    <%= yield(:feeds) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag template_stylesheet_path %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
    <%
      plugins_stylesheets = @plugins.enabled_plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') }
    %>
    <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache-plugins-style-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %>
    <%= stylesheet_link_tag theme_stylesheet_path %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%= javascript_tag('render_all_jquery_ui_widgets()') %>
    <%
      plugins_javascripts = @plugins.enabled_plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
    %>
    <%= javascript_include_tag(plugins_javascripts, :cache => 'cache-plugins-js-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %>
    <%=
      @plugins.map(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template ) +
    (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
    %>" >

    <%= _("Go to the content") %>
    <%=
      @plugins.map(:body_beginning).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

        <%= theme_header %>

            <%= usermenu_logged_in %>

              <%= _("%s or %s") % [thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login'), link_to('' + _('Sign up') + '', :controller => 'account', :action => 'signup') ] %>

                <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>

          <form action="/search" class="search_form clean" method="get" id="top-search">
            <input name="query" size="15" value="<%=_('Search...')%>"
                onfocus="this.form.className='focused';
                         if(this.value=='<%=_('Search...')%>'){this.value=''}"
                onblur="this.form.className='';
                        if(/^\s*$/.test(this.value)){
                          this.value='<%=_('Search...')%>';
                          this.form.className='clean'
                        }" />

<%=_('Press Enter to send the search query.')%>

          </form>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>
    <%= theme_javascript_ng %>

<!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" xml:lang="<%= html_language %>" lang="<%= html_language %>">

    <title><%= h page_title %></title>
    <%= yield(:feeds) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag template_stylesheet_path %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
    <% @plugins.enabled_plugins.each do |plugin| %>
      <% if plugin.stylesheet? %>
        <%= stylesheet_tag plugin.class.public_path('style.css'), {} %>
      <% end %>
    <% end %>
    <%= stylesheet_link_tag theme_stylesheet_path %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%= javascript_tag('render_all_jquery_ui_widgets()') %>
    <% @plugins.enabled_plugins.each do |plugin| %>
      <% plugin.js_files.each do |js_file| %>
        <%= javascript_src_tag plugin.class.public_path(js_file), {} %>
      <% end %>
    <% end %>
    <%=
      @plugins.map(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template ) +
    (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
    %>" >

    <%= _("Go to the content") %>
    <%=
      @plugins.map(:body_beginning).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

        <%= theme_header %>

            <%= usermenu_logged_in %>

              <%= _("%s or %s") % [thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login'), link_to('' + _('Sign up') + '', :controller => 'account', :action => 'signup') ] %>

                <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>

          <form action="/search" class="search_form clean" method="get" id="top-search">
            <input name="query" size="15" value="<%=_('Search...')%>"
                onfocus="this.form.className='focused';
                         if(this.value=='<%=_('Search...')%>'){this.value=''}"
                onblur="this.form.className='';
                        if(/^\s*$/.test(this.value)){
                          this.value='<%=_('Search...')%>';
                          this.form.className='clean'
                        }" />

<%=_('Press Enter to send the search query.')%>

          </form>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>
    <%= theme_javascript_ng %>


disable login button on click

disable login button on click

<% unless logged_in? -%>

            Log in / Register

        <% form_tag session_path do %>
        <%= hidden_field_tag "called_from[controller]", controller.controller_name -%>
        <%= hidden_field_tag "called_from[action]", controller.action_name -%>
        <%= hidden_field_tag "called_from[id]", params[:id] -%>

                    Login:

                    <%= text_field_tag 'login', nil, :class => 'field' -%>

                    Password:

                    <%= password_field_tag 'password', nil, :class => 'field' -%>

                    Remember me: <%= check_box_tag 'remember_me',nil,false, {:style=>"width:2em;"} %>

                    <%= image_tag "openid-16x16.gif" %>OpenID:

                    <%= text_field_tag 'openid_identifier', nil, :class => 'field' -%>

                Alternatively...

                Log in using <%= image_tag "openid-16x16.gif" %>OpenID

            <%= submit_tag "Log in", :id=>"login_button",:onclick=>"$('login_button').disabled=true;this.form.submit();return(false);" %>

        <% end %>

            Need an account?

            <%= link_to "Sign up", signup_url %>

            <%= link_to "Forgotten password?", forgot_password_url %>

<% end -%>

<% unless logged_in? -%>

            Log in / Register

        <% form_tag session_path do %>
        <%= hidden_field_tag "called_from[controller]", controller.controller_name -%>
        <%= hidden_field_tag "called_from[action]", controller.action_name -%>
        <%= hidden_field_tag "called_from[id]", params[:id] -%>

                    Login:

                    <%= text_field_tag 'login', nil, :class => 'field' -%>

                    Password:

                    <%= password_field_tag 'password', nil, :class => 'field' -%>

                    Remember me: <%= check_box_tag 'remember_me',nil,false, {:style=>"width:2em;"} %>

                    <%= image_tag "openid-16x16.gif" %>OpenID:

                    <%= text_field_tag 'openid_identifier', nil, :class => 'field' -%>

                Alternatively...

                Log in using <%= image_tag "openid-16x16.gif" %>OpenID

            <%= submit_tag "Log in" %>

        <% end %>

            Need an account?

            <%= link_to "Sign up", signup_url %>

            <%= link_to "Forgotten password?", forgot_password_url %>

<% end -%>


oops, broke eol_preview accidentally

oops, broke eol_preview accidentally

<% @title ||= :eol_preview_title.t %>

<%= :eol_preview_explanation.tp %>

  <%= :eol_preview_name_count.t :count => @names.length %>

  <%= :eol_preview_image_count.t :count => @image_data.length %>

<% odd_or_even = 0
for name in @names
  odd_or_even = 1 - odd_or_even %>
  <div class="ListLine<%= odd_or_even %>"
       style="padding-top:10px; padding-bottom:10px;">

      <%= link_to(name.display_name.t, :controller => "name",
                  :action => "show_name", :id => name.id) %>

    <% if @image_data[name.id]
      for image_id, observation_id in @image_data[name.id] %>
        <%= thumbnail(image_id, :border => 0, :link => :show_observation,
                      :obs => observation_id, :votes => false,
                      :size => :thumbnail) %>
      <% end
    end %>

<% end %>

<% @title ||= :eol_preview_title.t %>

<%= :eol_preview_explanation.tp %>

  <%= :eol_preview_name_count.t :count => @names.length %>

  <%= :eol_preview_image_count.t :count => @image_data.length %>

<% odd_or_even = 0
for name in @names
  odd_or_even = 1 - odd_or_even %>
  <div class="ListLine<%= odd_or_even %>"
       style="padding-top:10px; padding-bottom:10px;">

      <%= link_to(name.display_name.t, :controller => "name",
                  :action => "show_name", :id => name.id) %>

    <% if @image_data[name.id]
      for image_id, observation_id in @image_data[name.id] %>
        <%= thumbnail(image_id, :border => 0, :link => :show_observation,
                      :obs => observation_id, :votes => false
                      :size => :thumbnail) %>
      <% end
    end %>

<% end %>


fixed fatal error as a result of copy/paste programming


Remove reference to missing application.js in scribbish.  Closes #985

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

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

  <title><%=h page_title %></title>
  <%= page_header %>
  <%= stylesheet_link_tag '/stylesheets/theme/application.css', :media => 'all' %>

<%= link_to this_blog.blog_name, { :controller => '/' } %>

<%= this_blog.blog_subtitle %>

      <%= @content_for_layout %>
      <%= javascript_tag 'show_dates_as_local_time()' %>

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

      <%= render_sidebars %>

<%= link_to this_blog.blog_name, { :controller => '/' } %>

powered by <%= link_to 'typo', 'http://typosphere.org' %> /
          styled with <%= link_to 'scribbish', 'http://quotedprintable.com/pages/scribbish' %>

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

  <title><%=h page_title %></title>
  <%= page_header %>
  <%= stylesheet_link_tag '/stylesheets/theme/application.css', :media => 'all' %>
  <%= javascript_include_tag '/javascript/theme/application.js' %>

<%= link_to this_blog.blog_name, { :controller => '/' } %>

<%= this_blog.blog_subtitle %>

      <%= @content_for_layout %>
      <%= javascript_tag 'show_dates_as_local_time()' %>

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

      <%= render_sidebars %>

<%= link_to this_blog.blog_name, { :controller => '/' } %>

powered by <%= link_to 'typo', 'http://typosphere.org' %> /
          styled with <%= link_to 'scribbish', 'http://quotedprintable.com/pages/scribbish' %>


Futher improved presentation of show_image when image is far larger than the browser window.

<%
  @title = :image_show_title.t(:name => @image.unique_format_name)
  commercial_inquiries_ok = @image.user.email_general_commercial
  w, h = @image.size(@size)
  columns = w < 800 ? 2 : 1 rescue 2

  for obs in @image.observations
    new_tab_set do
      add_tab(:show_name.t(:name => obs.format_name), :controller => 'name',
              :action => 'show_name', :id => obs.name.id, :params => query_params)
      add_tab(:google_images.t,
              'http://images.google.com/images?q=%s' % obs.text_name)
      add_tab(:show_object.t(:type => :observation), :controller => 'observer',
              :action => 'show_observation', :id => obs.id, :params => query_params)
    end
  end

  new_tab_set do
    add_tab(:image_show_original.t, :action => 'show_image',
            :id => @image.id, :size => 'original', :params => query_params)
    if commercial_inquiries_ok
	    add_tab(:image_show_inquiry.t, :controller => 'observer',
              :action => 'commercial_inquiry', :id => @image.id,
              :params => query_params)
    end
    if check_permission(@image)
      add_tab(:image_show_edit.t, :action => 'edit_image', :id => @image.id,
              :params => query_params)
      add_tab(:image_show_destroy.t, { :action => 'destroy_image', :id => @image.id,
              :params => query_params }, { :confirm => :are_you_sure.l })
    end
  end

  draw_prev_next_tabs(@image)
%>

  <% if columns > 1 %>

  <% end %>

  <%= image_copyright(@image) %>

<%=
    Image.all_sizes.select do |size|
      !@image.width || @image.has_size?(size)
    end.map do |size|
      w, h = @image.size(size)
      title = "#{w} × #{h} pixels"
      help = w ? { :title => title } : {}
      if size.to_s != @size.to_s
        link_to(:"image_show_#{size}".t, { :action => 'show_image', :id => @image.id,
          :size => size, :params => query_params }, help)
      else
        content_tag(:span, :"image_show_#{size}".t, help)
      end
    end.join(' | ')
  %>

  <%= if @size != @default_size
    link_to(:image_show_make_default.t, :action => 'show_image',
            :id => @image.id, :size => @size, :make_default => 1,
            :params => query_params)
  end %>

  <%= thumbnail(@image, :size => @size, :votes => false,
                :link => { :action => 'show_image', :id => @image.id,
                :size => (@size == @default_size ? :full_size : @default_size),
                :params => query_params }, :original => true) %>

<%= render(:partial => "shared/form_#{@image.license.form_name}") %>

  <% if columns > 1 %>

  <% end %>

  <% if check_permission(@image) %>

      <%= link_to(:image_show_edit.t, :action => 'edit_image',
                  :id => @image.id, :params => query_params) %> |
      <%= link_to(:image_show_destroy.t, { :action => 'destroy_image',
                  :id => @image.id, :params => query_params },
                  { :confirm => :are_you_sure.l }) %>

  <% end %>

  <% if check_permission(@image) %>

      <%= :image_show_original_name.t %>:

        “<%= h(@image.original_name) %>”

  <% end %>

    <%= :image_show_quality.t %>:

      <%= vote = (@image.vote_cache + 0.5).to_i rescue 0
      image_vote_as_long_string(vote).t %>

  <% if is_reviewer? %>

<%= set_export_status_controls(@image) %>

  <% end %>

  <% if @user %>

      <%= :image_show_your_vote.t %>:

      <% current = @image.users_vote(@user).to_i
      args = {:params => query_params, :id => @image.id}
      args[:size] = @size if @size != @default_size
      for value in [0] + Image.all_votes
        str1 = image_vote_as_short_string(value)
        str2 = image_vote_as_help_string(value)
        str3 = :image_show_vote_and_next.t(:value => str1)
        if value == current %>
          <%= content_tag(:b, str2) %> |
          <%= link_to(:NEXT.l, { :vote => value, :next => true }.
                            merge(args)) %>

        <% else %>
          <%= link_to(str2, { :vote => value }.merge(args)) %> |
          <%= link_to(str3, { :vote => value, :next => true }.
                            merge(args)) %>

        <% end
      end %>

  <% end %>

    <%= :image_show_when.t %>:
      <%= @image.when.web_date %>

    <%= :image_show_observations.t %>:

    <% for observation in @image.observations
      text = '' + observation.unique_format_name.t
      if !observation.notes.blank?
        text += '
%s: %s...' %
              [:image_show_notes.t, observation.notes.tl.truncate_html(30)]
        title_args = { :title => observation.notes.tp.html_to_ascii }
      else
        title_args = {}
      end
      len = observation.comments.length
      if len > 0
        text += '
'
        text += :image_show_comments.t(:num => len)
      end
      text += '' %>
      <%= link_to(text, { :controller => 'observer',
                  :action => 'show_observation', :id => observation.id,
                  :params => query_params }, title_args) %>
    <% end %>

  <% if !@image.notes.blank? %>
    <%= sanitize(:image_show_notes.l + ': ' + @image.notes.to_s).tpl %>
  <% end %>

  <% if !@votes.empty? %>

        <%= :USER.t %>
        <%= :VOTE.t %>

      <% for vote in @votes %>

          <%=
            vote.anonymous ? :anonymous.t : user_link(vote.user)
          %>
          <%= :"image_vote_short_#{vote.value}".t %>

      <% end %>

  <% end %>

  <% chgs = @image.copyright_changes(:order => 'id ASC')
     unless chgs.empty? %>

        <%= :DATES.t %>
        <%= :COPYRIGHT_HOLDER.t %>
        <%= :LICENSE.t %>

      <% for i in (0..chgs.length-1) %>

            <%= i > 0 ? chgs[i-1].modified.web_date : @image.created.web_date %> →
            <%= chgs[i].modified.web_date %>

            ©<%= chgs[i].year %> <%= chgs[i].name %>

            <%= link_to(chgs[i].license.display_name.t, chgs[i].license.url) %>

      <% end %>

          <%= chgs[-1].modified.web_date %> →
          <%= @image.modified.web_date %>

          ©<%= @image.when.year %> <%= @image.copyright_holder %>

          <%= link_to(@image.license.display_name.t, @image.license.url) %>

  <% end %>

  <% if columns > 1 %>

  <% end %>

<%= show_object_footer(@image) %>

<%
  @title = :image_show_title.t(:name => @image.unique_format_name)
  commercial_inquiries_ok = @image.user.email_general_commercial

  for obs in @image.observations
    new_tab_set do
      add_tab(:show_name.t(:name => obs.format_name), :controller => 'name',
              :action => 'show_name', :id => obs.name.id, :params => query_params)
      add_tab(:google_images.t,
              'http://images.google.com/images?q=%s' % obs.text_name)
      add_tab(:show_object.t(:type => :observation), :controller => 'observer',
              :action => 'show_observation', :id => obs.id, :params => query_params)
    end
  end

  new_tab_set do
    add_tab(:image_show_original.t, :action => 'show_image',
            :id => @image.id, :size => 'original', :params => query_params)
    if commercial_inquiries_ok
	    add_tab(:image_show_inquiry.t, :controller => 'observer',
              :action => 'commercial_inquiry', :id => @image.id,
              :params => query_params)
    end
    if check_permission(@image)
      add_tab(:image_show_edit.t, :action => 'edit_image', :id => @image.id,
              :params => query_params)
      add_tab(:image_show_destroy.t, { :action => 'destroy_image', :id => @image.id,
              :params => query_params }, { :confirm => :are_you_sure.l })
    end
  end

  draw_prev_next_tabs(@image)
%>

<%= image_copyright(@image) %>

<%=
          # Assume all sizes available until we receive the dimensions.
          Image.all_sizes.select do |size|
            !@image.width || @image.has_size?(size)
          end.map do |size|
            if size.to_s != @size.to_s
              w, h = @image.size(size)
              help = w ? { :title => "#{w} × #{h} pixels" } : {}
              link_to(:"image_show_#{size}".t, { :action => 'show_image',
                      :id => @image.id, :size => size, :params => query_params },
                      help)
            else
              :"image_show_#{size}".t
            end
          end.join(' | ')
        %>

        <%= if @size != @default_size
          link_to(:image_show_make_default.t, :action => 'show_image',
                  :id => @image.id, :size => @size, :make_default => 1,
                  :params => query_params)
        end %>

        <%= thumbnail(@image, :size => @size, :votes => false,
                      :link => { :action => 'show_image', :id => @image.id,
                      :size => (@size == @default_size ? :full_size : @default_size),
                      :params => query_params }, :original => true) %>

          <%= render(:partial => "shared/form_#{@image.license.form_name}") %>

  <% if [:huge, :full_size].member?(@size) %>

  <% end %>

      <% if check_permission(@image) %>

          <%= link_to(:image_show_edit.t, :action => 'edit_image',
                      :id => @image.id, :params => query_params) %> |
          <%= link_to(:image_show_destroy.t, { :action => 'destroy_image',
                      :id => @image.id, :params => query_params },
                      { :confirm => :are_you_sure.l }) %>

      <% end %>

      <% if check_permission(@image) %>

          <%= :image_show_original_name.t %>:

            “<%= h(@image.original_name) %>”

      <% end %>

        <%= :image_show_quality.t %>:

          <%= vote = (@image.vote_cache + 0.5).to_i rescue 0
          image_vote_as_long_string(vote).t %>

      <% if is_reviewer? %>

<%= set_export_status_controls(@image) %>

      <% end %>

      <% if @user %>

          <%= :image_show_your_vote.t %>:

          <% current = @image.users_vote(@user).to_i
          args = {:params => query_params, :id => @image.id}
          args[:size] = @size if @size != @default_size
          for value in [0] + Image.all_votes
            str1 = image_vote_as_short_string(value)
            str2 = image_vote_as_help_string(value)
            str3 = :image_show_vote_and_next.t(:value => str1)
            if value == current %>
              <%= content_tag(:b, str2) %> |
              <%= link_to(:NEXT.l, { :vote => value, :next => true }.
                                merge(args)) %>

            <% else %>
              <%= link_to(str2, { :vote => value }.merge(args)) %> |
              <%= link_to(str3, { :vote => value, :next => true }.
                                merge(args)) %>

            <% end
          end %>

      <% end %>

        <%= :image_show_when.t %>:
          <%= @image.when.web_date %>

        <%= :image_show_observations.t %>:

        <% for observation in @image.observations
          text = '' + observation.unique_format_name.t
          if !observation.notes.blank?
            text += '
%s: %s...' %
                  [:image_show_notes.t, observation.notes.tl.truncate_html(30)]
            title_args = { :title => observation.notes.tp.html_to_ascii }
          else
            title_args = {}
          end
          len = observation.comments.length
          if len > 0
            text += '
'
            text += :image_show_comments.t(:num => len)
          end
          text += '' %>
          <%= link_to(text, { :controller => 'observer',
                      :action => 'show_observation', :id => observation.id,
                      :params => query_params }, title_args) %>
        <% end %>

      <% if !@image.notes.blank? %>
        <%= sanitize(:image_show_notes.l + ': ' + @image.notes.to_s).tpl %>
      <% end %>

      <% if !@votes.empty? %>

            <%= :USER.t %>
            <%= :VOTE.t %>

          <% for vote in @votes %>

              <%=
                vote.anonymous ? :anonymous.t : user_link(vote.user)
              %>
              <%= :"image_vote_short_#{vote.value}".t %>

          <% end %>

      <% end %>

      <% chgs = @image.copyright_changes(:order => 'id ASC')
         unless chgs.empty? %>

            <%= :DATES.t %>
            <%= :COPYRIGHT_HOLDER.t %>
            <%= :LICENSE.t %>

          <% for i in (0..chgs.length-1) %>

                <%= i > 0 ? chgs[i-1].modified.web_date : @image.created.web_date %> →
                <%= chgs[i].modified.web_date %>

                ©<%= chgs[i].year %> <%= chgs[i].name %>

                <%= link_to(chgs[i].license.display_name.t, chgs[i].license.url) %>

          <% end %>

              <%= chgs[-1].modified.web_date %> →
              <%= @image.modified.web_date %>

              ©<%= @image.when.year %> <%= @image.copyright_holder %>

              <%= link_to(@image.license.display_name.t, @image.license.url) %>

      <% end %>

<%= show_object_footer(@image) %>


Changed the titles of controllers

Changed the titles of controllers

<%= link_to "Home", :controller => 'articles', :action => 'home'-%><%=" | " if category-%><%= property ? link_to(category, :controller => category.downcase) : category.titlecase-%><%=" | " if category and property-%><%= property if category and property-%>

<%= link_to "Home", :controller => 'articles', :action => 'home'-%><%=" | " if category-%><%= property ? link_to(category, :controller => category) : category-%><%=" | " if category and property-%><%= property if category and property-%>


ActionItem1050: point admin link to the right place

    <title><%= page_title %></title>
    <%= meta_tags_for_article(@page) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%= noosfero_javascript %>
    <%= import_blocks_stylesheets %>
    <%= import_controller_stylesheets %>
    <%= stylesheet_import(
          %w( common help menu article button search ),
          %w( blocks forms login-box thickbox profiles),
          template_stylesheet_path(),
          icon_theme_stylesheet_path(),
          theme_stylesheet_path(),
          pngfix_stylesheet_path()
        ) %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template )
    %>" onresize="registerDocumentSize()">

    Ir para o conteúdo

        <%= theme_header %>

          <% if logged_in? %>
            <%= _('Welcome, %s.') % link_to('' + user.identifier + '', user.url, :id => "homepage-link", :title => _('Go to your homepage')) %>
            <%= link_to('' + _('Administration') + '', { :controller => 'admin_panel', :action => 'index' }, :id => "controlpanel", :title => _("Configure the system")) %>
            <%= link_to('' + _('Control panel') + '', user.admin_url, :id => "controlpanel", :title => _("Configure your personal account and content")) %>
            <%= link_to('' + _('Logout') + '', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %>
          <% else %>
            <%= _('%s or %s') % [thickbox_inline_popup_link('' + _('Login') + '', 'inlineLoginBox', :id => 'link_login', :help => _('Click here to enter your username and password and be recognized by the system.')), link_to('' + _('Register') + '', :controller => 'account', :action => 'signup') ] %>

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

          <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" value="<%=_('Search...')%>"
                onfocus="this.form.className='focused';
                         if(this.value=='<%=_('Search...')%>'){this.value=''}"
                onblur="this.form.className='';
                        if(/^\s*$/.test(this.value)){
                          this.value='<%=_('Search...')%>';
                          this.form.className='clean'
                        }" />

<%=_('Press Enter to send the search query.')%>

          </form>

           Title of the Site

<%= link_to '' + _('People') + '',
                            '/assets/people', :id=>'people'           %>

<%= link_to '' + _('Communities') + '',
                            '/assets/communities', :id=>'communities' %>

<%= link_to '' + _('Events') + '',
                            '/assets/events', :id=>'events'           %>

          <%= insert_boxes(yield) %>

      <%= theme_footer %>

    <title><%= page_title %></title>
    <%= meta_tags_for_article(@page) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%= noosfero_javascript %>
    <%= import_blocks_stylesheets %>
    <%= import_controller_stylesheets %>
    <%= stylesheet_import(
          %w( common help menu article button search ),
          %w( blocks forms login-box thickbox profiles),
          template_stylesheet_path(),
          icon_theme_stylesheet_path(),
          theme_stylesheet_path(),
          pngfix_stylesheet_path()
        ) %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template )
    %>" onresize="registerDocumentSize()">

    Ir para o conteúdo

        <%= theme_header %>

          <% if logged_in? %>
            <%= _('Welcome, %s.') % link_to('' + user.identifier + '', user.url, :id => "homepage-link", :title => _('Go to your homepage')) %>
            <%= link_to('' + _('Administration') + '', user.admin_url, :id => "controlpanel", :title => _("Configure the system")) %>
            <%= link_to('' + _('Control panel') + '', user.admin_url, :id => "controlpanel", :title => _("Configure your personal account and content")) %>
            <%= link_to('' + _('Logout') + '', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %>
          <% else %>
            <%= _('%s or %s') % [thickbox_inline_popup_link('' + _('Login') + '', 'inlineLoginBox', :id => 'link_login', :help => _('Click here to enter your username and password and be recognized by the system.')), link_to('' + _('Register') + '', :controller => 'account', :action => 'signup') ] %>

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

          <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" value="<%=_('Search...')%>"
                onfocus="this.form.className='focused';
                         if(this.value=='<%=_('Search...')%>'){this.value=''}"
                onblur="this.form.className='';
                        if(/^\s*$/.test(this.value)){
                          this.value='<%=_('Search...')%>';
                          this.form.className='clean'
                        }" />

<%=_('Press Enter to send the search query.')%>

          </form>

           Title of the Site

<%= link_to '' + _('People') + '',
                            '/assets/people', :id=>'people'           %>

<%= link_to '' + _('Communities') + '',
                            '/assets/communities', :id=>'communities' %>

<%= link_to '' + _('Events') + '',
                            '/assets/events', :id=>'events'           %>

          <%= insert_boxes(yield) %>

      <%= theme_footer %>


r231: Text on no_projects page updated to reflect that there are no projects in the 'projects' directory (not the 'builds' directory).

Welcome to CruiseControl.rb!

There are no projects in the projects directory yet.

      To add a project, open command line in the directory where you unpacked this tool, and type:

  cruise add my_project --url http://my/project/subversion/trunk

      If you have a problem with this command, you may find that cruise help is ... helpful.
      If it doesn't help, there is always <%= link_to_documentation('the manual') %>.

Welcome to CruiseControl.rb!

There are no projects in the builds directory yet.

      To add a project, open command line in the directory where you unpacked this tool, and type:

  cruise add my_project --url http://my/project/subversion/trunk

      If you have a problem with this command, you may find that cruise help is ... helpful.
      If it doesn't help, there is always <%= link_to_documentation('the manual') %>.


Change submit tags to button ones, form won't be accidentally submitted

<% if @saved_condition %>
  <fieldset id="saved_condition_update" class="">
    <legend><%= l(:charts_saved_condition_label) %></legend>

      <%= l(:charts_saved_condition_name) %>
      <%= text_field_tag "saved_condition_update_name", @saved_condition.name, { :class => "select-small" } %>
      <%= l(:charts_saved_condition_project_id) %>
      <%= check_box_tag 'saved_condition_update_project_id', @project.id, @saved_condition.project_id == @project.id %>
      <%= tag :input, "type" => "button", "name" => "commit", "value" => l(:button_update), :onclick => "$('chart_form_action').value = 'saved_condition_update'; $('chart_form').submit(); return false;" %>
      <%= tag :input, "type" => "button", "name" => "commit", "value" => l(:button_cancel), :onclick => "$('saved_condition_update').hide(); return false;" %>

  </fieldset>

<% end %>

<fieldset id="saved_condition_create" class="">
  <legend><%= l(:charts_saved_condition_label) %></legend>

    <%= l(:charts_saved_condition_name) %>
    <%= text_field_tag "saved_condition_create_name", "", { :class => "select-small" } %>
    <%= l(:charts_saved_condition_project_id) %>
    <%= check_box_tag 'saved_condition_create_project_id', @project.id, false %>
    <%= tag :input, "type" => "button", "name" => "commit", "value" => l(:button_save), :onclick => "$('chart_form_action').value = 'saved_condition_create'; $('chart_form').submit(); return false;" %>
    <%= tag :input, "type" => "button", "name" => "commit", "value" => l(:button_cancel), :onclick => "$('saved_condition_create').hide(); return false;" %>

</fieldset>

<% if @saved_condition %>
  <fieldset id="saved_condition_update" class="">
    <legend><%= l(:charts_saved_condition_label) %></legend>

      <%= l(:charts_saved_condition_name) %>
      <%= text_field_tag "saved_condition_update_name", @saved_condition.name, { :class => "select-small" } %>
      <%= l(:charts_saved_condition_project_id) %>
      <%= check_box_tag 'saved_condition_update_project_id', @project.id, @saved_condition.project_id == @project.id %>
      <%= submit_tag l(:button_update), :onclick => "$('chart_form_action').value = 'saved_condition_update'; $('chart_form').submit(); return false;" %>
      <%= submit_tag l(:button_cancel), :onclick => "$('saved_condition_update').hide(); return false;" %>

  </fieldset>

<% end %>

<fieldset id="saved_condition_create" class="">
  <legend><%= l(:charts_saved_condition_label) %></legend>

    <%= l(:charts_saved_condition_name) %>
    <%= text_field_tag "saved_condition_create_name", "", { :class => "select-small" } %>
    <%= l(:charts_saved_condition_project_id) %>
    <%= check_box_tag 'saved_condition_create_project_id', @project.id, false %>
    <%= submit_tag l(:button_save), :onclick => "$('chart_form_action').value = 'saved_condition_create'; $('chart_form').submit(); return false;" %>
    <%= submit_tag l(:button_cancel), :onclick => "$('saved_condition_create').hide(); return false;" %>

</fieldset>


No need for link in project header

No need for link in project header

Signed-off-by: James Urquhart <d092eb11f6d4ecd368c05e395455102ecf3e697d@gmail.com>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <% if not @active_project.nil? %>
    <title><%= h @active_project.name %> - <%= h @page_title %> @ <%= h Company.owner.name %></title>
    <% else %>
    <title><%= h @page_title %> @ <%= h Company.owner.name %></title>
    <% end %>

	<%= stylesheet_link_tag 'project_website' %>
	<% if not @additional_stylesheets.nil?
	  @additional_stylesheets.each do |ss| -%>
	  <%= stylesheet_link_tag ss %>
	  <% end %>
	<% end %>
	<%= javascript_include_tag 'jquery.js' %>
	<%= javascript_include_tag 'jquery-ui.js' %>
	<%= javascript_include_tag 'jrails.js' %>
	<%= javascript_include_tag 'application.js' %>

	<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>

	<%= javascript_tag "var PROJECT_ID = #{@active_project.id};" %>

	<% if !@active_project.is_active? %>

			  <%= :project_locked_header.l %>
			  <% if @active_project.status_can_be_changed_by(@logged_user) %>
			      <%= link_to :mark_project_as_active.l, {:controller => 'project', :action => 'open'}, :method => :post, :confirm => :mark_project_as_active_confirmation.l %>
			<% end %>

	<% end %>

<%= h @active_project.name %>

<%= render :partial => 'layouts/user_box', :locals => {:user => @logged_user, :projects => @active_projects} %>

      <%= render :partial => 'layouts/tabs' if not @tabbed_navigation_items.nil? %>

          <%= render :partial => 'layouts/crumbs' if not @bread_crumbs.nil? %>

          <% if AppConfig.search_enabled %>

            <%= form_tag :controller => 'project', :action => 'search' %>

<%
  @search_field_default_value = :search_box_default.l
  @last_search ||= @search_field_default_value
  @search_field_attrs = {
	  :onfocus => "if (event.target.value == '#{@search_field_default_value}') event.target.value=''",
      :onblur => "if (event.target.value == '#{@search_field_default_value}') event.target.value=''"
  }
%>
                <%= text_field_tag 'search_id', (h @last_search), @search_field_attrs %><button type="submit"><%= :go.l %></button>

            </form>

         <% end %>

<% if flash[:message] %>
          <div id="<%= flash[:error] ? 'error' : 'success' %>" class="StatusMessage <%= flash[:error] ? 'flash_error' : 'flash_success' %>"><%= h flash[:message] %>

<% end %>

<%= h @page_title %> <% if @private_object %><img src="<%= image_path('icons/private.gif') %>" alt="private"/><% end %>

            <div id="content" <%= @content_for_sidebar.nil? ? '' : 'class=\'sidebar\'' %>>
              <%= render :partial => 'layouts/actions' if not @page_actions.nil? %>

              <%= yield %>

<% if not @content_for_sidebar.nil? %>

<%= render :partial => @content_for_sidebar %>

<% end %>

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <% if not @active_project.nil? %>
    <title><%= h @active_project.name %> - <%= h @page_title %> @ <%= h Company.owner.name %></title>
    <% else %>
    <title><%= h @page_title %> @ <%= h Company.owner.name %></title>
    <% end %>

	<%= stylesheet_link_tag 'project_website' %>
	<% if not @additional_stylesheets.nil?
	  @additional_stylesheets.each do |ss| -%>
	  <%= stylesheet_link_tag ss %>
	  <% end %>
	<% end %>
	<%= javascript_include_tag 'jquery.js' %>
	<%= javascript_include_tag 'jquery-ui.js' %>
	<%= javascript_include_tag 'jrails.js' %>
	<%= javascript_include_tag 'application.js' %>

	<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>

	<%= javascript_tag "var PROJECT_ID = #{@active_project.id};" %>

	<% if !@active_project.is_active? %>

			  <%= :project_locked_header.l %>
			  <% if @active_project.status_can_be_changed_by(@logged_user) %>
			      <%= link_to :mark_project_as_active.l, {:controller => 'project', :action => 'open'}, :method => :post, :confirm => :mark_project_as_active_confirmation.l %>
			<% end %>

	<% end %>

<%= link_to (h @active_project.name), :controller => 'project', :action => 'overview', :id => @active_project.id %>

<%= render :partial => 'layouts/user_box', :locals => {:user => @logged_user, :projects => @active_projects} %>

      <%= render :partial => 'layouts/tabs' if not @tabbed_navigation_items.nil? %>

          <%= render :partial => 'layouts/crumbs' if not @bread_crumbs.nil? %>

          <% if AppConfig.search_enabled %>

            <%= form_tag :controller => 'project', :action => 'search' %>

<%
  @search_field_default_value = :search_box_default.l
  @last_search ||= @search_field_default_value
  @search_field_attrs = {
	  :onfocus => "if (event.target.value == '#{@search_field_default_value}') event.target.value=''",
      :onblur => "if (event.target.value == '#{@search_field_default_value}') event.target.value=''"
  }
%>
                <%= text_field_tag 'search_id', (h @last_search), @search_field_attrs %><button type="submit"><%= :go.l %></button>

            </form>

         <% end %>

<% if flash[:message] %>
          <div id="<%= flash[:error] ? 'error' : 'success' %>" class="StatusMessage <%= flash[:error] ? 'flash_error' : 'flash_success' %>"><%= h flash[:message] %>

<% end %>

<%= h @page_title %> <% if @private_object %><img src="<%= image_path('icons/private.gif') %>" alt="private"/><% end %>

            <div id="content" <%= @content_for_sidebar.nil? ? '' : 'class=\'sidebar\'' %>>
              <%= render :partial => 'layouts/actions' if not @page_actions.nil? %>

              <%= yield %>

<% if not @content_for_sidebar.nil? %>

<%= render :partial => @content_for_sidebar %>

<% end %>

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


adding google analytics

adding google analytics

git-svn-id: 86f0fce46016f090801773733838b5fec293694e@74 f0bc2f90-cf15-dc11-b192-0016e6374d05

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

	<title>RubyURL » <%= (title = yield :title) ? title : 'Keep it short (and sweet)' %></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta name="description" content="description goes here" />
	<meta name="keywords" content="keywords go here" />
	<meta http-equiv="Content-Language" content="en-us" />
	<meta name="ROBOTS" content="ALL" />
	<meta http-equiv="imagetoolbar" content="false" />
	<meta name="MSSmartTagsPreventParsing" content="true" />

	<%= stylesheet_link_tag "reset" %>
	<%= stylesheet_link_tag "master" %>

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

			<%= yield %>

Terms of Use:

RubyURL was created as a free service to make posting long URLs easier. If you use it for spamming or illegal purposes, your RubyURL will be disabled. This service is provided without warranty of any kind.

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


Fix response table bug

Fix response table bug

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

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

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


More specific help.

More specific help.

<%= error_messages_for 'public_body' %>

Name

<%= text_field 'public_body', 'name', :size => 60  %>

Short name (only put in abbreviations which are really used, otherwise leave blank. Short or long name is used in the URL - don't worry about breaking URLs through renaming, as the history is used to redirect)

<%= text_field 'public_body', 'short_name', :size => 60  %>

Request email (set to blank (empty string) if can't find an address; to not_apply if FOI no longer / never did apply to authority)

<%= text_field 'public_body', 'request_email', :size => 40  %>

Home page (of whole authority, not just their FOI page; set to blank to guess it from the email)

<%= text_field 'public_body', 'home_page', :size => 60  %>

Tags (space separated:
    <% for category, description in PublicBody.categories_by_tag %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>
)

<%= text_field 'public_body', 'tag_string', :size => 80  %>

Notes (for users to consider when making FOI requests to the authority)

<%= text_area 'public_body', 'notes', :rows => 4, :cols => 60  %>

Comment for this edit (put URL or other source of new info)

<%= text_area 'public_body', 'last_edit_comment', :rows => 2, :cols => 60  %>

Privacy note: The email addresses are assumed public data,
so we can share the love around later. If somebody wants to give us a
super-secret address (say to bypass spam traps) then we'll have to rethink
this.

<%= error_messages_for 'public_body' %>

Name

<%= text_field 'public_body', 'name', :size => 60  %>

Short name (only put in abbreviations which are really used, otherwise leave blank. Short or long name is used in the URL - don't worry about breaking URLs through renaming, as the history is used to redirect)

<%= text_field 'public_body', 'short_name', :size => 60  %>

Request email (set to blank (empty string) if can't find an address; to not_apply if FOI no longer / never did apply to authority)

<%= text_field 'public_body', 'request_email', :size => 40  %>

Home page (set to blank to guess it from the email)

<%= text_field 'public_body', 'home_page', :size => 60  %>

Tags (space separated:
    <% for category, description in PublicBody.categories_by_tag %>
        <% if category != "other" %>
            <%= category %>=<%= description %>;
        <% end %>
    <% end %>
)

<%= text_field 'public_body', 'tag_string', :size => 80  %>

Notes (for users to consider when making FOI requests to the authority)

<%= text_area 'public_body', 'notes', :rows => 4, :cols => 60  %>

Comment for this edit (put URL or other source of new info)

<%= text_area 'public_body', 'last_edit_comment', :rows => 2, :cols => 60  %>

Privacy note: The email addresses are assumed public data,
so we can share the love around later. If somebody wants to give us a
super-secret address (say to bypass spam traps) then we'll have to rethink
this.


fixed an issue with comments times

fixed an issue with comments times

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

<li class="graybox" id="comment-<%= comment.id %>" <%= 'style="display:none"' if controller.request.xhr? %><%= onhover_show_admin_tools(:comment, comment.id) %>>
  <%= admin_tools_for comment %>
  <a name="comment-<%= comment.id %>">
  <%= (comment.url.blank?) ? comment.author : link_to(comment.author, comment.url) %>  said <%= distance_of_time_in_words @article.created_at, comment.created_at %> later:

  <%= comment.body_html %>

<li class="graybox" id="comment-<%= comment.id %>" <%= 'style="display:none"' if controller.request.xhr? %><%= onhover_show_admin_tools(:comment, comment.id) %>>
  <%= admin_tools_for comment %>
  <a name="comment-<%= comment.id %>">
  <%= (comment.url.blank?) ? comment.author : link_to(comment.author, comment.url) %>  said <%= distance_of_time_in_words @article.created_at.utc, comment.created_at.utc %> later:

  <%= comment.body_html %>


Update lib/views/general/_credits.rhtml

Update lib/views/general/_credits.rhtml

added "powered by Alavateli" to page footer - relates to issue https://github.com/mysociety/whatdotheyknow-theme/issues/3

|
        Privacy and cookies
        |
        Built by mySociety, powered by Alaveteli ...
        and you
        |
        Dedicated to Chris Lightfoot

|
        Privacy and cookies
        |
        Built by mySociety ...
        and you
        |
        Dedicated to Chris Lightfoot


Changing some texts in the 'forgot password' page

Signed-off-by: Antonio Terceiro <9e4dabace4bf3e60d3d713b56a1c8e7e285b5f80@colivre.coop.br>

<%= _('Forgot your password?') %>

<%= error_messages_for :change_password %>

<% labelled_form_for :change_password, @change_password, :url => { :action => 'forgot_password' } do |f| %>

  <%= f.text_field :login,
                   :onchange => 'this.value = convToValidLogin( this.value )' %>

  <%= f.text_field :email %>

  <% button_bar do %>
    <%= submit_button('send', _('Send instructions')) %>
  <% end %>

<%= content_tag(:small,_('After clicking the button above, you will receive an email with a link to a page where you will be able to create a new password.')) %>

<% end %>

<%= _('Password recovery') %>

<%= error_messages_for :change_password %>

<% labelled_form_for :change_password, @change_password, :url => { :action => 'forgot_password' } do |f| %>

  <%= f.text_field :login,
                   :onchange => 'this.value = convToValidLogin( this.value )' %>

  <%= f.text_field :email %>

  <% button_bar do %>
    <%= submit_button('send', _('Send change password procedure by e-mail')) %>
  <% end %>

<% end %>


Now sorting services by name.

Now sorting services by name.

<%
  group = _ob.get(:Group, _get["group_id"])

  if _get["choice"] == "add_reporter"
    show_reporters = _ob.list(:Reporter) - group.reporters
    show_reporters.each do |reporter|
      %>

          <a href="javascript: group_view_add_reporter('<%=reporter.id%>');"><%=reporter.name.html%>

      <%
    end

    exit
  end

  if _get["choice"] == "save_reporter"
    reporter = _ob.get(:Reporter, _get["reporter_id"])
    group.add_reporter(reporter)
    exit
  end

  if _get["choice"] == "remove_reporter"
    reporter = _ob.get(:Reporter, _get["reporter_id"])
    group.remove_reporter(reporter)
    exit
  end

  print _site.header(sprintf(_("View group: %s"), group.name))
%>

  <input type="button" value="<%=_"Edit group"%>" onclick="location.href='/?s=group_edit&group_id=<%=group.id%>';" />

<%=_site.boxt(_("Services"), 350)%>

    <input type="button" value="<%=_"Add service"%>" onclick="location.href='/?s=service_edit&group_id=<%=group.id%>';" />

        <%=_"Service"%>

      <%
        services = group.services("orderby" => "name")

        services.each do |service|
          %>

                <%=service.html%>

          <%
        end

        if services.empty?
          %>

                <%=_"No services were found."%>

          <%
        end
      %>

<%=_site.boxb%>

<%=_site.boxt(_("Reporters"), 350)%>

    <input type="button" value="<%=_"Add reporter"%>" onclick="modal({title: '<%=_"Add reporter"%>', url: '/clean.rhtml?s=group_view&choice=add_reporter&group_id=<%=group.id%>'});" />

        <%=_"Reporter"%>
        <%=_"Actions"%>

      <%
        reporters = group.reporters

        reporters.each do |reporter|
          %>

                <%=reporter.html%>

                (<a href="javascript: if (confirm('<%=_"Do you want to remove this reporter?"%>')){group_remove_reporter('<%=reporter.id%>');}"><%=_"remove"%>)

          <%
        end

        if reporters.empty?
          %>

                <%=_"No reporters has been added to this group."%>

          <%
        end
      %>

<%=_site.boxb%>

<%
  group = _ob.get(:Group, _get["group_id"])

  if _get["choice"] == "add_reporter"
    show_reporters = _ob.list(:Reporter) - group.reporters
    show_reporters.each do |reporter|
      %>

          <a href="javascript: group_view_add_reporter('<%=reporter.id%>');"><%=reporter.name.html%>

      <%
    end

    exit
  end

  if _get["choice"] == "save_reporter"
    reporter = _ob.get(:Reporter, _get["reporter_id"])
    group.add_reporter(reporter)
    exit
  end

  if _get["choice"] == "remove_reporter"
    reporter = _ob.get(:Reporter, _get["reporter_id"])
    group.remove_reporter(reporter)
    exit
  end

  print _site.header(sprintf(_("View group: %s"), group.name))
%>

  <input type="button" value="<%=_"Edit group"%>" onclick="location.href='/?s=group_edit&group_id=<%=group.id%>';" />

<%=_site.boxt(_("Services"), 350)%>

    <input type="button" value="<%=_"Add service"%>" onclick="location.href='/?s=service_edit&group_id=<%=group.id%>';" />

        <%=_"Service"%>

      <%
        services = group.services

        services.each do |service|
          %>

                <%=service.html%>

          <%
        end

        if services.empty?
          %>

                <%=_"No services were found."%>

          <%
        end
      %>

<%=_site.boxb%>

<%=_site.boxt(_("Reporters"), 350)%>

    <input type="button" value="<%=_"Add reporter"%>" onclick="modal({title: '<%=_"Add reporter"%>', url: '/clean.rhtml?s=group_view&choice=add_reporter&group_id=<%=group.id%>'});" />

        <%=_"Reporter"%>
        <%=_"Actions"%>

      <%
        reporters = group.reporters

        reporters.each do |reporter|
          %>

                <%=reporter.html%>

                (<a href="javascript: if (confirm('<%=_"Do you want to remove this reporter?"%>')){group_remove_reporter('<%=reporter.id%>');}"><%=_"remove"%>)

          <%
        end

        if reporters.empty?
          %>

                <%=_"No reporters has been added to this group."%>

          <%
        end
      %>

<%=_site.boxb%>


updated the chart legend

updated the chart legend

  <title>The Best of ... on Hacker News</title>
  <meta name="description" content="The best comments on Hacker News, charts, PDF export.">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

            <form action="" method="POST" id="target">
              The best
              <select name="limit" id="limit">
                <option value="10">10</option>
                <option value="25">25</option>
                <option value="50">50</option>
                <option value="75">75</option>
                <option value="100" selected>100</option>
              </select>
              comments by <input type="text" id="username" name="username" value="pg">
              <input name="show-html" type="submit" onclick="hn.generateChart();return false;" value="Show" />
              <input name="show-pdf" type="button" onclick="$('#target').submit();" value="PDF E-book" />
            </form>

          about

      powered by
      hnsearch and
      pdfcrowd |
      source |
      feedback: redpill27@gmail.com

      <% if (c.error !== undefined) { %>
        <%= c.error %>
      <% } %>

        This page requires JavaScript enabled.

Distribution of Comments

The markers are clickable, the size is proportional to the comment length.

  <title>The Best of ... on Hacker News</title>
  <meta name="description" content="The best comments on Hacker News, charts, PDF export.">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

            <form action="" method="POST" id="target">
              The best
              <select name="limit" id="limit">
                <option value="10">10</option>
                <option value="25">25</option>
                <option value="50">50</option>
                <option value="75">75</option>
                <option value="100" selected>100</option>
              </select>
              comments by <input type="text" id="username" name="username" value="pg">
              <input name="show-html" type="submit" onclick="hn.generateChart();return false;" value="Show" />
              <input name="show-pdf" type="button" onclick="$('#target').submit();" value="PDF E-book" />
            </form>

          about

      powered by
      hnsearch and
      pdfcrowd |
      source |
      feedback: redpill27@gmail.com

      <% if (c.error !== undefined) { %>
        <%= c.error %>
      <% } %>

        This page requires JavaScript enabled.

Distribution of Comments

The marker size is proportional to the comment length.


Fixed users edit url

Fixed users edit url

<% if @page %>
  <%= page_nav CortexReaver::User, @page %>
<% end %>

      Login
      Name
      <% if admin? %>

      <% end %>

    <% @users.each do |user| %>

        <%= A(user.login, :href => user.url) %>
        <%= h user.name %>
        <% if admin? %>

            <a class="edit-link" href="/users/edit/<%= user.id %>">
               Edit

            <%= A ' Delete', :href => "/users/delete/#{user.id}", :onclick => "return confirm('Are you sure you want to delete this user?');" %>

        <% end %>

    <% end %>

<% if @page %>
  <%= page_nav CortexReaver::User, @page %>
<% end %>

<% if @page %>
  <%= page_nav CortexReaver::User, @page %>
<% end %>

      Login
      Name
      <% if admin? %>

      <% end %>

    <% @users.each do |user| %>

        <%= A(user.login, :href => user.url) %>
        <%= h user.name %>
        <% if admin? %>

            <a class="edit-link" href="/users/edit/<%= user.login %>">
               Edit

            <%= A ' Delete', :href => "/users/delete/#{user.login}", :onclick => "return confirm('Are you sure you want to delete this user?');" %>

        <% end %>

    <% end %>

<% if @page %>
  <%= page_nav CortexReaver::User, @page %>
<% end %>


Er, I meant show the button *unless* it's disabled.

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

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

      <% recent_builds = project.last_five_builds %>

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

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

      <% unless recent_builds.empty? %>

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

<%= link_to_build_with_elapsed_time(project, build) %>

            <% else %>

<%= link_to_build(project, build) %>

            <% end %>
          <% end %>

      <% end %>

    <% unless Configuration.disable_build_now -%>

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

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

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

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

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

      <% if latest_build.brief_error %>

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

      <% end %>

<%= project.builder_error_message %>

    <% end %>

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

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

      <% recent_builds = project.last_five_builds %>

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

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

      <% unless recent_builds.empty? %>

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

<%= link_to_build_with_elapsed_time(project, build) %>

            <% else %>

<%= link_to_build(project, build) %>

            <% end %>
          <% end %>

      <% end %>

    <% if Configuration.disable_build_now -%>

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

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

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

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

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

      <% if latest_build.brief_error %>

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

      <% end %>

<%= project.builder_error_message %>

    <% end %>


ActionItem980: better wording

ActionItem980: better wording

<%
  # AddThis Button
  if block_given? and File.exists?( RAILS_ROOT + '/config/web2.0.yml')
    opts = YAML.load_file( RAILS_ROOT + '/config/web2.0.yml' )
    if opts['addthis']
      opts = opts['addthis']
%>

<a href="http://www.addthis.com/bookmark.php" id="bt_addThis" target="_blank" onmouseover="return addthis_open(this, '', '[URL]', '<%= escape_javascript( @environment.name()+' :: '+@page.title ) %>')" onmouseout="addthis_close()" onclick="return addthis_sendto()">

<% end; end %>

  <%= article_title(@page, :no_link => true) %>

  <% if logged_in? && current_user.person.has_permission?('post_content', profile) %>

      <% unless @page.blog? %>
      <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
          { :controller => 'cms', :action => 'edit', :id => @page },
          :class => 'button with-text icon-edit' %>
      <% end %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if @page != profile.home_page %>
          <%= link_to content_tag( 'span', _('Delete') ),
            { :controller => 'cms', :action => 'destroy', :id => @page },
            :class => 'button with-text icon-delete' %>
        <% end %>
        <% if profile.kind_of?(Person) && !environment.enabled?('disable_cms') %>
          <%= link_to content_tag( 'span', _('Spread this') ),
              { :controller => 'cms', :action => 'publish', :id => @page },
              :class => 'button with-text icon-spread' %>
        <% end %>
        <% if @page.display_as_gallery? %>
          <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
        <% else %>
          <%= lightbox_button(:new, label_for_new_article(@page), :controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent))) %>
        <% end %>
      <% end %>

  <% end %>

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

    <%= _("This article's tags:") %>
    <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tag', :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? %>

  <%= link_to_document(@page.parent, _('Go back')) %>

<% end %>

<% if profile.enterprise? and !profile.enabled? and !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>

    <%= environment.message_for_disabled_enterprise %>

<% end %>

<% cache(@page.cache_key) do %>
  <div class="<%="article-body article-body-" + @page.css_class_name %>">
    <%= article_to_html(@page) %>

<% end %>

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

<%= _('Categories') %>

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

<% end %>

<% if ! @page.source.nil? and ! @page.source.empty?%>

  <%= _('Source: %s') % link_to(@page.source, @page.source) %>

<% end %>

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

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

<%
  # AddThis Button
  if block_given? and File.exists?( RAILS_ROOT + '/config/web2.0.yml')
    opts = YAML.load_file( RAILS_ROOT + '/config/web2.0.yml' )
    if opts['addthis']
      opts = opts['addthis']
%>

<a href="http://www.addthis.com/bookmark.php" id="bt_addThis" target="_blank" onmouseover="return addthis_open(this, '', '[URL]', '<%= escape_javascript( @environment.name()+' :: '+@page.title ) %>')" onmouseout="addthis_close()" onclick="return addthis_sendto()">

<% end; end %>

  <%= article_title(@page, :no_link => true) %>

  <% if logged_in? && current_user.person.has_permission?('post_content', profile) %>

      <% unless @page.blog? %>
      <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
          { :controller => 'cms', :action => 'edit', :id => @page },
          :class => 'button with-text icon-edit' %>
      <% end %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if @page != profile.home_page %>
          <%= link_to content_tag( 'span', _('Delete') ),
            { :controller => 'cms', :action => 'destroy', :id => @page },
            :class => 'button with-text icon-delete' %>
        <% end %>
        <% if profile.kind_of?(Person) && !environment.enabled?('disable_cms') %>
          <%= link_to content_tag( 'span', _('Spread this') ),
              { :controller => 'cms', :action => 'publish', :id => @page },
              :class => 'button with-text icon-spread' %>
        <% end %>
        <% if @page.display_as_gallery? %>
          <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
        <% else %>
          <%= lightbox_button(:new, label_for_new_article(@page), :controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent))) %>
        <% end %>
      <% end %>

  <% end %>

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

    <%= _("This article's tags:") %>
    <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tag', :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? %>

  <%= link_to_document(@page.parent, _('Up')) %>

<% end %>

<% if profile.enterprise? and !profile.enabled? and !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>

    <%= environment.message_for_disabled_enterprise %>

<% end %>

<% cache(@page.cache_key) do %>
  <div class="<%="article-body article-body-" + @page.css_class_name %>">
    <%= article_to_html(@page) %>

<% end %>

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

<%= _('Categories') %>

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

<% end %>

<% if ! @page.source.nil? and ! @page.source.empty?%>

  <%= _('Source: %s') % link_to(@page.source, @page.source) %>

<% end %>

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

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