Change diff line display to show tabs as little unicode arrows so we notice them in reviews

  <% # iterate over lines %>
  <% chunk.lines.each do |line| %>

    <%
      best_idx = line.best_file_index
      blob = file_change_set.blobs[best_idx]
      blob_line_number = line.line_numbers[ best_idx ]
      line_id = blob + '_line_' + blob_line_number.to_s
     %>

    <tr class="diff_line" id="<%= line_id %>">
      <% if ! @review.nil? %>

          <%= link_to_remote '+', :url => {
                :controller => 'review',
                :action => 'new_comment_ajax',
                'comment[review_id]'   => @review.id,
                'comment[index_hash]'  => blob,
                'comment[line_number]' => blob_line_number
           } %>

      <% end %>
    <% # Line numbers %>
      <% line.line_numbers.each do |n| %>
        <%=h n.nil? ? "-" : n %>
      <% end %>
      <td class="<%= (line_classes line).join(" ") %>">
        <% if line.line.empty? %>

        <% else %>
          <%= # Get rid of trailing ^Ms and replace
                    # tabs with "->" characters
                   h(line.line.sub(/\r$/,'').
                               gsub(/\t/, "\xE2\x9E\x94   "))
                 %>

        <% end %>

  <% comments = comments_for_line(blob, blob_line_number) %>
  <% comments.each do |comment| %>

      <%= render_partial 'comment/show', comment %>

  <% end %>

  <% end %>

  <% # iterate over lines %>
  <% chunk.lines.each do |line| %>

    <%
      best_idx = line.best_file_index
      blob = file_change_set.blobs[best_idx]
      blob_line_number = line.line_numbers[ best_idx ]
      line_id = blob + '_line_' + blob_line_number.to_s
     %>

    <tr class="diff_line" id="<%= line_id %>">
      <% if ! @review.nil? %>

          <%= link_to_remote '+', :url => {
                :controller => 'review',
                :action => 'new_comment_ajax',
                'comment[review_id]'   => @review.id,
                'comment[index_hash]'  => blob,
                'comment[line_number]' => blob_line_number
           } %>

      <% end %>
    <% # Line numbers %>
      <% line.line_numbers.each do |n| %>
        <%=h n.nil? ? "-" : n %>
      <% end %>
      <td class="<%= (line_classes line).join(" ") %>">
        <% if line.line.empty? %>

        <% else %>
          <%=h line.line.sub(/\r$/,'') %>

        <% end %>

  <% comments = comments_for_line(blob, blob_line_number) %>
  <% comments.each do |comment| %>

      <%= render_partial 'comment/show', comment %>

  <% end %>

  <% end %>


more css refactoring

more css refactoring

  <% list_columns.each do |column| %>
    <%= column.render_th(streamlined_request_context, self )%>
  <% end %>
  <%= streamlined_table_row_button_header %>

  <% odd = false %>
  <% for item in @streamlined_items %>
    <% odd = !odd %>
    <tr class="<%= odd ? 'odd' : 'even'%>">
    <% list_columns.each do |column| %>
      <%= !column.render_td(self, item).blank? ? column.render_td(self, item) : ' ' %>
    <% end %>
    <%= streamlined_table_row_buttons(item) %>

  <% end %>

<% if @streamlined_item_pages != [] && @streamlined_item_pages.current.previous %>

<% else %>

<% end %>


ActionItem879: enterprise cannot create new articles

:-/

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

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

<% end; end %>

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

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

      <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
          { :controller => 'cms', :action => 'edit', :id => @page },
          :class => 'button with-text icon-edit' %>
      <% if !profile.kind_of?(Enterprise) %>
        <%= link_to content_tag( 'span', _('Delete') ),
            { :controller => 'cms', :action => 'destroy', :id => @page },
            :class => 'button with-text icon-delete' %>
        <% if profile.kind_of?(Person) %>
          <%= link_to content_tag( 'span', _('Spread this') ),
              { :controller => 'cms', :action => 'publish', :id => @page },
              :class => 'button with-text icon-spread' %>
        <% end %>
        <%= lightbox_button(:new, label_for_new_article(@page), :controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent))) %>
      <% end %>

  <% end %>

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

    <%= _("This article's tags:") %>
    <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tag', :id => t.name ) }.join("\n") %>

<% end %>

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

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

<% end %>

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

    <%= environment.message_for_disabled_enterprise %>

<% end %>

  <%= article_to_html(@page) %>

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

<%= _('Categories') %>

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

<% end %>

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

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

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

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

<% end; end %>

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

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

      <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
          { :controller => 'cms', :action => 'edit', :id => @page },
          :class => 'button with-text icon-edit' %>
      <%= link_to content_tag( 'span', _('Delete') ),
          { :controller => 'cms', :action => 'destroy', :id => @page },
          :class => 'button with-text icon-delete' %>
      <% if profile.kind_of?(Person) %>
        <%= link_to content_tag( 'span', _('Spread this') ),
            { :controller => 'cms', :action => 'publish', :id => @page },
            :class => 'button with-text icon-spread' %>
      <% end %>
      <%= lightbox_button(:new, label_for_new_article(@page), :controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent))) %>

  <% end %>

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

    <%= _("This article's tags:") %>
    <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tag', :id => t.name ) }.join("\n") %>

<% end %>

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

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

<% end %>

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

    <%= environment.message_for_disabled_enterprise %>

<% end %>

  <%= article_to_html(@page) %>

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

<%= _('Categories') %>

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

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


fix articles form for latest rails 1.2 changes to date helpers [courtenay]

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

<%= error_messages_for 'article' %>
<% @style = has_excerpt? ? "" : "display:none" %>

Title

