Improve warning wording.

Improve warning wording.

<% @title = "Make an " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %>

<% if @existing_request %>

    <%= user_or_you_capital_link(@existing_request.user) %> already
    created the same request on <%=simple_date(@existing_request.created_at)%>.
    You can either view the <a href="<%=request_url(@existing_request)%>">existing request,
    or edit the details below to make a new but similar request.

<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

Read this before writing your <%=h(@info_request.law_used_full)%> request

        <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %>

               First, search the authority's web site ...
               <% if !@info_request.public_body.calculated_home_page.nil? %>

                           <%= text_field_tag 'q', params[:q], { :size => 20 } %>
                   <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %>
                   <%= submit_tag "Search" %>
               <% end %>

               ... to check that the info isn't already published.

        <% end %>

Write your request in simple, precise language.
    <% if @info_request.public_body.info_requests.size > 0 %>

Browse <%= link_to "other requests", public_body_url(@info_request.public_body)  %>
        to '<%= h(@info_request.public_body.name) %>'
        for examples of how to word your request.

    <% else %>

Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.

    <% end %>

Keep it focussed, if you ask for everything it might cost too much
    and you might get nothing.

Ask for particular documents, rather than general questions.

This site is public, everything you type (except your email address) and any response will be published.

    <% if @info_request.public_body.notes != "" %>

Special note for this authority!

<%=MySociety::Format.make_clickable(@info_request.public_body.notes) %>

    <% end %>

    <% if @info_request.public_body.eir_only? %>

Please ask for environmental information only

The Freedom of Information Act does not apply to <%=h(@info_request.public_body.name)%>.
        However, you have the right to request environmental
        information under a different law (explanation).
        This covers a very wide spectrum of information about the state of
        the natural and built environment, such as:

Air, water, soil, land, flora and fauna (including how these effect
        human beings)

Information on emissions and discharges (e.g. noise, energy,
        radiation, waste materials)

Human health and safety

Cultural sites and built structures (as they may be affected by the
        environmental factors listed above)

Plans and administrative measures that affect these matters

Please only request information that comes under those categories, do not waste your
        time or the time of the public authority by requesting unrelated information.

    <% end %>

<% form_for(:info_request, @info_request, :html => { :id => 'write_form' }  ) do |f| %>

			To:
			<%=h(@info_request.public_body.name)%>

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

			(a one line summary of the information you are requesting,
			e.g.
            <% if @info_request.law_used == 'eir' %>
                'Pollution levels over time for the River Tyne'
            <% else %>
                'Crime statistics by ward level for Wales'
            <% end %>
            )

		<% fields_for :outgoing_message do |o| %>

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

		<% end %>

        <% if !@user %>

                Everything that you enter on this page, including your name,
                will be displayed publicly on
                this website (why?).
                If you would like to use a pseudonym,
                please read this first.

        <% else %>

                Everything that you enter on this page
                will be displayed publicly on
                this website (why?).

        <% end %>

			Can I request information about myself?
			No! (Click here for details)

			<%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
			<%= hidden_field_tag(:submitted_new_request, 1 ) %>
			<%= hidden_field_tag(:preview, 1 ) %>
			<%= submit_tag "Preview your public request" %>

<% end %>

<% @title = "Make an " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %>

<% if @existing_request %>

    <%= user_or_you_capital_link(@existing_request.user) %> already
    created the same request on <%=simple_date(@existing_request.created_at)%>.
    You can either view the <a href="<%=request_url(@existing_request)%>">existing request,
    or edit the details below to make a new but similar request.

<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

Read this before writing your <%=h(@info_request.law_used_full)%> request

        <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %>

               First, search the authority's web site ...
               <% if !@info_request.public_body.calculated_home_page.nil? %>

                           <%= text_field_tag 'q', params[:q], { :size => 20 } %>
                   <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %>
                   <%= submit_tag "Search" %>
               <% end %>

               ... to check that the info isn't already published.

        <% end %>

Write your request in simple, precise language.
    <% if @info_request.public_body.info_requests.size > 0 %>

Browse <%= link_to "other requests", public_body_url(@info_request.public_body)  %>
        to '<%= h(@info_request.public_body.name) %>'
        for examples of how to word your request.

    <% else %>

Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.

    <% end %>

Keep it focussed, if you ask for everything it might cost too much
    and you might get nothing.

Ask for particular documents, rather than general questions.

This site is public, everything you type (except your email address) and any response will be published.

    <% if @info_request.public_body.notes != "" %>

Special note for this authority!

<%=MySociety::Format.make_clickable(@info_request.public_body.notes) %>

    <% end %>

    <% if @info_request.public_body.eir_only? %>

Please ask for environmental information only

The Freedom of Information Act does not apply to <%=h(@info_request.public_body.name)%>.
        However, you have the right to request environmental
        information under a different law (explanation).
        This covers a very wide spectrum of information about the state of
        the natural and built environment, such as:

Air, water, soil, land, flora and fauna (including how these effect
        human beings)

Information on emissions and discharges (e.g. noise, energy,
        radiation, waste materials)

Human health and safety

Cultural sites and built structures (as they may be affected by the
        environmental factors listed above)

Plans and administrative measures that affect these matters

Please only request information that comes under those categories, do not waste your
        time or the time of the public authority by requesting unrelated information.

    <% end %>

<% form_for(:info_request, @info_request, :html => { :id => 'write_form' }  ) do |f| %>

			To:
			<%=h(@info_request.public_body.name)%>

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

			(a one line summary of the information you are requesting,
			e.g.
            <% if @info_request.law_used == 'eir' %>
                'Pollution levels over time for the River Tyne'
            <% else %>
                'Crime statistics by ward level for Wales'
            <% end %>
            )

		<% fields_for :outgoing_message do |o| %>

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

		<% end %>

        <% if !@user %>

                All information that you enter
                on this page, including your name, will be
                displayed publicly on this website
                (why?).

                We encourage you to use
                your real name, but you may use a pseudonym if you
                read this first.
                Any response you get will also be published.

        <% else %>

                Privacy warning: All information that you enter
                on this page will be displayed publicly on this website. Any
                response you get will also be published.
                See our privacy policy.

        <% end %>

			Can I request information about myself?
			No! (Click here for details)

			<%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
			<%= hidden_field_tag(:submitted_new_request, 1 ) %>
			<%= hidden_field_tag(:preview, 1 ) %>
			<%= submit_tag "Preview your public request" %>

<% end %>


Less top heavy text on user message template

Hi <%=@recipient_user.name%>,

<%=@from_user.name%> has used WhatDoTheyKnow to send you the message below.
Your details have not been given to anyone, unless you choose to reply to this
message, which will then go directly to the person who wrote the message.

You might like to see the Freedom of Information requests that
<%=@from_user.name %> has made: <%= @from_user_url %>

-- the WhatDoTheyKnow team

---------------------------------------------------------------------

<%= @message.strip %>


oops, in editing introduced syntax error into js; fixed

<%
#   Include this partial to put the background updater device on your page.
#
#   Started out using periodically_call_remote here, but we need to capture
#   the Prototype PeriodicalExecter function in a js veriable, which
#   the  built in generator won't do. So we're doing it by hand
#   based on the output of periodically_call_remote. It's not that
#   complicated or anything.
%>

<% # only include if we have any background services. We could check to make
   # sure we only have background services we care about, but it's more work--
   # the updater will only run ONCE at most wrongly, then the
   # background_update action will stop it.
   if ( any_services_in_progress? )
%>
<script type="text/javascript">
//<![CDATA[
  umlaut_background_executer =  new PeriodicalExecuter(function() { new Ajax.Request("<%= url_for({:controller => 'resolve', :action=> 'background_update', :'umlaut.request_id' => @user_request.id}) %>", {asynchronous:true, evalScripts:true});  }, <%= AppConfig.param("poll_wait_seconds", 4) %>);
//]]>
</script>
<%
# The above was based on source from this call:
#periodically_call_remote :url => {:action => "background_update", :"umlaut.request_id" => @user_request.id },
#    :condition => 'background_update_check',
#    :frequency => 4
%>
<% end %>

<%
#   Include this partial to put the background updater device on your page.
#
#   Started out using periodically_call_remote here, but we need to capture
#   the Prototype PeriodicalExecter function in a js veriable, which
#   the  built in generator won't do. So we're doing it by hand
#   based on the output of periodically_call_remote. It's not that
#   complicated or anything.
%>

<% # only include if we have any background services. We could check to make
   # sure we only have background services we care about, but it's more work--
   # the updater will only run ONCE at most wrongly, then the
   # background_update action will stop it.
   if ( any_services_in_progress? )
