Remove text_field to configure theme name from General settings tab

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

<% @page_heading = 'Blog settings' %>

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

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

General Settings

      Blog name:
      <input name="setting[blog_name]" id="blog_name" type="text" value="<%= config_value(:blog_name) %>" />

      Blog subtitle:
      <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%= config_value(:blog_subtitle) %>" />

      <input name="setting[default_allow_comments]" id="default_allow_comments" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_comments)%> />
      <input name="setting[default_allow_comments]" type="hidden" value="0"/>
        Enable comments by default

      <input name="setting[default_allow_pings]" id="default_allow_pings" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_pings)%> />
      <input name="setting[default_allow_pings]" type="hidden" value="0"/>
        Enable Trackbacks by default

      Display
      <input name="setting[limit_article_display]" size="4" id="limit_article_display" type="text" value="<%= config_value(:limit_article_display) %>" /> articles on my homepage by default.

      Display
      <input name="setting[limit_rss_display]" size="4" id="limit_rss_display" type="text" value="<%= config_value(:limit_rss_display) %>" /> articles in my rss feed by default.

Should the blog show mailto: links to your email address?

<input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:link_to_author)%> /><input name="setting[link_to_author]" type="hidden" value="0"/> Enable E-Mail public display

Would you like to include your latitude and longitude in your blog's HTML pages? See GeoURL for details.
Example: <tt>47.774,-122.201</tt>

      Latitude, Longitude:
      <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= config_value(:geourl_location) %>" />

<%= save("Save My Settings") %>

Text Filter

Your options depend on which gems you have installed. Following configurations are supported. RedCloth, BlueCloth and RubyPants gems are supported.

        <select name="setting[text_filter]" id="text_filter">
          <%= options_for_select text_filter_options, config_value(:text_filter) %>
        </select>
        Article filter

        <select name="setting[comment_text_filter]" id="comment_text_filter">
        <%= options_for_select text_filter_options, config_value(:comment_text_filter) %>
        </select>
        Comments filter

<%= save("Save My Settings") %>

Spam Protection

Enabling spam protection will make typo compare the IP address of posters against blacklists. Good defense against spam bots.

          <input name="setting[sp_global]" id="sp_global" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:sp_global)%> /><input name="setting[sp_global]" type="hidden" value="0"/>
          Enable spam protection

          Disable comments after
          <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= config_value(:sp_article_auto_close) %>" /> days

(Set to 0 to never disable comments)

Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them.

          Max URLs:
          <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= config_value(:sp_url_limit) %>" /> links

(Set to 0 to never reject comments)

<%= save("Save My Settings") %>

    <%= save("Save My Settings") %>

  <%= end_form_tag %>

<% @page_heading = 'Blog settings' %>

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

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

General Settings

      Blog name:
      <input name="setting[blog_name]" id="blog_name" type="text" value="<%= config_value(:blog_name) %>" />

      Blog subtitle:
      <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%= config_value(:blog_subtitle) %>" />

      Blog theme:
      <input name="setting[theme]" id="theme" type="text" value="<%= config_value(:theme) %>" />

      <input name="setting[default_allow_comments]" id="default_allow_comments" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_comments)%> />
      <input name="setting[default_allow_comments]" type="hidden" value="0"/>
        Enable comments by default

      <input name="setting[default_allow_pings]" id="default_allow_pings" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:default_allow_pings)%> />
      <input name="setting[default_allow_pings]" type="hidden" value="0"/>
        Enable Trackbacks by default

        Display
        <input name="setting[limit_article_display]" size="4" id="limit_article_display" type="text" value="<%= config_value(:limit_article_display) %>" /> articles on my homepage by default.

        Display
        <input name="setting[limit_rss_display]" size="4" id="limit_rss_display" type="text" value="<%= config_value(:limit_rss_display) %>" /> articles in my rss feed by default.

Should the blog show mailto: links to your email address?

<input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:link_to_author)%> /><input name="setting[link_to_author]" type="hidden" value="0"/> Enable E-Mail public display

Would you like to include your latitude and longitude in your blog's HTML pages? See GeoURL for details.
Example: <tt>47.774,-122.201</tt>

Latitude, Longitude:
      <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= config_value(:geourl_location) %>" />

<%= save("Save My Settings") %>

Text Filter

Your options depend on which gems you have installed. Following configurations are supported. RedCloth, BlueCloth and RubyPants gems are supported.

        <select name="setting[text_filter]" id="text_filter">
          <%= options_for_select text_filter_options, config_value(:text_filter) %>
        </select>
        Article filter

        <select name="setting[comment_text_filter]" id="comment_text_filter">
        <%= options_for_select text_filter_options, config_value(:comment_text_filter) %>
        </select>
        Comments filter

<%= save("Save My Settings") %>

Spam Protection

Enabling spam protection will make typo compare the IP address of posters against blacklists. Good defense against spam bots.

          <input name="setting[sp_global]" id="sp_global" type="checkbox" value="1" <%= 'checked="checked"' if config_value(:sp_global)%> /><input name="setting[sp_global]" type="hidden" value="0"/>
          Enable spam protection

          Disable comments after
          <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= config_value(:sp_article_auto_close) %>" /> days

(Set to 0 to never disable comments)

Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them.

          Max URLs:
          <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= config_value(:sp_url_limit) %>" /> links

(Set to 0 to never reject comments)

<%= save("Save My Settings") %>

    <%= save("Save My Settings") %>

  <%= end_form_tag %>


only show moderate comments link if there are comments to moderate

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

<% content_for :action_nav do %>

<%= link_to "Create new article", :controller => 'articles', :action => "new" %>

<%= link_to "Create new section", :controller => 'sections' %>

  <% if @articles.any? -%>

<%= link_to "Moderate Comments",  :controller => 'comments' %>

  <% end -%>

<% end %>

  <%= link_to 'Subscribe', overview_url, :class => 'feed right' %>

Today <%= todays_short_date %>

  <%= render_events @todays_events %>

Yesterday <%= yesterdays_short_date %>

  <%= render_events @yesterdays_events %>

Before <%= yesterdays_short_date %>

  <%= render_events @events, true %>

<% content_for :sidebar do %>
  <% if @articles.any? -%>

Comments awaiting your approval

    <% @articles.each do |article| -%>

<%= link_to "(#{article.unapproved_comments.size}) #{h(article.title)}", :controller => 'articles', :action => 'comments', :id => article.id, :filter => :unapproved %>

    <% end -%>

  <% end -%>

Authors

      <% for user in @users %>

<%= link_to who(user.login), :controller => 'users', :action => 'show', :id => user.login %> showed up <%= distance_of_time_in_words_to_now(user.updated_at) %> ago

      <% end %>

<% end %>

<% content_for :action_nav do %>

<%= link_to "Create new article", :controller => 'articles', :action => "new" %>

<%= link_to "Create new section", :controller => 'sections' %>

<%= link_to "Moderate Comments",  :controller => 'comments' %>

<% end %>

  <%= link_to 'Subscribe', overview_url, :class => 'feed right' %>

Today <%= todays_short_date %>

  <%= render_events @todays_events %>

Yesterday <%= yesterdays_short_date %>

  <%= render_events @yesterdays_events %>

Before <%= yesterdays_short_date %>

  <%= render_events @events, true %>

<% content_for :sidebar do %>
  <% if @articles.any? -%>

Comments awaiting your approval

    <% @articles.each do |article| -%>

<%= link_to "(#{article.unapproved_comments.size}) #{h(article.title)}", :controller => 'articles', :action => 'comments', :id => article.id, :filter => :unapproved %>

    <% end -%>

  <% end -%>

Authors

      <% for user in @users %>

<%= link_to who(user.login), :controller => 'users', :action => 'show', :id => user.login %> showed up <%= distance_of_time_in_words_to_now(user.updated_at) %> ago

      <% end %>

<% end %>


Updated browser_sessions#new: Hid the 'remember me' checkbox.

<% page_title "Login" %>

<%= snippet_for :login_openid_text %>

<% form_tag(browser_session_path, :id => "session_form", :class => "standard-form") do %>

      <%= image_tag "openid-icon.gif" %>
      OpenID

    <%= text_field_tag "openid_url" %>

    <%= submit_tag 'Log in' %>

    <%= javascript_include_tag "idselector" %>

<% end %>

<% if development_mode? %>

    Developer:

    <% user = User.find_first_admin %>
    <%= button_to("Login as admin", browser_session_path(:login_as => user.login), :method => "post") if user %>

    <% user = User.find_first_non_admin %>
    <%= button_to("Login as non-admin", browser_session_path(:login_as => user.login), :method => "post") if user %>

<% end %>

