Text tweaks for sidebar.

Text tweaks for sidebar.

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

<% if @info_request.awaiting_description %>

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

<% end %>

<%=@title%>

A Freedom of Information request to
    <%= public_body_link(@info_request.public_body) %>
    by
    <%= user_link(@info_request.user) %>

    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            Please answer the question above so we know whether the
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> useful information.
        <% else %>
            This request has an unknown status. We're waiting for
            <%= user_link(@info_request.user) %> to read
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
            and update the status.
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@info_request.public_body) %>,
        due by <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'waiting_response_overdue' %>
        Currently overdue a response from <%=
        public_body_link(@info_request.public_body) %>. The
        <%= link_to "response was due", about_url + "#quickly_response" %>

        on <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was rejected by <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        The request was successful.
    <% elsif @status == 'partially_successful' %>
        The request was partially successful.
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> is waiting for your clarification.
            Please
            <%= link_to "send a follow up message", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#show_response_followup" %>.
        <% else %>
            The request is waiting for clarification.
            If you are
            <%= user_link(@info_request.user) %>, please
            <%= link_to "sign in", signin_url(:r => request.request_uri) %> to send a follow up message.
        <% end %>
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% else %>
        <% raise "unknown status " + @status %>
    <% end %>

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

People tracking this request

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

        <% for track_thing in @info_request.track_things %>

<%=user_link(track_thing.tracking_user)%>

        <% end %>

            <% if @existing_track %>
                You are already tracking this request.
            <% else %>
                <%= link_to "Track updates to this request", track_request_url(:url_title => @info_request.url_title) %>
                (by email or RSS)
            <% end %>

    <% else %>
        <%= link_to "Track updates to this request", track_request_url(:url_title => @info_request.url_title) %>
        (by email or RSS; be the first)
    <% end %>

    <% if @info_requests_same_user_same_body.size > 0 %>

Requests from same user to same authority

        <%= render :partial => 'sidebar_request_listing', :locals => { :info_requests => @info_requests_same_user_same_body } %>

    <% end %>

<% if @info_request.awaiting_description %>

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

<% end %>

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

<% if @info_request.awaiting_description %>

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

<% end %>

<%=@title%>

A Freedom of Information request to
    <%= public_body_link(@info_request.public_body) %>
    by
    <%= user_link(@info_request.user) %>

    <% if @info_request.awaiting_description %>
        <% if @is_owning_user %>
            Please answer the question above so we know whether the
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> useful information.
        <% else %>
            This request has an unknown status. We're waiting for
            <%= user_link(@info_request.user) %> to read
            <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
            and update the status.
        <% end %>
    <% elsif @status == 'waiting_response' %>
        Currently waiting for a response from <%= public_body_link(@info_request.public_body) %>,
        due by <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'waiting_response_overdue' %>
        Currently overdue a response from <%=
        public_body_link(@info_request.public_body) %>. The
        <%= link_to "response was due", about_url + "#quickly_response" %>

        on <%= simple_date(@info_request.date_response_required_by) %>.
    <% elsif @status == 'not_held' %>
        <%= public_body_link(@info_request.public_body) %> did not have the information requested.
    <% elsif @status == 'rejected' %>
        The request was rejected by <%= public_body_link(@info_request.public_body) %>.
    <% elsif @status == 'successful' %>
        The request was successful.
    <% elsif @status == 'partially_successful' %>
        The request was partially successful.
    <% elsif @status == 'waiting_clarification' %>
        <% if @is_owning_user %>
            <%=h @info_request.public_body.name %> is waiting for your clarification.
            Please
            <%= link_to "send a follow up message", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#show_response_followup" %>.
        <% else %>
            The request is waiting for clarification.
            If you are
            <%= user_link(@info_request.user) %>, please
            <%= link_to "sign in", signin_url(:r => request.request_uri) %> to send a follow up message.
        <% end %>
    <% elsif @status == 'requires_admin' %>
        This request has had an unusual response, and requires attention from the WhatDoTheyKnow team.
    <% else %>
        <% raise "unknown status " + @status %>
    <% end %>

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

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

People following this request

        <% for track_thing in @info_request.track_things %>

<%=user_link(track_thing.tracking_user)%>

        <% end %>

    <% else %>

Follow this request

    <% end %>

        <% if @existing_track %>
            You are already tracking this request.
        <% else %>
            <%= link_to "Track updates to this request", track_request_url(:url_title => @info_request.url_title) %>
            (by email or RSS)
        <% end %>

    <% if @info_requests_same_user_same_body.size > 0 %>

Some other requests made by
            <%= user_link(@info_request.user) %> to <%= public_body_link(@info_request.public_body) %>

        <%= render :partial => 'sidebar_request_listing', :locals => { :info_requests => @info_requests_same_user_same_body } %>
    <% end %>

<% if @info_request.awaiting_description %>

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

<% end %>


Added textilize call to summary for show_project.

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

<% @title = @title || "#{:show_project_title.l}: #{@project.title}" %>

<% # List Projects | Edit Project %>
<%=
    tabs = [[:show_project_list_projects.l,
             url_for(:action => 'list_projects')]]
    tabs.push([:show_project_admin_request.l,
        url_for(:action => 'admin_request', :id => @project.id)])
    if check_permission(@project.user_id)
        tabs.push([:show_project_edit.l,
                   url_for(:action => 'edit_project', :id => @project.id)])
    end
    if @project.admin_group.users.member?(@user)
      tabs.push([:show_project_add_members.l,
                 url_for(:action => 'add_members', :id => @project.id)])
    end
    show_tabs tabs
%>

<%= @title %>

<%= "#{:show_project_created.l}: #{@project.created_at.to_formatted_s(:db)}"%>

<%= "#{:show_project_by.l}: #{user_link(@project.user)}" %>

<%= "#{:show_project_user_group.l}: #{@project.user_group.name}" %>

<%= "#{:show_project_admin_group.l}: #{@project.admin_group.name}" %>

<%= "#{:show_project_summary.l}: #{textilize(sanitize(@project.summary))}" %>

      <% if @user and @project.user_group.users.member?(@user) %>
        <%= render(:partial => 'show_groups', :locals => { :project => @project, :user => @user }) %>
      <% end %>

      <% for draft in @project.draft_names %>
        <%= link_to(textilize_without_paragraph(draft.name.display_name),
                    :action => "show_draft", :id => draft.id) %>
        (<%= user_link(draft.user) %>)
      <% end %>

<% @title = @title || "#{:show_project_title.l}: #{@project.title}" %>

<% # List Projects | Edit Project %>
<%=
    tabs = [[:show_project_list_projects.l,
             url_for(:action => 'list_projects')]]
    tabs.push([:show_project_admin_request.l,
        url_for(:action => 'admin_request', :id => @project.id)])
    if check_permission(@project.user_id)
        tabs.push([:show_project_edit.l,
                   url_for(:action => 'edit_project', :id => @project.id)])
    end
    if @project.admin_group.users.member?(@user)
      tabs.push([:show_project_add_members.l,
                 url_for(:action => 'add_members', :id => @project.id)])
    end
    show_tabs tabs
%>

<%= @title %>

<%= "#{:show_project_created.l}: #{@project.created_at.to_formatted_s(:db)}"%>

<%= "#{:show_project_by.l}: #{user_link(@project.user)}" %>

<%= "#{:show_project_user_group.l}: #{@project.user_group.name}" %>

<%= "#{:show_project_admin_group.l}: #{@project.admin_group.name}" %>

<%= "#{:show_project_summary.l}: #{@project.summary}" %>

      <% if @user and @project.user_group.users.member?(@user) %>
        <%= render(:partial => 'show_groups', :locals => { :project => @project, :user => @user }) %>
      <% end %>

      <% for draft in @project.draft_names %>
        <%= link_to(textilize_without_paragraph(draft.name.display_name),
                    :action => "show_draft", :id => draft.id) %>
        (<%= user_link(draft.user) %>)
      <% end %>


Merge branch 'ai3016' into 'stable'

 Merge branch 'ai3016' into 'stable'

Don't show p tag on ProfileImageBlock? if there is no title

http://noosfero.org/Development/ActionItem3016

<% if block.title.present? %>

<%= block.title %>

<% end %>

      <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>

<% if show_name %>

<%= h block.owner.short_name %>

<% end %>

<div style="text-align: center; font-size: 75%; clear: both" id="profile-admin-url-<%= block.id %>">

<div class="profile-info-options" id="profile-info-options-<%= block.id %>">

<%= block.title %>

      <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>

<% if show_name %>

<%= h block.owner.short_name %>

<% end %>

<div style="text-align: center; font-size: 75%; clear: both" id="profile-admin-url-<%= block.id %>">

<div class="profile-info-options" id="profile-info-options-<%= block.id %>">


let the footer more clean, update some links, adding Gravento

<!doctype html>

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

      <%= yield %>

Conteúdos

Arquivos do blog

Github

Vídeos no blip.tv

Onde me encontrar

About.me

Twitter

Me adiciona

Participo

Guru-SP

Garoa

Gravento

Hugo L. Borges - Alguns direitos reservados

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

<!doctype html>

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

      <%= yield %>

Conteúdos

Arquivos do blog

Github

Vídeos no blip.tv

Onde me encontrar

About.me

Twitter

Me adiciona

Participo

Guru-SP

Garoa Hacker Clube

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

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


Fixed plugin name

Fixed plugin name

<%=l(:label_working_hours)%>

