zncstrap/modules/lastseen/tmpl/index.tmpl

53 lines
2.3 KiB
Cheetah

<? INC Header.tmpl ?>
<div class="container col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Last Seen</div>
<div class="panel-body">
<div class="row">
<div class="col-md-4 col-md-offset-8">
<div class="input-group custom-search-form" style=".custom-search-form{margin-top:5px;}">
<input class="form-control" id="system-search" name="q" placeholder="Search..." required>
<span class="input-group-btn">
<button type="submit" class="btn btn-default">
<span class="fa fa-search"></span>
</button>
</span>
</div>
</div>
</div>
<br>
<table class="table table-bordered table-hover table-striped table-list-search">
<thead>
<tr>
<td>User</td>
<td>Last Seen</td>
<td>Info</td>
<? IF WebAdminLoaded ?><td>Action</td><? ENDIF ?>
</tr>
</thead>
<tbody>
<? LOOP UserLoop ?>
<tr>
<td><? VAR Username ?></td>
<td><? VAR LastSeen DEFAULT="- unknown -" ?></td>
<td><? VAR Info ?> <? VAR Ident ?></td>
<? IF WebAdminLoaded TOP ?>
<td>
<a href="<? VAR URIPrefix TOP ?>/mods/global/webadmin/edituser?user=<?VAR Username ESC=URL?>" class="btn btn-primary btn-xs">Edit</a>
<? IF !IsSelf ?>
<a href="<? VAR URIPrefix TOP ?>/mods/global/webadmin/deluser?user=<?VAR Username ESC=URL?>" class="btn btn-danger btn-xs">Delete</a>
<? ENDIF ?>
</td>
<? ENDIF ?>
</tr>
<? ENDLOOP ?>
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">$(document).ready(function(){var e=$(".list-group-item.active");$("#system-search").keyup(function(){var e=this;var t=$(".table-list-search tbody");var n=$(".table-list-search tbody tr");$(".search-sf").remove();n.each(function(r,i){var s=$(i).text().toLowerCase();var o=$(e).val().toLowerCase();if(o!=""){$(".search-query-sf").remove();t.prepend('<tr class="search-query-sf"><td colspan="6"><strong>Searching for: "'+$(e).val()+'"</strong></td></tr>')}else{$(".search-query-sf").remove()}if(s.indexOf(o)==-1){n.eq(r).hide()}else{$(".search-sf").remove();n.eq(r).show()}});if(n.children(":visible").length==0){t.append('<tr class="search-sf"><td class="text-muted" colspan="6">No entries found.</td></tr>')}})})</script>
<? INC Footer.tmpl ?>