Put the summary stuff in bootstrap divs

Put the summary stuff in bootstrap divs

<% @title = "Summary" %>

<%=@title%>

<%=@public_body_count%> public authorities

        <%=@info_request_count%> requests, <%=@outgoing_message_count%> outgoing messages,
        <%=@incoming_message_count%> incoming messages

<%=@user_count%> users, <%=@track_thing_count%> tracked things

<%=@comment_count%> annotations

Things to do

  <% if @holding_pen_messages.size > 0 %>

        <%=@holding_pen_messages.size%> Put misdelivered responses with the right request

            <% for message in @holding_pen_messages %>

                  <% if message.get_body_for_quoting.strip.size == 0 %>
                      <%= link_to "(no body)", "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% else %>
                      <%= link_to excerpt(message.get_body_for_quoting, "", 60), "request/show_raw_email/" + message.raw_email_id.to_s %>
                  <% end %>

                  <%=simple_date(message.sent_at)%>

            <% end %>

  <% end %>

  <% if @error_message_requests.size > 0 %>

        <%=@error_message_requests.size%> Fix these delivery and other errors

            <% for @request in @error_message_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= link_to(@request.title, main_url(request_url(@request))) %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @attention_requests.size > 0 %>

        <%=@attention_requests.size%> Review requests marked by users as requiring your attention

            <% for @request in @attention_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= link_to(@request.title, main_url(request_url(@request))) %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @requires_admin_requests.size > 0 %>

        <%=@requires_admin_requests.size%> These require administrator attention

            <% for @request in @requires_admin_requests %>

                  <%= link_to(''.html_safe, request_admin_url(@request))%>
                  <%= link_to(@request.title, main_url(request_url(@request))) %>

                  <%=simple_date(@request.get_last_event.created_at)%>

            <% end %>

  <% end %>

  <% if @blank_contacts.size > 0 %>

        <%=@blank_contacts.size%> Find missing FOI email for these public authorities (try phoning!)

            <% for @blank_contact in @blank_contacts %>

                  <%= link_to(''.html_safe, public_body_admin_url(@blank_contact))%>
                  <%= link_to h(@blank_contact.name), main_url(public_body_url(@blank_contact)) %>

                  <%=simple_date(@blank_contact.updated_at)%>

            <% end %>

  <% end %>

  <% if @old_unclassified.size > 0 %>

        <%=@old_unclassified.size%> Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response

            <% for @request in @old_unclassified %>

                    <%= link_to("".html_safe, request_admin_url(@request)) %>
                    <%= link_to(@request.title, main_url(request_link(@request))) %>

                    <%=simple_date(@request.get_last_response_event.created_at)%>

            <% end %>

  <% end %>

<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 && @attention_requests.size == 0 %>

      No pending administration required.

<% end %>


removed warning when you signout.  signing out is not a big deal and doesn't need a warning.

<% if session[:person] == nil %>

Signed in as:

You are not signed in
[ <%= link_to 'sign in', :controller => 'main', :action => 'index' %> ]

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

<%= link_to 'Sign-In', :controller => :main, :action => :index %>

<%= link_to 'List Users', :controller => :users, :action => :list %>

<%= link_to 'New User', :controller => :users, :action => :new %>

<%= link_to 'Help', :controller => :help, :action => 'manual' %>

<%= link_to 'Manual', :controller => :help, :action => :manual %>

<%= link_to 'Bug Report', :controller => :help, :action => :bug_report %>

<% else %>

Signed in as:

<%= User.find(session[:person]).name %>
[ <%= link_to 'log out', :controller => 'main', :action => 'logout' %> ]

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

<% end %>

<% if session[:person] == nil %>

Signed in as:

You are not signed in
[ <%= link_to 'sign in', :controller => 'main', :action => 'index' %> ]

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

<%= link_to 'Sign-In', :controller => :main, :action => :index %>

<%= link_to 'List Users', :controller => :users, :action => :list %>

<%= link_to 'New User', :controller => :users, :action => :new %>

<%= link_to 'Help', :controller => :help, :action => 'manual' %>

<%= link_to 'Manual', :controller => :help, :action => :manual %>

<%= link_to 'Bug Report', :controller => :help, :action => :bug_report %>

<% else %>

Signed in as:

<%= User.find(session[:person]).name %>
[ <%= link_to 'log out', { :controller => 'main', :action => 'logout' } , :confirm => 'Are you sure you want to log out?', :method => :post %> ]

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

<% end %>


Add contact id for scrolling chat page

Add contact id for scrolling chat page

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

    <%= javascript_include_merged :base %>
    <%= javascript_include_merged :tt %>

    <%= javascript_include_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>

    <%= stylesheet_link_merged :tt %>
    <%= stylesheet_link_tag "beast" if ['forums', 'posts', 'topics'].include? controller.controller_name %>
    <%= javascript_include_tag "builder" if ['activities'].include? controller.controller_name %>
    <% if ['activities'].include? controller.controller_name %>
      <%= javascript_include_tag "portal" %>

      <%= javascript_include_tag "flotr" %>
    <% end %>

    <%= stylesheet_link_tag "print", { :media => "print" } %>
    <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'rss', :id => current_user.uuid }) %>

    <title><%= controller.controller_name + " / " + controller.action_name %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<% @internal = Customer.find(:first, :conditions => ["(name = 'Internal' or name = ?) AND company_id = ?", current_user.company.name, current_user.company.id]) %>

<%= image_tag('spinner.gif', :border => 0) %>

              <%= render(:partial => "layouts/menu") %>

              <% form_tag( {:controller => 'search', :action => 'search'}, {:method => 'get'}) do %>

                <% if current_user.seen_welcome.to_i == 0 %>
                  <% if controller.controller_name == "activities" && controller.action_name == 'welcome' %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Tutorial')}", { :controller => 'activities', :action => 'welcome'} %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "activities" && controller.action_name != 'welcome' %>

<%= link_to "#{_('Overview') }", { :controller => 'activities', :action => 'list'}, :class => "active"%>

<%= link_to_remote _('Add New Widget'), :url => { :controller => 'widgets', :action => 'add'} %>

                <% else %>

<%= link_to "#{_('Overview')}", { :controller => 'activities', :action => 'list'} %>
		<% end %>

                <% if controller.controller_name == "tasks" && !['timeline', 'new'].include?(controller.action_name) %>

