comparison app/views/workflows/.svn/text-base/edit.rhtml.svn-base @ 245:051f544170fe

* Update to SVN trunk revision 4993
author Chris Cannam
date Thu, 03 Mar 2011 11:42:28 +0000
parents 513646585e45
children cbce1fd3b1b7
comparison
equal deleted inserted replaced
244:8972b600f4fb 245:051f544170fe
18 <p> 18 <p>
19 <%= submit_tag l(:button_edit), :name => nil %> 19 <%= submit_tag l(:button_edit), :name => nil %>
20 </p> 20 </p>
21 <% end %> 21 <% end %>
22 22
23
24 <% if @tracker && @role && @statuses.any? %> 23 <% if @tracker && @role && @statuses.any? %>
25 <% form_tag({}, :id => 'workflow_form' ) do %> 24 <% form_tag({}, :id => 'workflow_form' ) do %>
26 <%= hidden_field_tag 'tracker_id', @tracker.id %> 25 <%= hidden_field_tag 'tracker_id', @tracker.id %>
27 <%= hidden_field_tag 'role_id', @role.id %> 26 <%= hidden_field_tag 'role_id', @role.id %>
28 <div class="autoscroll"> 27 <div class="autoscroll">
29 <table class="list"> 28 <%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %>
30 <thead> 29
31 <tr> 30 <fieldset class="collapsible" style="padding: 0; margin-top: 0.5em;">
32 <th align="left"><%=l(:label_current_status)%></th> 31 <legend onclick="toggleFieldset(this);">Autorisations supplémentaires lorsque l'utilisateur a créé la demande</legend>
33 <th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> 32 <div id="author_workflows" style="margin: 0.5em 0 0.5em 0;">
34 </tr> 33 <%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
35 <tr> 34 </div>
36 <td></td> 35 </fieldset>
37 <% for new_status in @statuses %> 36 <%= javascript_tag "hideFieldset($('author_workflows'))" unless @workflows['author'].present? %>
38 <td width="<%= 75 / @statuses.size %>%" align="center"> 37
39 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.new-status-#{new_status.id}')", 38 <fieldset class="collapsible" style="padding: 0;">
40 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> 39 <legend onclick="toggleFieldset(this);">Autorisations supplémentaires lorsque la demande est assignée à l'utilisateur</legend>
41 <%= new_status.name %> 40 <div id="assignee_workflows" style="margin: 0.5em 0 0.5em 0;">
42 </td> 41 <%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
43 <% end %> 42 </div>
44 </tr> 43 </fieldset>
45 </thead> 44 <%= javascript_tag "hideFieldset($('assignee_workflows'))" unless @workflows['assignee'].present? %>
46 <tbody> 45 </div>
47 <% for old_status in @statuses %> 46 <%= submit_tag l(:button_save) %>
48 <tr class="<%= cycle("odd", "even") %>"> 47 <% end %>
49 <td>
50 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.old-status-#{old_status.id}')",
51 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
52
53 <%= old_status.name %>
54 </td>
55 <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%>
56 <% for new_status in @statuses -%>
57 <td align="center">
58 <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id),
59 :class => "old-status-#{old_status.id} new-status-#{new_status.id}" %>
60 </td>
61 <% end -%>
62 </tr>
63 <% end %>
64 </tbody>
65 </table>
66 </div>
67 <p><%= check_all_links 'workflow_form' %></p>
68
69 <%= submit_tag l(:button_save) %>
70 <% end %>
71 <% end %> 48 <% end %>
72 49
73 <% html_title(l(:label_workflow)) -%> 50 <% html_title(l(:label_workflow)) -%>