/
list.phtml
120 lines (109 loc) · 5.82 KB
/
list.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{include file="header.phtml"}
{assign var='changePwdParams' value="open: true, iframe: true, transition: 'elastic', width: '700px', height: '270px'"}
{assign var='addAdminParams' value="open: true, iframe: true, transition: 'elastic', width: '500px', height: '400px'"}
{assign var='domainListParams' value="open: true, iframe: true, transition: 'elastic', width: '700px', height: '600px'"}
<div class="page-content" >
<div class="page-header" >
<div style="float: right; margin-top: -10px;">
<div class="btn-toolbar">
<span class="btn-group">
<a class="btn" id="modal-dialog-add_admin" title="Add Admin" href="{genUrl controller='admin' action='add' modal=true}">
<i class="icon-plus"></i>
</a>
</span>
<script>
$( document ).ready( function(){
$( '#modal-dialog-add_admin' ).tooltip( { delay: { show: 500, hide: 2 }, trigger: 'hover', placement: 'bottom' } );
});
</script>
</div>
</div>
<h1>Administrators</h1>
</div>
{ViMbAdmin_Messages}
<table id="admin_list_table" cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered">
<thead>
<tr>
<th>Username</th>
<th width="55">Active</th>
<th width="55">Super</th>
<th width="115"></th>
</tr>
</thead>
<tbody>
{foreach $admins as $oneAdmin}
<tr id="admin_{$oneAdmin.id}">
<td>{$oneAdmin.username}</td>
<td>
<div id="throb-toggle-active-{$oneAdmin.id}" style="float: right;"></div>
{if $identity.admin.id != $oneAdmin.id}
<span id="toggle-active-{$oneAdmin.id}" onclick="toggleActive( 'toggle-active-{$oneAdmin.id}', {$oneAdmin.id} );" class="btn btn-mini {if $oneAdmin.active}btn-success{else}btn-danger{/if}">{$oneAdmin.active|yesno}</span>
{else}
<span id="toggle-active-{$oneAdmin.id}" class="btn btn-mini disabled {if $oneAdmin.active}btn-success{else}btn-danger{/if}">{$oneAdmin.active|yesno}</span>
{/if}
</td>
<td>
<div id="throb-toggle-super-{$oneAdmin.id}" style="float: right;"></div>
{if $identity.admin.id != $oneAdmin.id}
<span id="toggle-super-{$oneAdmin.id}" onclick="toggleSuper( 'toggle-super-{$oneAdmin.id}', {$oneAdmin.id} );" class="btn btn-mini {if $oneAdmin.super}btn-success{else}btn-danger{/if}">{$oneAdmin.super|yesno}</span>
{else}
<span id="toggle-super-{$oneAdmin.id}" class="btn btn-mini disabled {if $oneAdmin.super}btn-success{else}btn-danger{/if}">{$oneAdmin.super|yesno}</span>
{/if}
</td>
<td>
<div class="btn-group">
<a class="btn btn-mini" id="modal-dialog-password-{$oneAdmin.id}" title="Password" href="{genUrl controller='admin' action='password' modal=true aid=$oneAdmin.id}">
<i class="icon-lock"></i>
</a>
<a class="btn btn-mini" id="admin_logs_{$oneAdmin.id}" title="Logs" href="{genUrl controller='log' action='list'}/aid/{$oneAdmin.id}">
<i class="icon-align-justify"></i>
</a>
{if $identity.admin.id neq $oneAdmin.id}
<span class="btn btn-mini" id="purge-admin-{$oneAdmin.id}" title="Purge" onclick="purgeAdmin( {$oneAdmin.id}, '{$oneAdmin.username}' );">
<icon class="icon-trash"></i>
</span>
{/if}
{if not $oneAdmin.super}
<a class="btn btn-mini" id="admin_domains_{$oneAdmin.id}" title="List Domains" href="{genUrl controller='admin' action='domains'}/aid/{$oneAdmin.id}">
<i class="icon-screenshot"></i>
</a>
{/if}
</div>
<script>
$( document ).ready( function(){
$( '#modal-dialog-password-{$oneAdmin.id}' ).tooltip( { delay: { show: 500, hide: 2 }, trigger: 'hover' } );
$( '#admin_logs_{$oneAdmin.id}' ).tooltip( { delay: { show: 500, hide: 2 }, trigger: 'hover' } );
{if $identity.admin.id neq $oneAdmin.id}
$( '#purge-admin-{$oneAdmin.id}' ).tooltip( { delay: { show: 500, hide: 2 }, trigger: 'hover' } );
{/if}
{if not $oneAdmin.super}
$( '#admin_domains_{$oneAdmin.id}' ).tooltip( { delay: { show: 500, hide: 2 }, trigger: 'hover' } );
{/if}
});
</script>
</td>
</tr>
{/foreach}
</tbody>
</table>
<div id="purge_dialog" class="modal hide fade">
<div class="modal-header">
<a href="#" class="close" data-dismiss="modal">×</a>
<h3>Are you sure?</h3>
</div>
<div class="modal-body">
Are you sure you want to purge <em id="purge_admin_name"></em> ?
<br /><br />
All logs and domain associations will be removed. If you simply want to
close the user's account, deactivate it instead.
<br /><br />
</div>
<div id="pdfooter" class="modal-footer">
<span class="btn btn-danger" id="purge_dialog_delete">Purge</span>
<button id="purge_dialog_cancel" class="btn">Cancel</button>
</div>
</div>
{include file='admin/js/list.js'}
<br />
</div>
{include file="footer.phtml"}