summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-09 18:15:55 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-09 18:15:55 +0000
commit9636882c1e890c7d6dda6b974b9765bebe3f880a (patch)
tree626d15eb8cb6f7cb17fc514abb5ad97293d95efe
parent312ffe43c7efa910d3aa987826e4b8b5f358139e (diff)
downloadredmine-9636882c1e890c7d6dda6b974b9765bebe3f880a.tar.gz
redmine-9636882c1e890c7d6dda6b974b9765bebe3f880a.zip
Use #labelled_form_for instead of #labelled_tabular_form_for.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8141 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/application_helper.rb1
-rw-r--r--app/views/custom_fields/_form.html.erb4
-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/issue_categories/_form.html.erb2
-rw-r--r--app/views/issue_categories/edit.html.erb2
-rw-r--r--app/views/issue_categories/new.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.erb2
-rw-r--r--app/views/projects/_edit.html.erb2
-rw-r--r--app/views/projects/_form.html.erb8
-rw-r--r--app/views/projects/copy.html.erb4
-rw-r--r--app/views/projects/new.html.erb2
-rw-r--r--app/views/roles/_form.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/timelog/edit.html.erb4
-rw-r--r--app/views/versions/_form.html.erb2
-rw-r--r--app/views/versions/edit.html.erb2
-rw-r--r--app/views/versions/new.html.erb2
-rw-r--r--app/views/wiki/rename.html.erb4
23 files changed, 31 insertions, 30 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 396319e74..58e1cf8ec 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -866,6 +866,7 @@ module ApplicationHelper
end
def labelled_tabular_form_for(*args, &proc)
+ ActiveSupport::Deprecation.warn "ApplicationHelper#labelled_tabular_form_for is deprecated and will be removed in Redmine 1.5. Use #labelled_form_for instead."
args << {} unless args.last.is_a?(Hash)
options = args.last
options[:html] ||= {}
diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb
index 53e71703d..7432a426f 100644
--- a/app/views/custom_fields/_form.html.erb
+++ b/app/views/custom_fields/_form.html.erb
@@ -60,7 +60,7 @@ function toggle_custom_field_format() {
//]]>
</script>
-<div class="box">
+<div class="box tabular">
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :onchange => "toggle_custom_field_format();",
:disabled => !@custom_field.new_record? %></p>
@@ -76,7 +76,7 @@ function toggle_custom_field_format() {
<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
</div>
-<div class="box">
+<div class="box tabular">
<% case @custom_field.class.name
when "IssueCustomField" %>
diff --git a/app/views/custom_fields/edit.html.erb b/app/views/custom_fields/edit.html.erb
index 8b84ee079..51ac84fcf 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_tabular_form_for :custom_field, @custom_field, :url => { :action => "edit", :id => @custom_field } do |f| %>
+<% labelled_form_for :custom_field, @custom_field, :url => { :action => "edit", :id => @custom_field } 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 85f6ef53e..a68cef5dd 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_tabular_form_for :custom_field, @custom_field, :url => { :action => "new" } do |f| %>
+<% labelled_form_for :custom_field, @custom_field, :url => { :action => "new" } 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/issue_categories/_form.html.erb b/app/views/issue_categories/_form.html.erb
index fae0a75e5..c3b20936c 100644
--- a/app/views/issue_categories/_form.html.erb
+++ b/app/views/issue_categories/_form.html.erb
@@ -1,6 +1,6 @@
<%= error_messages_for 'category' %>
-<div class="box">
+<div class="box tabular">
<p><%= f.text_field :name, :size => 30, :required => true %></p>
<p><%= f.select :assigned_to_id, principals_options_for_select(@project.assignable_users, @category.assigned_to), :include_blank => true %></p>
</div>
diff --git a/app/views/issue_categories/edit.html.erb b/app/views/issue_categories/edit.html.erb
index 917429640..4f29ab8f8 100644
--- a/app/views/issue_categories/edit.html.erb
+++ b/app/views/issue_categories/edit.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_issue_category)%></h2>
-<% labelled_tabular_form_for :issue_category, @category, :url => issue_category_path(@category), :html => {:method => :put} do |f| %>
+<% labelled_form_for :issue_category, @category, :url => issue_category_path(@category), :html => {:method => :put} do |f| %>
<%= render :partial => 'issue_categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/issue_categories/new.html.erb b/app/views/issue_categories/new.html.erb
index f99c9b358..e63c09ea9 100644
--- a/app/views/issue_categories/new.html.erb
+++ b/app/views/issue_categories/new.html.erb
@@ -1,6 +1,6 @@
<h2><%=l(:label_issue_category_new)%></h2>
-<% labelled_tabular_form_for :issue_category, @category, :url => project_issue_categories_path(@project) do |f| %>
+<% labelled_form_for :issue_category, @category, :url => project_issue_categories_path(@project) do |f| %>
<%= render :partial => 'issue_categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>
diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb
index 83608f971..182f22fbe 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_tabular_form_for @news, :html => { :id => 'news-form', :method => :put } do |f| %>
+<% labelled_form_for @news, :html => { :id => 'news-form', :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 fe8534130..4d13d3a32 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_tabular_form_for @news, :url => project_news_index_path(@project),
+<% labelled_form_for @news, :url => project_news_index_path(@project),
:html => { :id => 'news-form' } 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 55a876d27..c8a5763c4 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_tabular_form_for @news, :url => project_news_index_path(@project),
+<% labelled_form_for @news, :url => project_news_index_path(@project),
:html => { :id => 'news-form' } 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 aaf6f1af9..2ffed80e0 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_tabular_form_for :news, @news, :url => news_path(@news),
+<% labelled_form_for :news, @news, :url => news_path(@news),
:html => { :id => 'news-form', :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
diff --git a/app/views/projects/_edit.html.erb b/app/views/projects/_edit.html.erb
index 43e1c3ba6..e52baa116 100644
--- a/app/views/projects/_edit.html.erb
+++ b/app/views/projects/_edit.html.erb
@@ -1,4 +1,4 @@
-<% labelled_tabular_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/_form.html.erb b/app/views/projects/_form.html.erb
index 0e8978519..a41b00e50 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -1,6 +1,6 @@
<%= error_messages_for 'project' %>
-<div class="box">
+<div class="box tabular">
<!--[form:project]-->
<p><%= f.text_field :name, :required => true, :size => 60 %></p>
@@ -24,7 +24,7 @@
</div>
<% if @project.new_record? %>
-<fieldset class="box"><legend><%= l(:label_module_plural) %></legend>
+<fieldset class="box tabular"><legend><%= l(:label_module_plural) %></legend>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<label class="floating">
<%= check_box_tag 'project[enabled_module_names][]', m, @project.module_enabled?(m), :id => "project_enabled_module_names_#{m}" %>
@@ -38,7 +38,7 @@
<% if @project.new_record? || @project.module_enabled?('issue_tracking') %>
<% unless @trackers.empty? %>
-<fieldset class="box" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend>
+<fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend>
<% @trackers.each do |tracker| %>
<label class="floating">
<%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.include?(tracker) %>
@@ -50,7 +50,7 @@
<% end %>
<% unless @issue_custom_fields.empty? %>
-<fieldset class="box" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend>
+<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend>
<% @issue_custom_fields.each do |custom_field| %>
<label class="floating">
<%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field), (custom_field.is_for_all? ? {:disabled => "disabled"} : {}) %>
diff --git a/app/views/projects/copy.html.erb b/app/views/projects/copy.html.erb
index 1ea4d43cd..66f6d3353 100644
--- a/app/views/projects/copy.html.erb
+++ b/app/views/projects/copy.html.erb
@@ -1,9 +1,9 @@
<h2><%=l(:label_project_new)%></h2>
-<% labelled_tabular_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"><legend><%= l(:button_copy) %></legend>
+<fieldset class="box tabular"><legend><%= l(:button_copy) %></legend>
<label class="block"><%= check_box_tag 'only[]', 'members', true %> <%= l(:label_member_plural) %> (<%= @source_project.members.count %>)</label>
<label class="block"><%= check_box_tag 'only[]', 'versions', true %> <%= l(:label_version_plural) %> (<%= @source_project.versions.count %>)</label>
<label class="block"><%= check_box_tag 'only[]', 'issue_categories', true %> <%= l(:label_issue_category_plural) %> (<%= @source_project.issue_categories.count %>)</label>
diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb
index 1b87acf68..deca4e344 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_tabular_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/roles/_form.html.erb b/app/views/roles/_form.html.erb
index 1f9d24365..17b012313 100644
--- a/app/views/roles/_form.html.erb
+++ b/app/views/roles/_form.html.erb
@@ -1,6 +1,6 @@
<%= error_messages_for 'role' %>
-<div class="box">
+<div class="box tabular">
<% unless @role.builtin? %>
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :assignable %></p>
@@ -13,7 +13,7 @@
</div>
<h3><%= l(:label_permissions) %></h3>
-<div class="box" id="permissions">
+<div class="box tabular" id="permissions">
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module.keys.sort.each do |mod| %>
<fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend>
diff --git a/app/views/roles/edit.html.erb b/app/views/roles/edit.html.erb
index 64350bbf2..2b1bd793b 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), :controller => 'roles', :action => 'index' %> &#187; <%=h @role.name %></h2>
-<% labelled_tabular_form_for :role, @role, :url => { :action => 'edit' }, :html => {:id => 'role_form'} do |f| %>
+<% labelled_form_for :role, @role, :url => { :action => 'edit' }, :html => {:id => 'role_form'} 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 1bb6c29b3..f6a872cb2 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), :controller => 'roles', :action => 'index' %> &#187; <%=l(:label_role_new)%></h2>
-<% labelled_tabular_form_for :role, @role, :url => { :action => 'new' }, :html => {:id => 'role_form'} do |f| %>
+<% labelled_form_for :role, @role, :url => { :action => 'new' }, :html => {:id => 'role_form'} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>
diff --git a/app/views/timelog/edit.html.erb b/app/views/timelog/edit.html.erb
index c9b575179..0f8a81e9e 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_tabular_form_for(:time_entry, @time_entry, :url => {
+<% labelled_form_for(:time_entry, @time_entry, :url => {
:action => (@time_entry.new_record? ? 'create' : 'update'),
:id => @time_entry,
:project_id => @time_entry.project
@@ -9,7 +9,7 @@
<%= error_messages_for 'time_entry' %>
<%= back_url_hidden_field_tag %>
-<div class="box">
+<div class="box tabular">
<p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p>
<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
<p><%= f.text_field :hours, :size => 6, :required => true %></p>
diff --git a/app/views/versions/_form.html.erb b/app/views/versions/_form.html.erb
index 7e95dca0e..db84f07eb 100644
--- a/app/views/versions/_form.html.erb
+++ b/app/views/versions/_form.html.erb
@@ -1,7 +1,7 @@
<%= back_url_hidden_field_tag %>
<%= error_messages_for 'version' %>
-<div class="box">
+<div class="box tabular">
<p><%= f.text_field :name, :size => 60, :required => true %></p>
<p><%= f.text_field :description, :size => 60 %></p>
<p><%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %></p>
diff --git a/app/views/versions/edit.html.erb b/app/views/versions/edit.html.erb
index 47d80ac42..6c8f5a579 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_tabular_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/new.html.erb b/app/views/versions/new.html.erb
index e141a112b..2a51957a1 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_tabular_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/wiki/rename.html.erb b/app/views/wiki/rename.html.erb
index 7a06c0340..e5a6d726b 100644
--- a/app/views/wiki/rename.html.erb
+++ b/app/views/wiki/rename.html.erb
@@ -4,8 +4,8 @@
<%= error_messages_for 'page' %>
-<% labelled_tabular_form_for :wiki_page, @page, :url => { :action => 'rename' } do |f| %>
-<div class="box">
+<% labelled_form_for :wiki_page, @page, :url => { :action => 'rename' } 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>" + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent), :label => :field_parent_title %></p>