summaryrefslogtreecommitdiffstats
path: root/app/views/issue_statuses
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-12-11 18:48:34 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-12-11 18:48:34 +0000
commit4fe14e71c2d76a2e92da0aaa71e18493d65b1fc1 (patch)
tree0ef000f0e3985772228928b0acdca1a292f82ef6 /app/views/issue_statuses
parenta83501364d0aa5e5e6d7a9e4ccfa2be5dab555b0 (diff)
downloadredmine-4fe14e71c2d76a2e92da0aaa71e18493d65b1fc1.tar.gz
redmine-4fe14e71c2d76a2e92da0aaa71e18493d65b1fc1.zip
Adds a Setting to control how an Issue's done_ratio is calculated:
* Issue field (default) - the done_ratio field for the Issue * Issue status - uses the Issue Status's value #4274 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3151 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/issue_statuses')
-rw-r--r--app/views/issue_statuses/_form.rhtml5
-rw-r--r--app/views/issue_statuses/list.rhtml7
2 files changed, 12 insertions, 0 deletions
diff --git a/app/views/issue_statuses/_form.rhtml b/app/views/issue_statuses/_form.rhtml
index b6a5bc19f..e36dec824 100644
--- a/app/views/issue_statuses/_form.rhtml
+++ b/app/views/issue_statuses/_form.rhtml
@@ -5,6 +5,11 @@
<p><label for="issue_status_name"><%=l(:field_name)%><span class="required"> *</span></label>
<%= text_field 'issue_status', 'name' %></p>
+<% if Issue.use_status_for_done_ratio? %>
+<p><label for="issue_done_ratio"><%=l(:field_done_ratio)%></label>
+<%= select 'issue_status', :default_done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
+<% end %>
+
<p><label for="issue_status_is_closed"><%=l(:field_is_closed)%></label>
<%= check_box 'issue_status', 'is_closed' %></p>
diff --git a/app/views/issue_statuses/list.rhtml b/app/views/issue_statuses/list.rhtml
index ca973153d..a98ed0cd8 100644
--- a/app/views/issue_statuses/list.rhtml
+++ b/app/views/issue_statuses/list.rhtml
@@ -1,5 +1,6 @@
<div class="contextual">
<%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'icon icon-add' %>
+<%= link_to(l(:label_update_issue_done_ratios), {:action => 'update_issue_done_ratio'}, :class => 'icon icon-multiple', :method => 'post', :confirm => l(:text_are_you_sure)) if Issue.use_status_for_done_ratio? %>
</div>
<h2><%=l(:label_issue_status_plural)%></h2>
@@ -7,6 +8,9 @@
<table class="list">
<thead><tr>
<th><%=l(:field_status)%></th>
+ <% if Issue.use_status_for_done_ratio? %>
+ <th><%=l(:field_done_ratio)%></th>
+ <% end %>
<th><%=l(:field_is_default)%></th>
<th><%=l(:field_is_closed)%></th>
<th><%=l(:button_sort)%></th>
@@ -16,6 +20,9 @@
<% for status in @issue_statuses %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to status.name, :action => 'edit', :id => status %></td>
+ <% if Issue.use_status_for_done_ratio? %>
+ <td align="center"><%= h status.default_done_ratio %></td>
+ <% end %>
<td align="center"><%= image_tag 'true.png' if status.is_default? %></td>
<td align="center"><%= image_tag 'true.png' if status.is_closed? %></td>
<td align="center" style="width:15%;"><%= reorder_links('issue_status', {:action => 'update', :id => status}) %></td>