%>
<script type="text/javascript">
//<![CDATA[
  umlaut_background_executer =  new PeriodicalExecuter(function() { new Ajax.Request("<%= url_for({:controller => 'resolve', :action=> 'background_update', :'umlaut.request_id' => @user_request.id}) %>", {asynchronous:true, evalScripts:true});  }, <%= AppConfig.param("poll_wait_seconds", 4) %>
//]]>
</script>
<%
# The above was based on source from this call:
#periodically_call_remote :url => {:action => "background_update", :"umlaut.request_id" => @user_request.id },
#    :condition => 'background_update_check',
#    :frequency => 4
%>
<% end %>


Can exclude the folder id.

Can exclude the folder id.

<%= f.check_boxes(:hidden, [['Hide field in forms',true]], :single => true, :label => '') unless @exclude_field_options && @exclude_field_options.include?(:hidden) -%>
<%= f.check_boxes(:exclude, [['Exclude field from search keywords',true]], :single => true, :label => '') unless @exclude_field_options && @exclude_field_options.include?(:exclude) -%>
<% field.module_class.field_options_widgets.each do |widget| -%>
  <% case widget
     when :required  -%>
     <%= f.check_boxes(:required, [['Required',true]], :single => true, :label => '', :description => 'This field must not be empty') unless @exclude_field_options && @exclude_field_options.include?(:required) %>
  <% when :unique  -%>
     <%= f.check_boxes(:unique, [['Field must be Unique',true]], :single => true, :label => '', :description => 'Each entry in this model must have a unique value for this field') unless @exclude_field_options && @exclude_field_options.include?(:unique) %>
  <% when :regexp  -%>
     <% f.custom_field :regexp, :label => '' do %>
         <%= uf.check_boxes :regexp, [['Value must match regular expression',true]], :single => true, :label => '', :onclick => "$('field_regexp_#{field_index}').style.display = this.checked ? '' : 'none';"  %>
         <div id='field_regexp_<%= field_index %>' <%= "style='display:none;'" unless uf.object.regexp %>>
             RegExp: <%= uf.text_field :regexp_code %>

             Message: <%= uf.text_field :regexp_message %>

     <% end -%>
  <% when :options -%>
     <%= f.text_area :options_text, :cols => 60, :rows => 4,:vertical => true, :label => 'Available Options (One per line or Text Value;;db_safe_value)' %>
  <% when :belongs_to -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Belongs to' %>
 <% when :has_many -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Has Many', :description => 'Changing relationship model will destroy existing connections'  %>
 <% when :on_off_value -%>
     <%= f.text_field :on %>
     <%= f.text_field :off %>
     <%= f.text_field :on_description, :description => 'This appears as a label next to the check box instead of the on value ' %>
 <% when :folder_id -%>
     <%= f.filemanager_folder(:folder_id) unless @exclude_field_options && @exclude_field_options.include?(:folder_id) %>
  <% end -%>
<% end -%>

<%= f.check_boxes(:hidden, [['Hide field in forms',true]], :single => true, :label => '') unless @exclude_field_options && @exclude_field_options.include?(:hidden) -%>
<%= f.check_boxes(:exclude, [['Exclude field from search keywords',true]], :single => true, :label => '') unless @exclude_field_options && @exclude_field_options.include?(:exclude) -%>
<% field.module_class.field_options_widgets.each do |widget| -%>
  <% case widget
     when :required  -%>
     <%= f.check_boxes(:required, [['Required',true]], :single => true, :label => '', :description => 'This field must not be empty') unless @exclude_field_options && @exclude_field_options.include?(:required) %>
  <% when :unique  -%>
     <%= f.check_boxes(:unique, [['Field must be Unique',true]], :single => true, :label => '', :description => 'Each entry in this model must have a unique value for this field') unless @exclude_field_options && @exclude_field_options.include?(:unique) %>
  <% when :regexp  -%>
     <% f.custom_field :regexp, :label => '' do %>
         <%= uf.check_boxes :regexp, [['Value must match regular expression',true]], :single => true, :label => '', :onclick => "$('field_regexp_#{field_index}').style.display = this.checked ? '' : 'none';"  %>
         <div id='field_regexp_<%= field_index %>' <%= "style='display:none;'" unless uf.object.regexp %>>
             RegExp: <%= uf.text_field :regexp_code %>

             Message: <%= uf.text_field :regexp_message %>

     <% end -%>
  <% when :options -%>
     <%= f.text_area :options_text, :cols => 60, :rows => 4,:vertical => true, :label => 'Available Options (One per line or Text Value;;db_safe_value)' %>
  <% when :belongs_to -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Belongs to' %>
 <% when :has_many -%>
     <%= f.select :belongs_to, ContentModel.relationship_classes, :label => 'Has Many', :description => 'Changing relationship model will destroy existing connections'  %>
 <% when :on_off_value -%>
     <%= f.text_field :on %>
     <%= f.text_field :off %>
     <%= f.text_field :on_description, :description => 'This appears as a label next to the check box instead of the on value ' %>
 <% when :folder_id -%>
     <%= f.filemanager_folder :folder_id %>
  <% end -%>
<% end -%>


context_content: fix pagination view

context_content: fix pagination view

<% if contents.total_pages > 1 %>
  <%= link_to_remote(nil, :url => {:profile => block.owner.identifier, :id => block.id, :controller => 'context_content_plugin_profile', :action => 'view_content', :page => contents.previous_page, :article_id => article_id }, :html => {:class => "button icon-button icon-left #{contents.previous_page ? '':'disabled'}".strip}, :condition => "#{!contents.previous_page.nil?}", :success => "jQuery('#context_content_#{block.id}').effect('slide', {direction: 'left'});" )%>
  <%= link_to_remote(nil, :url => {:profile => block.owner.identifier, :id => block.id, :controller => 'context_content_plugin_profile', :action => 'view_content', :page => contents.next_page, :article_id => article_id }, :html => {:class => "button icon-button icon-right #{contents.next_page ? '':'disabled'}".strip}, :condition => "#{!contents.next_page.nil?}", :success => "jQuery('#context_content_#{block.id}').effect('slide', {direction: 'right'});" )%>
<% end %>

<% if contents.total_pages > 1 %>
  <%= link_to_remote(nil, :url => {:id => block.id, :controller => 'context_content_plugin_profile', :action => 'view_content', :page => contents.previous_page, :article_id => article_id }, :html => {:class => "button icon-button icon-left #{contents.previous_page ? '':'disabled'}".strip}, :condition => "#{!contents.previous_page.nil?}", :success => "jQuery('#context_content_#{block.id}').effect('slide', {direction: 'left'});" )%>
  <%= link_to_remote(nil, :url => {:id => block.id, :controller => 'context_content_plugin_profile', :action => 'view_content', :page => contents.next_page, :article_id => article_id }, :html => {:class => "button icon-button icon-right #{contents.next_page ? '':'disabled'}".strip}, :condition => "#{!contents.next_page.nil?}", :success => "jQuery('#context_content_#{block.id}').effect('slide', {direction: 'right'});" )%>
<% end %>


Fix template typo

Fix template typo

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

<% if @site_template -%>

<% else -%>

<% end -%>

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

  <% if @site_template.css -%>

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

<% if @site_template.header and @site_template.header.length > 0 -%>
  <%= @site_template.header %>
<% end -%>

<%= page_title %>

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

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

          <% end -%>

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

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

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

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

            <% else -%>

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

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

Administration »

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

            <% end -%>

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

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

There were some errors processing your request:

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

<%= msg%>

      <% end -%>

<% end -%>

  <%= @content_for_layout %>

<% if @site_template.footer and @site_template.footer.length > 0 -%>
  <%= @site_template.footer %>
<% end -%>


fixed little glitch in FieldSearch. it was still checking column.form_ui (column.ui_type) for the column type.

<%
# We have to remove search form params before the url_for method call, otherwise it throughs it on
search_params = params[:search]
params.merge!(:search => nil)
href = url_for(params_for(:action => :update_table, :escape => false))
-%>
<%= form_remote_tag :url => href,
                    :method => :get,
                    :before => "addActiveScaffoldPageToHistory('#{href}', '#{params[:controller]}')",
                    :after => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{search_form_id}');",
                    :complete => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{search_form_id}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :update => active_scaffold_content_id,
                    :html => { :href => href, :id => search_form_id, :class => 'search' } %>

    <% active_scaffold_config.field_search.columns.each do |column| -%>
      <% name = "search[#{column.name}]" %>
      <% value = nil %>
      <% value = search_params[column.name] if search_params %>

            <label for="<%= "search_#{column.name}" %>"><%= column.label %>

        <%= case column.column.type
          when :boolean
            check_box_tag(name, 1, value || value == 1)
          else
            text_field_tag(name, value, { :autocomplete => "off", :size => 20, :class => 'text-input', :id => "search_#{column.name}"})
          end
        %>

    <% end -%>

    <%= submit_tag as_('Search'), :class => "submit" %>
    <%= as_('Reset') -%>
    <%= loading_indicator_tag(:action => :search) %>

</form>

<%
# We have to remove search form params before the url_for method call, otherwise it throughs it on
search_params = params[:search]
params.merge!(:search => nil)
href = url_for(params_for(:action => :update_table, :escape => false))
-%>
<%= form_remote_tag :url => href,
                    :method => :get,
                    :before => "addActiveScaffoldPageToHistory('#{href}', '#{params[:controller]}')",
                    :after => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{search_form_id}');",
                    :complete => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{search_form_id}');",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :update => active_scaffold_content_id,
                    :html => { :href => href, :id => search_form_id, :class => 'search' } %>

    <% active_scaffold_config.field_search.columns.each do |column| -%>
      <% name = "search[#{column.name}]" %>
      <% value = nil %>
      <% value = search_params[column.name] if search_params %>

            <label for="<%= "search_#{column.name}" %>"><%= column.label %>

        <%= case column.form_ui
          when :boolean
            check_box_tag(name, 1, value || value == 1)
          else
            text_field_tag(name, value, { :autocomplete => "off", :size => 20, :class => 'text-input', :id => "search_#{column.name}"})
          end
        %>

    <% end -%>

    <%= submit_tag as_('Search'), :class => "submit" %>
    <%= as_('Reset') -%>
    <%= loading_indicator_tag(:action => :search) %>

</form>


Hmm, don't show who is admin for now.

Hmm, don't show who is admin for now.

<% @title = h(@display_user.name) + (@is_you ? " (you)" : "") %>

<% if (@same_name_users.size >= 1) %>

There is more than one person who uses this site and has this name.
    One of them is shown below, you may mean a different one: <% for @same_name_user in @same_name_users %>
        <%= user_link(@same_name_user) %>
    <% end %>
<% end%>

Track this person

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

<%=@title%>

        Joined WhatDoTheyKnow on <%= simple_date(@display_user.created_at) %>
        <% if !@user.nil? && @user.owns_every_request? %>
        (<%= link_to "admin", user_admin_url(@display_user) %>)
        <% end %>
        <% if false # @display_user.owns_every_request? # should this be public? %>
        and is a site admin.
        <% end %>

        <%= link_to "Send message to " + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
        <% if @is_you %>
            (just to see how it works)

<%= link_to "Change your password", signchange_url() %>
        <% end %>

    <% if not @is_you %>

            If you are <%=h @display_user.name %>, <%= link_to "sign in", signin_url(:r => request.request_uri) %> to change your password or alter your subscriptions.

    <% end %>

    <% track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily'], :order => 'created_at desc') %>
    <% if @is_you and not track_things.empty? %>

        Your <%=pluralize(track_things.size, "email subscription") %>

        <% for track_thing in track_things %>

                <% if @is_you %>
                    <% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %>
                        <%= track_thing.params[:list_description] %>
                        <%= hidden_field_tag 'track_medium', "delete" %>
                        <%= hidden_field_tag 'r', request.request_uri %>
                        <%= submit_tag "unsubscribe" %>
                    <% end %>

                <% else %>
                    <%= track_thing.params[:list_description] %>
                <% end %>

        <% end %>

    <% end %>

    <% if @display_user.info_requests.empty? %>

Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %>

<%= @is_you ? 'You have' : 'This person has' %>
        made no Freedom of Information requests using this site.

    <% else %>

        <%= @is_you ? 'Your ' : "This person's " %>
        <%=pluralize(@display_user.info_requests.size, "Freedom of Information request") %>

        <%= render :partial => 'request/request_listing', :locals => { :info_requests => @display_user.info_requests } %>
    <% end %>

<% @title = h(@display_user.name) + (@is_you ? " (you)" : "") %>

<% if (@same_name_users.size >= 1) %>

There is more than one person who uses this site and has this name.
    One of them is shown below, you may mean a different one: <% for @same_name_user in @same_name_users %>
        <%= user_link(@same_name_user) %>
    <% end %>
<% end%>

Track this person

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

<%=@title%>

        Joined WhatDoTheyKnow on <%= simple_date(@display_user.created_at) %>
        <% if !@user.nil? && @user.owns_every_request? %>
        (<%= link_to "admin", user_admin_url(@display_user) %>)
        <% end %>

        <%= link_to "Send message to " + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
        <% if @is_you %>
            (just to see how it works)

<%= link_to "Change your password", signchange_url() %>
        <% end %>

    <% if not @is_you %>

            If you are <%=h @display_user.name %>, <%= link_to "sign in", signin_url(:r => request.request_uri) %> to change your password or alter your subscriptions.

    <% end %>

    <% track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily'], :order => 'created_at desc') %>
    <% if @is_you and not track_things.empty? %>

        Your <%=pluralize(track_things.size, "email subscription") %>

        <% for track_thing in track_things %>

                <% if @is_you %>
                    <% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %>
                        <%= track_thing.params[:list_description] %>
                        <%= hidden_field_tag 'track_medium', "delete" %>
                        <%= hidden_field_tag 'r', request.request_uri %>
                        <%= submit_tag "unsubscribe" %>
                    <% end %>

                <% else %>
                    <%= track_thing.params[:list_description] %>
                <% end %>

        <% end %>

    <% end %>

    <% if @display_user.info_requests.empty? %>

Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %>

<%= @is_you ? 'You have' : 'This person has' %>
        made no Freedom of Information requests using this site.

    <% else %>

        <%= @is_you ? 'Your ' : "This person's " %>
        <%=pluralize(@display_user.info_requests.size, "Freedom of Information request") %>

        <%= render :partial => 'request/request_listing', :locals => { :info_requests => @display_user.info_requests } %>
    <% end %>


Fix Noone -> No one typo

Fix Noone -> No one typo

<%
  @user_ids = []
  @current_user.company.projects.each do |p|
    @user_ids <
 ["id IN (#{@user_ids.uniq.join(',')})"], :order => "name").collect{|u| [u.name, u.id.to_s]}
