mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-09 11:29:01 +00:00
add methods to show number of reviewers/approvers all ready done their work
This commit is contained in:
parent
938b417bfc
commit
4330c7fc7b
|
@ -3170,11 +3170,37 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= '<span title="'.getOverallStatusText($status["status"]).': '.($workflow ? htmlspecialchars($workflow->getName()) : '').'">'.($workflowstate ? htmlspecialchars($workflowstate->getName()) : '').'</span>';
|
||||
} else {
|
||||
$content .= $this->getOverallStatusIcon($status['status']);
|
||||
if($status['status'] == S_DRAFT_REV)
|
||||
$content .= '<br>'.$this->documentListRowReviewBar($latestContent);
|
||||
elseif($status['status'] == S_DRAFT_APP)
|
||||
$content .= '<br>'.$this->documentListRowApprovalBar($latestContent);
|
||||
}
|
||||
$content .= "</div>";
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowReviewBar($latestContent) { /* {{{ */
|
||||
$accessop = $this->params['accessobject'];
|
||||
|
||||
$content = '';
|
||||
$stat = [];
|
||||
if($accessop->check_view_access($this, array('action'=>'reviewBar')) /*$owner->getID() == $user->getID()*/ && $reviewStatus = $latestContent->getReviewStatus(1, $stat)) {
|
||||
$content .= getMLText('n_of_m_reviewed', ['reviewed'=>$stat['1'], 'total'=>$stat["1"]+$stat["0"]]);
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowApprovalBar($latestContent) { /* {{{ */
|
||||
$accessop = $this->params['accessobject'];
|
||||
|
||||
$content = '';
|
||||
$stat = [];
|
||||
if($accessop->check_view_access($this, array('action'=>'approvalBar')) /*$owner->getID() == $user->getID()*/ && $approvalStatus = $latestContent->getApprovalStatus(1, $stat)) {
|
||||
$content .= getMLText('n_of_m_approved', ['approved'=>$stat['1'], 'total'=>$stat["1"]+$stat["0"]]);
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowAction($document, $previewer, $skipcont=false, $version=0, $extracontent=array()) { /* {{{ */
|
||||
$user = $this->params['user'];
|
||||
$session = $this->params['session'];
|
||||
|
|
|
@ -3220,11 +3220,37 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= '<span title="'.getOverallStatusText($status["status"]).': '.($workflow ? htmlspecialchars($workflow->getName()) : '').'">'.($workflowstate ? htmlspecialchars($workflowstate->getName()) : '').'</span>';
|
||||
} else {
|
||||
$content .= $this->getOverallStatusIcon($status['status']);
|
||||
if($status['status'] == S_DRAFT_REV)
|
||||
$content .= '<br>'.$this->documentListRowReviewBar($latestContent);
|
||||
elseif($status['status'] == S_DRAFT_APP)
|
||||
$content .= '<br>'.$this->documentListRowApprovalBar($latestContent);
|
||||
}
|
||||
$content .= "</div>";
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowReviewBar($latestContent) { /* {{{ */
|
||||
$accessop = $this->params['accessobject'];
|
||||
|
||||
$content = '';
|
||||
$stat = [];
|
||||
if($accessop->check_view_access($this, array('action'=>'reviewBar')) /*$owner->getID() == $user->getID()*/ && $reviewStatus = $latestContent->getReviewStatus(1, $stat)) {
|
||||
$content .= getMLText('n_of_m_reviewed', ['reviewed'=>$stat['1'], 'total'=>$stat["1"]+$stat["0"]]);
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowApprovalBar($latestContent) { /* {{{ */
|
||||
$accessop = $this->params['accessobject'];
|
||||
|
||||
$content = '';
|
||||
$stat = [];
|
||||
if($accessop->check_view_access($this, array('action'=>'approvalBar')) /*$owner->getID() == $user->getID()*/ && $approvalStatus = $latestContent->getApprovalStatus(1, $stat)) {
|
||||
$content .= getMLText('n_of_m_approved', ['approved'=>$stat['1'], 'total'=>$stat["1"]+$stat["0"]]);
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowAction($document, $previewer, $skipcont=false, $version=0, $extracontent=array()) { /* {{{ */
|
||||
$user = $this->params['user'];
|
||||
$session = $this->params['session'];
|
||||
|
|
Loading…
Reference in New Issue
Block a user