<%= form.text_field :title, :class => 'big'  %>

    <dt id="x-lbl" style="<%= @style %>"><%= form.label_for :excerpt %> (<%= link_to_function 'Cancel', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

    <dd id="x-body" style="<%= @style %>"><%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

Write your article (<%= link_to_function 'Add an excerpt', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

<%= form.text_area :body, :class => 'fat', :rows => 25  %>

Tags Enter one or more tags separated by a comma.

<%= form.text_field :tag %>

Save as Draft?

<%= check_box_tag :draft, '1', !@article.new_record? && !@published, :id => 'article-draft' %> Yes, save this article as a draft.

  <dt id="publish-date-lbl"<%= %( style="display:none") unless @article.new_record? || @published -%>><%= label_tag 'article_created_at', 'Publish on this date:' %>

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @published -%>>
    <%= form.datetime_select :published_at,
          :start_year => (@article.published_at || Time.now.utc).year-1, :order => [:month, :day, :year] %>

<%= error_messages_for 'article' %>
<% @style = has_excerpt? ? "" : "display:none" %>

Title

<%= form.text_field :title, :class => 'big'  %>

    <dt id="x-lbl" style="<%= @style %>"><%= form.label_for :excerpt %> (<%= link_to_function 'Cancel', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

    <dd id="x-body" style="<%= @style %>"><%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %>

Write your article (<%= link_to_function 'Add an excerpt', %(['x-lbl', 'x-body'].each(Element.toggle)) %>)

<%= form.text_area :body, :class => 'fat', :rows => 25  %>

Tags Enter one or more tags separated by a comma.

<%= form.text_field :tag %>

Save as Draft?

<%= check_box_tag :draft, '1', !@article.new_record? && !@published, :id => 'article-draft' %> Yes, save this article as a draft.

  <dt id="publish-date-lbl"<%= %( style="display:none") unless @article.new_record? || @published -%>><%= label_tag 'article_created_at', 'Publish on this date:' %>

  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @published -%>>
    <%= form.datetime_select :published_at,
          :start_year => (@article.published_at || Time.now.utc).year-1, :discard_year => true, :order => [:month, :day, :year] %>


Added title tag to send email that displays the users in each category.  Gives the same information as previous sidebar but takes up less space.

	<% if session[:person] %>

    <% user = User.find(session[:person]) %>

      <%= link_to 'Home', :controller => :main, :action => :user_summary_page, :id => user %>

		<% if user.job_type != '' && user.job_type != nil %>

<%= link_to 'My Jobs', :controller => :users, :action => :edit, :id => user %>

			<%= (user.animal_care_user?) ? "
Weekday Care
" : "" %>
			<%= (user.weekend_care_user?) ? "
Weekend Care
" : "" %>
			<%= (user.medical_care_user?) ? "
Medical Care
" : "" %>
			<%= (user.administrator?) ? "
Administrator
" : "" %>

		<% end %>

<%= link_to 'Trainings', :controller => :trainings, :action => :index, :selected_user => user %>

    <% if user.trainings.length > 0 %>
      <% for training in user.trainings %>

<%= link_to training.training_type.name, :controller => :training_types, :action => :show, :id => training.training_type %>

      <% end %>
		<% else %>

Not trained

    <% end %>

<%= link_to 'Add training', :controller => :trainings, :action => :new, :selected_user => user %>

    <% if !@animal_care_staff_page %>

<%= link_to 'Animal Care Staff', :controller => :main, :action => :animal_care_staff %>

    <% end %>

	<% end %>

Send Email

<%= link_to('Entire Lab', {:controller => 'main', :action => 'lab_email', :users => User.current}, {:title => User.current.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Animal Care', {:controller => 'main', :action => 'lab_email', :users => User.current_animal_care}, {:title => User.current_animal_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Medical Care', {:controller => 'main', :action => 'lab_email', :users => User.current_medical_care}, {:title => User.current_medical_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Weekend Care', {:controller => 'main', :action => 'lab_email', :users => User.current_weekend_care}, {:title => User.current_weekend_care.collect{|u| [u.name+" \n"]}}) %>

<%= link_to('Administrators', {:controller => 'main', :action => 'lab_email', :users => User.administrator}, {:title => User.administrator.collect{|u| [u.name+" \n"]}}) %>

	<% if session[:person] %>

    <% user = User.find(session[:person]) %>

      <%= link_to 'Home', :controller => :main, :action => :user_summary_page, :id => user %>

		<% if user.job_type != '' && user.job_type != nil %>

<%= link_to 'My Jobs', :controller => :users, :action => :edit, :id => user %>

			<%= (user.animal_care_user?) ? "
Weekday Care
" : "" %>
			<%= (user.weekend_care_user?) ? "
Weekend Care
" : "" %>
			<%= (user.medical_care_user?) ? "
Medical Care
" : "" %>
			<%= (user.administrator?) ? "
Administrator
" : "" %>

		<% end %>

<%= link_to 'Trainings', :controller => :trainings, :action => :index, :selected_user => user %>

    <% if user.trainings.length > 0 %>
      <% for training in user.trainings %>

<%= link_to training.training_type.name, :controller => :training_types, :action => :show, :id => training.training_type %>

      <% end %>
		<% else %>

Not trained

    <% end %>

<%= link_to 'Add training', :controller => :trainings, :action => :new, :selected_user => user %>

    <% if !@animal_care_staff_page %>

<%= link_to 'Animal Care Staff', :controller => :main, :action => :animal_care_staff %>

    <% end %>

	<% end %>

Send Email

<%= link_to('Entire Lab', :controller => 'main', :action => 'lab_email', :users => User.current) %>

<%= link_to('Animal Care', :controller => 'main', :action => 'lab_email', :users => User.current_animal_care) %>

<%= link_to('Medical Care', :controller => 'main', :action => 'lab_email', :users => User.current_medical_care) %>

<%= link_to('Weekend Care', :controller => 'main', :action => 'lab_email', :users => User.current_weekend_care) %>

<%= link_to('Administrators', :controller => 'main', :action => 'lab_email', :users => User.administrator) %>


Fix info actions

Fix info actions

<%= block_title(title) %>

<%= render :file => 'blocks/my_network/' + owner.class.name.underscore, :locals => { :owner => owner } %>

<%= link_to(__('Homepage'), owner.url, :class => 'url') %>

<%= link_to(_('View profile'), owner.public_profile_url) %>

  <% if !user.nil? and owner.organization? and user.has_permission?('edit_profile', profile) %>

<%= link_to _('Control panel'), :controller => 'profile_editor', :profile => profile.identifier %>

  <% end %>

  <%= render_profile_actions owner.class.name.underscore %>

<%= block_title(title) %>

<%= render :file => 'blocks/my_network/' + owner.class.name.underscore, :locals => { :owner => owner } %>

<%= link_to(__('Homepage'), owner.url, :class => 'url') %>

<%= link_to(_('View profile'), owner.public_profile_url) %>

  <% if !user.nil? and owner.organization? and user.has_permission?('edit_profile', profile) %>

<%= link_to _('Control panel'), :controller => 'profile_editor', :profile => profile.identifier %>

  <% end %>

  <%= render :file => 'blocks/profile_info_actions/' + owner.class.name.underscore %>


r138: Removing the last reference to url_name

<div class="project build_<%= project.last_build_status %>">

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

      <%= project.builder_state_and_activity %>

      <% if project.last_build %>
        build <%= project.last_build.label %>
        <%= project.last_build_status.to_s.gsub('_', ' ') %>
        <%= format_time(project.last_build.time, :human) %>
      <% else %>
        Never built
      <% end %>

      <% if project.force_build_request_allowed? %>

          <% form_tag({:action => 'force_build', :id => project.name}, :class => 'force_build_form') do %>
            <%= submit_tag 'Build now' %>
          <% end %>

      <% end %>

    Latest builds:
    <% project.last_five_builds.each do |build| %>

        <%= link_to_build(project, build) %>

    <% end %>

<div class="project build_<%= project.last_build_status %>">

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

      <%= project.builder_state_and_activity %>

      <% if project.last_build %>
        build <%= project.last_build.label %>
        <%= project.last_build_status.to_s.gsub('_', ' ') %>
        <%= format_time(project.last_build.time, :human) %>
      <% else %>
        Never built
      <% end %>

      <% if project.force_build_request_allowed? %>

          <% form_tag({:action => 'force_build', :id => project.url_name}, :class => 'force_build_form') do %>
            <%= submit_tag 'Build now' %>
          <% end %>

      <% end %>

    Latest builds:
    <% project.last_five_builds.each do |build| %>

        <%= link_to_build(project, build) %>

    <% end %>


Did a full rework on the html to fix  the issues around sections being hidden. Need to get feedback before pushing for 0.0.5.

  Cuke Sniffer

    Score: <%= cuke_sniffer.summary[:total_score] %>

  Summary -

  <% data_symbols = [:features, :scenarios, :step_definitions, :hooks] %>

      Features
      Scenarios
      Step Definitions
      Hooks

      Total Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total_score] %>
      <% end %>

      Count
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total].inspect %>
      <% end %>

      Lowest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:min] %>
      <% end %>

      Highest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:max] %>
      <% end %>

      Average Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:average] %>
      <% end %>

      Threshold
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:threshold] %>
      <% end %>

      Good
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:good].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

      Bad
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:bad].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

  Improvement List +

  <% if cuke_sniffer.summary[:improvement_list].empty? %>

No Improvements to make!

  <% end %>

    <% cuke_sniffer.summary[:improvement_list].each do |improvement, count| %>

          <%= count %>
          <%= improvement %>

    <% end %>

  Dead Steps +

  <% dead_steps = cuke_sniffer.get_dead_steps %>
  <% dead_steps.delete(:total) %>
  <% if dead_steps.count == 0 %>

No dead steps found!

  <% elsif dead_steps.count == 1 %>

<%= dead_steps.count %> Dead Step found.

  <% else %>

<%= dead_steps.count %> Dead Steps found.

  <% end %>

    <% dead_steps.each_key do |file_name| %>

<%= file_name.gsub(cuke_sniffer.step_definitions_location, "") %>
              .rb

              <% dead_steps[file_name].each do |regex| %>

                    <%= regex.match(/(?<line>\d+):/)[:line] %>
                    <%= regex.match(/:(?<regex>.*)/)[:regex] %>

              <% end %>

    <% end %>

  Features +

  <% if cuke_sniffer.features.count == 0 %>

No Feature/Scenario smells!

  <% end %>

    <% index = 0 %>
    <% cuke_sniffer.features.each do |feature| %>
        <% next if feature.total_score <= 0 %>

        <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('feature_<%=index%>'))">

<%= feature.total_score + feature.scenarios_score %>

<%= feature.name %>

        <div id="feature_<%= index %>" class="sub_section">

            <% if feature.rules_hash.empty? %>

            <% end %>
            <% feature.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

            <%= feature.location.gsub(cuke_sniffer.features_location, "") %>

            <% unless feature.background.nil? %>

<%= feature.background.score %>

<%= feature.background.type + ": " + feature.background.name %>

                  <% feature.background.rules_hash.each_key do |rule| %>

<%= rule %>

                  <% end %>

            <% end %>

            <% feature.scenarios.each do |scenario| %>

<%= scenario.score %>

<%= scenario.type + ": " + scenario.name %>

                  <% scenario.rules_hash.each_key do |rule| %>

<%= rule %>

                  <% end %>

            <% end %>

        <% index += 1 %>
    <% end %>

  Step Definitions +

  <% if cuke_sniffer.step_definitions.count == 0 %>

No Step Definition smells!

  <% end %>

    <% index = 0 %>
    <% cuke_sniffer.step_definitions.each do |step_definition| %>
        <% next if step_definition.score <= 0 %>

          <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('step_definition_<%=index%>'))">

<%= step_definition.score %>

            <% parameters = "" %>
            <% step_definition.parameters.each do |param| %>
                <% if param == step_definition.parameters.first %>
                    <% parameters << "| " %>
                <% end %>
                <% parameters << param %>

                <% if param == step_definition.parameters.last %>
                    <% parameters << " |" %>
                <% else %>
                    <% parameters << ", " %>
                <% end %>
            <% end %>

<%= "/" + step_definition.regex.to_s.match(/\(\?\-mix\:(?<regex>.*)\)/)[:regex] + "/ do " + parameters %>

          <div id="step_definition_<%= index %>" class="sub_section">

              <% step_definition.rules_hash.each_key do |rule| %>

<%= rule %>

              <% end %>

              <%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, "") %>

        <% index += 1 %>
    <% end %>

  Hooks +

  <% if cuke_sniffer.hooks.count == 0 %>

No Hook smells!

  <% end %>

    <% index = 0 %>
    <% cuke_sniffer.hooks.each do |hook| %>
        <% next if hook.score <= 0 %>

        <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('hook_<%=index%>'))">

<%= hook.score %>

          <% tags = "(" %>
          <% hook.tags.each do |tag| %>
              <% tags << tag %>
              <% tags << ", " unless tag == hook.tags.last %>
          <% end %>
          <% tags += ")" %>
          <% parameters = "| " %>
          <% hook.parameters.each do |parameter| %>
              <% parameters << parameter %>
              <% parameters << ", " unless parameter == hook.parameters.last %>
          <% end %>
          <% parameters += " |" %>
          <% name = hook.type %>
          <% name += tags unless tags == "()" %>
          <% name += " do " %>
          <% name += parameters unless parameters == "|  |" %>