<% @cur_entry ||= WorkingHours.find_current(User.current) %>
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %>
<% user_projects_by_root.keys.sort.each do |root| %>
  <% issues = WorkingHours.task_issues(root) %>
    <%= link_to_remote h(root.name), {:update => "workinghours", :url => {:controller => 'working_hours', :action => 'startstop', :project_id => root.id}},
                        :class => "icon icon-time#{'-running' if !@cur_entry.nil? && @cur_entry.running? && (@cur_entry.issue_id.nil? || @cur_entry.issue_id==0) && root.id == @cur_entry.project_id}" %>
    <%= link_to_function('+/-', "Element.toggle('tasks#{root.id}')") if issues.size > 0 %>

    <div id="tasks<%= root.id %>" class="working_tasks" style="display:none">
    <% for issue in issues %>
        <%= link_to_remote "##{issue.id} "+h(issue.subject), {:update => "workinghours", :url => {:controller => 'working_hours', :action => 'startstop', :project_id => issue.project_id, :issue_id => issue.id}},
                        :class => "icon icon-time#{'-running' if !@cur_entry.nil? && @cur_entry.running? && @cur_entry.issue_id == issue.id}" %>

    <% end %>

    <% user_projects_by_root[root].sort.each do |project| %>
        <% next if project == root %>
        (<%= h(project.name) %>)

    <% end %>
<% end %>

<% for issue in WorkingHours.recent_issues(User.current).reverse %>
  <%= link_to_remote "##{issue.id} "+h(issue.subject), {:update => "workinghours", :url => {:controller => 'working_hours', :action => 'startstop', :project_id => issue.project_id, :issue_id => issue.id}},
                    :class => "icon icon-time#{'-running' if !@cur_entry.nil? && @cur_entry.running? && @cur_entry.issue_id == issue.id}" %>

<% end %>
<%= javascript_tag "clearInterval(curtimer);" %>
<% if @cur_entry.nil? || !@cur_entry.running? %>

<% else %>
  <% form_remote_tag :update => "workinghours", :url => {:controller => 'working_hours', :action => 'break'} do -%>
    <%= submit_tag 'Stop' %>
  <% end -%>

  <%= javascript_tag "curtimer = setInterval(\"timer($('timer'), new Date('#{@cur_entry.starting.strftime("%m/%d/%Y %H:%M:%S")}'))\", 1000);" %>
<% end %>

<%= link_to l(:label_working_hours_list), :controller => 'working_hours' %>

<% content_for :header_tags do %>
    <%= stylesheet_link_tag '/plugin_assets/redmine_working_hours/stylesheets/working_hours' %>
<% end %>

<%=l(:label_working_hours)%>

<% @cur_entry ||= WorkingHours.find_current(User.current) %>
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %>
<% user_projects_by_root.keys.sort.each do |root| %>
  <% issues = WorkingHours.task_issues(root) %>
    <%= link_to_remote h(root.name), {:update => "workinghours", :url => {:controller => 'working_hours', :action => 'startstop', :project_id => root.id}},
                        :class => "icon icon-time#{'-running' if !@cur_entry.nil? && @cur_entry.running? && (@cur_entry.issue_id.nil? || @cur_entry.issue_id==0) && root.id == @cur_entry.project_id}" %>
    <%= link_to_function('+/-', "Element.toggle('tasks#{root.id}')") if issues.size > 0 %>

    <div id="tasks<%= root.id %>" class="working_tasks" style="display:none">
    <% for issue in issues %>
        <%= link_to_remote "##{issue.id} "+h(issue.subject), {:update => "workinghours", :url => {:controller => 'working_hours', :action => 'startstop', :project_id => issue.project_id, :issue_id => issue.id}},
                        :class => "icon icon-time#{'-running' if !@cur_entry.nil? && @cur_entry.running? && @cur_entry.issue_id == issue.id}" %>

    <% end %>

    <% user_projects_by_root[root].sort.each do |project| %>
        <% next if project == root %>
        (<%= h(project.name) %>)

    <% end %>
<% end %>

<% for issue in WorkingHours.recent_issues(User.current).reverse %>
  <%= link_to_remote "##{issue.id} "+h(issue.subject), {:update => "workinghours", :url => {:controller => 'working_hours', :action => 'startstop', :project_id => issue.project_id, :issue_id => issue.id}},
                    :class => "icon icon-time#{'-running' if !@cur_entry.nil? && @cur_entry.running? && @cur_entry.issue_id == issue.id}" %>

<% end %>
<%= javascript_tag "clearInterval(curtimer);" %>
<% if @cur_entry.nil? || !@cur_entry.running? %>

<% else %>
  <% form_remote_tag :update => "workinghours", :url => {:controller => 'working_hours', :action => 'break'} do -%>
    <%= submit_tag 'Stop' %>
  <% end -%>

  <%= javascript_tag "curtimer = setInterval(\"timer($('timer'), new Date('#{@cur_entry.starting.strftime("%m/%d/%Y %H:%M:%S")}'))\", 1000);" %>
<% end %>

<%= link_to l(:label_working_hours_list), :controller => 'working_hours' %>

<% content_for :header_tags do %>
    <%= stylesheet_link_tag '/plugin_assets/redmine_working_hours_plugin/stylesheets/working_hours' %>
<% end %>


changed link name for no call num

changed link name for no call num

<%
=begin
  jrochkind's alternative partial for displaying holdings. Displays more
  information to deal with the more information we need to display from
  our Horizon. In tabular format. Customized for JH's needs, but should
  be usable by anyone.
=end
%>

<%= ServiceTypeValue[:holding].display_name_pluralize.titleize %>

<% holdings = get_service_type('holding') %>

<%
holdings.each do |p|
  target = p.view_data
%>

<%= target[:collection_str] %>

      <%= link_to (target[:call_number] || 'full info'), {:controller=>"link_router", :id=>p.id}, "target"=>"_blank" %>

      <% status_class = (target[:status] == "Not Charged" or target[:status] == "Available") ? 'available' : '' %>

      <%= target[:copy_str] %>
      <span class="<%= status_class %>"><%= target[:status]   %>

  <% unless target[:notes].blank? %>

<%= target[:notes] %>

  <% end %>

  <% unless target[:coverage_str].blank? %>

          <%
          # Only show first 4, with a 'more' link to make others visible if neccesary.
          hidden_div_id = "copies_#{p.id}"
          target[:coverage_str_array].each_index do |index|
              break if (index >= 3 &&
                        params['umlaut.holding_expand_all'] != 'true')
              s = target[:coverage_str_array][index]%>

<%= s %>

          <% end %>
          <% if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>

 <%= link_to_function("More...",
                     "Element.toggle('#{hidden_div_id}'); Element.update(this, 'Show/Hide...')",
                     :href => url_for( params.merge({ :'umlaut.holding_expand_all' => 'true'}))) %>

          <% end %>

          <% # okay, the rest in a hidden div, if more than 5
             if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>
          <div id=<%= hidden_div_id %> style="display:none; ">

            <% 5.upto( target[:coverage_str_array].length + 1) do |index| %>

<%= target[:coverage_str_array][index] %>

            <% end   %>

          <% end %>

  <% end %>
<%
end %>

<%
if holdings.empty?
   searches = get_service_type('holding_search')
    searches.each do | result_st |
      response = result_st.view_data %>

<%= link_to response[:display_text], {:controller=>'link_router', :id=>result_st.id}, 'target'=>"_blank" %>

<%
   end
end
if (holdings.blank? && searches.blank? && ! service_types_in_progress?(['holding', 'holding_search']))
%>

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

<%    session[:coins].each { | coins |
        unless coins[:text]
          label = image_tag(coins[:icon], :border=>0)
        else
          label = coins[:text]
        end
    %>

<a href="<%= coins[:host]%>?<%= @user_request.referent.to_context_object.kev %>" target="_blank"><%= label %>

    <%}%>

<%   end
%>
<% if service_types_in_progress?(['holding', 'holding_search']) %>

<%= render(:partial => "background_progress", :locals => { :svc_types => [ServiceTypeValue[:holding],ServiceTypeValue[:holding_search]], :current_set_empty => holdings.empty? } ) %>

<% end %>

<%
=begin
  jrochkind's alternative partial for displaying holdings. Displays more
  information to deal with the more information we need to display from
  our Horizon. In tabular format. Customized for JH's needs, but should
  be usable by anyone.
=end
%>

<%= ServiceTypeValue[:holding].display_name_pluralize.titleize %>

<% holdings = get_service_type('holding') %>

<%
holdings.each do |p|
  target = p.view_data
%>

<%= target[:collection_str] %>

      <%= link_to (target[:call_number] || 'catalog'), {:controller=>"link_router", :id=>p.id}, "target"=>"_blank" %>

      <% status_class = (target[:status] == "Not Charged" or target[:status] == "Available") ? 'available' : '' %>

      <%= target[:copy_str] %>
      <span class="<%= status_class %>"><%= target[:status]   %>

  <% unless target[:notes].blank? %>

<%= target[:notes] %>

  <% end %>

  <% unless target[:coverage_str].blank? %>

          <%
          # Only show first 4, with a 'more' link to make others visible if neccesary.
          hidden_div_id = "copies_#{p.id}"
          target[:coverage_str_array].each_index do |index|
              break if (index >= 3 &&
                        params['umlaut.holding_expand_all'] != 'true')
              s = target[:coverage_str_array][index]%>

<%= s %>

          <% end %>
          <% if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>

 <%= link_to_function("More...",
                     "Element.toggle('#{hidden_div_id}'); Element.update(this, 'Show/Hide...')",
                     :href => url_for( params.merge({ :'umlaut.holding_expand_all' => 'true'}))) %>

          <% end %>

          <% # okay, the rest in a hidden div, if more than 5
             if target[:coverage_str_array].length > 5 && params['umlaut.holding_expand_all'] != 'true' %>
          <div id=<%= hidden_div_id %> style="display:none; ">

            <% 5.upto( target[:coverage_str_array].length + 1) do |index| %>

