Correct link title

Correct link title

skenaja again:
> 6) https://secure.mysociety.org/admin/foi/censor/new?info_request_id=50752
> "Applies to xxxx btn btn-info" ==> "btn btn-info" doesn't look right.

<%= error_messages_for 'censor_rule' %>

  <%=_("Applies to")%>
  <% unless info_request.nil? %>
    <%= request_link(info_request)%>
    <%= request_admin_link(info_request, "(admin)", "btn btn-info")%>
    <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>
  <% end %>
  <% unless user.nil? %>
    <%= user_link(user) %>
    <%= user_admin_link(user, "admin", "btn btn-info") %>
    <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %>
<% end %>

  Text

    <%= text_field 'censor_rule', 'text', :class => "span3" %>

      that you want to remove, case sensitive

  Replacement

    <%= text_field 'censor_rule', 'replacement', :class => "span3"  %>

      put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's

  Comment for this edit

    <%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :class => "span6"  %>

      put purpose of the rule, and why the change

Warning and notes:

 This does replace text in binary files, but for
      most formats only in a naive way. It works well on surprisingly many Word documents. Notably
      it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code
      which works on some PDFs. Please carefully check all attachments have
      changed in the way you expect, and haven't become corrupted.

You may need to manually rebuild the search index afterwards. You can redact
      things by individual request or by user by adding the censor rule from the
      appropriate page.  If you need to redact across a whole
      authority, it will be easy enough to make code changes to add it, so do ask.

<%= error_messages_for 'censor_rule' %>

  <%=_("Applies to")%>
  <% unless info_request.nil? %>
    <%= request_link(info_request)%>
    <%= request_admin_link(info_request, "btn btn-info")%>
    <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>
  <% end %>
  <% unless user.nil? %>
    <%= user_link(user) %>
    <%= user_admin_link(user, "admin", "btn btn-info") %>
    <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %>
<% end %>

  Text

    <%= text_field 'censor_rule', 'text', :class => "span3" %>

      that you want to remove, case sensitive

  Replacement

    <%= text_field 'censor_rule', 'replacement', :class => "span3"  %>

      put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's

  Comment for this edit

    <%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :class => "span6"  %>

      put purpose of the rule, and why the change

Warning and notes:

 This does replace text in binary files, but for
      most formats only in a naive way. It works well on surprisingly many Word documents. Notably
      it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code
      which works on some PDFs. Please carefully check all attachments have
      changed in the way you expect, and haven't become corrupted.

You may need to manually rebuild the search index afterwards. You can redact
      things by individual request or by user by adding the censor rule from the
      appropriate page.  If you need to redact across a whole
      authority, it will be easy enough to make code changes to add it, so do ask.


Do not offer the option to disable e-mail

(ActionItem1403)

<%= _('e-Mail configuration') %>

<%= error_messages_for :task %>

<% if profile.user.email_activation_pending? %>

<%= _('You already request activation of your mailbox. Please wait until an administrator approves your request.') %>

  <% button_bar do %>
    <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
  <% end %>

<% else %>

  <% if profile.user.enable_email %>

<%= ('E-mail address') %>

      <%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>

<%= _('Configuration') %>

      <%= link_to _('Mail configuration for POP and IMAP'), 'http://www.ynternet.org/move/infos-technique-pour-utiliser-multypass-pop3-smtp-imap-ftp-quotas...' %>

    <% button_bar do %>
      <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
    <% end %>

  <% else %>

<%= _("Enable e-Mail account below:") %>

<%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>

<%= _("You'll be able to access a webmail from your user menu.") %>

    <% button_bar do %>
      <%= button(:ok, _('Enable e-Mail'), { :action => 'enable' }, :method => 'post') %>
      <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
    <% end %>

  <% end %>

<% end %>

<%= _('e-Mail configuration') %>

<%= error_messages_for :task %>

<% if profile.user.email_activation_pending? %>

<%= _('You already request activation of your mailbox. Please wait until an administrator approves your request.') %>

  <% button_bar do %>
    <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
  <% end %>

<% else %>

  <% if profile.user.enable_email %>

<%= _("Disable e-Mail account below:") %>

<%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>

    <% button_bar do %>
      <%= button(:cancel, _('Disable e-Mail'), { :action => 'disable' }, :method => 'post') %>
      <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
    <% end %>

  <% else %>

<%= _("Enable e-Mail account below:") %>

<%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>

<%= _("You'll be able to access a webmail from your user menu.") %>

    <% button_bar do %>
      <%= button(:ok, _('Enable e-Mail'), { :action => 'enable' }, :method => 'post') %>
      <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
    <% end %>

  <% end %>

<% end %>


Add the form element for specifying that a censor rule should be treated as a regular expression rather than plain text.

<%= error_messages_for 'censor_rule' %>

  <%=_("Applies to")%>
  <% unless info_request.nil? %>
    <%= request_link(info_request)%>
    <%= request_admin_link(info_request, "(admin)", "btn btn-info")%>
    <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>
  <% end %>
  <% unless user.nil? %>
    <%= user_link(user) %>
    <%= user_admin_link(user, "admin", "btn btn-info") %>
    <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %>
<% end %>

Is it regexp replacement? (Leave unchecked if you are not sure about this)

<%= check_box 'censor_rule', 'regexp' %>

  Is it regexp replacement?

    <%= text_field 'censor_rule', 'regexp', :class => "span3" %>

      (Leave unchecked if you are not sure about this)

  Text

    <%= text_field 'censor_rule', 'text', :class => "span3" %>

      that you want to remove, case sensitive

  Replacement

    <%= text_field 'censor_rule', 'replacement', :class => "span3"  %>

      put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's

  Comment for this edit

    <%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :class => "span6"  %>

      put purpose of the rule, and why the change

Warning and notes:

 This does replace text in binary files, but for
      most formats only in a naive way. It works well on surprisingly many Word documents. Notably
      it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code
      which works on some PDFs. Please carefully check all attachments have
      changed in the way you expect, and haven't become corrupted.

You may need to manually rebuild the search index afterwards. You can redact
      things by individual request or by user by adding the censor rule from the
      appropriate page.  If you need to redact across a whole
      authority, it will be easy enough to make code changes to add it, so do ask.

<%= error_messages_for 'censor_rule' %>

  <%=_("Applies to")%>
  <% unless info_request.nil? %>
    <%= request_link(info_request)%>
    <%= request_admin_link(info_request, "(admin)", "btn btn-info")%>
    <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>
  <% end %>
  <% unless user.nil? %>
    <%= user_link(user) %>
    <%= user_admin_link(user, "admin", "btn btn-info") %>
    <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %>
<% end %>

  Text

    <%= text_field 'censor_rule', 'text', :class => "span3" %>

      that you want to remove, case sensitive

  Replacement

    <%= text_field 'censor_rule', 'replacement', :class => "span3"  %>

      put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's

  Comment for this edit

    <%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :class => "span6"  %>

      put purpose of the rule, and why the change

Warning and notes:

 This does replace text in binary files, but for
      most formats only in a naive way. It works well on surprisingly many Word documents. Notably
      it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code
      which works on some PDFs. Please carefully check all attachments have
      changed in the way you expect, and haven't become corrupted.

You may need to manually rebuild the search index afterwards. You can redact
      things by individual request or by user by adding the censor rule from the
      appropriate page.  If you need to redact across a whole
      authority, it will be easy enough to make code changes to add it, so do ask.


correcting url and alt

correcting url and alt

<!doctype html>

    <% page_title = Karakuri::seo_friendly_title(@path, title, 'agaelebe.com') %>
    <title><%=  page_title %></title>
    <link rel="stylesheet" type="text/css" href="/css/agaelebe.css">
    <link rel="stylesheet" type="text/css" href="/css/syntax.css">
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"/>
    <link rel="shortcut icon" type="image/png" href="/images/agaelebe_favicon.png" />
    <link rel="alternate" type="application/atom+xml" title="<%= page_title %> - feed" href="/index.xml" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

      <%= yield %>

Conteúdos

Arquivos do blog

Github

Vídeos no blip.tv

Onde me encontrar

About.me

Twitter

Me adiciona

Participo

Guru-SP

Garoa Hacker Clube