<% page_title "Login" %>

<%= snippet_for :login_openid_text %>

<% form_tag(browser_session_path, :id => "session_form", :class => "standard-form") do %>

      <%= image_tag "openid-icon.gif" %>
      OpenID

    <%= text_field_tag "openid_url" %>

    <%= submit_tag 'Log in' %>

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

    <%= javascript_include_tag "idselector" %>

<% end %>

<% if development_mode? %>

    Developer:

    <% user = User.find_first_admin %>
    <%= button_to("Login as admin", browser_session_path(:login_as => user.login), :method => "post") if user %>

    <% user = User.find_first_non_admin %>
    <%= button_to("Login as non-admin", browser_session_path(:login_as => user.login), :method => "post") if user %>

<% end %>


fix user menu

fix user menu

<%= link_to "Back", root_path %>

   <% if user_signed_in? %>

 Hi<%= link_to current_user.username, profile_path %>!

<% if can? :create, Proposal %>

<%=link_to 'Proposals', profile_proposals_path %>

<%=link_to 'Projects', profile_projects_path %>

<% end %>

<% if can? :create, Gallery %>

<%=link_to 'Galleries', profile_galleries_path %>

<% else %>

	<%= if current_user.change_role.empty?
			link_to 'Become a special member', new_profile_change_role_path
		else
			link_to 'Membership requested', profile_change_role_path(current_user.change_role.id)
		end %>
<% end %>

<%=link_to 'Edit info', edit_user_path(current_user) %>

<%= link_to "Sign out", destroy_user_session_path %>

   <% else %>

<%= link_to "Sign up", new_user_registration_path %> 	or

<%= link_to "Log in", new_user_session_path %>

   <% end %>

<%= link_to "Back", root_path %>

   <% if user_signed_in? %>

 Hi<%= link_to current_user.username, profile_path %>!

<% if can? :create, Proposal %>

<%=link_to 'Proposals', profile_proposals_path %>

<%=link_to 'Projects', profile_projects_path %>

<% end %>

<% if can? :create, Gallery %>

<%=link_to 'Galleries', profile_galleries_path %>

<% else %>

	<%= if current_user.change_role.empty?
			link_to 'Become a special member', new_profile_change_role_path
		else
			link_to 'Membership requested', profile_change_role_path(current_user.change_role)
		end %>
<% end %>

<%=link_to 'Edit info', edit_user_path(current_user) %>

<%= link_to "Sign out", destroy_user_session_path %>

   <% else %>

<%= link_to "Sign up", new_user_registration_path %> 	or

<%= link_to "Log in", new_user_session_path %>

   <% end %>


Eliminar los warnings: don't put space before argument parentheses

git-svn-id: 268669d3058f191005ae665964cd19b71efa10c4@13726 3f47a204-8049-4147-aab0-d444c64e7564

<title>Groups</title>

<%= stylesheet_link_tag 'draganddrop' %>

Add users to the group

<%if @edit%>
<form action="/space/<%=@container.id%>/update_group/<%=@role.id%>" class="edit_group" id="edit_group" method="post" name="group_space_form">
<%else%>
<form action="/space/<%=@container.id%>/save_group" class="edit_group" id="edit_group" method="post" name="group_space_form">
<%end%>

Name for the Group

<%= text_field :group, :name %>

   Users

	<%= render :partial=> '/users/search' %>

	Bin

   <%= image_tag "/images/papelera.png", :id => "papelera", :alt => "bin", :class => "bin"  %>

	   Group Users

	   <%i=0%>
	   <%for user in @users_group%>
	   		<div id="user_<%=@role.name+i.to_s%>"><%=user.login%>

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

	<input type="hidden" name="group_users" value="" />

Create posts

<%= check_box(:group, "create_posts", {}, "true", "false") %>

Read posts

<%= check_box(:group, "read_posts", {}, "true", "false") %>

Update Posts

<%= check_box(:group, "update_posts", {}, "true", "false")%>

Delete Posts

<%= check_box(:group, "delete_posts", {}, "true", "false") %>

Create performances

<%= check_box(:group, "create_performances", {}, "true", "false") %>

Read performances

<%= check_box(:group, "read_performances", {}, "true", "false") %>

Update performances

<%= check_box(:group, "update_performances", {}, "true", "false") %>

Delete performances

<%= check_box(:group, "delete_performances", {}, "true", "false") %>

Manage Events

<%= check_box(:group, "manage_events", {}, "true", "false") %>

Admin

<%= check_box(:group, "admin", {}, "true", "false") %>

	<input type="button" name="Confirm" value="Confirm" style="width: 100px;" onClick=sendData()>
	<input type="button" name="Back" value="Back" style="width: 100px;" onClick=document.location="/spaces/<%=@container.id%>/show_groups">

</form>

<title>Groups</title>

<%= stylesheet_link_tag 'draganddrop' %>

Add users to the group

<%if @edit%>
<form action="/space/<%=@container.id%>/update_group/<%=@role.id%>" class="edit_group" id="edit_group" method="post" name="group_space_form">
<%else%>
<form action="/space/<%=@container.id%>/save_group" class="edit_group" id="edit_group" method="post" name="group_space_form">
<%end%>

Name for the Group

<%= text_field :group, :name %>

   Users

	<%= render :partial=> '/users/search' %>

	Bin

   <%= image_tag "/images/papelera.png", :id => "papelera", :alt => "bin", :class => "bin"  %>

	   Group Users

	   <%i=0%>
	   <%for user in @users_group%>
	   		<div id="user_<%=@role.name+i.to_s%>"><%=user.login%>

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

	<input type="hidden" name="group_users" value="" />

Create posts

<%= check_box(:group, "create_posts", {}, "true", "false") %>

Read posts

<%= check_box (:group, "read_posts", {}, "true", "false") %>

Update Posts

<%= check_box (:group, "update_posts", {}, "true", "false")%>

Delete Posts

<%= check_box (:group, "delete_posts", {}, "true", "false") %>

Create performances

<%= check_box (:group, "create_performances", {}, "true", "false") %>

Read performances

<%= check_box (:group, "read_performances", {}, "true", "false") %>

Update performances

<%= check_box (:group, "update_performances", {}, "true", "false") %>

Delete performances

<%= check_box (:group, "delete_performances", {}, "true", "false") %>

Manage Events

<%= check_box (:group, "manage_events", {}, "true", "false") %>

Admin

<%= check_box (:group, "admin", {}, "true", "false") %>

	<input type="button" name="Confirm" value="Confirm" style="width: 100px;" onClick=sendData()>
	<input type="button" name="Back" value="Back" style="width: 100px;" onClick=document.location="/spaces/<%=@container.id%>/show_groups">

</form>


use new javascript

use new javascript

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

<title><%= AppConfig.param("app_name") %>
  <% if @page_title %>
  |
  <%end%>
  <%= @page_title %></title>
 <%= stylesheet_link_tag 'basic' %>

<%= render_javascript_behaviors(:search_complete) %>

      <%= image_tag('/local/header.gif')
      %>

    <%= @content_for_layout %>

      FindIt service provided by <%= link_to 'Johns Hopkins Libraries', 'http://webapps.jhu.edu/jhuniverse/libraries/' %> | Powered by <%= link_to 'Umlaut', 'http://umlaut.rubyforge.org/' %>, using services from <%= link_to 'SFX', 'http://www.exlibrisgroup.com/sfx.htm' %>, <%= link_to 'CrossRef', 'http://www.crossref.org' %>, <%= link_to 'Amazon', 'http://www.amazon.com' %>, <%= link_to 'OCLC Worldcat', 'http://www.worldcat.org' %>, <%= link_to 'ISBNdb', 'http://isbndb.com' %> and others.

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

<title><%= AppConfig.param("app_name") %>
  <% if @page_title %>
  |
  <%end%>
  <%= @page_title %></title>
 <%= stylesheet_link_tag 'basic' %>

<%= render(:partial => "layout_helpers/resolve_head_content" ) %>

      <%= image_tag('/local/header.gif')
      %>

    <%= @content_for_layout %>

      FindIt service provided by <%= link_to 'Johns Hopkins Libraries', 'http://webapps.jhu.edu/jhuniverse/libraries/' %> | Powered by <%= link_to 'Umlaut', 'http://umlaut.rubyforge.org/' %>, using services from <%= link_to 'SFX', 'http://www.exlibrisgroup.com/sfx.htm' %>, <%= link_to 'CrossRef', 'http://www.crossref.org' %>, <%= link_to 'Amazon', 'http://www.amazon.com' %>, <%= link_to 'OCLC Worldcat', 'http://www.worldcat.org' %>, <%= link_to 'ISBNdb', 'http://isbndb.com' %> and others.


