diff --git a/CHANGELOG b/CHANGELOG
index fc747795a..6e43911e0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index 7f23c6080..d4e985419 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -3313,6 +3313,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= '
'.$this->documentListRowReviewBar($latestContent);
elseif($status['status'] == S_DRAFT_APP)
$content .= '
'.$this->documentListRowApprovalBar($latestContent);
+ elseif($status['status'] == S_IN_REVISION)
+ $content .= '
'.$this->documentListRowRevisionBar($latestContent);
}
$content .= "";
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'];
diff --git a/views/bootstrap/class.Tasks.php b/views/bootstrap/class.Tasks.php
index 65d481c2e..31e807232 100644
--- a/views/bootstrap/class.Tasks.php
+++ b/views/bootstrap/class.Tasks.php
@@ -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);
}
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 0fb09886d..43cd35c6b 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -3287,6 +3287,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= '
'.$this->documentListRowReviewBar($latestContent);
elseif($status['status'] == S_DRAFT_APP)
$content .= '
'.$this->documentListRowApprovalBar($latestContent);
+ elseif($status['status'] == S_IN_REVISION)
+ $content .= '
'.$this->documentListRowRevisionBar($latestContent);
}
$content .= "";
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'];