summaryrefslogtreecommitdiffstats
path: root/app/views/roles
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-17 07:40:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-17 07:40:39 +0000
commit42b5c332b2c24c8dcc2581e0cd130ef930959d99 (patch)
tree3ddade3fa50427138419d48c57b20d93ac960048 /app/views/roles
parent64afa24a7f72526a2cbf6761e51b6cd326aa0c36 (diff)
downloadredmine-42b5c332b2c24c8dcc2581e0cd130ef930959d99.tar.gz
redmine-42b5c332b2c24c8dcc2581e0cd130ef930959d99.zip
Lists can be reordered with drag and drop (#12909).
git-svn-id: http://svn.redmine.org/redmine/trunk@15336 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/roles')
-rw-r--r--app/views/roles/index.html.erb15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb
index f9855f181..8f059648b 100644
--- a/app/views/roles/index.html.erb
+++ b/app/views/roles/index.html.erb
@@ -5,22 +5,17 @@
<h2><%=l(:label_role_plural)%></h2>
-<table class="list">
+<table class="list roles">
<thead><tr>
<th><%=l(:label_role)%></th>
- <th><%=l(:button_sort)%></th>
<th></th>
</tr></thead>
<tbody>
<% for role in @roles %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr class="<%= cycle("odd", "even") %> <%= role.builtin? ? "builtin" : "givable" %>">
<td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
- <td class="reorder">
- <% unless role.builtin? %>
- <%= reorder_links('role', {:action => 'update', :id => role, :page => params[:page]}, :put) %>
- <% end %>
- </td>
<td class="buttons">
+ <%= reorder_handle(role) unless role.builtin? %>
<%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %>
<%= delete_link role_path(role) unless role.builtin? %>
</td>
@@ -30,3 +25,7 @@
</table>
<% html_title(l(:label_role_plural)) -%>
+
+<%= javascript_tag do %>
+ $(function() { $("table.roles tbody").positionedItems({items: ".givable"}); });
+<% end %> \ No newline at end of file