YADP (Yet Another Dirty Patch), this time for shared/_lated_posts

git-svn-id: 268669d3058f191005ae665964cd19b71efa10c4@14222 3f47a204-8049-4147-aab0-d444c64e7564

<% @space.container_entries.select{ |e| e.content_type == 'XhtmlText' }.first(5).each do |entry| -%>

    <%= link_to sanitize(entry.title), space_entry_path(@space, entry) %>

<% end -%>
<% if @space.id == 1%>
<% @public_entries.each do |entry|%>

    <%= link_to sanitize(entry.title), entry_path(entry) %>
    <%= entry.content.class %>

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

<% @space.container_entries.first(5).each do |entry| -%>

    <%= link_to sanitize(entry.title), space_entry_path(@space, entry) %>
    <%= entry.content.class %>

<% end -%>
<% if @space.id == 1%>
<% @public_entries.each do |entry|%>

    <%= link_to sanitize(entry.title), entry_path(entry) %>
    <%= entry.content.class %>

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


Security: More h(...) tags

Security: More h(...) tags

These are based on manual inspection.

    <%=h @theme.title %> (v<%=h @theme.version %>)by <% if @theme.author %><a href="<%=h @theme.homepage %>"><%=h @theme.author %><% else %>Unknown<% end %>
    <%= link_to_function 'close', 'Dialog.close()', :id => 'close-dialog' %>

    <img src="<%= url_for(:controller => '/admin/themes', :action => 'preview_for', :id => @theme) %>" alt="Theme preview" title="<%=h @theme.title %> (v<%=h @theme.version %>)" />

<%= @theme.summary %>

    <% unless @theme.current? -%>

<%= link_to 'Use theme', {:action => 'change_to', :id => @theme }, :method => :post %>

<%= link_to 'Edit theme', :controller => 'design', :action => 'index', :theme => @theme %>

    <% else -%>

<%= link_to 'Edit theme', :controller => 'design', :action => 'index' %>

    <% end -%>

<%= link_to 'Download theme', {:action => 'export', :id => @theme}, :method => :post %>

    <% unless @theme.current? -%>

<%= link_to_remote 'Delete theme', :url => {:action => 'destroy', :id => @theme}, :method => :delete,
                :confirm => "Are you sure you wish to delete this theme stored at 'themes/site-#{site.id}/#{@theme.path.relative_path_from(site.theme_path).to_s}'?" %>

    <% end -%>

    <%= @theme.title %> (v<%= @theme.version %>)by <% if @theme.author %><a href="<%= @theme.homepage %>"><%= @theme.author %><% else %>Unknown<% end %>
    <%= link_to_function 'close', 'Dialog.close()', :id => 'close-dialog' %>

    <img src="<%= url_for(:controller => '/admin/themes', :action => 'preview_for', :id => @theme) %>" alt="Theme preview" title="<%=h @theme.title %> (v<%=h @theme.version %>)" />

<%= @theme.summary %>

    <% unless @theme.current? -%>

<%= link_to 'Use theme', {:action => 'change_to', :id => @theme }, :method => :post %>

<%= link_to 'Edit theme', :controller => 'design', :action => 'index', :theme => @theme %>

    <% else -%>

<%= link_to 'Edit theme', :controller => 'design', :action => 'index' %>

    <% end -%>

<%= link_to 'Download theme', {:action => 'export', :id => @theme}, :method => :post %>

    <% unless @theme.current? -%>

<%= link_to_remote 'Delete theme', :url => {:action => 'destroy', :id => @theme}, :method => :delete,
                :confirm => "Are you sure you wish to delete this theme stored at 'themes/site-#{site.id}/#{@theme.path.relative_path_from(site.theme_path).to_s}'?" %>

    <% end -%>


ActionItem656: fixed

ActionItem656: fixed

git-svn-id: 9ca994807ddd1e9d109835a4db752fd9226bebe5@2487 3f533792-8f58-4932-b0fe-aaf55b0a4547

<h2 class="<%= profile.class == Person ? 'fn' : 'org' %>"><%= block.owner.short_name %>

      <%=
        profile_image(block.owner, :thumb) +"\n"+
        profile_sex_icon( profile ) +
        profile_cat_icons( profile )
      %>

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

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

<%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) if block.owner.enterprise? && !block.owner.environment.enabled?('disable_products_for_enterprises') %>

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

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

  <% end %>

<%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %>

<% if profile.respond_to? :city %>

<%=
  [ [ profile.city, 'locality' ],
    [ profile.state, 'region' ],
    [ profile.country, 'country-name' ]
  ].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
%>

<% end %>

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

<h2 class="<%= profile.class == Person ? 'fn' : 'org' %>"><%= block.owner.short_name %>

      <%=
        profile_image(block.owner, :thumb) +"\n"+
        profile_sex_icon( profile ) +
        profile_cat_icons( profile )
      %>

<%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %>

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

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

<%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) if block.owner.enterprise? && !block.owner.environment.enabled?('disable_products_for_enterprises') %>

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

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

  <% end %>

<% if profile.respond_to? :city %>

<%=
  [ [ profile.city, 'locality' ],
    [ profile.state, 'region' ],
    [ profile.country, 'country-name' ]
  ].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
%>

<% end %>

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


allow a form tag to surround #main-content

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

<!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" />
		<title><%= site.title %>: Admin <%= controller.controller_name %></title>
		<%= stylesheet_link_tag 'mephisto' %>
		<%= javascript_include_tag :defaults %>
		<%= javascript_include_tag 'mephisto' %>

<%= link_to 'settings', :controller => 'settings' %>

<%= link_to 'account', :controller => 'users', :action => 'show', :id => current_user %>

<%= link_to 'logout', :controller => '/account', :action => 'logout' %>

<%= link_to "#{site.title} — Admin", { :controller => '/admin/overview' }, :title => "#{site.title} admin" %>

        <% if logged_in? -%>

<%= link_to 'Overview', :controller => '/admin/overview' %>

<%= link_to 'Articles',  :controller => '/admin/articles' %>

<%= link_to 'Sections', :controller => '/admin/sections' %>

<%= link_to 'Design',     :controller => '/admin/design' %>

<%= link_to "Users",      :controller => "users" %>

        <% end -%>

<%= @flash[:notice] %>

          <%= yield :action_nav %>

    	    <%= yield :form if @content_for_form %>

<%= yield %>

    	    <%= '</form>' if @content_for_form %>

    	    <%= yield :sidebar %>

<!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" />
		<title><%= site.title %>: Admin <%= controller.controller_name %></title>
		<%= stylesheet_link_tag 'mephisto' %>
		<%= javascript_include_tag :defaults %>
		<%= javascript_include_tag 'mephisto' %>

<%= link_to 'settings', :controller => 'settings' %>

<%= link_to 'account', :controller => 'users', :action => 'show', :id => current_user %>

<%= link_to 'logout', :controller => '/account', :action => 'logout' %>

<%= link_to "#{site.title} — Admin", { :controller => '/admin/overview' }, :title => "#{site.title} admin" %>

        <% if logged_in? -%>

<%= link_to 'Overview', :controller => '/admin/overview' %>

<%= link_to 'Articles',  :controller => '/admin/articles' %>

<%= link_to 'Sections', :controller => '/admin/sections' %>

<%= link_to 'Design',     :controller => '/admin/design' %>

<%= link_to "Users",      :controller => "users" %>

        <% end -%>

<%= @flash[:notice] %>

          <%= yield :action_nav %>

<%= yield %>

    	    <%= yield :sidebar %>


Show user tracking

Show user tracking

  Id
  User
  <% for column in TrackThing.content_columns %>
    <%= column.human_name %>
  <% end %>
  Items sent by email
  Actions

<% for track_thing in track_things %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h track_thing.id %>
  <%=user_both_links(track_thing.tracking_user) %>
  <% for column in TrackThing.content_columns.map { |c| c.name } %>
    <%=h track_thing.send(column) %>
  <% end %>
  <%= track_thing.track_things_sent_emails.size %>

      <% form_tag '../../user/destroy_track' do %>

              <%= hidden_field_tag 'track_id', track_thing.id %>
              <%= submit_tag "Destroy track" %>

      <% end %>

<% end %>

  Id
  <% for column in TrackThing.content_columns %>
    <%= column.human_name %>
  <% end %>
  Items sent by email
  Actions

<% for track_thing in track_things %>
  <tr class="<%= cycle('odd', 'even') %>">
  <%=h track_thing.id %>
  <% for column in TrackThing.content_columns.map { |c| c.name } %>
    <%=h track_thing.send(column) %>
  <% end %>
  <%= track_thing.track_things_sent_emails.size %>

      <% form_tag '../../user/destroy_track' do %>

              <%= hidden_field_tag 'track_id', track_thing.id %>
              <%= submit_tag "Destroy track" %>

      <% end %>

