Remove query strings from image urls in html-quoted json

<% # SPROUTCORE DEFAULT INDEX TEMPLATE
   # This template provide provides a basic wrapper for a SproutCore client.
   # Most of the time, it will be sufficient for your own needs.  However, if
   # you need to create your own template, you can do so by copying this file
   # into your client, naming it 'index.rhtml' and then adding the options
   # :layout => 'lib/index' to your Buildfile.
   #
   # See the comments in this file for more information on what you can
   # change.
-%>
<!DOCTYPE html>
<html<% unless @content_for_html5_manifest.blank? %> manifest="app.manifest"<% end %>>

    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8<%= config.chrome_frame ? ',chrome=1' : '' %>" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="<%= config.status_bar_style || 'default' %>" />
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="apple-touch-icon<%= '-precomposed' if config.precomposed_icon %>" href="<%= sc_static(config.icon || 'sproutcore-logo.png') %>" />
	  <link rel="apple-touch-startup-image" media="screen and (orientation:portrait)" href="<%= sc_static(config.startup_image_portrait || 'sproutcore-startup-portrait.png') %>" />
	  <link rel="apple-touch-startup-image" media="screen and (orientation:landscape)" href="<%= sc_static(config.startup_image_landscape || 'sproutcore-startup-landscape.png') %>" />
	  <link rel="shortcut icon" href="<%= sc_static(config.favicon || 'favicon.ico') %>" type="image/x-icon" />

<% # Set the 'title' in your config to alter this setting %>
    <title><%= title %></title>
<% #
   # You may choose to load one or more bootstrap resources.  These are
   # JS targets that you would like to load at the top of the page.  Specify
   # these in your Buildfile with the 'bootstrap' config.
-%>
  <%= bootstrap %>

<% #
   # This line should appear in your head area to include the stylesheets
   # generated by your client.  If you need to include your own
   # stylesheets, you don't need to change it here.  Instead use the
   # required option in your config.
-%>
   <%= stylesheets_for_client %>
   <%= @content_for_page_styles %>

<% # The theme CSS class is added automatically based on your chosen theme.
   # If you need to specify a custom theme name, use CONFIG.theme_name
-%>
  <body class="<%= [theme_name(:default => 'sc-theme'), 'focus'].compact.join(' ') %>">
<% # This section is used to setup additional optional class names on the
   # body content based on JS-selected conditions.  Use this to make sure you
   # show the proper CSS as soon as the page appears.
-%>
<%= inline_javascript('sproutcore/bootstrap:setup_body_class_names') %>

<% #
   # This is where you root body element will appear.  To cause your
   # content to appear here, just declare content_for('body') in one of
   # your partials.
-%>
<%= @content_for_body %>
<% #
   # This is where your loading screen will appear.  To add a loading screen
   # just declare content_for('loading') in one of your partials. If you use
   # sc-gen to generate your app, it will create a file called loading.rhtml
   # under english.lproj. You can insert the desired content there.
-%>
<% unless @content_for_loading.blank? %>

<%= @content_for_loading %>

<% end -%>

  {
    "MySystem.Link": {
      "link1": {
        "guid": "link1",
        "text": "First link",
        "startNode": "1",
        "startTerminal": "a",
        "endNode": "2",
        "endTerminal": "b",
        "color": "#FF0000"
      },
      "link2": {
        "guid": "link2",
        "text": "Second link",
        "startNode": "1",
        "startTerminal": "a",
        "endNode": "3",
        "endTerminal": "b",
        "color": "#FF0000"
      }
    },
    "MySystem.Node": {
      "1": {
        "guid": "1",
        "image": "/static/my_system/en/current/resources/clay_red_tn.png",
        "title": "A Node",
        "transformer": false,
        "inLinks": [],
        "outLinks": [
          "link1",
          "link2"
        ],
        "position": {
          "x": 160,
          "y": 160
        },
        "transformations": [
          "trans1"
        ]
      },
      "2": {
        "guid": "2",
        "image": "/static/my_system/en/current/resources/hand_tn.png",
        "title": "B Node",
        "transformer": false,
        "inLinks": [
          "link1"
        ],
        "outLinks": [],
        "position": {
          "x": 310,
          "y": 10
        }
      },
      "3": {
        "guid": "3",
        "image": "/static/my_system/en/current/resources/lightbulb_tn.png",
        "title": "Third Node",
        "transformer": false,
        "inLinks": [
          "link2"
        ],
        "outLinks": [],
        "position": {
          "x": 10,
          "y": 10
        }
      }
    },
    "MySystem.Story": {
      "1": {
        "guid": 1,
        "storyHtml": "<p>Make a system diagram to help explain how <i>both</i> the sun and people's actions affect the Earth's climate.</p><ul><li>Where does energy come from?</li><li>How does energy move?</li><li>Where does energy go?</li><li>How does energy change?</li></ul>"
      }
    },
    "MySystem.StorySentence": {
      "ss1": {
        "guid": "ss1",
        "order": 1,
        "bodyText": "First..."
      },
      "ss2": {
        "guid": "ss2",
        "order": 2,
        "bodyText": "Then..."
      },
      "ss3": {
        "guid": "ss3",
        "order": 3,
        "bodyText": "Finally..."
      }
    }
  }

<% #
   # This is where the resources you declare will appear.  By default anything
   # you add to partials will be added to this section unless you specify
   # otherwise.  Note that resources are initially hidden so you can pull them
   # apart as needed on page load.
-%>
<% unless @content_for_resources.blank? %>

      <%= @content_for_resources -%>

<% end -%>
<% #
   # This line should appear at the bottom of your page to include your
   # generated JavaScript and any libraries you reference.  If you need
   # to include other javascripts, add them to the :requires option of
   # your client in routes.rb instead of changing it here.
-%>
<%= javascripts_for_client %>
<% unless @content_for_page_javascript.blank? %>
<%= @content_for_page_javascript %>
<% end -%>
<% #
   # If you use old-style view helpers in your page, this method must be
   # called to actually add the page views to your HTML.  Normally this will
   # not generate any content.
-%>
<% #render_page_views -%>
<% # Older SproutCore applications need SC.didLoad to be called after onload.
   # This is no longer required by SproutCore so it is off by default.  To
   # reenable set use_window_onload = true in yur config.
-%>
<% if config.use_window_onload %>

<% end -%>
<% #
   # The final content section can be used to add any last minute setup you
   # need to do before the page ends.  This is required for loading unit
   # tests among other things.
-%>
<%= @content_for_final -%>
<%
  #disable main if the application is loaded in design mode
%>
<%= @content_for_designer -%>

<% # SPROUTCORE DEFAULT INDEX TEMPLATE
   # This template provide provides a basic wrapper for a SproutCore client.
   # Most of the time, it will be sufficient for your own needs.  However, if
   # you need to create your own template, you can do so by copying this file
   # into your client, naming it 'index.rhtml' and then adding the options
   # :layout => 'lib/index' to your Buildfile.
   #
   # See the comments in this file for more information on what you can
   # change.
-%>
<!DOCTYPE html>
<html<% unless @content_for_html5_manifest.blank? %> manifest="app.manifest"<% end %>>

    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8<%= config.chrome_frame ? ',chrome=1' : '' %>" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="<%= config.status_bar_style || 'default' %>" />
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="apple-touch-icon<%= '-precomposed' if config.precomposed_icon %>" href="<%= sc_static(config.icon || 'sproutcore-logo.png') %>" />
	  <link rel="apple-touch-startup-image" media="screen and (orientation:portrait)" href="<%= sc_static(config.startup_image_portrait || 'sproutcore-startup-portrait.png') %>" />
	  <link rel="apple-touch-startup-image" media="screen and (orientation:landscape)" href="<%= sc_static(config.startup_image_landscape || 'sproutcore-startup-landscape.png') %>" />
	  <link rel="shortcut icon" href="<%= sc_static(config.favicon || 'favicon.ico') %>" type="image/x-icon" />

<% # Set the 'title' in your config to alter this setting %>
    <title><%= title %></title>
<% #
   # You may choose to load one or more bootstrap resources.  These are
   # JS targets that you would like to load at the top of the page.  Specify
   # these in your Buildfile with the 'bootstrap' config.
-%>
  <%= bootstrap %>

<% #
   # This line should appear in your head area to include the stylesheets
   # generated by your client.  If you need to include your own
   # stylesheets, you don't need to change it here.  Instead use the
   # required option in your config.
-%>
   <%= stylesheets_for_client %>
   <%= @content_for_page_styles %>

<% # The theme CSS class is added automatically based on your chosen theme.
   # If you need to specify a custom theme name, use CONFIG.theme_name
-%>
  <body class="<%= [theme_name(:default => 'sc-theme'), 'focus'].compact.join(' ') %>">
<% # This section is used to setup additional optional class names on the
   # body content based on JS-selected conditions.  Use this to make sure you
   # show the proper CSS as soon as the page appears.
-%>
<%= inline_javascript('sproutcore/bootstrap:setup_body_class_names') %>

<% #
   # This is where you root body element will appear.  To cause your
   # content to appear here, just declare content_for('body') in one of
   # your partials.
-%>
<%= @content_for_body %>
<% #
   # This is where your loading screen will appear.  To add a loading screen
   # just declare content_for('loading') in one of your partials. If you use
   # sc-gen to generate your app, it will create a file called loading.rhtml
   # under english.lproj. You can insert the desired content there.
-%>
<% unless @content_for_loading.blank? %>

<%= @content_for_loading %>

