summaryrefslogtreecommitdiffstats
path: root/app/views/enumerations
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/enumerations
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/enumerations')
-rw-r--r--app/views/enumerations/index.html.erb13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/views/enumerations/index.html.erb b/app/views/enumerations/index.html.erb
index d1fb91926..5f1d2eafb 100644
--- a/app/views/enumerations/index.html.erb
+++ b/app/views/enumerations/index.html.erb
@@ -5,12 +5,11 @@
<% enumerations = klass.shared %>
<% if enumerations.any? %>
-<table class="list"><thead>
+<table class="list enumerations"><thead>
<tr>
<th><%= l(:field_name) %></th>
<th><%= l(:field_is_default) %></th>
<th><%= l(:field_active) %></th>
- <th><%=l(:button_sort)%></th>
<th></th>
</tr></thead>
<% enumerations.each do |enumeration| %>
@@ -18,8 +17,10 @@
<td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
<td class="tick"><%= checked_image enumeration.is_default? %></td>
<td class="tick"><%= checked_image enumeration.active? %></td>
- <td class="reorder"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td>
- <td class="buttons"><%= delete_link enumeration_path(enumeration) %></td>
+ <td class="buttons">
+ <%= reorder_handle(enumeration, :url => enumeration_path(enumeration), :param => 'enumeration') %>
+ <%= delete_link enumeration_path(enumeration) %>
+ </td>
</tr>
<% end %>
</table>
@@ -30,3 +31,7 @@
<% end %>
<% html_title(l(:label_enumerations)) -%>
+
+<%= javascript_tag do %>
+ $(function() { $("table.enumerations tbody").positionedItems(); });
+<% end %> \ No newline at end of file