A7 - switching the var used in the view so that non-admins can view the admin panel
This commit is contained in:
@@ -59,7 +59,7 @@ function makeActive(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
function loadTable(){
|
function loadTable(){
|
||||||
$("#userDataTable").load("/admin/"+ <%=current_user.user_id %> + "/get_all_users")
|
$("#userDataTable").load("/admin/"+ <%= params[:admin_id] %> + "/get_all_users")
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ $('#delete_button').click(function() {
|
|||||||
$("#editAcct").modal('hide');
|
$("#editAcct").modal('hide');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/admin/" + <%= @user.user_id %> + "/delete_user.json",
|
url: "/admin/" + <%= params[:admin_id] %> + "/delete_user.json",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
$('#success').show(500).delay(1500).fadeOut();
|
$('#success').show(500).delay(1500).fadeOut();
|
||||||
|
|||||||
Reference in New Issue
Block a user