%>

<fieldset>
<legend>New User</legend>

<% form_tag :action => 'create' do %>
  <%= render :partial => "form" %>

  <%=_('Signup Message')%><%= text_area_tag 'welcome_message', {}, { :rows => 10, :style => "width:80%;"} %>

  <%=_('The message will be included in the signup email.')%>

  <%= submit_tag _("Create"), :class => 'nolabel' %> <%= _'and copy permissions from'%>

  <select name="copy_user" id="copy_user">
     <option value="0" class="select_default"><%= _("[No one]") %></option>
     <%= options_for_select @users, params[:copy_user].to_i %>
  </select>

<% end %>

</fieldset>

<%
  @user_ids = []
  @current_user.company.projects.each do |p|
    @user_ids <
 ["id IN (#{@user_ids.uniq.join(',')})"], :order => "name").collect{|u| [u.name, u.id.to_s]}
%>

<fieldset>
<legend>New User</legend>

<% form_tag :action => 'create' do %>
  <%= render :partial => "form" %>

  <%=_('Signup Message')%><%= text_area_tag 'welcome_message', {}, { :rows => 10, :style => "width:80%;"} %>

  <%=_('The message will be included in the signup email.')%>

  <%= submit_tag _("Create"), :class => 'nolabel' %> <%= _'and copy permissions from'%>

  <select name="copy_user" id="copy_user">
     <option value="0" class="select_default"><%= _("[Noone]") %></option>
     <%= options_for_select @users, params[:copy_user].to_i %>
  </select>

<% end %>

</fieldset>


Updating bio blurb

Updating bio blurb

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

   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title>ReinH — <%= @page.title %></title>
   <meta name="author" content="<%= @page.author %>" />

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

   <link rel="stylesheet" href="/css/blueprint/screen.css" type="text/css" media="screen, projection" />
   <link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print" />

   <link rel="stylesheet" href="/css/coderay.css" type="text/css" />

   <link rel="stylesheet" href="/css/site.css" type="text/css" media="screen, projection" />

   <link rel="openid.server" href="http://www.myopenid.com/server" />
   <link rel="openid.delegate" href="http://ReinH.myopenid.com/" />
   <meta http-equiv="X-XRDS-Location" content="http://www.myopenid.com/xrds?username=ReinH.myopenid.com" />

   <link rel="alternate" type="application/atom+xml" title="RSS feed" href="http://reinh.com/feed/atom.xml" />

<div class="container" <%= 'id="home"' if @page.title == "Home" %>>

       ReinH.com

About

Recently

        <li class="column span-2 last <%= "active" if @page.title == "Archive" %>">Archive

      <%= @content %>

     [top]