<%= target[:coverage_str_array][index] %>

            <% end   %>

          <% end %>

  <% end %>
<%
end %>

<%
if holdings.empty?
   searches = get_service_type('holding_search')
    searches.each do | result_st |
      response = result_st.view_data %>

<%= link_to response[:display_text], {:controller=>'link_router', :id=>result_st.id}, 'target'=>"_blank" %>

<%
   end
end
if (holdings.blank? && searches.blank? && ! service_types_in_progress?(['holding', 'holding_search']))
%>

Not Available

<%
end %>

<% if session[:coins] %>

Check for holdings:

<%    session[:coins].each { | coins |
        unless coins[:text]
          label = image_tag(coins[:icon], :border=>0)
        else
          label = coins[:text]
        end
    %>

<a href="<%= coins[:host]%>?<%= @user_request.referent.to_context_object.kev %>" target="_blank"><%= label %>

    <%}%>

<%   end
%>
<% if service_types_in_progress?(['holding', 'holding_search']) %>

<%= render(:partial => "background_progress", :locals => { :svc_types => [ServiceTypeValue[:holding],ServiceTypeValue[:holding_search]], :current_set_empty => holdings.empty? } ) %>

<% end %>


better error messages for actual end users, including what types of services may have been effected

<%
         failed_dispatches = failed_service_dispatches()
         unless ( failed_dispatches.nil? || failed_dispatches.empty? ) %>

               (!)Some content may not be included due to errors:

          <% failed_dispatches.each do | dispatch | %>

            Some <%= dispatch.service.service_types_generated.collect { |type|
               type.display_name_pluralize.downcase}.join(",") %>
             from <a onclick="$('error_info<%= dispatch.id %>').toggle(); return false;"><%= dispatch.service.display_name %>
              <% exception_info = dispatch.exception_info %>
                <div id="error_info<%= dispatch.id %>" style="display: none;">
                technical error information

 <%= exception_info[:class_name] if exception_info %>

 <%= exception_info[:message] if exception_info %>

 dispatched service id: <%= dispatch.id %>

          <% end %>

       <% end %>

<%
         failed_dispatches = failed_service_dispatches()
         unless ( failed_dispatches.nil? || failed_dispatches.empty? ) %>

               (!)Warning! Due to error, some sources could not be included:

          <% failed_dispatches.each do | dispatch | %>

 <a onclick="el = document.getElementById('error_info<%= dispatch.id %>'); toggle_visible(el);"><%= dispatch.service.display_name %>
              <% exception_info = dispatch.exception_info %>
                <div id="error_info<%= dispatch.id %>" style="visibility: hidden; height:0">
                technical error information

 <%= exception_info[:class_name] if exception_info %>

 <%= exception_info[:message] if exception_info %>

 dispatched service id: <%= dispatch.id %>

          <% end %>

       <% end %>


Added a line break before the buttons.

Added a line break before the buttons.

<%= render({ :partial => '/shared/page_tabs',
             :locals => { :selected =>3,
                          :page_id => @page.id }}) %>

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

<%= @page.title %>

    <% if @preview_xml  %>

        <%= xml_to_html(@preview_xml) %>

    <% end %>

		  <% form_for(:page, @page, :url => { :action => 'save_transcription' }) do |f| %>
		    <%= hidden_field_tag(:page_id, @page.id) %>
		    <%= f.text_area :source_text, { :cols => 60 } %>

		    <%= submit_tag "Preview", :name => 'preview' %>
		    <%= submit_tag "Autolink", :name => 'autolink' %>
		    <%= submit_tag "Save", :name => 'save' %>
		  <% end%>

			<%= render({ :partial => 'shared/markup_help'}) %>

    <% if @work.transcription_conventions  %>
        <%= @work.transcription_conventions %>
    <% end %>

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


add category_id to resources link in header

<!DOCTYPE html>

  <title>ProtectedPlanet API</title>

    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="/protectedplanet-frontend/dist/style/main.css" rel="stylesheet">
  <link href="/custom.css" rel="stylesheet">

        protected planet

About

          Resources
          </button>

Terms & Conditions

        <button class="js-trigger">
          Thematic Areas
        </button>

            WDPA
            PARCC
            ICCA
            PAME

          Search

  <%= yield %>

     ProtectedPlanet 2014-2016. All rights reserved

        Send Feedback

  <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

  <% if settings.environment == :production %>

  <% end %>


 * Fix categories sidebar to link to category permalinks instead of the name.

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

<% unless @categories.blank? -%>

Categories

<% for category in @categories -%>
  <% if @sb_config['empty'] or category.article_counter.to_i>0 %>

<%= link_to category.name, :controller => "articles", :action => "category", :id => category.permalink  %> <% if @sb_config['count'] %>(<%= category.article_counter %>)<% end %>

  <% end %>
<% end -%>

<% end %>

<% unless @categories.blank? -%>

Categories

<% for category in @categories -%>
  <% if @sb_config['empty'] or category.article_counter.to_i>0 %>

<%= link_to category.name, :controller => "articles", :action => "category", :id => category.name  %> <% if @sb_config['count'] %>(<%= category.article_counter %>)<% end %>

  <% end %>
<% end -%>

<% end %>


article-versions: change button text

article-versions: change button text

  <%= button(:back, _('Go back to latest version'), {:action => 'view_page'}) %>

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

<%= _('This is the list of all versions of this content. Select a version to see it and then revert to it.') %>.

<% form_tag({:controller => 'content_viewer', :action => 'versions_diff', :profile => profile.identifier, :page => @page.path.split('/')}, :method => 'get') do %>

    <% @versions.each do |v| %>

        <%= radio_button_tag 'v1', v.version, false, :onclick => 'versionInputClicked(this)' %>
        <%= radio_button_tag 'v2', v.version, false, :onclick => 'versionInputClicked(this)' %>
        <%= link_to(_("Version #{v.version}"), @page.url.merge(:version => v.version)) %>
        <%= @page.version == v.version ? _('(current)') : '' %>
        <%= _('by %{author}') % {:author => link_to(@page.author_name(v.version), @page.author_url(v.version))} %>
        <%= show_time(v.updated_at) %>

    <% end %>

  <%= submit_button(:clock, _('Show differences between selected versions')) %>
<% end %>
<%= pagination_links @versions, :param_name => 'npage' %>

  <%= button(:back, _('Go back to post'), {:action => 'view_page'}) %>

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

<%= _('This is the list of all versions of this content. Select a version to see it and then revert to it.') %>.

<% form_tag({:controller => 'content_viewer', :action => 'versions_diff', :profile => profile.identifier, :page => @page.path.split('/')}, :method => 'get') do %>

    <% @versions.each do |v| %>

        <%= radio_button_tag 'v1', v.version, false, :onclick => 'versionInputClicked(this)' %>
        <%= radio_button_tag 'v2', v.version, false, :onclick => 'versionInputClicked(this)' %>
        <%= link_to(_("Version #{v.version}"), @page.url.merge(:version => v.version)) %>
        <%= @page.version == v.version ? _('(current)') : '' %>
        <%= _('by %{author}') % {:author => link_to(@page.author_name(v.version), @page.author_url(v.version))} %>
        <%= show_time(v.updated_at) %>

    <% end %>

  <%= submit_button(:clock, _('Show differences between selected versions')) %>
<% end %>
<%= pagination_links @versions, :param_name => 'npage' %>


Remove link to order period being in the edition state

  <% urls = [
      [_('Edition'), 'edition'],
      #[_('Call'), 'call'],
      [_('Orders'), 'orders'],
      #[_('Parcels'), 'parcels'],
      #[_('Redistribution'), 'redistribution'],
      #[_('Delivery'), 'delivery'],
      #[_('Close'), 'close'],
    ]
  %>
  <% view = params[:view] || session.status %>

    <% urls.each do |name, status| %>
      <% klass = "session-timeline-item #{timeline_class(session, status, view)}" %>
      <% if session.passed_by?(status) or session.status == status %>
        <%= link_to name, params.merge(:action => :edit, :id => session.id, :view => status), :class => klass %>
      <% else %>
        <span class="<%=klass%>"><%= name %>
      <% end %>
    <% end %>

  <%
    actions = {
      :edition => [
      ],
      :orders => [
        [ _('Spreadsheet with the orders'), {:action => :report_orders, :id => session.id} ],
        [ _('Spreadsheet with product listing'), {:action => :report_products, :id => session.id} ],
      ],
    }
    actions[:edition].unshift [ _('Finish cycle editing'), {:action => :step, :id => session.id, :method => :post},
      { :id => 'session-open-session' } ] unless session.passed_by?('edition')
    actions[:orders].unshift [ session.orders? ? _('Block orders period') : _('Close orders period'),
      {:action => :step, :id => session.id, :method => :post}, { :id => 'session-open-session' } ] unless session.passed_by?('orders')
  %>

  <% unless actions[view.to_sym].blank? %>

      <% actions[view.to_sym].each do |args| %>
        <%= link_to *args %>
      <% end %>
      <%= _('Actions') %>

  <% end %>

  <% urls = [
      [_('Edition'), 'edition'],
      #[_('Call'), 'call'],
      [_('Orders'), 'orders'],
      #[_('Parcels'), 'parcels'],
      #[_('Redistribution'), 'redistribution'],
      #[_('Delivery'), 'delivery'],
      #[_('Close'), 'close'],
    ]
  %>
  <% view = params[:view] || session.status %>

    <% urls.each do |name, status| %>
      <%= link_to name, params.merge(:action => :edit, :id => session.id, :view => status),
        :class => "session-timeline-item #{timeline_class(session, status, view)}" %>
    <% end %>

  <%
    actions = {
      :edition => [
      ],
      :orders => [
        [ _('Spreadsheet with the orders'), {:action => :report_orders, :id => session.id} ],
        [ _('Spreadsheet with product listing'), {:action => :report_products, :id => session.id} ],
      ],
    }
    actions[:edition].unshift [ _('Finish cycle editing'), {:action => :step, :id => session.id, :method => :post},
      { :id => 'session-open-session' } ] unless session.passed_by?('edition')
    actions[:orders].unshift [ session.orders? ? _('Block orders period') : _('Close orders period'),
      {:action => :step, :id => session.id, :method => :post}, { :id => 'session-open-session' } ] unless session.passed_by?('orders')
  %>

  <% unless actions[view.to_sym].blank? %>

      <% actions[view.to_sym].each do |args| %>
        <%= link_to *args %>
      <% end %>
      <%= _('Actions') %>

  <% end %>