<% end -%>

  {
    "MySystem.Link": {
      "link1": {
        "guid": "link1",
        "text": "First link",
        "startNode": "1",
        "startTerminal": "a",
        "endNode": "2",
        "endTerminal": "b",
        "color": "#FF0000"
      },
      "link2": {
        "guid": "link2",
        "text": "Second link",
        "startNode": "1",
        "startTerminal": "a",
        "endNode": "3",
        "endTerminal": "b",
        "color": "#FF0000"
      }
    },
    "MySystem.Node": {
      "1": {
        "guid": "1",
        "image": "/static/my_system/en/current/resources/clay_red_tn.png?1302703621",
        "title": "A Node",
        "transformer": false,
        "inLinks": [],
        "outLinks": [
          "link1",
          "link2"
        ],
        "position": {
          "x": 160,
          "y": 160
        },
        "transformations": [
          "trans1"
        ]
      },
      "2": {
        "guid": "2",
        "image": "/static/my_system/en/current/resources/hand_tn.png?1302703621",
        "title": "B Node",
        "transformer": false,
        "inLinks": [
          "link1"
        ],
        "outLinks": [],
        "position": {
          "x": 310,
          "y": 10
        }
      },
      "3": {
        "guid": "3",
        "image": "/static/my_system/en/current/resources/lightbulb_tn.png?1302703621",
        "title": "Third Node",
        "transformer": false,
        "inLinks": [
          "link2"
        ],
        "outLinks": [],
        "position": {
          "x": 10,
          "y": 10
        }
      }
    },
    "MySystem.Story": {
      "1": {
        "guid": 1,
        "storyHtml": "<p>Make a system diagram to help explain how <i>both</i> the sun and people's actions affect the Earth's climate.</p><ul><li>Where does energy come from?</li><li>How does energy move?</li><li>Where does energy go?</li><li>How does energy change?</li></ul>"
      }
    },
    "MySystem.StorySentence": {
      "ss1": {
        "guid": "ss1",
        "order": 1,
        "bodyText": "First..."
      },
      "ss2": {
        "guid": "ss2",
        "order": 2,
        "bodyText": "Then..."
      },
      "ss3": {
        "guid": "ss3",
        "order": 3,
        "bodyText": "Finally..."
      }
    }
  }

<% #
   # This is where the resources you declare will appear.  By default anything
   # you add to partials will be added to this section unless you specify
   # otherwise.  Note that resources are initially hidden so you can pull them
   # apart as needed on page load.
-%>
<% unless @content_for_resources.blank? %>

      <%= @content_for_resources -%>

<% end -%>
<% #
   # This line should appear at the bottom of your page to include your
   # generated JavaScript and any libraries you reference.  If you need
   # to include other javascripts, add them to the :requires option of
   # your client in routes.rb instead of changing it here.
-%>
<%= javascripts_for_client %>
<% unless @content_for_page_javascript.blank? %>
<%= @content_for_page_javascript %>
<% end -%>
<% #
   # If you use old-style view helpers in your page, this method must be
   # called to actually add the page views to your HTML.  Normally this will
   # not generate any content.
-%>
<% #render_page_views -%>
<% # Older SproutCore applications need SC.didLoad to be called after onload.
   # This is no longer required by SproutCore so it is off by default.  To
   # reenable set use_window_onload = true in yur config.
-%>
<% if config.use_window_onload %>

<% end -%>
<% #
   # The final content section can be used to add any last minute setup you
   # need to do before the page ends.  This is required for loading unit
   # tests among other things.
-%>
<%= @content_for_final -%>
<%
  #disable main if the application is loaded in design mode
%>
<%= @content_for_designer -%>


ActionItem25: clearing the area after each item

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

  <%= _('Tagged with "%s"') % content_tag('code', @tag) %>

<% button_bar do %>
  <%= button('back', _('Back to tag cloud'), :action => 'tags') %>
<% end %>

<% @tagged.each do |hit| %>
  <%= render :partial => partial_for_hit(hit.class), :locals => { :hit => hit } %>

<% end %>


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

<% content_for :sidebar do %>
  <%= render :partial => 'photo' %>
  <%= render :partial => 'families/photo' %>

  <% if (people = @person.family.people).length > 1 %>

Family

      <% people.each do |person| %>

            <a href="<%= url_for :action => 'view', :id => person %>">
              <%= render :partial => 'thumbnail', :locals => {:person => person} %>

          <%= link_to person.name, :action => 'view', :id => person %>

      <% end %>

  <% end %>

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

<% end %>

<% if @person.mapable? and @person.share_address_with @logged_in %>

this is only an approximation

<% end %>

<% if @person == @logged_in and (@person.verses.empty? and @person.recipes.empty? and @person.pictures.empty?) %>

    Hey! Did you know you can <%= link_to 'share', :controller => 'shares' %>
    your favorite pictures, Bible verses, and even recipes on <%= SITE_TITLE %>?

<% end %>

  <%=h @person.name %>
  <% if @logged_in.can_edit? @person %>
    <%= link_to 'edit', {:action => 'edit', :id => @person}, :style => 'font-size:10pt;color:#999;text-decoration:none;' %>
  <% end %>

<% content_for :subnav do %>
  <% if @logged_in.can_edit? @person %>

<%= link_to 'Edit Profile', :action => 'edit', :id => @person %>

<%= link_to 'Privacy', :action => 'privacy' %>

  <% elsif @logged_in.contacts.find_all_by_person_id(@person.id).any? %>

<%= link_to 'Remove from Contacts', :action => 'remove_contact', :id => @person %>

  <% else %>

<%= link_to 'Add to Contacts', :action => 'add_contact', :id => @person %>

  <% end %>
  <% if @logged_in != @person and @person.email.to_s.any? %>

<%= link_to image_tag('message.gif', :alt => 'Send a Private Message', :class => 'no-border', :style => 'vertical-align:middle;') + ' Private Message', :controller => 'messages', :action => 'send_email', :id => @person %>

  <% end %>
<% end %>

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

<% if (count = @person.pictures.count) > 0 %>

Pictures

    <% @person.pictures.find(:all, :order => 'rand()', :limit => 5).each do |picture| %>
      <%= link_to image_tag(url_for(:controller => 'pictures', :action => 'photo', :id => "#{picture.id}.small.jpg"), :alt => 'click to enlarge'),
        {:controller => 'pictures', :action => 'view', :id => picture}, :title => 'click to enlarge' %>
    <% end %>
    <%= link_to 'More...', :action => 'pictures', :id => @person %>

<% end %>

<% if @person.testimony.to_s.any? %>

Testimony

<%=h @person.testimony %>

<% end %>

<% if @person.verses.any? %>

Verses

  <%= render :partial => 'verses' %>
<% end %>

<% if @person.recipes.any? %>

Recipes

  <%= render :partial => 'recipes/list', :locals => {:recipes => @person.recipes} %>
  <% if @person == @logged_in %>

<%= link_to "New Recipe", :controller => "recipes", :action => "edit" %>

  <% end %>
<% end %>

<% if @person.activities.to_s.any? or @person.interests.to_s.any? or @person.tv_shows.to_s.any? or @person.movies.to_s.any? or @person.books.to_s.any? or @person.quotes.to_s.any? or @person.about.to_s.any? %>

Favorites

    <% if @person.activities.to_s.any? %>

Activities:	<%= linkify @person.activities, :activities %>

    <% end %>
    <% if @person.interests.to_s.any? %>

Interests:	<%= linkify @person.interests, :interests %>

    <% end %>
    <% if @person.music.to_s.any? %>

Music:	<%= linkify @person.music, :music %>

    <% end %>
    <% if @person.tv_shows.to_s.any? %>

TV Shows:	<%= linkify @person.tv_shows, :tv_shows %>

    <% end %>
    <% if @person.movies.to_s.any? %>

Movies:	<%= linkify @person.movies, :movies %>

    <% end %>
    <% if @person.books.to_s.any? %>

Books:	<%= linkify @person.books, :books %>

    <% end %>
    <% if @person.quotes.to_s.any? %>

Quotes:	<%= preserve_breaks @person.quotes %>

    <% end %>

<% end %>

<% if @person.groups.any? %>

Groups

  <%= render :partial => 'groups' %>
<% end %>

Wall

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

<% if @person.family.mapable? and @person.share_address_with @logged_in %>

<% end %>

<% content_for :sidebar do %>
  <%= render :partial => 'photo' %>
  <%= render :partial => 'families/photo' %>

  <% if (people = @person.family.people).length > 1 %>

Family

      <% people.each do |person| %>

            <a href="<%= url_for :action => 'view', :id => person %>">
              <%= render :partial => 'thumbnail', :locals => {:person => person} %>

          <%= link_to person.name, :action => 'view', :id => person %>

      <% end %>

  <% end %>

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

<% end %>

<% if @person.mapable? and @person.share_address_with @logged_in %>

this is only an approximation

<% end %>

<% if @person.verses.empty? and @person.recipes.empty? and @person.pictures.empty? %>

    Hey! Did you know you can <%= link_to 'share', :controller => 'shares' %>
    your favorite pictures, Bible verses, and even recipes on <%= SITE_TITLE %>?

<% end %>

  <%=h @person.name %>
  <% if @logged_in.can_edit? @person %>
    <%= link_to 'edit', {:action => 'edit', :id => @person}, :style => 'font-size:10pt;color:#999;text-decoration:none;' %>
  <% end %>

<% content_for :subnav do %>
  <% if @logged_in.can_edit? @person %>

<%= link_to 'Edit Profile', :action => 'edit', :id => @person %>

