2013-04-19 07:00:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Implementation of SubstituteUser view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @license GPL 2
|
|
|
|
* @version @version@
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010-2012 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include parent class
|
|
|
|
*/
|
|
|
|
require_once("class.Bootstrap.php");
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class which outputs the html page for SubstituteUser view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010-2012 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style {
|
|
|
|
|
2016-01-27 16:33:40 +00:00
|
|
|
function js() { /* {{{ */
|
|
|
|
} /* }}} */
|
|
|
|
|
2013-04-19 07:00:34 +00:00
|
|
|
function show() { /* {{{ */
|
|
|
|
$dms = $this->params['dms'];
|
|
|
|
$user = $this->params['user'];
|
|
|
|
$allUsers = $this->params['allusers'];
|
|
|
|
|
|
|
|
$this->htmlStartPage(getMLText("substitute_user"));
|
|
|
|
$this->globalNavigation();
|
|
|
|
$this->contentStart();
|
|
|
|
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
|
|
|
|
|
|
|
$this->contentHeading(getMLText("substitute_user"));
|
|
|
|
$this->contentContainerStart();
|
|
|
|
?>
|
|
|
|
<table class="table table-condensed">
|
|
|
|
<tr><th><?php printMLText('name'); ?></th><th><?php printMLText('email');?></th><th><?php printMLText('groups'); ?></th><th></th></tr>
|
|
|
|
<?php
|
|
|
|
foreach ($allUsers as $currUser) {
|
|
|
|
echo "<tr>";
|
|
|
|
echo "<td>";
|
2016-01-27 05:48:39 +00:00
|
|
|
echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")<br />";
|
|
|
|
echo "<small>".htmlspecialchars($currUser->getComment())."</small>";
|
2013-04-19 07:00:34 +00:00
|
|
|
echo "</td>";
|
|
|
|
echo "<td>";
|
2016-01-27 05:48:39 +00:00
|
|
|
echo "<a href=\"mailto:".htmlspecialchars($currUser->getEmail())."\">".htmlspecialchars($currUser->getEmail())."</a><br />";
|
2013-04-19 07:00:34 +00:00
|
|
|
echo "</td>";
|
|
|
|
echo "<td>";
|
|
|
|
$groups = $currUser->getGroups();
|
|
|
|
if (count($groups) != 0) {
|
|
|
|
for ($j = 0; $j < count($groups); $j++) {
|
2016-01-27 05:48:39 +00:00
|
|
|
print htmlspecialchars($groups[$j]->getName());
|
2013-04-19 07:00:34 +00:00
|
|
|
if ($j +1 < count($groups))
|
|
|
|
print ", ";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo "</td>";
|
|
|
|
echo "<td>";
|
|
|
|
if($currUser->getID() != $user->getID()) {
|
2016-01-27 05:48:39 +00:00
|
|
|
echo "<a class=\"btn\" href=\"../op/op.SubstituteUser.php?userid=".((int) $currUser->getID())."\"><i class=\"icon-exchange\"></i> ".getMLText('substitute_user')."</a> ";
|
2013-04-19 07:00:34 +00:00
|
|
|
}
|
|
|
|
echo "</td>";
|
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
echo "</table>";
|
|
|
|
$this->contentContainerEnd();
|
|
|
|
|
|
|
|
$this->htmlEndPage();
|
|
|
|
} /* }}} */
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|