Using variable instead of new call to db

(ActionItem2911)

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

<div id="article" class="<%= @page.css_class_name %>">

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

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

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

<% end %>

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

<% if @page.display_hits? || @page.license.present? %>

    <% if @page.display_hits? %>

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

    <% end %>

    <% if @page.license.present? %>

        <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>

    <% end %>

<% end %>

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

<% if NOOSFERO_CONF['addthis_enabled'] %>
  <%= render :partial => 'addthis' %>
<% end %>

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

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

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

<% end %>

<%= display_source_info(@page) %>

<%= @plugins.dispatch(:article_extra_contents, @page).collect { |content| instance_eval(&content) }.join("") %>

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

  <% end %>

  <% if @page.accept_comments? && @comments_count > 1 %>
    <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") %>

    <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier)) %>
    <%= javascript_include_tag "comment_order.js" %>

      <% form_tag({:controller=>'content_viewer' , :action=>'view_page'}, {:method=>'get', :id=>"form_order"}) do %>
        <%= select_tag 'comment_order', options_for_select({_('Oldest first')=>'oldest', _('Newest first')=>'newest'}, @comment_order) %>
      <% end %>

  <% end %>

    <%= render :partial => 'comment/comment', :collection => @comments %>
    <%= pagination_links @comments, :param_name => 'comment_page' %>

  <% if @page.accept_comments? %>

<%= render :partial => 'comment/comment_form', :locals =>{:comment => Comment.new, :url => {:controller => :comment, :action => :create}, :display_link => true, :cancel_triggers_hide => true}%>

  <% end %>

<%= add_zoom_to_article_images %>

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

<div id="article" class="<%= @page.css_class_name %>">

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

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

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

<% end %>

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

<% if @page.display_hits? || @page.license.present? %>

    <% if @page.display_hits? %>

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

    <% end %>

    <% if @page.license.present? %>

        <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>

    <% end %>

<% end %>

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

<% if NOOSFERO_CONF['addthis_enabled'] %>
  <%= render :partial => 'addthis' %>
<% end %>

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

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

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

<% end %>

<%= display_source_info(@page) %>

<%= @plugins.dispatch(:article_extra_contents, @page).collect { |content| instance_eval(&content) }.join("") %>

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

  <% end %>

  <% if @page.accept_comments? && @comments.count > 1 %>
    <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") %>
  <% end %>

  <% if @page.accept_comments? and @comments.count > 1 %>
    <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier)) %>
    <%= javascript_include_tag "comment_order.js" %>

      <% form_tag({:controller=>'content_viewer' , :action=>'view_page'}, {:method=>'get', :id=>"form_order"}) do %>
        <%= select_tag 'comment_order', options_for_select({_('Oldest first')=>'oldest', _('Newest first')=>'newest'}, @comment_order) %>
      <% end %>

  <% end %>

    <%= render :partial => 'comment/comment', :collection => @comments %>
    <%= pagination_links @comments, :param_name => 'comment_page' %>

  <% if @page.accept_comments? %>

<%= render :partial => 'comment/comment_form', :locals =>{:comment => Comment.new, :url => {:controller => :comment, :action => :create}, :display_link => true, :cancel_triggers_hide => true}%>

  <% end %>

<%= add_zoom_to_article_images %>


Removing duplicated AddThis

Removing duplicated AddThis

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

<div<%= " class='logged-in'" if user %>>
  <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.blog? && @page.feed %>
  <%= article_title(@page, :no_link => true) %>

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

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

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

<% end %>

<% if @page.display_hits? %>

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

<% end %>

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

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

<% end %>

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

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

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

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

<% elsif @page.reference_article  %>

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

<% end %>

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

<% end %>

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

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

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

<div<%= " class='logged-in'" if user %>>
  <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.blog? && @page.feed %>
  <%= article_title(@page, :no_link => true) %>

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

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

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

<% end %>

<% if @page.display_hits? %>

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

<% end %>

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

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

<% end %>

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

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

<% end %>

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

<%= _('Categories') %>

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

<% end %>

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

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

<% elsif @page.reference_article  %>

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

<% end %>

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

<% end %>

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

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


Update website/cgi-bin/main.rhtml

Update website/cgi-bin/main.rhtml

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">

      </button>

Home

Download

Download Ring 1.10

Download Ring 1.9

Download Ring 1.8

Download Ring 1.7

Download Ring 1.6

Download Ring 1.5

Download Ring 1.4

Download Ring 1.3

Download Ring 1.2

Download Ring 1.1

Download Ring 1.0

Why?

Documentation

Ring 1.10 Documentation

Ring 1.9 Documentation

Ring 1.8 Documentation

Ring 1.7 Documentation

Ring 1.6 Documentation

Ring 1.5 Documentation

Ring 1.4 Documentation

Ring 1.3 Documentation

Ring 1.2 Documentation

Ring 1.1 Documentation

Ring 1.0 Documentation

Community

Group

Resources

Team

		<form class="search" action="../doc1.10/search.html" method="get" style="width:200px" >

				<input name="q" type="text" class="form-control" placeholder="Search for...">

				<button class="btn btn-default" type="submit">Go!</button>

			<input name="check_keywords" value="yes" type="hidden">
			<input name="area" value="default" type="hidden">
		</form>

					Download

					Documents

					Try Online

					Group

Innovative and practical general-purpose multi-paradigm language

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">

      </button>

Home

Download

Download Ring 1.9

Download Ring 1.8

Download Ring 1.7

Download Ring 1.6

Download Ring 1.5

Download Ring 1.4

Download Ring 1.3

Download Ring 1.2

Download Ring 1.1

Download Ring 1.0

Why?

Documentation

Ring 1.10 Documentation

Ring 1.9 Documentation

Ring 1.8 Documentation

Ring 1.7 Documentation

Ring 1.6 Documentation

Ring 1.5 Documentation

Ring 1.4 Documentation

Ring 1.3 Documentation

Ring 1.2 Documentation

Ring 1.1 Documentation

Ring 1.0 Documentation

Community

Group

Resources

Team

		<form class="search" action="../doc1.10/search.html" method="get" style="width:200px" >

				<input name="q" type="text" class="form-control" placeholder="Search for...">

				<button class="btn btn-default" type="submit">Go!</button>

			<input name="check_keywords" value="yes" type="hidden">
			<input name="area" value="default" type="hidden">
		</form>

					Download

					Documents

					Try Online

					Group

Innovative and practical general-purpose multi-paradigm language