Hugo L. Borges | Alguns direitos reservados | Powered by toto e karakuri

    <% if @config[:disqus] %>
    <%= Karakuri::disqus_comment_count_js(@config[:disqus]) %>
    <% end %>


display the correct presentation value for option types when editing product

Selected Option Types

			Name
			Display
			Action

		<% @product.selected_options.each do |so| %>

				<%=so.option_type.name%>
				<%=so.option_type.presentation%>

				  <%= link_to_remote "Remove",
				                     :url => {:action => 'remove_option_type', :id=> @product, :product_option_type_id => so},
				                     :before => "Element.hide('select-link');Element.show('busy_indicator')",
				                     :complete => "Element.hide('busy_indicator')",
				                     :update => 'option-type-listing' %>

		<% end %>
		<% if @product.selected_options.empty? %>

				None Selected.

		<% end %>

<% unless @product.new_record? %>

	  <%= link_to_remote "Select Option Type",
	                     :url => {:controller => 'option_types', :action => 'select', :id=> @product},
	                     :before => "Element.hide('select-link');Element.show('busy_indicator')",
	                     :complete => "Element.hide('busy_indicator');",
	                     :update => 'new-option-type' %>

	<%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
<% end %>

Selected Option Types

			Name
			Display
			Action

		<% @product.selected_options.each do |so| %>

				<%=so.option_type.name%>
				<%=so.option_type.display%>

				  <%= link_to_remote "Remove",
				                     :url => {:action => 'remove_option_type', :id=> @product, :product_option_type_id => so},
				                     :before => "Element.hide('select-link');Element.show('busy_indicator')",
				                     :complete => "Element.hide('busy_indicator')",
				                     :update => 'option-type-listing' %>

		<% end %>
		<% if @product.selected_options.empty? %>

				None Selected.

		<% end %>

<% unless @product.new_record? %>

	  <%= link_to_remote "Select Option Type",
	                     :url => {:controller => 'option_types', :action => 'select', :id=> @product},
	                     :before => "Element.hide('select-link');Element.show('busy_indicator')",
	                     :complete => "Element.hide('busy_indicator');",
	                     :update => 'new-option-type' %>

	<%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
<% end %>


Seriously, on't bail out for unscheduled events

<% current = []
upcoming = []
past = []

now = Time.now
context_events(logged_in_person).each do |a|
  e = a.event
  if e.end and e.end < now
    past.push a
  elsif e.start and e.start < now
    current.push a
  elsif e.start
    upcoming.push a
  end
end -%>

My events
    <% if @context -%>
      at <%= @context.fullname %>
    <% end -%>

  <% if current.length > 0 -%>
    <% reset_cycle("agenda_rows") -%>

Events In Progress

      <%= render :partial => 'event', :collection => current.sort { |a,b| a.event.length <=> b.event.length } %>

  <% end -%>

  <% if upcoming.length > 0 -%>
    <% reset_cycle("agenda_rows") -%>

Upcoming events

      <%= render :partial => 'event', :collection => upcoming.sort { |a,b| a.event.start <=> b.event.start } %>

  <% end -%>

  <% if past.length > 0 -%>
    <% reset_cycle("agenda_rows") -%>

Past events

      <%= render :partial => 'event', :collection => past.sort { |a,b| b.event.end <=> a.event.end } %>

  <% end -%>

<% current = []
upcoming = []
past = []

now = Time.now
context_events(logged_in_person).each do |a|
  e = a.event
  if e.end and e.end < now
    past.push a
  elsif e.start and e.start < now
    current.push a
  else
    upcoming.push a
  end
end -%>

My events
    <% if @context -%>
      at <%= @context.fullname %>
    <% end -%>

  <% if current.length > 0 -%>
    <% reset_cycle("agenda_rows") -%>

Events In Progress

      <%= render :partial => 'event', :collection => current.sort { |a,b| a.event.length <=> b.event.length } %>

  <% end -%>

  <% if upcoming.length > 0 -%>
    <% reset_cycle("agenda_rows") -%>

Upcoming events

      <%= render :partial => 'event', :collection => upcoming.sort { |a,b| a.event.start <=> b.event.start } %>

  <% end -%>

  <% if past.length > 0 -%>
    <% reset_cycle("agenda_rows") -%>

Past events

      <%= render :partial => 'event', :collection => past.sort { |a,b| b.event.end <=> a.event.end } %>

  <% end -%>


Fix bug introduced in commit 049198b

Fix bug introduced in commit 049198b

<%
    # Construct the main text of the mail
    main_text = ''
    for track_thing, alert_results, xapian_object in @email_about_things
        main_text += track_thing.params[:title_in_email] + "\n"
        main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
        @highlight_words = xapian_object.words_to_highlight
        for result in alert_results.reverse
            if result[:model].class.to_s == "InfoRequestEvent"
                event = result[:model]

                # Request title - only add title if we're not tracking a request.
                # e.g. -- Address and opening times of Post Office branches --
                if track_thing.info_request.nil?
                    main_text += "-- " + highlight_words(event.info_request.title, @highlight_words, false) + " --\n"
                end

                # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008)
                if event.event_type == 'response'
                    url = main_url(incoming_message_url(event.incoming_message))
                    main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name)
                elsif event.event_type == 'followup_sent'
                    url = main_url(outgoing_message_url(event.outgoing_message))
                    main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
                elsif event.event_type == 'sent'
                    # this is unlikely to happen in real life, but happens in the test code
                    url = main_url(outgoing_message_url(event.outgoing_message))
                    main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
                elsif event.event_type == 'comment'
                    url = main_url(comment_url(event.comment))
                    main_text += _("{{user_name}} added an annotation", :user_name => event.comment.user.name)
                else
                    raise "unknown type in event_digest " + event.event_type
                end
                main_text += " (" + simple_date(event.created_at) + ")\n"

                # Main text, wrapped, words highlighted with * and indented.
                if event.is_outgoing_message?
                    extract = highlight_and_excerpt(event.outgoing_message.get_text_for_indexing, @highlight_words, 150, false)
                elsif event.is_incoming_message?
                    extract = highlight_and_excerpt(event.incoming_message.get_text_for_indexing_clipped, @highlight_words, 150, false)
                elsif event.is_comment?
                    extract = highlight_and_excerpt(event.comment.body, @highlight_words, 150, false)
                else
                    extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
                end
                extract = extract.gsub(/\s+/, ' ')
                main_text += MySociety::Format.wrap_email_body_by_lines('"' + extract + '"').gsub(/\n+$/, "") + "\n"

                # Link to the request/response
                main_text += url + "\n"
                main_text += "\n"
            else
                raise "need to add other types to TrackMailer.event_digest"
            end
        end
        main_text += "\n"
    end

%><%=main_text%><%= _("Alter your subscription")%>
=======================

<% _("Please click on the link below to cancel or alter these emails.") %>
<%=@unsubscribe_url%>

-- <%= _('the {{site_name}} team', :site_name=>site_name) %>

<%
    # Construct the main text of the mail
    main_text = ''
    for track_thing, alert_results, xapian_object in @email_about_things
        main_text += track_thing.params[:title_in_email] + "\n"
        main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
        @highlight_words = xapian_object.words_to_highlight
        for result in alert_results.reverse
            if result[:model].class.to_s == "InfoRequestEvent"
                event = result[:model]

                # Request title - only add title if we're not tracking a request.
                # e.g. -- Address and opening times of Post Office branches --
                if track_thing.info_request.nil?
                    main_text += "-- " + highlight_words(event.info_request.title, @highlight_words, false) + " --\n"
                end

                # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008)
                if event.event_type == 'response'
                    url = main_url(incoming_message_url(event.incoming_message))
                    main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name)
                elsif event.event_type == 'followup_sent'
                    url = main_url(outgoing_message_url(event.outgoing_message))
                    main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
                elsif event.event_type == 'sent'
                    # this is unlikely to happen in real life, but happens in the test code
                    url = main_url(outgoing_message_url(event.outgoing_message))
                    main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
                elsif event.event_type == 'comment'
                    url = main_url(comment_url(event.comment))
                    main_text += _("{{user_name}} added an annotation", :user_name => event.comment.user_name)
                else
                    raise "unknown type in event_digest " + event.event_type
                end
                main_text += " (" + simple_date(event.created_at) + ")\n"

                # Main text, wrapped, words highlighted with * and indented.
                if event.is_outgoing_message?
                    extract = highlight_and_excerpt(event.outgoing_message.get_text_for_indexing, @highlight_words, 150, false)
                elsif event.is_incoming_message?
                    extract = highlight_and_excerpt(event.incoming_message.get_text_for_indexing_clipped, @highlight_words, 150, false)
                elsif event.is_comment?
                    extract = highlight_and_excerpt(event.comment.body, @highlight_words, 150, false)
                else
                    extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
                end
                extract = extract.gsub(/\s+/, ' ')
                main_text += MySociety::Format.wrap_email_body_by_lines('"' + extract + '"').gsub(/\n+$/, "") + "\n"

                # Link to the request/response
                main_text += url + "\n"
                main_text += "\n"
            else
                raise "need to add other types to TrackMailer.event_digest"
            end
        end
        main_text += "\n"
    end