<%= name %>

        <div id="hook_<%= index %>" class="sub_section">

            <% hook.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

            <%= hook.location.gsub(cuke_sniffer.hooks_location, "") %>

        <% index += 1 %>
    <% end %>

  Cuke Sniffer

      <%= summary[:total_score] %> Total Score

    - Summary

  <%
     feature_results = cuke_sniffer.summary[:features]
     scenario_results = cuke_sniffer.summary[:scenarios]
     step_definition_results = cuke_sniffer.summary[:step_definitions]
     hooks_results = cuke_sniffer.summary[:hooks]
  %>

      Features
      Scenarios
      Step Definitions
      Hooks

      Total Score
      <%= feature_results[:total_score] %>
      <%= scenario_results[:total_score] %>
      <%= step_definition_results[:total_score] %>
      <%= hooks_results[:total_score] %>

      Count
      <%= cuke_sniffer.features.count %>
      <%= cuke_sniffer.scenarios.count %>
      <%= cuke_sniffer.step_definitions.count %>
      <%= cuke_sniffer.hooks.count %>

      Lowest Score
      <%= feature_results[:min] %>
      <%= scenario_results[:min] %>
      <%= step_definition_results[:min] %>
      <%= hooks_results[:min] %>

      Highest Score
      <%= feature_results[:max] %>
      <%= scenario_results[:max] %>
      <%= step_definition_results[:max] %>
      <%= hooks_results[:max] %>

      Average Score
      <%= feature_results[:average] %>
      <%= scenario_results[:average] %>
      <%= step_definition_results[:average] %>
      <%= hooks_results[:average] %>

      Threshold
      <%= feature_results[:threshold] %>
      <%= scenario_results[:threshold] %>
      <%= step_definition_results[:threshold] %>
      <%= hooks_results[:threshold] %>

      Good
      <%= (feature_results[:good].to_f/feature_results[:total].to_f*100).round(2) %>%
      <%= (scenario_results[:good].to_f/scenario_results[:total].to_f*100).round(2) %>%
      <%= (step_definition_results[:good].to_f/step_definition_results[:total].to_f*100).round(2) %>
        %

      <%= (hooks_results[:good].to_f/hooks_results[:total].to_f*100).round(2) %>%

      Bad
      <%= (feature_results[:bad].to_f/feature_results[:total].to_f*100).round(2) %>%
      <%= (scenario_results[:bad].to_f/scenario_results[:total].to_f*100).round(2) %>%
      <%= (step_definition_results[:bad].to_f/step_definition_results[:total].to_f*100).round(2) %>
        %

      <%= (hooks_results[:bad].to_f/hooks_results[:total].to_f*100).round(2) %>%

    + Improvement List

Types of
      improvements: <%= cuke_sniffer.summary[:improvement_list].keys.count %>

      <% cuke_sniffer.summary[:improvement_list].each do |improvement, count| %>

            <%= count %>
            <%= improvement %>

      <% end %>

    + Dead Steps

    <% dead_steps = cuke_sniffer.get_dead_steps %>

Total Dead
      Steps: <%= dead_steps[:total] %>

    <% dead_steps.delete :total %>
    <% dead_steps.each_key do |step_file| %>

          <%= step_file %>

            <% dead_steps[step_file].each do |regex| %>
                <%= regex %>

            <% end %>

    <% end %>

    + Features

    <% i=0 %>
    <% cuke_sniffer.features.each do |feature| %>
        <% next if feature.score == 0 and feature.scenarios_score == 0 %>
        <div style="cursor: hand;" onclick="toggle(this,3)" class="feature <%= i%2==0 ? "even" : "odd" %>">

<%= feature.score + feature.scenarios_score %>

            <%= feature.name %>

            <%= feature.location.gsub(cuke_sniffer.features_location, "") %>

                  Scenarios: <%= feature.scenarios.size %>

                  Score: <%= feature.score %>

                  <% unless feature.rules_hash.empty? %>
                      Feature Improvements:

                        <% feature.rules_hash.each_key do |rule| %>
                            <%= rule %>

                        <% end %>

                  <% end %>

            <% feature.scenarios = [feature.background, feature.scenarios].flatten unless feature.background.nil? %>

              <% feature.scenarios.each do |scenario| %>
                  <% next if scenario.rules_hash.empty? %>

                      <%= scenario.type %>: <%= scenario.name %>

                      <% scenario.steps.each do |step| %>

                            <%= step %>

                      <% end %>

                      Score: <%= scenario.score %>

                      Line: <%= scenario.start_line %>

                      Scenario Improvements:

                      <% scenario.rules_hash.each_key do |rule| %>

                            <%= rule %>

                      <% end %>

              <% end %>

        <% i+=1 %>
    <% end %>

    + Hooks

    <% i=0 %>
    <% if cuke_sniffer.hooks.empty? %>
        No hooks parsed
    <% end %>
    <% cuke_sniffer.hooks.each do |hook| %>

          <% next if hook.score <= 0 %>

<%= hook.score %>

            <% tags = "(" %>
            <% hook.tags.each do |tag| %>
                <% tags << tag %>
                <% tags << ", " unless tag == hook.tags.last %>
            <% end %>
            <% tags += ")" %>
            <% parameters = "| " %>
            <% hook.parameters.each do |parameter| %>
                <% parameters << parameter %>
                <% parameters << ", " unless parameter == hook.parameters.last %>
            <% end %>
            <% parameters += " |" %>
            <% name = hook.type %>
            <% name += tags unless tags == "()" %>
            <% name += " do " %>
            <% name += parameters unless parameters == "|  |" %>
            <%= name %>

              <%= hook.location.gsub(cuke_sniffer.hooks_location, "") %>

                    <% hook.code.each do |line| %>
                        <%= line %>
                    <% end %>

                    Hook improvements:

                    <% hook.rules_hash.each_key do |improvement| %>

                          (<%= hook.rules_hash[improvement] %>) <%= improvement %>

                    <% end %>

    <% end %>

    + Step Definitions

    <% i=0 %>
    <% cuke_sniffer.step_definitions.each do |step_definition| %>
        <% next if step_definition.score <= 0 or step_definition.calls.empty? %>

<%= step_definition.score %>

            <% parameters = "" %>
            <% step_definition.parameters.each do |param| %>
                <% if param == step_definition.parameters.first %>
                    <% parameters << "| " %>
                <% end %>
                <% parameters << param %>

                <% if param == step_definition.parameters.last %>
                    <% parameters << " |" %>
                <% else %>
                    <% parameters << ", " %>
                <% end %>
            <% end %>
            <%= "/" + step_definition.regex.to_s.match(/\(\?\-mix\:(?<regex>.*)\)/)[:regex] + "/ do " + parameters %>

          <% if step_definition.calls.empty? %>

Dead step!

          <% else %>

Calls: <%= step_definition.calls.size %>

          <% end %>

            <%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, "") %>

                  <% unless step_definition.parameters.empty? %>
                      <% calls = step_definition.condensed_call_list %>
                      <% calls.each_key do |step_string| %>

<%= step_string %>

                          <% calls[step_string].each do |call| %>

<%= call %>

                          <% end %>

                      <% end %>
                  <% end %>

                  Step Definition improvements:

                  <% step_definition.rules_hash.each_key do |improvement| %>

                        (<%= step_definition.rules_hash[improvement] %>) <%= improvement %>

                  <% end %>

        <% i+=1 %>
    <% end %>


Correct fetching of trackers.

Correct fetching of trackers.

<% (@settings["fields"] || []).each do |field| -%>

Tracker

	<%= select_tag('field[tracker]',
			options_from_collection_for_select(@trackers, 'id', 'name', @field[:tracker] && @field[:tracker].id)) %>

Select which tracker this applies to.

<% end; reset_cycle %>

<% (@settings["fields"] || []).each do |field| -%>

Tracker

    <%= select_tag 'field[tracker]', @Tracker.find(:all), :size => 80 %>

Select which tracker this applies to.

<% end; reset_cycle %>


Fixed td rowspan issue

Fixed td rowspan issue

  <% if message.from_user_id != myself.id -%>
    « Back to Inbox
  <% else -%>
    « Back to Sent Messages
  <% end -%>

  <% if message.from_user -%>
    <% if SocialFriend.is_friend?(message.from_user,myself) -%>
      <%= message.from_user.image.image_tag(:preview) %>
    <% else -%>
      <%= (message.from_user.second_image || message.from_user.image).image_tag(:preview) %>
    <% end -%>
  <% end -%>

        Sent:
        <%= h(message.created_at.strftime("%A, %B %d %Y %I:%M %P")) %>

      <% unless message.from_user.blank? %>

        From:
        <%= h(message.from_user.name) %>

      <% end -%>
      <% unless message.notification? %>

        To:
        <%= h(message.display_recipients) %>

      <% end -%>

        Subject:
        <%= h(message.subject) %>

          <%= content %>

      <% unless message.from_user.blank? || (message.notification? && !message.message_message.handled?) %>

      <% if message.from_user_id != myself.id -%>
        <% cms_form_for :message, reply, :html => { :onsubmit => "MessageViewer.replyMessage(#{message.id}); return false;",:style => 'width:100%', :id => 'message_write_form' } do |f| -%>
        <%= f.text_field :subject, :size => 60,:label => 'Reply:'%>
        <%= f.text_area :message, :vertical => true, :style => 'width:500px;',:rows => 8, :label => '', :noun => 'Message' %>
        <%= f.submit_tag 'Reply' %>
        <% end -%>
      <% end -%>

<% end -%>


tweak lat lon decision logic for the edit tab. made it more similar to logic in index, including using cookie

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

The OpenStreetMap database is currently offline while
   essential database maintenance work is carried out.

<% elsif OSM_STATUS == :api_readonly %>

The OpenStreetMap database is currently in read-only mode while
   essential database maintenance work is carried out.

<% elsif !@user.data_public? %>

You haven't set your edits to be public.

You can't use the online editor unless you do so. You can set your edits as public from your
<%= link_to 'user page', {:controller => 'user', :action => 'account', :display_name => @user.display_name}%>.

(Find out why this is the case.)

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

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

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

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

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

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

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

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

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

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

	You need a Flash player to use Potlatch, the
    OpenStreetMap Flash editor. You can download Flash Player from Adobe.com.

    Several other options are also available
    for editing OpenStreetMap.

<%= javascript_include_tag 'swfobject.js' %>

<% end %>

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

The OpenStreetMap database is currently offline while
   essential database maintenance work is carried out.

<% elsif OSM_STATUS == :api_readonly %>

The OpenStreetMap database is currently in read-only mode while
   essential database maintenance work is carried out.

<% elsif !@user.data_public? %>

You haven't set your edits to be public.

You can't use the online editor unless you do so. You can set your edits as public from your
<%= link_to 'user page', {:controller => 'user', :action => 'account', :display_name => @user.display_name}%>.

