diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index 3d04ae468..78094a577 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -2883,6 +2883,56 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
return "\n";
} /* }}} */
+ function documentListRowStatus($latestContent) { /* {{{ */
+ $user = $this->params['user'];
+ $workflowmode = $this->params['workflowmode'];
+ $document = $latestContent->getDocument();
+
+ $status = $latestContent->getStatus();
+ $attentionstr = '';
+ if ( $document->isLocked() ) {
+ $attentionstr .= "
getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> ";
+ }
+ $needwkflaction = false;
+ if($workflowmode == 'advanced') {
+ $workflow = $latestContent->getWorkflow();
+ if($workflow) {
+ $needwkflaction = $latestContent->needsWorkflowAction($user);
+ }
+ }
+ if ( $needwkflaction ) {
+ $attentionstr .= "
getImgPath("attention.gif")."\" title=\"". getMLText("workflow").": ".htmlspecialchars($workflow->getName())."\"> ";
+ }
+ $content = '';
+ if($attentionstr)
+ $content .= $attentionstr."
";
+ $content .= "";
+ /* Retrieve attacheѕ files */
+ $files = $document->getDocumentFiles($latestContent->getVersion());
+ $files = SeedDMS_Core_DMS::filterDocumentFiles($user, $files);
+
+ /* Retrieve linked documents */
+ $links = $document->getDocumentLinks();
+ $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links);
+
+ /* Retrieve reverse linked documents */
+ $revlinks = $document->getReverseDocumentLinks();
+ $revlinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $revlinks);
+
+ if(count($files))
+ $content .= count($files)." ".getMLText("linked_files")."
";
+ if(count($links) || count($revlinks))
+ $content .= count($links)."/".count($revlinks)." ".getMLText("linked_documents")."
";
+ if($status["status"] == S_IN_WORKFLOW && $workflowmode == 'advanced') {
+ if($workflowstate = $latestContent->getWorkflowState())
+ $content .= 'getName()) : '').'">'.($workflowstate ? htmlspecialchars($workflowstate->getName()) : '').'';
+ } else {
+ $content .= getOverallStatusText($status["status"]);
+ }
+ $content .= "";
+ return $content;
+ } /* }}} */
+
function documentListRowAction($document, $previewer, $skipcont=false, $version=0, $extracontent=array()) { /* {{{ */
$user = $this->params['user'];
$enableClipboard = $this->params['enableclipboard'];
@@ -2963,27 +3013,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$previewer->createPreview($latestContent);
$version = $latestContent->getVersion();
- $status = $latestContent->getStatus();
- $needwkflaction = false;
- if($workflowmode == 'advanced') {
- $workflow = $latestContent->getWorkflow();
- if($workflow) {
- $needwkflaction = $latestContent->needsWorkflowAction($user);
- }
- }
- /* Retrieve attacheѕ files */
- $files = $document->getDocumentFiles($latestContent->getVersion());
- $files = SeedDMS_Core_DMS::filterDocumentFiles($user, $files);
-
- /* Retrieve linked documents */
- $links = $document->getDocumentLinks();
- $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links);
-
- /* Retrieve reverse linked documents */
- $revlinks = $document->getReverseDocumentLinks();
- $revlinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $revlinks);
-
if($ec = $this->callHook('documentListRowExtraContent', $document, $latestContent))
$extracontent = array_merge($extracontent, $ec);
@@ -3037,27 +3067,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
}
$content .= "
";
- $attentionstr = '';
- if ( $document->isLocked() ) {
- $attentionstr .= " getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> ";
- }
- if ( $needwkflaction ) {
- $attentionstr .= " getImgPath("attention.gif")."\" title=\"". getMLText("workflow").": ".htmlspecialchars($workflow->getName())."\"> ";
- }
- if($attentionstr)
- $content .= $attentionstr." ";
- $content .= "";
- if(count($files))
- $content .= count($files)." ".getMLText("linked_files")." ";
- if(count($links) || count($revlinks))
- $content .= count($links)."/".count($revlinks)." ".getMLText("linked_documents")." ";
- if($status["status"] == S_IN_WORKFLOW && $workflowmode == 'advanced') {
- if($workflowstate = $latestContent->getWorkflowState())
- $content .= 'getName()) : '').'">'.($workflowstate ? htmlspecialchars($workflowstate->getName()) : '').'';
- } else {
- $content .= getOverallStatusText($status["status"]);
- }
- $content .= " | ";
+ $content .= $this->documentListRowStatus($latestContent);
+ $content .= "";
$content .= "";
$content .= $this->documentListRowAction($document, $previewer, $skipcont, $version, $extracontent);
$content .= " | ";
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index a1258e420..8e88f4542 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -2954,6 +2954,56 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
return "\n";
} /* }}} */
+ function documentListRowStatus($latestContent) { /* {{{ */
+ $user = $this->params['user'];
+ $workflowmode = $this->params['workflowmode'];
+ $document = $latestContent->getDocument();
+
+ $status = $latestContent->getStatus();
+ $attentionstr = '';
+ if ( $document->isLocked() ) {
+ $attentionstr .= "
getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> ";
+ }
+ $needwkflaction = false;
+ if($workflowmode == 'advanced') {
+ $workflow = $latestContent->getWorkflow();
+ if($workflow) {
+ $needwkflaction = $latestContent->needsWorkflowAction($user);
+ }
+ }
+ if ( $needwkflaction ) {
+ $attentionstr .= "
getImgPath("attention.gif")."\" title=\"". getMLText("workflow").": ".htmlspecialchars($workflow->getName())."\"> ";
+ }
+ $content = '';
+ if($attentionstr)
+ $content .= $attentionstr."
";
+ $content .= "";
+ /* Retrieve attacheѕ files */
+ $files = $document->getDocumentFiles($latestContent->getVersion());
+ $files = SeedDMS_Core_DMS::filterDocumentFiles($user, $files);
+
+ /* Retrieve linked documents */
+ $links = $document->getDocumentLinks();
+ $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links);
+
+ /* Retrieve reverse linked documents */
+ $revlinks = $document->getReverseDocumentLinks();
+ $revlinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $revlinks);
+
+ if(count($files))
+ $content .= count($files)." ".getMLText("linked_files")."
";
+ if(count($links) || count($revlinks))
+ $content .= count($links)."/".count($revlinks)." ".getMLText("linked_documents")."
";
+ if($status["status"] == S_IN_WORKFLOW && $workflowmode == 'advanced') {
+ if($workflowstate = $latestContent->getWorkflowState())
+ $content .= 'getName()) : '').'">'.($workflowstate ? htmlspecialchars($workflowstate->getName()) : '').'';
+ } else {
+ $content .= getOverallStatusText($status["status"]);
+ }
+ $content .= "";
+ return $content;
+ } /* }}} */
+
function documentListRowAction($document, $previewer, $skipcont=false, $version=0, $extracontent=array()) { /* {{{ */
$user = $this->params['user'];
$enableClipboard = $this->params['enableclipboard'];
@@ -3034,27 +3084,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$previewer->createPreview($latestContent);
$version = $latestContent->getVersion();
- $status = $latestContent->getStatus();
- $needwkflaction = false;
- if($workflowmode == 'advanced') {
- $workflow = $latestContent->getWorkflow();
- if($workflow) {
- $needwkflaction = $latestContent->needsWorkflowAction($user);
- }
- }
- /* Retrieve attacheѕ files */
- $files = $document->getDocumentFiles($latestContent->getVersion());
- $files = SeedDMS_Core_DMS::filterDocumentFiles($user, $files);
-
- /* Retrieve linked documents */
- $links = $document->getDocumentLinks();
- $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links);
-
- /* Retrieve reverse linked documents */
- $revlinks = $document->getReverseDocumentLinks();
- $revlinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $revlinks);
-
if($ec = $this->callHook('documentListRowExtraContent', $document, $latestContent))
$extracontent = array_merge($extracontent, $ec);
@@ -3108,27 +3138,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
}
$content .= "";
- $attentionstr = '';
- if ( $document->isLocked() ) {
- $attentionstr .= " getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> ";
- }
- if ( $needwkflaction ) {
- $attentionstr .= " getImgPath("attention.gif")."\" title=\"". getMLText("workflow").": ".htmlspecialchars($workflow->getName())."\"> ";
- }
- if($attentionstr)
- $content .= $attentionstr." ";
- $content .= "";
- if(count($files))
- $content .= count($files)." ".getMLText("linked_files")." ";
- if(count($links) || count($revlinks))
- $content .= count($links)."/".count($revlinks)." ".getMLText("linked_documents")." ";
- if($status["status"] == S_IN_WORKFLOW && $workflowmode == 'advanced') {
- if($workflowstate = $latestContent->getWorkflowState())
- $content .= 'getName()) : '').'">'.($workflowstate ? htmlspecialchars($workflowstate->getName()) : '').'';
- } else {
- $content .= getOverallStatusText($status["status"]);
- }
- $content .= " | ";
+ $content .= $this->documentListRowStatus($latestContent);
+ $content .= "";
$content .= "";
$content .= $this->documentListRowAction($document, $previewer, $skipcont, $version, $extracontent);
$content .= " | ";