<% end %>


Use states from the model when displaying the InfoRequest edit form (rather than a hard-coded duplicate list)

Edit basic details of request

<%= error_messages_for 'info_request' %>

<% form_tag '../update/' + @info_request.id.to_s do %>

Title (warning: editing this will break URLs right now)

   <%= text_field 'info_request', 'title', :size => 50  %>

Prominence
   <%= select( 'info_request', "prominence", [ "normal", "backpage", "requester_only", "hidden" ]) %>
   (backpage means hidden from lists/search; hidden means completely hidden; super users can see anything)

   Allow new responses from
   <%= select( 'info_request', "allow_new_responses_from", [ "anybody", "authority_only", "nobody" ] ) %>;
   Handle rejected responses with
   <%= select( 'info_request', "handle_rejected_responses", [ "bounce", "holding_pen", "blackhole" ] ) %>

   ('authority_only' means email From: domain of authority request email or any domain that has previously sent a response; 'nobody' also stops requester making followups; take care when using 'blackhole' which just drops mail)

Described state
   <%= select( 'info_request', "described_state", InfoRequest.enumerate_states) %>
    Awaiting description
   <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %>

(don't forget to change 'awaiting description' when you set described state)

Tags (space separated, can use key:value)

   <%= text_field 'info_request', 'tag_string', :size => 60  %>

<%= submit_tag 'Save changes', :accesskey => 's' %>

Note: To edit the actual request body text, click edit
  next to the specific outgoing message.

<% end %>

<%= link_to 'Show', '../show/' + @info_request.id.to_s %> |
<%= link_to 'List all', '../list' %>

<% form_tag '../fully_destroy/' + @info_request.id.to_s do %>

    This is permanent and irreversible! <%= submit_tag 'Destory request entirely' %>

Use it mainly if someone posts private information, e.g. made a Data Protection request. It
    destroys all responses and tracks as well.

<% end %>

Edit basic details of request

<%= error_messages_for 'info_request' %>

<% form_tag '../update/' + @info_request.id.to_s do %>

Title (warning: editing this will break URLs right now)

   <%= text_field 'info_request', 'title', :size => 50  %>

Prominence
   <%= select( 'info_request', "prominence", [ "normal", "backpage", "requester_only", "hidden" ]) %>
   (backpage means hidden from lists/search; hidden means completely hidden; super users can see anything)

   Allow new responses from
   <%= select( 'info_request', "allow_new_responses_from", [ "anybody", "authority_only", "nobody" ] ) %>;
   Handle rejected responses with
   <%= select( 'info_request', "handle_rejected_responses", [ "bounce", "holding_pen", "blackhole" ] ) %>

   ('authority_only' means email From: domain of authority request email or any domain that has previously sent a response; 'nobody' also stops requester making followups; take care when using 'blackhole' which just drops mail)

Described state
   <%= select( 'info_request', "described_state",
       [
        'waiting_response',
        'waiting_clarification',
        'gone_postal',
        'not_held',
        'rejected',
        'successful',
        'partially_successful',
        'internal_review',
        'error_message',
        'requires_admin',
        'user_withdrawn'
    ]) %>;
    Awaiting description
   <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %>

(don't forget to change 'awaiting description' when you set described state)

Tags (space separated, can use key:value)

   <%= text_field 'info_request', 'tag_string', :size => 60  %>

<%= submit_tag 'Save changes', :accesskey => 's' %>

Note: To edit the actual request body text, click edit
  next to the specific outgoing message.

<% end %>

<%= link_to 'Show', '../show/' + @info_request.id.to_s %> |
<%= link_to 'List all', '../list' %>

<% form_tag '../fully_destroy/' + @info_request.id.to_s do %>

    This is permanent and irreversible! <%= submit_tag 'Destory request entirely' %>

Use it mainly if someone posts private information, e.g. made a Data Protection request. It
    destroys all responses and tracks as well.

<% end %>


Instructions updated

Instructions updated

 Instructions

 The date goes here

 Blog posts will be added and visualized in this section.

To add a new post Select the 'New' button

To edit or delete a post click on the post 'Edit' button.

This post will dissapear when you add a new one

 Instructions

 The date goes here

 Blog posts will be added and visualized in this section.

To add a new post Select the 'New' button

To read, edit or delete a post click on the post name.

This post will dissapear when you add a new one


Reduce lookups on the public repos page by using joins in the model

All Public Repositories <%= if logged_in? then link_to_unless_current '[Add]', { :action => 'new', :controller => 'repo' }, :rel => 'facebox' else link_to_unless_current '[Add]', { :action => 'new', :controller => 'repo' } end %>

	<% for repo in @repos%>

<%= link_to(repo.name, :controller=>'repo', :action => 'show', :id => repo.id)%>

Description: <%= repo.desc%>

Owner: <%=link_to repo.user.username, :controller => 'user', :action => 'profile', :username => repo.user.username%>

		<% if logged_in?%>
			<% if watching_repo?(repo.id) != 0 %>
				<%=link_to 'Un-Watch', {:action => "unwatch", :repo_id => repo.id}, :method => :post %>
			<%else%>
				<%=link_to 'Watch', {:action => "watch", :repo_id => repo.id}, :method => :post %>
			<%end%>
		<%end%>

	<%end%>

All Public Repositories <%= if logged_in? then link_to_unless_current '[Add]', { :action => 'new', :controller => 'repo' }, :rel => 'facebox' else link_to_unless_current '[Add]', { :action => 'new', :controller => 'repo' } end %>

	<% for repo in @repos%>

<%= link_to(repo.name, :controller=>'repo', :action => 'show', :id => repo.id)%>

Description: <%= repo.desc%>

Owner: <%=link_to user_lookup(repo.user_id).username, :controller => 'user', :action => 'profile', :username => repo.user.username%>

		<% if logged_in?%>
			<% if watching_repo?(repo.id) != 0 %>
				<%=link_to 'Un-Watch', {:action => "unwatch", :repo_id => repo.id}, :method => :post %>
			<%else%>
				<%=link_to 'Watch', {:action => "watch", :repo_id => repo.id}, :method => :post %>
			<%end%>
		<%end%>

	<%end%>


ActionItem158: better wording for 'View'

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

<% if @article %>

    <%= icon('cms') %>
    <%= link_to profile.identifier, :action => 'index' %>
    <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.name, :id => item.id)) } %>

<% else %>

    <%= icon('cms') %>
    <%= _('Content management') %>

<% end %>

<% button_bar(:style => 'margin-bottom: 1em;') do %>
  <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>
  <%= button :add, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %>
  <%= lightbox_button('new', _('New article'), :action => 'new', :parent_id => parent_id) %>
<% end %>

  <%# header %>

    <%= _('Name') %>
    <%= _('Type') %>
    <%= _('Actions') %>

  <%# folders %>
  <% for folder in @folders %>

        <%= image_tag(icon_for_article(folder)) %>
        <%= link_to folder.name, :action => 'view', :id => folder.id %>

        <%= folder.class.short_description %>

        <%= link_to _('Properties'), :action => 'edit', :id => folder.id %>
        <%= link_to _('Public view'), folder.url %>

  <% end %>

  <%# non-folder subitems %>
  <% unless @folders.empty? %>

  <% end %>
  <% if @subitems.empty? %>

<%= _('None') %>

  <% end %>
  <% for item in @subitems %>

        <%= image_tag(icon_for_article(item)) %>
        <%= link_to item.name, :action => 'edit', :id => item.id %>

        <%= item.class.short_description %>

        <%= link_to _('Edit'), :action => 'edit', :id => item.id %>
        <%= link_to _('Public view'), item.url %>

  <% end %>

<% if @article %>

    <%= icon('cms') %>
    <%= link_to profile.identifier, :action => 'index' %>
    <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.name, :id => item.id)) } %>

<% else %>

    <%= icon('cms') %>
    <%= _('Content management') %>

<% end %>

<% button_bar(:style => 'margin-bottom: 1em;') do %>
  <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>
  <%= button :add, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %>
  <%= lightbox_button('new', _('New article'), :action => 'new', :parent_id => parent_id) %>
<% end %>

  <%# header %>

    <%= _('Name') %>
    <%= _('Type') %>
    <%= _('Actions') %>

  <%# folders %>
  <% for folder in @folders %>

        <%= image_tag(icon_for_article(folder)) %>
        <%= link_to folder.name, :action => 'view', :id => folder.id %>

        <%= folder.class.short_description %>

        <%= link_to _('Properties'), :action => 'edit', :id => folder.id %>
        <%= link_to _('View'), folder.url %>

  <% end %>

  <%# non-folder subitems %>
  <% unless @folders.empty? %>

  <% end %>
  <% if @subitems.empty? %>