%><%=main_text%><%= _("Alter your subscription")%>
=======================

<% _("Please click on the link below to cancel or alter these emails.") %>
<%=@unsubscribe_url%>

-- <%= _('the {{site_name}} team', :site_name=>site_name) %>


Fixed some comments

Fixed some comments

git-svn-id: 3ebd8a4fd9006ff03462623fffc479a1d4750d42@348 7a65b82a-1d14-0410-b525-e2835e71a0b4

<% @title = 'Name: ' + h(@name.text_name) %>

<% # Google Images | Distribution Map %>
<%= sprintf('Google Images' % @name.text_name) %>
<% if @data != [] %>
    | <%= link_to(:show_name_distribution_map.l, :action => 'map', :id => @name.id) %>
<% end %>

<% # Edit Name | Bulk Name Edit | Change Synonyms | Approve/Deprecate %>
<%= link_to 'Edit Name', :action => 'edit_name', :id => @name %>
  | <%= link_to 'Bulk Name Edit', :action => 'bulk_name_edit' %>
  | <%= link_to('Change Synonyms', :action => 'change_synonyms', :id => @name)%>
<% if @name.deprecated %>
  | <%= link_to('Approve', :action => 'approve_name', :id => @name)%>
<% else %>
  | <%= link_to('Deprecate', :action => 'deprecate_name', :id => @name)%>
<% end %>

<%= 'About: ' + textilize_without_paragraph(h(@name.display_name)) %>

	<%= :show_name_rank.l %>: <%= rank_as_string(@name.rank) %>

	<%= :show_name_status.l %>: <%= @name.status == "Valid" ? :show_name_valid.l : :show_name_deprecated.l %>

	<%= :show_name_name.l %>: <%= @name.text_name %>

	<%= :show_name_author.l %>: <%= @name.author %>

	<%= :show_name_citation.l %>: <%= textilize_without_paragraph(sanitize(@name.citation || '')) %>

	<%
	approved_synonyms, deprecated_synonyms = @name.sort_synonyms
	if approved_synonyms != []
	    links = approved_synonyms.map{|n| link_to(textilize_without_paragraph(h(n.display_name)), :action => "show_name", :id => n)}
        %>
        <%= @name.deprecated ? :show_name_preferred_synonyms.l : :show_name_synonyms.l %>: <%= links.join(', ') %>

	<%
	end
    if deprecated_synonyms != []
        links = deprecated_synonyms.map{|n| link_to(textilize_without_paragraph(h(n.display_name)), :action => "show_name", :id => n)}
        %>
        <%= :show_name_deprecated_synonyms.l %>: <%= links.join(', ') %>

    <% end %>
	<%= :show_name_version.l %>: <%= @name.version %>

	<% if @past_name %>
	    <%= link_to("#{:show_name_previous_version.l}: %s" % @past_name.version, :action => 'show_past_name', :id => @past_name.id) %>
	<% end %>

<% if @name.notes.to_s != "" %>

<%= :show_name_notes_and_comments.l %>:

        <%= textilize(sanitize(@name.notes.to_s)) %>

<% end %>

<% if @children != [] %>

<%= rank_as_plural_string(@children[0].rank) %>:

        <% i = 0
           max = 25
           for child in @children
            i += 1
            break if i > max %>
            <%= link_to(textilize_without_paragraph(h(child.display_name)),
                :action => 'show_name', :id => child) %>

        <% end %>
        <%= "And #{@children.length - i + 1} more...
" if i > max %>

<% end %>

<%
# -----------------------------------------
#  Draw the three groups of observations.
# -----------------------------------------
num_sects = 0
for sect in ["consensus", "synonym", "other"]

  if sect == "consensus"
    head  = :show_name_observations.l + ":"   # Header string to display above group.
    data  = @consensus_data                   # Data returned by sql query.
    page  = @consensus_page                   # Page number.
    pages = @consensus_pages                  # Pagination object.
    arg   = :consensus_page                   # Parameter used in pagination.
  elsif sect == "synonym"
    head  = :show_name_synonym_observations.l + ":"
    data  = @synonym_data
    page  = @synonym_page
    pages = @synonym_pages
    arg   = :synonym_page
  else
    head  = :show_name_other_observations.l + ":
" +
            "" +
              (:show_name_other_observations_notes.l %
                textilize_without_paragraph(h(@name.display_name)))
            ""
    data  = @other_data
    page  = @other_page
    pages = @other_pages
    arg   = :other_page
  end

  # Skip completely if group is empty.
  if data && data.length > 0

    # These are tacked on to the pagination links' urls.
    args = {}
    args[:consensus_page] = @consensus_page if @consensus_data != []
    args[:synonym_page] = @synonym_page     if @synonym_data != []
    args[:other_page] = @other_page         if @other_data != []
    args.delete arg

    # Add line break between groups.
    if num_sects > 0 %>

    <% end
    num_sects += 1

    # Wow this is ugly, but I can't find an option to pass to pagination_links
    # to have it tack the "#section" thing on the end of the urls for me.
    plinks = pagination_links(pages, :name => arg, :params => args).to_s
    plinks.gsub!(/<a href="([^<>]*)">/, '')
    %>

<a id="<%=sect%>"><%= head %>

<%= plinks %>

      <% odd_or_even = 0
      for datum in data
        odd_or_even = 1 - odd_or_even
        id = datum["id"] %>
        <tr valign="top" class="ListLine<%= odd_or_even %>">

            <%=
            image_id = datum["thumb_image_id"]
            if image_id
              link_to(image_tag(sprintf("thumb/%d.jpg", image_id), :border => 0),
                :controller => 'observer', :action => 'show_observation', :id => id)
            end
            %>

            <%= link_to(textilize_without_paragraph(h(datum["observation_name"] + " (#{id})")),
              :controller => 'observer', :action => 'show_observation', :id => id) %>

            <%= location_link(datum["where"], datum["location_id"]) %>:
            <%= user_link(datum["user_id"], "#{datum['name']} (#{datum['login']})") %>

            Observation made: <%= datum["when"]%>

            Community confidence:
              <%= v = datum["vote_cache"]
                v.nil? || v == "" ? "no votes" : (v.to_f*100/3).round.to_s + "%" %>

      <% end %>

<%= plinks %>

  <% end # if data.length > 0 %>
<% end # for section %>

  <%= :show_name_name_created.l %>: <%= @name.created %>

  <%= :show_name_last_modified.l %>: <%= @name.modified %> by <%= user_link(@name.user) %>

  <% rss_log = @name.rss_log
     if rss_log %>
  	<%= link_to :show_name_show_log.l, :controller => 'observer', :action => 'show_rss_log', :id => rss_log.id %>
  <% end %>

<% @title = 'Name: ' + h(@name.text_name) %>

# Google Images | Distribution Map
<%= sprintf('Google Images' % @name.text_name) %>
<% if @data != [] %>
    | <%= link_to(:show_name_distribution_map.l, :action => 'map', :id => @name.id) %>
<% end %>

# Edit Name | Bulk Name Edit | Change Synonyms | Approve/Deprecate
<%= link_to 'Edit Name', :action => 'edit_name', :id => @name %>
  | <%= link_to 'Bulk Name Edit', :action => 'bulk_name_edit' %>
  | <%= link_to('Change Synonyms', :action => 'change_synonyms', :id => @name)%>
<% if @name.deprecated %>
  | <%= link_to('Approve', :action => 'approve_name', :id => @name)%>