For [#63] loci should be listed with appropriate authors in lexeme view [ugly]

<%= author.name %>
<%= spaced_render :collection => Locus.attesting(construction, @lexeme).find(:all, :joins => { :source => :authorship }, :conditions => { :id => construction.loci, :authorships => {:author_id => author}}, :group => "loci.id"), :partial => "shared/ref" %>

<%= author.name %>
<%= spaced_render :collection => construction.loci & @loci, :partial => "shared/ref" %>


Fix view permissioning on annotation fields - you don't need to be a questionnaire editor to see them

<% if @editing -%>
  <% if logged_in? and logged_in_person.permitted?("edit_answers", @question.questionnaire) -%>
    <%= text_area_tag "answer[#{@question.id}]", value, :rows => 4 %>
  <% end -%>
<% else -%>
  <% if logged_in? and logged_in_person.permitted?("view_answers", @question.questionnaire) -%>
    <%= simple_format value %>
  <% end -%>
<% end -%>

<% if logged_in? and logged_in_person.permitted?("edit", @question.questionnaire) -%>
  <% if @editing -%>
    <%= text_area_tag "answer[#{@question.id}]", value, :rows => 4 %>
  <% else -%>
    <%= simple_format value %>
  <% end -%>
<% end -%>


changes made to remove constant 1 = true and replace it with true or false value

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

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

Next: Click the activity you wish to perform on the assignment titled: <%= @student.assignment.name %>

<% if @student.assignment.spec_location && @student.assignment.spec_location.length > 0 %>
  <a href="<%= @student.assignment.spec_location %>" target="new">Assignment Description
<% end %>

	<%if Assignment.find(:all, :conditions => ['id= ?', @student.parent_id])[0].team_assignment == true%>

 <%= link_to 'Your team', :action => 'view_team', :id => @student.id %>
		(View and manage your team)

	<%end%>

	    <% if @can_view_your_work == true %>
			<%= link_to 'Your work', :action => 'submit', :id => @student.id %>
		<% else %>
			Your work
		<% end%>
		<% if @student.assignment.wiki_type_id == 1%>
				(Submit and view feedback)
		<% else %>
		        (View feedback)
		<% end %>

		<% if @can_view_others_work == true %>
			<%= link_to "Others' work",{:controller => 'review', :action => 'list_reviews', :id => @student.parent_id} %>
		<% else %>
			Others' work
		<% end %> (Give feedback to others on their work)

<%= link_to "View scores",{:action => 'view_scores', :id => @student.id} %>

	<% if StudentAssignmentHelper::get_current_stage(@assignment_id) == "Complete" && SurveyHelper::is_user_eligible_for_survey?	(@assignment_id, session[:user].id) -%>

<%= link_to "Take Survey",{:controller => 'survey_response', :action => 'begin_survey', :id => @assignment_id} %> (This will log you out)

	<% end %>

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

Next: Click the activity you wish to perform on the assignment titled: <%= @student.assignment.name %>

<% if @student.assignment.spec_location && @student.assignment.spec_location.length > 0 %>
  <a href="<%= @student.assignment.spec_location %>" target="new">Assignment Description
<% end %>

	<%if Assignment.find(:all, :conditions => ['id= ?', @student.parent_id])[0].team_assignment == true%>

 <%= link_to 'Your team', :action => 'view_team', :id => @student.id %>
		(View and manage your team)

	<%end%>

	    <% if @can_view_your_work == 1 %>
			<%= link_to 'Your work', :action => 'submit', :id => @student.id %>
		<% else %>
			Your work
		<% end%>
		<% if @student.assignment.wiki_type_id == 1%>
				(Submit and view feedback)
		<% else %>
		        (View feedback)
		<% end %>

		<% if @can_view_others_work == 1 %>
			<%= link_to "Others' work",{:controller => 'review', :action => 'list_reviews', :id => @student.parent_id} %>
		<% else %>
			Others' work
		<% end %> (Give feedback to others on their work)

<%= link_to "View scores",{:action => 'view_scores', :id => @student.id} %>

	<% if StudentAssignmentHelper::get_current_stage(@assignment_id) == "Complete" && SurveyHelper::is_user_eligible_for_survey?	(@assignment_id, session[:user].id) -%>

<%= link_to "Take Survey",{:controller => 'survey_response', :action => 'begin_survey', :id => @assignment_id} %> (This will log you out)

	<% end %>


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

<% if @group.id %>
  <% content_for :sidebar do |wants| %>

    <%= form_tag :action => 'remove_people', :id => @group %>

        <% @group.people.each do |person| %>
          <%= check_box_tag 'people[]', person.id, false, :class => 'checkbox', :disabled => (@group.last_admin?(person) or @group.linked?), :onclick => (person == @logged_in and not @logged_in.admin? ? "if(this.checked)alert(\"You're about to remove yourself from this group! You won't be able to edit it anymore if you do that.\")" : nil) %>
          <%= render :partial => 'people/link', :locals => {:person => person} %>

        <% end %>

      <% if @group.linked? %>

          <%= image_tag 'link.png', :alt => @group.link_code, :class => 'no-border' %>
          This group is linked with a code. You may not add or remove people from here.

      <% elsif @group.people.length > 1 %>

<%= submit_tag 'Remove Selected' %>

      <% else %>

You cannot remove the last group admin. You may delete the group, however.

      <% end %>

    </form>

    <% unless @group.linked? %>
      <% if @group.approved %>
        <%= form_remote_tag :url => {:controller => 'people', :action => 'search'} %>
          <%= hidden_field_tag :select_person, true %>

            Add somebody: <%= text_field_tag 'name' %>
            <%= submit_tag 'Search by Name' %>

        </form>

          <%= form_tag :action => 'add_people', :id => @group %>

<%= submit_tag 'Add Selected' %>

          </form>

      <% else %>

          This group is pending approval. You may not add people to it yet.

      <% end %>
    <% end %>

Admins

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

<% if @group.private? %>

    <%= image_tag('lock.gif', :alt => 'Private Group', :class => 'icon') %>
    This group is private. Only people in this group can see its messages.

<% end %>

Edit Group

<% content_for :subnav do %>

<%= link_to 'List of Groups', :action => 'index' %>

  <% if @group.id %>

<%= link_to 'View Group', :action => 'view', :id => @group %>

<%= link_to 'Delete Group', {:action => 'delete', :id => @group}, :confirm => 'Are you sure? This cannot be undone!', :post => true %>

  <% end %>
<% end %>

<% form_for :group, @group, :html => {:enctype => 'multipart/form-data'} do |form| %>

Group Picture

  <%= render :partial => 'photo' %>
  <input type="file" id="photo" name="photo"/>

  Only JPEG photos are accepted at this time. Please make sure the picture is appropriate and not offensive to others.

  <% if @group.has_photo? %>
    <%= link_to 'Remove Group Photo', {:action => 'edit', :photo => 'remove'}, :post => true, :confirm => 'Are you sure?' %>

  <% end %>
  Click "Save Changes" at the bottom of this form to upload a new picture.

Details

  Group Name (required):
  <%= form.text_field :name %>

  Category (required):
  <select name="group[category]" id="group_category" onchange="if(this.value=='!') custom_select_val(this, 'Enter the new category.')">
    <option value=""></option>
    <%= options_for_select @categories, @group.category %>
    <option value="!">[new category]</option>
  </select>

  Description:
  <%= form.text_area :description, :rows => 3 %>

  Other Notes:
  <%= form.text_area :notes, :rows => 3 %>

  Creator:
  <%= text_field_tag 'creator', (@group.creator ? @group.creator.name : nil), :readonly => true %>

  Leader:
  <select name="group[leader_id]" id="group_leader_id">
    <option value="">(none)</option>
    <%= options_for_select @group.people.map { |p| [p.name, p.id] }, @group.leader_id %>
  </select>

  <% if @group.people.length == 0 %>
    You'll need to save the group and add people before you can set a leader.

  <% end %>

Meets

  Day & Time:
  <%= form.text_field :meets %>

  Location:
  <%= form.text_field :location %>

  Directions:
  <%= form.text_area :directions, :rows => 3 %>

  <% if @logged_in.admin? %>

Advanced

    The settings below are for staff, elders, and advanced users.
    Don't edit any of the settings below unless you know what you are doing.

    Private:
    <%= form.check_box :private, :class => 'checkbox' %> Messages are only visible to members of the group.
    Email Address:
    <%= text_field_tag 'group[address]', @group.address, :id => 'group_address', :style => 'width:150px;', :onkeyup => "this.value = remove_symbols(this.value)" %>@<%=h GROUP_ADDRESS_DOMAINS.first %>

    Class Link Code(s):
    <%= form.text_field :link_code %>

    Group Members Can Post Messages:
    <%= form.check_box :members_send, :class => 'checkbox' %>

    This is a Subscription Group:
    <%= form.check_box :subscription, :class => 'checkbox' %>

    This group is hidden:
    <%= form.check_box :hidden, :class => 'checkbox' %>
  <% end %>

<%= submit_tag 'Save Changes' %>

<% end %>

<% if @group.id %>
  <% content_for :sidebar do |wants| %>

    <%= form_tag :action => 'remove_people', :id => @group %>

        <% @group.people.each do |person| %>
          <%= check_box_tag 'people[]', person.id, false, :class => 'checkbox', :disabled => (@group.last_admin?(person) or @group.linked?), :onclick => (person == @logged_in and not @logged_in.admin? ? "if(this.checked)alert(\"You're about to remove yourself from this group! You won't be able to edit it anymore if you do that.\")" : nil) %>
          <%= render :partial => 'people/link', :locals => {:person => person} %>

        <% end %>

      <% if @group.linked? %>

          <%= image_tag 'link.png', :alt => @group.link_code, :class => 'no-border' %>
          This group is linked with a code. You may not add or remove people from here.

      <% elsif @group.people.length > 1 %>

<%= submit_tag 'Remove Selected' %>

      <% else %>

You cannot remove the last group admin. You may delete the group, however.

      <% end %>

    </form>

    <% unless @group.linked? %>
      <% if @group.approved %>
        <%= form_remote_tag :url => {:controller => 'people', :action => 'search'} %>
          <%= hidden_field_tag :select_person, true %>

            Add somebody: <%= text_field_tag 'name' %>
            <%= submit_tag 'Search by Name' %>

        </form>

          <%= form_tag :action => 'add_people', :id => @group %>

<%= submit_tag 'Add Selected' %>

          </form>

      <% else %>

          This group is pending approval. You may not add people to it yet.

      <% end %>
    <% end %>

Admins

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

<% if @group.private? %>

    <%= image_tag('lock.gif', :alt => 'Private Group', :class => 'icon') %>
    This group is private. Only people in this group can see its messages.

<% end %>

Edit Group

<% content_for :subnav do %>

<%= link_to 'List of Groups', :action => 'index' %>

  <% if @group.id %>

<%= link_to 'View Group', :action => 'view', :id => @group %>

<%= link_to 'Delete Group', {:action => 'delete', :id => @group}, :confirm => 'Are you sure? This cannot be undone!', :post => true %>

  <% end %>
<% end %>

<% form_for :group, @group, :html => {:enctype => 'multipart/form-data'} do |form| %>

Group Picture

  <%= render :partial => 'photo' %>
  <input type="file" id="photo" name="photo"/>

  Only JPEG photos are accepted at this time. Please make sure the picture is appropriate and not offensive to others.

  <% if @group.has_photo? %>
    <%= link_to 'Remove Group Photo', {:action => 'edit', :photo => 'remove'}, :post => true, :confirm => 'Are you sure?' %>

  <% end %>
  Click "Save Changes" at the bottom of this form to upload a new picture.

Details

  Group Name (required):
  <%= form.text_field :name %>

  Category (required):
  <select name="group[category]" id="group_category" onchange="if(this.value=='!') custom_select_val(this, 'Enter the new category.')">
    <option value=""></option>
    <%= options_for_select @categories, @group.category %>
    <option value="!">[new category]</option>
  </select>

  Description:
  <%= form.text_area :description, :rows => 3 %>

  Other Notes:
  <%= form.text_area :notes, :rows => 3 %>

  Creator:
  <%= text_field_tag 'creator', (@group.creator ? @group.creator.name : nil), :readonly => true %>

  Leader:
  <select name="group[leader_id]" id="group_leader_id">
    <option value="">(none)</option>
    <%= options_for_select @group.people.map { |p| [p.name, p.id] }, @group.leader_id %>
  </select>

  <% if @group.people.length == 0 %>
    You'll need to save the group and add people before you can set a leader.

  <% end %>

Meets

  Day & Time:
  <%= form.text_field :meets %>

  Location:
  <%= form.text_field :location %>

  Directions:
  <%= form.text_area :directions, :rows => 3 %>

  <% if @logged_in.admin? %>

Advanced

    The settings below are for staff, elders, and advanced users.
    Don't edit any of the settings below unless you know what you are doing.

    Private:
    <%= form.check_box :private, :class => 'checkbox' %> Messages and members (except the creator and leader) are hidden from outsiders and group administrators must add people.
    Email Address:
    <%= text_field_tag 'group[address]', @group.address, :id => 'group_address', :style => 'width:150px;', :onkeyup => "this.value = remove_symbols(this.value)" %>@<%=h GROUP_ADDRESS_DOMAINS.first %>

    Class Link Code(s):
    <%= form.text_field :link_code %>

    Group Members Can Post Messages:
    <%= form.check_box :members_send, :class => 'checkbox' %>

    This is a Subscription Group:
    <%= form.check_box :subscription, :class => 'checkbox' %>

    This group is hidden:
    <%= form.check_box :hidden, :class => 'checkbox' %>
  <% end %>

<%= submit_tag 'Save Changes' %>

<% end %>


Use a nicer less error prone version of the select helper

<%= @title %>

<%= error_messages_for 'diary_entry' %>

<% form_for :diary_entry do |f| %>

      Subject:
      <%= f.text_field :title, :size => 60 %>

      Body:
      <%= f.text_area :body, :cols => 80 %>

      Language:
      <%= f.collection_select :language, Language.find(:all), :code, :name %>

      Location:

        Latitude: <%= f.text_field :latitude, :size => 20, :id => "latitude" %> Longitude: <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
        use map

	  <%= submit_tag 'Save' %>
	  <%# TODO: button should say 'publish' or 'save changes' depending on new/edit state %>

<% end %>

<% if @user.home_lat.nil? or @user.home_lon.nil? %>
  <% lon = h(params['lon'] || '-0.1') %>
  <% lat = h(params['lat'] || '51.5') %>
  <% zoom = h(params['zoom'] || '4') %>
<% else %>
  <% lon = @user.home_lon %>
  <% lat = @user.home_lat %>
  <% zoom = '12' %>
<% end %>

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

<%= @title %>

<%= error_messages_for 'diary_entry' %>

<% form_for :diary_entry do |f| %>

      Subject:
      <%= f.text_field :title, :size => 60 %>

      Body:
      <%= f.text_area :body, :cols => 80 %>

      Language:
      <%= f.select :language, Language.find(:all).map {|l| [l.name, l.code]} %>

      Location:

        Latitude: <%= f.text_field :latitude, :size => 20, :id => "latitude" %> Longitude: <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
        use map

	  <%= submit_tag 'Save' %>
	  <%# TODO: button should say 'publish' or 'save changes' depending on new/edit state %>

<% end %>

<% if @user.home_lat.nil? or @user.home_lon.nil? %>
  <% lon = h(params['lon'] || '-0.1') %>
  <% lat = h(params['lat'] || '51.5') %>
  <% zoom = h(params['zoom'] || '4') %>
<% else %>
  <% lon = @user.home_lon %>
  <% lat = @user.home_lat %>
  <% zoom = '12' %>
<% end %>

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


Commit Tobias's fix for the flaw introduced in [1192]

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

<% @page_heading = "User: #{@user.name}" %>

  <% content_for('tasks') do %>
    <%= task_new 'Create new user' %>
    <%= task_edit 'Edit this user', @user.id %>
  <% end %>

    Name: <%=h @user.name %>

    Login: <%=h @user.login %>

    Email: <%=h @user.email %>

    Jabber: <%=h @user.jabber %>

    Notify via email: <%= @user.notify_via_email? ? "yes" : "no" %>

    Notify via jabber: <%= @user.notify_via_jabber? ? "yes" : "no" %>

    Notify on new articles: <%= @user.notify_on_new_articles? ? "yes" : "no" %>

    Notify on new comments: <%= @user.notify_on_comments? ? "yes" : "no" %>

User's articles

    <%= render :partial => 'admin/content/articles' %>

<% @page_heading = "User: #{@user.name}" %>

  <% content_for('tasks') do %>
    <%= task_new 'Create new user' %>
    <%= task_edit 'Edit this user', @user.id %>
  <% end %>

    Name: <%=h @user.name %>

    Login: <%=h @user.login %>

    Email: <%=h @user.email %>

    Jabber: <%=h @user.jabber %>

    Notify via email: <%= @user.notify_via_email? ? "yes" : "no" %>

    Notify via jabber: <%= @user.notify_via_jabber? ? "yes" : "no" %>

    Notify on new articles: <%= @user.notify_on_new_articles? ? "yes" : "no" %>

    Notify on new comments: <%= @user.notify_on_comments? ? "yes" : "no" %>

User's articles

    <%= render :partial => 'admin/content/articles', :collection => @user.articles %>


ActionItem988: add the checkbox for the display_in_menu field

<%= error_messages_for 'category' %>

<% labelled_form_for 'category', @category, :html => { :multipart => true} do |f| %>

  <%= required_fields_message %>

  <% if @category.new_record? %>
    <% if @category.parent %>
      <%= hidden_field_tag('parent_id', @category.parent.id) %>
      <%= hidden_field_tag('type', @category.parent.class.name) %>
    <% else %>
      <% if environment.category_types.length > 1 %>
        <%= select_category_type :type %>
      <% else %>
        <%= hidden_field_tag('type', environment.category_types.to_s) %>
      <% end%>
    <% end %>
  <% end %>

  <%= select_color_for_category if !environment.enabled?('disable_categories_menu') %>

  <%= required f.text_field('name') %>

  <%= labelled_check_box(_('Display in the menu'), 'category[display_in_menu]', '1', @category.display_in_menu) %>

  <% f.fields_for :image_builder, @category.image do |i| %>
    <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %>
  <% end %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
  <% end%>
<% end %>

<%= error_messages_for 'category' %>

<% labelled_form_for 'category', @category, :html => { :multipart => true} do |f| %>

  <%= required_fields_message %>

  <% if @category.new_record? %>
    <% if @category.parent %>
      <%= hidden_field_tag('parent_id', @category.parent.id) %>
      <%= hidden_field_tag('type', @category.parent.class.name) %>
    <% else %>
      <% if environment.category_types.length > 1 %>
        <%= select_category_type :type %>
      <% else %>
        <%= hidden_field_tag('type', environment.category_types.to_s) %>
      <% end%>
    <% end %>
  <% end %>

  <%= select_color_for_category if !environment.enabled?('disable_categories_menu') %>

  <%= required f.text_field('name') %>

  <% f.fields_for :image_builder, @category.image do |i| %>
    <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %>
  <% end %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
  <% end%>
<% end %>


Cleanup.

Cleanup.

<% if @this_user %>

<%= @this_user.display_name %>'s diary

  <% if @user and @this_user.id == @user.id %>
    <%= link_to 'New diary post', :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
  <% end %>
<% end %>

Recent diary entries:

<%= render :partial => 'diary_entry/diary_entry', :collection => @entries %>

<%= link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), :action => 'rss') %>
<%= auto_discovery_link_tag(:atom, :action => 'rss') %>

