piler/webui/view/theme/default/templates/user/list.tpl

72 lines
5.1 KiB
Smarty
Raw Normal View History

2013-04-05 10:16:33 +02:00
<form method="post" name="search1" action="index.php?route=user/list" class="form-inline pull-right">
<div class="input-append">
<input type="text" name="search" class="input-medium" value="<?php print $search; ?>" />
<input type="submit" class="btn" value="<?php print $text_search; ?>" />
</div>
2012-02-08 23:14:28 +01:00
</form>
2013-04-05 10:16:33 +02:00
<p><a href="index.php?route=user/add"><i class="icon-plus"></i>&nbsp;<?php print $text_add_new_user_alias; ?></a></p>
2012-02-08 23:14:28 +01:00
2013-04-05 10:16:33 +02:00
<h4><?php print $text_existing_users; ?></h4>
2012-02-08 23:14:28 +01:00
<?php if(isset($users)){ ?>
<div id="pagenav">
2013-04-05 10:16:33 +02:00
<?php if($page > 0){ ?><a href="index.php?route=user/list&amp;page=0&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-double-angle-left"></i><?php if($page > 0){ ?></a><?php } ?>
&nbsp;
<?php if($page > 0){ ?><a href="index.php?route=user/list&amp;page=<?php print $prev_page; ?>&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-angle-left"></i><?php if($page > 0){ ?></a><?php } ?>
&nbsp;
2012-02-08 23:14:28 +01:00
<?php print $users[0][$sort]; ?> - <?php print $users[count($users)-1][$sort]; ?>
2013-04-05 10:16:33 +02:00
&nbsp;
<?php if($total_users >= $page_len*($page+1) && $total_users > $page_len){ ?><a href="index.php?route=user/list&amp;page=<?php print $next_page; ?>&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-angle-right"></i><?php if($total_users >= $page_len*($page+1) && $total_users > $page_len){ ?></a><?php } ?>
&nbsp;
<?php if($page < $total_pages){ ?><a href="index.php?route=user/list&amp;page=<?php print $total_pages; ?>&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-double-angle-right"></i><?php if($page < $total_pages){ ?></a><?php } ?>
2012-02-08 23:14:28 +01:00
</div>
2013-04-05 10:16:33 +02:00
<table class="table table-striped table-condensed" id="ss1">
<tr class="domainrow">
<th><?php print $text_realname; ?> <a href="index.php?route=user/list&amp;sort=realname&amp;order=0"><i class="icon-chevron-up"></i> <a href="index.php?route=user/list&amp;sort=realname&amp;order=1"><i class="icon-chevron-down"></i></a></th>
<th><?php print $text_email; ?> <a href="index.php?route=user/list&amp;sort=email&amp;order=0"><i class="icon-chevron-up"></i> <a href="index.php?route=user/list&amp;sort=email&amp;order=1"><i class="icon-chevron-down"></i></a></th>
<th><?php print $text_role; ?> <a href="index.php?route=user/list&amp;sort=role&amp;order=0"><i class="icon-chevron-up"></i> <a href="index.php?route=user/list&amp;sort=role&amp;order=1"><i class="icon-chevron-down"></i></a></th>
<th>&nbsp;</th>
</tr>
2012-02-08 23:14:28 +01:00
<?php foreach($users as $user) { ?>
2013-04-05 10:16:33 +02:00
<tr class="domainrow">
<td class="domaincell"><?php print $user['realname']; ?></td>
<td class="domaincell"><?php if($user['email'] != $user['shortemail']){ ?><span><?php print $user['shortemail']; ?></span><?php } else { print $user['email']; } ?></td>
<td class="domaincell">
2012-02-08 23:14:28 +01:00
<?php
if($user['isadmin'] == 0){ print $text_user_regular; }
if($user['isadmin'] == 1){ print $text_user_masteradmin; }
if($user['isadmin'] == 2){ print $text_user_auditor; }
if($user['isadmin'] == 3){ print $text_user_read_only_admin; }
?>
2013-04-05 10:16:33 +02:00
</td>
<td class="domaincell"><a href="index.php?route=user/edit&amp;uid=<?php print $user['uid']; ?>"><?php print $text_edit_or_view; ?></a></td>
</tr>
2012-02-08 23:14:28 +01:00
<?php } ?>
2013-04-05 10:16:33 +02:00
</table>
2012-02-08 23:14:28 +01:00
<div id="pagenav">
2013-04-05 10:16:33 +02:00
<?php if($page > 0){ ?><a href="index.php?route=user/list&amp;page=0&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-double-angle-left"></i><?php if($page > 0){ ?></a><?php } ?>
&nbsp;
<?php if($page > 0){ ?><a href="index.php?route=user/list&amp;page=<?php print $prev_page; ?>&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-angle-left"></i><?php if($page > 0){ ?></a><?php } ?>
&nbsp;
2012-02-08 23:14:28 +01:00
<?php print $users[0][$sort]; ?> - <?php print $users[count($users)-1][$sort]; ?>
2013-04-05 10:16:33 +02:00
&nbsp;
<?php if($total_users >= $page_len*($page+1) && $total_users > $page_len){ ?><a href="index.php?route=user/list&amp;page=<?php print $next_page; ?>&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-angle-right"></i><?php if($total_users >= $page_len*($page+1) && $total_users > $page_len){ ?></a><?php } ?>
&nbsp;
<?php if($page < $total_pages){ ?><a href="index.php?route=user/list&amp;page=<?php print $total_pages; ?>&amp;search=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?><i class="icon-double-angle-right"></i><?php if($page < $total_pages){ ?></a><?php } ?>
2012-02-08 23:14:28 +01:00
</div>
<?php } else { ?>
2013-04-05 10:16:33 +02:00
<div class="alert alert-error lead">
2012-02-08 23:14:28 +01:00
<?php print $text_not_found; ?>
2013-04-05 10:16:33 +02:00
</div>
2012-02-08 23:14:28 +01:00
<?php } ?>