##// END OF EJS Templates
Code cleanup, use named routes....
Jean-Philippe Lang -
r10848:b7d8913459ae
parent child
Show More
@@ -1,34 +1,34
1 1 <div class="contextual">
2 2 <%= link_to l(:label_role_new), new_role_path, :class => 'icon icon-add' %>
3 <%= link_to l(:label_permissions_report), {:action => 'permissions'}, :class => 'icon icon-summary' %>
3 <%= link_to l(:label_permissions_report), permissions_roles_path, :class => 'icon icon-summary' %>
4 4 </div>
5 5
6 6 <h2><%=l(:label_role_plural)%></h2>
7 7
8 8 <table class="list">
9 9 <thead><tr>
10 10 <th><%=l(:label_role)%></th>
11 11 <th><%=l(:button_sort)%></th>
12 12 <th></th>
13 13 </tr></thead>
14 14 <tbody>
15 15 <% for role in @roles %>
16 16 <tr class="<%= cycle("odd", "even") %>">
17 17 <td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), edit_role_path(role))) %></td>
18 18 <td align="center" style="width:15%;">
19 19 <% unless role.builtin? %>
20 20 <%= reorder_links('role', {:action => 'update', :id => role}, :put) %>
21 21 <% end %>
22 22 </td>
23 23 <td class="buttons">
24 24 <%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %>
25 25 <%= delete_link role_path(role) unless role.builtin? %>
26 26 </td>
27 27 </tr>
28 28 <% end %>
29 29 </tbody>
30 30 </table>
31 31
32 32 <p class="pagination"><%= pagination_links_full @role_pages %></p>
33 33
34 34 <% html_title(l(:label_role_plural)) -%>
@@ -1,77 +1,77
1 1 <h2><%= link_to l(:label_tracker_plural), trackers_path %> &#187; <%= l(:field_summary) %></h2>
2 2
3 3 <% if @trackers.any? %>
4 <%= form_tag({}) do %>
4 <%= form_tag fields_trackers_path do %>
5 5 <div class="autoscroll">
6 6 <table class="list">
7 7 <thead>
8 8 <tr>
9 9 <th></th>
10 10 <% @trackers.each do |tracker| %>
11 11 <th>
12 12 <%= tracker.name %>
13 13 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.tracker-#{tracker.id}')",
14 14 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
15 15 </th>
16 16 <% end %>
17 17 </tr>
18 18 </thead>
19 19 <tbody>
20 20 <tr class="group open">
21 21 <td colspan="<%= @trackers.size + 1 %>">
22 22 <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
23 23 <%= l(:field_core_fields) %>
24 24 </td>
25 25 </tr>
26 26 <% Tracker::CORE_FIELDS.each do |field| %>
27 27 <tr class="<%= cycle("odd", "even") %>">
28 28 <td>
29 29 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.core-field-#{field}')",
30 30 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
31 31 <%= l("field_#{field}".sub(/_id$/, '')) %>
32 32 </td>
33 33 <% @trackers.each do |tracker| %>
34 34 <td align="center">
35 35 <%= check_box_tag "trackers[#{tracker.id}][core_fields][]", field, tracker.core_fields.include?(field),
36 36 :class => "tracker-#{tracker.id} core-field-#{field}" %>
37 37 </td>
38 38 <% end %>
39 39 </tr>
40 40 <% end %>
41 41 <% if @custom_fields.any? %>
42 42 <tr class="group open">
43 43 <td colspan="<%= @trackers.size + 1 %>">
44 44 <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
45 45 <%= l(:label_custom_field_plural) %>
46 46 </td>
47 47 </tr>
48 48 <% @custom_fields.each do |field| %>
49 49 <tr class="<%= cycle("odd", "even") %>">
50 50 <td>
51 51 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
52 52 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
53 53 <%= field.name %>
54 54 </td>
55 55 <% @trackers.each do |tracker| %>
56 56 <td align="center">
57 57 <%= check_box_tag "trackers[#{tracker.id}][custom_field_ids][]", field.id, tracker.custom_fields.include?(field),
58 58 :class => "tracker-#{tracker.id} custom-field-#{field.id}" %>
59 59 </td>
60 60 <% end %>
61 61 </tr>
62 62 <% end %>
63 63 <% end %>
64 64 </tbody>
65 65 </table>
66 66 </div>
67 67 <p><%= submit_tag l(:button_save) %></p>
68 68 <% @trackers.each do |tracker| %>
69 69 <%= hidden_field_tag "trackers[#{tracker.id}][core_fields][]", '' %>
70 70 <%= hidden_field_tag "trackers[#{tracker.id}][custom_field_ids][]", '' %>
71 71 <% end %>
72 72 <% end %>
73 73 <% else %>
74 74 <p class="nodata"><%= l(:label_no_data) %></p>
75 75 <% end %>
76 76
77 77 <% html_title l(:field_summary) %>
@@ -1,31 +1,39
1 1 <div class="contextual">
2 2 <%= link_to l(:label_tracker_new), new_tracker_path, :class => 'icon icon-add' %>
3 <%= link_to l(:field_summary), {:action => 'fields'}, :class => 'icon icon-summary' %>
3 <%= link_to l(:field_summary), fields_trackers_path, :class => 'icon icon-summary' %>
4 4 </div>
5 5
6 6 <h2><%=l(:label_tracker_plural)%></h2>
7 7
8 8 <table class="list">
9 9 <thead><tr>
10 10 <th><%=l(:label_tracker)%></th>
11 11 <th></th>
12 12 <th><%=l(:button_sort)%></th>
13 13 <th></th>
14 14 </tr></thead>
15 15 <tbody>
16 16 <% for tracker in @trackers %>
17 17 <tr class="<%= cycle("odd", "even") %>">
18 18 <td><%= link_to h(tracker.name), edit_tracker_path(tracker) %></td>
19 <td align="center"><% unless tracker.workflow_rules.count > 0 %><span class="icon icon-warning"><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)</span><% end %></td>
20 <td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %></td>
19 <td align="center">
20 <% unless tracker.workflow_rules.count > 0 %>
21 <span class="icon icon-warning">
22 <%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:tracker_id => tracker) %>)
23 </span>
24 <% end %>
25 </td>
26 <td align="center" style="width:15%;">
27 <%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %>
28 </td>
21 29 <td class="buttons">
22 30 <%= delete_link tracker_path(tracker) %>
23 31 </td>
24 32 </tr>
25 33 <% end %>
26 34 </tbody>
27 35 </table>
28 36
29 37 <p class="pagination"><%= pagination_links_full @tracker_pages %></p>
30 38
31 39 <% html_title(l(:label_tracker_plural)) -%>
@@ -1,58 +1,58
1 1 <div class="contextual">
2 2 <%= link_to l(:label_user_new), new_user_path, :class => 'icon icon-add' %>
3 3 </div>
4 4
5 5 <h2><%=l(:label_user_plural)%></h2>
6 6
7 <%= form_tag({}, :method => :get) do %>
7 <%= form_tag(users_path, :method => :get) do %>
8 8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
9 9 <label for='status'><%= l(:field_status) %>:</label>
10 10 <%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
11 11
12 12 <% if @groups.present? %>
13 13 <label for='group_id'><%= l(:label_group) %>:</label>
14 14 <%= select_tag 'group_id', content_tag('option') + options_from_collection_for_select(@groups, :id, :name, params[:group_id].to_i), :onchange => "this.form.submit(); return false;" %>
15 15 <% end %>
16 16
17 17 <label for='name'><%= l(:label_user) %>:</label>
18 18 <%= text_field_tag 'name', params[:name], :size => 30 %>
19 19 <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
20 20 <%= link_to l(:button_clear), users_path, :class => 'icon icon-reload' %>
21 21 </fieldset>
22 22 <% end %>
23 23 &nbsp;
24 24
25 25 <div class="autoscroll">
26 26 <table class="list">
27 27 <thead><tr>
28 28 <%= sort_header_tag('login', :caption => l(:field_login)) %>
29 29 <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
30 30 <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
31 31 <%= sort_header_tag('mail', :caption => l(:field_mail)) %>
32 32 <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
33 33 <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
34 34 <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
35 35 <th></th>
36 36 </tr></thead>
37 37 <tbody>
38 38 <% for user in @users -%>
39 39 <tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>">
40 40 <td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
41 41 <td class="firstname"><%= h(user.firstname) %></td>
42 42 <td class="lastname"><%= h(user.lastname) %></td>
43 43 <td class="email"><%= mail_to(h(user.mail)) %></td>
44 44 <td align="center"><%= checked_image user.admin? %></td>
45 45 <td class="created_on" align="center"><%= format_time(user.created_on) %></td>
46 46 <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
47 47 <td class="buttons">
48 48 <%= change_status_link(user) %>
49 49 <%= delete_link user_path(user, :back_url => users_path(params)) unless User.current == user %>
50 50 </td>
51 51 </tr>
52 52 <% end -%>
53 53 </tbody>
54 54 </table>
55 55 </div>
56 56 <p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p>
57 57
58 58 <% html_title(l(:label_user_plural)) -%>
General Comments 0
You need to be logged in to leave comments. Login now