2017-07-28 10:35:18 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Implementation of RemoveUserFromProcesses view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @license GPL 2
|
|
|
|
* @version @version@
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2017 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include parent class
|
|
|
|
*/
|
|
|
|
require_once("class.Bootstrap.php");
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class which outputs the html page for RemoveUserFromProcesses view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2017 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
|
|
|
|
|
|
|
|
function show() { /* {{{ */
|
|
|
|
$dms = $this->params['dms'];
|
|
|
|
$user = $this->params['user'];
|
|
|
|
$rmuser = $this->params['rmuser'];
|
|
|
|
|
|
|
|
$this->htmlStartPage(getMLText("admin_tools"));
|
|
|
|
$this->globalNavigation();
|
|
|
|
$this->contentStart();
|
|
|
|
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
2017-07-31 09:29:24 +00:00
|
|
|
$this->contentHeading(getMLText("rm_user_from_processes"));
|
2017-07-28 10:35:18 +00:00
|
|
|
|
2017-07-31 09:29:24 +00:00
|
|
|
?>
|
|
|
|
<div class="alert">
|
|
|
|
<?php printMLText("confirm_rm_user_from_processes", array ("username" => htmlspecialchars($rmuser->getFullName())));?>
|
|
|
|
</div>
|
|
|
|
<?php
|
2017-07-28 12:57:17 +00:00
|
|
|
$this->contentContainerStart();
|
2017-07-28 10:35:18 +00:00
|
|
|
?>
|
2017-07-31 09:29:24 +00:00
|
|
|
<form class="form-horizontal" action="../op/op.UsrMgr.php" name="form1" method="post">
|
2017-07-28 10:35:18 +00:00
|
|
|
<input type="hidden" name="userid" value="<?php print $rmuser->getID();?>">
|
|
|
|
<input type="hidden" name="action" value="removefromprocesses">
|
|
|
|
<?php echo createHiddenFieldWithKey('removefromprocesses'); ?>
|
|
|
|
|
2017-07-28 12:57:17 +00:00
|
|
|
<?php
|
|
|
|
$reviewStatus = $rmuser->getReviewStatus();
|
|
|
|
$tmpr = array();
|
2019-11-19 08:34:41 +00:00
|
|
|
$cr = array("-2"=>0, '-1'=>0, '0'=>0, '1'=>0);
|
2017-07-28 12:57:17 +00:00
|
|
|
foreach($reviewStatus['indstatus'] as $ri) {
|
2019-11-19 06:25:53 +00:00
|
|
|
$doc = $dms->getDocument($ri['documentID']);
|
|
|
|
$ri['latest'] = $doc->getLatestContent()->getVersion();
|
2019-11-19 08:34:41 +00:00
|
|
|
if($ri['latest'] == $ri['version'])
|
|
|
|
$cr[$ri['status']]++;
|
2017-07-28 12:57:17 +00:00
|
|
|
if(isset($tmpr[$ri['status']]))
|
|
|
|
$tmpr[$ri['status']][] = $ri;
|
|
|
|
else
|
|
|
|
$tmpr[$ri['status']] = array($ri);
|
|
|
|
}
|
|
|
|
|
|
|
|
$approvalStatus = $rmuser->getApprovalStatus();
|
|
|
|
$tmpa = array();
|
2019-11-19 08:34:41 +00:00
|
|
|
$ca = array("-2"=>0, '-1'=>0, '0'=>0, '1'=>0);
|
2017-07-28 12:57:17 +00:00
|
|
|
foreach($approvalStatus['indstatus'] as $ai) {
|
2019-11-19 09:04:49 +00:00
|
|
|
$doc = $dms->getDocument($ai['documentID']);
|
2019-11-19 06:25:53 +00:00
|
|
|
$ai['latest'] = $doc->getLatestContent()->getVersion();
|
2019-11-19 08:34:41 +00:00
|
|
|
if($ai['latest'] == $ai['version'])
|
|
|
|
$ca[$ai['status']]++;
|
2017-07-28 12:57:17 +00:00
|
|
|
if(isset($tmpa[$ai['status']]))
|
|
|
|
$tmpa[$ai['status']][] = $ai;
|
|
|
|
else
|
|
|
|
$tmpa[$ai['status']] = array($ai);
|
|
|
|
}
|
|
|
|
?>
|
2017-07-31 11:21:56 +00:00
|
|
|
<?php if(isset($tmpr["0"])) { ?>
|
2017-07-31 09:29:24 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox">
|
2019-11-19 08:34:41 +00:00
|
|
|
<input type="checkbox" name="status[review][]" value="0" checked> <?php echo getMLText('reviews_not_touched', array('no_reviews' => count($tmpr["0"]))); ?> <?php echo getMLText('reviews_not_touched_latest', array('no_reviews' => $cr["0"])); ?>
|
2017-07-31 09:29:24 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-28 12:57:17 +00:00
|
|
|
<?php } ?>
|
2017-07-31 11:21:56 +00:00
|
|
|
<?php if(isset($tmpr["1"])) { ?>
|
2017-07-31 09:29:24 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox">
|
2019-11-19 08:34:41 +00:00
|
|
|
<input type="checkbox" name="status[review][]" value="1"> <?php echo getMLText('reviews_accepted', array('no_reviews' => count($tmpr["1"]))); ?> <?php echo getMLText('reviews_accepted_latest', array('no_reviews' => $cr["1"])); ?><br />
|
2017-07-31 09:29:24 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-28 12:57:17 +00:00
|
|
|
<?php } ?>
|
2017-07-31 11:21:56 +00:00
|
|
|
<?php if(isset($tmpr["-1"])) { ?>
|
2017-07-31 09:29:24 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox">
|
2019-11-19 08:34:41 +00:00
|
|
|
<input type="checkbox" name="status[review][]" value="-1"> <?php echo getMLText('reviews_rejected', array('no_reviews' => count($tmpr["-1"]))); ?> <?php echo getMLText('reviews_rejected_latest', array('no_reviews' => $cr["-1"])); ?><br />
|
2017-07-31 11:21:56 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php if(isset($tmpa["0"])) { ?>
|
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox">
|
2019-11-19 08:34:41 +00:00
|
|
|
<input type="checkbox" name="status[approval][]" value="0" checked> <?php echo getMLText('approvals_not_touched', array('no_approvals' => count($tmpa["0"]))); ?> <?php echo getMLText('approvals_not_touched_latest', array('no_approvals' => $ca["0"])); ?>
|
2017-07-31 11:21:56 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
<?php if(isset($tmpa["1"])) { ?>
|
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox">
|
2019-11-19 08:34:41 +00:00
|
|
|
<input type="checkbox" name="status[approval][]" value="1"> <?php echo getMLText('approvals_accepted', array('no_approvals' => count($tmpa["1"]))); ?> <?php echo getMLText('approvals_accepted_latest', array('no_approvals' => $ca["1"])); ?><br />
|
2017-07-31 11:21:56 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
<?php if(isset($tmpa["-1"])) { ?>
|
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox">
|
2019-11-19 08:34:41 +00:00
|
|
|
<input type="checkbox" name="status[approval][]" value="-1"> <?php echo getMLText('approvals_rejected', array('no_approvals' => count($tmpa["-1"]))); ?> <?php echo getMLText('approvals_rejected_latest', array('no_approvals' => $ca["-1"])); ?><br />
|
2017-07-31 09:29:24 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-28 12:57:17 +00:00
|
|
|
<?php } ?>
|
|
|
|
|
2017-07-31 09:29:24 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<button type="submit" class="btn"><i class="icon-remove"></i> <?php printMLText("rm_user_from_processes");?></button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-28 10:35:18 +00:00
|
|
|
|
|
|
|
</form>
|
|
|
|
<?php
|
|
|
|
$this->contentContainerEnd();
|
|
|
|
$this->contentEnd();
|
|
|
|
$this->htmlEndPage();
|
|
|
|
} /* }}} */
|
|
|
|
}
|
|
|
|
?>
|