<%= _('None') %>

  <% end %>
  <% for item in @subitems %>

        <%= image_tag(icon_for_article(item)) %>
        <%= link_to item.name, :action => 'edit', :id => item.id %>

        <%= item.class.short_description %>

        <%= link_to _('Edit'), :action => 'edit', :id => item.id %>
        <%= link_to _('View'), item.url %>

  <% end %>


Bug that contained 'question' undefined variable for default views

<div id="acts_as_pollable_<%= poll.name.gsub(/ /,'_').gsub(/\?/, '') %>">

  <%= in_place ?
       form_remote_tag(:url => url_for(:action =>'ap_vote_registered'), :update => "acts_as_pollable_#{poll.name.gsub(/ /, '_').gsub(/\?/, '')}") :
       form_tag(url_for( :action => 'ap_vote_registered' )) -%>

    Question: <%= poll.description %>

    <% poll.options.each do |answer| %>
      <%= radio_button_tag 'acts_as_pollable_answer[]', answer[:id] unless poll.multiple -%>
      <%= check_box_tag    'acts_as_pollable_answer[]', answer[:id] if poll.multiple     -%>
      <%= answer[:description] %>

    <% end %>

    <input type="hidden" name="poll_name" value="<%= poll.name -%>"/>
    <input type="hidden" name="redirect" value="<%= redirect -%>"/>
    <input type="hidden" name="in_place" value="<%= in_place -%>"/>
    <%= submit_tag 'Vote' %>

  </form>

<div id="acts_as_pollable_<%= poll.name.gsub(/ /,'_').gsub(/\?/, '') %>">

  <%= in_place ?
       form_remote_tag(:url => url_for(:action =>'ap_vote_registered'), :update => "acts_as_pollable_#{poll.name.gsub(/ /, '_').gsub(/\?/, '')}") :
       form_tag(url_for( :action => 'ap_vote_registered' )) -%>

    Question: <%= question.description %>

    <% poll.options.each do |answer| %>
      <%= radio_button_tag 'acts_as_pollable_answer[]', answer[:id] unless question.multiple -%>
      <%= check_box_tag    'acts_as_pollable_answer[]', answer[:id] if question.multiple     -%>
      <%= answer[:description] %>

    <% end %>

    <input type="hidden" name="poll_name" value="<%= poll.name -%>"/>
    <input type="hidden" name="redirect" value="<%= redirect -%>"/>
    <input type="hidden" name="in_place" value="<%= in_place -%>"/>
    <%= submit_tag 'Vote' %>

  </form>


Removing little mistaken quote

Removing little mistaken quote

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= html_language %>" lang="<%= html_language %>">

    <title><%= h page_title %></title>
    <%= yield(:feeds) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= noosfero_stylesheets %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%= body_classes %>">
    <%= _("Go to the content") %>

    <%=
      @plugins.dispatch(:body_beginning).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

        <%= theme_header %>

        <%= render :partial => 'layouts/user' %>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>
    <%= theme_javascript_ng %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= html_language %>" lang="<%= html_language %>">

    <title><%= h page_title %></title>
    <%= yield(:feeds) %>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= noosfero_stylesheets %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%= body_classes %>">
    <%= _("Go to the content") %>

    <%=
      @plugins.dispatch(:body_beginning).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

        <%= theme_header %>

'
        <%= render :partial => 'layouts/user' %>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

    <%= noosfero_layout_features %>
    <%= theme_javascript_ng %>


use correct textile processor

use correct textile processor

Open defects

      Status
      Id
      Ext. Ref
      Title
      Priority
      Severity
      Assigned to
      Due
      Raised by
      Days old
      Release
      Last comment

    <% @open_defects.each do |d| %>

        <%= d.test_observation.status %>
        <%= d.test_observation_id %>
        <%= h d.external_reference %>
        <%= link_to_item d.test_observation %>
        <%= d.test_observation.priority_code %>
        <%= d.test_observation.detail.severity_code %>
        <%= link_to_item d.test_observation.person %>
        <td <%= overdue_class(d.test_observation) %>>
          <%= d.test_observation.due_on.strftime(date_format) unless d.test_observation.due_on.nil? %>

        <%= link_to_item d.test_observation.first_version_updated_by %>
        <%= (DateTime.now.jd - DateTime.parse(d.test_observation.first_version_updated_at.to_s).jd) %>
        <%= d.latest_release.title unless d.latest_release.nil? %>
        <%= tx_no_p(d.test_observation.comments[-1].body) unless d.test_observation.comments.empty? %>

    <% end %>

Open defects

      Status
      Id
      Ext. Ref
      Title
      Priority
      Severity
      Assigned to
      Due
      Raised by
      Days old
      Release
      Last comment

    <% @open_defects.each do |d| %>

        <%= d.test_observation.status %>
        <%= d.test_observation_id %>
        <%= h d.external_reference %>
        <%= link_to_item d.test_observation %>
        <%= d.test_observation.priority_code %>
        <%= d.test_observation.detail.severity_code %>
        <%= link_to_item d.test_observation.person %>
        <td <%= overdue_class(d.test_observation) %>>
          <%= d.test_observation.due_on.strftime(date_format) unless d.test_observation.due_on.nil? %>

        <%= link_to_item d.test_observation.first_version_updated_by %>
        <%= (DateTime.now.jd - DateTime.parse(d.test_observation.first_version_updated_at.to_s).jd) %>
        <%= d.latest_release.title unless d.latest_release.nil? %>
        <%= t d.test_observation.comments[-1].body unless d.test_observation.comments.empty? %>

    <% end %>


[web] show full_name in problems/stat

[web] show full_name in problems/stat

git-svn-id: bd379d88a756ded56d998f9d005ecc36158942ed@187 6386c4cd-e34a-4fa8-8920-d93eb39b512e

Problem stat: <%= @problem.name %>

This is just a hack.  Really not efficient.

<% if @submissions!=nil %>

    user_id
    submitted_at
    points
    comment

  <% count = 0 %>
  <% @submissions.each do |sub| %>
    <tr class="<%= (count % 2 ==0) ? "info-even" : "info-odd" %>">
    <%= sub.user.full_name %>
    <%= sub.submitted_at.to_s %>
    <%= sub.points %>

<%= sub.grader_comment %>

    <% count += 1 %>
  <% end %>

<% else %>
No submission
<% end %>

Problem stat: <%= @problem.name %>

This is just a hack.  Really not efficient.

<% if @submissions!=nil %>

    user_id
    submitted_at
    points
    comment

  <% count = 0 %>
  <% @submissions.each do |sub| %>
    <tr class="<%= (count % 2 ==0) ? "info-even" : "info-odd" %>">
    <%= sub.user_id %>
    <%= sub.submitted_at.to_s %>
    <%= sub.points %>

<%= sub.grader_comment %>

    <% count += 1 %>
  <% end %>

<% else %>
No submission
<% end %>


Adde link to results page when viewing admin results

<table class="base" style="width: 100%;" id="racer_<%= racer.id %>">

<%= racer.name %> <%= [racer.team.blank? ? nil : racer.team.name, racer.city, racer.racing_age].compact.join(', ') %>

		<table id="results_<%= racer.id %>">

				Race
				Category
				Date
				Pts

			<%- for result in results.sort {|x, y| y.race.standings.event.date <=> x.race.standings.event.date} -%>
			<tr class="<%= cycle("even", "odd") %>" id="result_<%= result.id %>">
			  <%=
				link_to_function(image_tag('icons/collapsed.gif', :class => "collapsed", :id => "disclosure_#{result.id}"),
				"toggle_disclosure(#{result.id})",
				:class => 'disclosure') if result.competition_result? %>
			  <%= result.place %>
			  <%= link_to(image_tag('/images/icons/web_page.gif',
					:title => 'View public results web page', :alt => 'View public results web page'),
					 :controller => '/results', :action => 'event', :year => result.race.standings.event.date.year,
					 :discipline => result.race.standings.event.discipline, :id => result.race.standings.event.id) %>

			  <%= result.race.standings.name %>
			  <%= result.race.name %>
			  <%= result.race.standings.event.date.strftime("%D") %>
			  <%= number_with_precision(result.points, 1) if result.points > 0%>

			<%= draggable_element("result_#{result.id}", :revert => true, :ghosting => true, :scroll => 'window') unless result.competition_result? -%>
			<%- end -%>

			<%- if results.empty? -%>

			  No results

			<%- end -%>