About

           An avid guitarist, pianist and table tennis
           player, Rein writes a popular Ruby blog (you're reading it)
           and speaks frequently at Ruby conferences and user groups.

Subscribe

Twitter Me

People I Read

      <%= BlogRoll.to_html %>

       <% recent_pages = @pages.find(:all,
                                     :in_directory => "blog",
                                     :recursive => true,
                                     :sort_by => 'created_at',
                                     :reverse => true){|p| p.path !~ /\/index\.txt$/}.first(5) %>

Recently

       <% recent_pages.group_by{|p| p.created_at.strftime('%B%y').upcase}.each do |group, pages| %>

<%= group %>

            <% pages.each do |page| %>

<a href="<%=  page.url %>"><%= page.title %>

            <% end %>
       <% end %>

        Created with Webby

        All design & content Copyright Rein Henrichs 2008

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

   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title>ReinH — <%= @page.title %></title>
   <meta name="author" content="<%= @page.author %>" />

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

   <link rel="stylesheet" href="/css/blueprint/screen.css" type="text/css" media="screen, projection" />
   <link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print" />

   <link rel="stylesheet" href="/css/coderay.css" type="text/css" />

   <link rel="stylesheet" href="/css/site.css" type="text/css" media="screen, projection" />

   <link rel="openid.server" href="http://www.myopenid.com/server" />
   <link rel="openid.delegate" href="http://ReinH.myopenid.com/" />
   <meta http-equiv="X-XRDS-Location" content="http://www.myopenid.com/xrds?username=ReinH.myopenid.com" />

   <link rel="alternate" type="application/atom+xml" title="RSS feed" href="http://reinh.com/feed/atom.xml" />

<div class="container" <%= 'id="home"' if @page.title == "Home" %>>

       ReinH.com

About

Recently

        <li class="column span-2 last <%= "active" if @page.title == "Archive" %>">Archive

      <%= @content %>

     [top]

About

           An avid guitarist, pianist and table tennis
           player, Rein writes a popular Ruby blog (you're reading it)
           and speaks frequently at Ruby conferences and user groups.

           Please twitter me (@ReinH) or
           email me (reinh [at] reinh [dot] com) your questions and comments.

Subscribe

Twitter Me

People I Read

      <%= BlogRoll.to_html %>

       <% recent_pages = @pages.find(:all,
                                     :in_directory => "blog",
                                     :recursive => true,
                                     :sort_by => 'created_at',
                                     :reverse => true){|p| p.path !~ /\/index\.txt$/}.first(5) %>

Recently

       <% recent_pages.group_by{|p| p.created_at.strftime('%B%y').upcase}.each do |group, pages| %>

<%= group %>

            <% pages.each do |page| %>

<a href="<%=  page.url %>"><%= page.title %>

            <% end %>
       <% end %>

        Created with Webby

        All design & content Copyright Rein Henrichs 2008


Use Verdana before Helvetica for body text

/** FONTS **/
@font-face {
    font-family: GothamRounded;
    src: url('/asktheeu-theme/fonts/GothamRnd-Medium.otf') format("opentype");
}

@font-face {
    font-family: GothamRoundedBold;
    src: url('/asktheeu-theme/fonts/GothamRnd-Bold.otf') format("opentype");
}

/** LAYOUT **/
body {
    font-family: Verdana, Helvetica, Arial;
}
    body.front {
        background: none;
    }

#wrapper {
    padding-top: 10px;
    margin-bottom: 50px;
}

/** HEADER **/
#banner {
    background: #EAF5F6;
    border: none;
    height: 150px;
    position: relative;
}

#banner_inner {
    width: 950px;
    height: 150px;
}
    #banner_inner a:hover {
        text-decoration: underline;
    }

#logo {
    position: absolute;
    top: 20px;
}

#navigation_search {
    top: 50px;
    visibility: hidden;
}

div.lang {
    top: 23px;
    color: #00aaa6;
    font-size: 12px;
}
    div.lang a {
        color: #00aaa6;
        text-decoration: none;
    }

#logged_in_bar {
    top: 24px;
    font-weight: bold;
    font-size: 12px;
    padding: 3px 8px 1px 8px;
    height: 19px;
    background: #009a9d;
    border-radius: 5px;
}
    #logged_in_bar, #logged_in_bar a, #logged_in_bar a:visited {
        color: #FFF;
        text-decoration: none;
    }

/** NAVIGATION BAR **/
#topnav {
    font-family: Helvetica, Arial;
    font-size: 14px;
    font-weight: bold;
    margin-left: 190px;
}
    #topnav ul li {
        padding-left: 8px;
        padding-right: 8px;
        margin-right: 8px;

        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
    }
    #topnav ul li a {
        color: #00aaa6 !important;
    }

/** MAIN SITE **/
h1, h1 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #009a9d;
    font-size: 28px;
    margin-top: 30px;
    text-decoration: none;
}

h2, h2 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #7bbb58;
    font-size: 18px;
}

h3, h3 a {
    font-family: Helvetica, Arial;
    color: #00aaa6;
    font-size: 14px;
    font-weight: bold;
}

/** HELP **/
#left_column_flip {
    margin-top: 20px;
    width: 550px;
    margin-right: 50px;
}

#right_column_flip {
    text-align: right;
}

.controller_help {
    font-size: 12px;
    line-height: 1.5;
    text-align: justify;
}
    .controller_help a {
        color: #009a9d;
        text-decoration: none;
    }
    .controller_help a:hover {
        text-decoration: underline;
    }

.XXX {  /* TODO stuff */
    color: red;
    font-weight: bold;
    background-color: yellow;
}

/** FRONTPAGE **/
.front #wrapper, .front #content {
    width: 100%;
    padding: 0px;
    margin: 0px;
}

#frontpage-intro {
    width: 950px;
    margin: auto;
    position: relative;
}

#frontpage-lead {
    font-family: GothamRounded, Helvetica, Arial;
    font-size: 24px;
    font-weight: normal;
    text-align: center;
    color: #73c167;
}

#frontpage-left-balloon {
    float: left;
    width: 206px;
    height: 184px;
    background: url(/asktheeu-theme/images/yellow_balloon.gif);
    padding: 10px 20px 20px 50px;
    margin: 36px 8px 60px 0px;
}
    #frontpage-left-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-middle-balloon {
    float: left;
    width: 314px;
    height: 283px;
    background: url(/asktheeu-theme/images/blue_balloon.gif);
    padding: 0px 30px 0px 30px;
}
    #frontpage-middle-balloon h1 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 42px;
        color: #fff;
        text-align: center;
        padding-right: 20px;
        margin-bottom: 5px;
    }
    #frontpage-middle-balloon p {
        margin-left: 15px;
    }
    #frontpage-middle-balloon .frontpage-button-link {
        margin-left: 95px;
    }

#frontpage-right-balloon {
    float: left;
    width: 218px;
    height: 174px;
    background: url(/asktheeu-theme/images/green_balloon.gif);
    padding: 5px 20px 20px 50px;
    margin: 41px 0px 60px 4px;
}
    #frontpage-right-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-left-balloon p,
#frontpage-right-balloon p,
#frontpage-middle-balloon p {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-top: 0px;
}

#frontpage-intro a {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}
    #frontpage-intro a:hover {
        text-decoration: underline;
    }

.frontpage-button-link {
    height: 24px;
    width: 100px;
    background: url(/asktheeu-theme/images/button_gradient.gif);
    border-radius: 5px;
    text-align: center;
    padding-top: 10px;
}

#frontpage-content {
    background: #EAF5F6;
    border-top: 1px solid #b2dcde;
}

#frontpage-inner-content {
    width: 950px;
    margin: auto;
    position: relative;
    padding-bottom: 20px;
}

#left-column {
    float: left;
    background: #EAF5F6;
    width: 450px;
}

#right-column {
    float: right;
    width: 450px;
}

#frontpage-content p {
    color: #6f6f6e;
    font-size: 12px;
    line-height: 1.5;
}

#frontpage-content p a {
    color: #009a9d;
    font-size: 12px;
    text-decoration: none;
}
    #frontpage-content a:hover {
        text-decoration: underline;
    }

.picture-frame {
    width: 450px;
    height: 270px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
}
    .picture-frame img {
        width: 420px;
        height: 240px;
        margin: 15px;
    }

#follow-us-frame {
    width: 390px;
    height: 60px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
    margin-top: 50px;
    padding: 20px 30px 20px 30px;
}
    #follow-us-frame p {
        float: left;
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 18px;
        color: #009a9d;
    }
    #follow-us-frame span {
        float: left;
        margin-top: 12px;
        margin-left: 20px;
    }

.link-arrow {
    background: no-repeat url(/asktheeu-theme/images/arrow_icon.gif) ;
    padding-top: 6px;
    padding-left: 35px;
    height: 30px;
}
    .link-arrow a {
        font-family: Helvetica, Arial;
        color: #00aaa6;
        font-size: 14px;
        font-weight: bold;
        text-decoration: none;
    }

/** FOOTER **/
#footer {
    height: 100px;
    margin: 0px;
    border-top-width: 1px;
}

#footer-inner {
    width: 950px;
    margin: auto;
    position: relative;
}

#access-info-logo {
    position: absolute;
    left: 0px;
    top: 10px;
}

#footer-links {
    margin-left: 150px;
    margin-top: 10px;
    float: left;

    font-family: GothamRounded, Helvetica, Arial;
    font-size: 18px;
}
    #footer-links ul {
        list-style: none outside none;
    }
    #footer-links ul li {
        float: left;
        margin-right: 40px;
    }
    #footer-links ul a {
        text-decoration: none;
        color: #009a9d;
    }
    #footer-links ul a:hover {
        text-decoration: underline;
    }

#credits {
    float: right;
    margin-top: 30px;
    margin-right: 20px;

    font-family: Verdana, Helvetica, Arial;
    font-size: 12px;
}
    #credits a {
        text-decoration: none;
        color: #00aaa6;
    }

#creative-commons-logo {
    float: right;
    margin-top: 20px;
}

/** FONTS **/
@font-face {
    font-family: GothamRounded;
    src: url('/asktheeu-theme/fonts/GothamRnd-Medium.otf') format("opentype");
}

@font-face {
    font-family: GothamRoundedBold;
    src: url('/asktheeu-theme/fonts/GothamRnd-Bold.otf') format("opentype");
}

/** LAYOUT **/
body {
    font-family: Helvetica, Arial;
}
    body.front {
        background: none;
    }

#wrapper {
    padding-top: 10px;
    margin-bottom: 50px;
}

/** HEADER **/
#banner {
    background: #EAF5F6;
    border: none;
    height: 150px;
    position: relative;
}

#banner_inner {
    width: 950px;
    height: 150px;
}
    #banner_inner a:hover {
        text-decoration: underline;
    }

#logo {
    position: absolute;
    top: 20px;
}

#navigation_search {
    top: 50px;
    visibility: hidden;
}