<%= link_to "#{_('Browse')}", { :controller => 'views', :action => 'browse'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Browse')}", :controller => 'views', :action => 'browse' %>
                <% end %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                    <% project_ids = current_project_ids %>
                    <% client_ids = current_projects.collect(&:customer_id).join(',')
                       client_ids = "0" if client_ids.nil? || client_ids.empty?

                       views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                    for view in views %>

<%= link_to(view.name, { :controller => 'views', :action => 'select', :id => view }) %><%= link_to("[#{_('Edit')}]", {:controller => 'views', :action => 'edit', :id => view}) if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

		    <% end %>

<%= link_to "[#{_('New View')}]",  :controller => 'views', :action => 'new' %>

                <% if current_user.option_tracktime.to_i == 1%>
                  <% if controller.controller_name == "timeline" && controller.action_name == "list" %>

<%= link_to "#{_('Timeline')}", { :controller => 'timeline', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Timeline')}", :controller => 'timeline', :action => 'list' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "schedule"  %>

<%= link_to "#{_('Schedule')}", {:controller => 'schedule', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Schedule')}", :controller => 'schedule', :action => 'list' %>

                <% end %>

                <% if current_user.option_tracktime.to_i == 1 && current_user.can_any?(current_user.projects, 'report') %>
                  <% if controller.controller_name == "reports"  %>

<%= link_to "#{_('Reports')}", {:controller => 'reports', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Reports')}", :controller => 'reports', :action => 'list' %>

                  <% end %>
                <% end %>

	        <% if current_user.company.show_wiki? %>
		  <% if controller.controller_name == "wiki"  %>

<%= link_to "#{_('Wiki')}", {:controller => 'wiki', :action => 'show', :id => nil}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Wiki')}", :controller => 'wiki', :action => 'show' %>

                  <% end %>
	        <% end %>

	        <% if current_user.company.show_chat? %>
                  <% if controller.controller_name == "shout"  %>

<%= link_to "#{_('Chat')}", {:controller => 'shout', :action => 'list'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Chat')}", :controller => 'shout', :action => 'list' %>

                  <% end %>
		<% end %>

	        <% if current_user.company.show_forum? %>
                  <% if ['forums', 'posts', 'topics'].include? controller.controller_name  %>

<%= link_to "#{_('Forums')}", {:controller => 'forums', :action => 'index'}, :class => "active" %>

                  <% else %>

<%= link_to "#{_('Forums')}", :controller => 'forums', :action => 'index' %>

                  <% end %>
                <% end %>

                <% if controller.controller_name == "project_files"  %>

<%= link_to "#{_('Files')}", {:controller => 'project_files', :action => 'list'}, :class => "active" %>

                <% else %>

<%= link_to "#{_('Files')}", :controller => 'project_files', :action => 'list' %>

                <% end %>

                <% if controller.controller_name == "projects" %>

<%= link_to "#{_('Projects')}", {:controller => 'projects', :action => 'list'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('Projects')}", {:controller => 'projects', :action => 'list'} %>
                <% end %>

<%= link_to _("New Project"), :controller => 'projects', :action => 'new' %>

                <% if controller.controller_name == "tasks" && controller.action_name == 'new'  %>

<%= link_to "#{_('New Task') + image_tag('tick.png',  :border => 0, :height => 16, :style => "margin-top:-2px;")}", {:controller => 'tasks', :action => 'new'}, :class => "active" %>
                <% else %>

<%= link_to "#{_('New Task') + image_tag('tick.png',  :border => 0, :height => 16, :style => "margin-top:-2px;")}", {:controller => 'tasks', :action => 'new'} %>
                <% end %>

<%= link_to "#{_('Log Out')}", { :controller => 'login', :action => 'logout'}, :class => "right" %>

                <% if controller.controller_name == "users" && controller.action_name == "edit_preferences" %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right active"%>
                <% else %>

<%= link_to "#{_('Preferences')}", { :controller => 'users', :action => 'edit_preferences'}, :class => "right" %>
                <% end %>
                <% if current_user.admin > 0 %>

<%= link_to _('Company Settings'), :controller => 'companies', :action => 'edit', :id => current_user.company_id %>

                <% end %>

                <% if current_user.admin > 0 %>

                <% if current_user.option_externalclients.to_i == 1%>
                <% if controller.controller_name == "customers" %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "active"%>

                  <% else %>

<%= link_to "#{_('Clients')}", { :controller => 'customers', :action => 'list'}, :class => "right" %>

                <% end %>
                <% end %>

                <% if controller.controller_name == "users" && controller.action_name != "edit_preferences" %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right active"%>

                <% else %>

<%= link_to "#{_('Users')}", { :controller => 'users', :action => 'list'}, :class => "right" %>

                <% end %>

                <% end %>

<%= text_field_tag 'query', _('Search'), {:size => 10, :style => "font-size:9px;", :class => 'optional', :onfocus => "if($('query').value == '#{_('Search')}') {$('query').value = ''; $('query').removeClassName('optional');};"  }%>

                <% end %>

        <% if current_user.respond_to?(:seen_news_id)%>
          <% news = NewsItem.find(:first, :order => "created_at desc", :conditions => ["id > ?", current_user.seen_news_id ]) %>
          <% unless news.nil? %>

[<%= tz.utc_to_local(news.created_at).strftime("#{current_user.time_format} #{current_user.date_format}") %>]	<%= news.body %>
                <%= link_to_remote "[#{_('Hide')}]", :url => { :controller => 'users', :action => 'update_seen_news', :id => news.id },
                :success => visual_effect(:fade, "news", :duration => 0.5) %>

          <% end %>
          <% end %>

          <div id="flash" <%="style=\"display:none\"" unless flash['notice']%>>

<%= flash['notice'] %>
	[<%=_ 'Hide'%>]

          <%= @content_for_layout %>

          <td align="right" valign="top" style="width:15%;<%= "display:none;" if session[:collapse_menu].to_i > 0 %>" id="left_menu">

<%=_ 'Views' %>

<%= link_to _('New'),  :controller => 'views', :action => 'new' %>

<%= link_to "#{_('Open Tasks')}", :controller => 'views', :action => 'all_tasks'%>

<%= link_to _('My Open Tasks'), :controller => 'views', :action => 'my_tasks'%>

<%= link_to _('My In Progress Tasks'), :controller => 'views', :action => 'my_in_progress_tasks'%>

<%= link_to _('Unassigned Tasks'), :controller => 'views', :action => 'unassigned_tasks'%>

                <% project_ids = current_project_ids %>
                <% client_ids = current_projects.collect(&:customer_id).join(',')
                   client_ids = "0" if client_ids.nil? || client_ids.empty?

                   views = View.find(:all, :conditions => ["company_id = ? AND (user_id = ? or shared = 1) AND (filter_customer_id = 0 OR filter_customer_id IS NULL OR filter_customer_id IN (#{client_ids})) AND (filter_project_id = 0 OR filter_project_id IS NULL OR filter_project_id IN (#{project_ids}))", current_user.company_id, current_user.id], :order => "shared, name")
                   for view in views %>

<%= link_to view.name, :controller => 'views', :action => 'select', :id => view %>	<%= link_to _('Edit'), :controller => 'views', :action => 'edit', :id => view if view.user_id == current_user.id %><%= "[#{_('Shared')}]" if view.user_id != current_user.id %>

                   <% end %>

<%=_ 'Notes'%>

<%= link_to _('New'), :controller => 'pages', :action => 'new' %>

          <% for page in current_pages %>

                  <%= link_to "#{page.name} / #{page.project.name}", { :controller => 'pages', :action => 'show', :id => page} %> (<%=_('%s ago', time_ago_in_words( page.updated_at, false ) )%>)

          <% end %>

  <% if current_user.company.show_messaging %>

	    <% current_user.chats.each do |@chat|
	      @user = @chat.target
            %>
	      <%= render :partial => 'shout/chat_user' if @chat.active >= 0%>
	      <% if @chat.active == 1 %>

	      <% end %>
	    <% end %>

Loading...

Online (<%= online_users %>)

Clocking IT v0.99.3
<%=_ 'Feedback? Suggestions? Ideas? Bugs?'%><%= link_to "[Admin]", :controller => "admin", :action => "index" if current_user.admin == 10 %>

  <% else %>

Clocking IT v0.99.3
<%=_ 'Feedback? Suggestions? Ideas? Bugs?'%><%= link_to "[Admin]", :controller => "admin", :action => "index" if current_user.admin == 10 %>

  <% end %>

<%= periodically_call_remote(:url => { :controller => 'tasks', :action => 'update_sheet_info' }, :frequency => 90 ) -%>

<%= flash_plugin(session[:channels]) %>


added check for user before putting a hide link

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

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

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

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

debug: <%= @debug -%>

    <% end -%>

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

        <% if @user %>

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

        <% end %>

        <% if @eg %>

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

        <% end %>

Project Application Tool

    <% if @user %>

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

    <% end %>

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

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

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

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

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

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

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

          <%= submenu_items_html %>

    <% end %>

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

    <% if @eg || @show_contact_emails_override %>

        Non-Technical Inquiries:

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - danielled@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

			Technial Inquiries: spt@campusforchrist.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>

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

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

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

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

debug: <%= @debug -%>

    <% end -%>

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

        <% if @user %>

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

        <% end %>

        <% if @eg %>

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

        <% end %>

Project Application Tool

    <% if @user %>

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

    <% end %>

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

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

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

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

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

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

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

          <%= submenu_items_html %>

    <% end %>

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

    <% if @eg || @show_contact_emails_override %>

        Non-Technical Inquiries:

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - danielled@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

			Technial Inquiries: spt@campusforchrist.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>


Include stop work icon in shortlist header

<% if @current_sheet -%>
<% info = []
   task = Task.find(@current_sheet.task_id, :conditions => ["tasks.company_id = ?", current_user.company_id], :include => [:project, :work_logs] )
   info << "#{worked_nice(task.worked_minutes + @current_sheet.duration / 60)}" if task.worked_minutes > 0 || task.duration > 0
   info << "#{worked_nice(task.duration)}" if task.duration.to_i > 0

   info_string = " (#{info.join("/")})" if info.size > 0
   info_string = " #{worked_nice(@current_sheet.duration/60)}#{info_string}"
   info_string = "[#{_'Paused'}]#{info_string} " if @current_sheet.paused?
%>

  <%= link_to_remote image_tag("time_delete.png", :border => 0, :title => _("Cancel working on %s.", task.name), :class => "tooltip"),
      :url => { :controller => 'tasks', :action => 'cancel_work_ajax', :id => task, :depth => 0 },
      :loading => "Element.show('loading');",
      :complete => "Element.hide('loading');" -%>
  <% if @current_sheet.paused? %>
    <%= link_to_remote image_tag("time_resume.png", :border => 0, :title => _("Resume working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task, :depth => 0 },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%>
  <% else %>
    <%= link_to_remote image_tag("time_pause.png", :border => 0, :title => _("Pause working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task, :depth => 0 },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%>
  <% end %>
  <%= link_to(image_tag("time_add.png", :border => 0, :class => "tooltip work_icon", :title => _("Stop working on %s.", task.name)), {:controller => 'tasks', :action => 'stop_work'}, { :class => "stop-work-link" } )  -%>
<%= info_string %>
<% else %>
[<%= worked_nice(total_today) %> <%=_ 'today'%>]
<% end %>

<% if @current_sheet -%>
<% info = []
   task = Task.find(@current_sheet.task_id, :conditions => ["tasks.company_id = ?", current_user.company_id], :include => [:project, :work_logs] )
   info << "#{worked_nice(task.worked_minutes + @current_sheet.duration / 60)}" if task.worked_minutes > 0 || task.duration > 0
   info << "#{worked_nice(task.duration)}" if task.duration.to_i > 0

   info_string = " (#{info.join("/")})" if info.size > 0
   info_string = " #{worked_nice(@current_sheet.duration/60)}#{info_string}"
   info_string = "[#{_'Paused'}]#{info_string} " if @current_sheet.paused?
%>

  <%= link_to_remote image_tag("time_delete.png", :border => 0, :title => _("Cancel working on %s.", task.name), :class => "tooltip"),
      :url => { :controller => 'tasks', :action => 'cancel_work_ajax', :id => task, :depth => 0 },
      :loading => "Element.show('loading');",
      :complete => "Element.hide('loading');" -%>
  <% if @current_sheet.paused? %>
    <%= link_to_remote image_tag("time_resume.png", :border => 0, :title => _("Resume working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task, :depth => 0 },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%>
  <% else %>
    <%= link_to_remote image_tag("time_pause.png", :border => 0, :title => _("Pause working on %s.", task.name), :class => "tooltip"),
        :url => { :controller => 'tasks', :action => 'pause_work_ajax', :id => task, :depth => 0 },
        :loading => "Element.show('loading');",
        :complete => "Element.hide('loading');" -%>
  <% end %>
<%= info_string %>
<% else %>
[<%= worked_nice(total_today) %> <%=_ 'today'%>]
<% end %>


Fixing drag and drop when re-edit article on Firefox browser

(Actionitem1992)

<%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %>
<script type="text/javascript">
  var myplugins = "searchreplace,print,table";
  var first_line, second_line;
  var mode = '<%= mode ||= false %>'
  <% if mode %>
    first_line = "fontsizeselect,bold,italic,underline,bullist,numlist,justifyleft,justifycenter,justifyright,link,unlink"
    second_line = ""
  <% else %>
    first_line = "print,separator,copy,paste,separator,undo,redo,separator,search,replace,separator,fontsizeselect,formatselect"
    second_line = "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code"
  <% end %>

  if (tinymce.isIE) {
    // the paste plugin is only useful in Internet Explorer
    myplugins = "paste," + myplugins;
  }
tinyMCE.init({
        mode : "textareas",
        editor_selector : "mceEditor",
        theme : "advanced",
        relative_urls : false,
        remove_script_host : true,
        document_base_url : <%= environment.top_url.to_json %>,
        plugins: myplugins,
        theme_advanced_toolbar_location : "top",
        theme_advanced_layout_manager: 'SimpleLayout',
        theme_advanced_buttons1 : first_line,
        theme_advanced_buttons2 : second_line,
        theme_advanced_buttons3 : "",
        theme_advanced_blockformats :"p,address,pre,h2,h3,h4,h5,h6",
        paste_auto_cleanup_on_paste : true,
        paste_insert_word_content_callback : "convertWord",
        paste_use_dialog: false,
        apply_source_formatting : true,
        extended_valid_elements : "applet[style|archive|codebase|code|height|width],comment,iframe[src|style|allowtransparency|frameborder|width|height|scrolling],embed[title|src|type|height|width]",
        content_css: '/stylesheets/tinymce.css',
        language: <%= tinymce_language.inspect %>,
        entity_encoding: 'raw'
        });

function convertWord(type, content) {
  switch (type) {
    // Gets executed before the built in logic performes it's cleanups
    case "before":
      //content = content.toLowerCase(); // Some dummy logic
      break;

    // Gets executed after the built in logic performes it's cleanups
    case "after":
      content = content.replace(/<!--\s*-->/, '');
      break;
  }

  return content;
}

</script>

<%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %>
<script type="text/javascript">
  var myplugins = "searchreplace,print,table";
  var first_line, second_line;
  var mode = '<%= mode ||= false %>'
  <% if mode %>
    first_line = "fontsizeselect,bold,italic,underline,bullist,numlist,justifyleft,justifycenter,justifyright,link,unlink"
    second_line = ""
  <% else %>
    first_line = "print,separator,copy,paste,separator,undo,redo,separator,search,replace,separator,fontsizeselect,formatselect"
    second_line = "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code"
  <% end %>

  if (tinymce.isIE) {
    // the paste plugin is only useful in Internet Explorer
    myplugins = "paste," + myplugins;
  }
tinyMCE.init({
        mode : "textareas",
        editor_selector : "mceEditor",
        theme : "advanced",
        relative_urls : false,
        remove_script_host : true,
        plugins: myplugins,
        theme_advanced_toolbar_location : "top",
        theme_advanced_layout_manager: 'SimpleLayout',
        theme_advanced_buttons1 : first_line,
        theme_advanced_buttons2 : second_line,
        theme_advanced_buttons3 : "",
        theme_advanced_blockformats :"p,address,pre,h2,h3,h4,h5,h6",
        paste_auto_cleanup_on_paste : true,
        paste_insert_word_content_callback : "convertWord",
        paste_use_dialog: false,
        apply_source_formatting : true,
        extended_valid_elements : "applet[style|archive|codebase|code|height|width],comment,iframe[src|style|allowtransparency|frameborder|width|height|scrolling]",
        content_css: '/stylesheets/tinymce.css',
        language: <%= tinymce_language.inspect %>,
        entity_encoding: 'raw'
        });

function convertWord(type, content) {
  switch (type) {
    // Gets executed before the built in logic performes it's cleanups
    case "before":
      //content = content.toLowerCase(); // Some dummy logic
      break;

    // Gets executed after the built in logic performes it's cleanups
    case "after":
      content = content.replace(/<!--\s*-->/, '');
      break;
  }

  return content;
}

</script>


Show the export JSON link on the list

Show the export JSON link on the list

<%= link_to_xml_export -%>
<%= link_to_csv_export -%>
<%= link_to_json_export -%>


Forgot the naming of a variable on the refactoring of dead_step_count.

  Cuke Sniffer

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

  Summary -

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

      Features
      Scenarios
      Step Definitions
      Hooks

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

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

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

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

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

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

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

      <% end %>

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

      <% end %>

  Improvement List +

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

No Improvements to make!

  <% end %>

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

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

    <% end %>

  Dead Steps +

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

No dead steps found!

  <% elsif dead_step_count == 1 %>

<%= dead_step_count %> Dead Step found.

  <% else %>

<%= dead_step_count %> Dead Steps found.

  <% end %>

    <% dead_steps.each_key do |file_name| %>

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

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

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

              <% end %>

    <% end %>

  Features +

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

No Feature/Scenario smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.features.each do |feature| %>
      <% next if feature.total_score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('feature_<%=index%>'))">

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

<%= feature.name %>

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

          <% if feature.rules_hash.empty? %>

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

<%= rule %>

          <% end %>

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

          <% unless feature.background.nil? or feature.background.score > 0 %>

<%= feature.background.score %>

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

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

<%= rule %>

                <% end %>

          <% end %>

          <% feature.scenarios.each do |scenario| %>
              <% next if scenario.score <= 0 %>

<%= scenario.score %>

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

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

<%= rule %>

                <% end %>

          <% end %>

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

  Step Definitions +

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

No Step Definition smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.step_definitions.each do |step_definition| %>
      <% next if step_definition.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('step_definition_<%=index%>'))">

<%= step_definition.score %>

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

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

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

<%= step_definition.calls.keys.count %> Call(s)

      <div id="step_definition_<%= index %>" style="display:none;">

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

<%= rule %>

            <% end %>

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

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

  Hooks +

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

No Hook smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.hooks.each do |hook| %>
      <% next if hook.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('hook_<%=index%>'))">

<%= hook.score %>

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

<%= name %>

      <div id="hook_<%= index %>" style="display:none;">

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

<%= rule %>

            <% end %>

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

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

  Cuke Sniffer

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

  Summary -

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

      Features
      Scenarios
      Step Definitions
      Hooks

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

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

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

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

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

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

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

      <% end %>

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

      <% end %>

  Improvement List +

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

No Improvements to make!

  <% end %>

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

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

    <% end %>

  Dead Steps +

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

No dead steps found!

  <% elsif dead_step_count == 1 %>

<%= dead_step_count %> Dead Step found.

  <% else %>

<%= dead_steps_count %> Dead Steps found.

  <% end %>

    <% dead_steps.each_key do |file_name| %>

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

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

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

              <% end %>

    <% end %>

  Features +

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

No Feature/Scenario smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.features.each do |feature| %>
      <% next if feature.total_score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('feature_<%=index%>'))">

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

<%= feature.name %>

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

          <% if feature.rules_hash.empty? %>

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

<%= rule %>

          <% end %>

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

          <% unless feature.background.nil? or feature.background.score > 0 %>

<%= feature.background.score %>

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

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

<%= rule %>

                <% end %>

          <% end %>

          <% feature.scenarios.each do |scenario| %>
              <% next if scenario.score <= 0 %>

<%= scenario.score %>

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

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

<%= rule %>

                <% end %>

          <% end %>

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

  Step Definitions +

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

No Step Definition smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.step_definitions.each do |step_definition| %>
      <% next if step_definition.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('step_definition_<%=index%>'))">

<%= step_definition.score %>

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

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

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

<%= step_definition.calls.keys.count %> Call(s)

      <div id="step_definition_<%= index %>" style="display:none;">

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

<%= rule %>

            <% end %>

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

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

  Hooks +

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

No Hook smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.hooks.each do |hook| %>
      <% next if hook.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('hook_<%=index%>'))">

<%= hook.score %>

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

<%= name %>

      <div id="hook_<%= index %>" style="display:none;">

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

<%= rule %>

            <% end %>

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

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


Changed "Create" button to "Create Task"

New task

<%= start_form_tag :action => 'create' %>
  <%= render :partial => 'form' %>
  <%= submit_tag "Create Task" %>
<%= end_form_tag %>

<%= link_to 'Back', :action => 'list' %>

New task

<%= start_form_tag :action => 'create' %>
  <%= render :partial => 'form' %>
  <%= submit_tag "Create" %>
<%= end_form_tag %>

<%= link_to 'Back', :action => 'list' %>


Use url_for instead of hard-coded preview URL.  (closes #379)

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

<%= form_remote_tag :url => {:action => "comment", :id => @article},
                    :position=> :bottom,
                    :update => {:success => 'commentList'},
                    :loading => "loading()",
                    :complete => "complete(request)",
                    :failure => "failure(request)",
                    :html => {:id=>"commentform",:class=>"commentform"} %>

Your name

       <%= text_field "comment", "author", :size => 20 %> <%= link_to_function("(leave url/email »)", "Element.toggle('guest_url'); Element.toggle('guest_email')") %>

Your blog

       <%= text_field "comment", "url" %>

Your email

       <%= text_field "comment", "email" %>

Your message

        <%= text_area "comment", "body" %>

      <%= image_tag "spinner.gif" %>
      <a href="#" onclick="new Ajax.Updater('preview', '<%= url_for :action => 'comment_preview' %>',  {asynchronous:true, evalScripts:true, parameters:Form.serialize('commentform'), onComplete:function(request){Element.show('preview')}}); return false;">Preview comment
      <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />

<%= end_form_tag %>

<%= form_remote_tag :url => {:action => "comment", :id => @article},
                    :position=> :bottom,
                    :update => {:success => 'commentList'},
                    :loading => "loading()",
                    :complete => "complete(request)",
                    :failure => "failure(request)",
                    :html => {:id=>"commentform",:class=>"commentform"} %>

Your name

       <%= text_field "comment", "author", :size => 20 %> <%= link_to_function("(leave url/email »)", "Element.toggle('guest_url'); Element.toggle('guest_email')") %>

Your blog

       <%= text_field "comment", "url" %>

Your email

       <%= text_field "comment", "email" %>

Your message

        <%= text_area "comment", "body" %>

      <%= image_tag "spinner.gif" %>
      Preview comment
      <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />

<%= end_form_tag %>


r367: fixing copyright symbol in footer of site

	  <%= link_to 'Contact Us', '/documentation/contact_us.html' %> |
	  <%= link_to 'ThoughtWorks.com', 'http://www.thoughtworks.com', :target => '_blank' %> |
	  <%= link_to 'ThoughtWorks Studios', 'http://studios.thoughtworks.com', :target => '_blank' %>

    Version <%= CruiseControl::VERSION::STRING %> |
		© ThoughtWorks Copyright 2007

	  <%= link_to 'Contact Us', '/documentation/contact_us.html' %> |
	  <%= link_to 'ThoughtWorks.com', 'http://www.thoughtworks.com', :target => '_blank' %>

    Version <%= CruiseControl::VERSION::STRING %> |
		© ThoughtWorks Copyright 2007


make it compatible with typo 5.2

make it compatible with typo 5.2

Signed-off-by: Frédéric de Villamil <58692fd42329d32571d999fbcdd2ddd08a5186db@de-villamil.com>

<%=h sidebar.title %>

        <% for comment in sidebar.comments -%>

                <% title = ''; title << 'by ' + comment.author if sidebar.show_username -%>
                <% title << ' on ' + comment.article.title if sidebar.show_article -%>
                <%= link_to_permalink comment,h(title) %>

        <% end %>
		<% debugger %>

<%=h title %>

        <% for comment in sidebar.comments -%>

                <% title = ''; title << 'by ' + comment.author if show_username -%>
                <% title << ' on ' + comment.article.title if show_article -%>
                <%= link_to_permalink comment,h(title) %>

        <% end %>


Search: fixed fontWeight.

Search: fixed fontWeight.

<%
@id = id
run 'search.rb'

def questArea(row)
	z = row[:ZoneOrSort]
	return '' if(!z)
	a = AREA_TABLE[row[:ZoneOrSort]]
	return '' if(!a)
	return "#{a[:name]}"
end
%>

Search results for:
<%=
id[1]
%>

<%= @zones.size %> Zones
<%= @quests.size %> Quests
<%= @creatures.size %> NPCs
<%= @items.size %> Items
<%= @gobjects.size %> Objects

ID	Name

<% @zones.each do |id, name| %>
<%= "
#{id}	"+
"#{name}
" %>
<% end %>

ID	Zone	MinLevel	QuestLevel	Title

<% @quests.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{questArea(row)}	"+
"#{row[:MinLevel]}	"+
"#{row[:QuestLevel]}	"+
"#{row[:title]}
" %>
<% end %>

ID	MinLevel	MaxLevel	Rank	Name	Title

<% @creatures.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{row[:minlevel]}	"+
"#{row[:maxlevel]}	"+
"#{row[:rank]}	"+
"#{row[:name]}	"+
"#{row[:subname]}
" %>
<% end %>

ID	Class	Subclass	Quality	Name	Sell price (copper)

<% @items.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{row[:class]}	"+
"#{row[:subclass]}	"+
"#{row[:quality]}	"+
"#{row[:name]}	"+
"#{row[:sellprice]}
" %>
<% end %>

ID	Type	Name	Script

<% @gobjects.each do |row| %>
<%= "
#{row[:entry]}	"+
"#{row[:type]}	"+
"#{row[:name]}	"+
"#{row[:ScriptName]}
" %>
<% end %>


Fixing message

Fixing message

<%= _('Last administrator leaving %s') % profile.name %>

<% if profile.members_count > 1 %>

    <%= _('Since you are the last administrator, you must choose at least one member to administer this community.') % profile.name %>

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

  <% form_tag :action => 'update_roles', :roles => @roles, :person => @person, :confirmation => profile.admins.count > 1 do %>
    <% button_bar do %>
      <%= submit_button(:save, _("Leave administration and save"), :cancel => {:action => 'index'}) %>
    <% end %>
  <% end %>

<% else %>

    <%= _('Since you are the last administrator and there is no other member in this community, the next user to join this community will assume the administrator role.') % profile.name %>

  <% form_tag :action => 'update_roles', :roles => @roles, :person => @person, :confirmation => true do %>
    <% button_bar do %>
      <%= submit_button(:ok, _("Ok, I want to leave"), :cancel => {:action => 'index'}) %>
    <% end %>
  <% end %>
<% end %>

<%= _('Last administrator leaving %s') % profile.name %>

<% if profile.members_count > 1 %>

    <%= _('Since you are the last administrator, you must choose at least one member to administer this community.') % profile.name %>

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

  <% form_tag :action => 'update_roles', :roles => @roles, :person => @person, :confirmation => profile.admins.count > 1 do %>
    <% button_bar do %>
      <%= submit_button(:save, _("Leave administration and save"), :cancel => {:action => 'index'}) %>
    <% end %>
  <% end %>

<% else %>

    <%= _('Since you are the last administrator and there is no other member in this community, the next member to join this community will assume the administrator role.') % profile.name %>

  <% form_tag :action => 'update_roles', :roles => @roles, :person => @person, :confirmation => true do %>
    <% button_bar do %>
      <%= submit_button(:ok, _("Ok, I want to leave"), :cancel => {:action => 'index'}) %>
    <% end %>
  <% end %>
<% end %>


[ClockingIT @ Give iframe for uploads a 1x1 size]

<fieldset id="new_file">
<legend><%=_ 'Upload New File' %></legend>

<% form_for(:file, :url => {:action => 'upload' },
     :html => {:multipart => "true", :target => 'up_frame'} ) do |f|
 %>
  <%= render_partial "form" %>
  <%= submit_tag _("Upload"), :class => 'nolabel' %>
<% end %>
<iframe id="up_frame" name="up_frame" style="width:1px;height:1px;border:0;"></iframe>
</fieldset>

<fieldset id="new_file">
<legend><%=_ 'Upload New File' %></legend>

<% form_for(:file, :url => {:action => 'upload' },
     :html => {:multipart => "true", :target => 'up_frame'} ) do |f|
 %>
  <%= render_partial "form" %>
  <%= submit_tag _("Upload"), :class => 'nolabel' %>
<% end %>
<iframe id="up_frame" name="up_frame" style="display:none;"></iframe>
</fieldset>


ActionItem1044: displaying number of members for organizations

  <%= _('Basic information')%>

<%= display_field(_('Name:'), profile, :name) { |name| link_to name, profile.url  } %>

    <%= link_to _('Members') + " (%s)" % profile.members.count, :controller => 'profile', :action => 'members' %>

<% if profile.kind_of?(Enterprise) && !profile.environment.enabled?('disable_products_for_enterprises') %>

      <%= link_to _('Products/Services'), :controller => 'catalog', :action => 'index' %>

<% end %>

  <%= _('Basic information')%>

<%= display_field(_('Name:'), profile, :name) { |name| link_to name, profile.url  } %>

    <%= link_to _('Members'), :controller => 'profile', :action => 'members' %>

<% if profile.kind_of?(Enterprise) && !profile.environment.enabled?('disable_products_for_enterprises') %>

      <%= link_to _('Products/Services'), :controller => 'catalog', :action => 'index' %>

<% end %>


keep your default search type

keep your default search type

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

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

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

%>

<%= @page_title %>

  <%= form_tag({:controller=>'search', :action=>'journal_search'}, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'}, nil)  %>
      <input type=hidden name="rfr_id" value="info:sid/sfxit.com:citation">

      <input type="hidden" id="rft_title" name="rft.title">
      <input type="hidden" id="rft_object_id" name="rft.object_id">
      <input type="hidden" id="date" name="rft.date">

      Journal Title:
      <%= text_field_with_auto_complete :journal, :title, {:name=>'rft.jtitle', :onchange=>'clearObjectId();',:autocomplete=>'off', :size=>'40', :value=>params['rft.jtitle']}, {:after_update_element=>'updateObjectId', :min_chars => 4}
      %>

      <select name="umlaut.title_search_type" id="sfx_title_search">
          <option value="contains" <%= "SELECTED" if params["umlaut.title_search_type"] == "contains" %>>contains</option>
          <option value="begins" <%= "SELECTED" if params["umlaut.title_search_type"] == "begins" %> >begins
          with</option>
          <option value="exact">exact match</option>
      </select>

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

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

<% end %>

<% unless @hits == 0%>

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

<% end %>
<% if params["rft.jtitle"] %>

Note: Alternate titles might have matched your search terms

<% end %>

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

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

<% end %>

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

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

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

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

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

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

%>

<%= @page_title %>

  <%= form_tag({:controller=>'search', :action=>'journal_search'}, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'}, nil)  %>
      <input type=hidden name="rfr_id" value="info:sid/sfxit.com:citation">

      <input type="hidden" id="rft_title" name="rft.title">
      <input type="hidden" id="rft_object_id" name="rft.object_id">
      <input type="hidden" id="date" name="rft.date">

      Journal Title:
      <%= text_field_with_auto_complete :journal, :title, {:name=>'rft.jtitle', :onchange=>'clearObjectId();',:autocomplete=>'off', :size=>'40', :value=>params['rft.jtitle']}, {:after_update_element=>'updateObjectId', :min_chars => 4}
      %>

      <select name="umlaut.title_search_type" id="sfx_title_search">
          <option value="contains">contains</option>
          <option value="begins">begins
          with</option>
          <option value="exact">exact match</option>
      </select>

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

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

<% end %>

<% unless @hits == 0%>

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

<% end %>
<% if params["rft.jtitle"] %>

Note: Alternate titles might have matched your search terms

<% end %>

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

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

<% end %>

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

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

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


Revert "Restructure block for requesting plugin's contents"

This reverts commit 7cb741e5f3734a8cedd2c4e7e524bb2d50fa0237.

<!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 %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag template_stylesheet_path %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
    <%
      plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') }
    %>
    <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %>
    <%= stylesheet_link_tag theme_stylesheet_path %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%= javascript_tag('render_all_jquery_ui_widgets()') %>
    <%
      plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
    %>
    <%= javascript_include_tag(plugins_javascripts, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template ) +
    (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
    %>" >

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

        <%= theme_header %>

            <%= usermenu_logged_in %>

              <%= _("%s") % thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login') %>
              <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %>

                <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>

              <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
              <%= _("or %s") % link_to('' + _('Sign up') + '', :controller => 'account', :action => 'signup')%>
              <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" />

<%=_('Press Enter to send the search query.')%>

            <%= javascript_tag 'jQuery("#user form input").hint();' %>
          </form>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

          <% if controller.respond_to? 'custom_contents' %>
            <% Array(controller.custom_contents).each do |content| %>
              <%= yield content %>
            <% end %>
          <% end %>

            <%= 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 %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag template_stylesheet_path %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
    <%
      plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') }
    %>
    <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %>
    <%= stylesheet_link_tag theme_stylesheet_path %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%= javascript_tag('render_all_jquery_ui_widgets()') %>
    <%
      plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
    %>
    <%= javascript_include_tag(plugins_javascripts, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %>
    <%=
      @plugins.dispatch(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template ) +
    (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
    %>" >

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

        <%= theme_header %>

            <%= usermenu_logged_in %>

              <%= _("%s") % thickbox_inline_popup_link('' + _('Login') + '', login_url, 'inlineLoginBox', :id => 'link_login') %>
              <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %>

                <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>

              <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
              <%= _("or %s") % link_to('' + _('Sign up') + '', :controller => 'account', :action => 'signup')%>
              <% end %>

          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" />

<%=_('Press Enter to send the search query.')%>

            <%= javascript_tag 'jQuery("#user form input").hint();' %>
          </form>

          <%= theme_site_title %>

            <%= theme_extra_navigation %>

        <div id="content" class="<%= controller.send(:content_classes) rescue '' %>">
          <%= controller.send(:before_contents) rescue '' %>

            <%= insert_boxes(yield) %>

    <%= render_environment_features(:logged_in) %>

      <%= theme_footer %>

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


ActionItem736: English review

ActionItem736: English review

<%= error_messages_for :user %>
<% labelled_form_for :user, @user,
   :html => { :help=>_('Fill all this fields to join in this environment.
 If you forgot your password, do not create a new account, click on the "I forgot my password!" link. ;-)')
            } do |f| -%>

<%= f.text_field :login,
    :help => help=_('"Username" is a simple nickname to recognize you on this environment.'),
    :onchange => 'this.value = convToValidLogin( this.value )' %>
<%= help %>

<%= f.text_field :email,
    :help => help=_('We\'ll send you an e-mail to validate your registration.') %>
<%= help %>

<%= f.password_field :password,
    :help => help=_('Do not use a obviously password, but try some unforgettable word.') %>
<%= help %>

<%= f.password_field :password_confirmation,
    :help => help=_('We need to be sure that you wrote correctly your password.') %>
<%= help %>

<%= icaptcha_field() %>

<% if @terms_of_use %>

    <%= @terms_of_use %>

    <%= check_box 'user', 'terms_accepted' %>
    <%= _('I accept the terms of use') %>

<% end %>

<% if params[:enterprise_code] %>
  <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
  <%= hidden_field_tag :answer, params[:answer] %>
  <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
  <%= hidden_field_tag :new_user, true %>
<% end %>

<% if ! defined? hidden_atention || ! hidden_atention %>

<%= _('Here you can create an account for you as a person.

Do not enter a login for a group nor for an entreprise.
With your user account, you can create several group or enterprise
accounts through your person control panel.') %>

<% end %>

<% button_bar do %>
  <%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
<% end %>
<% end -%>

<%= error_messages_for :user %>
<% labelled_form_for :user, @user,
   :html => { :help=>_('Fill all this fields to join in this environment.' +
                       '
If you forgot your password, do not create a new account,' +
                       ' click on the "I forgot my password!" link. ;-)')
            } do |f| -%>

<%= f.text_field :login,
    :help => help=_('"Username" is a simple nickname to recognize you on this environment.'),
    :onchange => 'this.value = convToValidLogin( this.value )' %>
<%= help %>

<%= f.text_field :email,
    :help => help=_('We\'ll send you an e-mail to validate your registration.') %>
<%= help %>

<%= f.password_field :password,
    :help => help=_('Do not use a obviously password, but try some unforgettable word.') %>
<%= help %>

<%= f.password_field :password_confirmation,
    :help => help=_('We need to be sure that you wrote correctly your password.') %>
<%= help %>

<%= icaptcha_field() %>

<% if @terms_of_use %>

    <%= @terms_of_use %>

    <%= check_box 'user', 'terms_accepted' %>
    <%= _('I accept the terms of use') %>

<% end %>

<% if params[:enterprise_code] %>
  <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
  <%= hidden_field_tag :answer, params[:answer] %>
  <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
  <%= hidden_field_tag :new_user, true %>
<% end %>

<% if ! defined? hidden_atention || ! hidden_atention %>

<%= _('Here you should create a login for an individual person.

Do not enter a login for a group nor for an entreprise.
With your user login, you can create many group or entreprise
accounts. You can do it from your personal control panel.') %>

<% end %>

<% button_bar do %>
  <%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
<% end %>
<% end -%>


[stoa] Fixing hotspot syntax

[stoa] Fixing hotspot syntax

(ActionItem2293)

<%= error_messages_for :user, :person %>

<% labelled_form_for :user, @user, :html => { :multipart => true, :id => 'signup-form' } do |f| %>

<%= hidden_field_tag :invitation_code, @invitation_code %>

  <%= environment.default_hostname %>/

      <%= required f.text_field(:login, :onchange => 'this.value = convToValidLogin(this.value);', :rel => s_('signup|Login')) %>

    <%= content_tag(:small, _('Choose your login name carefully! It will be your network access and you will not be able to change it later.'), :id => 'signup-balloon') %>

  <%= observe_field 'user_login',
        :url => { :action => 'check_url' },
        :with => 'identifier',
        :update => 'url-check',
        :loading => "jQuery('#user_login').removeClass('#{validation_classes}').addClass('checking');
                     jQuery('#url-check').html('
#{checking_message(:url)}
');",
        :complete => "jQuery('#user_login').removeClass('checking')"
  %>

    <%= required f.password_field(:password, :id => 'user_pw') %>
    <%= f.text_field(:password_clear, :value => _('password')) %>
    <%= content_tag(:small,_('Choose a password that you can remember easily. It must have at least 4 characters.'), :id => 'password-balloon') %>

    <%= required f.password_field(:password_confirmation) %>
    <%= f.text_field(:password_confirmation_clear, :value => _('password confirmation')) %>

    <%= required f.text_field(:email, :rel => _('e-Mail')) %>
    <%= content_tag(:small,_('This e-mail address will be used to contact you.')) %>

  <%= observe_field "user_email",
        :url      => { :action => "check_email" },
        :with     => "address",
        :update   => "email-check",
        :loading  => "jQuery('#user_email').removeClass('#{validation_classes}').addClass('checking');
                      jQuery('#email-check').html('
#{checking_message(:email)}
');",
        :complete => "jQuery('#user_email').removeClass('checking')",
        :before   => "var field = jQuery('#user_email');
                      if (field.val()=='') {
                        field.removeClass('#{validation_classes}');
                        jQuery('#email-check').html('

');
                        return false;
                      }
                      if (!( field.valid() )) {
                        field.removeClass('#{validation_classes}').addClass('invalid');
                        jQuery('#email-check').html('
#{_('This e-mail address is not valid')}
');
                        return false;
                      }"
  %>

  <%= label :profile_data, :name %>
  <%= required text_field(:profile_data, :name, :rel => _('Full name')) %>

  <% labelled_fields_for :profile_data, @person do |f| %>
    <%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %>
  <% end %>

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

  <% unless @terms_of_use.blank? %>

      <%= labelled_check_box(_('I accept the %s') % link_to(_('terms of use'), {:controller => 'home', :action => 'terms'}, :target => '_blank'), 'user[terms_accepted]') %>

  <% end %>

  <% if params[:enterprise_code] %>
    <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
    <%= hidden_field_tag :answer, params[:answer] %>
    <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
    <%= hidden_field_tag :new_user, true %>
  <% end %>

  <%= submit_button('save', _('Create my account')) %>

<% end -%>

<%= error_messages_for :user, :person %>

<% labelled_form_for :user, @user, :html => { :multipart => true, :id => 'signup-form' } do |f| %>

<%= hidden_field_tag :invitation_code, @invitation_code %>

  <%= environment.default_hostname %>/

      <%= required f.text_field(:login, :onchange => 'this.value = convToValidLogin(this.value);', :rel => s_('signup|Login')) %>

    <%= content_tag(:small, _('Choose your login name carefully! It will be your network access and you will not be able to change it later.'), :id => 'signup-balloon') %>

  <%= observe_field 'user_login',
        :url => { :action => 'check_url' },
        :with => 'identifier',
        :update => 'url-check',
        :loading => "jQuery('#user_login').removeClass('#{validation_classes}').addClass('checking');
                     jQuery('#url-check').html('
#{checking_message(:url)}
');",
        :complete => "jQuery('#user_login').removeClass('checking')"
  %>

    <%= required f.password_field(:password, :id => 'user_pw') %>
    <%= f.text_field(:password_clear, :value => _('password')) %>
    <%= content_tag(:small,_('Choose a password that you can remember easily. It must have at least 4 characters.'), :id => 'password-balloon') %>

    <%= required f.password_field(:password_confirmation) %>
    <%= f.text_field(:password_confirmation_clear, :value => _('password confirmation')) %>

    <%= required f.text_field(:email, :rel => _('e-Mail')) %>
    <%= content_tag(:small,_('This e-mail address will be used to contact you.')) %>

  <%= observe_field "user_email",
        :url      => { :action => "check_email" },
        :with     => "address",
        :update   => "email-check",
        :loading  => "jQuery('#user_email').removeClass('#{validation_classes}').addClass('checking');
                      jQuery('#email-check').html('
#{checking_message(:email)}
');",
        :complete => "jQuery('#user_email').removeClass('checking')",
        :before   => "var field = jQuery('#user_email');
                      if (field.val()=='') {
                        field.removeClass('#{validation_classes}');
                        jQuery('#email-check').html('

');
                        return false;
                      }
                      if (!( field.valid() )) {
                        field.removeClass('#{validation_classes}').addClass('invalid');
                        jQuery('#email-check').html('
#{_('This e-mail address is not valid')}
');
                        return false;
                      }"
  %>

  <%= label :profile_data, :name %>
  <%= required text_field(:profile_data, :name, :rel => _('Full name')) %>

  <% labelled_fields_for :profile_data, @person do |f| %>
    <%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %>
  <% end %>

  <%= @plugins.map(:signup_extra_contents).collect { |content| instance_eval(&content) }.join("") %>

  <% unless @terms_of_use.blank? %>

      <%= labelled_check_box(_('I accept the %s') % link_to(_('terms of use'), {:controller => 'home', :action => 'terms'}, :target => '_blank'), 'user[terms_accepted]') %>

  <% end %>

  <% if params[:enterprise_code] %>
    <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
    <%= hidden_field_tag :answer, params[:answer] %>
    <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
    <%= hidden_field_tag :new_user, true %>
  <% end %>

  <%= submit_button('save', _('Create my account')) %>

<% end -%>


correct signup form labels

correct signup form labels

<% form_tag :action=> "signup" do -%>

<% if @error_tos%>

<%=t("madb_error_saving_account")%>

<% if @error_tos %>

<%=t("tos_acceptance_needed")%>

<%end%>

<% end -%>

<%= t("madb_administrator_user")%>

<% if @user.errors.count>0 %>

<%=t("madb_error_saving_user")%>

    <% done = [] %>
    <% @user.errors.each do |attr,e| %>
      <% next if done.include? e %>
      <% done.push e %>

<%= t(e) %>

    <% end %>

<%end%>

    <%= t("madb_login_email") %>:

    <%= text_field "user", "login", :size => 30 %>

<%if false %>
    <%= t("madb_email_confirmation") %>:

    <%= text_field "user", "login_confirmation", :size => 30 %>

<% end %>
    <%= t("madb_choose_password_creation") %>:

    <%= password_field "user", "password", :size => 30, :value => "" %>

    <%= t("madb_confirm_password_creation") %>:

    <%= password_field "user", "password_confirmation", :size => 30, :value => "" %>

    <input type="checkbox" name="tos_accepted" ><%= t("madb_tos_accepted")%>

      <%= submit_tag t("madb_signup") %>

<% end -%>

<% form_tag :action=> "signup" do -%>

<% if @error_tos%>

<%=t("madb_error_saving_account")%>

<% if @error_tos %>

<%=t("tos_acceptance_needed")%>

<%end%>

<% end -%>

<%= t("madb_administrator_user")%>

<% if @user.errors.count>0 %>

<%=t("madb_error_saving_user")%>

    <% done = [] %>
    <% @user.errors.each do |attr,e| %>
      <% next if done.include? e %>
      <% done.push e %>

<%= t(e) %>

    <% end %>

<%end%>

    <%= text_field "user", "login", :size => 30 %>

    <%= t("madb_email_confirmation") %>:

<%if false %>
    <%= text_field "user", "login_confirmation", :size => 30 %>

<% end %>
    <%= t("madb_choose_password_creation") %>:

    <%= password_field "user", "password", :size => 30, :value => "" %>

    <%= t("madb_confirm_password_creation") %>:

    <%= password_field "user", "password_confirmation", :size => 30, :value => "" %>

    <input type="checkbox" name="tos_accepted" ><%= t("madb_tos_accepted")%>

      <%= submit_tag t("madb_signup") %>

<% end -%>


coins in textarea is more convenient

coins in textarea is more convenient

<% coins_str = @user_request.referent.to_context_object.coins %>

COinS:
<%= coins_str %>

escaped:
<form><textarea cols="60" rows="4"><%= coins_str %></textarea></form>

<% coins_str = @user_request.referent.to_context_object.coins %>

COinS:
<%= coins_str %>

escaped:
<%= h(coins_str) %>


minor: added clickable group name in dashboard

A dashboard of interesting stuff. <%= link_to 'create page »', {:controller => '/pages', :action => 'create'} %>

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

<% @pages.each do |groupname,grouppages| -%>

<%= link_to_group groupname %>

<%
columns = [:icon, :title, :created_by, :created_at, :contributors_count]
-%>
<%= render :partial => 'pages/list/table', :locals => {:pages => grouppages, :columns => columns} %>
<%= link_to 'more »', url_for_group(groupname, :action => 'search') + "/descending/created_at" %>

<% end -%>

A dashboard of interesting stuff. <%= link_to 'create page »', {:controller => '/pages', :action => 'create'} %>

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

<% @pages.each do |groupname,grouppages| -%>

<%= groupname %>

<%
columns = [:icon, :title, :created_by, :created_at, :contributors_count]
-%>
<%= render :partial => 'pages/list/table', :locals => {:pages => grouppages, :columns => columns} %>
<%= link_to 'more »', url_for_group(groupname, :action => 'search') + "/descending/created_at" %>

<% end -%>


Changed deprecated @request to 'request' in rescue template

git-svn-id: 9fca28a9e7d3964546c091feb010dd68a90643f0@7823 dfb7d73b-c2ec-0310-8fea-fb051d288c6d

  <%=h @exception.original_exception.class.to_s %> in
  <%=h request.parameters["controller"].capitalize if request.parameters["controller"]%>#<%=h request.parameters["action"] %>

  Showing <%=h @exception.file_name %> where line #<%= @exception.line_number_link rescue @exception.line_number %> raised:

<%=h @exception.message %>

Extracted source (around line #<%= @exception.line_number_link rescue @exception.line_number %>):

<%=h @exception.source_extract %>

<%=h @exception.sub_template_message %>

<% @real_exception = @exception
   @exception = @exception.original_exception || @exception %>
<%= render_file(@rescues_path + "/_trace.rhtml", false) %>
<% @exception = @real_exception %>

<%= render_file(@rescues_path + "/_request_and_response.rhtml", false) %>

  <%=h @exception.original_exception.class.to_s %> in
  <%=h @request.parameters["controller"].capitalize if @request.parameters["controller"]%>#<%=h @request.parameters["action"] %>

  Showing <%=h @exception.file_name %> where line #<%= @exception.line_number_link rescue @exception.line_number %> raised:

<%=h @exception.message %>

Extracted source (around line #<%= @exception.line_number_link rescue @exception.line_number %>):

<%=h @exception.source_extract %>

<%=h @exception.sub_template_message %>

<% @real_exception = @exception
   @exception = @exception.original_exception || @exception %>
<%= render_file(@rescues_path + "/_trace.rhtml", false) %>
<% @exception = @real_exception %>

<%= render_file(@rescues_path + "/_request_and_response.rhtml", false) %>


removed old frag caching
removed search box from side bar

git-svn-id: 63e5431e33a10c4701b329fb6d8e0744110cb91e@137 c2b4ead4-481d-0410-ac63-b02590f85e3f

Watch Your Mouth

<%= link_to 'Latest Threads', :controller => 'bbchysthreads', :action => 'all', :page => nil %>

<%= link_to 'Most Censored', :controller => 'bbchysthreads', :action => 'mostcensored', :page => nil %>

<%= link_to 'Latest Censored', :controller => 'bbchyscomments', :action => 'list', :page => nil %>

<%= link_to 'Latest Recommended', :controller => 'bbchyscomments', :action => 'recommended', :page => nil %>

<%= link_to 'Top Recommended', :controller => 'bbchyscomments', :action => 'top_recommended', :page => nil %>

<%= link_to 'RSS Feed', :controller => 'bbchyscomments', :action => 'list_rss' %>

<%= link_to 'Search', :controller => 'bbchyscomments', :action => 'search' %>

<% cache("sidebar-" + controller.controller_name) do -%>

Watch Your Mouth

<%= link_to 'Latest Threads', :controller => 'bbchysthreads', :action => 'all', :page => nil %>

<%= link_to 'Most Censored', :controller => 'bbchysthreads', :action => 'mostcensored', :page => nil %>

<%= link_to 'Latest Censored', :controller => 'bbchyscomments', :action => 'list', :page => nil %>

<%= link_to 'Latest Recommended', :controller => 'bbchyscomments', :action => 'recommended', :page => nil %>

<%= link_to 'Top Recommended', :controller => 'bbchyscomments', :action => 'top_recommended', :page => nil %>

<%= link_to 'RSS Feed',
                :controller => 'bbchyscomments', :action => 'list_rss' %>

Search Comments

              <% form_tag :controller => 'bbchyscomments', :action => 'search' do  %>
              <%= text_field_tag 'search', @search, :class => 'searchbox' %>

<%= submit_tag ' Search ' %>

              <% end %>

        <% end %>


Added textilize call to summary for show_project.

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

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

<%= @title %>

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

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

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

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

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

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

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

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

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

<%= @title %>

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

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

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

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

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

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

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


Dumped the <% %> style block helpers

Dumped the <% %> style block helpers

<%
  @page_title = "Translate"
  show_filters = ["all", "untranslated", "translated"]
  show_filters << "changed" if @from_locale != @to_locale
%>

<fieldset>
	<legend>Search filter</legend>

		 Show: <%=  raw simple_filter(show_filters) %>

		 Sort by: <%= raw simple_filter(["key", "text"], 'sort_by') %>

  <%= form_tag(params, :method => :get) do %>

     <%= hidden_field_tag(:filter, params[:filter]) %>
     <%= hidden_field_tag(:sort_by, params[:sort_by]) %>
     Translate from
     <%= select_tag(:from_locale, options_for_select(I18n.valid_locales, @from_locale.to_sym)) %> to
     <%= select_tag(:to_locale, options_for_select(I18n.valid_locales, @to_locale.to_sym)) %>
     <%= submit_tag "Display" %>

     Key
     <%= select_tag(:key_type, options_for_select([["contains", 'contains'], ["starts with", 'starts_with']], params[:key_type])) %>
     <%= text_field_tag(:key_pattern, params[:key_pattern], :size => 50, :id => "key_pattern_value", :class => "text-default") %>

     Text
     <%= select_tag(:text_type, options_for_select(['contains', 'equals'], params[:text_type])) %>
     <%= text_field_tag(:text_pattern, params[:text_pattern], :size => 50, :id => "text_pattern_value", :class => "text-default") %>

    <%= submit_tag "Search" %>
    <%= link_to "clear", params.merge({:text_pattern => nil, :key_pattern => nil}) %>

  <% end %>

	  Found <%= @total_entries %> messages

	 <%= link_to "Reload messages", translate_reload_path %>

</fieldset>

  <%= render :partial => 'pagination', :locals => {:total_entries => @total_entries, :per_page => per_page} %>

<% if @total_entries > 0 %>
<%= form_tag(translate_path) do %>

      <%= hidden_field_tag(:filter, params[:filter], :id => "hid_filter") %>
      <%= hidden_field_tag(:sort_by, params[:sort_by], :id => "hid_sort_by") %>
      <%= hidden_field_tag(:key_type, params[:key_type], :id => "hid_key_type") %>
      <%= hidden_field_tag(:key_pattern, params[:key_pattern], :id => "hid_key_pattern") %>
      <%= hidden_field_tag(:text_type, params[:text_type], :id => "hid_text_type") %>
      <%= hidden_field_tag(:text_pattern, params[:text_pattern], :id => "hid_text_pattern") %>

Translations from <%= @from_locale %> to <%= @to_locale %>

	    <%= submit_tag "Save Translations" %>

	  <% @paginated_keys.each do |key|
	      from_text = lookup(@from_locale, key)
	      to_text = lookup(@to_locale, key)
	      line_size = 100
	      n_lines = n_lines(from_text, line_size)
	      field_name = "key[#{key}]"
    %>

		<% if from_text.present? %>

				<%= simple_format(h(from_text)) %>

		<% end %>

		<% if n_lines > 1 %>
			<%= text_area_tag(field_name, to_text, :size => "#{line_size}x#{n_lines}", :id => key) %>
		<% else %>
			<%= text_field_tag(field_name, to_text, :size => line_size, :id => key) %>
		<% end %>

			  <%= link_to_function 'Auto Translate', "getGoogleTranslation('#{key}', \"#{escape_javascript(from_text)}\", '#{@from_locale}', '#{@to_locale}')", :style => 'padding: 0; margin: 0;' %>

			  Key:<%=h key %>

			  <% if @files[key] %>
				  File:<%= @files[key].join("
") %>
			    <% end %>

<% end %>

    <%= submit_tag "Save Translations" %>

<% end %>
<% end %>

  <%= render :partial => 'pagination', :locals => {:total_entries => @total_entries, :per_page => per_page} %>

<%
  @page_title = "Translate"
  show_filters = ["all", "untranslated", "translated"]
  show_filters << "changed" if @from_locale != @to_locale
%>

<fieldset>
	<legend>Search filter</legend>

		 Show: <%=  raw simple_filter(show_filters) %>

		 Sort by: <%= raw simple_filter(["key", "text"], 'sort_by') %>

  <% form_tag(params, :method => :get) do %>

     <%= hidden_field_tag(:filter, params[:filter]) %>
     <%= hidden_field_tag(:sort_by, params[:sort_by]) %>
     Translate from
     <%= select_tag(:from_locale, options_for_select(I18n.valid_locales, @from_locale.to_sym)) %> to
     <%= select_tag(:to_locale, options_for_select(I18n.valid_locales, @to_locale.to_sym)) %>
     <%= submit_tag "Display" %>

     Key
     <%= select_tag(:key_type, options_for_select([["contains", 'contains'], ["starts with", 'starts_with']], params[:key_type])) %>
     <%= text_field_tag(:key_pattern, params[:key_pattern], :size => 50, :id => "key_pattern_value", :class => "text-default") %>

     Text
     <%= select_tag(:text_type, options_for_select(['contains', 'equals'], params[:text_type])) %>
     <%= text_field_tag(:text_pattern, params[:text_pattern], :size => 50, :id => "text_pattern_value", :class => "text-default") %>

    <%= submit_tag "Search" %>
    <%= link_to "clear", params.merge({:text_pattern => nil, :key_pattern => nil}) %>

  <% end %>

	  Found <%= @total_entries %> messages

	 <%= link_to "Reload messages", translate_reload_path %>

</fieldset>

  <%= render :partial => 'pagination', :locals => {:total_entries => @total_entries, :per_page => per_page} %>

<% if @total_entries > 0 %>
<% form_tag(translate_path) do %>

      <%= hidden_field_tag(:filter, params[:filter], :id => "hid_filter") %>
      <%= hidden_field_tag(:sort_by, params[:sort_by], :id => "hid_sort_by") %>
      <%= hidden_field_tag(:key_type, params[:key_type], :id => "hid_key_type") %>
      <%= hidden_field_tag(:key_pattern, params[:key_pattern], :id => "hid_key_pattern") %>
      <%= hidden_field_tag(:text_type, params[:text_type], :id => "hid_text_type") %>
      <%= hidden_field_tag(:text_pattern, params[:text_pattern], :id => "hid_text_pattern") %>

Translations from <%= @from_locale %> to <%= @to_locale %>

	    <%= submit_tag "Save Translations" %>

	  <% @paginated_keys.each do |key|
	      from_text = lookup(@from_locale, key)
	      to_text = lookup(@to_locale, key)
	      line_size = 100
	      n_lines = n_lines(from_text, line_size)
	      field_name = "key[#{key}]"
    %>

		<% if from_text.present? %>

				<%= simple_format(h(from_text)) %>

		<% end %>

		<% if n_lines > 1 %>
			<%= text_area_tag(field_name, to_text, :size => "#{line_size}x#{n_lines}", :id => key) %>
		<% else %>
			<%= text_field_tag(field_name, to_text, :size => line_size, :id => key) %>
		<% end %>

			  <%= link_to_function 'Auto Translate', "getGoogleTranslation('#{key}', \"#{escape_javascript(from_text)}\", '#{@from_locale}', '#{@to_locale}')", :style => 'padding: 0; margin: 0;' %>

			  Key:<%=h key %>

			  <% if @files[key] %>
				  File:<%= @files[key].join("
") %>
			    <% end %>

<% end %>

    <%= submit_tag "Save Translations" %>

<% end %>
<% end %>

  <%= render :partial => 'pagination', :locals => {:total_entries => @total_entries, :per_page => per_page} %>