mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-02-07 17:11:55 +00:00
show statistics on how many have revised a document
This commit is contained in:
parent
c39ebeb164
commit
d1dde39bb3
|
|
@ -4,6 +4,7 @@
|
|||
- merge changes up to 5.1.41
|
||||
- Revisors can be set, even if revision date is not set
|
||||
- fix saving revision one vote reject
|
||||
- show statistics on how many have revised a document
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 6.0.33
|
||||
|
|
|
|||
|
|
@ -3313,6 +3313,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= '<br>'.$this->documentListRowReviewBar($latestContent);
|
||||
elseif($status['status'] == S_DRAFT_APP)
|
||||
$content .= '<br>'.$this->documentListRowApprovalBar($latestContent);
|
||||
elseif($status['status'] == S_IN_REVISION)
|
||||
$content .= '<br>'.$this->documentListRowRevisionBar($latestContent);
|
||||
}
|
||||
$content .= "</div>";
|
||||
return $content;
|
||||
|
|
@ -3369,6 +3371,17 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowRevisionBar($latestContent) { /* {{{ */
|
||||
$accessop = $this->params['accessobject'];
|
||||
|
||||
$content = '';
|
||||
$stat = [];
|
||||
if($accessop->check_view_access($this, array('action'=>'revisionBar')) /*$owner->getID() == $user->getID()*/ && $revisionStatus = $latestContent->getRevisionStatus(1, $stat)) {
|
||||
$content .= getMLText('n_of_m_revised', ['revised'=>$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'];
|
||||
|
|
|
|||
|
|
@ -335,7 +335,9 @@ class SeedDMS_View_Tasks extends SeedDMS_Theme_Style {
|
|||
$subitems = [];
|
||||
foreach($tasks['revision'] as $t) {
|
||||
$doc = $dms->getDocument($t['id']);
|
||||
$subitems[] = array('label'=>htmlspecialchars($doc->getName()), 'link'=>"../out/out.ViewDocument.php?documentid=".$doc->getID()."¤ttab=revision", 'class'=>"table-row-document", 'rel'=>"document_".$doc->getID());
|
||||
$stat = [];
|
||||
$revisionstatus = $doc->getLatestContent()->getRevisionStatus(1, $stat);
|
||||
$subitems[] = array('label'=>htmlspecialchars($doc->getName()).' ('.$stat[1].'/'.($stat['0']+$stat['1']).')', 'link'=>"../out/out.ViewDocument.php?documentid=".$doc->getID()."¤ttab=revision", 'class'=>"table-row-document", 'rel'=>"document_".$doc->getID());
|
||||
}
|
||||
$menuitems['tasks']['children']['revision'] = array('label'=>getMLText('documents_to_revise'), 'children'=>$subitems);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3287,6 +3287,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= '<br>'.$this->documentListRowReviewBar($latestContent);
|
||||
elseif($status['status'] == S_DRAFT_APP)
|
||||
$content .= '<br>'.$this->documentListRowApprovalBar($latestContent);
|
||||
elseif($status['status'] == S_IN_REVISION)
|
||||
$content .= '<br>'.$this->documentListRowRevisionBar($latestContent);
|
||||
}
|
||||
$content .= "</div>";
|
||||
return $content;
|
||||
|
|
@ -3344,6 +3346,17 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function documentListRowRevisionBar($latestContent) { /* {{{ */
|
||||
$accessop = $this->params['accessobject'];
|
||||
|
||||
$content = '';
|
||||
$stat = [];
|
||||
if($accessop->check_view_access($this, array('action'=>'revisionBar')) /*$owner->getID() == $user->getID()*/ && $revisionStatus = $latestContent->getRevisionStatus(1, $stat)) {
|
||||
$content .= getMLText('n_of_m_revised', ['revised'=>$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