div.lang {
    top: 25px;
    color: #00aaa6;
    font-size: 12px;
}
    div.lang a {
        color: #00aaa6;
        text-decoration: none;
    }

#logged_in_bar {
    top: 24px;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 8px 0px 8px;
    height: 19px;
    background: #009a9d;
    border-radius: 5px;
}
    #logged_in_bar, #logged_in_bar a, #logged_in_bar a:visited {
        color: #FFF;
        text-decoration: none;
    }

/** NAVIGATION BAR **/
#topnav {
    font-family: Helvetica, Arial;
    font-size: 14px;
    font-weight: bold;
    margin-left: 190px;
}
    #topnav ul li {
        padding-left: 8px;
        padding-right: 8px;
        margin-right: 8px;

        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
    }
    #topnav ul li a {
        color: #00aaa6 !important;
    }

/** MAIN SITE **/
h1, h1 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #009a9d;
    font-size: 28px;
    margin-top: 30px;
    text-decoration: none;
}

h2, h2 a {
    font-family: GothamRounded, Helvetica, Arial;
    color: #7bbb58;
    font-size: 18px;
}

h3, h3 a {
    font-family: Helvetica, Arial;
    color: #00aaa6;
    font-size: 14px;
    font-weight: bold;
}

/** HELP **/
#left_column_flip {
    margin-top: 20px;
    width: 550px;
    margin-right: 50px;
}

#right_column_flip {
    text-align: right;
}

.controller_help {
    font-size: 13px;
    line-height: 1.5;
    text-align: justify;
}
    .controller_help a {
        color: #009a9d;
        text-decoration: none;
    }
    .controller_help a:hover {
        text-decoration: underline;
    }

.XXX {  /* TODO stuff */
    color: red;
    font-weight: bold;
    background-color: yellow;
}

/** FRONTPAGE **/
.front #wrapper, .front #content {
    width: 100%;
    padding: 0px;
    margin: 0px;
}

#frontpage-intro {
    width: 950px;
    margin: auto;
    position: relative;
}

#frontpage-lead {
    font-family: GothamRounded, Helvetica, Arial;
    font-size: 24px;
    font-weight: normal;
    text-align: center;
    color: #73c167;
}

#frontpage-left-balloon {
    float: left;
    width: 206px;
    height: 184px;
    background: url(/asktheeu-theme/images/yellow_balloon.gif);
    padding: 10px 20px 20px 50px;
    margin: 36px 8px 60px 0px;
}
    #frontpage-left-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-middle-balloon {
    float: left;
    width: 314px;
    height: 283px;
    background: url(/asktheeu-theme/images/blue_balloon.gif);
    padding: 0px 30px 0px 30px;
}
    #frontpage-middle-balloon h1 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 42px;
        color: #fff;
        text-align: center;
        padding-right: 20px;
        margin-bottom: 5px;
    }
    #frontpage-middle-balloon p {
        margin-left: 15px;
    }
    #frontpage-middle-balloon .frontpage-button-link {
        margin-left: 95px;
    }

#frontpage-right-balloon {
    float: left;
    width: 218px;
    height: 174px;
    background: url(/asktheeu-theme/images/green_balloon.gif);
    padding: 5px 20px 20px 50px;
    margin: 41px 0px 60px 4px;
}
    #frontpage-right-balloon h2 {
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        padding-right: 20px;
        margin-bottom: 5px;
    }

#frontpage-left-balloon p,
#frontpage-right-balloon p,
#frontpage-middle-balloon p {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-top: 0px;
}

#frontpage-intro a {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}
    #frontpage-intro a:hover {
        text-decoration: underline;
    }

.frontpage-button-link {
    height: 24px;
    width: 100px;
    background: url(/asktheeu-theme/images/button_gradient.gif);
    border-radius: 5px;
    text-align: center;
    padding-top: 10px;
}

#frontpage-content {
    background: #EAF5F6;
    border-top: 1px solid #b2dcde;
}

#frontpage-inner-content {
    width: 950px;
    margin: auto;
    position: relative;
    padding-bottom: 20px;
}

#left-column {
    float: left;
    background: #EAF5F6;
    width: 450px;
}

#right-column {
    float: right;
    width: 450px;
}

#frontpage-content p {
    color: #6f6f6e;
    font-size: 13px;
    line-height: 1.5;
}

#frontpage-content p a {
    color: #009a9d;
    font-size: 13px;
    text-decoration: none;
}
    #frontpage-content a:hover {
        text-decoration: underline;
    }

.picture-frame {
    width: 450px;
    height: 270px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
}
    .picture-frame img {
        width: 420px;
        height: 240px;
        margin: 15px;
    }

#follow-us-frame {
    width: 390px;
    height: 60px;
    background: #FFF;
    border-radius: 15px;
    margin-bottom: 30px;
    margin-top: 50px;
    padding: 20px 30px 20px 30px;
}
    #follow-us-frame p {
        float: left;
        font-family: GothamRounded, Helvetica, Arial;
        font-size: 18px;
        color: #009a9d;
    }
    #follow-us-frame span {
        float: left;
        margin-top: 12px;
        margin-left: 20px;
    }

.link-arrow {
    background: no-repeat url(/asktheeu-theme/images/arrow_icon.gif) ;
    padding-top: 6px;
    padding-left: 35px;
    height: 30px;
}
    .link-arrow a {
        font-family: Helvetica, Arial;
        color: #00aaa6;
        font-size: 14px;
        font-weight: bold;
        text-decoration: none;
    }

/** FOOTER **/
#footer {
    height: 100px;
    margin: 0px;
    border-top-width: 1px;
}

#footer-inner {
    width: 950px;
    margin: auto;
    position: relative;
}

#access-info-logo {
    position: absolute;
    left: 0px;
    top: 10px;
}

#footer-links {
    margin-left: 150px;
    margin-top: 10px;
    float: left;

    font-family: GothamRounded, Helvetica, Arial;
    font-size: 18px;
}
    #footer-links ul {
        list-style: none outside none;
    }
    #footer-links ul li {
        float: left;
        margin-right: 40px;
    }
    #footer-links ul a {
        text-decoration: none;
        color: #009a9d;
    }
    #footer-links ul a:hover {
        text-decoration: underline;
    }

#credits {
    float: right;
    margin-top: 30px;
    margin-right: 20px;

    font-family: Helvetica, Arial;
    font-size: 12px;
}
    #credits a {
        text-decoration: none;
        color: #00aaa6;
    }

#creative-commons-logo {
    float: right;
    margin-top: 20px;
}


Fixed a bug preventing upload to work when the MAC address cannot be accessed by UUID.

<% @uuid = UUID.random_create.to_s -%>
<%= form_tag( {:action => 'upload', :upload_id => @uuid},
                    {:multipart => true, :target => 'UploadIFrame', :id => "UploadForm",
                     :onsubmit =>  "javascript:submitUploadForm('UploadForm', " +
                                   "'documents', " +
                                   "'#{escape_javascript @uuid}');"} ) %>
<%= hidden_field 'node', 'parent_id', :value=>@node.parent_zip  %>

<input type="submit" value='<%= _('validate') %>'/>

<%= _('file') %>
<input id="data" name="data" onchange="Zena.get_filename('data','node_v_title'); $('node_v_title').focus(); $('node_v_title').select();" class='file' type="file" />

<%= _('title') %>
<input id='node_v_title' type='text' name='node[v_title]'/>

<%= _('summary') %>
<textarea id='node_v_summary' rows='3' name='node[v_summary]'></textarea>

</form>

<% @uuid = UUID.timestamp_create.to_s -%>
<%= form_tag( {:action => 'upload', :upload_id => @uuid},
                    {:multipart => true, :target => 'UploadIFrame', :id => "UploadForm",
                     :onsubmit =>  "javascript:submitUploadForm('UploadForm', " +
                                   "'documents', " +
                                   "'#{escape_javascript @uuid}');"} ) %>
<%= hidden_field 'node', 'parent_id', :value=>@node.parent_zip  %>

<input type="submit" value='<%= _('validate') %>'/>

<%= _('file') %>
<input id="data" name="data" onchange="Zena.get_filename('data','node_v_title'); $('node_v_title').focus(); $('node_v_title').select();" class='file' type="file" />

<%= _('title') %>
<input id='node_v_title' type='text' name='node[v_title]'/>

<%= _('summary') %>
<textarea id='node_v_summary' rows='3' name='node[v_summary]'></textarea>

</form>


Update Ring Website - fix links in footer.rhtml

 	    Basic

Applications developed in little hours

Introduction

Getting Started

Getting Started - Second Style

Getting Started - Third Style

Variables

Operators

Control Structures

Control Structures - Second Style

Control Structures - Third Style

Getting Input

Functions

Program Structure

Lists

Strings

Date and Time

Check Data Type and Conversion

Mathematical Functions

Files

 	    Intermediate

System Functions

Eval() and Debugging

Demo Programs

ODBC Functions

MYSQL Functions

SQLite Functions

Security and Internet Functions

Object Oriented Programming

Functional Programming (FP)

Reflection and Meta-programming

Stdlib Functions

Stdlib Classes

Declarative Programming using Nested Structures

Natural language programming

Scope Rules for Variables and Attributes

Scope Rules for Functions and Methods

Syntax Flexibility

Distributing Ring Applications

