@@ -1,20 +1,20 | |||
|
1 | 1 | <%= error_messages_for 'role' %> |
|
2 | 2 | <div class="box"> |
|
3 | 3 | <!--[form:role]--> |
|
4 | 4 | <p><%= f.text_field :name, :required => true %></p> |
|
5 | 5 | |
|
6 |
< |
|
|
6 | <h3><%=l(:label_permissions)%></h3> | |
|
7 | 7 | <% permissions = @permissions.group_by {|p| p.group_id } %> |
|
8 | 8 | <% permissions.keys.sort.each do |group_id| %> |
|
9 | 9 | <fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend> |
|
10 | 10 | <% permissions[group_id].each do |p| %> |
|
11 | 11 | <div style="width:170px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %> |
|
12 | 12 | <%= l(p.description.to_sym) %> |
|
13 | 13 | </div> |
|
14 | 14 | <% end %> |
|
15 | 15 | </fieldset> |
|
16 | 16 | <% end %> |
|
17 | 17 | <br /> |
|
18 | 18 | <%= check_all_links 'role_form' %> |
|
19 | 19 | <!--[eoform:role]--> |
|
20 | 20 | </div> |
@@ -1,71 +1,69 | |||
|
1 | 1 | <h2><%=l(:label_workflow)%></h2> |
|
2 | 2 | |
|
3 | 3 | <p><%=l(:text_workflow_edit)%>:</p> |
|
4 | 4 | |
|
5 | 5 | <%= start_form_tag ({:action => 'workflow'}, :method => 'get') %> |
|
6 | 6 | <div style="float:left;margin-right:10px;"> |
|
7 | 7 | <p><label for="role_id"><%=l(:label_role)%></label><br/> |
|
8 | 8 | <select id="role_id" name="role_id"> |
|
9 | 9 | <%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %> |
|
10 | 10 | </select></p> |
|
11 | 11 | </div> |
|
12 | 12 | |
|
13 | 13 | <div> |
|
14 | 14 | <p><label for="tracker_id"><%=l(:label_tracker)%></label><br/> |
|
15 | 15 | <select id="tracker_id" name="tracker_id"> |
|
16 | 16 | <%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %> |
|
17 | 17 | </select> |
|
18 | 18 | |
|
19 | 19 | <%= submit_tag l(:button_edit) %> |
|
20 | 20 | </p> |
|
21 | 21 | </div> |
|
22 | 22 | <%= end_form_tag %> |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | <% unless @tracker.nil? or @role.nil? %> |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <%= form_tag ({:action => 'workflow', :role_id => @role, :tracker_id => @tracker }, :id => 'workflow_form' ) %> |
|
29 | 29 | <table> |
|
30 | 30 | <tr> |
|
31 |
<td align="center" |
|
|
31 | <td align="center"><strong><%=l(:label_current_status)%></strong></td> | |
|
32 | 32 | <td align="center" colspan="<%= @statuses.length %>"><strong><%=l(:label_new_statuses_allowed)%></strong></td> |
|
33 | 33 | </tr> |
|
34 | 34 | <tr> |
|
35 |
<td |
|
|
35 | <td></td> | |
|
36 | 36 | <% for new_status in @statuses %> |
|
37 | 37 | <td width="80" align="center"><%= new_status.name %></td> |
|
38 | 38 | <% end %> |
|
39 | 39 | </tr> |
|
40 | 40 | |
|
41 | 41 | <% for old_status in @statuses %> |
|
42 | 42 | <tr> |
|
43 |
<td |
|
|
44 | <td><%= old_status.name %></td> | |
|
45 | ||
|
43 | <td><div class="square" style="background:#<%= old_status.html_color %>;"></div> <%= old_status.name %></td> | |
|
46 | 44 | <% for new_status in @statuses %> |
|
47 | 45 | <td align="center"> |
|
48 | 46 | |
|
49 | 47 | <input type="checkbox" |
|
50 | 48 | name="issue_status[<%= old_status.id %>][]" |
|
51 | 49 | value="<%= new_status.id %>" |
|
52 | 50 | <%if old_status.new_statuses_allowed_to(@role, @tracker).include? new_status%>checked="checked"<%end%> |
|
53 | 51 | <%if old_status==new_status%>disabled<%end%> |
|
54 | 52 | > |
|
55 | 53 | </td> |
|
56 | 54 | <% end %> |
|
57 | 55 | |
|
58 | 56 | </tr> |
|
59 | 57 | <% end %> |
|
60 | 58 | </table> |
|
61 | 59 | <br /> |
|
62 | 60 | <p> |
|
63 | 61 | <a href="javascript:checkAll('workflow_form', true)"><%=l(:button_check_all)%></a> | |
|
64 | 62 | <a href="javascript:checkAll('workflow_form', false)"><%=l(:button_uncheck_all)%></a> |
|
65 | 63 | </p> |
|
66 | 64 | <br /> |
|
67 | 65 | <%= submit_tag l(:button_save) %> |
|
68 | 66 | <%= end_form_tag %> |
|
69 | 67 | |
|
70 | 68 | <% end %> |
|
71 | 69 | </div> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now