<%= link_to 'Privacy', :action => 'privacy' %>

  <% elsif @logged_in.contacts.find_all_by_person_id(@person.id).any? %>

<%= link_to 'Remove from Contacts', :action => 'remove_contact', :id => @person %>

  <% else %>

<%= link_to 'Add to Contacts', :action => 'add_contact', :id => @person %>

  <% end %>
  <% if @logged_in != @person and @person.email.to_s.any? %>

<%= link_to image_tag('message.gif', :alt => 'Send a Private Message', :class => 'no-border', :style => 'vertical-align:middle;') + ' Private Message', :controller => 'messages', :action => 'send_email', :id => @person %>

  <% end %>
<% end %>

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

<% if (count = @person.pictures.count) > 0 %>

Pictures

    <% @person.pictures.find(:all, :order => 'rand()', :limit => 5).each do |picture| %>
      <%= link_to image_tag(url_for(:controller => 'pictures', :action => 'photo', :id => "#{picture.id}.small.jpg"), :alt => 'click to enlarge'),
        {:controller => 'pictures', :action => 'view', :id => picture}, :title => 'click to enlarge' %>
    <% end %>
    <%= link_to 'More...', :action => 'pictures', :id => @person %>

<% end %>

<% if @person.testimony.to_s.any? %>

Testimony

<%=h @person.testimony %>

<% end %>

<% if @person.verses.any? %>

Verses

  <%= render :partial => 'verses' %>
<% end %>

<% if @person.recipes.any? %>

Recipes

  <%= render :partial => 'recipes/list', :locals => {:recipes => @person.recipes} %>
  <% if @person == @logged_in %>

<%= link_to "New Recipe", :controller => "recipes", :action => "edit" %>

  <% end %>
<% end %>

<% if @person.activities.to_s.any? or @person.interests.to_s.any? or @person.tv_shows.to_s.any? or @person.movies.to_s.any? or @person.books.to_s.any? or @person.quotes.to_s.any? or @person.about.to_s.any? %>

Favorites

    <% if @person.activities.to_s.any? %>

Activities:	<%= linkify @person.activities, :activities %>

    <% end %>
    <% if @person.interests.to_s.any? %>

Interests:	<%= linkify @person.interests, :interests %>

    <% end %>
    <% if @person.music.to_s.any? %>

Music:	<%= linkify @person.music, :music %>

    <% end %>
    <% if @person.tv_shows.to_s.any? %>

TV Shows:	<%= linkify @person.tv_shows, :tv_shows %>

    <% end %>
    <% if @person.movies.to_s.any? %>

Movies:	<%= linkify @person.movies, :movies %>

    <% end %>
    <% if @person.books.to_s.any? %>

Books:	<%= linkify @person.books, :books %>

    <% end %>
    <% if @person.quotes.to_s.any? %>

Quotes:	<%= preserve_breaks @person.quotes %>

    <% end %>

<% end %>

<% if @person.groups.any? %>

Groups

  <%= render :partial => 'groups' %>
<% end %>

Wall

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

<% if @person.family.mapable? and @person.share_address_with @logged_in %>

<% end %>


If it is good for the _search and _live_search...

<%
# 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).delete_if{|k,v| k == 'search'})
-%>
<%= 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
            options = [
              ['', ''],
              [as_('True'), 1],
              [as_('False'), 0]
            ]
            select_tag name, options_for_select(options, value)
          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.column.type
          when :boolean
            options = [
              ['', ''],
              [as_('True'), 1],
              [as_('False'), 0]
            ]
            select_tag name, options_for_select(options, value)
          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>


Attempt to fix problem with disappearing comment box.

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

<%= error_messages_for 'comment' %>

<%= hidden_field("comment", "observation_id", :value => observation_id)%>

	<%= :form_comments_summary.l %>

	<%= text_field("comment", "summary", :size => 80) %>

	<%= :form_comments_comment.l %>

	<%= text_area("comment", "comment", :cols => 80, :rows => 5) %>

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

<%= error_messages_for 'comment' %>

<%= hidden_field("comment", "observation_id", :value => observation_id)%>

	<%= :form_comments_summary.l %>

	<%= text_field("comment", "summary", :size => 80) %>

	<Comment><%= :form_comments_comment.l %>

	<%= text_area("comment", "comment", :cols => 80, :rows => 5) %>

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


Fixed language

Fixed language

<%= feature_output %>

<% if message || (errors && errors.length > 0) -%>

<%= "There was an problem processing your request:".t %>

<% if errors && errors.length > 0 %>
<%= errors.full_messages.map(&:t).join("
") %>

<% end -%>
<%= message %>

<% end -%>

<%= "%s, please confirm your order and enter your payment information." / myself.name %>

<form action='' method='post' id='submit_form'>
<input type='hidden' name='update' id='shopping_form_update' value='0' />

<% if shippable %>

<%= "Order Addresses".t %> (<a href='<%= url_for address_page %>'><%= "Edit".t %>)

  <%= "Ship To:".t %>
  <%= "Bill To:".t %>

  <%= shipping_address.display("
",:address_type => options.address_type) %>
  <%= billing_address.display("
",:address_type => options.address_type) %>

<% else -%>

<%= "Bill To".t %> (<a href='<%= url_for address_page %>'><%= "Edit".t %>)

<%= billing_address.display("
",:address_type => options.address_type) %>

<% end -%>

<% if options.show_gift -%>

<%= "Gift Options".t %>

<% cms_fields_for :order, order do |f| -%>

  <%= f.check_boxes :gift_order, [['This order is a gift',true]], :single => true, :label => '',:onclick => '$("gift_message_display").style.display = this.checked ? "" : "none"'  %>

<tbody id='gift_message_display' <%= "style='display:none;'" unless order.gift_order? %>>
  <%= f.text_area :gift_message, :label => '',:description => 'Optional Gift Message',:vertical => true, :rows => 4,:style => "width:100%;" %>

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

<% if shippable && shipping_options.length == 0 %>

 <%= "There are no Shipping Carriers available to ship your order, please try again later.".t %>

<% elsif payment_processors.length == 0 %>

 <%= "There are no Payment processors available to process your order, please try again later.".t %>

<% else -%>
<% if shippable %>

<%= "Shipping Options".t %>

  <% shipping_options.each_with_index do |opt,index| %>

    <label for='shipping_<%= opt[1] %>'><input id='shipping_<%= opt[1] %>' type='radio' name='payment[shipping_category]' <%=  "checked='checked'" if payment[:shipping_category] == opt[1]  %> value="<%= opt[1] %>" onclick='document.getElementById("shopping_form_update").value=1; document.getElementById("submit_form").submit();' > <%= opt[0] %>

  <% end -%>

<% end -%>

<% if payment_processors.length > 1 %>

<%= "Payment Options".t %>

<% else -%>

<%= "Payment".t %>

<% end -%>

<%= render :partial => '/shop/processor/payment_processors', :locals => { :payment_processors => payment_processors, :admin => false, :payment => payment, :user => myself } %>

<input type='submit' value='<%= vh "Place Order".t %>'/>

<% end -%>

</form>

<%= feature_output %>

<% if message || (errors && errors.length > 0) -%>

<%= "There was an problem processing your request:".t %>

<% if errors && errors.length > 0 %>
<%= errors.full_messages.map(&:t).join("
") %>

<% end -%>
<%= message %>

<% end -%>

<%= "%s, please confirm you order and enter you payment information." / myself.name %>

<form action='' method='post' id='submit_form'>
<input type='hidden' name='update' id='shopping_form_update' value='0' />

<% if shippable %>

<%= "Order Addresses".t %> (<a href='<%= url_for address_page %>'><%= "Edit".t %>)

  <%= "Ship To:".t %>
  <%= "Bill To:".t %>

  <%= shipping_address.display("
",:address_type => options.address_type) %>
  <%= billing_address.display("
",:address_type => options.address_type) %>

<% else -%>

<%= "Bill To".t %> (<a href='<%= url_for address_page %>'><%= "Edit".t %>)

<%= billing_address.display("
",:address_type => options.address_type) %>

<% end -%>

<% if options.show_gift -%>

<%= "Gift Options".t %>

<% cms_fields_for :order, order do |f| -%>

  <%= f.check_boxes :gift_order, [['This order is a gift',true]], :single => true, :label => '',:onclick => '$("gift_message_display").style.display = this.checked ? "" : "none"'  %>

<tbody id='gift_message_display' <%= "style='display:none;'" unless order.gift_order? %>>
  <%= f.text_area :gift_message, :label => '',:description => 'Optional Gift Message',:vertical => true, :rows => 4,:style => "width:100%;" %>

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

<% if shippable && shipping_options.length == 0 %>

 <%= "There are no Shipping Carriers available to ship your order, please try again later.".t %>

<% elsif payment_processors.length == 0 %>

 <%= "There are no Payment processors available to process your order, please try again later.".t %>

<% else -%>
<% if shippable %>

<%= "Shipping Options".t %>

  <% shipping_options.each_with_index do |opt,index| %>

    <label for='shipping_<%= opt[1] %>'><input id='shipping_<%= opt[1] %>' type='radio' name='payment[shipping_category]' <%=  "checked='checked'" if payment[:shipping_category] == opt[1]  %> value="<%= opt[1] %>" onclick='document.getElementById("shopping_form_update").value=1; document.getElementById("submit_form").submit();' > <%= opt[0] %>

  <% end -%>

<% end -%>

<% if payment_processors.length > 1 %>

<%= "Payment Options".t %>

<% else -%>

<%= "Payment".t %>

<% end -%>

<%= render :partial => '/shop/processor/payment_processors', :locals => { :payment_processors => payment_processors, :admin => false, :payment => payment, :user => myself } %>

<input type='submit' value='<%= vh "Place Order".t %>'/>

<% end -%>

</form>


Display source also for published articles from other profiles

(ActionItem1628)

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

<%
  # AddThis Button
  if block_given? && web2_conf['addthis']
      opts = web2_conf['addthis']
%>

<% end %>

<div<%= " class='logged-in'" if user %>>
  <%= article_title(@page, :no_link => true) %>

    <% if @page.allow_post_content?(user) %>
      <% 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 && !@page.blog? %>
          <%= link_to content_tag( 'span', _('Delete') ),
            profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }),
            :class => 'button with-text icon-delete' %>
        <% end %>
        <% if !environment.enabled?('disable_cms') && !@page.folder? %>
          <% if profile.kind_of?(Person) %>
            <%= link_to content_tag( 'span', _('Spread this') ),
                profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
                :class => 'button with-text icon-spread' %>
          <% elsif profile.kind_of?(Community) && environment.portal_community %>
            <%= link_to content_tag( 'span', _('Spread this') ),
                profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }),
                :class => 'button with-text icon-spread' %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
    <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if !@page.display_as_gallery? %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
        <% if (@page.folder? && !@page.blog?) || (@page.parent && @page.parent.folder? && !@page.parent.blog?) %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% end %>
      <% end %>
      <% if profile.kind_of?(Enterprise) && @page.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 => 'tags', :id => t.name ) }.join("\n") %>

<% end %>

<% if @page.display_hits? %>

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

<% end %>

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

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

<% end %>

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

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

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

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

<% elsif @page.reference_article  %>

  <%= _('Source: %s') % link_to(@page.reference_article.profile.name, @page.reference_article.url) %>

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

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

<%
  # AddThis Button
  if block_given? && web2_conf['addthis']
      opts = web2_conf['addthis']
%>

<% end %>

<div<%= " class='logged-in'" if user %>>
  <%= article_title(@page, :no_link => true) %>

    <% if @page.allow_post_content?(user) %>
      <% 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 && !@page.blog? %>
          <%= link_to content_tag( 'span', _('Delete') ),
            profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }),
            :class => 'button with-text icon-delete' %>
        <% end %>
        <% if !environment.enabled?('disable_cms') && !@page.folder? %>
          <% if profile.kind_of?(Person) %>
            <%= link_to content_tag( 'span', _('Spread this') ),
                profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
                :class => 'button with-text icon-spread' %>
          <% elsif profile.kind_of?(Community) && environment.portal_community %>
            <%= link_to content_tag( 'span', _('Spread this') ),
                profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }),
                :class => 'button with-text icon-spread' %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
    <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %>
      <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %>
        <% if !@page.display_as_gallery? %>
          <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
        <% end %>
        <% if (@page.folder? && !@page.blog?) || (@page.parent && @page.parent.folder? && !@page.parent.blog?) %>
          <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
        <% end %>
      <% end %>
      <% if profile.kind_of?(Enterprise) && @page.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 => 'tags', :id => t.name ) }.join("\n") %>