(Find out why this is the case.)

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

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

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

if params['mlon'] and params['mlat']
	lon =  h(params['mlon'])
	lat =  h(params['mlat'])
	zoom =  h(params['zoom'] || '14')

elsif @user and params['lon'].nil? and params['lat'].nil? and params['gpx'].nil?
	lon =  @user.home_lon
	lat =  @user.home_lat
	zoom = '14'
else
	lon =  h(params['lon'] || 'null')
	lat =  h(params['lat'] || 'null')
	zoom =  h(params['zoom'] || '14')
end
%>

	You need a Flash player to use Potlatch, the
    OpenStreetMap Flash editor. You can download Flash Player from Adobe.com.

    Several other options are also available
    for editing OpenStreetMap.

<%= javascript_include_tag 'swfobject.js' %>

<% end %>


Fix text to make it clear the status update is on the website not in the email.

You have a new response to the <%= @info_request.law_used_full %> request
'<%= @info_request.title %>' that you made to
<%= @info_request.public_body.name %>.

To view the response, click on the link below.

<%=@url%>

When you get there, please update the status to say if the response
contains any useful information.

Although all responses are automatically published, we depend on
you, the original requester, to evaluate them.

-- the WhatDoTheyKnow team

You have a new response to the <%= @info_request.law_used_full %> request
'<%= @info_request.title %>' that you made to
<%= @info_request.public_body.name %>.

To view the response, click on the link below.

<%=@url%>

When you get there, let us know if the response contains any
useful information.

Although all responses are automatically published, we depend on
you, the original requester, to evaluate them.

-- the WhatDoTheyKnow team


parent

parent

<% if @project.repository && @project.repository.is_a?(Repository::Git) %>

Git Repository

		<%= Gitosis::renderReadOnlyUrls(Setting.plugin_redmine_gitosis['readOnlyBaseUrls'], @project.identifier, @project.parent.identifier || false) %>

		<%= Gitosis::renderUrls(Setting.plugin_redmine_gitosis['developerBaseUrls'],@project.parent.identifier, @project.identifier, false,@project.parent.identifier || false)  %>

<% end %>

<% if @project.repository && @project.repository.is_a?(Repository::Git) %>

Git Repository

	<% if @project.parent%>

		<%= Gitosis::renderReadOnlyUrls(Setting.plugin_redmine_gitosis['readOnlyBaseUrls'],@project.parent.identifier, @project.identifier) %>

		<%= Gitosis::renderUrls(Setting.plugin_redmine_gitosis['developerBaseUrls'],@project.parent.identifier, @project.identifier, false)  %>
	<%else%>

		<%= Gitosis::renderReadOnlyUrls(Setting.plugin_redmine_gitosis['readOnlyBaseUrls'], @project.identifier) %>

		<%= Gitosis::renderUrls(Setting.plugin_redmine_gitosis['developerBaseUrls'], @project.identifier, false)  %>
	<%end%>

<% end %>


Fixed named route

Fixed named route

<% form_tag :action => 'password_recover' do %>

Email
	<%= text_field :user, :email, :class => "big" %>

<%= submit_tag "Recover Password" %> <%= link_to "I remember my password", typus_login_url %>

<% end %>

<% form_tag :action => 'password_recover' do %>

Email
	<%= text_field :user, :email, :class => "big" %>

<%= submit_tag "Recover Password" %> <%= link_to "I remember my password", login_url %>

<% end %>


minor change to publishing rights flash message

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

Submit work for <%= @student.assignment.name %>

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>

<%
@user = session[:user]
if(@user.master_permission_granted == nil && !@student.permission_granted)%>

Your work cannot be published because you haven't granted us publishing permissions.

Click <%= link_to 'here', :action =>'view_publishing' %> to set your publishing preferences.

<%end%>

<%= link_to "View feedback on submissions",{:action => 'view_feedback', :id => @student.id} %>

<% if @student.assignment.wiki_type_id == 1%>
Submit your work for the assignment titled: <%= @student.assignment.name %>

<%= form_tag({:action=>'submit'},:multipart => true, :name=>'submit_form')%>
<input type="text" name="submission" size=40 value = " "/><input type="submit" name="upload_link" value="Upload link"/>
<%= end_form_tag%>
<%= form_tag({:action=>'submit'},:multipart => true, :name=>'submit_form')%>

<input type="file" id="uploaded_file" name="uploaded_file" size=40 />
<input type="submit" name="upload_file" value="Upload file" onclick="checkIfFileExists('Upload');"/>

<% if @student.directory_num != nil and @student.directory_num >= 0 %>

File and folder actions

	<input style="margin-top:0.3em" type="button" onclick="createNewFolder()" name="create_new_folder" value="Create new folder" >
	<input type="button" onclick="copySelectedFile()" name="copy_selected_file" value="Copy selected file" >
	<input type="button" onclick="moveSelectedFile()" name="move_selected_file" value="Move selected file">
	<input type="button" onclick="renameFile()" name="rename_file" value="Rename selected file" />
	<input type="submit" name="delete_files" value="Delete selected file" onclick="checkIfFileExists('Delete selected file');" />

			Directory <%= select(:current_folder, :name,
					   @folders, {},
					   {:onchange => "document.forms[0].submit()"} ) %>

					Name
					Size
					Type
					Date Modified

				<%  i = 0
					for file in @files %>

						<input type=radio id="chk_files_<%= i %>" name="chk_files[<%= i %>]">
						<input type=hidden id="filenames_<%=i%>" name="filenames[<%= i %>]" value="<%= File.basename(file) %>">
						<% i = i + 1 %>
						<%= link_to File.basename(file), :action => 'submit', :id => @student.id, :download => File.basename(file), "current_folder[name]" => @current_folder.name %>

					<%= File.size(file) %>

						<% base = File.basename(file)
						   if base.split(".").size > 1 %>
							<%= base.split(".")[base.split(".").size-1] %>
						<% end %>

					<%= File.mtime(file) %>

					<% end %>

<% end %>
</form>

<%end%>
<% if @link != nil %>

Hyperlink:
<a href="<%= @link %>" target="new"><%= @link %>

<% end %>

<%if(@review_of_review_mappings.size > 0)%>

Reviews of reviews

  <%ror_no = 1%>
   <% for ror_map in @review_of_review_mappings %>
  <%
  @ror = ReviewOfReview.find_by_review_of_review_mapping_id(ror_map.id) %>
  <% if (@ror)%>

Review of Review <%=ror_no%>  <%= link_to "View",{:controller => 'review_of_review', :action => 'view_review_of_review', :id => @ror.id} %>
  <% end %>
  <%ror_no += 1
  	end
  end%>

Submit work for <%= @student.assignment.name %>

<% if flash[:notice] != nil and flash[:notice].strip != "" %>

	<%= flash[:notice] %>

<% end %>

<%
@user = session[:user]
if(@user.master_permission_granted == nil && !@student.permission_granted)%>

Your work cannot be published because you haven't granted us permission to publish your work.

Click <%= link_to 'yes', :action =>'set_publish_permission_yes', :id => @student.id%> to grant permission for this work.

Click <%= link_to 'always', :action =>'set_publish_master_permission_yes', :id => @student.id%> to grant permission for all your work.

Click <%= link_to 'never', :action =>'set_publish_master_permission_no', :id => @student.id%> to deny permission for all your work.

<%end%>

<%= link_to "View feedback on submissions",{:action => 'view_feedback', :id => @student.id} %>

<% if @student.assignment.wiki_type_id == 1%>
Submit your work for the assignment titled: <%= @student.assignment.name %>

<%= form_tag({:action=>'submit'},:multipart => true, :name=>'submit_form')%>
<input type="text" name="submission" size=40 value = " "/><input type="submit" name="upload_link" value="Upload link"/>
<%= end_form_tag%>
<%= form_tag({:action=>'submit'},:multipart => true, :name=>'submit_form')%>

<input type="file" id="uploaded_file" name="uploaded_file" size=40 />
<input type="submit" name="upload_file" value="Upload file" onclick="checkIfFileExists('Upload');"/>

<% if @student.directory_num != nil and @student.directory_num >= 0 %>

File and folder actions

	<input style="margin-top:0.3em" type="button" onclick="createNewFolder()" name="create_new_folder" value="Create new folder" >
	<input type="button" onclick="copySelectedFile()" name="copy_selected_file" value="Copy selected file" >
	<input type="button" onclick="moveSelectedFile()" name="move_selected_file" value="Move selected file">
	<input type="button" onclick="renameFile()" name="rename_file" value="Rename selected file" />
	<input type="submit" name="delete_files" value="Delete selected file" onclick="checkIfFileExists('Delete selected file');" />

			Directory <%= select(:current_folder, :name,
					   @folders, {},
					   {:onchange => "document.forms[0].submit()"} ) %>

					Name
					Size
					Type
					Date Modified

				<%  i = 0
					for file in @files %>

						<input type=radio id="chk_files_<%= i %>" name="chk_files[<%= i %>]">
						<input type=hidden id="filenames_<%=i%>" name="filenames[<%= i %>]" value="<%= File.basename(file) %>">
						<% i = i + 1 %>
						<%= link_to File.basename(file), :action => 'submit', :id => @student.id, :download => File.basename(file), "current_folder[name]" => @current_folder.name %>

					<%= File.size(file) %>

						<% base = File.basename(file)
						   if base.split(".").size > 1 %>
							<%= base.split(".")[base.split(".").size-1] %>
						<% end %>

					<%= File.mtime(file) %>

					<% end %>

<% end %>
</form>

<%end%>
<% if @link != nil %>

Hyperlink:
<a href="<%= @link %>" target="new"><%= @link %>

<% end %>

<%if(@review_of_review_mappings.size > 0)%>

Reviews of reviews

  <%ror_no = 1%>
   <% for ror_map in @review_of_review_mappings %>
  <%
  @ror = ReviewOfReview.find_by_review_of_review_mapping_id(ror_map.id) %>
  <% if (@ror)%>

