From 0066d29650da9deda1e862057bb759147f3d65a5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 1 Mar 2018 21:29:12 +0100 Subject: [PATCH 001/147] add listNeedsCorrection --- SeedDMS_Core/Core/inc.ClassDMS.php | 18 ++++++++++++++++++ SeedDMS_Core/package.xml | 1 + 2 files changed, 19 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index f1392fceb..25e538046 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1592,6 +1592,24 @@ class SeedDMS_Core_DMS { else $queryStr .= "ORDER BY `name`"; $queryStr .= " ".$orderdir; break; // }}} + case 'NeedsCorrectionOwner': // Documents that needs correction and I'm owning {{{ + $queryStr .= "WHERE 1=1 "; + + $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ". + "AND `tblDocumentStatusLog`.`status` IN (".S_NEEDS_CORRECTION.") "; + //$queryStr .= "ORDER BY `statusDate` DESC"; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; + break; // }}} case 'DraftOwner': // Documents in draft status and I'm owning {{{ $queryStr .= "WHERE 1=1 "; diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 463c3196e..ebb8c5f93 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,6 +24,7 @@ GPL License +add list 'NeedsCorrectionOwner' to SeedDMS_Core_DMS::getDocumentList() From 7008b11f64d44ac608d16cea333a99de13bee789 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 1 Mar 2018 21:29:53 +0100 Subject: [PATCH 002/147] 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 '