<% else %>
  | <%= link_to('Deprecate', :action => 'deprecate_name', :id => @name)%>
<% end %>

<%= 'About: ' + textilize_without_paragraph(h(@name.display_name)) %>

	<%= :show_name_rank.l %>: <%= rank_as_string(@name.rank) %>

	<%= :show_name_status.l %>: <%= @name.status == "Valid" ? :show_name_valid.l : :show_name_deprecated.l %>

	<%= :show_name_name.l %>: <%= @name.text_name %>

	<%= :show_name_author.l %>: <%= @name.author %>

	<%= :show_name_citation.l %>: <%= textilize_without_paragraph(sanitize(@name.citation || '')) %>

	<%
	approved_synonyms, deprecated_synonyms = @name.sort_synonyms
	if approved_synonyms != []
	    links = approved_synonyms.map{|n| link_to(textilize_without_paragraph(h(n.display_name)), :action => "show_name", :id => n)}
        %>
        <%= @name.deprecated ? :show_name_preferred_synonyms.l : :show_name_synonyms.l %>: <%= links.join(', ') %>

	<%
	end
    if deprecated_synonyms != []
        links = deprecated_synonyms.map{|n| link_to(textilize_without_paragraph(h(n.display_name)), :action => "show_name", :id => n)}
        %>
        <%= :show_name_deprecated_synonyms.l %>: <%= links.join(', ') %>

    <% end %>
	<%= :show_name_version.l %>: <%= @name.version %>

	<% if @past_name %>
	    <%= link_to("#{:show_name_previous_version.l}: %s" % @past_name.version, :action => 'show_past_name', :id => @past_name.id) %>
	<% end %>

<% if @name.notes.to_s != "" %>

<%= :show_name_notes_and_comments.l %>:

        <%= textilize(sanitize(@name.notes.to_s)) %>

<% end %>

<% if @children != [] %>

<%= rank_as_plural_string(@children[0].rank) %>:

        <% i = 0
           max = 25
           for child in @children
            i += 1
            break if i > max %>
            <%= link_to(textilize_without_paragraph(h(child.display_name)),
                :action => 'show_name', :id => child) %>

        <% end %>
        <%= "And #{@children.length - i + 1} more...
" if i > max %>

<% end %>

<%
# -----------------------------------------
#  Draw the three groups of observations.
# -----------------------------------------
num_sects = 0
for sect in ["consensus", "synonym", "other"]

  if sect == "consensus"
    head  = :show_name_observations.l + ":"   # Header string to display above group.
    data  = @consensus_data                   # Data returned by sql query.
    page  = @consensus_page                   # Page number.
    pages = @consensus_pages                  # Pagination object.
    arg   = :consensus_page                   # Parameter used in pagination.
  elsif sect == "synonym"
    head  = :show_name_synonym_observations.l + ":"
    data  = @synonym_data
    page  = @synonym_page
    pages = @synonym_pages
    arg   = :synonym_page
  else
    head  = :show_name_other_observations.l + ":
" +
            "" +
              (:show_name_other_observations_notes.l %
                textilize_without_paragraph(h(@name.display_name)))
            ""
    data  = @other_data
    page  = @other_page
    pages = @other_pages
    arg   = :other_page
  end

  # Skip completely if group is empty.
  if data && data.length > 0

    # These are tacked on to the pagination links' urls.
    args = {}
    args[:consensus_page] = @consensus_page if @consensus_data != []
    args[:synonym_page] = @synonym_page     if @synonym_data != []
    args[:other_page] = @other_page         if @other_data != []
    args.delete arg

    # Add line break between groups.
    if num_sects > 0 %>

    <% end
    num_sects += 1

    # Wow this is ugly, but I can't find an option to pass to pagination_links
    # to have it tack the "#section" thing on the end of the urls for me.
    plinks = pagination_links(pages, :name => arg, :params => args).to_s
    plinks.gsub!(/<a href="([^<>]*)">/, '')
    %>

<a id="<%=sect%>"><%= head %>

<%= plinks %>

      <% odd_or_even = 0
      for datum in data
        odd_or_even = 1 - odd_or_even
        id = datum["id"] %>
        <tr valign="top" class="ListLine<%= odd_or_even %>">

            <%=
            image_id = datum["thumb_image_id"]
            if image_id
              link_to(image_tag(sprintf("thumb/%d.jpg", image_id), :border => 0),
                :controller => 'observer', :action => 'show_observation', :id => id)
            end
            %>

            <%= link_to(textilize_without_paragraph(h(datum["observation_name"] + " (#{id})")),
              :controller => 'observer', :action => 'show_observation', :id => id) %>

            <%= location_link(datum["where"], datum["location_id"]) %>:
            <%= user_link(datum["user_id"], "#{datum['name']} (#{datum['login']})") %>

            Observation made: <%= datum["when"]%>

            Community confidence:
              <%= v = datum["vote_cache"]
                v.nil? || v == "" ? "no votes" : (v.to_f*100/3).round.to_s + "%" %>

      <% end %>

<%= plinks %>

  <% end # if data.length > 0 %>
<% end # for section %>

  <%= :show_name_name_created.l %>: <%= @name.created %>

  <%= :show_name_last_modified.l %>: <%= @name.modified %> by <%= user_link(@name.user) %>

  <% rss_log = @name.rss_log
     if rss_log %>
  	<%= link_to :show_name_show_log.l, :controller => 'observer', :action => 'show_rss_log', :id => rss_log.id %>
  <% end %>


* show.rhtml: Use content instead of body for comments.

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

<% @title = Siteinfo.main.name + " user: " + @user.login %>

User Login: <%= @user.login -%>

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

      <% if logged_in? && @user.login == current_user.login -%>

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

      <% end %>

<%= @user.login -%> participated in creating these pages

	<% @user.pages.uniq.each do |p| -%>

<%= page_link(p) -%>

        <% end -%>

<%=h @user.login -%>'s latest comments

      <% @comments.each do |c| %>

	  Page: <%= page_link(c.page) -%>
	  <%= time_ago_in_words(c.created_at) -%> ago

	<%= maruku(c.content) %>

      <% end %>

<% @title = Siteinfo.main.name + " user: " + @user.login %>

User Login: <%= @user.login -%>

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

      <% if logged_in? && @user.login == current_user.login -%>

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

      <% end %>

<%= @user.login -%> participated in creating these pages

	<% @user.pages.uniq.each do |p| -%>

<%= page_link(p) -%>

        <% end -%>

<%=h @user.login -%>'s latest comments

      <% @comments.each do |c| %>

	  Page: <%= page_link(c.page) -%>
	  <%= time_ago_in_words(c.created_at) -%> ago

	<%= maruku(c.body) %>

      <% end %>


Removed some of the urls that you can only click on when logged in

<% unless logged_in? -%>

About

MethodBox enables you to browse and download datasets, share methods and scripts, find fellow researchers with similar interests and share your knowledge.

Who?

 MethodBox is brought to you by a team from the University of Manchester in the UK, led by Carole Goble and Iain Buchan.

MethodBox is part of the myGrid consortium, which brought you the Taverna Workflow Workbench for creating and executing scientific workflows, myExperiment for sharing workflows and Bio-catalogue for curating life science web-services.

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', :style => "width: 140px;" %>

	      Password:

      	  <%= password_field_tag 'password', nil, :class => 'field', :style => "width: 140px;" %>

      	  Remember me: <%= check_box_tag 'remember_me' %>

        <%= submit_tag "Log in", :disable_with => "Logging in..." %>

    <% end %>
    <% if !REGISTRATION_CLOSED -%>

      Need an account?

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

<% else -%>

  New user registration is currently closed

<% end -%>

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

<% end -%>

<% unless logged_in? -%>

About

MethodBox enables you to <%= link_to "browse and download datasets", surveys_url -%>, share <%= link_to "methods and scripts", scripts_url -%>, find
<%= link_to "researchers", people_url -%> with similar interests and share your knowledge.

Who?

 MethodBox is brought to you by a team from the University of Manchester in the UK, led by Carole Goble and Iain Buchan.