<% end %>

<% if @page.display_hits? %>

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

<% end %>

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

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

<% end %>

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

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

<% if ! @page.source.nil? && ! @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 %>


Fixed meta tags and moved google analytics code to bottom of page

<% unless @partial_page -%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"  <%= "xml:lang='#{@output.language}' lang='#{@output.language}'" %>>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title><%= @cms_module_page_title || @output.title %></title>
      <meta http-equiv='Content-Language' content='<%= @output.language %>' />
      <% if @output.meta_description %>
        <meta name='DESCRIPTION' content='<%= vh @output.meta_description %>'/>
      <% end -%>
      <% if @output.meta_keywords%>
        <meta name='KEYWORDS' content='<%= vh @output.meta_keywords%>'/>
      <% end -%>
      <% if @robots.length > 0 %>
        <meta name='ROBOTS' content='<%= @robots.join(',') %>'/>
      <% end -%>

    <%= javascript_include_tag 'swfobject' %>
    <% if @output.includes[:head_html] -%>
      <%= @output.includes[:head_html].join("\n") %>
    <% end-%>
    <% if @output.includes[:js] || @js_header -%>
      <% if @js_header; @output.includes[:js] ||= []; @output.includes[:js] += @js_header; end -%>
      <% @output.includes[:js].uniq.each do |js| -%>
        <% if js.to_s.include?('http://') -%>

      	<% else -%>
          <%= javascript_include_tag js %>
      	<% end -%>
      <% end -%>
    <% end -%>
    <% if @output.includes[:css] || @css_header -%>
      <% if @css_header; @output.includes[:css] ||= []; @output.includes[:css] += @css_header;  end -%>
      <% @output.includes[:css].uniq.each do |css| -%>
        <%= stylesheet_link_tag css %>
      <% end -%>
    <% end -%>

    <%= @extra_header.uniq.join("\n") if @extra_header %>
    <link href="/stylesheet/<%= @output.css_site_template_id.to_s + ".css"  %>" rel="Stylesheet" type="text/css" />
    <%= stylesheet_link_tag 'edit_page_link' if page_editor? -%>

    <%= @output.head %>

<% if page_editor? -%>