<%= drop_receiving_element(
	"racer_#{racer.id}",
	:onDrop => 'function(dragged, dropped){dropped_result(dragged, dropped)}')
%>

<table class="base" style="width: 100%;" id="racer_<%= racer.id %>">

<%= racer.name %> <%= [racer.team.blank? ? nil : racer.team.name, racer.city, racer.racing_age].compact.join(', ') %>

		<table id="results_<%= racer.id %>">

				Race
				Category
				Date
				Pts

			<%- for result in results.sort {|x, y| y.race.standings.event.date <=> x.race.standings.event.date} -%>
			<tr class="<%= cycle("even", "odd") %>" id="result_<%= result.id %>">
			  <%=
				link_to_function(image_tag('icons/collapsed.gif', :class => "collapsed", :id => "disclosure_#{result.id}"),
				"toggle_disclosure(#{result.id})",
				:class => 'disclosure') if result.competition_result? %>
			  <%= result.place %>
			  <%= result.race.standings.name %>
			  <%= result.race.name %>
			  <%= result.race.standings.event.date.strftime("%D") %>
			  <%= number_with_precision(result.points, 1) if result.points > 0%>

			<%= draggable_element("result_#{result.id}", :revert => true, :ghosting => true, :scroll => 'window') unless result.competition_result? -%>
			<%- end -%>

			<%- if results.empty? -%>

			  No results

			<%- end -%>

<%= drop_receiving_element(
	"racer_#{racer.id}",
	:onDrop => 'function(dragged, dropped){dropped_result(dragged, dropped)}')
%>


renamed local variable

renamed local variable

<%
   set_parameters_for_sharing_form
   show_advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

    <%= help_icon("Here you can specify who can see#{', download' if @resource.is_downloadable?} and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view the summary of<% if @resource.is_downloadable? %>, get access to the content of,<% end %> and edit the <%= @resource_type -%>.
        <%= link_to_function "More info " + expand_image, visual_effect(:toggle_blind, "more_sharing_info", :duration => 0.3) -%>

          You may:

Keep the <%= @resource_type -%> private, and only visible to yourself.

Share within the selected projects and with all other users that are a member of a <%= Seek::Config.project_name %> project.

          <% if try_block{@resource.can_publish?} %>

Share with the all visitors (including anonymous visitors with no login)

          <% end %>

Define more fine-grained sharing in the Advanced sharing: you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
            <input type="hidden" id='access_type_select_<%= Policy::PRIVATE -%>' name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
            <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                                value="<%= Policy::PRIVATE -%>" type="radio" />
            - Keep this <%= @resource_type -%> private (only visible to you)

          <%= additional_advanced_permissions_included @resource, Policy::PRIVATE -%>

Or share it with..

            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]" value="<%= Policy::ALL_SYSMO_USERS -%>" />
            - Members of projects associated with this <%= @resource_type -%>:

             <select name="sharing[your_proj_access_type]" id="sharing_your_proj_access_type">
                 <%= policy_selection_options([Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource, your_project_access_type(@policy, @resource)) -%>
             </select>

            ... and all other project members:
             <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
               :sharing_scope => Policy::ALL_SYSMO_USERS, :access_type => @access_mode, :access_type_options=>[Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING] } -%>
             <%= additional_advanced_permissions_included @resource, Policy::ALL_SYSMO_USERS -%>

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>" <%= 'disabled="true"' if @resource.respond_to?(:can_publish?) && !@resource.can_publish? -%>/>
            - All visitors (including anonymous visitors with no login):

              <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::EVERYONE,
            :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>
           <%= additional_advanced_permissions_included @resource, Policy::EVERYONE -%>

    <% if @resource.new_record? && @resource.errors.empty? -%>

    <% end -%>

    <%= link_to_function "Advanced permissions " + expand_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'none;' : 'block;'), :id =>'advanced_sharing_expand_image' do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>
    <%= link_to_function "Advanced permissions " + collapse_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'block;' : 'none;'), :id =>'advanced_sharing_collapse_image'do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>

    <div id="advanced sharing" class='sharing_box_form' style="display:<%= show_advanced_permissions ? 'block;' : 'none;'-%>">