<% if @this_user %>

<%= @this_user.display_name %>'s diary

  <% if @user and @this_user.id == @user.id %>
    <%= link_to 'new post', :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
  <% end %>
<% end %>

Recent diary entries:

<%= render :partial => 'diary_entry/diary_entry', :collection => @entries %>

<%= link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), :action => 'rss') %>
<%= auto_discovery_link_tag(:atom, :action => 'rss') %>


link to atom was still pointing to rss

link to atom was still pointing to rss

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

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

	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="/stylesheets/base.css" type="text/css" />
	<link rel="alternate" type="application/rss+xml"  title="Recent changes (RSS 2.0)"  href="/xml/rss" />
	<link rel="alternate" type="application/atom+xml"  title="Recent changes (ATOM 0.3)"  href="/xml/atom" />
	<title><%= CONFIG['blogname'] %></title>

<%= CONFIG['blogname'] %>

  <%= @content_for_layout %>

	<form action="/articles/search" method="get">
Search
<input type="text" name="q" value="" size="15" />
</form>

     projects

     Hieraki
Snowdevil

     subpages

     Gallery

     blogs I read

      On The Rails
Loud Thinking
Miguel de Icaza

     tools I use

     Adium X

     NetNewsWire

     Ruby on Rails

     Ruby

     Textmate

     Quicksilver

     Desktop Manager

     syndicate

	   RSS
	   |
	   atom

     Valid XHTML 1.0

     Valid CSS

Copyright  Tobias Luetke

    RSS and atom available

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

	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="/stylesheets/base.css" type="text/css" />
	<link rel="alternate" type="application/rss+xml"  title="Recent changes (RSS 2.0)"  href="/xml/rss" />
	<link rel="alternate" type="application/atom+xml"  title="Recent changes (ATOM 0.3)"  href="/xml/atom" />
	<title><%= CONFIG['blogname'] %></title>

<%= CONFIG['blogname'] %>

  <%= @content_for_layout %>

	<form action="/articles/search" method="get">
Search
<input type="text" name="q" value="" size="15" />
</form>

     projects

     Hieraki
Snowdevil

     subpages

     Gallery

     blogs I read

      On The Rails