Review of Review <%=ror_no%>  <%= link_to "View",{:controller => 'review_of_review', :action => 'view_review_of_review', :id => @ror.id} %>
  <% end %>
  <%ror_no += 1
  	end
  end%>


Clean up frontpage code to get rid of hardcoded news info

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

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

1

2

3

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

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

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

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

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

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

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

Twittear

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

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

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

              <% end %>

<%= _("Novedades") %>

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

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

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

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

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

                  <% if position.odd? %>

                  <% end %>
                <% end %>

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

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

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

<% end %>

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

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

1

2

3

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

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

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

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

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

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

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

Twittear

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

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

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

              <% end %>

<%= _("Novedades") %>

                <%
                  # XXX: The ugliest hack, for launch day only
                  leads = [
                    'Te animamos a que dones unos euros para que podamos seguir funcionando con éxito.',
                    'José Luis Ayllón asegura en Brasilia que incorporarán al texto algunas de las aportaciones de la sociedad.',
                    'Más de 50 naciones presentan en Brasilia sus planes de Gobierno Abierto. Lee lo que presenta nuestro país.',
                    'Más de 85.000 personas han firmado ya una campaña para exigir una ley más fuerte y exhaustiva.',
                    'Identificamos innovaciones que permiten la participación de la sociedad en leyes y contenidos periodísticos.',
                    'Mañana cierra la consulta pública del anteproyecto de ley de transparencia. Aquí tienes sugerencias concretas.',
                    'El Gobierno publicó el pasado lunes 26 de marzo el borrador del anteproyecto de la Ley de Transparencia, Acceso a la Información Pública y Buen Gobierno.',
                    'Se pregunta sobre todo a ministerios sobre subvenciones, facturas impagadas o denuncias a los cuerpos de seguridad.',
                    'El texto del borrador del anteproyecto de ley se podrá consultar desde hoy.',
                    'Los políticos la han prometido desde 2004, pero España sigue aún sin ley de transparencia.',
                    'Ya estamos en marcha. Entra con nosotros en el fascinante mundo de pedir información que es tuya.'
                  ];

                  position = 0;
                  for item in @blog_items[0..3]:
                    position = position + 1; %>

                  <div class="frontpage-blog-post <%= position.even? ? 'right' : 'left' %>" <%= position == 3 ? '' 'style="clear:left"' : '' %> >
                    <img src="/tuderechoasaber-theme/images/posts/<%= item['title'].to_s.gsub(/[^A-Za-z]/,'').downcase %>.jpg" width="278" height="128"/>

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

<%= h excerpt(leads[position-1], "", 200) %>

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

                <% end %>

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

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

<% end %>


Relabeled "browse" to "home" on collection tabs.

    <% if selected == 1 %>

        home

    <% else %>

        <%= link_to('home',
                    { :controller => 'collection',
                      :action => 'show',
                      :collection_id => collection_id,
                      :ol => 'c_tab_browse' }) %>

    <% end %>

    <% article_list_options = { :controller => 'article',
                                 :action => 'list',
                                 :collection_id => collection_id,
                                :ol => 'c_tab_subjects' } %>
    <% if current_page? article_list_options %>

	        articles

    <% else %>

  	      <%= link_to('articles', article_list_options)%>

    <% end %>

    <% collection_stat_options = { :controller => 'statistics',
                                 :action => 'collection',
                                 :collection_id => collection_id,
                                :ol => 'c_tab_statistics' } %>
    <% if current_page? collection_stat_options %>

        stats

    <% else %>

        <%= link_to('stats',
                    collection_stat_options) %>

    <% end %>

    <% if logged_in? && current_user.like_owner?(@collection) %>
	    <% if selected == 2 %>

	        settings

	    <% else %>

	        <%= link_to('settings',
	                    { :controller => 'collection',
	                      :action => 'edit',
	                      :collection_id => collection_id,
                        :ol => 'c_tab_setting' }) %>

	    <% end %>
	    <% if selected == 3 %>

	        categories

	    <% else %>

	        <%= link_to('categories',
	                    { :controller => 'category',
	                      :action => 'manage',
	                      :collection_id => collection_id,
                        :ol => 'c_tab_cats' }) %>

	    <% end %>
    <% end %>

    <% if logged_in? && current_user.like_owner?(@collection) %>
	    <% collection_owners_options = { :controller => 'collection',
	                                     :action => 'owners',
	                                     :collection_id => collection_id,
	                                     :ol => 'c_tab_owners' } %>
	    <% if current_page? collection_owners_options %>

	        owners

	    <% else %>

	        <%= link_to('owners',
	                    collection_owners_options) %>

	    <% end %>

    <% end %>

    <% if selected == 1 %>

        browse

    <% else %>

        <%= link_to('browse',
                    { :controller => 'collection',
                      :action => 'show',
                      :collection_id => collection_id,
                      :ol => 'c_tab_browse' }) %>

    <% end %>

    <% article_list_options = { :controller => 'article',
                                 :action => 'list',
                                 :collection_id => collection_id,
                                :ol => 'c_tab_subjects' } %>
    <% if current_page? article_list_options %>

	        articles

    <% else %>

  	      <%= link_to('articles', article_list_options)%>

    <% end %>

    <% collection_stat_options = { :controller => 'statistics',
                                 :action => 'collection',
                                 :collection_id => collection_id,
                                :ol => 'c_tab_statistics' } %>
    <% if current_page? collection_stat_options %>

        stats

    <% else %>

        <%= link_to('stats',
                    collection_stat_options) %>

    <% end %>

    <% if logged_in? && current_user.like_owner?(@collection) %>
	    <% if selected == 2 %>

	        settings

	    <% else %>

	        <%= link_to('settings',
	                    { :controller => 'collection',
	                      :action => 'edit',
	                      :collection_id => collection_id,
                        :ol => 'c_tab_setting' }) %>

	    <% end %>
	    <% if selected == 3 %>

	        categories

	    <% else %>

	        <%= link_to('categories',
	                    { :controller => 'category',
	                      :action => 'manage',
	                      :collection_id => collection_id,
                        :ol => 'c_tab_cats' }) %>

	    <% end %>
    <% end %>

    <% if logged_in? && current_user.like_owner?(@collection) %>
	    <% collection_owners_options = { :controller => 'collection',
	                                     :action => 'owners',
	                                     :collection_id => collection_id,
	                                     :ol => 'c_tab_owners' } %>
	    <% if current_page? collection_owners_options %>

	        owners

	    <% else %>

	        <%= link_to('owners',
	                    collection_owners_options) %>

	    <% end %>

    <% end %>


some meta tags for the documentation pages

git-svn-id: 50a8ad97cae5d6ab203d2d535a9b32cd3858a8ac@369 c04ce798-636b-4ca8-9149-0f9336831111

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

  <title>CruiseControl.rb<%= @title ? " - " + @title : '' %></title>
  <meta name="description" content="Lightweight continuous integration tool" />
  <meta name="keywords"
        content="continuous integration, cruisecontrol, ruby, rails, build, deployment, software, development, agile" />
  <%= stylesheet_link_tag '/thoughtworks_studios/reset', :media => 'all' %>
  <%= stylesheet_link_tag '/thoughtworks_studios/fonts', :media => 'all' %>
  <%= stylesheet_link_tag '/thoughtworks_studios/grids', :media => 'all' %>
  <%= stylesheet_link_tag '/thoughtworks_studios/base', :media => 'all' %>
  <%= stylesheet_link_tag 'documentation', :media => 'all' %>
  <%= javascript_include_tag '/thoughtworks_studios/page' %>
  <%= javascript_include_tag :defaults %>

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

          <%= render :partial => '/documentation/' + (@sidebar || 'sidebar_docs') %>

		        <%= yield %>

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

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

  <title>CruiseControl.rb<%= @title ? " - " + @title : '' %></title>
  <%= stylesheet_link_tag '/thoughtworks_studios/reset', :media => 'all' %>
  <%= stylesheet_link_tag '/thoughtworks_studios/fonts', :media => 'all' %>
  <%= stylesheet_link_tag '/thoughtworks_studios/grids', :media => 'all' %>
  <%= stylesheet_link_tag '/thoughtworks_studios/base', :media => 'all' %>
  <%= stylesheet_link_tag 'documentation', :media => 'all' %>
  <%= javascript_include_tag '/thoughtworks_studios/page' %>
  <%= javascript_include_tag :defaults %>

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

          <%= render :partial => '/documentation/' + (@sidebar || 'sidebar_docs') %>

		        <%= yield %>

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


Remove RSpec version from debug page as it's not available in production

<% @title = "Debug" %>

<%=@title%>

You are <%= h @admin_current_user %>

Version numbers

Alaveteli version: <%= link_to @current_version, @github_origin + @current_version %>

Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %>

Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %>

RUBY_VERSION <%=h RUBY_VERSION %>

Rails::VERSION::STRING <%=h Rails::VERSION::STRING%>

TMail::VERSION::STRING <%=h TMail::VERSION::STRING%>

Xapian::version_string <%=h Xapian::version_string%>

Configuration

environment: <%=h Rails::configuration.environment %>

environment_path: <%=h Rails::configuration.environment_path %>

framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %>

Environment variables

<% for k,v in @request_env %>

<%=h k%>	<%=h v%>

<% end %>

Parameters

<% for k,v in params %>

<%=h k%>	<%=h v%>

<% end %>

Session

<% for k,v in session %>

<%=h k%>	<%=h v%>

<% end %>

<% @title = "Debug" %>

<%=@title%>

You are <%= h @admin_current_user %>

Version numbers

Alaveteli version: <%= link_to @current_version, @github_origin + @current_version %>

Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %>

Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %>

RUBY_VERSION <%=h RUBY_VERSION %>

Rails::VERSION::STRING <%=h Rails::VERSION::STRING%>

TMail::VERSION::STRING <%=h TMail::VERSION::STRING%>

Xapian::version_string <%=h Xapian::version_string%>

Spec::VERSION::STRING <%=h Spec::VERSION::STRING%>

Configuration

environment: <%=h Rails::configuration.environment %>

