no-workflow-warning-for-roles.patch

Go MAEDA, 2019-02-21 03:32

Download (1.55 KB)

View differences:

app/views/roles/index.html.erb
9 9
  <thead><tr>
10 10
    <th><%=l(:label_role)%></th>
11 11
  <th></th>
12
  <th></th>
12 13
  </tr></thead>
13 14
  <tbody>
14 15
<% for role in @roles %>
15 16
  <tr class="<%= role.builtin? ? "builtin" : "givable" %>">
16 17
  <td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
18
  <td>
19
    <% unless role.workflow_rules.exists? || role.builtin? %>
20
      <span class="icon icon-warning">
21
        <%= l(:text_role_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:role_id => role) %>)
22
      </span>
23
    <% end %>
24
  </td>
17 25
  <td class="buttons">
18 26
    <%= reorder_handle(role) unless role.builtin? %>
19 27
    <%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %>
config/locales/en.yml
1130 1130
  text_caracters_minimum: "Must be at least %{count} characters long."
1131 1131
  text_length_between: "Length between %{min} and %{max} characters."
1132 1132
  text_tracker_no_workflow: No workflow defined for this tracker
1133
  text_role_no_workflow: No workflow defined for this role
1133 1134
  text_unallowed_characters: Unallowed characters
1134 1135
  text_comma_separated: Multiple values allowed (comma separated).
1135 1136
  text_line_separated: Multiple values allowed (one line for each value).