Loud Thinking
Miguel de Icaza

     tools I use

     Adium X

     NetNewsWire

     Ruby on Rails

     Ruby

     Textmate

     Quicksilver

     Desktop Manager

     syndicate

	   RSS
	   |
	   Atom

     Valid XHTML 1.0

     Valid CSS

Copyright  Tobias Luetke

    RSS and atom available


Escaping fix

Escaping fix

<% @title = _("Select the authority to write to")  %>

<%= _('1. Select an authority') %>

    <% form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %>

           <%= raw(_('First, type in the name of the UK public authority you\'d
           like information from. By law, they have to respond
           (why?).') % [help_about_url, "whybother_them"]) %>

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

    <% end %>

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

<%= _('Top search results:') %>

      <%= _('Select one to see more information about the authority.')%>

  <% else %>

<%= _('No results found.') %>

  <% end %>

    <% for result in @xapian_requests.results %>
      <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %>
    <% end %>

 <% end %>

<% @title = _("Select the authority to write to")  %>

<%= _('1. Select an authority') %>

    <% form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %>

           <%= _('First, type in the name of the UK public authority you\'d
           like information from. By law, they have to respond
           (why?).') % [help_about_url, "whybother_them"] %>

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

    <% end %>

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

<%= _('Top search results:') %>

      <%= _('Select one to see more information about the authority.')%>

  <% else %>

<%= _('No results found.') %>

  <% end %>

    <% for result in @xapian_requests.results %>
      <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %>
    <% end %>

 <% end %>


Remove old javascript code, and remove some unneded escaping

<%#= sortable_element("left-col", :url => {:action => 'order'}, :format => "/^[^-]*-(.*)$/", :dropOnEmpty => true, :containment => ["left-col", "right-col"], :handle => "page_header", :only => 'widget-container') %>
<%#= sortable_element("right-col", :url => {:action => 'order'}, :format => "/^[^-]*-(.*)$/", :dropOnEmpty => true, :containment => ["left-col", "right-col"], :handle => "page_header", :only => 'widget-container') %>


Tidied up formatting.

Tidied up formatting.

<% @heading="Site supporters" %>
<% @h1class='home' %>

<% @links = [] %>
<% if session[:person].nil? %>
  <% @links += [{:url => "/admin/login", :title => "Login", :accesskey => "l"}] %>
  <% @links += [{:url => "/admin/register", :title => "Register", :accesskey => "r"}] %>
<% else %>
  <% @links += [{:url => "/admin/logout", :title => "Logout", :accesskey => "l"}] %>
<% end %>
<% @links += [{:url => "/home/tour", :title => "Take a tour", :accesskey => "t"}] %>
<% @links += [{:url => "/questions", :title => "FAQ", :accesskey => "f"}] %>
<% @links += [{:url => "/home/privacy", :title => "Privacy", :accesskey => "p"}] %>

About site supporters

Site supporters are people who make any kind of contribution to MyChores.

Benefits to you

As a site supporter you get the following benefits (and more in the future) ...

Turn off advertisements.

Reports of tasks you completed in the last 7 days and in the current month.

Printable weekly and monthly calendars.

Export tasks to a spreadsheet.

Upload as many pictures as you like (limited to 9 for non-site-supporters).

Import pictures from Flickr.

Option to change your login ID.

How to become a site supporter

There are many different ways to become a site supporter ...

Recommend 5 or more friends through the referral programme.

Enable Twitter Integration and make MyChores posts.

Add a testimonial.

Help to translate MyChores into a different language.

Suggest improvements to MyChores. If you have a Lighthouse account you can log a ticket.

Help to improve MyChores, with your design skills, coding skills or testing. MyChores is now open source. Feel free to get the code and submit patches!

Make a financial donation towards running costs.

Donations

A donation of any amount will be gratefully received. If you donate, please let me know your login ID so that I can update your account status!


Add total to staff view of project

Add total to staff view of project

  <%= link_to 'Back to project list', :action => 'index' %>

<%= @project.name %>

  <%=h @project.description %>

<% if @project.thisyear %>
  <% if @can_see_sched %>

Sessions

    <% for s in @project.sesses %>

          <%= s.timeslots.map{|t|t.longdesc}.join(' and ') %>

          <%=h s.location ? s.location_name : 'NO LOCATION' %>

          L
          <%= s.leader_names.join('
 ') %>

        <% helps=s.helper_names; if !helps.empty? %>

            H
            <%= helps.join('
 ') %>

	<% end %>

          <%= s.participant_names_with_class.join('
 ') %>

	  <%= s.student_count %> students

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

Not (yet?) offered this year

<%= link_to 'I want to own it!', :action=>'repeat', :id=>@project %>

<% end %>

  <%= link_to 'Back to project list', :action => 'index' %>

<%= @project.name %>

  Short name: <%=h @project.shortname %>

  Grades: <%= grade_range(@project) %>

  Max students per session: <%=h @project.capacity %>

  Description:

  <%=h @project.description %>

<% if @project.thisyear %>
  <% if @can_see_sched %>

Sessions

    <% for s in @project.sesses %>

          <%= s.timeslots.map{|t|t.longdesc}.join(' and ') %>

          <%=h s.location ? s.location_name : 'NO LOCATION' %>

          L
          <%= s.leader_names.join('
 ') %>

        <% helps=s.helper_names; if !helps.empty? %>

            H
            <%= helps.join('
 ') %>

	<% end %>

          <%= s.participant_names_with_class.join('
 ') %>

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

Not (yet?) offered this year

<%= link_to 'I want to own it!', :action=>'repeat', :id=>@project %>

<% end %>


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

Unauthorized

  We're very sorry, but your account is not authorized to sign into this site.
  One of the following may be the reason you cannot sign in:

    You may not be considered a regular attender or member of this church.

    If you believe this to be in error, please let us know! You may call the
    church office at: <%=h CHURCH_OFFICE_PHONE %>

    You may be under 13 years of age.

    If this is the case, please don't give up just yet! You can still sign in if you
    get a parent or guardian to sign and authorize your account.

    There may be some problem with your account that we need to talk to you about.

    Please call the church office at: <%=h CHURCH_OFFICE_PHONE %>

Unauthorized

  We're very sorry, but your account is not authorized to sign into this site.
  One of the following may be the reason you cannot sign in:

    You may not be considered a regular attender or member of this church.

    If you believe this to be in error, please let us know! You may call the
    church office at: <%=h CHURCH_OFFICE_PHONE %>

    You may be under 13 years of age.

    If this is the case, please don't give up just yet! You can still sign in if you
    get a parent or guardian to sign and fax/mail a release form found
    <%= link_to 'here', :action => 'parental_release_form' %>.

    There may be some problem with your account that we want to talk to you about.

    Please call the church office at: <%=h CHURCH_OFFICE_PHONE %>


small update

small update

Dossier on <%=h @bat.band %>

Cage:
<% if @bat.cage %>
<%= link_to @bat.cage.name, :controller => 'cages', :action => 'show', :id => @bat.cage %>
<% else %>
<%= 'Inactive' %>
<% end %>

Species:
<% if @bat.species %><%= @bat.species.name %><% end %>

Gender:
<%= @bat.gender %>

Collection Date:
<%= nice_date @bat.collection_date %>

Time in the lab:
<%= time_in_lab = ((Time.now - @bat.collection_date)/86400).to_i %> days

Collection Age:
<%= @bat.collection_age %>

Collection Place:
<%= @bat.collection_place %>

Rabies Vaccination Date:
<%= @bat.vaccination_date ? nice_date(@bat.vaccination_date) : 'Not vaccinated' %>

<% if @bat.leave_date != nil %>

Leave Date:
<%= nice_date @bat.leave_date %>

Leave Reason:
<%= @bat.leave_reason %>

<% end %>

<%= render :partial => 'bats/display_bat_notes' %>

Current Medical Problems:

  <% if @bat.medical_problems.current.length > 0 %>
      <%= render :partial => 'medical_problems/show_medical_problems', :locals=>{:medical_problems => @bat.medical_problems.current, :show_bat => false,
        :list_all => false, :div_id => 'current_medical_problems', :show_treatments => true} %>
  <% else %>

No Current Medical Problems

  <% end %>

<form>
<%= submit_to_remote 'Quick-Add New Medical Problem', 'Quick-Add New Medical Problem', :url=>{:controller => 'medical_problems', :action => :remote_new_medical_problem, :bat => @bat},
  :update=>'add_medical_problem'%>
</form>

<% if @bat.medical_problems.expired.length > 0 %>

Past Medical Problems:

	<%= render :partial => 'medical_problems/show_medical_problems', :locals=>{:medical_problems => @bat.medical_problems.expired, :show_bat => false,
		:list_all => true, :div_id => 'expired_medical_problems', :show_treatments => false} %>

<% end %>

<%= render :partial => 'display_weights', :locals => {:bat => @bat} %>

<% if @cihs.length >0 %>

Cage History:

  New Cage
  Old Cage
  Date in
  Why
  Who

  <% if @bat.cage == nil %>

  Deactivated Bat
  <%=h @bat.cage_out_histories[0].cage.name %>
  <%=h nice_date @bat.cage_out_histories[0].date %>
  <%=h @bat.cage_out_histories[0].note %>
  <%=h @bat.cage_out_histories[0].user.initials %>

  <% end %>

  <% for cih in @cihs %>

    <%=h cih.cage.name %>
    <% if cih.cage_out_history %>
    <%=h cih.cage_out_history.cage.name %>
    <% else %>
    -
    <% end %>
    <%=h nice_date cih.date %>
    <%=h cih.note %>
    <%=h cih.user.initials %>

  <% end %>

<% end %>

<%= link_to 'Edit', :action => 'edit', :id => @bat %> |
<%= link_to 'List Current Bats', :action => 'list' %>

<% if @bat.cage != nil%>
 | <%= link_to 'Move Bat', :action=>'single_bat_to_move', :id=>@bat %>
<% end %>

Dossier on <%=h @bat.band %>

Cage:
<% if @bat.cage %>
<%= link_to @bat.cage.name, :controller => 'cages', :action => 'show', :id => @bat.cage %>
<% else %>
<%= 'Inactive' %>
<% end %>

Species:
<% if @bat.species %><%= @bat.species.name %><% end %>

Gender:
<%= @bat.gender %>

Collection Date:
<%= nice_date @bat.collection_date %>

Time in the lab:
<% collection_year = @bat.collection_date.strftime("%Y").to_i %>
<% collection_month = @bat.collection_date.strftime("%m").to_i %>
<% collection_day = @bat.collection_date.strftime("%d").to_i %>
<% collection_date = Date.new(collection_year,collection_month,collection_day) %>
<%= Date.today - collection_date  %> days

Collection Age:
<%= @bat.collection_age %>

Collection Place:
<%= @bat.collection_place %>

Rabies Vaccination Date:
<%= @bat.vaccination_date ? nice_date(@bat.vaccination_date) : 'Not vaccinated' %>

<% if @bat.leave_date != nil %>

Leave Date:
<%= nice_date @bat.leave_date %>

Leave Reason:
<%= @bat.leave_reason %>

<% end %>

<%= render :partial => 'bats/display_bat_notes' %>

Current Medical Problems:

  <% if @bat.medical_problems.current.length > 0 %>

      <%= render :partial => 'medical_problems/show_medical_problems', :locals=>{:medical_problems => @bat.medical_problems.current, :show_bat => false,
              :list_all => false, :div_id => 'current_medical_problems', :show_treatments => true} %>

  <% else %>
    No Current Medical Problems
  <% end %>

<form>
<%= submit_to_remote 'Quick-Add New Medical Problem', 'Quick-Add New Medical Problem', :url=>{:controller => 'medical_problems', :action => :remote_new_medical_problem, :bat => @bat},
  :update=>'add_medical_problem'%>
</form>

<% if @bat.medical_problems.expired.length > 0 %>

Past Medical Problems:

	<%= render :partial => 'medical_problems/show_medical_problems', :locals=>{:medical_problems => @bat.medical_problems.expired, :show_bat => false,
		:list_all => true, :div_id => 'expired_medical_problems', :show_treatments => false} %>

<% end %>

<%= render :partial => 'display_weights', :locals => {:bat => @bat} %>

<% if @cihs.length >0 %>

Cage History:

  New Cage
  Old Cage
  Date in
  Why
  Who

  <% if @bat.cage == nil %>

  Deactivated Bat
  <%=h @bat.cage_out_histories[0].cage.name %>
  <%=h nice_date @bat.cage_out_histories[0].date %>
  <%=h @bat.cage_out_histories[0].note %>
  <%=h @bat.cage_out_histories[0].user.initials %>

  <% end %>

  <% for cih in @cihs %>

    <%=h cih.cage.name %>
    <% if cih.cage_out_history %>
    <%=h cih.cage_out_history.cage.name %>
    <% else %>
    -
    <% end %>
    <%=h nice_date cih.date %>
    <%=h cih.note %>
    <%=h cih.user.initials %>

  <% end %>

<% end %>

<%= link_to 'Edit', :action => 'edit', :id => @bat %> |
<%= link_to 'List Current Bats', :action => 'list' %>

<% if @bat.cage != nil%>
 | <%= link_to 'Move Bat', :action=>'single_bat_to_move', :id=>@bat %>
<% end %>


add destroy link in account show

add destroy link in account show

Account <%= @account.title %>

    Datum
    Text
    Belastung
    Gutschrift
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%= in_place_editor_field :booking, :in_place_value_date %>

      <%= in_place_editor_field :booking, :title %>
      <%= '
' unless booking.comments.empty? %>
      <%= in_place_editor_field :booking, :comments %>

    <%= in_place_editor_field :booking, :in_place_amount if booking.debit_account == @account %>
    <%= in_place_editor_field :booking, :in_place_amount if booking.credit_account == @account %>
    <%= currency_fmt(total_credit - total_debit) %>

      <%= link_to h(booking.in_place_value_date), :controller => :bookings, :action => :show, :id => booking %>
      <%= link_to image_tag('insert_booking.png'), :controller => :bookings, :action => :new %>
      <%= link_to image_tag('delete.png'), { :controller => :bookings, :action => 'destroy', :id => booking }, :confirm => 'Sicher?', :method => :post %>

  <% end %>

    Umsatz

    <%= currency_fmt(total_credit) %>
    <%= currency_fmt(total_debit) %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= currency_fmt(total_credit - total_debit) %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>

Account <%= @account.title %>

    Datum
    Text
    Belastung
    Gutschrift
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%= in_place_editor_field :booking, :in_place_value_date %>

      <%= in_place_editor_field :booking, :title %>
      <%= '
' unless booking.comments.empty? %>
      <%= in_place_editor_field :booking, :comments %>

    <%= in_place_editor_field :booking, :in_place_amount if booking.debit_account == @account %>
    <%= in_place_editor_field :booking, :in_place_amount if booking.credit_account == @account %>
    <%= currency_fmt(total_credit - total_debit) %>

      <%= link_to h(booking.in_place_value_date), :controller => :bookings, :action => :show, :id => booking %>
      <%= link_to image_tag('insert_booking.png'), :controller => :bookings, :action => :new %>

  <% end %>

    Umsatz

    <%= currency_fmt(total_credit) %>
    <%= currency_fmt(total_debit) %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= currency_fmt(total_credit - total_debit) %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>


Support :has_many :through nested scaffolds.

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

<h4> </h4>
<%
	# This assumes that the association is included as a column in the active_scaffold_config.columns collection
	associated_columns = []
	associated_columns = params[:associations].split(" ") unless params[:associations].nil?
	unless associated_columns.empty?
		parent_id = params[:id]
		associated_columns.each do | column_name |
			association = active_scaffold_config.columns[column_name].association
			controller, controller_path = active_scaffold_controller_for(association.klass, params[:controller])
			table_name = association.table_name
			table_name = association.options[:join_table] if association.macro == :has_and_belongs_to_many
			table_name = association.through_reflection.table_name if association.options[:through]
			primary_key = table_name + "." + association.primary_key_name
%>
		<%= render :active_scaffold => controller_path, :constraints => { primary_key.to_sym => parent_id}, :label => active_scaffold_config_for(association.klass).label + _("FOR") + active_scaffold_config.label, :options => {:association => column_name, :association_macro => association.macro, :parent_model => association.active_record} %>
<%
		end
  end
%>

<h4> </h4>
<%
	# This assumes that the association is included as a column in the active_scaffold_config.columns collection
	associated_columns = []
	associated_columns = params[:associations].split(" ") unless params[:associations].nil?
	unless associated_columns.empty?
		parent_id = params[:id]
		associated_columns.each do | column_name |
			association = active_scaffold_config.columns[column_name].association
			controller, controller_path = active_scaffold_controller_for(association.klass, params[:controller])
			table_name = association.table_name
			table_name = association.options[:join_table] if association.macro == :has_and_belongs_to_many
			primary_key = table_name + "." + association.primary_key_name
%>
		<%= render :active_scaffold => controller_path, :constraints => { primary_key.to_sym => parent_id}, :label => active_scaffold_config_for(association.klass).label + _("FOR") + active_scaffold_config.label, :options => {:association => column_name, :association_macro => association.macro, :parent_model => association.active_record} %>
<%
		end
  end
%>


Oops, how did that checkbox get in there?

<% record = list_record if list_record # compat with render :partial :collection -%>
<% classAttr = cycle("", "class=\"even\"") -%>
<% url_options = params_for(:action => :list, :id => record.id) -%>

<tr <%= classAttr %> id="<%= element_row_id(:action => :list, :id => record.id) %>">
  <% active_scaffold_config.list.columns.each do |column| %>
    <% column_value = render_column(record, column) -%>

    <td class="<%= column_class(column, column_value) %>" >
      <% if column.link -%>
        <% column.link.label = column_value %>
        <%= render_action_link(column.link, url_options) %>
      <% else -%>
        <%= column_value %>
      <% end -%>

  <% end -%>
  <% if active_scaffold_config.action_links.any? {|link| link.type == :record } -%>

    <%= render :partial => 'list_actions', :locals => {:record => record, :url_options => url_options} %>

  <% end -%>

<% target_id = element_row_id(:action => :list, :id => record.id) -%>

<% record = list_record if list_record # compat with render :partial :collection -%>
<% classAttr = cycle("", "class=\"even\"") -%>
<% url_options = params_for(:action => :list, :id => record.id) -%>

<tr <%= classAttr %> id="<%= element_row_id(:action => :list, :id => record.id) %>">
  <% active_scaffold_config.list.columns.each do |column| %>
    <% column_value = render_column(record, column) -%>

    <td class="<%= column_class(column, column_value) %>" >
      <% if column.link -%>
        <% column.link.label = column_value %>
        <%= render_action_link(column.link, url_options) %>
      <% elsif column.ui_type == :boolean -%>
        <%= check_box_tag(nil, 1, column_value || column_value == 1, :disabled => true) %>
      <% else -%>
        <%= column_value %>
      <% end -%>

  <% end -%>
  <% if active_scaffold_config.action_links.any? {|link| link.type == :record } -%>

    <%= render :partial => 'list_actions', :locals => {:record => record, :url_options => url_options} %>

  <% end -%>

<% target_id = element_row_id(:action => :list, :id => record.id) -%>