Web Development (CGI Library)

 	    Advanced

Using RingLibCurl

Graphics and 2D Games programming using RingAllegro

Using RingLibSDL

Demo Project - Game Engine for 2D Games

Building Games for Android

Desktop and Mobile development using RingQt

Building RingQt Applications for Mobile

Objects Library for RingQt Application

Low Level Functions

Extension using the C/C++ languages

Embedding Ring Language in C/C++ Programs

Command Line Options

Code Generator for wrapping C/C++ Libraries

RingLibCurl Functions Reference

RingAllegro Functions Reference

RingLibSDL Functions Reference

RingQt Classes Reference

Frequently Asked Questions (FAQ)

Language Reference

              Group
              Resources
              Team


Tweak edit translations again, this time I know it works with Chrome.

<%
  @title = :edit_translations_title.t
  javascript_include('prototype')
  javascript_include('element_extensions')
%>

<%= javascript_tag %(
  var LOCALE = "#{@lang.locale}";
  var LOADED = false;
  var CHANGED = false;
  var CONFIRM_STRING = "#{:edit_translations_will_lose_changes.l}";
  var LOADING_STRING = "#{:edit_translations_loading.l}";
  var SAVING_STRING = "#{:edit_translations_saving.l}";

  window.onbeforeunload = function() {
    if (CHANGED)
      return CONFIRM_STRING;
  }

  function form_changed() {
    CHANGED = true;
    $("save_button").disabled = "";
    $("cancel_button").disabled = "";
  }

  function clear_form() {
    $("form_div").innerHTML = "";
    LOADED = false;
    CHANGED = false;
  }

  function submit_form() {
    CHANGED = false;
    show_whirly(SAVING_STRING);
    $("save_button").disabled = "disabled";
    $("cancel_button").disabled = "disabled";
    $("post_form").submit();
    return(false);
  }

  function show_old_version(id) {
    show_whirly(LOADING_STRING);
    new Ajax.Request("/ajax/old_translation/" + id, {
      asynchronous: true,
      onComplete: function (response) {
        hide_whirly();
        alert(response.responseText);
      }
    });
  }

  function show_tag(locale, tag) {
    LOCALE = locale;
    if (!CHANGED || confirm(CONFIRM_STRING)) {
      show_whirly(LOADING_STRING);
      new Ajax.Request("edit_translations_ajax_get?locale=" + locale + "&tag=" + tag, {
        asynchronous: true,
        onFailure: function (response) {
          hide_whirly();
          alert(response.responseText);
        },
        onSuccess: function(response) {
          hide_whirly();
          $("form_div").innerHTML = response.responseText;
          CHANGED = false;
          LOADED = true;
        }
      });
    }
  }

  function iframe_load() {
    var tag = window.hidden_frame.tag;
    var str = window.hidden_frame.str;
    if (tag != undefined) {
      var span = $("str_" + tag);
      span.innerHTML = str;
      span.className = "translated faint";
    } else if (LOADED) {
      CHANGED = true;
      $("save_button").disabled = "";
      $("cancel_button").disabled = "";
    }
    hide_whirly();
  }

  function show_whirly(text) {
    $("whirly_text").innerHTML = text;
    div = $("whirly");
    Element.center(div);
    div.show();
  }

  function hide_whirly() {
    var div = $("whirly");
    div.hide();
  }
) if @js %>

  <%= image_tag('indicator.gif') %>

<%= :edit_translations_help.t %>

