To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / workflows / edit.html.erb @ 1591:63650ae64bf2

History | View | Annotate | Download (2.46 KB)

1
<%= render :partial => 'action_menu' %>
2

    
3
<%= title l(:label_workflow) %>
4

    
5
<div class="tabs">
6
  <ul>
7
    <li><%= link_to l(:label_status_transitions), {:action => 'edit', :role_id => @role, :tracker_id => @tracker}, :class => 'selected' %></li>
8
    <li><%= link_to l(:label_fields_permissions), {:action => 'permissions', :role_id => @role, :tracker_id => @tracker} %></li>
9
  </ul>
10
</div>
11

    
12
<p><%=l(:text_workflow_edit)%>:</p>
13

    
14
<%= form_tag({}, :method => 'get') do %>
15
<p>
16
  <label><%=l(:label_role)%>:
17
  <%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %></label>
18

    
19
  <label><%=l(:label_tracker)%>:
20
  <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %></label>
21

    
22
  <%= submit_tag l(:button_edit), :name => nil %>
23

    
24
  <%= hidden_field_tag 'used_statuses_only', '0' %>
25
  <label><%= check_box_tag 'used_statuses_only', '1', @used_statuses_only %> <%= l(:label_display_used_statuses_only) %></label>
26

    
27
</p>
28
<% end %>
29

    
30
<% if @tracker && @role && @statuses.any? %>
31
  <%= form_tag({}, :id => 'workflow_form' ) do %>
32
    <%= hidden_field_tag 'tracker_id', @tracker.id %>
33
    <%= hidden_field_tag 'role_id', @role.id %>
34
    <%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only] %>
35
    <div class="autoscroll">
36
      <%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %>
37

    
38
      <fieldset class="collapsible" style="padding: 0; margin-top: 0.5em;">
39
        <legend onclick="toggleFieldset(this);"><%= l(:label_additional_workflow_transitions_for_author) %></legend>
40
        <div id="author_workflows" style="margin: 0.5em 0 0.5em 0;">
41
          <%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
42
        </div>
43
      </fieldset>
44
      <%= javascript_tag "hideFieldset($('#author_workflows'))" unless @workflows['author'].present? %>
45

    
46
      <fieldset class="collapsible" style="padding: 0;">
47
        <legend onclick="toggleFieldset(this);"><%= l(:label_additional_workflow_transitions_for_assignee) %></legend>
48
        <div id="assignee_workflows" style="margin: 0.5em 0 0.5em 0;">
49
      <%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
50
        </div>
51
      </fieldset>
52
      <%= javascript_tag "hideFieldset($('#assignee_workflows'))" unless @workflows['assignee'].present? %>
53
    </div>
54
    <%= submit_tag l(:button_save) %>
55
  <% end %>
56
<% end %>