made sure the table refreshes after an update
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<div id="dt_example" class="example_alt_pagination">
|
||||
<table class="table table-striped table-hover table-bordered pull-left" id="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Email
|
||||
</th>
|
||||
<th>
|
||||
Admin User
|
||||
</th>
|
||||
<th>
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @users.each do |u|%>
|
||||
<tr>
|
||||
<td style="word-wrap:break-word;">
|
||||
<%= "#{u.first_name} #{u.last_name}"%>
|
||||
</td>
|
||||
<td>
|
||||
<%= u.email%>
|
||||
</td>
|
||||
<td>
|
||||
<%= u.admin ? %{<span class="fs1" aria-hidden="true" data-icon=""}.html_safe : nil %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to "Edit", "#", {:onClick => "javascript:openModal(#{u.id});" ,:role => "button", :class => "btn btn-inverse", "data-toggle" => "modal"}%>
|
||||
<%= link_to "Delete", "#", {:class => "btn btn-danger"}%>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="editAcct" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +54,7 @@
|
||||
type: "POST",
|
||||
success: function(response) {
|
||||
$('#success').show(500).delay(1500).fadeOut();
|
||||
loadTable();
|
||||
},
|
||||
error: function(event) {
|
||||
$('#failure').show(500).delay(1500).fadeOut();
|
||||
|
||||
Reference in New Issue
Block a user