<% for item in @form %>
  <%= case item.class.name
  when /MajorHeader/
    content_tag(:p, h(item.string).gsub('\n','
'), :class => 'major_header')
  when /MinorHeader/
    content_tag(:p, h(item.string).gsub('\n','
'), :class => 'minor_header')
  when /Comment/
    content_tag(:p, h(item.string).gsub('\n','
'), :class => 'comment')
  when /TagField/
    tag = item.tag
    str = preview_string(@strings[tag])
    official_record = @official_records[tag]
    translated_record = @translated_records[tag]
    up_to_date = translated_record && translated_record.modified >= official_record.modified - 1.second
    if not up_to_date and
       official_record and
       official_record.text.match(/\A\[:?\w[^\[\]\'\"]*\]\Z/)
      # Mark as translated if there is nothing to actually translate!
      up_to_date = true
    end
    span_class = up_to_date ? 'translated faint' : 'untranslated bright'
    str = content_tag(:span, h(str), :class => span_class, :id => "str_#{tag}")
    label = content_tag(:span, h(tag) + ':', :class => 'tag')
    label = if @js
      link_to_function(label, "show_tag(LOCALE,'#{tag}')")
    else
      link_to(label, :page => @page, :tag => tag)
    end
    content_tag(:p, label + ' ' + str, :class => 'tag_field')
  else
    raise "Unexpected form item type: #{line.class.name}"
  end %>
<% end %>

<%= if @js
  form_tag({ :action => :edit_translations_ajax_post },
           { :id => :post_form, :target => :hidden_frame })
else
  form_tag(:action => :edit_translations, :page => @page)
end %>

    <%= if @edit_tags.any?
      render(:partial => 'form')
    end %>

</form>
<% if @js %>

<% end %>

<%
  @title = :edit_translations_title.t
  javascript_include('prototype')
  javascript_include('element_extensions')
%>

<%= javascript_tag %(
  var LOCALE = "#{@lang.locale}";
  var LOADED = false;
  var CHANGED = false;
  var CONFIRM_STRING = "#{:edit_translations_will_lose_changes.l}";
  var LOADING_STRING = "#{:edit_translations_loading.l}";
  var SAVING_STRING = "#{:edit_translations_saving.l}";

  window.onbeforeunload = function() {
    if (CHANGED)
      return CONFIRM_STRING;
  }

  function form_changed() {
    CHANGED = true;
    $("save_button").disabled = "";
    $("cancel_button").disabled = "";
  }

  function clear_form() {
    $("form_div").innerHTML = "";
    LOADED = false;
    CHANGED = false;
  }

  function submit_form() {
    CHANGED = false;
    show_whirly(SAVING_STRING);
    $("save_button").disabled = "disabled";
    $("cancel_button").disabled = "disabled";
    $("post_form").onsubmit();
    return(false);
  }

  function show_old_version(id) {
    show_whirly(LOADING_STRING);
    new Ajax.Request("/ajax/old_translation/" + id, {
      asynchronous: true,
      onComplete: function (response) {
        hide_whirly();
        alert(response.responseText);
      }
    });
  }

  function show_tag(locale, tag) {
    LOCALE = locale;
    if (!CHANGED || confirm(CONFIRM_STRING)) {
      show_whirly(LOADING_STRING);
      new Ajax.Request("edit_translations_ajax_get?locale=" + locale + "&tag=" + tag, {
        asynchronous: true,
        onFailure: function (response) {
          hide_whirly();
          alert(response.responseText);
        },
        onSuccess: function(response) {
          hide_whirly();
          $("form_div").innerHTML = response.responseText;
          CHANGED = false;
          LOADED = true;
        }
      });
    }
  }

  function iframe_load() {
    var tag = window.hidden_frame.tag;
    var str = window.hidden_frame.str;
    if (tag != undefined) {
      var span = $("str_" + tag);
      span.innerHTML = str;
      span.className = "translated faint";
    } else if (LOADED) {
      CHANGED = true;
      $("save_button").disabled = "";
      $("cancel_button").disabled = "";
    }
    hide_whirly();
  }

  function show_whirly(text) {
    $("whirly_text").innerHTML = text;
    div = $("whirly");
    Element.center(div);
    div.show();
  }

  function hide_whirly() {
    var div = $("whirly");
    div.hide();
  }
) if @js %>

  <%= image_tag('indicator.gif') %>

<%= :edit_translations_help.t %>

<% for item in @form %>
  <%= case item.class.name
  when /MajorHeader/
    content_tag(:p, h(item.string).gsub('\n','
'), :class => 'major_header')
  when /MinorHeader/
    content_tag(:p, h(item.string).gsub('\n','
'), :class => 'minor_header')
  when /Comment/
    content_tag(:p, h(item.string).gsub('\n','
'), :class => 'comment')
  when /TagField/
    tag = item.tag
    str = preview_string(@strings[tag])
    official_record = @official_records[tag]
    translated_record = @translated_records[tag]
    up_to_date = translated_record && translated_record.modified >= official_record.modified - 1.second
    if not up_to_date and
       official_record and
       official_record.text.match(/\A\[:?\w[^\[\]\'\"]*\]\Z/)
      # Mark as translated if there is nothing to actually translate!
      up_to_date = true
    end
    span_class = up_to_date ? 'translated faint' : 'untranslated bright'
    str = content_tag(:span, h(str), :class => span_class, :id => "str_#{tag}")
    label = content_tag(:span, h(tag) + ':', :class => 'tag')
    label = if @js
      link_to_function(label, "show_tag(LOCALE,'#{tag}')")
    else
      link_to(label, :page => @page, :tag => tag)
    end
    content_tag(:p, label + ' ' + str, :class => 'tag_field')
  else
    raise "Unexpected form item type: #{line.class.name}"
  end %>
<% end %>

<%= if @js
  form_tag({ :action => :edit_translations_ajax_post },
           { :id => :post_form, :target => :hidden_frame })
else
  form_tag(:action => :edit_translations, :page => @page)
end %>

    <%= if @edit_tags.any?
      render(:partial => 'form')
    end %>

</form>
<% if @js %>

<% end %>


indentation fixes

indentation fixes

<?xml version="1.0" encoding="iso-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="author" content="Simon Huerlimann <simon.huerlimann@cyt.ch>" />
    <meta name="keywords" content="finance CyT Agrabah" />
    <meta name="description" content="Accounting for Agrabah GmbH" />
    <%= stylesheet_link_tag 'noprobs' %>
    <%= javascript_include_tag :defaults %>

    <title>Accounting for Agrabah GmbH - <%= controller.action_name %></title>

          <%= image_tag 'logo-left-small' %>
          <%= image_tag 'logo-right-small' %>

<%= link_to "Clients", :controller => "clients"%>

<%= link_to "Balance Sheet", :controller => "balance"%>

<%= link_to "Profit Sheet", :controller => "profit"%>

<%= link_to "Accounts", :controller => "accounts"%>

<%= link_to "Bookings", :controller => "bookings"%>

            <%= @content_for_layout %>


closing %> on newline for easy commenting out; note a notify object is not used for this one since the db is cloned from production daily

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

<% if RAILS_ENV == "development" %>
  <% flash[:error] ||= "You are on our development site -- you should NOT be filling in your app or reference here.  Remove the 'dev.' from your url, and email spt@campusforchrist.org with how you got here"
  %>

<% end %>

  <%
=begin
  flash[:error] = %|
  There will be a short, approximately 10-20 minutes, scheduled outage between 12pm-2pm PST

  -CIM team, Wed May 7
  |
=end
  %>

    <title>Project Application Tool</title>
    <%= stylesheet_link_tag 'main2' %>
    <%= render :partial => "externs/sortable_tables" %>
    <%= javascript_include_tag "prototype", "effects" %>
    <%= render :partial => "externs/load_extern" %>

    <% if RAILS_ENV == 'development' && @debug -%>

debug: <%= @debug -%>

    <% end -%>

      Loading <%=image_tag('spinner.gif')%>

        <% if @user %>

user:
            <%= @user.viewer.name %> -
            <%= link_to 'logout', :action => :logout, :controller => :security %>

        <% end %>

        <% if @eg %>

group:
            <%= @eg.to_s_with_eg_path %>
            <%= link_to 'change', scope_event_groups_url %>

        <% end %>

Project Application Tool

    <% if @user %>

          <%= new_item "Your Apps", "your_apps", :list %>
          <% if @show_your_project %>
            <%= new_item "Your Projects", "main", :your_projects %>
          <% end %>
          <% unless @user.is_student? %>
            <%= new_item "App Processing", "main", :your_applications %>
	    <% if @eg && @eg.has_your_campuses %>
              <%= new_item "Your Campuses", "main", :your_campuses %>
	    <% end %>
            <% if @user.is_projects_coordinator? %>
              <%= new_item "Tools", "tools", :index %>
              <%= new_item "Manage Forms", "forms" %>
              <%= new_item "Manage Groups", "event_groups" %>
            <% end %>
            <%= new_item "Manage Projects", "manage_projects", :list %>
            <%= new_item "Reports", "reports", :index %>
          <% end %>
          <%= new_item "Profiles", "profiles", :index%>

    <% end %>

    <% flash.each do |key, msg| -%>
      <% full_msg = h(msg) %>
      <%= content_tag :div, full_msg, :id => "flash_#{key}", :class => 'error flash' %>
    <% end -%>
    <% flash.discard -%>

    <% @notifications.each do |n| -%>
      <% full_msg = h(n.message) + "
"
         unless n.permanent || @user.nil?
           full_msg += link_to_remote('Hide',
            :url => { :controller => 'notification_acknowledgments',
                      :action => 'create', :notification_id => n.id },
            :success => "$(\"notification_#{n.id}\").fade()"
           )
         end
        %>
      <%= content_tag :div, full_msg, :id => "notification_#{n.id}", :class => 'error flash' %>
    <% end -%>

     <% if @user && !@user.is_student? && !@eg.nil? %>

        <%= form_remote_tag :url => { :controller => 'main', :action => :find_people },	:before => "Element.show('loading');", :complete  => "Element.hide('loading');" %>
          Search People:
          <%= text_field 'viewer', 'name', :size => 20%>
          <%= submit_tag "Search" %>
        </form>

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

    <% if file_exists? controller.controller_name + "/_menu" %>
      <%= render :partial => controller.controller_name + "/menu" %>
    <% elsif @submenu && file_exists?(@submenu + "/_menu") %>
      <%= render :partial => @submenu + "/menu" %>
    <% end %>

    <% submenu_items_html = yield :submenu %>
    <% if submenu_items_html && !@eg.nil? %>

          <%= submenu_items_html %>

    <% end %>

        <% if @form && params[:controller] != 'forms' %>
          <%= render "layouts/form_#{@form}.rhtml" %>
        <% else %>
          <%= yield %>
        <% end %>

    <% if @eg || @show_contact_emails_override %>

        Non-Technical Inquiries:

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - danielled@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

			Technical Inquiries:helpdesk@c4c.ca

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>


- Javascript for form for forms now works as it does in ProjectPier

git-svn-id: c56bb3f9cb1c9468aec8fd62c717d587012de106@127 1e8d30c7-b1cd-4b0d-952e-12ddc4cacc65

<%= error_messages_for :form %>

    <%= "Name" %>: *
    <%= text_field 'form', 'name', :id => 'projectFormName', :class => 'long' %>

    <%= "Description" %>:
    <%= text_area 'form', 'description', :id => 'projectFormDescription', :class => 'short', :rows => 10, :cols => 40 %>

    <%= "Success message" %>:
    <%= text_area 'form', 'success_message', :id => 'projectFormSuccessMessage', :class => 'short', :rows => 10, :cols => 40 %>

    <fieldset>
      <legend><%= "Action" %></legend>

          <%= radio_button 'form', 'action', 'add_comment', {:id => 'projectFormActionAddComment', :class => 'checkbox', :onclick => 'form_form_update_action()'} %> <%= "Add comment" %>
          <%= "to" %>: <%= select 'form_objects', 'add_comment_object', ProjectMessage.select_list(@active_project), {}, {:id => 'projectFormActionSelectMessage', :class => 'select_message'} %>

          <%= radio_button 'form', 'action', 'add_task', {:id => 'projectFormActionAddTask', :class => 'checkbox', :onclick => 'form_form_update_action()'} %> <%= "Add task" %>
          <%= "to" %>: <%= select 'form_objects', 'add_task_object', ProjectTaskList.select_list(@active_project), {}, {:id => 'projectFormActionSelectTaskList', :class => 'select_task_list'} %>

    </fieldset>

    <fieldset>
      <legend><%= "Options" %></legend>

          <%= "Enabled" %>:
          <%= check_box 'form', 'is_enabled', :id => 'projectFormIsEnabled', :class => 'checkbox' %>

          <%= "Visible" %>:
          <%= check_box 'form', 'is_visible', :id => 'projectFormIsVisible', :class => 'checkbox' %>

    </fieldset>

<%= error_messages_for :form %>

    <%= "Name" %>: *
    <%= text_field 'form', 'name', :id => 'projectFormName', :class => 'long' %>

    <%= "Description" %>:
    <%= text_area 'form', 'description', :id => 'projectFormDescription', :class => 'short', :rows => 10, :cols => 40 %>

    <%= "Success message" %>:
    <%= text_area 'form', 'success_message', :id => 'projectFormSuccessMessage', :class => 'short', :rows => 10, :cols => 40 %>

    <fieldset>
      <legend><%= "Action" %></legend>

          <%= radio_button 'form', 'action', 'add_comment', {:id => 'projectFormActionAddComment', :class => 'checkbox', :onclick => 'App.modules.addProjectForm.formActionClick()'} %> <%= "Add comment" %>
          <%= "to" %>: <%= select 'form_objects', 'add_comment_object', ProjectMessage.select_list(@active_project), {}, {:id => 'projectFormActionSelectMessage', :class => 'select_message'} %>

          <%= radio_button 'form', 'action', 'add_task', {:id => 'projectFormActionAddTask', :class => 'checkbox', :onclick => 'App.modules.addProjectForm.formActionClick()'} %> <%= "Add task" %>
          <%= "to" %>: <%= select 'form_objects', 'add_task_object', ProjectTaskList.select_list(@active_project), {}, {:id => 'projectFormActionSelectTaskList', :class => 'select_task_list'} %>

    </fieldset>

    <fieldset>
      <legend><%= "Options" %></legend>

          <%= "Enabled" %>:
          <%= check_box 'form', 'is_enabled', :id => 'projectFormIsEnabled', :class => 'checkbox' %>

          <%= "Visible" %>:
          <%= check_box 'form', 'is_visible', :id => 'projectFormIsVisible', :class => 'checkbox' %>

    </fieldset>


using locate action for posts to make the cancel action redirect to locate the post in the thread

git-svn-id: 295275ead0c997ff8920a9abe88dec0903829be9@438 9c008b19-a030-0410-9975-d76d301b4276

<%= error_messages_for :post %>
<% form_for(:post, :url => post_path(@post), :html => { :method => :put }) do |f| %>

    Edit Post

<%= f.text_area :body, :rows => '10', :style => 'width:66%;' %>

      <%= submit_tag "Save Changes", :disable_with => "Save Changes" %> or
      <%= link_to('Upload a New File', new_upload_path, :popup => ['height=530,width=820,status=1']) %> or
      <% if @topic.posts_count > 1 %>
        <%= link_to 'Delete', post_path, :confirm => 'Are you sure?', :method => :delete %> or
      <% end %>
      <%= link_to 'Cancel', locate_post_path(@post) %>

<% end %>

<%= javascript_tag "$('post_body').focus();" %>

<%= error_messages_for :post %>
<% form_for(:post, :url => post_path(@post), :html => { :method => :put }) do |f| %>

    Edit Post

<%= f.text_area :body, :rows => '10', :style => 'width:66%;' %>

      <%= submit_tag "Save Changes", :disable_with => "Save Changes" %> or
      <%= link_to('Upload a New File', new_upload_path, :popup => ['height=530,width=820,status=1']) %> or
      <% if @topic.posts_count > 1 %>
        <%= link_to 'Delete', post_path, :confirm => 'Are you sure?', :method => :delete %> or
      <% end %>
      <%= link_to 'Cancel', topic_path(@topic) %>

<% end %>

<%= javascript_tag "$('post_body').focus();" %>


Fix id passing

Fix id passing

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

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

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

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

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

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

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

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

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

    <%= plugins_article_toolbar_actions %>

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

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

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

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

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

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

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

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

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

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

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

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

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

    <%= plugins_article_toolbar_actions %>

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

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

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

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


reformat info boxes with different font

reformat info boxes with different font

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


pages: less intrusive

pages: less intrusive

<%
	if page.news_page?
		subpages = []
	else
		subpages = page.pages( :show_drafts => true, :show_hidden => true, :show_all_languages => true )
	end
	page_classes = ['page']
	page_classes << 'page_without_language' unless page.name?
-%>

	<div class="<%= page_classes.join(' ') %>" id="pagelisting_<%= page.id %>">
		<% if page.published? %>
			<%= link_to(page_name(page), edit_admin_page_url(@language, page), :class => 'page_name') %>
		<% else %>

				<%= link_to(page_name(page), edit_admin_page_url(@language, page), :class => 'page_name') %>
				(<%= page.status_label %><% if page.draft? && page.author %> by <%= page.author.realname %><% end %>)

		<% end %>
		<%= image_tag( "feed-icon-14x14.png", :size=>"10x10", :plugin => :pages ) if page.feed_enabled? %>

			—
			<%= link_to "Edit", edit_admin_page_url( @language, page ) %> /
			<%= link_to "Create subpage", new_admin_page_url( :language => @language, :parent => page ) %>
			<% if page.reorderable? %>
				/ <%= link_to "Move Up", { :action => :reorder, :id => page, :direction => 'up' } %> / <%= link_to "Move Down", { :action => :reorder, :id => page, :direction => 'down' } %>
			<% end %>
			—
			last updated <%= time_ago_in_words page.updated_at %> ago

	<% if page.news_page? %>

News items

	<% elsif subpages.length > 0 %>
		<% if subpages.length > 13 %>

<% subpages[0...10].each do |subpage| %>
				<%= render :partial => "pagelisting", :locals => { :page => subpage } %>
			<% end %>

				<%= link_to_function "See all #{subpages.length - 10} pages", "alert('We are working on it!');", :class => "morepageslink" %>

		<% else %>

<% subpages.each do |subpage| %>
				<%= render :partial => "pagelisting", :locals => { :page => subpage } %>
			<% end %>

		<% end %>
	<% end %>

<%
	if page.news_page?
		subpages = []
	else
		subpages = page.pages( :show_drafts => true, :show_hidden => true, :show_all_languages => true )
	end
	page_classes = ['page']
	page_classes << 'page_without_language' unless page.name?
-%>

	<div class="<%= page_classes.join(' ') %>" id="pagelisting_<%= page.id %>">
		<% if page.published? %>
			<%= link_to(page_name(page), edit_admin_page_url(@language, page), :class => 'page_name') %>
		<% else %>

				<%= link_to(page_name(page), edit_admin_page_url(@language, page), :class => 'page_name') %>
				(<%= page.status_label %><% if page.draft? && page.author %> by <%= page.author.realname %><% end %>)

		<% end %>
		<%= image_tag( "feed-icon-14x14.png", :size=>"10x10", :plugin => :pages ) if page.feed_enabled? %>

			—
			<%= link_to "Edit", edit_admin_page_url( @language, page ) %> /
			<%= link_to "Create subpage", new_admin_page_url( :language => @language, :parent => page ) %>
			<% if page.reorderable? %>
				/ <%= link_to "Move Up", { :action => :reorder, :id => page, :direction => 'up' } %> / <%= link_to "Move Down", { :action => :reorder, :id => page, :direction => 'down' } %>
			<% end %>
			—
			last updated <%= time_ago_in_words page.updated_at %> ago

	<% if page.news_page? %>

News items

	<% elsif subpages.length > 0 %>
		<% if subpages.length > 13 %>

<% subpages[0...10].each do |subpage| %>
				<%= render :partial => "pagelisting", :locals => { :page => subpage } %>
			<% end %>

				There are <%= subpages.length - 10 %> more pages, we are working on a way to show them
				without delaying the system.

		<% else %>

<% subpages.each do |subpage| %>
				<%= render :partial => "pagelisting", :locals => { :page => subpage } %>
			<% end %>

		<% end %>
	<% end %>


Should have been part of [15755]: Cursed vc-dir interface

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

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

<%= t 'site.index.js_1' %>

<%= t 'site.index.js_2' %>

<%= t 'site.index.js_3' %>

<%= t 'site.index.permalink' %>

      <%=
        I18n.t('site.index.license.notice',
          :license_name => ('' + t('site.index.license.license_name') + ''),
          :project_name => ('' + t('site.index.license.project_name') + ''))
        %>

<%
if params['mlon'] and params['mlat']
	marker = true
	mlon = h(params['mlon'])
	mlat = h(params['mlat'])
end

if params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat']
	bbox = true
	minlon = h(params['minlon'])
	minlat = h(params['minlat'])
	maxlon = h(params['maxlon'])
	maxlat = h(params['maxlat'])
	box = true if params['box']=="yes"
end

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

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

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

elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil?
	lon =  @user.home_lon
	lat =  @user.home_lat
	zoom = '10'
else
	session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location]

	if session[:location]
		bbox = true
		minlon = session[:location][:minlon]
		minlat = session[:location][:minlat]
		maxlon = session[:location][:maxlon]
		maxlat = session[:location][:maxlat]
	else
		lon =  '-0.1'
		lat =  '51.5'
		zoom =  h(params['zoom'] || '5')
	end
	layers = h(params['layers'])
end
%>

<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>

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

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

<%= t 'site.index.js_1' %>

<%= t 'site.index.js_2' %>

<%= t 'site.index.js_3' %>

<%= t 'site.index.permalink' %>

      <%=
        I18n.t('site.index.license.notice',
          :license_name => ('' + t('site.index.license.license_name') + ''),
          :project_name => ('' + t('site.index.license.project_name') + ''))
        %>

<%
if params['mlon'] and params['mlat']
	marker = true
	mlon = h(params['mlon'])
	mlat = h(params['mlat'])
end

if params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat']
	bbox = true
	minlon = h(params['minlon'])
	minlat = h(params['minlat'])
	maxlon = h(params['maxlon'])
	maxlat = h(params['maxlat'])
	box = true if params['box']=="yes"
end

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

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

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

elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil?
	lon =  @user.home_lon
	lat =  @user.home_lat
	zoom = '10'
else
	session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location]

	if session[:location]
		bbox = true
		minlon = session[:location][:minlon]
		minlat = session[:location][:minlat]
		maxlon = session[:location][:maxlon]
		maxlat = session[:location][:maxlat]
	else
		lon =  '-0.1'
		lat =  '51.5'
		zoom =  h(params['zoom'] || '5')
	end
	layers = h(params['layers'])
end
%>

<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>


Set the lat and long on the view and edit tabs when the map is loaded.

  <% form_tag :controller => 'geocoder', :action => 'search' do %>
  <%= text_field 'query', 'postcode' %>
  <%= text_field 'query', 'place_name'%>
  <%= submit_tag 'Search' %>
  <% end %>

    Geolocation provided by npemap.org.uk,
    geocoder.us, geocoder.ca and geonames.org

    Enter a postcode or zip code, eg: SW15 6JH, 95472

    Enter a place-name, eg:Essen

<% if params['mlon'] and params['mlat'] %>
<% marker = true %>
<% mlon = params['mlon'] %>
<% mlat = params['mlat'] %>
<% lon =  params['mlon'] %>
<% lat =  params['mlat']  %>
<% zoom =  params['zoom'] || '12' %>

<% elsif @user and params['lon'].nil? and params['lat'].nil? %>
<% lon =  @user.home_lon %>
<% lat =  @user.home_lat %>
<% zoom = '10' %>
<%else%>
<% lon =  params['lon'] || '-0.1' %>
<% lat =  params['lat'] || '51.5' %>
<% zoom =  params['zoom'] || '4' %>
<% end %>