70 lines
2.5 KiB
Cheetah
70 lines
2.5 KiB
Cheetah
<? I18N znc-webadmin ?>
|
|
<? INC Header.tmpl ?>
|
|
|
|
<div class="container col-md-10 col-md-offset-1">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">List of Users</div>
|
|
<div class="panel-body">
|
|
<?IF !UserLoop?>
|
|
<div class="alert alert-warning">
|
|
<? FORMAT "There are no users defined. Click <a href="{1}adduser">here</a> if you would like to add one." "ModPath TOP" ?>
|
|
</div>
|
|
<?ELSE?>
|
|
|
|
<div class="table">
|
|
<input type="text" class="form-control input-lg" id="inputSearch" onkeyup="UserSearch()" placeholder="Search..." title="Type in a user">
|
|
<br>
|
|
<table class="table table-bordered table-hover" id="users">
|
|
<thead>
|
|
<tr class="header">
|
|
<th><a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>adduser" class="btn btn-default btn-xs"><? FORMAT "Add" ?></a></th>
|
|
<th><? FORMAT "Username" ?></th>
|
|
<th><? FORMAT "Networks" ?></th>
|
|
<th><? FORMAT "Clients" ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?LOOP UserLoop SORTASC=Username ?>
|
|
<tr class="<?IF __EVEN__?>evenrow<?ELSE?>oddrow<?ENDIF?>">
|
|
<td>
|
|
<span class="nowrap">
|
|
<a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>edituser?user=<?VAR Username ESC=URL?>" class="btn btn-primary btn-xs"><? FORMAT "Edit" ?></a>
|
|
<a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>adduser?clone=<? VAR Username ESC=URL ?>" alt="Clone <? VAR Username ESC=URL ?>" class="btn btn-warning btn-xs"><? FORMAT "Clone" ?></a>
|
|
<? IF !IsSelf ?><a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>deluser?user=<?VAR Username ESC=URL?>" class="btn btn-danger btn-xs"><? FORMAT "Delete" ?></a><? ENDIF ?>
|
|
</span>
|
|
</td>
|
|
<td><? VAR Username ?></td>
|
|
<td><? VAR Networks ?></td>
|
|
<td><? VAR Clients ?></td>
|
|
</tr>
|
|
<?ENDLOOP?>
|
|
</tbody>
|
|
</table>
|
|
<?ENDIF?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function UserSearch() {
|
|
var input, filter, table, tr, td, i;
|
|
input = document.getElementById("inputSearch");
|
|
filter = input.value.toUpperCase();
|
|
table = document.getElementById("users");
|
|
tr = table.getElementsByTagName("tr");
|
|
for (i = 0; i < tr.length; i++) {
|
|
td = tr[i].getElementsByTagName("td")[1];
|
|
if (td) {
|
|
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
|
|
tr[i].style.display = "";
|
|
} else {
|
|
tr[i].style.display = "none";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
</script>
|
|
<? INC Footer.tmpl ?> |