environment_path: <%=h Rails::configuration.environment_path %>

framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %>

Environment variables

<% for k,v in @request_env %>

<%=h k%>	<%=h v%>

<% end %>

Parameters

<% for k,v in params %>

<%=h k%>	<%=h v%>

<% end %>

Session

<% for k,v in session %>

<%=h k%>	<%=h v%>

<% end %>


Don't make questionnaire edits into deletes...

<%=h @questionnaire.title%>

<%= error_messages_for :questionnaire %>
<%= javascript_include_tag "layout.js" %>

<%= render :partial => "toolbar" %>

<% @editing = logged_in? and logged_in_person.permitted?(@questionnaire, "edit") -%>

<% form_for(:questionnaire, @questionnaire, :url => questionnaire_path(@questionnaire), :html => { :method => :put }) do |f| %>

      <%= jipe_editor @questionnaire, :title, :editing => @editing %>

    <% authors = @questionnaire.permitted_people("edit").collect {|p| p.name}.join(", ") -%>
    <% if authors.length > 0 -%>

      By <%=h authors %>
    <% end -%>

    <% if @editing -%>

Tags:
      <%=text_field_tag "questionnaire[tags]", @questionnaire.tag_names.join(", ") %>
    <% elsif @questionnaire.tags.size > 0 -%>

Tags:
      <%=h @questionnaire.tag_names.join(", ") %>
    <% end -%>

      <%= pluralize(@questionnaire.pages.count, "page") %>

      <%= pluralize(@questionnaire.fields.count, "question") %>

Welcome page

    <% if @editing -%>

The welcome page is the first thing your visitors will see before starting your survey.  You can put any introductory
      text you'd like on the welcome page.

For advanced formatting and other customizations, you can insert custom HTML code by clicking the "HTML" tab.

      <%= render :partial => "html_editor", :locals => {:obj => @questionnaire, :field => "welcome_text"}%>
    <% else -%>
	  <% if @questionnaire.welcome_text.blank? -%>

This survey has no custom welcome page content.

	  <% else -%>

          <%= sanitize @questionnaire.welcome_text %>

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

    <% if @editing -%>

<%= submit_tag "Save changes" %>

    <% end -%>
<% end %>

<% if @editing and logged_in? and logged_in_person.permitted?(@questionnaire, "destroy") -%>

Delete this survey

This will permanently delete this survey, along with all the responses to it.
	We highly recommend exporting <%= link_to "the survey", :action => "export" %> and
	<%= link_to "its responses", export_responses_path(@questionnaire) %> before proceeding.

  <%= button_to "Delete this survey", questionnaire_path(@questionnaire), :method => "delete",
	  :confirm => "Are you sure you wish to delete the survey \"#{@questionnaire.title}\" and all " +
				  "its responses?  We recommend exporting it to a file first, if you haven't already " +
				  "done so." %>
<% end -%>

<%=h @questionnaire.title%>

<%= error_messages_for :questionnaire %>
<%= javascript_include_tag "layout.js" %>

<%= render :partial => "toolbar" %>

<% @editing = logged_in? and logged_in_person.permitted?(@questionnaire, "edit") -%>

<% form_for(:questionnaire, @questionnaire, :url => questionnaire_path(@questionnaire), :html => { :method => :put }) do |f| %>

      <%= jipe_editor @questionnaire, :title, :editing => @editing %>

    <% authors = @questionnaire.permitted_people("edit").collect {|p| p.name}.join(", ") -%>
    <% if authors.length > 0 -%>

      By <%=h authors %>
    <% end -%>

    <% if @editing -%>

Tags:
      <%=text_field_tag "questionnaire[tags]", @questionnaire.tag_names.join(", ") %>
    <% elsif @questionnaire.tags.size > 0 -%>

Tags:
      <%=h @questionnaire.tag_names.join(", ") %>
    <% end -%>

      <%= pluralize(@questionnaire.pages.count, "page") %>

      <%= pluralize(@questionnaire.fields.count, "question") %>

Welcome page

    <% if @editing -%>

The welcome page is the first thing your visitors will see before starting your survey.  You can put any introductory
      text you'd like on the welcome page.

For advanced formatting and other customizations, you can insert custom HTML code by clicking the "HTML" tab.

      <%= render :partial => "html_editor", :locals => {:obj => @questionnaire, :field => "welcome_text"}%>
    <% else -%>
	  <% if @questionnaire.welcome_text.blank? -%>

This survey has no custom welcome page content.

	  <% else -%>

          <%= sanitize @questionnaire.welcome_text %>

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

    <% if @editing -%>

<%= submit_tag "Save changes" %>

    <% end -%>

	<% if logged_in? and logged_in_person.permitted?(@questionnaire, "destroy") -%>

Delete this survey

This will permanently delete this survey, along with all the responses to it.
	    We highly recommend exporting <%= link_to "the survey", :action => "export" %> and
		<%= link_to "its responses", export_responses_path(@questionnaire) %> before proceeding.

	  <%= button_to "Delete this survey", questionnaire_path(@questionnaire), :method => "delete",
		  :confirm => "Are you sure you wish to delete the survey \"#{@questionnaire.title}\" and all " +
		              "its responses?  We recommend exporting it to a file first, if you haven't already " +
		              "done so." %>
	<% end -%>
<% end %>


Spliting welcome message on account/signup

<% if @register_pending %>

<%= _("Welcome to %s!") % environment.name %>

<%= _("Thanks for signing up, we're thrilled to have you on our social network!") %>

<%= _("Firstly, some tips for getting started:") %>

<%= _("Confirm your account!") %>

<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>

<%= _("You won't appear as %s until your account is confirmed.") % link_to user, {:controller => :browse, :action => :people, :filter => 'more_recent'}, :target => '_blank' %>

<%= _("What to do next?") %>