<a href='/website/edit/page/page/<%= @page.id %>'><%= "EDIT".t.split("").join("
") %>

<%= "ADMIN".t.split("").join("
") %>

<% end -%>

<% end -%>
<% @output.html  do |blk| -%>
<% if blk.is_a?(String) -%>
<%= blk %>
<% elsif blk.is_a?(Hash) -%>
<% blk[:paragraphs].each do |para| -%>
<% if para.is_a?(String) -%>
<%= para %>
<% elsif para.is_a?(ParagraphRenderer::ParagraphOutput) && para.rnd.is_a?(Editor::AppRenderer)  -%>
<%= yield %>
<% else -%>

<%= render_paragraph @page, @output.revision, para  %>

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

<% unless @partial_page -%>

<% if @google_analytics[:enabled] == 'enabled'  %>

<% end -%>

<% end -%>

<% unless @partial_page -%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"  <%= "xml:lang='#{@output.language}' lang='#{@output.language}'" %>>

    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
      <title><%= @cms_module_page_title || @output.title %></title>
      <meta http-equiv='Content-Language' content='<%= @output.language %>' />
      <% if @output.meta_description %>
        <meta name='DESCRIPTION' content='<%= vh @output.meta_description %>'/>
      <% end -%>
      <% if @output.meta_keywords%>
        <meta name='KEYWORDS' content='<%= vh @output.meta_keywords%>'/>
      <% end -%>
      <% if @robots.length > 0 %>
        <meta name='ROBOTS' content='<%= @robots.join(',') %>'/>
      <% end -%>

    <%= javascript_include_tag 'swfobject' %>
    <% if @output.includes[:head_html] -%>
      <%= @output.includes[:head_html].join("\n") %>
    <% end-%>
    <% if @output.includes[:js] || @js_header -%>
      <% if @js_header; @output.includes[:js] ||= []; @output.includes[:js] += @js_header; end -%>
      <% @output.includes[:js].uniq.each do |js| -%>
        <% if js.to_s.include?('http://') -%>

      	<% else -%>
          <%= javascript_include_tag js %>
      	<% end -%>
      <% end -%>
    <% end -%>
    <% if @output.includes[:css] || @css_header -%>
      <% if @css_header; @output.includes[:css] ||= []; @output.includes[:css] += @css_header;  end -%>
      <% @output.includes[:css].uniq.each do |css| -%>
        <%= stylesheet_link_tag css %>
      <% end -%>
    <% end -%>

    <%= @extra_header.uniq.join("\n") if @extra_header %>
    <link href="/stylesheet/<%= @output.css_site_template_id.to_s + ".css"  %>" rel="Stylesheet" type="text/css" />
    <%= stylesheet_link_tag 'edit_page_link' if page_editor? -%>

    <% if @google_analytics[:enabled] == 'enabled'  %>
        <% if request.ssl? %>

      	<% else %>

	<% end -%>

    <% end -%>

    <%= @output.head %>

<% if page_editor? -%>

<a href='/website/edit/page/page/<%= @page.id %>'><%= "EDIT".t.split("").join("
") %>

<%= "ADMIN".t.split("").join("
") %>

<% end -%>

<% end -%>
<% @output.html  do |blk| -%>
<% if blk.is_a?(String) -%>
<%= blk %>
<% elsif blk.is_a?(Hash) -%>
<% blk[:paragraphs].each do |para| -%>
<% if para.is_a?(String) -%>
<%= para %>
<% elsif para.is_a?(ParagraphRenderer::ParagraphOutput) && para.rnd.is_a?(Editor::AppRenderer)  -%>
<%= yield %>
<% else -%>

<%= render_paragraph @page, @output.revision, para  %>

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

<% unless @partial_page -%>

<% end -%>


Changed description of e-mail options on profile page

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

     E-mail options

     Check the boxes representing the times when you want to receive e-mail.

     When someone else reviews my work
     <%= check_box 'user', 'email_on_review', {},  true, false  %>

     When someone else submits work I am assigned to review
     <%= check_box 'user', 'email_on_submission', {}, true, false  %>

     When someone else reviews one of my reviews (metareviews my work)
     <%= check_box 'user', 'email_on_review_of_review', {}, true, false %>

     E-mail on review
     <%= check_box 'user', 'email_on_review', {},  true, false  %>

     E-mail on submission
     <%= check_box 'user', 'email_on_submission', {}, true, false  %>

     E-mail on review of review
     <%= check_box 'user', 'email_on_review_of_review', {}, true, false %>


ActionItem440: nome no bt

ActionItem440: nome no bt

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

 <%= @product.name %>

      <%= image_tag @product.image.public_filename, :style => 'float: left;' if @product.image %>

      <%= @product.description %>

        <%= _('Price:') %>
        <%= @product.price || _('not informed') %>

        <%= _('Category: %s ') % link_to_category(@product.product_category) %>

<% button_bar do %>
  <%= button :back, _("%s's products/services listing") % profile.name, :action => 'index', :id => nil %>
<% end %>

 <%= @product.name %>

      <%= image_tag @product.image.public_filename, :style => 'float: left;' if @product.image %>

      <%= @product.description %>

        <%= _('Price:') %>
        <%= @product.price || _('not informed') %>

        <%= _('Category: %s ') % link_to_category(@product.product_category) %>

<% button_bar do %>
  <%= button :back, _("%s's products/services listing"), :action => 'index', :id => nil %>
<% end %>


This change should preserve the whitespace when rendering @review.additional_comment in html.

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

View Review

<%if @assgt.wiki_type.name == "No"%>
<%if @files.size == 0%>

<%else%>
Submitted Files

<%end%>
<%end%>

<%
 _time = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s
 if @assgt.wiki_type.name == "DokuWiki" %>

DokuWiki Review Links:

<%= review_dokuwiki @assgt.directory_path, _time, @author_name  %>

<% elsif @assgt.wiki_type.name == "MediaWiki" %>

MediaWiki Review Links:

<%if @assgt.team_assignment  # The lookup of all team members should be put in a wiki helper
  	for team_member in @team_members
		member_name = User.find(team_member.user_id).name
	%>
		<%= review_mediawiki_group @assgt.directory_path, _time, member_name  %>
	<%end%>
<%else%>
	<%= review_mediawiki @assgt.directory_path, _time, @author_name  %>
<%end%>

<% end %>

<% for file in @files %>

<%= link_to File.basename(file), :action => 'edit_review', :id => @mapping_id, :fname => File.basename(file),"current_folder[name]" => @current_folder.name %>

<% end %>

<%if @assgt.team_assignment %>
	<% for team_member in @team_members %>

	<% submitted = Participant.find(:first, :conditions =>["user_id = ? and assignment_id = ?",team_member.user_id,@assgt.id]).submitted_hyperlink
	if submitted !=nil
	%>
	URL to file submission (if available):<%= submitted %>

	<% end%>
	<% end %>
<%else %>
	<% if @link != nil %>
		Hyperlink: <a href="<%= @link %>" target="new"><%= @link %>

	<% end %>
<%end%>

View review

Hide review

<div id="1_myDiv" style="<%= @review_display %>">
Reviewed <%= @review.review_num_for_author %> at <%= @review.updated_at.strftime('%A %B %d %Y, %I:%M%p') %>
<%= render :partial => 'review/scores' %>
Additional Comment :
<%=@review.additional_comment.gsub(/\n/, '
')%>

<%
review_feedback = ReviewFeedback.find(:first,:conditions =>["review_id = ? and assignment_id = ?", @review.id, @assgt.id])
if(review_feedback) %>

	<p class="inline" id="2_show" <% if(params[:display] == "all") %> style="display: none" <% end %> >View author feedback

	<p class="inline" id="2_hide" <% if(params[:display] != "all") %> style="display: none" <% end %> >Hide author feedback

<% @review_scores1 = ReviewScore.find(:all,:conditions =>["review_id =? AND questionnaire_type_id = ?", review_feedback.id, '4'])
%>
<div id="2_myDiv" style="<%= @author_feedback_display %>">
Author feedback:

<%= render :partial => 'review/score1' %>
Additional Comment:
<%=review_feedback.additional_comments%>

<% end%>

View Review

<%if @assgt.wiki_type.name == "No"%>
<%if @files.size == 0%>

<%else%>
Submitted Files

<%end%>
<%end%>

<%
 _time = Time.now.month.to_s + "/" + Time.now.day.to_s + "/" + Time.now.year.to_s
 if @assgt.wiki_type.name == "DokuWiki" %>

DokuWiki Review Links:

<%= review_dokuwiki @assgt.directory_path, _time, @author_name  %>

<% elsif @assgt.wiki_type.name == "MediaWiki" %>

MediaWiki Review Links:

<%if @assgt.team_assignment  # The lookup of all team members should be put in a wiki helper
  	for team_member in @team_members
		member_name = User.find(team_member.user_id).name
	%>
		<%= review_mediawiki_group @assgt.directory_path, _time, member_name  %>
	<%end%>
<%else%>
	<%= review_mediawiki @assgt.directory_path, _time, @author_name  %>
<%end%>

<% end %>

<% for file in @files %>

<%= link_to File.basename(file), :action => 'edit_review', :id => @mapping_id, :fname => File.basename(file),"current_folder[name]" => @current_folder.name %>

<% end %>

<%if @assgt.team_assignment %>
	<% for team_member in @team_members %>

	<% submitted = Participant.find(:first, :conditions =>["user_id = ? and assignment_id = ?",team_member.user_id,@assgt.id]).submitted_hyperlink
	if submitted !=nil
	%>
	URL to file submission (if available):<%= submitted %>

	<% end%>
	<% end %>
<%else %>
	<% if @link != nil %>
		Hyperlink: <a href="<%= @link %>" target="new"><%= @link %>

	<% end %>
<%end%>

View review

Hide review

<div id="1_myDiv" style="<%= @review_display %>">
Reviewed <%= @review.review_num_for_author %> at <%= @review.updated_at.strftime('%A %B %d %Y, %I:%M%p') %>
<%= render :partial => 'review/scores' %>
Additional Comment : <%=@review.additional_comment%>

<%
review_feedback = ReviewFeedback.find(:first,:conditions =>["review_id = ? and assignment_id = ?", @review.id, @assgt.id])
if(review_feedback) %>

	<p class="inline" id="2_show" <% if(params[:display] == "all") %> style="display: none" <% end %> >View author feedback

	<p class="inline" id="2_hide" <% if(params[:display] != "all") %> style="display: none" <% end %> >Hide author feedback

<% @review_scores1 = ReviewScore.find(:all,:conditions =>["review_id =? AND questionnaire_type_id = ?", review_feedback.id, '4'])
%>
<div id="2_myDiv" style="<%= @author_feedback_display %>">
Author feedback:

<%= render :partial => 'review/score1' %>
Additional Comment:
<%=review_feedback.additional_comments%>

<% end%>


The hidden field was duplicated

The hidden field was duplicated

The method labelled_check_box already adds a hidden field

(ActionItem2329)

<%= error_messages_for 'blog' %>

<%= _('My Blog') %>

<%= render :file => 'shared/tiny_mce' %>

<%= required f.text_field(:name, :size => '64', :onchange => "updateUrlField(this, 'article_slug')") %>

<%= hidden_field_tag 'old_article_slug', @article.slug %>

  <%= labelled_form_field( _('Address'),
        content_tag('code',
          url_for(@article.url).gsub(/#{@article.slug}$/, '') +
          text_field(:article, :slug, :onchange => "warn_value_change()", :size => 25)
        ) +
        content_tag('div',
          content_tag('strong', _('WARNING!')) + ' ' +
            _("You are about to change the address, and this will break external links to this blog or to posts inside it. Do you really want to change?") +
          content_tag('div',
            button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' +
            button_to_function(:cancel, _('No'), 'no_change()')
          ),
          :id => 'slug-change-confirmation',
          :class => 'change-confirmation',
          :style => 'display: none;'
        )
      )
  %>

<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 10)) %>

<%= labelled_form_field(_('How to display posts:'), f.select(:visualization_format, [ [ _('Full post'), 'full'], [ _('First paragraph'), 'short'] ])) %>

<%= labelled_form_field(_('Posts per page:'), f.select(:posts_per_page, [5, 10, 20, 50, 100])) %>

<%= labelled_check_box(_("List only translated posts"), 'article[display_posts_in_current_language]', '1', @article.display_posts_in_current_language?) %>

<% f.fields_for 'feed', @article.feed do |feed| %>
  <%= labelled_form_field(_('Limit of posts in RSS Feed'), feed.select(:limit, [5, 10, 20, 50])) %>
  <%= labelled_form_field(_('Include in RSS Feed only posts from language:'), feed.select(:language, [[_('All'),  nil ]] + Noosfero.locales.map { |k,v| [v, k]})) %>
<% end %>

<% f.fields_for 'external_feed_builder', @article.external_feed do |efeed| %>

    <% enabled = @article.external_feed && @article.external_feed.enabled %>
    <% only_once = @article.external_feed ? @article.external_feed.only_once : true %>
    <%= labelled_check_box(_('Fetch posts from an external feed'), 'article[external_feed_builder][enabled]', 'true', enabled, {:onchange => "$('external-feed-options').toggle()"}) %>
    <div id='external-feed-options' style="display: <%= enabled ? 'block' : 'none' %>">
      <%= efeed.hidden_field(:id) %>
      <%= labelled_form_field( _('Feed address'), efeed.text_field(:address) ) %>

        <%= labelled_radio_button( _('Fetch posts only once'), 'article[external_feed_builder][only_once]', 'true', only_once) %>
        <%= labelled_radio_button( _('Fetch posts periodically'), 'article[external_feed_builder][only_once]', 'false', !only_once) %>

          <%= _('Feeds are updated in batches periodically. Please note that your posts will not be fetched immediately.') %>

<% end %>

<%= error_messages_for 'blog' %>

<%= _('My Blog') %>

<%= render :file => 'shared/tiny_mce' %>

<%= required f.text_field(:name, :size => '64', :onchange => "updateUrlField(this, 'article_slug')") %>

<%= hidden_field_tag 'old_article_slug', @article.slug %>

  <%= labelled_form_field( _('Address'),
        content_tag('code',
          url_for(@article.url).gsub(/#{@article.slug}$/, '') +
          text_field(:article, :slug, :onchange => "warn_value_change()", :size => 25)
        ) +
        content_tag('div',
          content_tag('strong', _('WARNING!')) + ' ' +
            _("You are about to change the address, and this will break external links to this blog or to posts inside it. Do you really want to change?") +
          content_tag('div',
            button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' +
            button_to_function(:cancel, _('No'), 'no_change()')
          ),
          :id => 'slug-change-confirmation',
          :class => 'change-confirmation',
          :style => 'display: none;'
        )
      )
  %>

<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 10)) %>

<%= labelled_form_field(_('How to display posts:'), f.select(:visualization_format, [ [ _('Full post'), 'full'], [ _('First paragraph'), 'short'] ])) %>

<%= labelled_form_field(_('Posts per page:'), f.select(:posts_per_page, [5, 10, 20, 50, 100])) %>

<%= labelled_check_box(_("List only translated posts"), 'article[display_posts_in_current_language]', '1', @article.display_posts_in_current_language?) %>

<% f.fields_for 'feed', @article.feed do |feed| %>
  <%= labelled_form_field(_('Limit of posts in RSS Feed'), feed.select(:limit, [5, 10, 20, 50])) %>
  <%= labelled_form_field(_('Include in RSS Feed only posts from language:'), feed.select(:language, [[_('All'),  nil ]] + Noosfero.locales.map { |k,v| [v, k]})) %>
<% end %>

<% f.fields_for 'external_feed_builder', @article.external_feed do |efeed| %>

    <% enabled = @article.external_feed && @article.external_feed.enabled %>
    <% only_once = @article.external_feed ? @article.external_feed.only_once : true %>
    <%= labelled_check_box(_('Fetch posts from an external feed'), 'article[external_feed_builder][enabled]', 'true', enabled, {:onchange => "$('external-feed-options').toggle()"}) %>
    <%= hidden_field_tag 'article[external_feed_builder][enabled]', 'false' %>
    <div id='external-feed-options' style="display: <%= enabled ? 'block' : 'none' %>">
      <%= efeed.hidden_field(:id) %>
      <%= labelled_form_field( _('Feed address'), efeed.text_field(:address) ) %>

        <%= labelled_radio_button( _('Fetch posts only once'), 'article[external_feed_builder][only_once]', 'true', only_once) %>
        <%= labelled_radio_button( _('Fetch posts periodically'), 'article[external_feed_builder][only_once]', 'false', !only_once) %>

          <%= _('Feeds are updated in batches periodically. Please note that your posts will not be fetched immediately.') %>

<% end %>


Change base theme according to search refactor

  <%= search_people_menu %>

  <%= search_communities_menu %>

  <%= search_contents_menu %>

<%= _('Events') %>

  <%= browse_people_menu %>

  <%= browse_communities_menu %>

  <%= browse_contents_menu %>

<%= _('Events') %>


change wall tab to default on users's profile

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

<%= h profile.name %>

<% if @action %>
  <%= render :partial => 'private_profile' %>
<% else %>
  <% unless profile.description.blank? %>

      <%= profile.description %>

  <% end %>

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

<% end %>

<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %>

        <% plugins_tabs = @plugins.dispatch(:profile_tabs).map { |tab| {:title => tab[:title], :id => tab[:id], :content => instance_eval(&tab[:content]), :start => tab[:title]} }%>

        <% tabs = plugins_tabs.select { |tab| tab[:start] } %>

        <% if @profile.organization? %>
          <% if logged_in? && current_person.follows?(@profile) %>
            <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
          <% end %>
          <% tabs << {:title => _('Profile'), :id => 'organization-profile', :content => (render :partial => 'organization_profile')} %>
        <% elsif @profile.person? %>
          <% if logged_in? && current_person.follows?(@profile) %>
            <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
            <% tabs << {:title => _('Network'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %>
          <% end %>
          <% tabs << {:title => _('Profile'), :id => 'person-profile', :content => (render :partial => 'person_profile')} %>
        <% end %>

        <% tabs += plugins_tabs.select { |tab| !tab[:start] } %>

        <%= render_tabs(tabs) %>

<% end %>

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

<%= h profile.name %>

<% if @action %>
  <%= render :partial => 'private_profile' %>
<% else %>
  <% unless profile.description.blank? %>

      <%= profile.description %>

  <% end %>

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

<% end %>

<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %>

        <% plugins_tabs = @plugins.dispatch(:profile_tabs).
          map { |tab| {:title => tab[:title], :id => tab[:id], :content => instance_eval(&tab[:content]), :start => tab[:title]} }%>

        <% tabs = plugins_tabs.select { |tab| tab[:start] } %>

        <% if @profile.organization? %>
          <% tabs << {:title => _('Profile'), :id => 'organization-profile', :content => (render :partial => 'organization_profile')} %>
          <% if logged_in? && current_person.follows?(@profile) %>
            <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
          <% end %>
        <% elsif @profile.person? %>
          <% tabs << {:title => _('Profile'), :id => 'person-profile', :content => (render :partial => 'person_profile')} %>
          <% if logged_in? && current_person.follows?(@profile) %>
            <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
            <% tabs << {:title => _('Network'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %>
          <% end %>
        <% end %>

        <% tabs += plugins_tabs.select { |tab| !tab[:start] } %>

        <%= render_tabs(tabs) %>

<% end %>


Don't display "Join" link if already requested

(ActionItem1374)

  <% if logged_in? %>

    <% if profile.members.include?(user) %>

        <%= lightbox_link_to content_tag('span', _('Leave')), profile.leave_url, :class => 'button with-text icon-delete', :title => _('Leave this community') %>

    <% else %>
      <% unless profile.already_request_membership?(user) %>

        <%= lightbox_link_to content_tag('span', _('Join')), profile.join_url, :class => 'button with-text icon-add', :title => _('Join this community') %>

      <% end %>
    <% end %>

    <% if profile.enable_contact? %>

        <%= link_to content_tag('span', _('Contact us')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %>

    <% end %>

  <% end %>

  <% if logged_in? %>

    <% if profile.members.include?(user) %>

        <%= lightbox_link_to content_tag('span', _('Leave')), profile.leave_url, :class => 'button with-text icon-delete', :title => _('Leave this community') %>

    <% else %>

        <%= lightbox_link_to content_tag('span', _('Join')), profile.join_url, :class => 'button with-text icon-add', :title => _('Join this community') %>

    <% end %>

    <% if profile.enable_contact? %>

        <%= link_to content_tag('span', _('Contact us')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %>

    <% end %>

  <% end %>


Close stray paragraph tag to stop spec have_match() complaining

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

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

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

<% end %>

Track this request

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

Act on what you've learnt

        <%= link_to '', "http://www.writetothem.com"%>
        <%= link_to 'Write to your politician', "http://www.writetothem.com"%>

        <%= link_to '', "http://www.pledgebank.com"%>
        <%= link_to 'Pledge with others', "http://www.pledgebank.com"%>

        <%= link_to '', "http://petitions.number10.gov.uk"%>
        <%= link_to 'Petition the PM', "http://petitions.number10.gov.uk"%>

        <%= link_to '', "http://wordpress.com/"%>
        <%= link_to 'Start your own blog', "http://wordpress.com/"%>

    <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>

Similar requests

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

<%= link_to "More similar requests", request_similar_url(@info_request) %>

        <% end %>

     <% end %>

Are you the owner of
     any commercial copyright on this page?

<%=@title%>

    <%=h @info_request.law_used_with_a%>
    <% if !@user.nil? && @user.admin_page_links? %>
        (<%= link_to "admin", request_admin_url(@info_request) %>)
    <% end %>
    to
    <%= public_body_link(@info_request.public_body) %>
    by
    <%= user_link(@info_request.user) %>

    <% 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. 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 %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@info_request.public_body) %>,
        they <%= link_to "must respond", about_url + "#quickly_response" %>
        promptly but no later than <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'waiting_response_overdue' %>
        Currently overdue a response from <%=
        public_body_link(@info_request.public_body) %>. By law,
        the response had to be prompt but
        <%= link_to "no later", about_url + "#quickly_response" %>
        than <%= simple_date(@info_request.date_response_required_by) %>.

        <% if @info_request.days_overdue > 14 %>
            They are <%= @info_request.days_overdue.to_i %> days late, 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" %>.
        <% end %>

    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was rejected 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", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#followup" %>.
        <% else %>
            The request is waiting for clarification.
            If you are
            <%= user_link(@info_request.user) %>, please
            <%= 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(@info_request.public_body) %> of their handling of this request.
    <% elsif @status == 'error_message' %>
        There was a delivery error or similar, which needs fixing by the WhatDoTheyKnow team.
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% elsif @status == 'user_withdrawn' %>
        This request has been withdrawn by the person who made it.
        There may be an explanation in an annotation below.
    <% else %>
        <% raise "unknown 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 %>

Things to do with this request

            <%= link_to "Add an annotation", new_comment_url(:url_title => @info_request.url_title) %> (to help
            the requester or others)

            <%=h @info_request.user.name %> only:
            <% if @last_response.nil? %>
                <%= link_to "Send follow up to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %>
            <% else %>
                <%= link_to "Reply to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %>
            <% end %>
            |
            <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>

            <%=h @info_request.public_body.name %> only:
            <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %>


ActionItem127: removed the relevance from the search results but its still ordered by it

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

<h2> <%= _('Search results for "%s"') % @query %> </h2>

<% @results.each do |hit| %>
  <%= render :partial => partial_for_class(hit.class), :locals => { :hit => hit } %>
  <br style='clear: left'/>
<% end %>

 <%= _('Search results for "%s"') % @query %>

<% @results.each do |hit| %>
  <%= render :partial => partial_for_class(hit.class), :locals => { :hit => hit } %>

    <%= _('Relevance: %d%%') % relevance_for(hit) %>

<% end %>


link to the full article from the article admin

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

<tr class="<%= article.status %>" id="article_<%= article.id %>">
  <%= image_tag "icons/#{status_icon[article.status][1]}", :class => "#{status_icon[article.status][0]} icon", :title => "This article is #{article.status}", :alt => "#{article.status}" %>
  <%= link_to(article.title, {:action => 'edit', :id => article}) %>

    <% if article.comments.size == 0 %>
      none
    <% else %>
      <%= link_to pluralize(article.comments.size, 'comment'), { :action => 'comments', :id => article } %>
    <% end %>

  <%= published_at_for article %>
  <%= link_to image_tag('/images/icons/24-zoom-in.png', :style => 'vertical-align: middle'), article.full_permalink %>

<tr class="<%= article.status %>" id="article_<%= article.id %>">
  <%= image_tag "icons/#{status_icon[article.status][1]}", :class => "#{status_icon[article.status][0]} icon", :title => "This article is #{article.status}", :alt => "#{article.status}" %>
  <%= link_to(article.title, {:action => 'edit', :id => article}) %>

    <% if article.comments.size == 0 %>
      none
    <% else %>
      <%= link_to pluralize(article.comments.size, 'comment'), { :action => 'comments', :id => article } %>
    <% end %>

  <%= published_at_for article %>
  <%= image_tag '/images/icons/24-zoom-in.png', :style => 'vertical-align: middle' %>


ActionItem166: using helper to format the date nicely

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

<div class="article-comment<%=
     ' comment-from-owner' if ( @page.profile.name == comment.author.name ) %>">
  <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url,
      :class => 'comment-picture',
      :style => 'background-image:url(%s)' % profile_icon(comment.author, :minor) %>

<%= comment.title %>

    <%= _('By %{author} on %{date}') % {
        :author => link_to(
           (comment.author ? comment.author.identifier : comment.name),
            comment.author.url),
        :date => show_time(comment.created_on) } %>

    <%= comment.body %>

<div class="article-comment<%=
     ' comment-from-owner' if ( @page.profile.name == comment.author.name ) %>">
  <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url,
      :class => 'comment-picture',
      :style => 'background-image:url(%s)' % profile_icon(comment.author, :minor) %>

<%= comment.title %>

    <%= _('By %{author} on %{date}') % {
        :author => link_to(
           (comment.author ? comment.author.identifier : comment.name),
            comment.author.url),
        :date => comment.created_on } %>

    <%= comment.body %>


Add class not-for-print to recruitment ad

Would you like to work with the team that built this site? We’re recruiting.


Add initial cookie text.

Add initial cookie text.

<% @title = "Your privacy" %>

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

<%= @title %> #

Who gets to see my email address? #

We will not disclose your email address to anyone unless we are obliged to by law,
or you ask us to. This includes the public authority that you are sending a
request to.  They only get to see an email address
@whatdotheyknow.com which is specific to that request.

If you send a message to another user on the site, then it will reveal your
email address to them. You will be told that this is going to happen.

Will you send nasty, brutish spam to my email address? #

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
relating to a request you made, an email alert that you have signed up for,
or for other reasons that you specifically authorise. We will never give or
sell your email addresses to anyone else, unless we are obliged to by law, or
you ask us to.

Why will my name and my request appear publicly on the site? #

We publish your request on the Internet so that anybody can read it and
make use of the information that you have found. We do not normally delete
requests (more details).

Your name is tangled up with your request, so has to be published as well.
It is only fair, as we're going to publish the name of the civil servant who
writes the response to your request.  Using your real name also helps people
get in touch with you to assist you with your research or to campaign with you.

By law, you must use your real name for the request to be a valid Freedom of
Information request. See the next question for alternatives if you do not want
to publish your full name.

Can I make an FOI request using a pseudonym? #

Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this
guidance from the Information Commissioner (January 2009).

However, the same guidance also says it is good practice for the public
authority to still consider a request made using an obvious pseudonym.
You should refer to this if a public authority refuses a request because you
used a pseudonym.

Be careful though, even if the authority follows this good practice, the
pseudonym will probably make it impossible for you to complain to the
Information Commissioner later about the handling of your request.

There are several good alternatives to using a pseudonym.

Use a different form of your name. The guidance says
that "Mr Arthur Thomas Roberts" can make a valid request as "Arthur Roberts",
"A. T. Roberts", or "Mr Roberts", but not as "Arthur" or "A.T.R.".

Women may use their maiden name.

In most cases, you may use any name by which you are "widely known and/or
is regularly used".

Use the name of an organisation, the name of a company, the trading name of
a company, or the trading name of a sole trader.

Ask someone else to make the request on your behalf.

You may, if you are really stuck, ask us to make the request on
your behalf. Please contact us with
a good reason why you cannot make the request yourself and cannot
ask a friend to. We don't have the resources to do this for everyone.

Please do not try to impersonate someone else.

They've asked for my postal address! #

If a public authority asks you for your full, physical address, reply to them saying
that section 8.1.b of the FOI Act asks for an "address for correspondence",
and that the email address you are using is sufficient.

The Ministry of Justice has guidance
on this –
"As well as hard copy written correspondence, requests that are
transmitted electronically (for example, in emails) are acceptable
... If a request is received by email and no postal address is given, the email
address should be treated as the return address."

As if that isn't enough, the Information Commissioner's
Hints for Practitioners say
"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."

No no, they need a postal address to send a paper response! #

If an authority only has a paper copy of the information that you want,
they may ask you for a postal address. To start with, try persuading them
to scan in the documents for you. You can even offer to gift them a scanner, which in that particular case
embarrassed the authority into finding one they had already.

If that doesn't work, and you want to provide your postal address privately
in order to receive the documents, mark your request as "They are going to reply by post", and it will
give you an email address to use for that purpose.

Can you delete my requests, or alter my name?  #

WhatDoTheyKnow is a permanent, public archive of Freedom of
Information requests. Even though you may not find the response to
a request useful any more, it may be of interest to others. For this
reason, we will not delete requests.

Under exceptional circumstances we may remove or change your name
on the website, see the next question.
Similarly, we may also remove other personal information.

If you're worried about this before you make your request,
see the section on pseudonyms.

Can you take down personal information about me? #

If you see any personal information about you on the site which you'd like
us to remove or hide, then please let us know.
Specify exactly what information you believe to be problematic and why, and
where it appears on the site.

If it is sensitive personal information that has been accidentally
posted, then we will usually remove it. Normally we will only consider
requests to remove personal information which come from the individual
concerned, but for sensitive information we would appreciate anyone
pointing out anything they see.

We consider that there is a strong public interest in
retaining the names of officers or servants of public authorities. We will only
remove such names in exceptional circumstances, such as where the disclosure of
a name and position of employment would substantially risk an individual's
safety. If you are such an official and you wish to have your name removed for
such an urgent reason, you must supply us with a request to do so from your
line manager. This request must demonstrate that a risk has been perceived
which outweighs the public interest, and must demonstrate that efforts have
been made to conceal the name on the organisation's own website.

For all other requests we apply a public interest test to decide
whether information should be removed.
 Section 32
of the Data Protection Act 1998 permits us to do this, as the material we
publish is journalistic. We cannot easily edit many types of attachments (such
as PDFs, or Microsoft Word or Excel files), so we will usually ask
that authorities resend these with the personal information removed.

What about cookies and third party services?

Our use of cookies, and external services: what you should know, and how to opt out if you want to.

Summary: We care a lot about our users’ privacy. We provide details below, and we try our hardest to look after the private data that we hold. Like many other websites, we sometimes use cookies and Google Analytics to help us make our websites better. These tools are very common and used by many other sites, but they do have privacy implications, and as a charity concerned with socially positive uses of the internet, we think it’s important to explain them in full. If you don’t want to share your browsing activities on mySociety’s sites with other companies, you can adjust your usage or install opt-out browser plugins.

Cookies

To make our service easier or more useful, we sometimes place small data files on your computer or mobile phone, known as cookies; many websites do this. We use this information to, for example, remember you have logged in so you don't need to do that on every page, or to measure how people use the website so we can improve it and make sure it works properly. Below, we list the cookies and services that this site can use.

Name	Typical Content	Expires

_wdtk_cookie_session	A random unique identifier	When web browser is closed, or 1 month if 'Remember me' is used.

seen_foi2	The number 1 if you have seen a notice	7 days

last_request_id	A number, identifying the last FOI request you looked at on the site	When web browser is closed.

last_body_id	A number, identifying the last public authority you looked at on the site	When web browser is closed.

Measuring website usage (Google Analytics)

  We use Google Analytics to collect information about how people use this site. We do this to make sure it’s meeting its users’ needs and to understand how we could do it better. Google Analytics stores information such as what pages you visit, how long you are on the site, how you got here, what you click on, and information about your web browser. IP addresses are masked (only a portion is stored) and personal information is only reported in aggregate. We do not allow Google to use or share our analytics data for any purpose besides providing us with analytics information, and we recommend that any user of Google Analytics does the same.

If you’re unhappy with data about your visit to be used in this way, you can install the official browser plugin for blocking Google Analytics.

The cookies set by Google Analytics are as follows:

Name	Typical Content	Expires

__utma	Unique anonymous visitor ID	2 years

__utmb	Unique anonymous session ID	30 minutes

__utmz	Information on how the site was reached (e.g. direct or via a link/search/advertisement)	6 months

__utmx	Which variation of a page you are seeing if we are testing different versions to see which is best	2 years

Google’s Official Statement about Analytics Data

“This website uses Google Analytics, a web analytics service provided by Google, Inc. (“Google”).  Google Analytics uses “cookies”, which are text files placed on your computer, to help the website analyze how users use the site. The information generated by the cookie about your use of the website (including your IP address) will be transmitted to and stored by Google on servers in the United States . Google will use this information for the purpose of evaluating your use of the website, compiling reports on website activity for website operators and providing other services relating to website activity and internet usage.  Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. Google will not associate your IP address with any other data held by Google.  You may refuse the use of cookies by selecting the appropriate settings on your browser, however please note that if you do this you may not be able to use the full functionality of this website.  By using this website, you consent to the processing of data about you by Google in the manner and for the purposes set out above.”

More general information on how third party services work

Credits

Bits of wording taken from the gov.uk cookies page (under the Open Government Licence).

Learn more from the help for FOI officers -->

<% @title = "Your privacy" %>

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

<%= @title %> #

Who gets to see my email address? #

We will not disclose your email address to anyone unless we are obliged to by law,
or you ask us to. This includes the public authority that you are sending a
request to.  They only get to see an email address
@whatdotheyknow.com which is specific to that request.

If you send a message to another user on the site, then it will reveal your
email address to them. You will be told that this is going to happen.

Will you send nasty, brutish spam to my email address? #

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
relating to a request you made, an email alert that you have signed up for,
or for other reasons that you specifically authorise. We will never give or
sell your email addresses to anyone else, unless we are obliged to by law, or
you ask us to.

Why will my name and my request appear publicly on the site? #

We publish your request on the Internet so that anybody can read it and
make use of the information that you have found. We do not normally delete
requests (more details).

Your name is tangled up with your request, so has to be published as well.
It is only fair, as we're going to publish the name of the civil servant who
writes the response to your request.  Using your real name also helps people
get in touch with you to assist you with your research or to campaign with you.

By law, you must use your real name for the request to be a valid Freedom of
Information request. See the next question for alternatives if you do not want
to publish your full name.

Can I make an FOI request using a pseudonym? #

Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this
guidance from the Information Commissioner (January 2009).

However, the same guidance also says it is good practice for the public
authority to still consider a request made using an obvious pseudonym.
You should refer to this if a public authority refuses a request because you
used a pseudonym.

Be careful though, even if the authority follows this good practice, the
pseudonym will probably make it impossible for you to complain to the
Information Commissioner later about the handling of your request.

There are several good alternatives to using a pseudonym.

Use a different form of your name. The guidance says
that "Mr Arthur Thomas Roberts" can make a valid request as "Arthur Roberts",
"A. T. Roberts", or "Mr Roberts", but not as "Arthur" or "A.T.R.".

Women may use their maiden name.

In most cases, you may use any name by which you are "widely known and/or
is regularly used".

Use the name of an organisation, the name of a company, the trading name of
a company, or the trading name of a sole trader.

Ask someone else to make the request on your behalf.

You may, if you are really stuck, ask us to make the request on
your behalf. Please contact us with
a good reason why you cannot make the request yourself and cannot
ask a friend to. We don't have the resources to do this for everyone.

Please do not try to impersonate someone else.

They've asked for my postal address! #

If a public authority asks you for your full, physical address, reply to them saying
that section 8.1.b of the FOI Act asks for an "address for correspondence",
and that the email address you are using is sufficient.

The Ministry of Justice has guidance
on this –
"As well as hard copy written correspondence, requests that are
transmitted electronically (for example, in emails) are acceptable
... If a request is received by email and no postal address is given, the email
address should be treated as the return address."

As if that isn't enough, the Information Commissioner's
Hints for Practitioners say
"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."

No no, they need a postal address to send a paper response! #

If an authority only has a paper copy of the information that you want,
they may ask you for a postal address. To start with, try persuading them
to scan in the documents for you. You can even offer to gift them a scanner, which in that particular case
embarrassed the authority into finding one they had already.

If that doesn't work, and you want to provide your postal address privately
in order to receive the documents, mark your request as "They are going to reply by post", and it will
give you an email address to use for that purpose.

Can you delete my requests, or alter my name?  #

WhatDoTheyKnow is a permanent, public archive of Freedom of
Information requests. Even though you may not find the response to
a request useful any more, it may be of interest to others. For this
reason, we will not delete requests.

Under exceptional circumstances we may remove or change your name
on the website, see the next question.
Similarly, we may also remove other personal information.

If you're worried about this before you make your request,
see the section on pseudonyms.

Can you take down personal information about me? #

If you see any personal information about you on the site which you'd like
us to remove or hide, then please let us know.
Specify exactly what information you believe to be problematic and why, and
where it appears on the site.

If it is sensitive personal information that has been accidentally
posted, then we will usually remove it. Normally we will only consider
requests to remove personal information which come from the individual
concerned, but for sensitive information we would appreciate anyone
pointing out anything they see.

We consider that there is a strong public interest in
retaining the names of officers or servants of public authorities. We will only
remove such names in exceptional circumstances, such as where the disclosure of
a name and position of employment would substantially risk an individual's
safety. If you are such an official and you wish to have your name removed for
such an urgent reason, you must supply us with a request to do so from your
line manager. This request must demonstrate that a risk has been perceived
which outweighs the public interest, and must demonstrate that efforts have
been made to conceal the name on the organisation's own website.

For all other requests we apply a public interest test to decide
whether information should be removed.
 Section 32
of the Data Protection Act 1998 permits us to do this, as the material we
publish is journalistic. We cannot easily edit many types of attachments (such
as PDFs, or Microsoft Word or Excel files), so we will usually ask
that authorities resend these with the personal information removed.

Learn more from the help for FOI officers -->


Adding permalinks to classes and methods in Flipbook

<!DOCTYPE html>

  <title>Camping, the Reference</title>
	<link rel="stylesheet" href="rdoc.css" type="text/css" media="screen" />

front |

book |

wiki |

code

Camping <%= VERS %>

<%= Time.now %>

Camping, the Reference

    	<% @modsort.each do |klass| %>
    		<h2 class="ruled" id="class-<%= klass.full_name %>">
    		  <%= klass.type.capitalize %>
    		  <%= klass.full_name %>
    		  <% if klass.type == 'class' %>
            <% unless String === klass.superclass %>
              <%= klass.superclass.full_name %>
            <% else %>
              <%= klass.superclass %>
            <% end %>
          <% end %>

  			<%= klass.description %>

Methods

    		<% klass.methods_by_type.each do |type, visibilities|
    			   next if visibilities.empty?
    			   visibilities.each do |visibility, methods|
    				   next if methods.empty?
    				   methods.each do |method| %>
    		<h4 class="ruled" id="<%= method.aref %>">
    		  <%= visibility.to_s.capitalize %> <%= type.capitalize %> method:
    		  <%= method.pretty_name %><%= method.params%>
    		  <a href="<%= method.path %>" class="permalink">[permalink]

    		<%= method.description %>

[ show source ]

<%= method.markup_code %>

    		    <% end
    		     end
    		   end
    		 end %>

<!DOCTYPE html>

  <title>Camping, the Reference</title>
	<link rel="stylesheet" href="rdoc.css" type="text/css" media="screen" />

front |

book |

wiki |

code

Camping <%= VERS %>

<%= Time.now %>

Camping, the Reference

    	<% @modsort.each do |klass| %>

    		  <%# puts klass.class.ancestors;exit %>
    		  <%= klass.type.capitalize %>
    		  <%= klass.full_name %>
    		  <% if klass.type == 'class' %>
            <% unless String === klass.superclass %>
              <%= klass.superclass.full_name %>
            <% else %>
              <%= klass.superclass %>
            <% end %>
          <% end %>

  			<%= klass.description %>

Methods

    		<% klass.methods_by_type.each do |type, visibilities|
    			   next if visibilities.empty?
    			   visibilities.each do |visibility, methods|
    				   next if methods.empty?
    				   methods.each do |method| %>

    		  <%= visibility.to_s.capitalize %> <%= type.capitalize %> method:
    		  <%= method.pretty_name %><%= method.params%>
    		  [permalink]

    		<%= method.description %>

[ show source ]

<%= method.markup_code %>

    		    <% end
    		     end
    		   end
    		 end %>


tableized user account editor

tableized user account editor

Your settings

<% form_for :user, :url => { :action => 'update' } do |f| -%>

      Address:
      <%= f.text_field :address %>

      City:
      <%= f.text_field :city %>

      Postal Code:
      <%= f.text_field :postalcode %>

      Longitude:
      <%= f.text_field :longitude %>

      Latitude:
      <%= f.text_field :latitude %>

      Cellphone:
      <%= f.text_field :cellphone %>

<%= submit_tag 'Update' %>

<% end -%>