Additional fine-grained sharing permissions

              So far you have selected to share this <%= @resource_type -%> with:

              Loading...

              Build up the list of people and groups to share with.
              Select from the options below and click "Add" to apply
              your choices and add collaborators to your current selection:

                <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
                Favourite Groups

                  <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
                  <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

                  <%= select_tag "favourite_group_select", f_group_select_options, :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

                  <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                    :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

                  <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit(@resource.class.name) -%>

                  <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                    <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new(@resource.class.name) -%>

                <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
                Projects and Institutions

                  <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

                  Step 1
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 2
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 3

                    <input type="hidden" id="proj_select_step_index" value="1">

                      <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                      Step 1: Select a project
                      <%= select("proj_project", "select",
                        Project.find(:all).collect {|p| [ p.name, p.id ] },
                        {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 2: Select scope of the project
                      <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 3: Choose access rights, review and submit

                      <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                        <%= policy_selection_options [Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource -%>
                      </select>

                        <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                            <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link(@resource.class.name) -%>

                <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
                Individual People

                    Please type names of people to share this <%= @resource_type -%> with into the box below - suggestions will be displayed as you type.
                    Select access rights from drop-down menu; these will be applied to all chosen people.
                    Clicking "Add" will add selected people to the list.

                          ^_^<input type="text" id="ip_hidden_input" tabindex="-1" >

                            <input type="text" size="1" tabindex="" id="ip_autocomplete_input" />

Type the name of a friend, friend list, or email address

                        <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                          <%= policy_selection_options nil, @resource -%>
                        </select>

                        <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>

<%
   set_parameters_for_sharing_form
   advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?

%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

    <%= help_icon("Here you can specify who can see#{', download' if @resource.is_downloadable?} and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view the summary of<% if @resource.is_downloadable? %>, get access to the content of,<% end %> and edit the <%= @resource_type -%>.
        <%= link_to_function "More info " + expand_image, visual_effect(:toggle_blind, "more_sharing_info", :duration => 0.3) -%>

          You may:

Keep the <%= @resource_type -%> private, and only visible to yourself.

Share within the selected projects and with all other users that are a member of a <%= Seek::Config.project_name %> project.

          <% if try_block{@resource.can_publish?} %>

Share with the all visitors (including anonymous visitors with no login)

          <% end %>

Define more fine-grained sharing in the Advanced sharing: you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
            <input type="hidden" id='access_type_select_<%= Policy::PRIVATE -%>' name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
            <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                                value="<%= Policy::PRIVATE -%>" type="radio" />
            - Keep this <%= @resource_type -%> private (only visible to you)

          <%= additional_advanced_permissions_included @resource, Policy::PRIVATE -%>

Or share it with..

            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]" value="<%= Policy::ALL_SYSMO_USERS -%>" />
            - Members of projects associated with this <%= @resource_type -%>:

             <select name="sharing[your_proj_access_type]" id="sharing_your_proj_access_type">
                 <%= policy_selection_options([Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource, your_project_access_type(@policy, @resource)) -%>
             </select>

            ... and all other project members:
             <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
               :sharing_scope => Policy::ALL_SYSMO_USERS, :access_type => @access_mode, :access_type_options=>[Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING] } -%>
             <%= additional_advanced_permissions_included @resource, Policy::ALL_SYSMO_USERS -%>

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>" <%= 'disabled="true"' if @resource.respond_to?(:can_publish?) && !@resource.can_publish? -%>/>
            - All visitors (including anonymous visitors with no login):

              <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::EVERYONE,
            :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>
           <%= additional_advanced_permissions_included @resource, Policy::EVERYONE -%>

    <% if @resource.new_record? && @resource.errors.empty? -%>

    <% end -%>

    <%= link_to_function "Advanced permissions " + expand_image, :class => 'advanced_sharing_link', :style => "display:" + (advanced_permissions ? 'none;' : 'block;'), :id =>'advanced_sharing_expand_image' do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>
    <%= link_to_function "Advanced permissions " + collapse_image, :class => 'advanced_sharing_link', :style => "display:" + (advanced_permissions ? 'block;' : 'none;'), :id =>'advanced_sharing_collapse_image'do |page|
        page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
        page["advanced_sharing_expand_image"].toggle
        page["advanced_sharing_collapse_image"].toggle
        end
    -%>

    <div id="advanced sharing" class='sharing_box_form' style="display:<%= advanced_permissions ? 'block;' : 'none;'-%>">

Additional fine-grained sharing permissions

              So far you have selected to share this <%= @resource_type -%> with:

              Loading...

              Build up the list of people and groups to share with.
              Select from the options below and click "Add" to apply
              your choices and add collaborators to your current selection:

                <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
                Favourite Groups

                  <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
                  <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

                  <%= select_tag "favourite_group_select", f_group_select_options, :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

                  <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                    :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

                  <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit(@resource.class.name) -%>

                  <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                    <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new(@resource.class.name) -%>

                <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
                Projects and Institutions

                  <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

                  Step 1
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 2
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 3

                    <input type="hidden" id="proj_select_step_index" value="1">

                      <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                      Step 1: Select a project
                      <%= select("proj_project", "select",
                        Project.find(:all).collect {|p| [ p.name, p.id ] },
                        {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 2: Select scope of the project
                      <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 3: Choose access rights, review and submit

                      <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                        <%= policy_selection_options [Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource -%>
                      </select>

                        <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                            <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link(@resource.class.name) -%>

                <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
                Individual People

                    Please type names of people to share this <%= @resource_type -%> with into the box below - suggestions will be displayed as you type.
                    Select access rights from drop-down menu; these will be applied to all chosen people.
                    Clicking "Add" will add selected people to the list.

                          ^_^<input type="text" id="ip_hidden_input" tabindex="-1" >

                            <input type="text" size="1" tabindex="" id="ip_autocomplete_input" />

Type the name of a friend, friend list, or email address

                        <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                          <%= policy_selection_options nil, @resource -%>
                        </select>

                        <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>


on small change to prevent the add group to category button from being seen by non-admins.

git-svn-id: 035394e0ea20290a56a73539b1ebfcd8236adefd@59 7bd17f4f-1217-0410-bbc5-bc4367116c30

<% if( @category.bread_crumbs.size > 0 ) -%>
<%=	@category.bread_crumbs.map{|x| "
#{link_to(x.name, :controller=>'category',:action=>'show',:id=>x.id)} |
"} -%>
<% end -%>
<%= "
#{link_to(@category.name)}
"%>

<%=h @category.name %>
	  <%= link_to image_tag('/images/icons/feed.png'   ,{:title=>"Subscribe to #{@category.name}'s feed."}),{:controller=>'category',:action=>'feed',:id=>@category.id} %>
	 <%= link_to( 'Edit', {:action => 'edit', :id => @category},{:style=>'font-size:80%;'}) if current_user.is_admin? %>

	<% #Categories
	#todo draw the category tree based on the user's scope so that they do not see categories, which they do not belong to
	%>

Sub-categories
		<% unless @category.children.empty? -%>
		(<%= @category.children.size %>)
		<%= image_tag('/images/icons/bullet_toggle_plus.png')%>

		<%= image_tag('/images/icons/bullet_toggle_minus.png')%>

		<%= render :partial=>'category/category',:locals=>{:category,@category} unless @category.children.nil? %>

	<% else -%>

		No Subcategories
	<% end -%>

	<% #Groups
	#todo draw the groups based on the user's scope
	%>

You belong to (<%= @groups.size.to_s %>) groups with access to this category

		<%= image_tag('/images/icons/bullet_toggle_plus.png')%>

		<%= image_tag('/images/icons/bullet_toggle_minus.png')%>

		<% for g in @groups -%>
			<%= render :partial=>'category/group_item', :locals=>{:category=>@category,:group=>g} %>
		<% end -%>

<%= render :partial=>'category/new_group_button' if current_user.is_admin? %>

	<% #Assets
	#display based on scope
	%>

Available Assets

	<%= render :partial=>'asset/list' %>

<%= render :partial=>'category/new_asset_button' %>

<%= auto_discovery_link_tag(:rss, {:controller => 'category', :action => 'feed',:id=>@category.id}) %>

<% if( @category.bread_crumbs.size > 0 ) -%>
<%=	@category.bread_crumbs.map{|x| "
#{link_to(x.name, :controller=>'category',:action=>'show',:id=>x.id)} |
"} -%>
<% end -%>
<%= "
#{link_to(@category.name)}
"%>

<%=h @category.name %>
	  <%= link_to image_tag('/images/icons/feed.png'   ,{:title=>"Subscribe to #{@category.name}'s feed."}),{:controller=>'category',:action=>'feed',:id=>@category.id} %>
	 <%= link_to( 'Edit', {:action => 'edit', :id => @category},{:style=>'font-size:80%;'}) if current_user.is_admin? %>

	<% #Categories
	#todo draw the category tree based on the user's scope so that they do not see categories, which they do not belong to
	%>

Sub-categories
		<% unless @category.children.empty? -%>
		(<%= @category.children.size %>)
		<%= image_tag('/images/icons/bullet_toggle_plus.png')%>

		<%= image_tag('/images/icons/bullet_toggle_minus.png')%>

		<%= render :partial=>'category/category',:locals=>{:category,@category} unless @category.children.nil? %>

	<% else -%>

		No Subcategories
	<% end -%>

	<% #Groups
	#todo draw the groups based on the user's scope
	%>

You belong to (<%= @groups.size.to_s %>) groups with access to this category

		<%= image_tag('/images/icons/bullet_toggle_plus.png')%>

		<%= image_tag('/images/icons/bullet_toggle_minus.png')%>

		<% for g in @groups -%>
			<%= render :partial=>'category/group_item', :locals=>{:category=>@category,:group=>g} %>
		<% end -%>

<%= render :partial=>'category/new_group_button' %>

	<% #Assets
	#display based on scope
	%>

Available Assets

	<%= render :partial=>'asset/list' %>

<%= render :partial=>'category/new_asset_button' %>

<%= auto_discovery_link_tag(:rss, {:controller => 'category', :action => 'feed',:id=>@category.id}) %>


Removes "What's new" tab from Community's homepage

  "What's new" tab have a duplicate content from the Wall tab.
  This patch just removes the tab from the Community's index page.

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

<%= h profile.name %>

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

      <%= profile.description %>

  <% end %>

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

<% end %>

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

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

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

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

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

        <%= render_tabs(tabs) %>

<% end %>

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

<%= h profile.name %>

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

      <%= profile.description %>

  <% end %>

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

<% end %>

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

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

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

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

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

        <%= render_tabs(tabs) %>

<% end %>


allow removing manager(who has managing permission) of project

<%
   object ||= nil
   set_parameters_for_sharing_form object
   disable_advanced_view ||= nil
   show_advanced_permissions = !@resource.respond_to?(:has_advanced_permissions?) || @resource.has_advanced_permissions?
   default_projects_access_type = @resource.is_asset? ? Policy::ACCESSIBLE : Policy::EDITING
   default_consortium_access_type = Policy::ACCESSIBLE
   can_publish = @resource.respond_to?(:can_publish?) ? @resource.can_publish? : true
%>
<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>

    <%= help_icon("Here you can specify who can see#{', download' if @resource.is_downloadable?} and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view the summary of<% if @resource.is_downloadable? %>, get access to the content of,<% end %> and edit the <%= @resource_type -%>.
        <%= link_to_function "More info " + expand_image, visual_effect(:toggle_blind, "more_sharing_info", :duration => 0.3) -%>

          You may:

Keep the <%= @resource_type -%> private, and only visible to yourself.

          <%
             through_resource = ''
             if @resource.kind_of?(Assay)
               through_resource = '(through projects associated with selected study)'
             elsif @resource.kind_of?(Study)
               through_resource = '(through projects associated with selected investigation)'
             end
          %>

Share within members of projects associated with this <%= @resource_type -%> <%= through_resource%> and with all other users that are a member of a <%= Seek::Config.project_name %> project.

Share with the all visitors (including anonymous visitors with no login)

You can share with the all visitors right away if you are the gatekeeper or if the projects associated with this <%= @resource_type -%> have no gatekeeper

Or you can request the gatekeepers for their approval to share with all visitors

          <% if !disable_advanced_view%>

Define more fine-grained sharing in the Advanced sharing: you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

          <% end %>

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
            <input type="hidden" id='access_type_select_<%= Policy::PRIVATE -%>' name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
            <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                                value="<%= Policy::PRIVATE -%>" type="radio" />
            - Keep this <%= @resource_type -%> private (only visible to you)

          <%= additional_advanced_permissions_included @resource, Policy::PRIVATE -%>

Or share it with..

            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]" value="<%= Policy::ALL_SYSMO_USERS -%>" />
            - Members of projects associated with this <%= @resource_type -%>:

             <select name="sharing[your_proj_access_type]" id="sharing_your_proj_access_type">
                 <%= policy_selection_options([Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING,Policy::MANAGING], @resource, your_project_access_type(@policy, @resource) || default_projects_access_type) -%>
             </select>

            ... and all other project members:
             <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
               :sharing_scope => Policy::ALL_SYSMO_USERS, :access_type => (@resource.respond_to?(:policy) && @resource.policy.try(:sharing_scope)==Policy::ALL_SYSMO_USERS ? @access_mode : default_consortium_access_type), :access_type_options=>[Policy::NO_ACCESS,Policy::VISIBLE,Policy::ACCESSIBLE,Policy::EDITING] } -%>
             <%= additional_advanced_permissions_included @resource, Policy::ALL_SYSMO_USERS -%>

          <label for="sharing_scope_<%= Policy::EVERYONE -%>">
            <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::EVERYONE -%> id="sharing_scope_<%= Policy::EVERYONE -%>" name="sharing[sharing_scope]"
                   value="<%= Policy::EVERYONE -%>"/>
            - All visitors (including anonymous visitors with no login):

           <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::EVERYONE,
            :sharing_scope => Policy::EVERYONE, :access_type => (@sharing_mode == Policy::EVERYONE) ? @access_mode : Policy::ACCESSIBLE } -%>
           <%= additional_advanced_permissions_included @resource, Policy::EVERYONE -%>

    <% if !disable_advanced_view %>
      <%= link_to_function "Advanced permissions " + expand_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'none;' : 'block;'), :id =>'advanced_sharing_expand_image' do |page|
          page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
          page["advanced_sharing_expand_image"].toggle
          page["advanced_sharing_collapse_image"].toggle
      end
      -%>
      <%= link_to_function "Advanced permissions " + collapse_image, :class => 'advanced_sharing_link', :style => "display:" + (show_advanced_permissions ? 'block;' : 'none;'), :id =>'advanced_sharing_collapse_image' do |page|
          page.visual_effect :toggle_blind, "advanced sharing", :duration => 0.5
          page["advanced_sharing_expand_image"].toggle
          page["advanced_sharing_collapse_image"].toggle
      end
      -%>

      <div id="advanced sharing" class='sharing_box_form' style="display:<%= show_advanced_permissions ? 'block;' : 'none;' -%>">

Additional fine-grained sharing permissions

              So far you have selected to share this <%= @resource_type -%> with:

              Loading...

              Build up the list of people and groups to share with.
              Select from the options below and click "Add" to apply
              your choices and add collaborators to your current selection:

                <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
                Favourite Groups

                  <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
                  <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

                  <%= select_tag "favourite_group_select", f_group_select_options, :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

                  <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                              :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

                  <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit(@resource.class.name) -%>

                  <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                    <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new(@resource.class.name) -%>

                <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
                Projects and Institutions

                  <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

                  Step 1
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 2
                  <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

                  Step 3

                    <input type="hidden" id="proj_select_step_index" value="1">

                      <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                      Step 1: Select a project
                      <%= select("proj_project", "select",
                                 Project.find(:all).collect { |p| [p.name, p.id] },
                                 {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 2: Select scope of the project
                      <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                      Step 3: Choose access rights, review and
                      submit

                      <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                        <%= policy_selection_options [Policy::NO_ACCESS, Policy::VISIBLE, Policy::ACCESSIBLE, Policy::EDITING, Policy::MANAGING], @resource -%>
                      </select>

                        <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                          <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link(@resource.class.name) -%>

                <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
                Individual People

                    Please type names of people to share this <%= @resource_type -%> with into the box below -
                    suggestions will be displayed as you type.
                    Select access rights from drop-down menu; these will be applied to all chosen people.
                    Clicking "Add" will add selected people to the list.

                          ^_^<input type="text" id="ip_hidden_input" tabindex="-1">

                            <input type="text" size="1" tabindex="" id="ip_autocomplete_input"/>

Type the name of a friend, friend list, or email address

                        <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                          <%= policy_selection_options nil, @resource -%>
                        </select>

                        <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>

  <% end %>

<%="
" if !@resource.errors.empty? and !@policy.valid? %>


fixed feed...again

fixed feed...again

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1" />
    <link href="/index.xml" type="application/atom+xml" rel="alternate" title="Kernpedia" />
    <title>
      <% page_title = self.title unless self.title == 'Kernpedia' %>
      <% page_title ||= self.path.capitalize unless self.path == 'index' %>
      <%= [page_title, 'Kernpedia'].compact.join ' - ' %>
    </title>

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

      Kernpedia

Blog

Archives

About

Code

      <%= yield %>

        Kernpedia is licensed under a Creative Commons Attribution 3.0 United States License.

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1" />
    <link href="atom.xml" type="application/atom+xml" rel="alternate" title="Kernpedia" />
    <title>
      <% page_title = self.title unless self.title == 'Kernpedia' %>
      <% page_title ||= self.path.capitalize unless self.path == 'index' %>
      <%= [page_title, 'Kernpedia'].compact.join ' - ' %>
    </title>

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

      Kernpedia

Blog

Archives

About

Code

      <%= yield %>

        Kernpedia is licensed under a Creative Commons Attribution 3.0 United States License.


Fix problem with URLs on the moderate comments page.

The URLs to the Ajax actions were wrong because the article's ID wasn't present.  Instead of using @article (which is nil in this case), use the comment's article.

<%= render :partial => "admin/articles/page_nav" %>

<% if @article -%>
Comments on <%= link_to @article.title, edit_article_path(@article), :style => 'border:none' %> <%= @article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style => 'vertical-align: middle'), @site.permalink_for(@article), :style => 'border:none;') : ' ' %>
<% else -%>
Comments for all articles
<% end -%>

<% if @article -%>
  <%= link_to_function "New comment", "$('new-comment-form').toggle()" %>

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

<% end -%>

  <% if @comments.any? %>
  <% @comments.reverse.each_with_index do |comment, i| -%>
  <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
    <a name="comment-<%= comment.id %>">
    <% unless comment.body.blank? -%>

"<%= strip_tags(comment.body) %>"

    <% end -%>

      — <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %> said <%=  time_ago_in_words comment.created_at %> ago

    <%= link_to_remote 'Edit', :url => edit_article_comment_path(comment.article, comment), :method => :get %> |
    <% if comment.approved? -%>
      <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(comment.article, comment) %> |
    <% else -%>
      <%= link_to_remote 'Approve',   :url => approve_article_comment_path(comment.article, comment) %> |
    <% end -%>
    <%= link_to_remote 'Delete',    :url => article_comment_path(comment.article, comment), :method => :delete %>

  <% end -%>
  <% else %>

This article has no <%= params[:filter].to_s.humanize.downcase %> comments.

  <% end %>

<% content_for :sidebar do %>
  <% if @articles.size > 1 -%>

Comments awaiting your approval

    <% @articles.each do |article, count| -%>
    <% if @article.nil? || article.title != @article.title -%>

<%= link_to "(#{count}) #{h(article.title)}", :controller => 'comments', :action => 'index', :article_id => article.id, :filter => :unapproved %>

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

  <% end -%>
<% end %>

<%= render :partial => "admin/articles/page_nav" %>

<% if @article -%>
Comments on <%= link_to @article.title, edit_article_path(@article), :style => 'border:none' %> <%= @article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style => 'vertical-align: middle'), @site.permalink_for(@article), :style => 'border:none;') : ' ' %>
<% else -%>
Comments for all articles
<% end -%>

<% if @article -%>
  <%= link_to_function "New comment", "$('new-comment-form').toggle()" %>

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

<% end -%>

  <% if @comments.any? %>
  <% @comments.reverse.each_with_index do |comment, i| -%>
  <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
    <a name="comment-<%= comment.id %>">
    <% unless comment.body.blank? -%>

"<%= strip_tags(comment.body) %>"

    <% end -%>

      — <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %> said <%=  time_ago_in_words comment.created_at %> ago

    <%= link_to_remote 'Edit', :url => edit_article_comment_path(@article, comment), :method => :get %> |
    <% if comment.approved? -%>
      <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(@article, comment) %> |
    <% else -%>
      <%= link_to_remote 'Approve',   :url => approve_article_comment_path(@article, comment) %> |
    <% end -%>
      <%= link_to_remote 'Delete',    :url => article_comment_path(@article, comment), :method => :delete %>

  <% end -%>
  <% else %>

This article has no <%= params[:filter].to_s.humanize.downcase %> comments.

  <% end %>

<% content_for :sidebar do %>
  <% if @articles.size > 1 -%>

Comments awaiting your approval

    <% @articles.each do |article, count| -%>
    <% if @article.nil? || article.title != @article.title -%>

<%= link_to "(#{count}) #{h(article.title)}", :controller => 'comments', :action => 'index', :article_id => article.id, :filter => :unapproved %>

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

  <% end -%>
<% end %>