From 7008b11f64d44ac608d16cea333a99de13bee789 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 1 Mar 2018 21:29:53 +0100 Subject: [PATCH] add list for documents that need correction --- views/bootstrap/class.MyDocuments.php | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 64d5dfb25..822f23534 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -586,6 +586,36 @@ $(document).ready( function() { } /* }}} */ + function listNeedsCorrectionOwner() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $orderby = $this->params['orderby']; + $orderdir = $this->params['orderdir']; + $cachedir = $this->params['cachedir']; + $previewwidth = $this->params['previewWidthList']; + $previewconverters = $this->params['previewconverters']; + $timeout = $this->params['timeout']; + + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $previewer->setConverters($previewconverters); + + /* Get list of obsolete documents and owned by current user */ + $resArr = $dms->getDocumentList('NeedsCorrectionOwner', $user, false, $orderby, $orderdir); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_user_needs_correction")); + if ($resArr) { + $this->printList($resArr, $previewer, 'listNeedsCorrectionOwner'); + } + else printMLText("no_docs_needs_correction"); + + } /* }}} */ + function listDraftOwner() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -688,6 +718,8 @@ $(document).ready( function() { echo '
  • '.count($resArr).''.getMLText("documents_user_expiration").'
  • '; $resArr = $dms->getDocumentList('ObsoleteOwner', $user); echo '
  • '.count($resArr).''.getMLText("documents_user_obsolete").'
  • '; + $resArr = $dms->getDocumentList('NeedsCorrectionOwner', $user); + echo '
  • '.count($resArr).''.getMLText("documents_user_needs_correction").'
  • '; echo ''; $this->contentHeading(getMLText("tasks")); echo '