<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to _('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank' %>

<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to _('Documentation'), {:controller => 'doc'}, :target => '_blank' %>

<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to _('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank' %>

<%= _("Start exploring and have fun!") %>

<% else %>

<%= _('Sign up for %s!') % environment.name %>

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

<% if @register_pending %>

  <%= _("
Welcome to %s!

Thanks for signing up, we're thrilled to have you on our social network!

Firstly, some tips for getting started:

Confirm your account!

You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.

You won't appear as a user until your account is confirmed.

What to do next?

Customize your profile. Upload an avatar and let your friends find you easily :)

Learn the guidelines. Read the Documentation for more details on how to use new social network!

Invite and find your Gmail, Yahoo and Hotmail contacts!

Start exploring and Have fun!
" % [environment.name, url_for(:controller => :browse, :action => :people, :filter => 'more_recent')]) %>

<% else %>

<%= _('Sign up for %s!') % environment.name %>

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


Fix formatting of changeset details.

Fix formatting of changeset details.

    Created at:
    <%= h(changeset_details.created_at) %>

    Closed at:
    <%= h(changeset_details.closed_at) %>

  <% if changeset_details.user.data_public? %>

      Belongs to:
      <%= link_to h(changeset_details.user.display_name), :controller => "user", :action => "view", :display_name => changeset_details.user.display_name %>

  <% end %>

  <% unless changeset_details.tags_as_hash.empty? %>

      Tags:

          <%= render :partial => "tag", :collection => changeset_details.tags_as_hash %>

  <% else %>

      Tags
      There are no tags for this changeset

  <% end %>

    Bounding box:
    <% if changeset_details.max_lat.nil? or changeset_details.min_lat.nil? or changeset_details.max_lon.nil? or changeset_details.min_lon.nil? %>
      No bounding box has been stored for this changeset.
    <% else %>

            <%= changeset_details.max_lat/GeoRecord::SCALE.to_f -%>

            <%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%>
            <%= changeset_details.max_lon/GeoRecord::SCALE.to_f -%>

            <%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%>

    <% end %>

  <% unless @nodes.empty? %>

      Has the following <%= @node_pages.item_count %> nodes:

          <% @nodes.each do |node| %>

<%= link_to "Node #{node.id.to_s}, version #{node.version.to_s}", :action => "node", :id => node.id.to_s %>

          <% end %>

    <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
  <% end %>

  <% unless @ways.empty? %>

      Has the following <%= @way_pages.item_count %> ways:

          <% @ways.each do |way| %>

<%= link_to "Way #{way.id.to_s}, version #{way.version.to_s}", :action => "way", :id => way.id.to_s %>

          <% end %>
          <%=
          #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members
          %>

    <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
  <% end %>

  <% unless @relations.empty? %>

      Has the following <%= @relation_pages.item_count %> relations:

          <% @relations.each do |relation| %>

<%= link_to "Relation #{relation.id.to_s}, version #{relation.version.to_s}", :action => "relation", :id => relation.id.to_s %>

          <% end %>

    <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
  <% end %>

    Created at:
    <%= h(changeset_details.created_at) %>

    Closed at:
    <%= h(changeset_details.closed_at) %>

  <% if changeset_details.user.data_public? %>

      Belongs to:
      <%= link_to h(changeset_details.user.display_name), :controller => "user", :action => "view", :display_name => changeset_details.user.display_name %>

  <% end %>

  <% unless changeset_details.tags_as_hash.empty? %>

      Tags:

          <%= render :partial => "tag", :collection => changeset_details.tags_as_hash %>

  <% else %>

      Tags
      There are no tags for this changeset

  <% end %>

  <% if changeset_details.max_lat.nil? or changeset_details.min_lat.nil? or changeset_details.max_lon.nil? or changeset_details.min_lon.nil? %>

      No bounding box has been stored for this changeset.

  <% else %>

        Max Latitude: <%= changeset_details.max_lat/GeoRecord::SCALE.to_f -%>

        Min Longitude: <%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%>
        Max Longitude: <%= changeset_details.max_lon/GeoRecord::SCALE.to_f -%>

        Min Latitude: <%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%>

  <% end %>

  <% unless @nodes.empty? %>

      Has the following <%= @node_pages.item_count %> nodes:

          <% @nodes.each do |node| %>

<%= link_to "Node #{node.id.to_s}, version #{node.version.to_s}", :action => "node", :id => node.id.to_s %>

          <% end %>

    <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
  <% end %>

  <% unless @ways.empty? %>

      Has the following <%= @way_pages.item_count %> ways:

          <% @ways.each do |way| %>

<%= link_to "Way #{way.id.to_s}, version #{way.version.to_s}", :action => "way", :id => way.id.to_s %>

          <% end %>
          <%=
          #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members
          %>

    <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
  <% end %>

  <% unless @relations.empty? %>

      Has the following <%= @relation_pages.item_count %> relations:

          <% @relations.each do |relation| %>

<%= link_to "Relation #{relation.id.to_s}, version #{relation.version.to_s}", :action => "relation", :id => relation.id.to_s %>

          <% end %>

    <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
  <% end %>


renderUrls(baseUrlStr, projectId, isReadOnly, parent) not renderUrls(baseUrlStr, parent, projectId, isReadOnly, parent)

<% if @project.repository && @project.repository.is_a?(Repository::Git) %>

Git Repository

		<%= Gitosis::renderReadOnlyUrls(Setting.plugin_redmine_gitosis['readOnlyBaseUrls'], @project.identifier, @project.parent.identifier || false) %>

		<%= Gitosis::renderUrls(Setting.plugin_redmine_gitosis['developerBaseUrls'], @project.identifier, false,@project.parent.identifier || false)  %>

<% end %>

<% if @project.repository && @project.repository.is_a?(Repository::Git) %>

Git Repository

		<%= Gitosis::renderReadOnlyUrls(Setting.plugin_redmine_gitosis['readOnlyBaseUrls'], @project.identifier, @project.parent.identifier || false) %>

		<%= Gitosis::renderUrls(Setting.plugin_redmine_gitosis['developerBaseUrls'],@project.parent.identifier, @project.identifier, false,@project.parent.identifier || false)  %>

<% end %>


Formatting

Formatting

<% @page_title = 'Admin: Racers' %>

<%= render "shared/admin/tabs" %>

<%= start_form_tag({}, {:method => 'get'}) %>
	Name: <%= text_field_tag 'name', @name, :size => 30 %>

	<%# Nasty code required to show consisten meesages with and without AJAX. At least it could be in a helper. %>

		<%= image_tag('/images/icons/warn.gif', :height => 11, :width => 11, :id => 'warn_icon') %>
		<%= flash[:warn] %>
		<%= image_tag('/images/icons/confirmed.gif', :height => 11, :width => 11, :id => 'message_icon') %>
		<%= flash[:notice] %>

	<%= update_page_tag {|page| page.hide('message_icon')} unless flash[:notice] -%>
	<%= update_page_tag {|page| page.hide('warn_icon')} unless flash[:warn] -%>
<%= end_form_tag %>

				        Name
			            Team
			            Aliases
			            Road
			            MTB
			            DH
			            Cross
						Member

					<%= render :partial => "racer", :collection => @racers %>
					<% if @racers.empty? %>

						<%- if @name.blank? -%>
						Enter part of a racer's name
						<%- else -%>
						No racers found
						<%- end -%>

					<% end %>

			<%= form_tag({:action => 'preview_import'}, { :multipart => true }) %>

						<%=  link_image_to '/images/buttons/add.gif', :action => 'new' %>

							Import New Members:
							<%= file_field_tag "racers_file" %>
							<%= select_tag 'year', ['2007', '2006'] %>
							<%= submit_tag 'Import' %>

			<%= end_form_tag %>

<% @page_title = 'Admin: Racers' %>

<%= render "shared/admin/tabs" %>

<%= start_form_tag({}, {:method => 'get'}) %>
	Name: <%= text_field_tag 'name', @name, :size => 30 %>

	<%# Nasty code required to show consisten meesages with and without AJAX. At least it could be in a helper. %>

		<%= image_tag('/images/icons/warn.gif', :height => 11, :width => 11, :id => 'warn_icon') %>
		<%= flash[:warn] %>
		<%= image_tag('/images/icons/confirmed.gif', :height => 11, :width => 11, :id => 'message_icon') %>
		<%= flash[:notice] %>

	<%= update_page_tag {|page| page.hide('message_icon')} unless flash[:notice] -%>
	<%= update_page_tag {|page| page.hide('warn_icon')} unless flash[:warn] -%>
<%= end_form_tag %>

				        Name
			            Team
			            Aliases
			            Road
			            MTB
			            DH
			            Cross
						Member

					<%= render :partial => "racer", :collection => @racers %>
					<% if @racers.empty? %>

						<%- if @name.blank? -%>
						Enter part of a racer's name
						<%- else -%>
						No racers found
						<%- end -%>

					<% end %>

				<%= link_image_to '/images/buttons/add.gif', :action => 'new' %>

				<%= form_tag({:action => 'preview_import'}, { :multipart => true }) %>

Import New Members:

						<%= file_field_tag "racers_file" %>
						<%= select_tag 'year', ['2007', '2006'] %>
						<%= submit_tag 'Import' %>
				<%= end_form_tag %>


Don't show annotations table if there aren't any

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

<%=@title%>

<% for column in InfoRequest.content_columns %>
  <%= column.human_name %>: <%=h @info_request.send(column.name) %>

<% end %>
Created by: <%= user_both_links(@info_request.user) %>

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

Incoming email address: <%= link_to h(@info_request.incoming_email), "mailto:" + @info_request.incoming_email %>

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

Events

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

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

      <% if column.name == 'params_yaml' %>

<%= info_request_event.params_yaml %>

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

  <% end %>

<% end %>

Outgoing messages

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

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

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

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

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

<% end %>

Incoming messages

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

<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>">
  <%=h incoming_message.id %>
  <% for column in IncomingMessage.content_columns.map { |c| c.name } %>
    <%= simple_format( incoming_message.send(column) ) %>
  <% end %>

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

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

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

<% end %>

Annotations

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

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

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

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

  <% end %>

<% else %>

None yet.

<% end %>

Exim delivery logs

(Lines containing the request incoming email address, updated hourly.)

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>

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

<%=@title%>

<% for column in InfoRequest.content_columns %>
  <%= column.human_name %>: <%=h @info_request.send(column.name) %>

<% end %>
Created by: <%= user_both_links(@info_request.user) %>

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

Incoming email address: <%= link_to h(@info_request.incoming_email), "mailto:" + @info_request.incoming_email %>

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

Events

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

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

      <% if column.name == 'params_yaml' %>

<%= info_request_event.params_yaml %>

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

  <% end %>

<% end %>

Outgoing messages

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

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

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

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

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

<% end %>

Incoming messages

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

<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %>
  <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>">
  <%=h incoming_message.id %>
  <% for column in IncomingMessage.content_columns.map { |c| c.name } %>
    <%= simple_format( incoming_message.send(column) ) %>
  <% end %>

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

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

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

<% end %>

Annotations

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

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

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

<% end %>

Exim delivery logs

Lines containing the request incoming email address, updated hourly.

<% for exim_log_done_id, exim_logs in @info_request.exim_logs.group_by(&:exim_log_done_id) %>

<% for exim_log in exim_logs %><%=h exim_log.line%><% end %>

<% end %>
<% if @info_request.exim_logs.size == 0 %>

None (perhaps this is an old or a very new request)

<% end %>

Censor rules

<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %>


bringing LiveSearch up to speed. it now relies on form_remote_tag instead of a custom Ajax.Updater. the periodic
observer just triggers the onsubmit() from the form_remote_tag.

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

<% 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';",
                    :complete => "$('#{loading_indicator_id(:action => :search, :id => params[:id])}').style.visibility = 'hidden';",
                    :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
                    :update => active_scaffold_content_id,
                    :html => { :href => href, :id => search_form_id, :class => 'search' } %>
  <input type="text" name="search" size="50" value="<%= params[:search] -%>" class="text-input" id="<%= search_input_id %>" autocompleted="off" />
  <%= as_('Reset') -%>
  <%= loading_indicator_tag(:action => :search) %>
</form>

<%= form_tag params_for(:action => :update_table), :id => search_form_id, :class => 'search' %>
  <input type="text" name="search" value="<%= params[:search] -%>" class="text-input" id="<%= search_input_id %>" autocompleted="off" />
  <input type="reset" value="<%= as_('Reset') -%>" onclick="f = this.up('form'); f.reset(); f.onsubmit();" />
  <%= loading_indicator_tag(:action => :search) %>
</form>

<script type="text/javascript">
//<![CDATA[
  new TextFieldWithExample('<%= search_input_id %>', '<%= as_("Live Search") %>');
  new Form.Element.Observer('<%= search_input_id %>', 1.5, function(element, value) {
    if (!$(element.id)) return false; // because the element may have been destroyed
    new Ajax.Updater('<%= active_scaffold_content_id %>', "<%= url_for params_for(:action => :update_table, :escape => false) %>", {
      asynchronous:true, evalScripts:true,
      onComplete:function(request){Element.hide('<%= loading_indicator_id(:action => :search) %>');},
      onLoading:function(request){Element.show('<%= loading_indicator_id(:action => :search) %>');},
      parameters:Form.serialize($('<%= search_form_id %>'))
    });
    return false;
  });

  Form.focusFirstElement('<%= search_form_id -%>');
//]]>
</script>


move login form to new way of doing forms

Login:

Please login or <%= link_to 'create an account', :controller => 'user', :action => 'new' %>.

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

email address:	<%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %>

password:	<%= password_field('user', 'password',{:size => 50, :maxlength => 255}) %>

<%= submit_tag 'Login' %>
<% end %> (<%= link_to 'Lost your password?', :controller => 'user', :action => 'lost_password' %>)

Login:

Please login or <%= link_to 'create an account', :controller => 'user', :action => 'new' %>.

<%= start_form_tag :action => 'login' %>

email address:	<%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %>

password:	<%= password_field('user', 'password',{:size => 50, :maxlength => 255}) %>

<%= submit_tag 'Login' %>

<%= end_form_tag %> (<%= link_to 'Lost your password?', :controller => 'user', :action => 'lost_password' %>)


ActionItem154: fixing typo s/hire/here/

ActionItem154: fixing typo s/hire/here/

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

<%= _("Missing home page") %>

<%= _('%s did not choose an article for homepage yet.') % profile.name %>

<% if user == profile %>

<%= link_to _('Click here to set your homepage now!'), :controller => 'cms' %>

<% end %>

<%= _("Missing home page") %>

<%= _('%s did not choose an article for homepage yet.') % profile.name %>

<% if user == profile %>

<%= link_to _('Click hire to set your homepage now!'), :controller => 'cms' %>

<% end %>


fixed minor bug

fixed minor bug

<%
if (params["action"] == "journal_list")
  @page_title = "Browse by Journal Title: #{params['id']}"
else

  debugger
  @page_title = 'Journal titles that '

  @page_title +=
  (params["umlaut.title_search_type"] == "begins") ?
  'begin with ' : 'contain '

  @page_title += "'" + params['rft.jtitle'] + "'"
end

%>

<%= @page_title %>

<%= form_tag({:controller=>'search', :action=>'journal_search'}, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'}, nil)  %>
  <input type="hidden" id="rft_title" name="rft.title">
  <input type="hidden" id="rft_object_id" name="rft.object_id">
  <input type=hidden name="rfr_id" value="info:sid/sfxit.com:citation">
  Journal title: <%= text_field_with_auto_complete :journal, :title, {:name=>'rft.jtitle', :onchange=>'clearObjectId();',:autocomplete=>'off', :size=>'40', :value=>params['rft.jtitle']}, {:after_update_element=>'updateObjectId', :min_chars => 4}
  %>
  <select name="umlaut.title_search_type" id="sfx_title_search">
    <option value="contains">contains</option>
    <option value="begins">begins with</option>
    <option value="exact">exact match</option>
  </select>

  <input type="submit" name="Generate_OpenURL2" value="Search">
  <%= link_to('More search options', :controller => 'search') %>
</form>

<% if params["action"] == "journal_list" %>
  <%= render :partial=>"a_to_z" %>

<% end %>

<% unless @hits == 0%>

Showing results <%= @start_result_num %> through <%= @end_result_num %> of <%= @hits %>

<% end %>
<% if params["sfx.title_search"] == "begins"%>

Note: Alternate titles might have begun with your search terms

<% end %>

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

<% @display_results.each do | co |
@current_context_object = co
%>
  <% partial_name = @citation_partial || 'citation' %>
  <%= render :partial=>partial_name %>

<% end %>

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

<% if params["action"] == "journal_list" %>

  <%= render :partial=>"a_to_z" %>
<% end %>

<%
if (params["action"] == "journal_list")
  @page_title = "Browse by Journal Title: #{params['id']}"
else
  @page_title = 'Journal titles that '

  @page_title +=
  (params["umlaut.title_search_type"] == "begins") ?
  'begin with ' :
  @page_title += 'contain '

  @page_title += "'" + params['rft.jtitle'] + "'"
end

%>

<%= @page_title %>

<%= form_tag({:controller=>'search', :action=>'journal_search'}, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'}, nil)  %>
  <input type="hidden" id="rft_title" name="rft.title">
  <input type="hidden" id="rft_object_id" name="rft.object_id">
  <input type=hidden name="rfr_id" value="info:sid/sfxit.com:citation">
  Journal title: <%= text_field_with_auto_complete :journal, :title, {:name=>'rft.jtitle', :onchange=>'clearObjectId();',:autocomplete=>'off', :size=>'40', :value=>params['rft.jtitle']}, {:after_update_element=>'updateObjectId', :min_chars => 4}
  %>
  <select name="umlaut.title_search_type" id="sfx_title_search">
    <option value="contains">contains</option>
    <option value="begins">begins with</option>
    <option value="exact">exact match</option>
  </select>

  <input type="submit" name="Generate_OpenURL2" value="Search">
  <%= link_to('More search options', :controller => 'search') %>
</form>

<% if params["action"] == "journal_list" %>
  <%= render :partial=>"a_to_z" %>

<% end %>

<% unless @hits == 0%>

Showing results <%= @start_result_num %> through <%= @end_result_num %> of <%= @hits %>

<% end %>
<% if params["sfx.title_search"] == "begins"%>

Note: Alternate titles might have begun with your search terms

<% end %>

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

<% @display_results.each do | co |
@current_context_object = co
%>
  <% partial_name = @citation_partial || 'citation' %>
  <%= render :partial=>partial_name %>

<% end %>

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

<% if params["action"] == "journal_list" %>

  <%= render :partial=>"a_to_z" %>
<% end %>


ActionItem154: linking back to control panel

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

<%= _('Enterprise validations') %>

<% button_bar do %>
  <%= button(:edit, _('Edit validation info'), { :action => 'edit_validation_info' }, :help => _('Validation info is the information the enterprises will see about how your organization processes the enterprises validations it receives: validation methodology, restrictions to the types of enterprises the organization validates etc.'))  %>
  <%= button(:back, _('Go Back'), { :controller => 'profile_editor' }, :help => _('Go back to the control panel.')) %>
<% end %>

<%= _("Pending enterprise validations") %>

<% for pending in @pending_validations %>

<%= pending.name %>

      <%= _('Address') %>:
      <%= pending.address %>

      <%= _('Contact Phone') %>:
      <%= pending.contact_phone %>

      <%= _('Contact Person') %>:
      <%= pending.contact_person %>

  <%= link_to _("See details/approve/reject"), :action => 'details', :id => pending.code %>
<% end %>

<%= _('Processed enterprise validations') %>

<%= link_to _("See the list of processed enterprise validations"), :action => 'list_processed' %>


fixed a commented sample (tab from a Hash)

git-svn-id: f76eed8e487a44beae89d1eba0f570439618a0df@24 dbc01b36-f746-0410-8b88-c76c4e1ff24b

<%='<'+'%'%>
# this partial renders a tabnav, you can call it in your views with:
#   <%='<'+'%='%> tabnav :<%=name%> % > (just the tabnav)
# or, if you want a boxed tabnav:
#   <%% tabnav :<%=name%> do % >
#     your html here
#   <%% end % >
# (remove the space between % and >, we don't want to mess up your brand new tabnav :-))
#
# you can pass render_tabnav a few options:
#   :generate_css => true|false #=> generates a default inline css for the tabnav, defaults to false
#   :html => aHash #=> sets html options for the tabnav's div (es :html => {:class=> 'myCssClass', :id=>'myCssId'})
#
render_tabnav :<%=name%>,
              :generate_css => true do

  # this generates a tab for every controller in your app
  # you'll probably want to delete this and
  # add tabs one by one as shown below
  controller_names.each do |name|
    add_tab do |t|
      t.named name.camelize
      t.titled "Go to #{name.camelize}"
      t.links_to :controller => name
    end
  end

  #add_tab do |t|
  #  t.named 'Home'
  #  t.titled 'Home Page'
  #  t.links_to :controller => 'welcome'
  #end
  #
  # you can use restful routes with:
  #
  #add_tab do |t|
  #  t.named 'Users'
  #  t.links_to hash_for_users_path
  #end
  #
  #add_tab do |t|
  #  t.named 'Customers'
  #  t.links_to :controller => 'customers'
  #end
  #
  # # A tab can be initialized with a Hash like this:
  #
  # add_tab :name => 'welcome', :link => {:controller=>'welcome'}
  #
  # # You can have a dynamic name or link
  # # (this partial is evaluated in the page context, so it sees every helper or instance variable)
  #
  # add_tab do |t|
  #   t.named "#{current_user} details"
  #   t.links_to :controller => 'users', :action => 'show', :id => current_user.id
  # end
  #
  # # You can have an image inside
  #
  # add_tab do |t|
  #   t.named image_tag('test')
  #   t.links_to :controller => 'users', :action => 'show', :id => current_user.id
  # end
end
<%='%'+'>'%>

<%='<'+'%'%>
# this partial renders a tabnav, you can call it in your views with:
#   <%='<'+'%='%> tabnav :<%=name%> % > (just the tabnav)
# or, if you want a boxed tabnav:
#   <%% tabnav :<%=name%> do % >
#     your html here
#   <%% end % >
# (remove the space between % and >, we don't want to mess up your brand new tabnav :-))
#
# you can pass render_tabnav a few options:
#   :generate_css => true|false #=> generates a default inline css for the tabnav, defaults to false
#   :html => aHash #=> sets html options for the tabnav's div (es :html => {:class=> 'myCssClass', :id=>'myCssId'})
#
render_tabnav :<%=name%>,
              :generate_css => true do

  # this generates a tab for every controller in your app
  # you'll probably want to delete this and
  # add tabs one by one as shown below
  controller_names.each do |name|
    add_tab do |t|
      t.named name.camelize
      t.titled "Go to #{name.camelize}"
      t.links_to :controller => name
    end
  end

  #add_tab do |t|
  #  t.named 'Home'
  #  t.titled 'Home Page'
  #  t.links_to :controller => 'welcome'
  #end
  #
  # you can use restful routes with:
  #
  #add_tab do |t|
  #  t.named 'Users'
  #  t.links_to hash_for_users_path
  #end
  #
  #add_tab do |t|
  #  t.named 'Customers'
  #  t.links_to :controller => 'customers'
  #end
  #
  # # A tab can be initialized with a Hash like this:
  #
  # add_tab :name => 'welcome',
  #         :link => {:controller=>'welcome'}
  #
  # # You can have a dynamic name or link
  # # (this partial is evaluated in the page context, so it sees every helper or instance variable)
  #
  # add_tab do |t|
  #   t.named "#{current_user} details"
  #   t.links_to :controller => 'users', :action => 'show', :id => current_user.id
  # end
  #
  # # You can have an image inside
  #
  # add_tab do |t|
  #   t.named image_tag('test')
  #   t.links_to :controller => 'users', :action => 'show', :id => current_user.id
  # end
end
<%='%'+'>'%>