summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-25 17:17:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-25 17:17:49 +0000
commit5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7 (patch)
tree93e57765139714bd82dede475725516c448c0d55 /app/views
parent34e20c4373b7f5a20ab3a132feae3f70f21ec477 (diff)
downloadredmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.tar.gz
redmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.zip
Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/account/login.html.erb2
-rw-r--r--app/views/account/lost_password.html.erb2
-rw-r--r--app/views/account/password_recovery.html.erb2
-rw-r--r--app/views/account/register.html.erb2
-rw-r--r--app/views/activities/index.html.erb2
-rw-r--r--app/views/admin/_no_data.html.erb2
-rw-r--r--app/views/admin/projects.html.erb2
-rw-r--r--app/views/attachments/diff.html.erb2
-rw-r--r--app/views/auth_sources/edit.html.erb2
-rw-r--r--app/views/auth_sources/new.html.erb2
-rw-r--r--app/views/boards/edit.html.erb2
-rw-r--r--app/views/boards/new.html.erb2
-rw-r--r--app/views/boards/show.html.erb2
-rw-r--r--app/views/calendars/show.html.erb3
-rw-r--r--app/views/common/feed.atom.builder4
-rw-r--r--app/views/custom_fields/edit.html.erb2
-rw-r--r--app/views/custom_fields/new.html.erb2
-rw-r--r--app/views/documents/edit.html.erb2
-rw-r--r--app/views/documents/index.html.erb2
-rw-r--r--app/views/documents/new.html.erb2
-rw-r--r--app/views/documents/show.html.erb2
-rw-r--r--app/views/enumerations/destroy.html.erb2
-rw-r--r--app/views/enumerations/edit.html.erb2
-rw-r--r--app/views/enumerations/new.html.erb2
-rw-r--r--app/views/files/new.html.erb2
-rw-r--r--app/views/gantts/show.html.erb5
-rw-r--r--app/views/groups/_general.html.erb2
-rw-r--r--app/views/groups/_memberships.html.erb7
-rw-r--r--app/views/groups/_users.html.erb3
-rw-r--r--app/views/groups/new.html.erb2
-rw-r--r--app/views/issue_categories/destroy.html.erb2
-rw-r--r--app/views/issue_statuses/edit.html.erb2
-rw-r--r--app/views/issue_statuses/new.html.erb2
-rw-r--r--app/views/issues/_action_menu.html.erb2
-rw-r--r--app/views/issues/_attributes.html.erb2
-rw-r--r--app/views/issues/_edit.html.erb4
-rw-r--r--app/views/issues/_form.html.erb4
-rw-r--r--app/views/issues/_list.html.erb6
-rw-r--r--app/views/issues/_list_simple.html.erb2
-rw-r--r--app/views/issues/bulk_edit.html.erb2
-rw-r--r--app/views/issues/destroy.html.erb2
-rw-r--r--app/views/issues/index.html.erb4
-rw-r--r--app/views/issues/new.html.erb2
-rw-r--r--app/views/journals/_notes_form.html.erb2
-rw-r--r--app/views/layouts/base.html.erb12
-rw-r--r--app/views/messages/edit.html.erb12
-rw-r--r--app/views/messages/new.html.erb2
-rw-r--r--app/views/messages/show.html.erb2
-rw-r--r--app/views/my/account.html.erb2
-rw-r--r--app/views/my/destroy.html.erb2
-rw-r--r--app/views/my/page_layout.html.erb2
-rw-r--r--app/views/my/password.html.erb2
-rw-r--r--app/views/news/edit.html.erb2
-rw-r--r--app/views/news/index.html.erb2
-rw-r--r--app/views/news/new.html.erb2
-rw-r--r--app/views/news/show.html.erb4
-rw-r--r--app/views/projects/_edit.html.erb2
-rw-r--r--app/views/projects/copy.html.erb2
-rw-r--r--app/views/projects/destroy.html.erb2
-rw-r--r--app/views/projects/index.html.erb2
-rw-r--r--app/views/projects/new.html.erb2
-rw-r--r--app/views/projects/settings/_activities.html.erb4
-rw-r--r--app/views/projects/settings/_modules.html.erb2
-rw-r--r--app/views/projects/show.html.erb6
-rw-r--r--app/views/queries/_filters.html.erb2
-rw-r--r--app/views/queries/edit.html.erb2
-rw-r--r--app/views/queries/new.html.erb2
-rw-r--r--app/views/repositories/_navigation.html.erb2
-rw-r--r--app/views/repositories/_revisions.html.erb2
-rw-r--r--app/views/repositories/committers.html.erb2
-rw-r--r--app/views/repositories/diff.html.erb2
-rw-r--r--app/views/repositories/edit.html.erb2
-rw-r--r--app/views/repositories/new.html.erb2
-rw-r--r--app/views/repositories/revision.html.erb2
-rw-r--r--app/views/repositories/revisions.html.erb4
-rw-r--r--app/views/roles/edit.html.erb2
-rw-r--r--app/views/roles/new.html.erb2
-rw-r--r--app/views/roles/permissions.html.erb2
-rw-r--r--app/views/search/index.html.erb2
-rw-r--r--app/views/settings/_authentication.html.erb2
-rw-r--r--app/views/settings/_display.html.erb2
-rw-r--r--app/views/settings/_general.html.erb2
-rw-r--r--app/views/settings/_issues.html.erb2
-rw-r--r--app/views/settings/_mail_handler.html.erb2
-rw-r--r--app/views/settings/_notifications.html.erb2
-rw-r--r--app/views/settings/_projects.html.erb2
-rw-r--r--app/views/settings/_repositories.html.erb2
-rw-r--r--app/views/settings/plugin.html.erb2
-rw-r--r--app/views/timelog/_date_range.html.erb4
-rw-r--r--app/views/timelog/_list.html.erb2
-rw-r--r--app/views/timelog/bulk_edit.html.erb2
-rw-r--r--app/views/timelog/edit.html.erb2
-rw-r--r--app/views/timelog/index.html.erb2
-rw-r--r--app/views/timelog/new.html.erb2
-rw-r--r--app/views/timelog/report.html.erb4
-rw-r--r--app/views/trackers/edit.html.erb2
-rw-r--r--app/views/trackers/new.html.erb2
-rw-r--r--app/views/users/_general.html.erb2
-rw-r--r--app/views/users/_groups.html.erb2
-rw-r--r--app/views/users/_memberships.html.erb8
-rw-r--r--app/views/users/_preferences.html.erb2
-rw-r--r--app/views/users/index.html.erb2
-rw-r--r--app/views/users/new.html.erb2
-rw-r--r--app/views/versions/_issue_counts.html.erb2
-rw-r--r--app/views/versions/_new_modal.html.erb2
-rw-r--r--app/views/versions/edit.html.erb2
-rw-r--r--app/views/versions/index.html.erb4
-rw-r--r--app/views/versions/new.html.erb2
-rw-r--r--app/views/versions/show.html.erb2
-rw-r--r--app/views/watchers/_new.html.erb2
-rw-r--r--app/views/wiki/_sidebar.html.erb2
-rw-r--r--app/views/wiki/destroy.html.erb2
-rw-r--r--app/views/wiki/edit.html.erb6
-rw-r--r--app/views/wiki/history.html.erb4
-rw-r--r--app/views/wiki/rename.html.erb4
-rw-r--r--app/views/wiki/show.html.erb5
-rw-r--r--app/views/wikis/destroy.html.erb2
-rw-r--r--app/views/workflows/copy.html.erb2
-rw-r--r--app/views/workflows/edit.html.erb4
119 files changed, 166 insertions, 149 deletions
diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb
index fad59e9a4..99eda9242 100644
--- a/app/views/account/login.html.erb
+++ b/app/views/account/login.html.erb
@@ -1,6 +1,6 @@
<%= call_hook :view_account_login_top %>
<div id="login-form">
-<% form_tag({:action=> "login"}) do %>
+<%= form_tag({:action=> "login"}) do %>
<%= back_url_hidden_field_tag %>
<table>
<tr>
diff --git a/app/views/account/lost_password.html.erb b/app/views/account/lost_password.html.erb
index 420e8f9b1..44f851475 100644
--- a/app/views/account/lost_password.html.erb
+++ b/app/views/account/lost_password.html.erb
@@ -1,7 +1,7 @@
<h2><%=l(:label_password_lost)%></h2>
<div class="box">
-<% form_tag({:action=> "lost_password"}, :class => "tabular") do %>
+<%= form_tag({:action=> "lost_password"}, :class => "tabular") do %>
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
<%= text_field_tag 'mail', nil, :size => 40 %>
diff --git a/app/views/account/password_recovery.html.erb b/app/views/account/password_recovery.html.erb
index 72310aefc..53c635050 100644
--- a/app/views/account/password_recovery.html.erb
+++ b/app/views/account/password_recovery.html.erb
@@ -2,7 +2,7 @@
<%= error_messages_for 'user' %>
-<% form_tag({:token => @token.value}) do %>
+<%= form_tag({:token => @token.value}) do %>
<div class="box tabular">
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
<%= password_field_tag 'new_password', nil, :size => 25 %>
diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb
index adb436326..7e44e123b 100644
--- a/app/views/account/register.html.erb
+++ b/app/views/account/register.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h2>
-<% labelled_form_for @user, :url => {:action => 'register'} do |f| %>
+<%= labelled_form_for @user, :url => {:action => 'register'} do |f| %>
<%= error_messages_for 'user' %>
<div class="box tabular">
diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb
index 81916e5e1..e2f15d109 100644
--- a/app/views/activities/index.html.erb
+++ b/app/views/activities/index.html.erb
@@ -40,7 +40,7 @@
<% end %>
<% content_for :sidebar do %>
-<% form_tag({}, :method => :get) do %>
+<%= form_tag({}, :method => :get) do %>
<h3><%= l(:label_activity) %></h3>
<p><% @activity.event_types.each do |t| %>
<%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
diff --git a/app/views/admin/_no_data.html.erb b/app/views/admin/_no_data.html.erb
index 5d52dc059..8ad39b197 100644
--- a/app/views/admin/_no_data.html.erb
+++ b/app/views/admin/_no_data.html.erb
@@ -1,5 +1,5 @@
<div class="nodata">
-<% form_tag({:action => 'default_configuration'}) do %>
+<%= form_tag({:action => 'default_configuration'}) do %>
<%= simple_format(l(:text_no_configuration_data)) %>
<p><%= l(:field_language) %>:
<%= select_tag 'lang', options_for_select(lang_options_for_select(false), current_language.to_s) %>
diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb
index 33d1d8818..6525f8ea5 100644
--- a/app/views/admin/projects.html.erb
+++ b/app/views/admin/projects.html.erb
@@ -4,7 +4,7 @@
<h2><%=l(:label_project_plural)%></h2>
-<% form_tag({}, :method => :get) do %>
+<%= form_tag({}, :method => :get) do %>
<fieldset><legend><%= l(:label_filter_plural) %></legend>
<label for='status'><%= l(:field_status) %> :</label>
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
diff --git a/app/views/attachments/diff.html.erb b/app/views/attachments/diff.html.erb
index fa4e182fc..5359d4eea 100644
--- a/app/views/attachments/diff.html.erb
+++ b/app/views/attachments/diff.html.erb
@@ -7,7 +7,7 @@
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p>
</div>
<p>
-<% form_tag({}, :method => 'get') do %>
+<%= form_tag({}, :method => 'get') do %>
<label><%= l(:label_view_diff) %></label>
<%= select_tag 'type',
options_for_select(
diff --git a/app/views/auth_sources/edit.html.erb b/app/views/auth_sources/edit.html.erb
index f2d76002c..1673d8336 100644
--- a/app/views/auth_sources/edit.html.erb
+++ b/app/views/auth_sources/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_auth_source)%> (<%= h(@auth_source.auth_method_name) %>)</h2>
-<% form_tag({:action => 'update', :id => @auth_source}, :method => :put, :class => "tabular") do %>
+<%= form_tag({:action => 'update', :id => @auth_source}, :method => :put, :class => "tabular") do %>
<%= render :partial => auth_source_partial_name(@auth_source) %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/auth_sources/new.html.erb b/app/views/auth_sources/new.html.erb
index e5b9106bd..b585c0aa0 100644
--- a/app/views/auth_sources/new.html.erb
+++ b/app/views/auth_sources/new.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_auth_source_new)%> (<%= h(@auth_source.auth_method_name) %>)</h2>
-<% form_tag({:action => 'create'}, :class => "tabular") do %>
+<%= form_tag({:action => 'create'}, :class => "tabular") do %>
<%= hidden_field_tag 'type', @auth_source.type %>
<%= render :partial => auth_source_partial_name(@auth_source) %>
<%= submit_tag l(:button_create) %>
diff --git a/app/views/boards/edit.html.erb b/app/views/boards/edit.html.erb
index 9e94c25cd..e57509eab 100644
--- a/app/views/boards/edit.html.erb
+++ b/app/views/boards/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(:label_board) %></h2>
-<% labelled_form_for @board, :url => project_board_path(@project, @board) do |f| %>
+<%= labelled_form_for @board, :url => project_board_path(@project, @board) do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/boards/new.html.erb b/app/views/boards/new.html.erb
index 68eb1a33c..acdf43fcf 100644
--- a/app/views/boards/new.html.erb
+++ b/app/views/boards/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(:label_board_new) %></h2>
-<% labelled_form_for @board, :url => project_boards_path(@project) do |f| %>
+<%= labelled_form_for @board, :url => project_boards_path(@project) do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
<% end %>
diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb
index 6441c5ce3..523dfea45 100644
--- a/app/views/boards/show.html.erb
+++ b/app/views/boards/show.html.erb
@@ -11,7 +11,7 @@
<div id="add-message" style="display:none;">
<% if authorize_for('messages', 'new') %>
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%= l(:label_message_new) %></h2>
-<% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
+<%= form_for @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<p><%= submit_tag l(:button_create) %>
<%= link_to_remote l(:label_preview),
diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb
index 803a17357..ab5590129 100644
--- a/app/views/calendars/show.html.erb
+++ b/app/views/calendars/show.html.erb
@@ -1,6 +1,7 @@
<h2><%= @query.new_record? ? l(:label_calendar) : h(@query.name) %></h2>
-<% form_tag({:controller => 'calendars', :action => 'show', :project_id => @project}, :method => :get, :id => 'query_form') do %>
+<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
+ :method => :get, :id => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
diff --git a/app/views/common/feed.atom.builder b/app/views/common/feed.atom.builder
index d76f0acd1..70dacc75a 100644
--- a/app/views/common/feed.atom.builder
+++ b/app/views/common/feed.atom.builder
@@ -1,8 +1,8 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.title truncate_single_line(@title, :length => 100)
- xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false, :escape => false))
- xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil, :escape => false))
+ xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
+ xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
xml.id url_for(:controller => 'welcome', :only_path => false)
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
xml.author { xml.name "#{Setting.app_title}" }
diff --git a/app/views/custom_fields/edit.html.erb b/app/views/custom_fields/edit.html.erb
index 62672ab20..dce34736f 100644
--- a/app/views/custom_fields/edit.html.erb
+++ b/app/views/custom_fields/edit.html.erb
@@ -2,7 +2,7 @@
&#187; <%= link_to l(@custom_field.type_name), :controller => 'custom_fields', :action => 'index', :tab => @custom_field.class.name %>
&#187; <%=h @custom_field.name %></h2>
-<% labelled_form_for :custom_field, @custom_field, :url => custom_field_path(@custom_field), :html => {:method => :put} do |f| %>
+<%= labelled_form_for :custom_field, @custom_field, :url => custom_field_path(@custom_field), :html => {:method => :put} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/custom_fields/new.html.erb b/app/views/custom_fields/new.html.erb
index 4fcd160e4..cde4fab58 100644
--- a/app/views/custom_fields/new.html.erb
+++ b/app/views/custom_fields/new.html.erb
@@ -2,7 +2,7 @@
&#187; <%= link_to l(@custom_field.type_name), :controller => 'custom_fields', :action => 'index', :tab => @custom_field.class.name %>
&#187; <%= l(:label_custom_field_new) %></h2>
-<% labelled_form_for :custom_field, @custom_field, :url => custom_fields_path do |f| %>
+<%= labelled_form_for :custom_field, @custom_field, :url => custom_fields_path do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= hidden_field_tag 'type', @custom_field.type %>
<%= submit_tag l(:button_save) %>
diff --git a/app/views/documents/edit.html.erb b/app/views/documents/edit.html.erb
index 04e9b72e1..15491168d 100644
--- a/app/views/documents/edit.html.erb
+++ b/app/views/documents/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_document)%></h2>
-<% labelled_form_for @document do |f| %>
+<%= labelled_form_for @document do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<p><%= submit_tag l(:button_save) %></p>
<% end %>
diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb
index d3658dac6..fd47c3842 100644
--- a/app/views/documents/index.html.erb
+++ b/app/views/documents/index.html.erb
@@ -5,7 +5,7 @@
<div id="add-document" style="display:none;">
<h2><%=l(:label_document_new)%></h2>
-<% labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
+<%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<p>
<%= submit_tag l(:button_create) %>
diff --git a/app/views/documents/new.html.erb b/app/views/documents/new.html.erb
index 772093e31..a34391e31 100644
--- a/app/views/documents/new.html.erb
+++ b/app/views/documents/new.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_document_new)%></h2>
-<% labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
+<%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<p><%= submit_tag l(:button_create) %></p>
<% end %>
diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb
index fded30052..f65d5ae88 100644
--- a/app/views/documents/show.html.erb
+++ b/app/views/documents/show.html.erb
@@ -19,7 +19,7 @@
<% if authorize_for('documents', 'add_attachment') %>
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
:id => 'attach_files_link' %></p>
- <% form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
+ <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
<div class="box">
<p><%= render :partial => 'attachments/form' %></p>
</div>
diff --git a/app/views/enumerations/destroy.html.erb b/app/views/enumerations/destroy.html.erb
index 4fca33d4a..02e66bd9f 100644
--- a/app/views/enumerations/destroy.html.erb
+++ b/app/views/enumerations/destroy.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(@enumeration.option_name) %>: <%=h @enumeration %></h2>
-<% form_tag({}, :method => :delete) do %>
+<%= form_tag({}, :method => :delete) do %>
<div class="box">
<p><strong><%= l(:text_enumeration_destroy_question, @enumeration.objects_count) %></strong></p>
<p><label for='reassign_to_id'><%= l(:text_enumeration_category_reassign_to) %></label>
diff --git a/app/views/enumerations/edit.html.erb b/app/views/enumerations/edit.html.erb
index c46a7606f..e5c523390 100644
--- a/app/views/enumerations/edit.html.erb
+++ b/app/views/enumerations/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(@enumeration.option_name), enumerations_path %> &#187; <%=h @enumeration %></h2>
-<% labelled_form_for :enumeration, @enumeration, :url => enumeration_path(@enumeration), :html => {:method => :put} do |f| %>
+<%= labelled_form_for :enumeration, @enumeration, :url => enumeration_path(@enumeration), :html => {:method => :put} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/enumerations/new.html.erb b/app/views/enumerations/new.html.erb
index f0e6bd343..dfbd99f52 100644
--- a/app/views/enumerations/new.html.erb
+++ b/app/views/enumerations/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(@enumeration.option_name), enumerations_path %> &#187; <%=l(:label_enumeration_new)%></h2>
-<% labelled_form_for :enumeration, @enumeration, :url => enumerations_path do |f| %>
+<%= labelled_form_for :enumeration, @enumeration, :url => enumerations_path do |f| %>
<%= f.hidden_field :type %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
diff --git a/app/views/files/new.html.erb b/app/views/files/new.html.erb
index 544bd333b..ab38b4472 100644
--- a/app/views/files/new.html.erb
+++ b/app/views/files/new.html.erb
@@ -1,7 +1,7 @@
<h2><%=l(:label_attachment_new)%></h2>
<%= error_messages_for 'attachment' %>
-<% form_tag(project_files_path(@project), :multipart => true, :class => "tabular") do %>
+<%= form_tag(project_files_path(@project), :multipart => true, :class => "tabular") do %>
<div class="box">
<% if @versions.any? %>
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 0b4af3523..aeeb127e4 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -1,7 +1,10 @@
<% @gantt.view = self %>
<h2><%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
-<% form_tag({:controller => 'gantts', :action => 'show', :project_id => @project, :month => params[:month], :year => params[:year], :months => params[:months]}, :method => :get, :id => 'query_form') do %>
+<%= form_tag({:controller => 'gantts', :action => 'show',
+ :project_id => @project, :month => params[:month],
+ :year => params[:year], :months => params[:months]},
+ :method => :get, :id => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
diff --git a/app/views/groups/_general.html.erb b/app/views/groups/_general.html.erb
index a9d05b7ca..8c720c3ee 100644
--- a/app/views/groups/_general.html.erb
+++ b/app/views/groups/_general.html.erb
@@ -1,4 +1,4 @@
-<% labelled_form_for @group do |f| %>
+<%= labelled_form_for @group do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/groups/_memberships.html.erb b/app/views/groups/_memberships.html.erb
index 9346e1021..79b990c84 100644
--- a/app/views/groups/_memberships.html.erb
+++ b/app/views/groups/_memberships.html.erb
@@ -16,8 +16,9 @@
<td class="project"><%=h membership.project %></td>
<td class="roles">
<span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span>
- <% remote_form_for(:membership, :url => { :action => 'edit_membership', :id => @group, :membership_id => membership },
- :html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
+ <%= form_for(:membership, :remote => true,
+ :url => { :action => 'edit_membership', :id => @group, :membership_id => membership },
+ :html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
<p><% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role) %> <%=h role %></label><br />
<% end %></p>
@@ -55,7 +56,7 @@
<div class="splitcontentright">
<% if projects.any? %>
<fieldset><legend><%=l(:label_project_new)%></legend>
-<% remote_form_for(:membership, :url => { :action => 'edit_membership', :id => @group }) do %>
+<%= form_for(:membership, :remote => true, :url => { :action => 'edit_membership', :id => @group }) do %>
<%= label_tag "membership_project_id", l(:description_choose_project), :class => "hidden-for-sighted" %>
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@group, projects) %>
<p><%= l(:label_role_plural) %>:
diff --git a/app/views/groups/_users.html.erb b/app/views/groups/_users.html.erb
index d265c751f..5d10fe694 100644
--- a/app/views/groups/_users.html.erb
+++ b/app/views/groups/_users.html.erb
@@ -29,7 +29,8 @@
<div class="splitcontentright">
<% users = User.active.not_in_group(@group).all(:limit => 100) %>
<% if users.any? %>
- <% remote_form_for(@group, :url => group_users_path(@group), :html => {:method => :post}) do |f| %>
+ <%= form_for(@group, :remote => true, :url => group_users_path(@group),
+ :html => {:method => :post}) do |f| %>
<fieldset><legend><%=l(:label_user_new)%></legend>
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
diff --git a/app/views/groups/new.html.erb b/app/views/groups/new.html.erb
index a4426f2d1..f47034588 100644
--- a/app/views/groups/new.html.erb
+++ b/app/views/groups/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_group_plural), groups_path %> &#187; <%= l(:label_group_new) %></h2>
-<% labelled_form_for @group do |f| %>
+<%= labelled_form_for @group do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<p>
<%= f.submit l(:button_create) %>
diff --git a/app/views/issue_categories/destroy.html.erb b/app/views/issue_categories/destroy.html.erb
index 882a75e4a..5f13eedcf 100644
--- a/app/views/issue_categories/destroy.html.erb
+++ b/app/views/issue_categories/destroy.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_issue_category)%>: <%=h @category.name %></h2>
-<% form_tag(issue_category_path(@category), :method => :delete) do %>
+<%= form_tag(issue_category_path(@category), :method => :delete) do %>
<div class="box">
<p><strong><%= l(:text_issue_category_destroy_question, @issue_count) %></strong></p>
<p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_issue_category_destroy_assignments) %></label><br />
diff --git a/app/views/issue_statuses/edit.html.erb b/app/views/issue_statuses/edit.html.erb
index 584fe06a9..d52d61bd2 100644
--- a/app/views/issue_statuses/edit.html.erb
+++ b/app/views/issue_statuses/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_issue_status_plural), issue_statuses_path %> &#187; <%=h @issue_status %></h2>
-<% labelled_form_for @issue_status do |f| %>
+<%= labelled_form_for @issue_status do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/issue_statuses/new.html.erb b/app/views/issue_statuses/new.html.erb
index 6ab77b214..c9e60abcd 100644
--- a/app/views/issue_statuses/new.html.erb
+++ b/app/views/issue_statuses/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_issue_status_plural), issue_statuses_path %> &#187; <%=l(:label_issue_status_new)%></h2>
-<% labelled_form_for @issue_status do |f| %>
+<%= labelled_form_for @issue_status do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
<% end %>
diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb
index c643934d1..4d0503117 100644
--- a/app/views/issues/_action_menu.html.erb
+++ b/app/views/issues/_action_menu.html.erb
@@ -1,6 +1,6 @@
<div class="contextual">
<%= link_to_if_authorized(l(:button_update), {:controller => 'issues', :action => 'edit', :id => @issue }, :onclick => 'showAndScrollTo("update", "notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
-<%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'new', :issue_id => @issue}, :class => 'icon icon-time-add' %>
+<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
<%= watcher_tag(@issue, User.current) %>
<%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue}, :class => 'icon icon-copy' %>
<%= link_to l(:button_delete), issue_path(@issue), :confirm => issues_destroy_confirmation_message(@issue), :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
index 7ac662e13..c65735ae4 100644
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -1,4 +1,4 @@
-<% labelled_fields_for :issue, @issue do |f| %>
+<%= labelled_fields_for :issue, @issue do |f| %>
<div class="splitcontent">
<div class="splitcontentleft">
diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb
index 690fa9386..b5ddfac38 100644
--- a/app/views/issues/_edit.html.erb
+++ b/app/views/issues/_edit.html.erb
@@ -1,4 +1,4 @@
-<% labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
+<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
<%= error_messages_for 'issue', 'time_entry' %>
<%= render :partial => 'conflict' if @conflict %>
<div class="box">
@@ -11,7 +11,7 @@
<% end %>
<% if User.current.allowed_to?(:log_time, @project) %>
<fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
- <% labelled_fields_for :time_entry, @time_entry do |time_entry| %>
+ <%= labelled_fields_for :time_entry, @time_entry do |time_entry| %>
<div class="splitcontentleft">
<p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
</div>
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index 6634723f7..9bc362377 100644
--- a/app/views/issues/_form.html.erb
+++ b/app/views/issues/_form.html.erb
@@ -1,4 +1,4 @@
-<% labelled_fields_for :issue, @issue do |f| %>
+<%= labelled_fields_for :issue, @issue do |f| %>
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
<% if @issue.safe_attribute? 'is_private' %>
@@ -28,7 +28,7 @@
<label><%= l(:field_description) %></label>
<%= link_to_function image_tag('edit.png'),
'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %>
- <% content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
+ <%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
<%= f.text_area :description,
:cols => 60,
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index f5b5bc1bb..62cf4e443 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({}) do -%>
+<%= form_tag({}) do -%>
<%= hidden_field_tag 'back_url', url_for(params), :id => nil %>
<div class="autoscroll">
<table class="list issues">
@@ -27,8 +27,8 @@
<% end %>
<tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
- <td class="id"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
- <% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.css_classes %><% end %>
+ <td class="id"><%= link_to issue.id, issue_path(issue) %></td>
+ <%= raw query.columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, issue)}</td>"}.join %>
</tr>
<% end -%>
</tbody>
diff --git a/app/views/issues/_list_simple.html.erb b/app/views/issues/_list_simple.html.erb
index fcbd9d3fe..ae34000f1 100644
--- a/app/views/issues/_list_simple.html.erb
+++ b/app/views/issues/_list_simple.html.erb
@@ -1,5 +1,5 @@
<% if issues && issues.any? %>
-<% form_tag({}) do %>
+<%= form_tag({}) do %>
<table class="list issues">
<thead><tr>
<th>#</th>
diff --git a/app/views/issues/bulk_edit.html.erb b/app/views/issues/bulk_edit.html.erb
index e81676ada..946b5255b 100644
--- a/app/views/issues/bulk_edit.html.erb
+++ b/app/views/issues/bulk_edit.html.erb
@@ -7,7 +7,7 @@
) + h(": #{i.subject}"))
}.join("\n").html_safe %></ul>
-<% form_tag({:action => 'bulk_update'}, :id => 'bulk_edit_form') do %>
+<%= form_tag({:action => 'bulk_update'}, :id => 'bulk_edit_form') do %>
<%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join("\n").html_safe %>
<div class="box tabular">
<fieldset class="attributes">
diff --git a/app/views/issues/destroy.html.erb b/app/views/issues/destroy.html.erb
index 3491c78eb..a8ca78826 100644
--- a/app/views/issues/destroy.html.erb
+++ b/app/views/issues/destroy.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(:label_confirmation) %></h2>
-<% form_tag({}, :method => :delete) do %>
+<%= form_tag({}, :method => :delete) do %>
<%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join("\n").html_safe %>
<div class="box">
<p><strong><%= l(:text_destroy_time_entries_question, :hours => number_with_precision(@hours, :precision => 2)) %></strong></p>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index e3e256dee..ac9da57dc 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -9,7 +9,7 @@
<h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2>
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
-<% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project },
+<%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project },
:method => :get, :id => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<div id="query_form_content" class="hide-when-print">
@@ -68,7 +68,7 @@
<div id="csv-export-options" style="display:none;">
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
- <% form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %>
+ <%= form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %>
<p>
<label><%= radio_button_tag 'columns', '', true %> <%= l(:description_selected_columns) %></label><br />
<label><%= radio_button_tag 'columns', 'all' %> <%= l(:description_all_columns) %></label>
diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb
index 400423317..4e8449570 100644
--- a/app/views/issues/new.html.erb
+++ b/app/views/issues/new.html.erb
@@ -2,7 +2,7 @@
<%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
-<% labelled_form_for @issue, :url => project_issues_path(@project),
+<%= labelled_form_for @issue, :url => project_issues_path(@project),
:html => {:id => 'issue-form', :multipart => true} do |f| %>
<%= error_messages_for 'issue' %>
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
diff --git a/app/views/journals/_notes_form.html.erb b/app/views/journals/_notes_form.html.erb
index f1311ac3b..f451dbbeb 100644
--- a/app/views/journals/_notes_form.html.erb
+++ b/app/views/journals/_notes_form.html.erb
@@ -1,4 +1,4 @@
-<% form_remote_tag(:url => {}, :html => { :id => "journal-#{@journal.id}-form" }) do %>
+<%= form_remote_tag(:url => {}, :html => { :id => "journal-#{@journal.id}-form" }) do %>
<%= label_tag "notes", l(:description_notes), :class => "hidden-for-sighted" %>
<%= text_area_tag :notes, @journal.notes,
:id => "journal_#{@journal.id}_notes",
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index 1a7c3c816..68b175848 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -29,17 +29,14 @@
<div id="account">
<%= render_menu :account_menu -%>
</div>
- <%= content_tag(
- 'div',
- "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe,
- :id => 'loggedas') if User.current.logged? %>
+ <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
</div>
<div id="header">
<% if User.current.logged? || !Setting.login_required? %>
<div id="quick-search">
- <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
+ <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
<%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
<label for='q'>
<%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>:
@@ -59,10 +56,13 @@
<% end %>
</div>
+<% content_for :sidebar do %>
+ <%= call_hook :view_layouts_base_sidebar %>
+<% end %>
+
<%= tag('div', {:id => 'main', :class => (has_content?(:sidebar) ? '' : 'nosidebar')}, true) %>
<div id="sidebar">
<%= yield :sidebar %>
- <%= call_hook :view_layouts_base_sidebar %>
</div>
<div id="content">
diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb
index 054297cee..362f1b6b9 100644
--- a/app/views/messages/edit.html.erb
+++ b/app/views/messages/edit.html.erb
@@ -2,11 +2,13 @@
:action => 'show', :project_id => @project,
:id => @board %> &#187; <%= h @message.subject %></h2>
-<% form_for :message, @message,
- :url => {:action => 'edit'},
- :html => {:multipart => true,
- :id => 'message-form',
- :method => :post} do |f| %>
+<%= form_for @message, {
+ :as => :message,
+ :url => {:action => 'edit'},
+ :html => {:multipart => true,
+ :id => 'message-form',
+ :method => :post}
+ } do |f| %>
<%= render :partial => 'form',
:locals => {:f => f, :replying => !@message.parent.nil?} %>
<%= submit_tag l(:button_save) %>
diff --git a/app/views/messages/new.html.erb b/app/views/messages/new.html.erb
index f41e27079..f1dddb6f5 100644
--- a/app/views/messages/new.html.erb
+++ b/app/views/messages/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%= l(:label_message_new) %></h2>
-<% form_for :message, @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
+<%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
<%= link_to_remote l(:label_preview),
diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb
index 9edc8451f..d0857cf46 100644
--- a/app/views/messages/show.html.erb
+++ b/app/views/messages/show.html.erb
@@ -72,7 +72,7 @@
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
<div id="reply" style="display:none;">
-<% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
+<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
<%= submit_tag l(:button_submit) %>
<%= link_to_remote l(:label_preview),
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 9d6910bce..47e945949 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -6,7 +6,7 @@
<h2><%=l(:label_my_account)%></h2>
<%= error_messages_for 'user' %>
-<% labelled_form_for :user, @user,
+<%= labelled_form_for :user, @user,
:url => { :action => "account" },
:html => { :id => 'my_account_form',
:method => :post } do |f| %>
diff --git a/app/views/my/destroy.html.erb b/app/views/my/destroy.html.erb
index 5d6eaa004..68691412b 100644
--- a/app/views/my/destroy.html.erb
+++ b/app/views/my/destroy.html.erb
@@ -2,7 +2,7 @@
<div class="warning">
<p><%= simple_format l(:text_account_destroy_confirmation)%></p>
<p>
- <% form_tag({}) do %>
+ <%= form_tag({}) do %>
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete_my_account) %> |
<%= link_to l(:button_cancel), :action => 'account' %>
diff --git a/app/views/my/page_layout.html.erb b/app/views/my/page_layout.html.erb
index 67edb9f28..0025186d9 100644
--- a/app/views/my/page_layout.html.erb
+++ b/app/views/my/page_layout.html.erb
@@ -35,7 +35,7 @@ function removeBlock(block) {
</script>
<div class="contextual">
-<% form_tag({:action => "add_block"}, :id => "block-form") do %>
+<%= form_tag({:action => "add_block"}, :id => "block-form") do %>
<%= label_tag('block-select', l(:label_my_page_block)) %>:
<%= select_tag 'block',
"<option></option>".html_safe + options_for_select(@block_options),
diff --git a/app/views/my/password.html.erb b/app/views/my/password.html.erb
index 61d5c56ca..de9a459e4 100644
--- a/app/views/my/password.html.erb
+++ b/app/views/my/password.html.erb
@@ -2,7 +2,7 @@
<%= error_messages_for 'user' %>
-<% form_tag({}, :class => "tabular") do %>
+<%= form_tag({}, :class => "tabular") do %>
<div class="box">
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
<%= password_field_tag 'password', nil, :size => 25 %></p>
diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb
index f00a024c1..5dd43c3ce 100644
--- a/app/views/news/edit.html.erb
+++ b/app/views/news/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_news)%></h2>
-<% labelled_form_for @news, :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
+<%= labelled_form_for @news, :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<%= link_to_remote l(:label_preview),
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb
index b839b5f44..b354adcb8 100644
--- a/app/views/news/index.html.erb
+++ b/app/views/news/index.html.erb
@@ -7,7 +7,7 @@
<div id="add-news" style="display:none;">
<h2><%=l(:label_news_new)%></h2>
-<% labelled_form_for @news, :url => project_news_index_path(@project),
+<%= labelled_form_for @news, :url => project_news_index_path(@project),
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
diff --git a/app/views/news/new.html.erb b/app/views/news/new.html.erb
index 1c55215b7..95a902432 100644
--- a/app/views/news/new.html.erb
+++ b/app/views/news/new.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_news_new)%></h2>
-<% labelled_form_for @news, :url => project_news_index_path(@project),
+<%= labelled_form_for @news, :url => project_news_index_path(@project),
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb
index b0b5f023e..cb332f88c 100644
--- a/app/views/news/show.html.erb
+++ b/app/views/news/show.html.erb
@@ -16,7 +16,7 @@
<% if authorize_for('news', 'edit') %>
<div id="edit-news" style="display:none;">
-<% labelled_form_for :news, @news, :url => news_path(@news),
+<%= labelled_form_for :news, @news, :url => news_path(@news),
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
@@ -55,7 +55,7 @@
<% if @news.commentable? %>
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
-<% form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
+<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
<div class="box">
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'comment_comments' %>
diff --git a/app/views/projects/_edit.html.erb b/app/views/projects/_edit.html.erb
index e52baa116..211762903 100644
--- a/app/views/projects/_edit.html.erb
+++ b/app/views/projects/_edit.html.erb
@@ -1,4 +1,4 @@
-<% labelled_form_for @project do |f| %>
+<%= labelled_form_for @project do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/projects/copy.html.erb b/app/views/projects/copy.html.erb
index 66f6d3353..26ec2e5a6 100644
--- a/app/views/projects/copy.html.erb
+++ b/app/views/projects/copy.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_project_new)%></h2>
-<% labelled_form_for @project, :url => { :action => "copy" } do |f| %>
+<%= labelled_form_for @project, :url => { :action => "copy" } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<fieldset class="box tabular"><legend><%= l(:button_copy) %></legend>
diff --git a/app/views/projects/destroy.html.erb b/app/views/projects/destroy.html.erb
index 23844ec67..d4348b040 100644
--- a/app/views/projects/destroy.html.erb
+++ b/app/views/projects/destroy.html.erb
@@ -8,7 +8,7 @@
<% end %>
</p>
<p>
- <% form_tag(project_path(@project_to_destroy), :method => :delete) do %>
+ <%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete) %>
<% end %>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index b7cd8e6e8..42b400ff7 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -4,7 +4,7 @@
<div class="contextual">
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
- <%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
+ <%= link_to(l(:label_issue_view_all), issues_path) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
<%= link_to(l(:label_overall_spent_time), time_entries_path) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
<%= link_to l(:label_overall_activity),
{ :controller => 'activities', :action => 'index',
diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb
index deca4e344..062073c5d 100644
--- a/app/views/projects/new.html.erb
+++ b/app/views/projects/new.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_project_new)%></h2>
-<% labelled_form_for @project do |f| %>
+<%= labelled_form_for @project do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
diff --git a/app/views/projects/settings/_activities.html.erb b/app/views/projects/settings/_activities.html.erb
index 296737dd5..0331cc8ac 100644
--- a/app/views/projects/settings/_activities.html.erb
+++ b/app/views/projects/settings/_activities.html.erb
@@ -1,4 +1,4 @@
-<% form_tag(project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
+<%= form_tag(project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
<table class="list">
<thead><tr>
@@ -11,7 +11,7 @@
</tr></thead>
<% @project.activities(true).each do |enumeration| %>
- <% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
+ <%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
<tr class="<%= cycle('odd', 'even') %>">
<td>
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
diff --git a/app/views/projects/settings/_modules.html.erb b/app/views/projects/settings/_modules.html.erb
index 437ea5e2e..e955d63f0 100644
--- a/app/views/projects/settings/_modules.html.erb
+++ b/app/views/projects/settings/_modules.html.erb
@@ -1,4 +1,4 @@
-<% form_for :project, @project,
+<%= form_for @project,
:url => { :action => 'modules', :id => @project },
:html => {:id => 'modules-form',
:method => :post} do |f| %>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 5371bc4c8..4963ebbe4 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -12,7 +12,7 @@
</div>
<ul>
<% unless @project.homepage.blank? %>
- <li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)).html_safe %></li>
+ <li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li>
<% end %>
<% if @subprojects.any? %>
<li><%=l(:label_subproject_plural)%>:
@@ -69,8 +69,8 @@
<% if @total_hours.present? %>
<h3><%= l(:label_spent_time) %></h3>
<p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
- <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> |
- <%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %></p>
+ <p><%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
+ <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
<% end %>
<%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
<% end %>
diff --git a/app/views/queries/_filters.html.erb b/app/views/queries/_filters.html.erb
index ff84d8544..5bc6af2f3 100644
--- a/app/views/queries/_filters.html.erb
+++ b/app/views/queries/_filters.html.erb
@@ -5,7 +5,7 @@
<% query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %>
<% field = filter[0]
options = filter[1] %>
- <tr <%= 'style="display:none;"' unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter">
+ <tr <%= 'style="display:none;"'.html_safe unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter">
<td class="field">
<%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %>
<label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label>
diff --git a/app/views/queries/edit.html.erb b/app/views/queries/edit.html.erb
index 610ae01c3..a1534f82d 100644
--- a/app/views/queries/edit.html.erb
+++ b/app/views/queries/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(:label_query) %></h2>
-<% form_tag(query_path(@query), :onsubmit => 'selectAllOptions("selected_columns");', :method => :put) do %>
+<%= form_tag(query_path(@query), :onsubmit => 'selectAllOptions("selected_columns");', :method => :put) do %>
<%= render :partial => 'form', :locals => {:query => @query} %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/queries/new.html.erb b/app/views/queries/new.html.erb
index 2ec7f6600..7081eee24 100644
--- a/app/views/queries/new.html.erb
+++ b/app/views/queries/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(:label_query_new) %></h2>
-<% form_tag(@project ? project_queries_path : queries_path, :onsubmit => 'selectAllOptions("selected_columns");') do %>
+<%= form_tag(@project ? project_queries_path(@project) : queries_path, :onsubmit => 'selectAllOptions("selected_columns");') do %>
<%= render :partial => 'form', :locals => {:query => @query} %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb
index ba38fed1a..a42daa8f5 100644
--- a/app/views/repositories/_navigation.html.erb
+++ b/app/views/repositories/_navigation.html.erb
@@ -6,7 +6,7 @@
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
:class => 'icon icon-stats' if @repository.supports_all_revisions? %>
-<% form_tag({:action => controller.action_name,
+<%= form_tag({:action => controller.action_name,
:id => @project,
:repository_id => @repository.identifier_param,
:path => to_path_param(@path),
diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb
index e4a77388e..d3059520b 100644
--- a/app/views/repositories/_revisions.html.erb
+++ b/app/views/repositories/_revisions.html.erb
@@ -14,7 +14,7 @@
:space => graph_space
}
end %>
-<% form_tag(
+<%= form_tag(
{:controller => 'repositories', :action => 'diff', :id => project,
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
:method => :get
diff --git a/app/views/repositories/committers.html.erb b/app/views/repositories/committers.html.erb
index f408d5382..a5426dfee 100644
--- a/app/views/repositories/committers.html.erb
+++ b/app/views/repositories/committers.html.erb
@@ -6,7 +6,7 @@
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
-<% form_tag({}) do %>
+<%= form_tag({}) do %>
<table class="list">
<thead>
<tr>
diff --git a/app/views/repositories/diff.html.erb b/app/views/repositories/diff.html.erb
index 738b4810a..ecd19ccf8 100644
--- a/app/views/repositories/diff.html.erb
+++ b/app/views/repositories/diff.html.erb
@@ -1,7 +1,7 @@
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2>
<!-- Choose view type -->
-<% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
+<%= form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
<%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
<%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
<p>
diff --git a/app/views/repositories/edit.html.erb b/app/views/repositories/edit.html.erb
index 7a8d7d190..78105acaa 100644
--- a/app/views/repositories/edit.html.erb
+++ b/app/views/repositories/edit.html.erb
@@ -1,5 +1,5 @@
<h2><%= l(:label_repository) %></h2>
-<% labelled_form_for :repository, @repository, :url => repository_path(@path), :html => {:method => :put} do |f| %>
+<%= labelled_form_for :repository, @repository, :url => repository_path(@path), :html => {:method => :put} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
diff --git a/app/views/repositories/new.html.erb b/app/views/repositories/new.html.erb
index 996404229..9f40c542f 100644
--- a/app/views/repositories/new.html.erb
+++ b/app/views/repositories/new.html.erb
@@ -1,5 +1,5 @@
<h2><%= l(:label_repository_new) %></h2>
-<% labelled_form_for :repository, @repository, :url => project_repositories_path(@project) do |f| %>
+<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project) do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
diff --git a/app/views/repositories/revision.html.erb b/app/views/repositories/revision.html.erb
index 4e7ad4c2a..c1e2413e1 100644
--- a/app/views/repositories/revision.html.erb
+++ b/app/views/repositories/revision.html.erb
@@ -13,7 +13,7 @@
<% end -%>
&#187;&nbsp;
- <% form_tag({:controller => 'repositories',
+ <%= form_tag({:controller => 'repositories',
:action => 'revision',
:id => @project,
:repository_id => @repository.identifier_param,
diff --git a/app/views/repositories/revisions.html.erb b/app/views/repositories/revisions.html.erb
index e2878fb7b..0395e4b96 100644
--- a/app/views/repositories/revisions.html.erb
+++ b/app/views/repositories/revisions.html.erb
@@ -1,6 +1,6 @@
<div class="contextual">
-<% form_tag(
- {:action => 'revision', :id => @project,
+<%= form_tag(
+ {:controller => 'repositories', :action => 'revision', :id => @project,
:repository_id => @repository.identifier_param}
) do %>
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 8 %>
diff --git a/app/views/roles/edit.html.erb b/app/views/roles/edit.html.erb
index 3bb07c08f..7caca3002 100644
--- a/app/views/roles/edit.html.erb
+++ b/app/views/roles/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=h @role.name %></h2>
-<% labelled_form_for @role do |f| %>
+<%= labelled_form_for @role do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/roles/new.html.erb b/app/views/roles/new.html.erb
index 77f31a7c0..0e5dfeb9c 100644
--- a/app/views/roles/new.html.erb
+++ b/app/views/roles/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=l(:label_role_new)%></h2>
-<% labelled_form_for @role do |f| %>
+<%= labelled_form_for @role do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>
diff --git a/app/views/roles/permissions.html.erb b/app/views/roles/permissions.html.erb
index da8e1ad8b..af78715e0 100644
--- a/app/views/roles/permissions.html.erb
+++ b/app/views/roles/permissions.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=l(:label_permissions_report)%></h2>
-<% form_tag(permissions_roles_path, :id => 'permissions_form') do %>
+<%= form_tag(permissions_roles_path, :id => 'permissions_form') do %>
<%= hidden_field_tag 'permissions[0]', '', :id => nil %>
<div class="autoscroll">
<table class="list permissions">
diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb
index 7d24710bd..6c9c56f4c 100644
--- a/app/views/search/index.html.erb
+++ b/app/views/search/index.html.erb
@@ -1,7 +1,7 @@
<h2><%= l(:label_search) %></h2>
<div class="box">
-<% form_tag({}, :method => :get) do %>
+<%= form_tag({}, :method => :get) do %>
<%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>
<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
<%= javascript_tag "Field.focus('search-input')" %>
diff --git a/app/views/settings/_authentication.html.erb b/app/views/settings/_authentication.html.erb
index 14396e274..fe27e3d88 100644
--- a/app/views/settings/_authentication.html.erb
+++ b/app/views/settings/_authentication.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({:action => 'edit', :tab => 'authentication'}) do %>
+<%= form_tag({:action => 'edit', :tab => 'authentication'}) do %>
<div class="box tabular settings">
<p><%= setting_check_box :login_required %></p>
diff --git a/app/views/settings/_display.html.erb b/app/views/settings/_display.html.erb
index 25f65fc56..3299ff10b 100644
--- a/app/views/settings/_display.html.erb
+++ b/app/views/settings/_display.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({:action => 'edit', :tab => 'display'}) do %>
+<%= form_tag({:action => 'edit', :tab => 'display'}) do %>
<div class="box tabular settings">
<p><%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme %></p>
diff --git a/app/views/settings/_general.html.erb b/app/views/settings/_general.html.erb
index befec041c..4ec01995a 100644
--- a/app/views/settings/_general.html.erb
+++ b/app/views/settings/_general.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({:action => 'edit'}) do %>
+<%= form_tag({:action => 'edit'}) do %>
<div class="box tabular settings">
<p><%= setting_text_field :app_title, :size => 30 %></p>
diff --git a/app/views/settings/_issues.html.erb b/app/views/settings/_issues.html.erb
index 2ffa21113..429685638 100644
--- a/app/views/settings/_issues.html.erb
+++ b/app/views/settings/_issues.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({:action => 'edit', :tab => 'issues'}) do %>
+<%= form_tag({:action => 'edit', :tab => 'issues'}) do %>
<div class="box tabular settings">
<p><%= setting_check_box :cross_project_issue_relations %></p>
diff --git a/app/views/settings/_mail_handler.html.erb b/app/views/settings/_mail_handler.html.erb
index 3da977353..e4ddf5e99 100644
--- a/app/views/settings/_mail_handler.html.erb
+++ b/app/views/settings/_mail_handler.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({:action => 'edit', :tab => 'mail_handler'}) do %>
+<%= form_tag({:action => 'edit', :tab => 'mail_handler'}) do %>
<div class="box tabular settings">
<p>
diff --git a/app/views/settings/_notifications.html.erb b/app/views/settings/_notifications.html.erb
index 26c11ad9a..f746f7ced 100644
--- a/app/views/settings/_notifications.html.erb
+++ b/app/views/settings/_notifications.html.erb
@@ -1,5 +1,5 @@
<% if @deliveries %>
-<% form_tag({:action => 'edit', :tab => 'notifications'}) do %>
+<%= form_tag({:action => 'edit', :tab => 'notifications'}) do %>
<div class="box tabular settings">
<p><%= setting_text_field :mail_from, :size => 60 %></p>
diff --git a/app/views/settings/_projects.html.erb b/app/views/settings/_projects.html.erb
index f61a0055d..90db6b1ce 100644
--- a/app/views/settings/_projects.html.erb
+++ b/app/views/settings/_projects.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({:action => 'edit', :tab => 'projects'}) do %>
+<%= form_tag({:action => 'edit', :tab => 'projects'}) do %>
<div class="box tabular settings">
<p><%= setting_check_box :default_projects_public %></p>
diff --git a/app/views/settings/_repositories.html.erb b/app/views/settings/_repositories.html.erb
index 9593a14c4..d63c1db45 100644
--- a/app/views/settings/_repositories.html.erb
+++ b/app/views/settings/_repositories.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
+<%= form_tag({:action => 'edit', :tab => 'repositories'}) do %>
<fieldset class="box settings enabled_scm">
<%= hidden_field_tag 'settings[enabled_scm][]', '' %>
diff --git a/app/views/settings/plugin.html.erb b/app/views/settings/plugin.html.erb
index 61913484d..155f80c22 100644
--- a/app/views/settings/plugin.html.erb
+++ b/app/views/settings/plugin.html.erb
@@ -1,7 +1,7 @@
<h2><%= l(:label_settings) %>: <%=h @plugin.name %></h2>
<div id="settings">
-<% form_tag({:action => 'plugin'}) do %>
+<%= form_tag({:action => 'plugin'}) do %>
<div class="box tabular">
<%= render :partial => @partial, :locals => {:settings => @settings}%>
</div>
diff --git a/app/views/timelog/_date_range.html.erb b/app/views/timelog/_date_range.html.erb
index 95e604dcf..086f78bc2 100644
--- a/app/views/timelog/_date_range.html.erb
+++ b/app/views/timelog/_date_range.html.erb
@@ -31,8 +31,8 @@
<% url_params = @free_period ? { :from => @from, :to => @to } : { :period => params[:period] } %>
<ul>
<li><%= link_to(l(:label_details), url_params.merge({:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue }),
- :class => (@controller.action_name == 'index' ? 'selected' : nil)) %></li>
+ :class => (action_name == 'index' ? 'selected' : nil)) %></li>
<li><%= link_to(l(:label_report), url_params.merge({:controller => 'timelog', :action => 'report', :project_id => @project, :issue_id => @issue}),
- :class => (@controller.action_name == 'report' ? 'selected' : nil)) %></li>
+ :class => (action_name == 'report' ? 'selected' : nil)) %></li>
</ul>
</div>
diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb
index 4e86d7833..e916756c9 100644
--- a/app/views/timelog/_list.html.erb
+++ b/app/views/timelog/_list.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({}) do -%>
+<%= form_tag({}) do -%>
<%= hidden_field_tag 'back_url', url_for(params) %>
<div class="autoscroll">
<table class="list time-entries">
diff --git a/app/views/timelog/bulk_edit.html.erb b/app/views/timelog/bulk_edit.html.erb
index de1f9a365..dc0bd92f3 100644
--- a/app/views/timelog/bulk_edit.html.erb
+++ b/app/views/timelog/bulk_edit.html.erb
@@ -7,7 +7,7 @@
)}.join("\n").html_safe %>
</ul>
-<% form_tag(:action => 'bulk_update') do %>
+<%= form_tag(:action => 'bulk_update') do %>
<%= @time_entries.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %>
<div class="box tabular">
<div>
diff --git a/app/views/timelog/edit.html.erb b/app/views/timelog/edit.html.erb
index e5586e19a..db2e73cd5 100644
--- a/app/views/timelog/edit.html.erb
+++ b/app/views/timelog/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(:label_spent_time) %></h2>
-<% labelled_form_for @time_entry, :url => project_time_entry_path(@time_entry.project, @time_entry) do |f| %>
+<%= labelled_form_for @time_entry, :url => project_time_entry_path(@time_entry.project, @time_entry) do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb
index c3a63436e..52c9118e7 100644
--- a/app/views/timelog/index.html.erb
+++ b/app/views/timelog/index.html.erb
@@ -8,7 +8,7 @@
<h2><%= l(:label_spent_time) %></h2>
-<% form_tag({:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue}, :method => :get, :id => 'query_form') do %>
+<%= form_tag({:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue}, :method => :get, :id => 'query_form') do %>
<%= render :partial => 'date_range' %>
<% end %>
diff --git a/app/views/timelog/new.html.erb b/app/views/timelog/new.html.erb
index f37574397..84bf7dae1 100644
--- a/app/views/timelog/new.html.erb
+++ b/app/views/timelog/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= l(:label_spent_time) %></h2>
-<% labelled_form_for @time_entry, :url => time_entries_path do |f| %>
+<%= labelled_form_for @time_entry, :url => time_entries_path do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
diff --git a/app/views/timelog/report.html.erb b/app/views/timelog/report.html.erb
index 960d41b72..4b9f0befe 100644
--- a/app/views/timelog/report.html.erb
+++ b/app/views/timelog/report.html.erb
@@ -6,7 +6,9 @@
<h2><%= l(:label_spent_time) %></h2>
-<% form_tag({:controller => 'timelog', :action => 'report', :project_id => @project, :issue_id => @issue}, :method => :get, :id => 'query_form') do %>
+<%= form_tag({:controller => 'timelog', :action => 'report',
+ :project_id => @project, :issue_id => @issue},
+ :method => :get, :id => 'query_form') do %>
<% @report.criteria.each do |criterion| %>
<%= hidden_field_tag 'criteria[]', criterion, :id => nil %>
<% end %>
diff --git a/app/views/trackers/edit.html.erb b/app/views/trackers/edit.html.erb
index b553704a0..76744c403 100644
--- a/app/views/trackers/edit.html.erb
+++ b/app/views/trackers/edit.html.erb
@@ -1,5 +1,5 @@
<h2><%= link_to l(:label_tracker_plural), trackers_path %> &#187; <%=h @tracker %></h2>
-<% labelled_form_for @tracker do |f| %>
+<%= labelled_form_for @tracker do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% end %>
diff --git a/app/views/trackers/new.html.erb b/app/views/trackers/new.html.erb
index e48525793..7bd8c6a00 100644
--- a/app/views/trackers/new.html.erb
+++ b/app/views/trackers/new.html.erb
@@ -1,5 +1,5 @@
<h2><%= link_to l(:label_tracker_plural), trackers_path %> &#187; <%=l(:label_tracker_new)%></h2>
-<% labelled_form_for @tracker do |f| %>
+<%= labelled_form_for @tracker do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% end %>
diff --git a/app/views/users/_general.html.erb b/app/views/users/_general.html.erb
index b332e856e..0daa421c7 100644
--- a/app/views/users/_general.html.erb
+++ b/app/views/users/_general.html.erb
@@ -1,4 +1,4 @@
-<% labelled_form_for @user do |f| %>
+<%= labelled_form_for @user do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% if @user.active? && email_delivery_enabled? -%>
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
diff --git a/app/views/users/_groups.html.erb b/app/views/users/_groups.html.erb
index 0ab2f11eb..e24296ef0 100644
--- a/app/views/users/_groups.html.erb
+++ b/app/views/users/_groups.html.erb
@@ -1,4 +1,4 @@
-<% form_for(:user, :url => { :action => 'update' }, :html => {:method => :put}) do %>
+<%= form_for(:user, :url => { :action => 'update' }, :html => {:method => :put}) do %>
<div class="box">
<% Group.all.sort.each do |group| %>
<label><%= check_box_tag 'user[group_ids][]', group.id, @user.groups.include?(group) %> <%=h group %></label><br />
diff --git a/app/views/users/_memberships.html.erb b/app/views/users/_memberships.html.erb
index 51fb11106..a480d2ac7 100644
--- a/app/views/users/_memberships.html.erb
+++ b/app/views/users/_memberships.html.erb
@@ -19,8 +19,10 @@
</td>
<td class="roles">
<span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span>
- <% remote_form_for(:membership, :url => user_membership_path(@user, membership), :method => :put,
- :html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
+ <%= form_for(:membership, :remote => true,
+ :url => user_membership_path(@user, membership), :method => :put,
+ :html => {:id => "member-#{membership.id}-roles-form",
+ :style => 'display:none;'}) do %>
<p><% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role),
:disabled => membership.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
@@ -57,7 +59,7 @@
<div class="splitcontentright">
<% if projects.any? %>
<fieldset><legend><%=l(:label_project_new)%></legend>
-<% remote_form_for(:membership, :url => user_memberships_path(@user)) do %>
+<%= form_for(:membership, :remote => true, :url => user_memberships_path(@user)) do %>
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %>
<p><%= l(:label_role_plural) %>:
<% roles.each do |role| %>
diff --git a/app/views/users/_preferences.html.erb b/app/views/users/_preferences.html.erb
index a5a0e5cb1..26e83b123 100644
--- a/app/views/users/_preferences.html.erb
+++ b/app/views/users/_preferences.html.erb
@@ -1,4 +1,4 @@
-<% labelled_fields_for :pref, @user.pref do |pref_fields| %>
+<%= labelled_fields_for :pref, @user.pref do |pref_fields| %>
<p><%= pref_fields.check_box :hide_mail %></p>
<p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
<p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 3decdc971..d23be4ad2 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -4,7 +4,7 @@
<h2><%=l(:label_user_plural)%></h2>
-<% form_tag({}, :method => :get) do %>
+<%= form_tag({}, :method => :get) do %>
<fieldset><legend><%= l(:label_filter_plural) %></legend>
<label for='status'><%= l(:field_status) %>:</label>
<%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index eb8a9f93d..3eecf4a20 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_user_plural), users_path %> &#187; <%=l(:label_user_new)%></h2>
-<% labelled_form_for @user do |f| %>
+<%= labelled_form_for @user do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% if email_delivery_enabled? %>
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
diff --git a/app/views/versions/_issue_counts.html.erb b/app/views/versions/_issue_counts.html.erb
index 78b77e408..e4bb6e666 100644
--- a/app/views/versions/_issue_counts.html.erb
+++ b/app/views/versions/_issue_counts.html.erb
@@ -1,4 +1,4 @@
-<% form_tag({}, :id => "status_by_form") do -%>
+<%= form_tag({}, :id => "status_by_form") do -%>
<fieldset>
<legend>
<%= l(:label_issues_by,
diff --git a/app/views/versions/_new_modal.html.erb b/app/views/versions/_new_modal.html.erb
index 8b58883c8..cd51fdc93 100644
--- a/app/views/versions/_new_modal.html.erb
+++ b/app/views/versions/_new_modal.html.erb
@@ -1,6 +1,6 @@
<h3 class="title"><%=l(:label_version_new)%></h3>
-<% labelled_remote_form_for @version, :url => project_versions_path(@project) do |f| %>
+<%= labelled_remote_form_for :version, @version, :url => project_versions_path(@project) do |f| %>
<%= render :partial => 'versions/form', :locals => { :f => f } %>
<p class="buttons">
<%= submit_tag l(:button_create), :name => nil %>
diff --git a/app/views/versions/edit.html.erb b/app/views/versions/edit.html.erb
index 6c8f5a579..3c67f09c0 100644
--- a/app/views/versions/edit.html.erb
+++ b/app/views/versions/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_version)%></h2>
-<% labelled_form_for @version do |f| %>
+<%= labelled_form_for @version do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb
index 71a756ea7..d8ac53401 100644
--- a/app/views/versions/index.html.erb
+++ b/app/views/versions/index.html.erb
@@ -14,7 +14,7 @@
<%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
- <% form_tag({}) do -%>
+ <%= form_tag({}) do -%>
<table class="list related-issues">
<caption><%= l(:label_related_issues) %></caption>
<% issues.each do |issue| -%>
@@ -32,7 +32,7 @@
<% end %>
<% content_for :sidebar do %>
-<% form_tag({}, :method => :get) do %>
+<%= form_tag({}, :method => :get) do %>
<h3><%= l(:label_roadmap) %></h3>
<% @trackers.each do |tracker| %>
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
diff --git a/app/views/versions/new.html.erb b/app/views/versions/new.html.erb
index 2a51957a1..c63edade7 100644
--- a/app/views/versions/new.html.erb
+++ b/app/views/versions/new.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_version_new)%></h2>
-<% labelled_form_for @version, :url => project_versions_path(@project) do |f| %>
+<%= labelled_form_for @version, :url => project_versions_path(@project) do |f| %>
<%= render :partial => 'versions/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>
diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb
index 07ae0b1cc..f44e3f272 100644
--- a/app/views/versions/show.html.erb
+++ b/app/views/versions/show.html.erb
@@ -36,7 +36,7 @@
</div>
<% if @issues.present? %>
-<% form_tag({}) do -%>
+<%= form_tag({}) do -%>
<table class="list related-issues">
<caption><%= l(:label_related_issues) %></caption>
<%- @issues.each do |issue| -%>
diff --git a/app/views/watchers/_new.html.erb b/app/views/watchers/_new.html.erb
index c2c133ee7..4220776f3 100644
--- a/app/views/watchers/_new.html.erb
+++ b/app/views/watchers/_new.html.erb
@@ -1,6 +1,6 @@
<h3 class="title"><%= l(:permission_add_issue_watchers) %></h3>
-<% form_remote_tag :url => {:controller => 'watchers',
+<%= form_remote_tag :url => {:controller => 'watchers',
:action => (watched ? 'create' : 'append'),
:object_type => watched.class.name.underscore,
:object_id => watched},
diff --git a/app/views/wiki/_sidebar.html.erb b/app/views/wiki/_sidebar.html.erb
index 9a24963f2..b4034d88b 100644
--- a/app/views/wiki/_sidebar.html.erb
+++ b/app/views/wiki/_sidebar.html.erb
@@ -6,4 +6,4 @@
<%= link_to l(:field_start_page), {:action => 'show', :id => nil} %><br />
<%= link_to l(:label_index_by_title), {:action => 'index'} %><br />
-<%= link_to l(:label_index_by_date), {:action => 'date_index'} %><br />
+<%= link_to l(:label_index_by_date), {:controller => 'wiki', :project_id => @project, :action => 'date_index'} %><br />
diff --git a/app/views/wiki/destroy.html.erb b/app/views/wiki/destroy.html.erb
index a3cc476bf..05c0fd56d 100644
--- a/app/views/wiki/destroy.html.erb
+++ b/app/views/wiki/destroy.html.erb
@@ -2,7 +2,7 @@
<h2><%=h @page.pretty_title %></h2>
-<% form_tag({}, :method => :delete) do %>
+<%= form_tag({}, :method => :delete) do %>
<div class="box">
<p><strong><%= l(:text_wiki_page_destroy_question, :descendants => @descendants_count) %></strong></p>
<p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_wiki_page_nullify_children) %></label><br />
diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb
index 281657990..51d8ab94e 100644
--- a/app/views/wiki/edit.html.erb
+++ b/app/views/wiki/edit.html.erb
@@ -2,7 +2,7 @@
<h2><%= h @page.pretty_title %></h2>
-<% form_for :content, @content,
+<%= form_for @content, :as => :content,
:url => {:action => 'update', :id => @page.title},
:html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %>
<%= f.hidden_field :version %>
@@ -16,10 +16,10 @@
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %>
<% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
- <% fields_for @page do |fp| %>
+ <%= fields_for @page do |fp| %>
<p>
<label><%= l(:field_parent_title) %></label>
- <%= fp.select :parent_id, "<option value=''></option>" + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent) %>
+ <%= fp.select :parent_id, content_tag('option', '', :value => '') + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent) %>
</p>
<% end %>
<% end %>
diff --git a/app/views/wiki/history.html.erb b/app/views/wiki/history.html.erb
index cfbf64154..fa9effd1a 100644
--- a/app/views/wiki/history.html.erb
+++ b/app/views/wiki/history.html.erb
@@ -4,7 +4,9 @@
<h3><%= l(:label_history) %></h3>
-<% form_tag({:controller => 'wiki', :action => 'diff', :project_id => @page.project, :id => @page.title}, :method => :get) do %>
+<%= form_tag({:controller => 'wiki', :action => 'diff',
+ :project_id => @page.project, :id => @page.title},
+ :method => :get) do %>
<table class="list wiki-page-versions">
<thead><tr>
<th>#</th>
diff --git a/app/views/wiki/rename.html.erb b/app/views/wiki/rename.html.erb
index fea76383a..86385a94b 100644
--- a/app/views/wiki/rename.html.erb
+++ b/app/views/wiki/rename.html.erb
@@ -4,14 +4,14 @@
<%= error_messages_for 'page' %>
-<% labelled_form_for :wiki_page, @page,
+<%= labelled_form_for :wiki_page, @page,
:url => { :action => 'rename' },
:html => { :method => :post } do |f| %>
<div class="box tabular">
<p><%= f.text_field :title, :required => true, :size => 100 %></p>
<p><%= f.check_box :redirect_existing_links %></p>
<p><%= f.select :parent_id,
- "<option value=''></option>" +
+ content_tag('option', '', :value => '') +
wiki_page_options_for_select(
@wiki.pages.all(:include => :parent) - @page.self_and_descendants,
@page.parent),
diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb
index 19215bb98..0ef8fc869 100644
--- a/app/views/wiki/show.html.erb
+++ b/app/views/wiki/show.html.erb
@@ -42,7 +42,10 @@
<div id="wiki_add_attachment">
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
:id => 'attach_files_link' %></p>
-<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
+<%= form_tag({:controller => 'wiki', :action => 'add_attachment',
+ :project_id => @project, :id => @page.title},
+ :multipart => true, :id => "add_attachment_form",
+ :style => "display:none;") do %>
<div class="box">
<p><%= render :partial => 'attachments/form' %></p>
</div>
diff --git a/app/views/wikis/destroy.html.erb b/app/views/wikis/destroy.html.erb
index 75c0eac24..bc3360014 100644
--- a/app/views/wikis/destroy.html.erb
+++ b/app/views/wikis/destroy.html.erb
@@ -3,7 +3,7 @@
<div class="box"><center>
<p><strong><%= h(@project.name) %></strong><br /><%=l(:text_wiki_destroy_confirmation)%></p>
-<% form_tag({:controller => 'wikis', :action => 'destroy', :id => @project}) do %>
+<%= form_tag({:controller => 'wikis', :action => 'destroy', :id => @project}) do %>
<%= hidden_field_tag "confirm", 1 %>
<%= submit_tag l(:button_delete) %>
<% end %>
diff --git a/app/views/workflows/copy.html.erb b/app/views/workflows/copy.html.erb
index cbe13b42b..057e40367 100644
--- a/app/views/workflows/copy.html.erb
+++ b/app/views/workflows/copy.html.erb
@@ -2,7 +2,7 @@
<h2><%=l(:label_workflow)%></h2>
-<% form_tag({}, :id => 'workflow_copy_form') do %>
+<%= form_tag({}, :id => 'workflow_copy_form') do %>
<fieldset class="tabular box">
<legend><%= l(:label_copy_source) %></legend>
<p>
diff --git a/app/views/workflows/edit.html.erb b/app/views/workflows/edit.html.erb
index 8dc509904..20eaff992 100644
--- a/app/views/workflows/edit.html.erb
+++ b/app/views/workflows/edit.html.erb
@@ -4,7 +4,7 @@
<p><%=l(:text_workflow_edit)%>:</p>
-<% form_tag({}, :method => 'get') do %>
+<%= form_tag({}, :method => 'get') do %>
<p>
<label><%=l(:label_role)%>:
<%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %></label>
@@ -21,7 +21,7 @@
<% end %>
<% if @tracker && @role && @statuses.any? %>
- <% form_tag({}, :id => 'workflow_form' ) do %>
+ <%= form_tag({}, :id => 'workflow_form' ) do %>
<%= hidden_field_tag 'tracker_id', @tracker.id %>
<%= hidden_field_tag 'role_id', @role.id %>
<div class="autoscroll">