improve bulk update req ui

This commit is contained in:
r888888888
2015-04-21 17:22:16 -07:00
parent 3a66e521fc
commit ee4c19a0dd
6 changed files with 17 additions and 6 deletions

View File

@@ -14,13 +14,13 @@
<td><%= link_to_user(request.user) %></td>
<td><%= link_to(request.forum_topic_id, forum_topic_path(request.forum_topic_id)) %></td>
<td><%= script_with_line_breaks(request.script) %></td>
<td><%= request.status %></td>
<td id="request-status-for-<%= request.id %>"><%= request.status %></td>
<td>
<% if CurrentUser.is_moderator? && request.status == "pending" %>
<%= link_to "Approve", approve_bulk_update_request_path(request), :method => :post %> |
<%= link_to "Approve", approve_bulk_update_request_path(request), :remote => true, :method => :post %> |
<% end %>
<% if request.editable?(CurrentUser.user) %>
<%= link_to "Delete", bulk_update_request_path(request), :method => :delete, :data => {:confirm => "Are you sure you want to delete this bulk update request?"} %> |
<%= link_to "Delete", bulk_update_request_path(request), :method => :delete, :remote => true, :data => {:confirm => "Are you sure you want to delete this bulk update request?"} %> |
<%= link_to "Edit", edit_bulk_update_request_path(request) %>
<% end %>
</td>

View File

@@ -0,0 +1 @@
$("#request-status-for-<%= @bulk_update_request.id %>").html("queued");

View File

@@ -0,0 +1 @@
$("#request-status-for-<%= @bulk_update_request.id %>").html("rejected");