MethodBox is part of the myGrid consortium, which brought you the Taverna Workflow Workbench for creating and executing scientific workflows, myExperiment for sharing workflows and Bio-catalogue for curating life science web-services.

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', :style => "width: 140px;" %>

	      Password:

      	  <%= password_field_tag 'password', nil, :class => 'field', :style => "width: 140px;" %>

      	  Remember me: <%= check_box_tag 'remember_me' %>

        <%= submit_tag "Log in", :disable_with => "Logging in..." %>

    <% end %>
    <% if !REGISTRATION_CLOSED -%>

      Need an account?

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

<% else -%>

  New user registration is currently closed

<% end -%>

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

<% end -%>


ActionItem1003: another ugly workaround

ActionItem1003: another ugly workaround

<%
  # 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) ),
          profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
          :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') ),
            profile.admin_url.merge({ :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') ),
              profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
              :class => 'button with-text icon-spread' %>
        <% end %>
        <% if @page.display_as_gallery? %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% else %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
      <% end %>
      <% if profile.kind_of?(Enterprise) && @page.display_as_gallery? %>
        <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
      <% 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 _('Go back'), @page.parent.url %>

<% 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(params)) 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) ),
          profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
          :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') ),
            profile.admin_url.merge({ :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') ),
              profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
              :class => 'button with-text icon-spread' %>
        <% end %>
        <% if @page.display_as_gallery? %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% else %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
      <% 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 _('Go back'), @page.parent.url %>

<% 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(params)) 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 %>


Use correct key for z15 and greater.

Use correct key for z15 and greater.

<% content_for :left_menu do %>
<%= link_to_function "Map key", "showKey();" %>
<% end %>


corrected the login markup and added a 'back to the blog' link

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

<% form_tag :action=> "login" do %>

Typo

      <% if flash[:notice] %>

<%= flash[:notice] %>

      <% end %>

          Username:
          <input type="text" name="user_login" id="user_login" size="20" value=""/>

          Password:
          <input type="password" name="user_password" id="user_password" size="30"/>

      <input type="submit" name="login" value="Login »" class="primary" />

<%= link_to "« Back to the blog", { :controller => '/articles' } %>

<% end %>

<% form_tag :action=> "login" do %>

Please login

      <% if flash[:notice] %>

<%= flash[:notice] %>

      <% end %>
    Login:

    <input type="text" name="user_login" id="user_login" size="20" value=""/>

    Password:

    <input type="password" name="user_password" id="user_password" size="30"/>

    <input type="submit" name="login" value="Login »" class="primary" />

<% end %>


Focus login field on /admin.

Focus login field on /admin.

<% page_title "Admin Login" %>

<% focus :login %>

<% form_tag(session_path, :id => "session_form", :class => "standard-form") do -%>
  <%= hidden_field_tag 'login_type', 'admin' %>

        Username

        <%= text_field_tag 'login' %>

        Password

        <%= password_field_tag 'password' %>

        <%= submit_tag 'Log in' %>

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

<% end -%>

<% page_title "Admin Login" %>

<% form_tag(session_path, :id => "session_form", :class => "standard-form") do -%>
  <%= hidden_field_tag 'login_type', 'admin' %>

        Username

        <%= text_field_tag 'login' %>

        Password

        <%= password_field_tag 'password' %>

        <%= submit_tag 'Log in' %>

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

<% end -%>


moved edit to the left side

moved edit to the left side

<% content_for :style do  %>
div.wikiedit {
  float: left;
  margin: 10px;
  margin-left: -21px;
}
div.wikiedit span {
  background: #C2D4FF;
  padding: 4px 16px;
  border: 1px solid #ADBDE3;
  border-left: 0;
}
div.wikiedit a {
  color: #669;
  font-weight: bold;
  text-decoration: none;
}
div.wikiedit a:hover {text-decoration: underline;}

<% end %>

  <%= @diffhtml || @wiki.body_html %>

   <% if @wiki.editable_by? current_user -%>
     <%= link_to 'edit', page_url(@page,:action=>'edit'), :accesskey => 'e' %>
   <% else -%>
     locked by <%= link_to_user(@wiki.locked_by_id) %>
     (<%= link_to 'break_lock', page_url(@page,:action=>'break_lock'), :method => :post %>)
   <% end %>

   <%= link_to 'versions', page_url(@page,:action=>'versions') %>

   <%= link_to 'last change', page_url(@page, :action=>'diff', :id => "#{@wiki.version.to_i-1}-#{@wiki.version}") if @wiki.version > 1 %>

<% content_for :style do  %>
div.wikiedit {
  float: right;
  margin: 10px;
  margin-right: -21px;
  text-align: right;
}
div.wikiedit span {
  background: #C2D4FF;
  padding: 4px 16px;
}
div.wikiedit a {
  color: #669;
  font-weight: bold;
  text-decoration: none;
}
div.wikiedit a:hover {text-decoration: underline;}

<% end %>

  <%= @diffhtml || @wiki.body_html %>

   <% if @wiki.editable_by? current_user -%>
     <%= link_to 'edit', page_url(@page,:action=>'edit'), :accesskey => 'e' %>
   <% else -%>
     locked by <%= link_to_user(@wiki.locked_by_id) %>
     (<%= link_to 'break_lock', page_url(@page,:action=>'break_lock'), :method => :post %>)
   <% end %>

   <%= link_to 'versions', page_url(@page,:action=>'versions') %>

   <%= link_to 'last change', page_url(@page, :action=>'diff', :id => "#{@wiki.version.to_i-1}-#{@wiki.version}") if @wiki.version > 1 %>


More accurate wording, as can be on say "successful" page.

Show only...

<% for view, description in [
    ['successful', "Successful responses"],
    ['recent', "Recently sent requests"]
] %>

    <%= link_to_unless (@view == view), description, request_list_url(:view => view) %>

<% end %>

<%=@title%>

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

<% if @xapian_object.results.empty? %>

No requests of this sort yet.

<% else %>
    <% for result in @xapian_object.results %>
        <% if result[:model].class.to_s == 'InfoRequestEvent' %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% else %>

Unexpected search result type <%=result[:model].class.to_s%>

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

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

<% if @track_thing %>

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

Show only...

<% for view, description in [
    ['successful', "Successful responses"],
    ['recent', "Recently sent requests"]
] %>

    <%= link_to_unless (@view == view), description, request_list_url(:view => view) %>

<% end %>

<%=@title%>

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

<% if @xapian_object.results.empty? %>

No requests made yet.

<% else %>
    <% for result in @xapian_object.results %>
        <% if result[:model].class.to_s == 'InfoRequestEvent' %>
            <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% else %>

Unexpected search result type <%=result[:model].class.to_s%>

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

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

<% if @track_thing %>

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


I18n missing string in request view page

<% @title = _("{{title}} - a Freedom of Information request to {{public_body}}",
                :title => h(@info_request.title),
                :public_body => (@info_request.public_body.name)) %>

<% if @info_request.prominence == 'hidden' %>

    <%= _('This request has prominence \'hidden\'. You can only see it because you are logged
    in as a super user.') %>

<% end %>
<% if @info_request.prominence == 'requester_only' %>

    <%= _('This request is hidden, so that only you the requester can see it. Please
    contact us if you are not sure why.') % [help_requesting_path] %>

<% end %>

<% if @update_status || @info_request.awaiting_description %>

    <%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %>

<% end %>

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

<%=h(@info_request.title)%>

    <% if @info_request.user.profile_photo %>

            <img src="<%= get_profile_photo_url(:url_name => @info_request.user.url_name) %>" alt="">

    <% end %>

        <% if !@user.nil? && @user.admin_page_links? %>
            <%= _('{{user}} (admin) made this {{law_used_full}} request (admin) to {{public_body_link}} (admin)',
                    :user => user_link(@info_request.user),
                    :law_used_full => h(@info_request.law_used_full),
                    :user_admin_url => user_admin_url(@info_request.user),
                    :request_admin_url => request_admin_url(@info_request),
                    :public_body_link => public_body_link(@info_request.public_body),
                    :public_body_admin_url => public_body_admin_url(@info_request.public_body)) %>
        <% else %>
            <%= _('{{user}} made this {{law_used_full}} request',:user=>user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
            <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
        <% end %>

    <p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>">
    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            <%= _('Please answer the question above so we know whether the ')%>
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %>
        <% else %>
            <%= _('This request has an unknown status.') %>
            <% if @old_unclassified %>
              <%= _('We\'re waiting for someone to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %>
            <% else %>
            <%=  _('We\'re waiting for') %>
              <%= user_link(@info_request.user) %> <%= _('to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status.') %>
            <% end %>
        <% end %>
    <% elsif @status == 'waiting_response' %>
		<%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %>
        <% if @info_request.public_body.is_school? %>
        <%= _('in term time') %>
        <% else %>
        <%= _('normally') %>
        <% end %>
        <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %>
        (<%= link_to "details", "/help/requesting#quickly_response" %>).
    <% elsif @status == 'waiting_response_overdue' %>
        <%= _('Response to this request is delayed.') %>
		<%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %>
            <% if @info_request.public_body.is_school? %>
            <%= _('in term time') %>
            <% end %>
            <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %>
		(<%= _('details') % [help_requesting_path + '#quickly_response'] %>)
    <% elsif @status == 'waiting_response_very_overdue' %>
        <%= _('Response to this request is long overdue.') %>
		<%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %>
        (<%= _('details') % [help_requesting_path + '#quickly_response'] %>).
        <%= _('You can complain by') %>
        <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %>
    <% elsif @status == 'rejected' %>
        <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        <%= _('The request was successful.') %>
    <% elsif @status == 'partially_successful' %>
        <%= _('The request was partially successful.') %>
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %>
            <%= _('Please') %>
              <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>.
        <% else %>
            <%= _('The request is waiting for clarification.') %>
			<%= _('If you are {{user_link}}, please',:user_link=>user_link(@info_request.user)) %>
            <%= link_to _("sign in"), signin_url(:r => request.request_uri) %> <%= _('to send a follow up message.') %>
        <% end %>
    <% elsif @status == 'gone_postal' %>
        <%= _('The authority would like to / has responded by post to this request.') %>
    <% elsif @status == 'internal_review' %>
		<%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %>
    <% elsif @status == 'error_message' %>
        <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'requires_admin' %>
        <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'user_withdrawn' %>
        <%= _('This request has been withdrawn by the person who made it.
        	   There may be an explanation in the correspondence below.') %>
    <% else %>
        <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
    <% end %>

    <% for info_request_event in @info_request_events %>
        <% if info_request_event.visible %>
            <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %>
        <% end %>
    <% end %>

    <% if @info_request.awaiting_description %>

        <%= render :partial => 'describe_state', :locals => { :id_suffix => "2" } %>

    <% end %>

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

<% @title = "#{h(@info_request.title)} - a Freedom of Information request to #{h(@info_request.public_body.name)}" %>

<% if @info_request.prominence == 'hidden' %>

    <%= _('This request has prominence \'hidden\'. You can only see it because you are logged
    in as a super user.') %>

<% end %>
<% if @info_request.prominence == 'requester_only' %>

    <%= _('This request is hidden, so that only you the requester can see it. Please
    contact us if you are not sure why.') % [help_requesting_path] %>

<% end %>

<% if @update_status || @info_request.awaiting_description %>

    <%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %>

<% end %>

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

<%=h(@info_request.title)%>

    <% if @info_request.user.profile_photo %>

            <img src="<%= get_profile_photo_url(:url_name => @info_request.user.url_name) %>" alt="">

    <% end %>

        <% if !@user.nil? && @user.admin_page_links? %>
            <%= _('{{user}} (admin) made this {{law_used_full}} request (admin) to {{public_body_link}} (admin)',
                    :user => user_link(@info_request.user),
                    :law_used_full => h(@info_request.law_used_full),
                    :user_admin_url => user_admin_url(@info_request.user),
                    :request_admin_url => request_admin_url(@info_request),
                    :public_body_link => public_body_link(@info_request.public_body),
                    :public_body_admin_url => public_body_admin_url(@info_request.public_body)) %>
        <% else %>
            <%= _('{{user}} made this {{law_used_full}} request',:user=>user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
            <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
        <% end %>

    <p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>">
    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            <%= _('Please answer the question above so we know whether the ')%>
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %>
        <% else %>
            <%= _('This request has an unknown status.') %>
            <% if @old_unclassified %>
              <%= _('We\'re waiting for someone to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %>
            <% else %>
            <%=  _('We\'re waiting for') %>
              <%= user_link(@info_request.user) %> <%= _('to read') %>
              <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
              <%= _('and update the status.') %>
            <% end %>
        <% end %>
    <% elsif @status == 'waiting_response' %>
		<%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %>
        <% if @info_request.public_body.is_school? %>
        <%= _('in term time') %>
        <% else %>
        <%= _('normally') %>
        <% end %>
        <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %>
        (<%= link_to "details", "/help/requesting#quickly_response" %>).
    <% elsif @status == 'waiting_response_overdue' %>
        <%= _('Response to this request is delayed.') %>
		<%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %>
            <% if @info_request.public_body.is_school? %>
            <%= _('in term time') %>
            <% end %>
            <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %>
		(<%= _('details') % [help_requesting_path + '#quickly_response'] %>)
    <% elsif @status == 'waiting_response_very_overdue' %>
        <%= _('Response to this request is long overdue.') %>
		<%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %>
        (<%= _('details') % [help_requesting_path + '#quickly_response'] %>).
        <%= _('You can complain by') %>
        <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %>
    <% elsif @status == 'rejected' %>
        <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        <%= _('The request was successful.') %>
    <% elsif @status == 'partially_successful' %>
        <%= _('The request was partially successful.') %>
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %>
            <%= _('Please') %>
              <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>.
        <% else %>
            <%= _('The request is waiting for clarification.') %>
			<%= _('If you are {{user_link}}, please',:user_link=>user_link(@info_request.user)) %>
            <%= link_to _("sign in"), signin_url(:r => request.request_uri) %> <%= _('to send a follow up message.') %>
        <% end %>
    <% elsif @status == 'gone_postal' %>
        <%= _('The authority would like to / has responded by post to this request.') %>
    <% elsif @status == 'internal_review' %>
		<%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %>
    <% elsif @status == 'error_message' %>
        <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'requires_admin' %>
        <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %>
    <% elsif @status == 'user_withdrawn' %>
        <%= _('This request has been withdrawn by the person who made it.
        	   There may be an explanation in the correspondence below.') %>
    <% else %>
        <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
    <% end %>

    <% for info_request_event in @info_request_events %>
        <% if info_request_event.visible %>
            <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %>
        <% end %>
    <% end %>

    <% if @info_request.awaiting_description %>

        <%= render :partial => 'describe_state', :locals => { :id_suffix => "2" } %>

    <% end %>

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


updated formatting

updated formatting

<% @page_title = "Points: #{@result.race.standings.name}" %>

	  <%= @result.place %>
      <%= @result.race.standings.event.name %>
      <%= @result.race.standings.name unless @result.race.standings.event.name == @result.race.standings.name %>
      <%= @result.race.name unless @result.race.name == @result.race.standings.name %>

    RACE
    CATEGORY
    RACER
    TEAM
    DATE
    POINTS

  <% for score in @result.scores.sort! %>

    <%= score.source_result.place %>
    <%= score.source_result.race.standings.name %>
    <%= score.source_result.race.name %>
    <%= score.source_result.name %>
    <%= score.source_result.team_name %>
    <%= score.source_result.race.standings.event.date.strftime("%D") %>
    <%= sprintf('%d', score.points) %>

  <% end %>

    TOTAL<%= sprintf('%d', @result.points) %>


fixing nil.fields (again)

fixing nil.fields (again)

<% for column in @model_ui.user_columns_for_display %>

  <%= column.human_name %>:	<%=h @streamlined_item.send(column.name) %>

<% end %>
<% for relationship in @model.reflect_on_all_associations %>
<% if @model_ui.relationships[relationship.name].summary_def %>

	<div id="<%= relationship_div_id(relationship, @streamlined_item, true) %>">
		<%= render(:partial => "#{@model_ui.relationships[relationship.name].summary_def.partial}", :locals => {:item => @streamlined_item, :relationship => relationship, :streamlined_def => @model_ui.relationships[relationship.name].summary_def)%>

 <%= link_to_function("Edit", "Streamlined.Relationships.open_relationship('#{relationship_div_id(relationship, @streamlined_item, true)}', this, '/#{params[:controller]}')")%>

<% end %>
<% end %>

<%= link_to 'Edit', {:action => 'edit', :id => @streamlined_item},
                    {:onclick => "Streamlined.Link.submit(this); return false;"} %>

<% for column in @model_ui.user_columns_for_display %>

  <%= column.human_name %>:	<%=h @streamlined_item.send(column.name) %>

<% end %>
<% for relationship in @model.reflect_on_all_associations %>
<% if @model_ui.relationships[relationship.name].summary_def %>

	<div id="<%= relationship_div_id(relationship, @streamlined_item, true) %>">
		<%= render(:partial => "#{@model_ui.relationships[relationship.name].summary_def.partial}", :locals => {:item => @streamlined_item, :relationship => relationship, :fields => @model_ui.relationships[relationship.name].summary_def.fields})%>

 <%= link_to_function("Edit", "Streamlined.Relationships.open_relationship('#{relationship_div_id(relationship, @streamlined_item, true)}', this, '/#{params[:controller]}')")%>

<% end %>
<% end %>

<%= link_to 'Edit', {:action => 'edit', :id => @streamlined_item},
                    {:onclick => "Streamlined.Link.submit(this); return false;"} %>


Show tag meanings

Show tag meanings

<%= error_messages_for 'public_body' %>

Name

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

Short name (also used to make URL, leave blank for same as name. Don't worry about breaking URLs through renaming, as the history is used to redirect)

<%= text_field 'public_body', 'short_name', :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  %>

Request email

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

Complaint email

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

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

<%= text_area 'public_body', 'last_edit_comment', :rows => 3, :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 (also used to make URL, leave blank for same as name. Don't worry about breaking URLs through renaming, as the history is used to redirect)

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

Tags

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

Request email

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

Complaint email

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

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

<%= text_area 'public_body', 'last_edit_comment', :rows => 3, :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.


Rescue condition where participant's assignment no longer exists when displaying list of available assignments.

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

<% if @user.is_new_user == 1 %>
    <%= render :partial => 'eula' %>
<% else %>

Assignments

To begin, click on an assignment from the list above or <%= link_to 'click here', :action => 'view_publishing' %> to set publishing rights for your work.

	    Assignment
	    Course
		Topic
		Current Stage
		Stage Deadline
		Publishing Rights

<% for participant in @participants %>
  <% begin
       assignment = Assignment.find(participant.parent_id)
     rescue
       assignment = nil
     end %>
  <% if assignment %>

		<%= link_to assignment.name, :action => 'view_actions', :id => participant %>
	    <%= participant.get_course_string %>
		<%= participant.get_topic_string %>
		<%= assignment.get_current_stage() %>
		<%= assignment.get_stage_deadline() %>

	  	<%if participant.permission_granted %>granted
			<% else %>denied
			<% end %>

	<% end %>
<% end %>

<% end %>

<% if @user.is_new_user == 1 %>
    <%= render :partial => 'eula' %>
<% else %>

Assignments

To begin, click on an assignment from the list above or <%= link_to 'click here', :action => 'view_publishing' %> to set publishing rights for your work.

	    Assignment
	    Course
		Topic
		Current Stage
		Stage Deadline
		Publishing Rights

<% for participant in @participants %>
  <% assignment = Assignment.find(participant.parent_id) %>

		<%= link_to assignment.name, :action => 'view_actions', :id => participant %>
	    <%= participant.get_course_string %>
		<%= participant.get_topic_string %>
		<%= assignment.get_current_stage() %>
		<%= assignment.get_stage_deadline() %>

	  	<%if participant.permission_granted %>granted
			<% else %>denied
			<% end %>

<% end %>

<% end %>


Add link from homepage to blog section

Add link from homepage to blog section

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

You have the right to ask European Union bodies for information,

        they are legally obliged to respond

About AsktheEU.org

Who we are
and how this
website works

            <%= link_to _('More'), help_about_url %>

Make
Your Request

Ask a European Union body for information. (You will be asked to sign up/sign in first.)

            <%= link_to _("Request"), select_authority_url %>

Search
Requests

See what others are
 asking and the answers they are getting.

            <%= link_to _("Search"), request_list_successful_url %>

                EU institutions

            What can you ask and to whom?

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
            euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
            minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
            ex ea commodo consequat.

Follow us

Video

<a href="<%= blog_url %>">News

            <% for item in @blog_items[0..2]: %>

<%= simple_date(Time.parse(item['pubDate'][0])) %>

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

            <% end %>

<a href="<%= blog_url %>">View all news

<% end %>

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

You have the right to ask European Union bodies for information,

        they are legally obliged to respond

About AsktheEU.org

Who we are
and how this
website works

            <%= link_to _('More'), help_about_url %>

Make
Your Request

Ask a European Union body for information. (You will be asked to sign up/sign in first.)

            <%= link_to _("Request"), select_authority_url %>

Search
Requests

See what others are
 asking and the answers they are getting.

            <%= link_to _("Search"), request_list_successful_url %>

                EU institutions

            What can you ask and to whom?

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
            euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
            minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
            ex ea commodo consequat.

Follow us

Video

News

            <% for item in @blog_items[0..2]: %>

<%= simple_date(Time.parse(item['pubDate'][0])) %>

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

            <% end %>

View all news

<% end %>


Putting "I forgot my password" structure back

  <% unless logged_in? %>

<%= _('Login') %>

<%
  @user = User.new  if ! @user
%>

    <% labelled_form_for :user, @user,
       :url => login_url do |f| %>

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

         <%= f.password_field :password %>

      <% button_bar do %>
        <%= submit_button( 'login', _('Log in') )%>
        <%= link_to content_tag( 'span', _('New user') ),
            { :controller => 'account', :action => 'signup' },
            :class => 'button with-text icon-add' %>
      <% end %>

    <% end %>

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

  <% else %>

<%= user.identifier %>

  <% end %>

  <% unless logged_in? %>

<%= _('Login') %>

<%
  @user = User.new  if ! @user
%>

    <% labelled_form_for :user, @user,
       :url => login_url do |f| %>

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

         <%= f.password_field :password %>

      <% button_bar do %>
        <%= submit_button( 'login', _('Log in') )%>
        <%= link_to content_tag( 'span', _('New user') ),
            { :controller => 'account', :action => 'signup' },
            :class => 'button with-text icon-add' %>
      <% end %>

    <% end %>

    <% button_bar(:style => 'margin: 0px;') do %>
      <%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>
    <% end %>

  <% else %>

<%= user.identifier %>

  <% end %>


wrapping the entire "X Found" phrase in a <span> tag so it can be targetted by css

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

      <td colspan="<%= active_scaffold_config.list.columns.length + 1 -%>" class="messages-container">
        <div id="<%= active_scaffold_messages_id -%>">
          <%= render :partial => 'messages' %>

        <p id="<%= empty_message_id %>" class="empty-message" <%= ' style="display:none;" ' unless @page.items.empty? %>>
          <%= as_('No Entries') %>

  <tbody class="records" id="<%= active_scaffold_tbody_id %>">
    <% if !@records.empty? -%>
      <%= render :partial => 'list_record', :collection => @page.items, :locals => { :hidden => false } %>
      <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} -%>
        <%= render :partial => 'list_calculations' %>
      <% end -%>
    <% end -%>

    <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } unless @page.pager.number_of_pages == 1 %>

  <%= @page.pager.count -%> <%=as_('Found') %>

<%# a hack for the Rico Corner problem %>


Fix article link in scribbish. Closes #977

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

<div class="atomentry" id="article-<%= article.id %>">

    <%= (controller.action_name.include? 'permalink') ? article.title : article_link(article.title, article) %>
    <%= content_tag(:span, article.comments.size, :class => 'comment_count') if article.comments.size > 0 %>

    Posted by <%= author_link(article) %>
    <abbr class="published" title="<%= article.created_at.xmlschema %>"><%= js_distance_of_time_in_words_to_now article.created_at %>

    <%= article_html(article, :body) %>

    <% if article.extended? -%>

        <% if controller.action_name == 'index' -%>

<%= article_link "Continue reading...", article %>

        <% else -%>
          <%= article_html(article, :extended) %>
        <% end -%>

    <% end -%>

    <%= content_tag(:li, category_links(article), :class => 'categories') unless article.categories.empty? %>
    <%= content_tag(:li, tag_links(article), :class => 'tags') unless article.tags.empty? %>

Meta
      <%= trackbacks_link(article) << ',' if article.allow_pings? %>
      <%= comments_link(article) << ',' if article.allow_comments? %>
      <a href="<%= article_url article %>" rel="bookmark"><%=h _('permalink')%>,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'rss',  :id => article %>">rss,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'atom', :id => article %>">atom

<div class="atomentry" id="article-<%= article.id %>">

    <%= (controller.action_name.include? 'permalink') ? article.title : article_link(article.title, article) %>
    <%= content_tag(:span, article.comments.size, :class => 'comment_count') if article.comments.size > 0 %>

    Posted by <%= author_link(article) %>
    <abbr class="published" title="<%= article.created_at.xmlschema %>"><%= js_distance_of_time_in_words_to_now article.created_at %>

    <%= article_html(article, :body) %>

    <% if article.extended? -%>

        <% if controller.action_name == 'index' -%>

<%= article_link "Continue reading...", article %>

        <% else -%>
          <%= article_html(article, :extended) %>
        <% end -%>

    <% end -%>

    <%= content_tag(:li, category_links(article), :class => 'categories') unless article.categories.empty? %>
    <%= content_tag(:li, tag_links(article), :class => 'tags') unless article.tags.empty? %>

Meta
      <%= trackbacks_link(article) << ',' if article.allow_pings? %>
      <%= comments_link(article) << ',' if article.allow_comments? %>
      <a href="<%= server_url_for :controller => 'articles',  :action => 'read', :id => article %>" rel="bookmark">permalink,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'rss',  :id => article %>">rss,
      <a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'atom', :id => article %>">atom


Fix #814 - missing </div> in signup.rhtml

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

<%= start_form_tag :action=> "signup" %>

<%= error_messages_for 'user' %>

Signup

  Desired login:

  <%= text_field "user", "login", :size => 20 %>

  Display name:

  <%= text_field "user", "name", :size => 30 %>

  Email:

  <%= text_field "user", "email", :size => 30 %>

  Choose password:

  <%= password_field "user", "password", :size => 30 %>

  Confirm password:

  <%= password_field "user", "password_confirmation", :size => 30 %>

  <input type="submit" value="Signup »" class="primary" />

<%= end_form_tag %>


#1588 fixed menu for processor, to use the new one

<%= render :partial => 'profiles_viewer/menu' %>

<%= render :partial => 'acceptance/menu' %>


Added contextmenu and forecolor on tinymce

<%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %>
<script type="text/javascript">
  var myplugins = "searchreplace,print,table,contextmenu";
  var first_line, second_line;
  var mode = '<%= mode ||= false %>'
  <% if mode %>
    first_line = "fontsizeselect,bold,italic,underline,bullist,numlist,justifyleft,justifycenter,justifyright,link,unlink"
    second_line = ""
  <% else %>
    first_line = "print,separator,copy,paste,separator,undo,redo,separator,search,replace,separator,forecolor,fontsizeselect,formatselect"
    second_line = "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code"
  <% end %>

  if (tinymce.isIE) {
    // the paste plugin is only useful in Internet Explorer
    myplugins = "paste," + myplugins;
  }
tinyMCE.init({
        mode : "textareas",
        editor_selector : "mceEditor",
        theme : "advanced",
        relative_urls : false,
        remove_script_host : true,
        plugins: myplugins,
        theme_advanced_toolbar_location : "top",
        theme_advanced_layout_manager: 'SimpleLayout',
        theme_advanced_buttons1 : first_line,
        theme_advanced_buttons2 : second_line,
        theme_advanced_buttons3 : "",
        theme_advanced_blockformats :"p,address,pre,h2,h3,h4,h5,h6",
        paste_auto_cleanup_on_paste : true,
        paste_insert_word_content_callback : "convertWord",
        paste_use_dialog: false,
        apply_source_formatting : true,
        extended_valid_elements : "applet[style|archive|codebase|code|height|width],comment,iframe[src|style|allowtransparency|frameborder|width|height|scrolling]",
        content_css: '/stylesheets/tinymce.css',
        language: <%= tinymce_language.inspect %>,
        entity_encoding: 'raw'
        });

function convertWord(type, content) {
  switch (type) {
    // Gets executed before the built in logic performes it's cleanups
    case "before":
      //content = content.toLowerCase(); // Some dummy logic
      break;

    // Gets executed after the built in logic performes it's cleanups
    case "after":
      content = content.replace(/<!--\s*-->/, '');
      break;
  }

  return content;
}

</script>

<%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %>
<script type="text/javascript">
  var myplugins = "searchreplace,print,table";
  var first_line, second_line;
  var mode = '<%= mode ||= false %>'
  <% if mode %>
    first_line = "fontsizeselect,bold,italic,underline,bullist,numlist,justifyleft,justifycenter,justifyright,link,unlink"
    second_line = ""
  <% else %>
    first_line = "print,separator,copy,paste,separator,undo,redo,separator,search,replace,separator,fontsizeselect,formatselect"
    second_line = "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code"
  <% end %>

  if (tinymce.isIE) {
    // the paste plugin is only useful in Internet Explorer
    myplugins = "paste," + myplugins;
  }
tinyMCE.init({
        mode : "textareas",
        editor_selector : "mceEditor",
        theme : "advanced",
        relative_urls : false,
        remove_script_host : true,
        plugins: myplugins,
        theme_advanced_toolbar_location : "top",
        theme_advanced_layout_manager: 'SimpleLayout',
        theme_advanced_buttons1 : first_line,
        theme_advanced_buttons2 : second_line,
        theme_advanced_buttons3 : "",
        theme_advanced_blockformats :"p,address,pre,h2,h3,h4,h5,h6",
        paste_auto_cleanup_on_paste : true,
        paste_insert_word_content_callback : "convertWord",
        paste_use_dialog: false,
        apply_source_formatting : true,
        extended_valid_elements : "applet[style|archive|codebase|code|height|width],comment,iframe[src|style|allowtransparency|frameborder|width|height|scrolling]",
        content_css: '/stylesheets/tinymce.css',
        language: <%= tinymce_language.inspect %>,
        entity_encoding: 'raw'
        });

function convertWord(type, content) {
  switch (type) {
    // Gets executed before the built in logic performes it's cleanups
    case "before":
      //content = content.toLowerCase(); // Some dummy logic
      break;

    // Gets executed after the built in logic performes it's cleanups
    case "after":
      content = content.replace(/<!--\s*-->/, '');
      break;
  }

  return content;
}

</script>


Return to track when create tool

Return to track when create tool

<li class="step <%= status_class(step_item) %>">
  <%= hidden_field_tag "step_ids[]", step_item.id %>

<%= step_item.hidden ? '' : step_item.position %>

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

      <%= show_period(step_item.start_date, step_item.end_date) %>

<%= link_to step_item.name, step_item.url %>

<%= step_item.body %>

  <% if step_item.tool %>
    <%= link_to step_item.tool.name, step_item.tool.view_url %>
  <% elsif step_item.allow_create?(user) && step_item.tool_class %>
    <a href="<%= url_for({:controller => 'cms', :action => 'new', :type => step_item.tool_class, :parent_id => step_item, :success_back_to => url_for(step_item.parent.view_url)}) %>" class="button icon-new with-text icon-new<%= step_item.tool_class.icon_name %>"><%= _('Create %s' % step_item.tool_class.short_description) %>
  <% end %>

<li class="step <%= status_class(step_item) %>">
  <%= hidden_field_tag "step_ids[]", step_item.id %>

<%= step_item.hidden ? '' : step_item.position %>

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

      <%= show_period(step_item.start_date, step_item.end_date) %>

<%= link_to step_item.name, step_item.url %>

<%= step_item.body %>

  <% if step_item.tool %>
    <%= link_to step_item.tool.name, step_item.tool.view_url %>
  <% elsif step_item.allow_create?(user) && step_item.tool_class %>
    <a href="<%= url_for({:controller => 'cms', :action => 'new', :type => step_item.tool_class, :parent_id => step_item}) %>" class="button icon-new with-text icon-new<%= step_item.tool_class.icon_name %>"><%= _('Create %s' % step_item.tool_class.short_description) %>
  <% end %>