summaryrefslogtreecommitdiffstats
path: root/app/views/trackers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-29 14:22:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-29 14:22:56 +0000
commit945ec8942a4c43ed41aa4302cbe74ad45f1ff08c (patch)
tree2e2f45b48ee4277e6e1920d094c337a7b7191738 /app/views/trackers
parent32d4378198b83a10bab53c8e7cee2e4ec8adb818 (diff)
downloadredmine-945ec8942a4c43ed41aa4302cbe74ad45f1ff08c.tar.gz
redmine-945ec8942a4c43ed41aa4302cbe74ad45f1ff08c.zip
Adds projects association on tracker form (#2578).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2335 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/trackers')
-rw-r--r--app/views/trackers/_form.rhtml17
-rw-r--r--app/views/trackers/edit.rhtml4
-rw-r--r--app/views/trackers/new.rhtml4
3 files changed, 20 insertions, 5 deletions
diff --git a/app/views/trackers/_form.rhtml b/app/views/trackers/_form.rhtml
index 856b70bbc..d8d35ba36 100644
--- a/app/views/trackers/_form.rhtml
+++ b/app/views/trackers/_form.rhtml
@@ -1,5 +1,7 @@
<%= error_messages_for 'tracker' %>
-<div class="box">
+
+<div class="splitcontentleft">
+<div class="box tabular">
<!--[form:tracker]-->
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :is_in_chlog %></p>
@@ -10,3 +12,16 @@
<% end %>
<!--[eoform:tracker]-->
</div>
+</div>
+
+<div class="splitcontentright">
+<% if @projects.any? %>
+<fieldset class="box" id="tracker_project_ids"><legend><%= l(:label_project_plural) %></legend>
+<%= project_nested_ul(@projects) do |p|
+ content_tag('label', check_box_tag('tracker[project_ids][]', p.id, @tracker.projects.include?(p), :id => nil) + ' ' + h(p))
+end %>
+<%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %>
+<p><%= check_all_links 'tracker_project_ids' %></p>
+</fieldset>
+<% end %>
+</div>
diff --git a/app/views/trackers/edit.rhtml b/app/views/trackers/edit.rhtml
index d8411099c..038acc86e 100644
--- a/app/views/trackers/edit.rhtml
+++ b/app/views/trackers/edit.rhtml
@@ -1,6 +1,6 @@
<h2><%=l(:label_tracker)%></h2>
-<% labelled_tabular_form_for :tracker, @tracker, :url => { :action => 'edit' } do |f| %>
+<% form_for :tracker, @tracker, :url => { :action => 'edit' }, :builder => TabularFormBuilder do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
-<% end %> \ No newline at end of file
+<% end %>
diff --git a/app/views/trackers/new.rhtml b/app/views/trackers/new.rhtml
index b318a5dc4..3f8384cdd 100644
--- a/app/views/trackers/new.rhtml
+++ b/app/views/trackers/new.rhtml
@@ -1,6 +1,6 @@
<h2><%=l(:label_tracker_new)%></h2>
-<% labelled_tabular_form_for :tracker, @tracker, :url => { :action => 'new' } do |f| %>
+<% form_for :tracker, @tracker, :url => { :action => 'new' }, :builder => TabularFormBuilder do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
-<% end %> \ No newline at end of file
+<% end %>