From 49e46a6aab8ddf3c229239cbb0254ef8d42c7f3a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 08:58:14 +0200 Subject: [PATCH 001/141] add style wordwrap to second column of folder/doc table --- views/bootstrap/class.Bootstrap.php | 6 +++--- views/bootstrap4/class.Bootstrap4.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8032f59c6..f858fb1ce 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2847,7 +2847,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; $content .= ""; - $content .= ""; + $content .= ""; if($onepage) $content .= "".htmlspecialchars($document->getName()) . ""; else @@ -2986,9 +2986,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $content .= $this->folderListRowStart($subFolder); $content .= "getID()."&showtree=".$showtree."\">getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0>\n"; if($onepage) - $content .= "" . "getId()."\">".htmlspecialchars($subFolder->getName()).""; + $content .= "" . "getId()."\">".htmlspecialchars($subFolder->getName()).""; else - $content .= "getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . ""; + $content .= "getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . ""; if(isset($extracontent['below_title'])) $content .= $extracontent['below_title']; $content .= "
".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $subFolder->getDate()).""; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index cb2e82fab..0db7730bf 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -2889,7 +2889,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; $content .= ""; - $content .= ""; + $content .= ""; if($onepage) $content .= "".htmlspecialchars($document->getName()) . ""; else @@ -3028,9 +3028,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $content .= $this->folderListRowStart($subFolder); $content .= "getID()."&showtree=".$showtree."\">getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0>\n"; if($onepage) - $content .= "" . "getId()."\">".htmlspecialchars($subFolder->getName()).""; + $content .= "" . "getId()."\">".htmlspecialchars($subFolder->getName()).""; else - $content .= "getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . ""; + $content .= "getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . ""; if(isset($extracontent['below_title'])) $content .= $extracontent['below_title']; $content .= "
".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $subFolder->getDate()).""; From a3d2f844b04d70e955bbcbf8c6efc38296c6b2a1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 08:58:46 +0200 Subject: [PATCH 002/141] limit img.mimeicon in width --- views/bootstrap4/styles/application.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/bootstrap4/styles/application.css b/views/bootstrap4/styles/application.css index 32a172223..40a55a08c 100644 --- a/views/bootstrap4/styles/application.css +++ b/views/bootstrap4/styles/application.css @@ -39,6 +39,8 @@ img.mimeicon { border-style: solid; border-width: 1px 2px 2px 1px; background-color: white; + max-width: 100%; + min-width: 60px; } span.list-details { From 756b38a067a779ce066092ff852e191bc140b1ad Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 12:46:29 +0200 Subject: [PATCH 003/141] do not declare callback function in run(), uses static method instead --- controllers/class.RemoveFolder.php | 65 +++++++++++++++++------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/controllers/class.RemoveFolder.php b/controllers/class.RemoveFolder.php index 4dfd686cf..6706eb8e4 100644 --- a/controllers/class.RemoveFolder.php +++ b/controllers/class.RemoveFolder.php @@ -22,7 +22,33 @@ */ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common { - public function run() { + /* Register a callback which removes each document from the fulltext index + * The callback must return null otherwise the removal will be canceled. + */ + static function removeFromIndex($arr, $document) { /* {{{ */ + $fulltextservice = $arr[0]; + $lucenesearch = $fulltextservice->Search(); + $hit = null; + if($document->isType('document')) + $hit = $lucenesearch->getDocument($document->getID()); + elseif($document->isType('folder')) + $hit = $lucenesearch->getFolder($document->getID()); + if($hit) { + $index = $fulltextservice->Indexer(); + $index->delete($hit->id); + $index->commit(); + } + return null; + } /* }}} */ + + static function removePreviews($arr, $document) { /* {{{ */ + $previewer = $arr[0]; + + $previewer->deleteDocumentPreviews($document); + return null; + } /* }}} */ + + public function run() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $settings = $this->params['settings']; @@ -41,38 +67,19 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common { $result = $this->callHook('removeFolder', $folder); if($result === null) { - /* Register a callback which removes each document from the fulltext index - * The callback must return null other the removal will be canceled. - */ - function removeFromIndex($arr, $document) { - $fulltextservice = $arr[0]; - $lucenesearch = $fulltextservice->Search(); - $hit = null; - if($document->isType('document')) - $hit = $lucenesearch->getDocument($document->getID()); - elseif($document->isType('folder')) - $hit = $lucenesearch->getFolder($document->getID()); - if($hit) { - $index = $fulltextservice->Indexer(); - $index->delete($hit->id); - $index->commit(); - } - return null; - } if($fulltextservice && ($index = $fulltextservice->Indexer())) { - $dms->addCallback('onPreRemoveDocument', 'removeFromIndex', array($fulltextservice)); - $dms->addCallback('onPreRemoveFolder', 'removeFromIndex', array($fulltextservice)); + /* Register a callback which is called by SeedDMS_Core when a folder + * or document is removed. The second parameter passed to this callback + * is the document or folder to be removed. + */ + $dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_RemoveFolder::removeFromIndex', array($fulltextservice)); + $dms->addCallback('onPreRemoveFolder', 'SeedDMS_Controller_RemoveFolder::removeFromIndex', array($fulltextservice)); } - function removePreviews($arr, $document) { - $previewer = $arr[0]; - - $previewer->deleteDocumentPreviews($document); - return null; - } + /* Register another callback which removes the preview images of the document */ require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); - $dms->addCallback('onPreRemoveDocument', 'removePreviews', array($previewer)); + $dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_RemoveFolder::removePreviews', array($previewer)); if (!$folder->remove()) { $this->errormsg = 'error_occured'; @@ -88,5 +95,5 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common { } return true; - } + } /* }}} */ } From d647b72463835867c539ada13e892b7400f23518 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 12:47:04 +0200 Subject: [PATCH 004/141] remove preview images before deleting document --- controllers/class.RemoveDocument.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/class.RemoveDocument.php b/controllers/class.RemoveDocument.php index 1b78314d9..70cff8fe1 100644 --- a/controllers/class.RemoveDocument.php +++ b/controllers/class.RemoveDocument.php @@ -43,6 +43,9 @@ class SeedDMS_Controller_RemoveDocument extends SeedDMS_Controller_Common { $result = $this->callHook('removeDocument', $document); if($result === null) { + require_once("SeedDMS/Preview.php"); + $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); + $previewer->deleteDocumentPreviews($document); if (!$document->remove()) { if($dms->lasterror) $this->errormsg = $dms->lasterror; From a27d1aabe503e8a7484e8db8e160f94689f91abf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 12:49:32 +0200 Subject: [PATCH 005/141] add changes for 5.1.23 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7a8d060db..47aaba304 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,9 @@ - output path of parent folder in many document/folder lists - list affected documents when transfering processes to another user - check for quota and duplicate content in restapi +- remove preview images before removing document +- fixed error due to multiple declared function when controller method + RemoveFolder::run was called more than once -------------------------------------------------------------------------------- Changes in version 5.1.22 From db8e6f3ac67b7ab098ab881e6f2ae7c65d403c76 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 13:07:09 +0200 Subject: [PATCH 006/141] fix call of constructor SeedDMS_AccessOperation() --- inc/inc.ClassUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index 4114cb7f2..3d288427d 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -184,7 +184,7 @@ class UI extends UI_Default { static function exitError($pagetitle, $error, $noexit=false, $plain=false) { global $theme, $dms, $user, $settings; - $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); + $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); $view = UI::factory($theme, 'ErrorDlg'); $view->setParam('dms', $dms); $view->setParam('user', $user); From 42cf1e9d054427d19d0adc3be86cf5f4385b7321 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 13:19:47 +0200 Subject: [PATCH 007/141] use identical layout on all remove pages --- views/bootstrap/class.RemoveDocument.php | 6 +----- views/bootstrap/class.RemoveFolder.php | 6 +----- views/bootstrap/class.RemoveVersion.php | 4 +--- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/views/bootstrap/class.RemoveDocument.php b/views/bootstrap/class.RemoveDocument.php index 57cb0f816..a3e43fa49 100644 --- a/views/bootstrap/class.RemoveDocument.php +++ b/views/bootstrap/class.RemoveDocument.php @@ -43,19 +43,15 @@ class SeedDMS_View_RemoveDocument extends SeedDMS_Theme_Style { $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("rm_document")); - $this->contentContainerStart('warning'); + $this->warningMsg(getMLText("confirm_rm_document", array ("documentname" => htmlspecialchars($document->getName())))); ?>
-

- htmlspecialchars($document->getName())));?> -

contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.RemoveFolder.php b/views/bootstrap/class.RemoveFolder.php index c91b9f9c2..713462875 100644 --- a/views/bootstrap/class.RemoveFolder.php +++ b/views/bootstrap/class.RemoveFolder.php @@ -41,19 +41,15 @@ class SeedDMS_View_RemoveFolder extends SeedDMS_Theme_Style { $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); $this->contentHeading(getMLText("rm_folder")); - $this->contentContainerStart(); + $this->warningMsg(getMLText("confirm_rm_folder", array ("foldername" => htmlspecialchars($folder->getName())))); ?>
-

- htmlspecialchars($folder->getName())));?> -

contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.RemoveVersion.php b/views/bootstrap/class.RemoveVersion.php index 6c6f8690a..40e9869e7 100644 --- a/views/bootstrap/class.RemoveVersion.php +++ b/views/bootstrap/class.RemoveVersion.php @@ -43,17 +43,15 @@ class SeedDMS_View_RemoveVersion extends SeedDMS_Theme_Style { $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("rm_version")); - $this->contentContainerStart(); + $this->warningMsg(getMLText("confirm_rm_version", array ("documentname" => htmlspecialchars($document->getName()), "version" => $version->getVersion()))); ?>
-

htmlspecialchars($document->getName()), "version" => $version->getVersion()));?>

contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 9644153d7b38dc071835078b0d54dc2a3bd8f1d2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 13:52:21 +0200 Subject: [PATCH 008/141] fix layout of dropdown folder/document search --- views/bootstrap4/styles/application.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index d6339a280..a94495658 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -224,6 +224,8 @@ $(document).ready( function() { /* Document chooser */ $("[id^=choosedocsearch]").typeahead({ /* {{{ */ + menu: '', + item: '
  • ', minLength: 3, source: function(query, process) { // console.log(this.options); @@ -252,6 +254,8 @@ $(document).ready( function() { /* Folder chooser */ $("[id^=choosefoldersearch]").typeahead({ /* {{{ */ + menu: '', + item: '
  • ', minLength: 3, source: function(query, process) { // console.log(this.options); From 8a4b520754c068c04746a4e72903d12cfd61ef3c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 13:54:14 +0200 Subject: [PATCH 009/141] add class form-control to select menu --- views/bootstrap/class.DocumentAccess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.DocumentAccess.php b/views/bootstrap/class.DocumentAccess.php index acccb932d..f96ebf6c0 100644 --- a/views/bootstrap/class.DocumentAccess.php +++ b/views/bootstrap/class.DocumentAccess.php @@ -35,7 +35,7 @@ class SeedDMS_View_DocumentAccess extends SeedDMS_Theme_Style { } /* }}} */ function getAccessModeSelection($defMode) { /* {{{ */ - $content = "\n"; $content .= "\t\n"; $content .= "\t\n"; $content .= "\t\n"; From 23bc6ad49c64f12aea0d99ed8fe2c34584348661 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 13:54:42 +0200 Subject: [PATCH 010/141] add class btn-danger and btn-sm to delete buttons --- views/bootstrap/class.DocumentNotify.php | 4 ++-- views/bootstrap/class.FolderNotify.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php index c9a1750ff..fb6e2ce38 100644 --- a/views/bootstrap/class.DocumentNotify.php +++ b/views/bootstrap/class.DocumentNotify.php @@ -162,7 +162,7 @@ $(document).ready( function() { print "\n"; print "getID()."\">\n"; print ""; - print ""; + print ""; print ""; print "\n"; }else print ""; @@ -179,7 +179,7 @@ $(document).ready( function() { print "\n"; print "getID()."\">\n"; print ""; - print ""; + print ""; print ""; print "\n"; }else print ""; diff --git a/views/bootstrap/class.FolderNotify.php b/views/bootstrap/class.FolderNotify.php index cacf287b6..c36bf01f3 100644 --- a/views/bootstrap/class.FolderNotify.php +++ b/views/bootstrap/class.FolderNotify.php @@ -162,7 +162,7 @@ $(document).ready(function() { print "\n"; print "getID()."\">\n"; print ""; - print ""; + print ""; print ""; print "\n"; }else print ""; @@ -179,7 +179,7 @@ $(document).ready(function() { print "\n"; print "getID()."\">\n"; print ""; - print ""; + print ""; print ""; print "\n"; }else print ""; From feee7732caa9b0f33686ffe2fa16226632dbe585 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 14:08:50 +0200 Subject: [PATCH 011/141] fix layout of buttons, place submit button outside of container around form --- views/bootstrap/class.DocumentAccess.php | 2 +- views/bootstrap/class.DocumentNotify.php | 4 ++-- views/bootstrap/class.FolderAccess.php | 6 +++--- views/bootstrap/class.FolderNotify.php | 4 ++-- views/bootstrap/class.MoveDocument.php | 4 ++-- views/bootstrap/class.MoveFolder.php | 6 ++---- views/bootstrap/class.SetExpires.php | 4 ++-- views/bootstrap/class.TransferDocument.php | 2 +- 8 files changed, 15 insertions(+), 17 deletions(-) diff --git a/views/bootstrap/class.DocumentAccess.php b/views/bootstrap/class.DocumentAccess.php index f96ebf6c0..994017c7b 100644 --- a/views/bootstrap/class.DocumentAccess.php +++ b/views/bootstrap/class.DocumentAccess.php @@ -160,7 +160,7 @@ $(document).ready( function() { - "> + "> contentContainerEnd(); diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php index fb6e2ce38..4633cc28b 100644 --- a/views/bootstrap/class.DocumentNotify.php +++ b/views/bootstrap/class.DocumentNotify.php @@ -91,7 +91,6 @@ $(document).ready( function() { $this->rowStart(); $this->columnStart(6); - $this->contentContainerStart(); ?> @@ -111,6 +110,7 @@ $(document).ready( function() { } elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) { $options[] = array($user->getID(), htmlspecialchars($user->getLogin() . " - " .$user->getFullName())); } + $this->contentContainerStart(); $this->formField( getMLText("user"), array( @@ -139,11 +139,11 @@ $(document).ready( function() { 'options'=>$options ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('add')); ?> contentContainerEnd(); $this->columnEnd(); $this->columnStart(6); print "\n"; diff --git a/views/bootstrap/class.FolderAccess.php b/views/bootstrap/class.FolderAccess.php index 9de43078d..dd77941b1 100644 --- a/views/bootstrap/class.FolderAccess.php +++ b/views/bootstrap/class.FolderAccess.php @@ -136,14 +136,14 @@ $(document).ready(function() { - "> + "> - "> + ">

    - "> + "> rowStart(); $this->columnStart(6); - $this->contentContainerStart(); ?> @@ -111,6 +110,7 @@ $(document).ready(function() { } elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) { $options[] = array($user->getID(), htmlspecialchars($user->getLogin() . " - " .$user->getFullName())); } + $this->contentContainerStart(); $this->formField( getMLText("user"), array( @@ -139,11 +139,11 @@ $(document).ready(function() { 'options'=>$options ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('add')); ?> contentContainerEnd(); $this->columnEnd(); $this->columnStart(6); print "
    \n"; diff --git a/views/bootstrap/class.MoveDocument.php b/views/bootstrap/class.MoveDocument.php index 7e4aa5e44..9d628d050 100644 --- a/views/bootstrap/class.MoveDocument.php +++ b/views/bootstrap/class.MoveDocument.php @@ -49,18 +49,18 @@ class SeedDMS_View_MoveDocument extends SeedDMS_Theme_Style { $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("move_document")); - $this->contentContainerStart('warning'); ?> contentContainerStart('warning'); $this->formField(getMLText("choose_target_folder"), $this->getFolderChooserHtml("form1", M_READWRITE, -1, $target)); + $this->contentContainerEnd(); $this->formSubmit(getMLText('move')); ?> contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.MoveFolder.php b/views/bootstrap/class.MoveFolder.php index 576e0725e..be0e35ba3 100644 --- a/views/bootstrap/class.MoveFolder.php +++ b/views/bootstrap/class.MoveFolder.php @@ -48,7 +48,6 @@ class SeedDMS_View_MoveFolder extends SeedDMS_Theme_Style { $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); $this->contentHeading(getMLText("move_folder")); - $this->contentContainerStart(); ?> @@ -56,14 +55,13 @@ class SeedDMS_View_MoveFolder extends SeedDMS_Theme_Style { contentContainerStart(); $this->formField(getMLText("choose_target_folder"), $this->getFolderChooserHtml("form1", M_READWRITE, $folder->getID(), $target)); + $this->contentContainerEnd(); $this->formSubmit(getMLText('move_folder')); ?> - - contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.SetExpires.php b/views/bootstrap/class.SetExpires.php index 2f920195b..9c2e377aa 100644 --- a/views/bootstrap/class.SetExpires.php +++ b/views/bootstrap/class.SetExpires.php @@ -56,7 +56,6 @@ $(document).ready( function() { $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("set_expiry")); - $this->contentContainerStart(); if($document->expires()) $expdate = getReadableDate($document->getExpires()); @@ -68,6 +67,7 @@ $(document).ready( function() { contentContainerStart(); $options = array(); $options[] = array('never', getMLText('does_not_expire')); $options[] = array('date', getMLText('expire_by_date'), $expdate != ''); @@ -89,11 +89,11 @@ $(document).ready( function() { getMLText("expires"), $this->getDateChooser($expdate, "expdate", $this->params['session']->getLanguage()) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?> contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.TransferDocument.php b/views/bootstrap/class.TransferDocument.php index 387f35b62..70e5b2841 100644 --- a/views/bootstrap/class.TransferDocument.php +++ b/views/bootstrap/class.TransferDocument.php @@ -67,8 +67,8 @@ class SeedDMS_View_TransferDocument extends SeedDMS_Theme_Style { getMLText("transfer_to_user"), $html ); - $this->formSubmit(" ".getMLText('transfer_document')); $this->contentContainerEnd(); + $this->formSubmit(" ".getMLText('transfer_document')); } else { $this->warningMsg('transfer_no_users'); } From 262ba1345b3dcfc6220ac4003fcf1533bd822092 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 1 May 2021 14:50:04 +0200 Subject: [PATCH 012/141] take out submit from contentContainer, add class btn-primary to buttons --- views/bootstrap/class.AttributeMgr.php | 4 ++-- views/bootstrap/class.Categories.php | 4 ++-- views/bootstrap/class.DefaultKeywords.php | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index 98d4e29cc..3050b2a24 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -194,6 +194,7 @@ $(document).ready( function() { contentContainerStart(); $this->formField( getMLText("attrdef_name"), array( @@ -302,6 +303,7 @@ $(document).ready( function() { ), ['help'=>getMLText('attrdef_regex_help')] ); + $this->contentContainerEnd(); $this->formSubmit(' '.getMLText('save')); ?> @@ -401,10 +403,8 @@ $(document).ready( function() { $this->columnEnd(); $this->columnStart(6); ?> - contentContainerStart(); ?>
    getID()."\"" : "") ?>>
    contentContainerEnd(); $this->columnEnd(); $this->rowEnd(); diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 3931cfd80..7526b56d8 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -115,6 +115,7 @@ $(document).ready( function() { contentContainerStart(); $this->formField( getMLText("name"), array( @@ -124,6 +125,7 @@ $(document).ready( function() { 'value'=>($category ? htmlspecialchars($category->getName()) : '') ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?> @@ -170,11 +172,9 @@ $(document).ready( function() { columnEnd(); $this->columnStart(6); - $this->contentContainerStart(); ?>
    getID()."\"" : "") ?>>
    contentContainerEnd(); $this->columnEnd(); $this->rowEnd(); diff --git a/views/bootstrap/class.DefaultKeywords.php b/views/bootstrap/class.DefaultKeywords.php index dcd12592f..e90363344 100644 --- a/views/bootstrap/class.DefaultKeywords.php +++ b/views/bootstrap/class.DefaultKeywords.php @@ -166,7 +166,6 @@ $(document).ready( function() { contentContainerEnd(); } else { - $this->contentContainerStart(); $owner = $category->getOwner(); if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return; ?> @@ -174,6 +173,7 @@ $(document).ready( function() { contentContainerStart(); $this->formField( getMLText("name"), array( @@ -183,11 +183,11 @@ $(document).ready( function() { 'value'=>$category->getName() ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?> contentContainerEnd(); $this->contentHeading(getMLText("default_keywords")); $this->contentContainerStart(); ?> @@ -198,12 +198,12 @@ $(document).ready( function() { else foreach ($lists as $list) { ?> -
    + "> - "> + "> @@ -224,8 +224,8 @@ $(document).ready( function() { - - "> + + From 113db3fb017a678a13259ce940e79865bcf7a3c4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 07:53:20 +0200 Subject: [PATCH 013/141] change type of badge depending on count --- views/bootstrap/class.Bootstrap.php | 2 +- views/bootstrap4/class.Bootstrap4.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 99567efa8..7b5ad6030 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -670,7 +670,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $content .= ' '.$attr[0].'="'.$attr[1].'"'; $content .= '>'; $content .= $menuitem['label']; - $content .= ''.$menuitem['badge'].""; + $content .= ''.$menuitem['badge'].""; $content .= ' '."\n"; $content .= " \n"; } diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 6aabb0104..2e858e2fe 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -590,7 +590,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $content .= '>'; $content .= $menuitem['label']; $content .= ' '."\n"; - $content .= ''.$menuitem['badge'].""; + $content .= ''.$menuitem['badge'].""; $content .= " \n"; } From 29e9907c891594c15054b55680c54b68183515ab Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 07:54:02 +0200 Subject: [PATCH 014/141] use showNavigationListWithBadges() --- views/bootstrap/class.ObjectCheck.php | 48 +++++++++++++-------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index 7594eea8c..959703b74 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -545,7 +545,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->printClickDocumentJs(); ?> $(document).ready( function() { - $('body').on('click', 'ul.bs-docs-sidenav li a', function(ev){ + $('body').on('click', 'ul.sidenav li a', function(ev){ ev.preventDefault(); $('#kkkk.ajax').data('action', $(this).data('action')); $('#kkkk.ajax').trigger('update', {orderby: $(this).data('orderby')}); @@ -600,39 +600,37 @@ $(document).ready( function() { $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - echo '
    '; - echo '
    '; + $this->rowStart(); + $this->columnStart(3); $this->contentHeading(getMLText("object_check_critical")); - echo ''; + $menuitems = []; + $menuitems[] = array('label'=>getMLText('objectcheck'), 'badge'=>count($repairobjects), 'attributes'=>array(array('data-href', "#all_documents"), array('data-action', "listRepair"))); + $menuitems[] = array('label'=>getMLText('unlinked_folders'), 'badge'=>count($unlinkedfolders), 'attributes'=>array(array('data-href', "#unlinked_folders"), array('data-action', "listUnlinkedFolders"))); + $menuitems[] = array('label'=>getMLText('unlinked_documents'), 'badge'=>count($unlinkeddocuments), 'attributes'=>array(array('data-href', "#unlinked_documents"), array('data-action', "listUnlinkedDocuments"))); + $menuitems[] = array('label'=>getMLText('unlinked_content'), 'badge'=>count($unlinkedcontent), 'attributes'=>array(array('data-href', "#unlinked_content"), array('data-action', "listUnlinkedContent"))); + $menuitems[] = array('label'=>getMLText('missing_filesize'), 'badge'=>count($nofilesizeversions), 'attributes'=>array(array('data-href', "#missing_filesize"), array('data-action', "listMissingFileSize"))); + $menuitems[] = array('label'=>getMLText('missing_checksum'), 'badge'=>count($nochecksumversions), 'attributes'=>array(array('data-href', "#missing_checksum"), array('data-action', "listMissingChecksum"))); + $menuitems[] = array('label'=>getMLText('wrong_filetype'), 'badge'=>count($wrongfiletypeversions), 'attributes'=>array(array('data-href', "#wrong_filetype"), array('data-action', "listWrongFiletype"))); + self::showNavigationListWithBadges($menuitems); + $this->contentHeading(getMLText("object_check_warning")); - echo ''; - echo ''; - echo '
    '; - echo '
    '; + self::showNavigationListWithBadges($menuitems); + $this->columnEnd(); + $this->columnStart(9); echo '
    '; - echo '
    '; - echo '
    '; - + $this->columnEnd(); + $this->rowEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 1afda0e67722e1b2eccb04325576d4f3a79da895 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 07:54:38 +0200 Subject: [PATCH 015/141] add class table-sm to table --- views/bootstrap/class.Charts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index 282b8c05f..e7f5ee535 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -225,7 +225,7 @@ $(document).ready( function() {
    contentContainerEnd(); - echo "
    "; + echo "
    "; echo ""; echo ""; if(in_array($type, array('docspermonth', 'docsaccumulated'))) From 720615c17513862800d3d395029b66fb1ef3fd37 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 07:56:58 +0200 Subject: [PATCH 016/141] pass enableRecursiveCount and maxRecursiveCount to view --- out/out.ObjectCheck.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php index 144674e52..3b13c1923 100644 --- a/out/out.ObjectCheck.php +++ b/out/out.ObjectCheck.php @@ -90,6 +90,8 @@ if($view) { $view->setParam('repair', $repair); $view->setParam('showtree', showtree()); $view->setParam('rootfolder', $rootfolder); + $view->setParam('enableRecursiveCount', $settings->_enableRecursiveCount); + $view->setParam('maxRecursiveCount', $settings->_maxRecursiveCount); $view->setParam('accessobject', $accessop); $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array()); From f0fc1bfcc33b9bbb7ce06fb2d13f93355fa1593f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 08:08:11 +0200 Subject: [PATCH 017/141] add class 'table-sm' to all tables --- views/bootstrap/class.ObjectCheck.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index 959703b74..a5460e618 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -37,7 +37,7 @@ require_once("SeedDMS/Preview.php"); class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { protected function printListHeader($resArr, $previewer, $order=false) { /* {{{ */ - print "
    ".getMLText('chart_'.$type.'_title')."".getMLText('total')."
    "; + print "
    "; print "\n\n"; print "\n"; if($order) { @@ -105,7 +105,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { if($repair) { echo "
    ".getMLText('repairing_objects')."
    "; } - print "
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -167,7 +167,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->contentHeading(getMLText("unlinked_folders")); if($unlinkedfolders) { - print "
    ".getMLText("name")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -196,7 +196,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->contentHeading(getMLText("unlinked_documents")); if($unlinkeddocuments) { - print "
    ".getMLText("name")."".getMLText("id")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -230,7 +230,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { } if($unlinkedcontent) { - print "
    ".getMLText("name")."".getMLText("id")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -263,7 +263,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->contentHeading(getMLText("missing_filesize")); if($nofilesizeversions) { - print "
    ".getMLText("document")."".getMLText("version")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -307,7 +307,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->contentHeading(getMLText("missing_checksum")); if($nochecksumversions) { - print "
    ".getMLText("document")."".getMLText("version")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -350,7 +350,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->contentHeading(getMLText("wrong_filetype")); if($wrongfiletypeversions) { - print "
    ".getMLText("document")."".getMLText("version")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -393,7 +393,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->contentHeading(getMLText("duplicate_content")); if($duplicateversions) { - print "
    ".getMLText("document")."".getMLText("version")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; @@ -476,7 +476,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $this->contentHeading(getMLText($process."s_without_".$ug)); if($processwithoutusergroup[$process][$ug]) { - print "
    ".getMLText("document")."".getMLText("version")."
    "; + print "
    "; print "\n\n"; print "\n"; print "\n"; From da2174fafd7e3d20681f9397a99eef5031ebfabc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 08:34:28 +0200 Subject: [PATCH 018/141] docs and folders can be repaired again --- views/bootstrap/class.ObjectCheck.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index a5460e618..5664ec40c 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -103,7 +103,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { if($objects) { if($repair) { - echo "
    ".getMLText('repairing_objects')."
    "; + $this->warningMsg(getMLText('repairing_objects')); } print "
    ".getMLText("process")."".getMLText("user_group")."
    "; print "\n\n"; @@ -114,6 +114,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { print "\n"; print "\n"; print "\n\n\n"; + $needsrepair = false; foreach($objects as $object) { if($object['object']->isType('document')) { $document = $object['object']; @@ -123,6 +124,11 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { echo $txt; else echo $this->documentListRow($document, $previewer, false); + echo ""; + $needsrepair = true; } } elseif($object['object']->isType('documentcontent')) { $document = $object['object']->getDocument(); @@ -145,16 +151,19 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { echo $txt; else echo $this->folderListRow($folder, true); - echo ""; + echo ""; echo $this->folderListRowEnd($folder); + $needsrepair = true; } } } - $this->needsrepair = false; print "
    ".getMLText("error")."
    ".$object['msg']; + if($repair) + $document->repair(); + echo "".$object['msg']."".$object['msg']; + if($repair) + $folder->repair(); + echo "
    \n"; - if($this->needsrepair && $repair == 0) { - echo '

    '.getMLText('do_object_repair').'

    '; + if($needsrepair && $repair == 0) { + echo ''; } } } /* }}} */ @@ -593,7 +602,7 @@ $(document).ready( function() { $repairobjects = $this->params['repairobjects']; $this->enableClipboard = $this->params['enableclipboard']; - $this->htmlAddHeader(''."\n", 'js'); +// $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); From 258968b2c28bd88204be397c87862948d366b0a2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 12:52:30 +0200 Subject: [PATCH 019/141] minor translation updates --- languages/ar_EG/lang.inc | 1 + languages/bg_BG/lang.inc | 1 + languages/ca_ES/lang.inc | 1 + languages/cs_CZ/lang.inc | 1 + languages/de_DE/lang.inc | 11 ++++++----- languages/el_GR/lang.inc | 1 + languages/en_GB/lang.inc | 11 ++++++----- languages/es_ES/lang.inc | 1 + languages/fr_FR/lang.inc | 1 + languages/hr_HR/lang.inc | 9 +++++---- languages/hu_HU/lang.inc | 1 + languages/it_IT/lang.inc | 1 + languages/ko_KR/lang.inc | 1 + languages/lo_LA/lang.inc | 1 + languages/nb_NO/lang.inc | 1 + languages/nl_NL/lang.inc | 1 + languages/pl_PL/lang.inc | 1 + languages/pt_BR/lang.inc | 9 +++++---- languages/ro_RO/lang.inc | 1 + languages/ru_RU/lang.inc | 1 + languages/sk_SK/lang.inc | 1 + languages/sv_SE/lang.inc | 1 + languages/tr_TR/lang.inc | 1 + languages/uk_UA/lang.inc | 7 ++++--- languages/zh_CN/lang.inc | 1 + languages/zh_TW/lang.inc | 1 + 26 files changed, 47 insertions(+), 21 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 63364bee9..7976d05e8 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -694,6 +694,7 @@ URL: [url]', 'individuals' => 'افراد', 'individuals_in_groups' => 'أفراد في المجموعات', 'info_recipients_tab_not_released' => 'رابط معلومات المستلمين لم يصدر بعد', +'info_rm_user_from_processes_user' => '', 'inherited' => 'موروث', 'inherits_access_copy_msg' => 'نسخ قائمة صلاحيات موروثة.', 'inherits_access_empty_msg' => 'ابدأ بقائمة صلاحيات فارغة', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 9e5905db0..bda2b786d 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -623,6 +623,7 @@ $text = array( 'individuals' => 'Личности', 'individuals_in_groups' => '', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'наследен', 'inherits_access_copy_msg' => 'Изкопирай наследения список', 'inherits_access_empty_msg' => 'Започни с празен списък за достъп', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index ac395ee76..d808086f3 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -628,6 +628,7 @@ URL: [url]', 'individuals' => 'Individuals', 'individuals_in_groups' => '', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'Heredat', 'inherits_access_copy_msg' => 'Copiar llista d\'accés heretat', 'inherits_access_empty_msg' => 'Començar amb una llista d\'accés buida', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index a4257f7e6..90d8cf129 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => 'Jednotlivci', 'individuals_in_groups' => 'Členové skupiny', 'info_recipients_tab_not_released' => 'Potvrzení o příjmu této verze dokumentu není možné, protože verze není uvolněna.', +'info_rm_user_from_processes_user' => '', 'inherited' => 'Zděděno', 'inherits_access_copy_msg' => 'Zkopírovat zděděný seznam řízení přístupu', 'inherits_access_empty_msg' => 'Založit nový seznam řízení přístupu', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 25043edae..7c4c37b45 100644 --- a/languages/de_DE/lang.inc +++ b/languages/de_DE/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (2881), dgrutsch (22) +// Translators: Admin (2886), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -485,8 +485,8 @@ URL: [url]', 'do_object_setfiletype' => 'Setze Dateityp', 'do_object_unlink' => 'Lösche Dokumentenversion', 'draft' => 'Entwurf', -'draft_pending_approval' => 'Entwurf - bevorstehende Freigabe', -'draft_pending_review' => 'Entwurf - bevorstehende Prüfung', +'draft_pending_approval' => 'Freigabe erforderlich', +'draft_pending_review' => 'Prüfung erforderlich', 'drag_icon_here' => 'Icon eines Ordners oder Dokuments hier hin ziehen!', 'dropfolderdir_missing' => 'Ihr persönlicher Ablageordner auf dem Server existiert nicht! Kontaktieren Sie den Administrator, um in anlegen zu lassen.', 'dropfolder_file' => 'Datei aus Ablageordner', @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => 'Einzelpersonen', 'individuals_in_groups' => 'Mitglieder einer Gruppe', 'info_recipients_tab_not_released' => 'Die Bestätigung des Empfangs für diese Dokumentenversion ist nicht möglich, weil die Version nicht freigegeben ist.', +'info_rm_user_from_processes_user' => 'Nur die noch offenen Aufgaben können auf einen anderen Benutzer übertragen werden. Bei Aufgaben, die bereits bearbeitet wurden, wird der Benutzer aus der Bearbeitungshistorie gelöscht, als würde der Benutzer selbst gelöscht.', 'inherited' => 'geerbt', 'inherits_access_copy_msg' => 'Berechtigungen kopieren', 'inherits_access_empty_msg' => 'Leere Zugriffsliste', @@ -1812,7 +1813,7 @@ Name: [username] 'state_and_next_state' => 'Status/Nächster Status', 'statistic' => 'Statistik', 'status' => 'Status', -'status_approval_rejected' => 'Entwurf abgelehnt', +'status_approval_rejected' => 'abgelehnt', 'status_approved' => 'freigegeben', 'status_approver_removed' => 'Freigebender wurde vom Prozess ausgeschlossen', 'status_change' => 'Statusänderung', @@ -1825,7 +1826,7 @@ Name: [username] 'status_receipt_rejected' => 'Abgelehnt', 'status_recipient_removed' => 'Empfänger aus Liste entfernt', 'status_reviewed' => 'geprüft', -'status_reviewer_rejected' => 'Entwurf abgelehnt', +'status_reviewer_rejected' => 'abgelehnt', 'status_reviewer_removed' => 'Prüfer wurde vom Prozess ausgeschlossen', 'status_revised' => 'überprüft', 'status_revision_rejected' => 'Abgelehnt', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index a0f86b395..e91a3c4db 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -623,6 +623,7 @@ $text = array( 'individuals' => 'Άτομα', 'individuals_in_groups' => '', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'Κληρονομημένο', 'inherits_access_copy_msg' => 'Αντιγραφή δικαιωμάτων πρόσβασης', 'inherits_access_empty_msg' => 'Έναρξη με κενή λίστα δικαιωμάτων πρόσβασης', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 787428c1d..fbb6a800a 100644 --- a/languages/en_GB/lang.inc +++ b/languages/en_GB/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1990), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (1996), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -485,8 +485,8 @@ URL: [url]', 'do_object_setfiletype' => 'Set file type', 'do_object_unlink' => 'Delete document version', 'draft' => 'Draft', -'draft_pending_approval' => 'Draft - pending approval', -'draft_pending_review' => 'Draft - pending review', +'draft_pending_approval' => 'pending approval', +'draft_pending_review' => 'pending review', 'drag_icon_here' => 'Drag icon of folder or document here!', 'dropfolderdir_missing' => 'Your personal drop folder does not exist on the server! Please ask your administrator to create it.', 'dropfolder_file' => 'File from drop folder', @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => 'Individuals', 'individuals_in_groups' => 'Members of a group', 'info_recipients_tab_not_released' => 'Acknowledgement of reception for this document version is not possible, because the version is not released.', +'info_rm_user_from_processes_user' => 'Only tasks not being touched can be transfered to another user. Task which has been taken care of, will just add an item in the history, as if the user was deleted.', 'inherited' => 'inherited', 'inherits_access_copy_msg' => 'Copy inherited access list', 'inherits_access_empty_msg' => 'Start with empty access list', @@ -1806,7 +1807,7 @@ Name: [username] 'state_and_next_state' => 'State/Next state', 'statistic' => 'Statistic', 'status' => 'Status', -'status_approval_rejected' => 'Draft rejected', +'status_approval_rejected' => 'rejected', 'status_approved' => 'Approved', 'status_approver_removed' => 'Approver removed from process', 'status_change' => 'Status change', @@ -1819,7 +1820,7 @@ Name: [username] 'status_receipt_rejected' => 'Rejected', 'status_recipient_removed' => 'Recipient removed from list', 'status_reviewed' => 'Reviewed', -'status_reviewer_rejected' => 'Draft rejected', +'status_reviewer_rejected' => 'rejected', 'status_reviewer_removed' => 'Reviewer removed from process', 'status_revised' => 'revised', 'status_revision_rejected' => 'Rejected', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 05183928c..4cbba0183 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -701,6 +701,7 @@ URL: [url]', 'individuals' => 'Individuales', 'individuals_in_groups' => 'Miembros del grupo', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'heredado', 'inherits_access_copy_msg' => 'Copiar lista de acceso heredado', 'inherits_access_empty_msg' => 'Empezar con una lista de acceso vacía', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 191a081e8..e3ee03f37 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => 'Individuels', 'individuals_in_groups' => 'Membres d’un groupe', 'info_recipients_tab_not_released' => 'L’accusé de réception pour cette version du document n’est pas possible car la version n’est pas en état « publié ».', +'info_rm_user_from_processes_user' => '', 'inherited' => 'hérité', 'inherits_access_copy_msg' => 'Recopier la liste des accès hérités', 'inherits_access_empty_msg' => 'Commencer avec une liste d\'accès vide', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index e83a31a50..a426f9453 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1243), marbanas (16) +// Translators: Admin (1246), marbanas (16) $text = array( '2_factor_auth' => '', @@ -75,7 +75,7 @@ Internet poveznica: [url]', 'add_receipt' => 'Potvrdi prijem', 'add_review' => 'Dodaj osvrt', 'add_revision' => 'Dodaj reviziju', -'add_role' => '', +'add_role' => 'Dodaj novu rolu', 'add_subfolder' => 'Dodaj podmapu', 'add_task' => '', 'add_to_clipboard' => 'Dodaj u međuspremnik', @@ -166,7 +166,7 @@ Internet poveznica: [url]', 'attrdef_minvalues_help' => '', 'attrdef_min_greater_max' => 'Minimalni broj vrijednosti je veći od maksimalnog broja vrijednosti', 'attrdef_multiple' => 'Dozvoli više vrijednosti', -'attrdef_multiple_needs_valueset' => '', +'attrdef_multiple_needs_valueset' => 'Atribut s višestrukim vrijednostima mora imati set vrijednosti', 'attrdef_must_be_multiple' => 'Atribut mora imati više od jedne vrijednosti, ali nije postavljeno više vrijednosti', 'attrdef_name' => 'Naziv', 'attrdef_noname' => 'Nedostaje naziv za definiciju atributa', @@ -275,7 +275,7 @@ Internet poveznica: [url]', 'choose_attrdefgroup' => '', 'choose_category' => 'Molim odaberite', 'choose_group' => 'Odaberite grupu', -'choose_role' => '', +'choose_role' => 'Izaberi rolu', 'choose_target_category' => 'Odaberite kategoriju', 'choose_target_document' => 'Odaberite dokument', 'choose_target_file' => 'Odaberite datoteku', @@ -706,6 +706,7 @@ Internet poveznica: [url]', 'individuals' => 'Pojedinci', 'individuals_in_groups' => '', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'naslijeđeno', 'inherits_access_copy_msg' => 'Kopiraj listu naslijeđenih prava pristupa', 'inherits_access_empty_msg' => 'Započnite s praznim popisom pristupa', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 033aaf024..3b84ee19c 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -701,6 +701,7 @@ URL: [url]', 'individuals' => 'Egyedek', 'individuals_in_groups' => '', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'örökölt', 'inherits_access_copy_msg' => 'Örökített hozzáférési lista másolása', 'inherits_access_empty_msg' => 'Indulás üres hozzáférési listával', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 855f345c7..4e6c5d46e 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -711,6 +711,7 @@ URL: [url]', 'individuals' => 'Singoli', 'individuals_in_groups' => 'I membri de la gruppo', 'info_recipients_tab_not_released' => 'Non è possibile confermare la ricezione di questa versione del documento, poiché la versione non è stata rilasciata.', +'info_rm_user_from_processes_user' => '', 'inherited' => 'ereditato', 'inherits_access_copy_msg' => 'Copia la lista degli accessi ereditati', 'inherits_access_empty_msg' => 'Reimposta una lista di permessi vuota', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index cad922e60..904e7f936 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -707,6 +707,7 @@ URL: [url]', 'individuals' => '개인', 'individuals_in_groups' => '개별 그룹', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => '상속', 'inherits_access_copy_msg' => '상속 액세스 목록 복사', 'inherits_access_empty_msg' => '빈 액세스 목록으로 시작', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index 41fd5cf89..c1a0d6b3d 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -704,6 +704,7 @@ URL: [url]', 'individuals' => 'ບຸກຄົນ', 'individuals_in_groups' => 'ສະມາຊິກຂອງກຸ່ມ', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'ຮັບການຖ່າຍທອດ', 'inherits_access_copy_msg' => 'ຄັດລັອກລາຍການເຂົາເຖິງທີສືບທອດ', 'inherits_access_empty_msg' => 'ເລີ້ມຕົ້ນດ້ວຍລາຍການທີ່ວ່າງເປົ່າ', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index 38b7e68b2..e0252b514 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => 'Personer', 'individuals_in_groups' => 'Medlemmer i en gruppe', 'info_recipients_tab_not_released' => 'Bekreftelse av mottak for denne dokumentversjonen er ikke mulig fordi versjonen ikke er utgitt.', +'info_rm_user_from_processes_user' => '', 'inherited' => 'arvet', 'inherits_access_copy_msg' => 'Kopier arvet adgangsliste', 'inherits_access_empty_msg' => 'Start med tom adgangsliste', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index cc635ee8e..173f65adf 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -718,6 +718,7 @@ URL: [url]', 'individuals' => 'Individuen', 'individuals_in_groups' => 'Individuen in groepen', 'info_recipients_tab_not_released' => 'Ontvangstbevestiging van deze versie van het document is niet mogelijk omdat de versie nog niet is vrijgegeven.', +'info_rm_user_from_processes_user' => '', 'inherited' => 'overgeërfd', 'inherits_access_copy_msg' => 'Lijst van overgeërfde toegang', 'inherits_access_empty_msg' => 'Begin met een lege toegangslijst', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 266990f5e..598e6f979 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -694,6 +694,7 @@ URL: [url]', 'individuals' => 'Indywidualni', 'individuals_in_groups' => 'Członkowie grupy', 'info_recipients_tab_not_released' => 'Potwierdzenie odbioru dla tej wersji dokumentu nie jest możliwe, ponieważ wersja nie została wydana.', +'info_rm_user_from_processes_user' => '', 'inherited' => 'dziedziczony', 'inherits_access_copy_msg' => 'Kopiuj odziedziczoną listę dostępu', 'inherits_access_empty_msg' => 'Rozpocznij z pustą listą dostępu', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index c371fbd03..a03ab870e 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1847), flaviove (627), lfcristofoli (352) +// Translators: Admin (1850), flaviove (627), lfcristofoli (352) $text = array( '2_factor_auth' => 'Autenticação de dois fatores', @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => 'Indivíduos', 'individuals_in_groups' => 'Members of a group', 'info_recipients_tab_not_released' => 'Confirmação de recebimento para esta versão do documento não é possível, porque a versão não é liberada.', +'info_rm_user_from_processes_user' => '', 'inherited' => 'herdado', 'inherits_access_copy_msg' => 'Copiar lista de acesso herdada', 'inherits_access_empty_msg' => 'Inicie com a lista de acesso vazia', @@ -1161,7 +1162,7 @@ URL: [url]', 'review_update_failed' => 'Erro ao atualizar o status da revisão. Atualização falhou.', 'revise_document' => 'Revisar documento', 'revise_document_on' => 'Próxima revisão da versão do documento em [date]', -'revision' => '', +'revision' => 'Revisão', 'revisions_accepted' => '[no_revisions] revisões já aceitas', 'revisions_accepted_latest' => 'revisões aceitas mais recentes', 'revisions_not_touched' => '[no_revisions] revisões não sendo tocadas', @@ -1807,7 +1808,7 @@ Nome: [username] 'status_approval_rejected' => 'Rascunho rejeitado', 'status_approved' => 'Aprovado', 'status_approver_removed' => 'Aprovador removido do processo', -'status_change' => '', +'status_change' => 'Mudança de status', 'status_needs_correction' => 'Precisa de correção', 'status_not_approved' => 'Não aprovado', 'status_not_receipted' => 'Ainda não recebido', @@ -2004,7 +2005,7 @@ URL: [url]', 'version_info' => 'Informações da versão', 'view' => 'Visualizar', 'view_document' => 'Ver detalhes do documento', -'view_folder' => '', +'view_folder' => 'Ver detalhes da pasta', 'view_online' => 'Ver online', 'warning' => 'Aviso', 'webauthn_auth' => '', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 7fd0d689b..303a97f25 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -706,6 +706,7 @@ URL: [url]', 'individuals' => 'Individuals', 'individuals_in_groups' => '', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'moștenit', 'inherits_access_copy_msg' => 'Copie lista de acces moștenită', 'inherits_access_empty_msg' => 'Începeți cu lista de acces goală', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index d6a09310f..d1632dd99 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -706,6 +706,7 @@ URL: [url]', 'individuals' => 'Пользователи', 'individuals_in_groups' => 'Пользователи группы', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'унаследованный', 'inherits_access_copy_msg' => 'Скопировать наследованный список', 'inherits_access_empty_msg' => 'Начать с пустого списка доступа', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 16ed9836a..2453099c3 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => 'Jednotlivci', 'individuals_in_groups' => 'Členovia skupiny', 'info_recipients_tab_not_released' => 'Acknowledgement of reception for this document version is not possible, because the version is not released.', +'info_rm_user_from_processes_user' => '', 'inherited' => 'zdedené', 'inherits_access_copy_msg' => 'Skopírovať zdedený zoznam riadenia prístupu', 'inherits_access_empty_msg' => 'Založiť nový zoznam riadenia prístupu', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 50b4ff66d..4bcf3f192 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -712,6 +712,7 @@ URL: [url]', 'individuals' => 'Personer', 'individuals_in_groups' => 'Medlemmar i en grupp', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'ärvd', 'inherits_access_copy_msg' => 'Kopiera lista för behörighetsarv', 'inherits_access_empty_msg' => 'Börja med tom behörighetslista', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 1796e6c3a..b597dd104 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -700,6 +700,7 @@ URL: [url]', 'individuals' => 'Bireysel', 'individuals_in_groups' => '', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'devralındı', 'inherits_access_copy_msg' => 'Devralınan erişim listesini kopyala', 'inherits_access_empty_msg' => 'Boş erişim listesiyle başla', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 88f84ab73..27113fab7 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1340) +// Translators: Admin (1342) $text = array( '2_factor_auth' => '', @@ -337,7 +337,7 @@ URL: [url]', 'daily' => 'Щоденно', 'databasesearch' => 'Пошук по БД', 'database_schema_version' => '', -'data_loading' => '', +'data_loading' => 'Зачекайте, дані завантажуються...', 'date' => 'Дата', 'days' => 'дні', 'debug' => '', @@ -706,6 +706,7 @@ URL: [url]', 'individuals' => 'Користувачі', 'individuals_in_groups' => 'Користувачі групи', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => 'успадкований', 'inherits_access_copy_msg' => 'Скопіювати успадкований список', 'inherits_access_empty_msg' => 'Почати з порожнього списку доступу', @@ -1863,7 +1864,7 @@ URL: [url]', 'total' => '', 'to_before_from' => 'Кінцева дата не може бути меншою початкової дати', 'transfer_content' => '', -'transfer_document' => '', +'transfer_document' => 'Передача документа', 'transfer_no_read_access' => '', 'transfer_no_users' => '', 'transfer_no_write_access' => '', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 2c35a8e06..d58972259 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -696,6 +696,7 @@ URL: [url]', 'individuals' => '个人', 'individuals_in_groups' => '组成员', 'info_recipients_tab_not_released' => '', +'info_rm_user_from_processes_user' => '', 'inherited' => '继承', 'inherits_access_copy_msg' => '复制继承访问权限列表', 'inherits_access_empty_msg' => '从访问权限空列表开始', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 388cc43cd..adb741fe0 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -725,6 +725,7 @@ URL: [url]', 'individuals' => '個人', 'individuals_in_groups' => '小組成員', 'info_recipients_tab_not_released' => '由於未發布該文檔版本,因此無法確認接收。', +'info_rm_user_from_processes_user' => '', 'inherited' => '繼承', 'inherits_access_copy_msg' => '複製繼承存取權限列表', 'inherits_access_empty_msg' => '從存取權限空列表開始', From db63f8526c41a9aa67cbd269e73aedd27e272c3d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 13:05:48 +0200 Subject: [PATCH 020/141] set footer height and body margin on smaller devices --- views/bootstrap4/styles/styles.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/views/bootstrap4/styles/styles.css b/views/bootstrap4/styles/styles.css index 9925c6347..205e5ca36 100644 --- a/views/bootstrap4/styles/styles.css +++ b/views/bootstrap4/styles/styles.css @@ -31,6 +31,12 @@ body { /* Margin bottom by footer height */ margin-bottom: 60px; } +@media (max-width: 991px) { + body { + /* Margin bottom by footer height */ + margin-bottom: 90px; + } +} .footer { font-size: 80%; position: absolute; @@ -41,6 +47,11 @@ body { _line-height: 17px; /* Vertically center the text there */ background-color: #f5f5f5; } +@media (max-width: 991px) { + .footer { + height: 108px; + } +} .footer .disclaimer { display: inline-block; padding: 15px 0px 0px 0px; From cc09cd419c2ed31ef7aa76179b1d6ab4d8644848 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 14:41:03 +0200 Subject: [PATCH 021/141] fix margin of body and height of footer for small devices --- views/bootstrap4/styles/styles.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/views/bootstrap4/styles/styles.css b/views/bootstrap4/styles/styles.css index 205e5ca36..12f0dfaa7 100644 --- a/views/bootstrap4/styles/styles.css +++ b/views/bootstrap4/styles/styles.css @@ -37,6 +37,12 @@ body { margin-bottom: 90px; } } +@media (max-width: 767px) { + body { + /* Margin bottom by footer height */ + margin-bottom: 110px; + } +} .footer { font-size: 80%; position: absolute; @@ -52,6 +58,11 @@ body { height: 108px; } } +@media (max-width: 767px) { + .footer { + height: 126px; + } +} .footer .disclaimer { display: inline-block; padding: 15px 0px 0px 0px; From 612a493873073e8e742988e2386be24a52c04869 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 2 May 2021 14:46:40 +0200 Subject: [PATCH 022/141] fix syntax error in some php versions --- views/bootstrap/class.SchedulerTaskMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php index 81e5faaf8..2f56375c9 100644 --- a/views/bootstrap/class.SchedulerTaskMgr.php +++ b/views/bootstrap/class.SchedulerTaskMgr.php @@ -179,7 +179,7 @@ $(document).ready( function() { ), array( 'help'=>$param['description'] - ), + ) ); break; case 'password': From 25a7a571123d73575df47387095813d93198b16e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 May 2021 08:04:54 +0200 Subject: [PATCH 023/141] make tables smaller (no column for status anymore) --- views/bootstrap/class.ViewDocument.php | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 479f68198..49d53e674 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -606,7 +606,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { print "".htmlspecialchars($latestContent->getOriginalFileName())."\n"; // print "".getMLText("file")."\n"; // print "".getMLText("comment")."\n"; - print "".getMLText("status")."\n"; print "\n"; print "\n"; print "\n"; @@ -643,7 +642,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { print "
  • ".getMLText("uploaded_by")." getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."
  • "; print "
  • ".getLongReadableDate($latestContent->getDate())."
  • "; + print "
  • ".getMLText('status').": ".getOverallStatusText($status["status"]); + if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_IN_WORKFLOW || $status["status"]==S_EXPIRED ){ + print "
    hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; + } + print "
  • "; print "\n"; + $txt = $this->callHook('showVersionComment', $latestContent); if($txt) { echo $txt; @@ -655,13 +660,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $this->printVersionAttributes($folder, $latestContent); print "\n"; - print ""; - print getOverallStatusText($status["status"]); - if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_IN_WORKFLOW || $status["status"]==S_EXPIRED ){ - print "
    hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; - } - print ""; - print ""; if ($file_exists){ @@ -740,14 +738,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $this->contentContainerStart(); $statuslog = $latestContent->getStatusLog(); echo ""; - echo "\n"; + echo "\n"; echo ""; foreach($statuslog as $entry) { if($suser = $dms->getUser($entry['userID'])) $fullname = htmlspecialchars($suser->getFullName()); else $fullname = "--"; - echo "\n"; + echo "\n"; } print "\n
    ".getMLText('date')."".getMLText('status')."".getMLText('user')."".getMLText('comment')."
    ".getMLText('date')."/".getMLText('user')."".getMLText('status')."".getMLText('comment')."
    ".getLongReadableDate($entry['date'])."".getOverallStatusText($entry['status'])."".$fullname."".htmlspecialchars($entry['comment'])."
    ".getLongReadableDate($entry['date'])."
    ".$fullname."
    ".getOverallStatusText($entry['status'])."".htmlspecialchars($entry['comment'])."
    \n"; $this->contentContainerEnd(); @@ -1242,7 +1240,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { print ""; print "\n\n"; print "\n"; - print "\n"; print "\n"; print "\n\n\n"; @@ -1274,7 +1271,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { print "\n"; } print "\n"; - print "\n"; // print ""; - print ""; print ""; + echo ""; else - echo ""; + echo ""; } else { - echo ""; + echo ""; } echo ""; From a8dfcd95284d6c229ee44fe0997ddecfb64e5649 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 May 2021 17:49:15 +0200 Subject: [PATCH 033/141] showNavigationBar() checks if 'link' is set --- views/bootstrap4/class.Bootstrap4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index a450225ad..8412d7d59 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -560,7 +560,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $content .= "
    \n"; } else { $content .= "
  • \n"; - $content .= " Date: Mon, 3 May 2021 22:03:37 +0200 Subject: [PATCH 034/141] put form into contentContainer --- views/bootstrap/class.RoleMgr.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index ba1aaeda9..e91b7ad3a 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -150,6 +150,7 @@ $(document).ready( function() { contentContainerStart(); $this->formField( getMLText("role_name"), array( @@ -187,6 +188,7 @@ $(document).ready( function() { ) ); } + $this->contentContainerEnd(); if($currRole && $accessop->check_controller_access('RoleMgr', array('action'=>'editrole')) || !$currRole && $accessop->check_controller_access('RoleMgr', array('action'=>'addrole'))) { $this->formSubmit(" ".getMLText($currRole ? "save" : "add_role")); } From 4be72880a805a13009532af6c5cf2d31cc9aa2a3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 09:03:10 +0200 Subject: [PATCH 035/141] typeahead search for folders can search in subfolders --- CHANGELOG | 1 + op/op.Ajax.php | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 5fe6ba2d8..788252e05 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ - fixed error due to multiple declared function when controller method RemoveFolder::run was called more than once - fix php error setting mandatory workflow when uploading documents via webdav +- typeahead search for folders can search in subfolders -------------------------------------------------------------------------------- Changes in version 5.1.22 diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 1cc4188aa..f9b4ce487 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -145,6 +145,37 @@ switch($command) { if($user) { $query = $_GET['query']; + if(false !== ($pos = strpos($query, '/'))) { + $subquery = substr($query, 0, $pos); + $hits = $dms->search($subquery, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=$dms->getRootFolder(), $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x2, $expirationstartdate=array(), $expirationenddate=array()); + if($hits) { + if(count($hits['folders']) == 1) { + $hit = $hits['folders'][0]; + $basefolder = $dms->getFolder($hit->getID()); + if($subquery = substr($query, $pos+1)) { + $hits = $dms->search($subquery, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=$basefolder, $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x2, $expirationstartdate=array(), $expirationenddate=array()); + if($hits) { + $result = array(); + foreach($hits['folders'] as $hit) { + $result[] = $hit->getID().'#'.$basefolder->getName().'/'.$hit->getName(); + } + header('Content-Type: application/json'); + echo json_encode($result); + return; + } + } else { + $subfolders = $basefolder->getSubFolders(); + $result = array(); + foreach($subfolders as $subfolder) { + $result[] = $subfolder->getID().'#'.$basefolder->getName().'/'.$subfolder->getName(); + } + header('Content-Type: application/json'); + echo json_encode($result); + return; + } + } + } + } $hits = $dms->search($query, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=$dms->getRootFolder(), $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x2, $expirationstartdate=array(), $expirationenddate=array()); if($hits) { $result = array(); From 196b19d42a3e7c802b50ea94ded2873c477cb062 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 09:56:56 +0200 Subject: [PATCH 036/141] enlarge margin bottom on smaller devices --- views/bootstrap4/styles/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap4/styles/styles.css b/views/bootstrap4/styles/styles.css index 12f0dfaa7..1ba3a5223 100644 --- a/views/bootstrap4/styles/styles.css +++ b/views/bootstrap4/styles/styles.css @@ -34,13 +34,13 @@ body { @media (max-width: 991px) { body { /* Margin bottom by footer height */ - margin-bottom: 90px; + margin-bottom: 110px; } } @media (max-width: 767px) { body { /* Margin bottom by footer height */ - margin-bottom: 110px; + margin-bottom: 130px; } } .footer { From b4b0258fbd90753c7f80e89f45d6fc1904dd7767 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 09:57:23 +0200 Subject: [PATCH 037/141] use nav-pills instead of nav-tabs, set attribute role --- views/bootstrap/class.EditOnline.php | 10 ++++----- views/bootstrap/class.ExtensionMgr.php | 10 ++++----- views/bootstrap/class.LogManagement.php | 10 ++++----- views/bootstrap/class.Settings.php | 6 ++--- views/bootstrap/class.ViewDocument.php | 30 ++++++++++++------------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/views/bootstrap/class.EditOnline.php b/views/bootstrap/class.EditOnline.php index 5b2fe136b..effa3e0da 100644 --- a/views/bootstrap/class.EditOnline.php +++ b/views/bootstrap/class.EditOnline.php @@ -96,18 +96,18 @@ $(document).ready(function() { $document = $this->params['document']; $version = $this->params['version']; ?> -
  • \n\n"; diff --git a/views/bootstrap/class.LogManagement.php b/views/bootstrap/class.LogManagement.php index 5e8bf7ac7..86ff77c87 100644 --- a/views/bootstrap/class.LogManagement.php +++ b/views/bootstrap/class.LogManagement.php @@ -120,19 +120,19 @@ $(document).ready( function() { $wentries = array_reverse($wentries); } ?> -
    ".getMLText("status")."
      \n"; + print "
      \n"; print "
    • ".htmlspecialchars($version->getOriginalFileName())."
    • \n"; print "
    • ".getMLText('version').": ".$version->getVersion()."
    • \n"; if ($file_exists) print "
    • ". SeedDMS_Core_File::format_filesize($version->getFileSize()) .", ".htmlspecialchars($version->getMimeType())."
    • "; @@ -1282,6 +1279,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $updatingUser = $version->getUser(); print "
    • ".getMLText("uploaded_by")." getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; print "
    • ".getLongReadableDate($version->getDate())."
    • "; + print "
    • ".getMLText('status').": ".getOverallStatusText($vstat["status"])."
    • "; print "
    \n"; $txt = $this->callHook('showVersionComment', $version); if($txt) { @@ -1294,7 +1292,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $this->printVersionAttributes($folder, $version); print "
    ".htmlspecialchars($version->getComment())."".getOverallStatusText($vstat["status"]).""; if ($file_exists){ print "
      "; From 85992322d7e6c525cb5a45a584143aec4c1224e8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 May 2021 08:05:39 +0200 Subject: [PATCH 024/141] set padding-left of ul.actions to 0 --- views/bootstrap4/styles/application.css | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap4/styles/application.css b/views/bootstrap4/styles/application.css index 40a55a08c..d025f17ef 100644 --- a/views/bootstrap4/styles/application.css +++ b/views/bootstrap4/styles/application.css @@ -69,6 +69,7 @@ span.list-details { ul.actions { list-style: none; + padding-left: 0px; } ul.actions li a:hover > i { text-decoration: none; From f95c9d67953c455b38bb1503ae632ecc734380a6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 May 2021 09:01:33 +0200 Subject: [PATCH 025/141] do not include bootbox.min.js, make currenttab active if none is selected --- views/bootstrap4/class.Bootstrap4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 0db7730bf..a450225ad 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -117,7 +117,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { echo ''."\n"; echo ''."\n"; echo ''."\n"; - echo ''."\n"; + echo ''."\n"; if(!empty($this->extraheader['favicon'])) echo $this->extraheader['favicon']; else { From b10c3bf9afa6181f60f6272a9ae2ba8b970736fa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 May 2021 09:02:32 +0200 Subject: [PATCH 026/141] do not include bootbox.min.js, make docinfo tab active if none is selected --- views/bootstrap/class.ViewDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 49d53e674..a2312ebe2 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -470,7 +470,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { if($versions === null) $versions = $document->getContent(); - $this->htmlAddHeader(''."\n", 'js'); +// $this->htmlAddHeader(''."\n", 'js'); $this->htmlAddHeader(''."\n", 'css'); $this->htmlAddHeader(''."\n", 'js'); $this->htmlAddHeader(''."\n", 'js'); @@ -545,7 +545,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { echo $txt; ?>
    "; if($extconf['icon']) @@ -310,9 +310,9 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { echo ""; echo "".($re['icon-data'] ? ''.$re['name'].'' : '')."
    '; echo ''; @@ -265,7 +265,7 @@ if(!is_writeable($settings->_configFilePath)) { } ?> -
    \n"; + echo "
    \n"; print "\n\n"; print "\n"; print "\n"; print "\n"; - print "\n"; print "\n"; print "\n"; $list = $extmgr->getExtensionListByName($extname); @@ -124,11 +123,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { echo ">"; echo ""; echo ""; echo ""; - echo ""; echo "
    ".getMLText('name')."".getMLText('version')."".getMLText('author')."
    ".($re['icon-data'] ? ''.$re['name'].'' : '')."".$re['title']."
    ".$re['description'].""; + echo "
    ".getMLText('author').": ".$re['author']['name'].", ".$re['author']['company'].""; if($checkmsgs) echo "
    getImgPath("attention.gif")."\"> ".implode('
    ', $checkmsgs)."
    "; echo "
    ".$re['version']."
    ".$re['releasedate']."
    ".$re['author']['name']."
    ".$re['author']['company']."
    "; echo "
    "; if(!$checkmsgs && $extmgr->isWritableExtDir()) @@ -178,12 +177,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { $extdir = $this->params['extdir']; $extconf = $extmgr->getExtensionConfiguration(); - echo "\n"; + echo "
    \n"; print "\n\n"; print "\n"; print "\n"; print "\n"; - print "\n"; print "\n"; print "\n"; $errmsgs = array(); @@ -206,17 +204,17 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { echo ""; echo ""; echo ""; - echo ""; echo ""; - print "
    ".getMLText('name')."".getMLText('version')."".getMLText('author')."
    ".$extconf['title']; echo "
    ".$extconf['description'].""; + echo "
    ".getMLText('author').": ".$extconf['author']['name'].", ".$extconf['author']['company'].""; if($errmsgs) echo "
    getImgPath("attention.gif")."\"> ".implode('
    ', $errmsgs)."
    "; echo "
    ".$extconf['version']; echo "
    ".$extconf['releasedate'].""; echo "
    ".$extconf['author']['name']."
    ".$extconf['author']['company']."
    "; echo "
    "; if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) { - echo "\n"; + echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=changelog&extensionname='.$extname, 'class'=>'', 'title'=>'')); } if($extconf['config']) echo ""; @@ -292,12 +290,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
    \n"; + echo "\n"; print "\n\n"; print "\n"; print "\n"; print "\n"; - print "\n"; print "\n"; print "\n"; $list = $extmgr->getExtensionList(); @@ -318,15 +315,15 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { echo ""; echo ""; echo ""; - echo ""; echo "
    ".getMLText('name')."".getMLText('version')."".getMLText('author')."
    ".($re['icon-data'] ? ''.$re['name'].'' : '')."".$re['title']; echo "
    ".$re['description'].""; + echo "
    ".getMLText('author').": ".$re['author']['name'].", ".$re['author']['company'].""; if($checkmsgs) echo "
    getImgPath("attention.gif")."\"> ".implode('
    ', $checkmsgs)."
    "; echo "
    ".$re['version']."
    ".$re['releasedate']."
    ".$re['author']['name']."
    ".$re['author']['company']."
    "; echo "
    "; - echo "\n"; - echo "\n"; + echo $this->getModalBoxLink(array('target'=>'extensionInfo', 'remote'=>'out.ExtensionMgr.php?action=info_versions&extensionname='.$re['name'], 'class'=>'', 'title'=>'')); + echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=info_changelog&extensionname='.$re['name'], 'class'=>'', 'title'=>'')); if(!$checkmsgs && $extmgr->isWritableExtDir()) echo "
    ".createHiddenFieldWithKey('extensionmgr')."
    "; echo "
    "; @@ -349,33 +346,8 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { columnEnd(); $this->rowEnd(); -?> - - - -getModalBox(array('id'=>'extensionInfo', 'title'=>getMLText('extension_version_list'), 'content'=>'

    '.getMLText('extension_loading').'

    ', 'buttons'=>array(array('title'=>getMLText('close'))))); + echo $this->getModalBox(array('id'=>'extensionChangelog', 'title'=>getMLText('extension_changelog'), 'content'=>'

    '.getMLText('changelog_loading').'

    ', 'buttons'=>array(array('title'=>getMLText('close'))))); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From a3caa4a0c1184f180fd566a341e451096dcaa2ed Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 12:09:20 +0200 Subject: [PATCH 041/141] use getModalBox() and getModalBoxLink() --- views/bootstrap/class.LogManagement.php | 38 +++++++++---------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/views/bootstrap/class.LogManagement.php b/views/bootstrap/class.LogManagement.php index 86ff77c87..c09b43dd0 100644 --- a/views/bootstrap/class.LogManagement.php +++ b/views/bootstrap/class.LogManagement.php @@ -37,7 +37,7 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style { if ($print_header){ print "
    \n"; - print "\n"; + print "
    \n"; print "\n\n"; print "\n"; print "\n"; @@ -56,17 +56,17 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style { print "\n"; print "\n"; print "\n"; } if ($print_header) printMLText("empty_list"); - else print "
    ".getMLText("name")."".SeedDMS_Core_File::format_filesize(filesize($this->logdir.$entry)).""; - print " ".getMLText("rm_file").""; + print "".getMLText("rm_file").""; print " "; - print " ".getMLText("download").""; + print " ".getMLText("download").""; print " "; - print " ".getMLText('view')." …"; + echo $this->getModalBoxLink(array('target'=>'logViewer', 'remote'=>'out.LogManagement.php?logname='.$entry, 'class'=>'btn btn-primary btn-mini btn-sm', 'title'=>' '.getMLText('view').'')); print "
    \n"; + else print "
    \n"; } /* }}} */ function js() { /* {{{ */ @@ -121,34 +121,22 @@ $(document).ready( function() { } ?>
    -
    contentContainerStart(); + $this->showStartPaneContent('web', (!$mode || $mode == 'web')); $this->filelist($entries, 'web'); - $this->contentContainerEnd(); -?> -
    -
    -contentContainerStart(); + $this->showEndPaneContent('web', $mode); + + $this->showStartPaneContent('webdav', (!$mode || $mode == 'webdav')); $this->filelist($wentries, 'webdav'); - $this->contentContainerEnd(); + $this->showEndPaneContent('webdav', $mode); ?> -
    - getModalBox(array('id'=>'logViewer', 'title'=>getMLText('logfile'), 'buttons'=>array(array('title'=>getMLText('close'))))); $this->contentEnd(); $this->htmlEndPage(); } elseif(file_exists($this->logdir.$logname)){ From 23b1ab9e06c49273d3f86494a407958d57ab0099 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 12:09:44 +0200 Subject: [PATCH 042/141] use pane function from parent class --- views/bootstrap/class.Settings.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index e4faa9921..f6be1d89f 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -31,12 +31,8 @@ */ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { - protected function showPaneHeader($name, $title, $isactive) { /* {{{ */ - echo ''."\n"; - } /* }}} */ - protected function showStartPaneContent($name, $isactive) { /* {{{ */ - echo '
    '; + self::parent($name, $isactive); $this->contentContainerStart(); echo ''; echo ''; @@ -45,7 +41,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { protected function showEndPaneContent($name, $currentab) { /* {{{ */ echo '
    '; $this->contentContainerEnd(); - echo '
    '; + self::parent($name, $isactive); } /* }}} */ protected function getTextField($name, $value, $type='', $placeholder='') { /* {{{ */ From 56adaae427c818ff80e3f1048f61df0ddaa67ef9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 12:20:52 +0200 Subject: [PATCH 043/141] fix button for removing, downloading file --- views/bootstrap/class.LogManagement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.LogManagement.php b/views/bootstrap/class.LogManagement.php index 55843d783..2ebcba1f5 100644 --- a/views/bootstrap/class.LogManagement.php +++ b/views/bootstrap/class.LogManagement.php @@ -58,11 +58,11 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style { print "
    "; if($accessop->check_view_access('RemoveLog')) { - print " ".getMLText("rm_file").""; + print " ".getMLText("rm_file").""; } if($accessop->check_controller_access('Download', array('action'=>'log'))) { print " "; - print " ".getMLText("download").""; + print " ".getMLText("download").""; } print " "; echo $this->getModalBoxLink(array('target'=>'logViewer', 'remote'=>'out.LogManagement.php?logname='.$entry, 'class'=>'btn btn-primary btn-mini btn-sm', 'title'=>' '.getMLText('view').'')); From 07affc574b4942df989c6ef963f8b02366f5bb5f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 13:16:01 +0200 Subject: [PATCH 044/141] fix layout, show icon on buttons only on small devices --- views/bootstrap/class.GroupMgr.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index 539ad3e2f..e9a4946b1 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -187,6 +187,7 @@ $(document).ready( function() { contentContainerStart(); $this->formField( getMLText("name"), array( @@ -207,14 +208,15 @@ $(document).ready( function() { 'value'=>($group ? htmlspecialchars($group->getComment()) : '') ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?> contentSubHeading(getMLText("group_members")); + $this->contentHeading(getMLText("group_members")); ?> - +
    getUsers(); if (count($members) == 0) @@ -228,9 +230,9 @@ $(document).ready( function() { print ""; print ""; print ""; } } @@ -238,7 +240,7 @@ $(document).ready( function() {
    " . htmlspecialchars($member->getFullName()) . "" . ($group->isMember($member,true)?getMLText("manager"):" ") . ""; - print "
    getID()."\" />getID()."\" />".createHiddenFieldWithKey('rmmember')."
    "; + print "
    getID()."\" />getID()."\" />".createHiddenFieldWithKey('rmmember')."
    "; print " "; - print "
    getID()."\" />getID()."\" />".createHiddenFieldWithKey('tmanager')."
    "; + print "
    getID()."\" />getID()."\" />".createHiddenFieldWithKey('tmanager')."
    "; print "
    contentSubHeading(getMLText("add_member")); + $this->contentHeading(getMLText("add_member")); ?>
    @@ -246,6 +248,7 @@ $(document).ready( function() { contentContainerStart(); $options = array(); $allUsers = $dms->getAllUsers($sortusersinlist); foreach ($allUsers as $currUser) { @@ -271,6 +274,7 @@ $(document).ready( function() { 'value'=>1 ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('add')); ?>
    @@ -326,11 +330,9 @@ $(document).ready( function() { columnEnd(); $this->columnStart(8); - $this->contentContainerStart(); ?>
    getID()."\"" : "") ?>>
    contentContainerEnd(); $this->columnEnd(); $this->rowEnd(); $this->contentEnd(); From 4cb9ed294ef136e98b13eab5e4b1d46d0930dc5b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 13:16:35 +0200 Subject: [PATCH 045/141] place submit button outside of contentContainer --- views/bootstrap/class.UsrMgr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 3cb9763b7..4cf8b1ad4 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -227,6 +227,7 @@ $(document).ready( function() { contentContainerStart(); $this->formField( getMLText("user_login"), array( @@ -501,6 +502,7 @@ $(document).ready( function() { ); } } + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText($currUser ? "save" : "add_user")); ?> @@ -555,12 +557,10 @@ $(document).ready( function() { columnEnd(); $this->columnStart(4); - $this->contentContainerStart(); ?>
    getID()."\"" : "") ?>>
    contentContainerEnd(); $this->columnEnd(); $this->rowEnd(); $this->contentEnd(); From d3958e73f94bf98bbf3d2d984cf35430860a1977 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 13:17:07 +0200 Subject: [PATCH 046/141] add border botton to contentHeading --- views/bootstrap4/class.Bootstrap4.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index dfd1a4918..16bfaa4ee 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1005,9 +1005,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function contentHeading($heading, $noescape=false) { /* {{{ */ if($noescape) - echo "".$heading."\n"; + echo "".$heading."\n"; else - echo "".htmlspecialchars($heading)."\n"; + echo "".htmlspecialchars($heading)."\n"; return; } /* }}} */ From 5fe8ab1615598734174907d9a7da15fc93e5f041 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 13:40:05 +0200 Subject: [PATCH 047/141] set width of pwd strength bar to 100% --- views/bootstrap/class.UsrMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 4cf8b1ad4..67d1193ca 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -245,7 +245,7 @@ $(document).ready( function() { if($passwordstrength > 0) { $this->formField( getMLText("password_strength"), - '
    ' + '
    ' ); } $this->formField( From 1c6c36eb52fc1c764f99652f37166deaf7468e58 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 13:40:49 +0200 Subject: [PATCH 048/141] fix update of pwd strength bar --- views/bootstrap4/styles/application.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index a94495658..4f129e2a3 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -521,11 +521,11 @@ $(document).ready( function() { pwsp = 100*data.score; $('#'+target+' div.bar').width(pwsp+'%'); if(data.ok) { - $('#'+target+' div.bar').removeClass('bar-danger'); - $('#'+target+' div.bar').addClass('bar-success'); + $('#'+target+' div.bar').removeClass('bg-danger'); + $('#'+target+' div.bar').addClass('bg-success'); } else { - $('#'+target+' div.bar').removeClass('bar-success'); - $('#'+target+' div.bar').addClass('bar-danger'); + $('#'+target+' div.bar').removeClass('bg-success'); + $('#'+target+' div.bar').addClass('bg-danger'); } } }); /* }}} */ @@ -588,11 +588,11 @@ $(document).ready( function() { pwsp = 100*data.score; $('#'+target+' div.bar').width(pwsp+'%'); if(data.ok) { - $('#'+target+' div.bar').removeClass('bar-danger'); - $('#'+target+' div.bar').addClass('bar-success'); + $('#'+target+' div.bar').removeClass('bg-danger'); + $('#'+target+' div.bar').addClass('bg-success'); } else { - $('#'+target+' div.bar').removeClass('bar-success'); - $('#'+target+' div.bar').addClass('bar-danger'); + $('#'+target+' div.bar').removeClass('bg-success'); + $('#'+target+' div.bar').addClass('bg-danger'); } } }); /* }}} */ @@ -804,7 +804,7 @@ function onAddClipboard(ev) { /* {{{ */ this.statusbar = $("
    "); this.filename = $("
    ").appendTo(this.statusbar); this.size = $("
    ").appendTo(this.statusbar); - this.progressBar = $("
    ").appendTo(this.statusbar); + this.progressBar = $("
    ").appendTo(this.statusbar); this.abort = $("
    " + abortBtnLabel + "
    ").appendTo(this.statusbar); // $('.statusbar').empty(); obj.after(this.statusbar); From bd73b57a63963c5121d736aa81d88be717849f6c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 15:55:10 +0200 Subject: [PATCH 049/141] move submit out of contentContainer --- views/bootstrap/class.EditComment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.EditComment.php b/views/bootstrap/class.EditComment.php index 072c96820..d0a049581 100644 --- a/views/bootstrap/class.EditComment.php +++ b/views/bootstrap/class.EditComment.php @@ -82,13 +82,13 @@ $(document).ready(function() { $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("edit_comment")); - $this->contentContainerStart(); ?>
    contentContainerStart(); $this->formField( getMLText("comment"), array( @@ -99,11 +99,11 @@ $(document).ready(function() { 'value'=>htmlspecialchars($version->getComment()) ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?>
    contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 620783d17d1aa2ec10115d804a8554a6f8d3bafe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 15:55:35 +0200 Subject: [PATCH 050/141] move submit button out of contentContainer --- views/bootstrap/class.OverrideContentStatus.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.OverrideContentStatus.php b/views/bootstrap/class.OverrideContentStatus.php index 887738b8f..8b8aab4d3 100644 --- a/views/bootstrap/class.OverrideContentStatus.php +++ b/views/bootstrap/class.OverrideContentStatus.php @@ -80,8 +80,6 @@ $(document).ready(function() { $this->contentHeading(getMLText("change_status")); - $this->contentContainerStart(); - // Display the Review form. ?>
    @@ -89,6 +87,7 @@ $(document).ready(function() { contentContainerStart(); $this->formField( getMLText("comment"), array( @@ -111,11 +110,11 @@ $(document).ready(function() { 'options'=>$options, ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('update')); ?>
    contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 10e3ae560ce47a4047a877942e93b9472848a209 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 15:56:09 +0200 Subject: [PATCH 051/141] set class of ul list for attachments --- views/bootstrap/class.ViewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index f47dac414..ba706b170 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1380,7 +1380,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { } print "
      \n"; + print "
      \n"; print "
    • ".htmlspecialchars($file->getName())."
    • \n"; if($file->getName() != $file->getOriginalFileName()) print "
    • ".htmlspecialchars($file->getOriginalFileName())."
    • \n"; From 6b0b72a0621fcd537f4bdb54304ecaeda63672b2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 15:56:43 +0200 Subject: [PATCH 052/141] move all init function into one function and call after loading html --- views/bootstrap4/styles/application.js | 128 +++++++++---------------- 1 file changed, 47 insertions(+), 81 deletions(-) diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index 4f129e2a3..38201aae2 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -47,47 +47,7 @@ function treeDocumentSelected(formid, nodeid, nodename) { $('#docChooser'+formid).modal('hide'); } -$(document).ready( function() { -// $('.dropdown-menu a.dropdown-toggle').on('click', function(e) { - $('body').on('click', '.dropdown-menu a.dropdown-toggle', function (e) { - if (!$(this).next().hasClass('show')) { - $(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); - } - var $subMenu = $(this).next(".dropdown-menu"); - $subMenu.toggleClass('show'); - - - $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) { - $('.dropdown-submenu .show').removeClass("show"); - }); - - - return false; - }); - - /* close popovers when clicking somewhere except in the popover or the - * remove icon - */ - $('html').on('click', function(e) { - if (typeof $(e.target).data('original-title') == 'undefined' && !$(e.target).parents().is('.popover.in') && !$(e.target).is('.fa fa-remove')) { - $('[data-original-title]').popover('hide'); - } - }); - - $('body').on('hidden', '.modal', function () { - $(this).removeData('modal'); - }); - - /* Bootstrap 4 does not support to the remote loading of the modal content - * anymore. This adds it by using jquery. - */ - $('body').on('click', '[data-toggle="modal"]', function(ev){ - ev.preventDefault(); - $($(this).data("target")+' .modal-body').load($(this).data("remote")); - }); - -// $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); }); - +function initMost() { $('.datepicker, #expirationdate, #createstartdate, #createenddate, #expirationstartdate, #expirationenddate') .datepicker({todayHighlight: true, toggleActive: true, autoclose: "true"}) /* @@ -282,6 +242,50 @@ $(document).ready( function() { return ' ' + strarr[1].replace(/
      '); $.get(url, function(data) { element.html(data); - $(".chzn-select").select2({ - theme: "bootstrap4", - width: '100%', - templateResult: chzn_template_func//, - //templateSelection: chzn_template_func - }); - $(".pwd").passStrength({ /* {{{ */ - url: "../op/op.Ajax.php", - onChange: function(data, target) { - pwsp = 100*data.score; - $('#'+target+' div.bar').width(pwsp+'%'); - if(data.ok) { - $('#'+target+' div.bar').removeClass('bg-danger'); - $('#'+target+' div.bar').addClass('bg-success'); - } else { - $('#'+target+' div.bar').removeClass('bg-success'); - $('#'+target+' div.bar').addClass('bg-danger'); - } - } - }); /* }}} */ if(afterload) { var func = eval(afterload); if(typeof func === "function"){ func(); } } + initMost(); }); }); /* }}} */ @@ -576,26 +561,6 @@ $(document).ready( function() { element.prepend('
      '); $.get(url, function(data) { element.html(data); - $(".chzn-select").select2({ - theme: "bootstrap4", - width: '100%', - templateResult: chzn_template_func//, - //templateSelection: chzn_template_func - }); - $(".pwd").passStrength({ /* {{{ */ - url: "../op/op.Ajax.php", - onChange: function(data, target) { - pwsp = 100*data.score; - $('#'+target+' div.bar').width(pwsp+'%'); - if(data.ok) { - $('#'+target+' div.bar').removeClass('bg-danger'); - $('#'+target+' div.bar').addClass('bg-success'); - } else { - $('#'+target+' div.bar').removeClass('bg-success'); - $('#'+target+' div.bar').addClass('bg-danger'); - } - } - }); /* }}} */ if(callback) callback.call(); if(afterload) { @@ -604,6 +569,7 @@ $(document).ready( function() { func(); } } + initMost(); }); }); /* }}} */ From ef42392e7f53584013af783e74871fd407288564 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:27:27 +0200 Subject: [PATCH 053/141] add formField of type 'plain' --- views/bootstrap/class.Bootstrap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index fd62d6b8c..d62d831dd 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1111,6 +1111,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; (!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : ''). (!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '').""; break; + case 'plain': + echo $value['value']; + break; case 'input': default: switch($value['type']) { From 62d8197751bcb49822a767260a70bedee558c3b1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:28:04 +0200 Subject: [PATCH 054/141] add formField of type 'plain', fix printAccordion() --- views/bootstrap4/class.Bootstrap4.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 16bfaa4ee..cd9b50caf 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1085,6 +1085,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; (!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : ''). (!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '').""; break; + case 'plain': + echo $value['value']; + break; case 'input': default: switch($value['type']) { @@ -3523,8 +3526,8 @@ $("body").on("click", "span.openpopupbox", function(e) { $id = substr(md5(uniqid()), 0, 4); ?>
      -
      -
      +
      +
      From 9990fdb57d5624b625c54a8574513a813fce3e90 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:29:07 +0200 Subject: [PATCH 055/141] replace table with form controll --- views/bootstrap/class.KeywordChooser.php | 171 +++++++++++------------ 1 file changed, 81 insertions(+), 90 deletions(-) diff --git a/views/bootstrap/class.KeywordChooser.php b/views/bootstrap/class.KeywordChooser.php index 9d648a730..e73199984 100644 --- a/views/bootstrap/class.KeywordChooser.php +++ b/views/bootstrap/class.KeywordChooser.php @@ -115,99 +115,90 @@ myTA.focus();
      contentContainerStart(); -?> - - - - - - - - - - - - -getOwner(); - if (!$owner->isAdmin()) - continue; -?> - - - - - - - - - -formField( + getMLText("keywords"), + array( + 'element'=>'textarea', + 'id'=>'keywordta', + 'rows'=>4, + ) + ); + $options = array(); + $options[] = array('-1', getMLText('choose_category')); foreach ($categories as $category) { $owner = $category->getOwner(); - if ($owner->isAdmin()) - continue; -?> - - - - - -
      :
      : - -
      : - -
      - -getId().'" style="display: none;">'; + $this->formField( + getMLText("default_keywords"), + array( + 'element'=>'plain', + 'name'=>'categories0', + 'value'=>implode(' ', $kw), + ) + ); + echo '
      '; + } + } + } + $options = array(); + $options[] = array('-1', getMLText('choose_category')); + foreach ($categories as $category) { + $owner = $category->getOwner(); + if(!$owner->isAdmin()) + $options[] = array(''.$category->getID(), htmlspecialchars($category->getName())); + } + $this->formField( + getMLText("personal_default_keywords"), + array( + 'element'=>'select', + 'id'=>'categories1', + 'options'=>$options, + ) + ); + foreach ($categories as $category) { + $owner = $category->getOwner(); + if(!$owner->isAdmin()) { + $lists = $category->getKeywordLists(); + if(count($lists) == 0) print getMLText("no_default_keywords"); + else { + $kw = array(); + foreach ($lists as $list) { + $kw[] = "".htmlspecialchars($list["keywords"]).""; + } + echo ''; + } + } + } $this->contentContainerEnd(); echo ''."\n"; // $this->htmlEndPage(); From 7da093ff4eaf3b066f39b09b7ff07241075dcfae Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:29:30 +0200 Subject: [PATCH 056/141] replace most of the html --- views/bootstrap/class.AttributeMgr.php | 4 +-- views/bootstrap/class.Categories.php | 27 +++++++++------ views/bootstrap/class.DefaultKeywords.php | 42 ++++++++++++----------- 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index 3050b2a24..4bc5d844f 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -322,8 +322,6 @@ $(document).ready( function() { $attrdefs = $this->params['attrdefs']; $selattrdef = $this->params['selattrdef']; - $this->htmlAddHeader(''."\n", 'js'); - $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); @@ -333,7 +331,7 @@ $(document).ready( function() { $this->columnStart(6); ?>
      - contentHeading(getMLText("category_info")); $c = $selcat->countDocumentsByCategory(); - echo "\n"; + echo "
      \n"; echo "\n"; echo "
      ".getMLText('document_count')."".($c)."
      "; @@ -145,8 +145,6 @@ $(document).ready( function() { $categories = $this->params['categories']; $selcat = $this->params['selcategory']; - $this->htmlAddHeader(''."\n", 'js'); - $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); @@ -157,15 +155,24 @@ $(document).ready( function() { $this->columnStart(6); ?> -
      getID()."\"" : "") ?>>
      getID()."\"" : "") ?>>
      diff --git a/views/bootstrap/class.DefaultKeywords.php b/views/bootstrap/class.DefaultKeywords.php index e9e32e97d..7ee55f052 100644 --- a/views/bootstrap/class.DefaultKeywords.php +++ b/views/bootstrap/class.DefaultKeywords.php @@ -120,13 +120,13 @@ $(document).ready( function() { function actionmenu() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; - $selcategoryid = $this->params['selcategoryid']; + $selcategory = $this->params['selcategory']; - if($selcategoryid && $selcategoryid > 0) { + if($selcategory && $selcategory->getId() > 0) { ?>
      - +
      @@ -137,7 +137,7 @@ $(document).ready( function() { function form() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; - $category = $dms->getKeywordCategory($this->params['selcategoryid']); + $category = $this->params['selcategory']; $this->showKeywordForm($category, $user); } /* }}} */ @@ -240,7 +240,7 @@ $(document).ready( function() { $dms = $this->params['dms']; $user = $this->params['user']; $categories = $this->params['categories']; - $selcategoryid = $this->params['selcategoryid']; + $selcategory = $this->params['selcategory']; $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); @@ -252,31 +252,33 @@ $(document).ready( function() { $this->columnStart(4); ?>
      -
      -
      >
      +
      getId()."\"" : "") ?>>
      columnEnd(); $this->columnStart(8); ?> -
      >
      +
      getId()."\"" : "") ?>>
      columnEnd(); From c5b5ac07db1fee635f4431e39f2879480b4de2ae Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:29:55 +0200 Subject: [PATCH 057/141] set 'setcategory' in view --- out/out.DefaultKeywords.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/out/out.DefaultKeywords.php b/out/out.DefaultKeywords.php index dba41a2e5..a1a3d4a21 100644 --- a/out/out.DefaultKeywords.php +++ b/out/out.DefaultKeywords.php @@ -37,15 +37,15 @@ if (!$user->isAdmin()) { } if(isset($_GET['categoryid'])) - $selcategoryid = $_GET['categoryid']; + $selcategory = $dms->getKeywordCategory($_GET['categoryid']); else - $selcategoryid = 0; + $selcategory = null; $categories = $dms->getAllUserKeywordCategories($user->getID()); if($view) { $view->setParam('categories', $categories); - $view->setParam('selcategoryid', $selcategoryid); + $view->setParam('selcategory', $selcategory); $view->setParam('accessobject', $accessop); $view($_GET); exit; From f6fbcbadfa78fb8dcc1ee52dbf165d916e4d5141 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:35:24 +0200 Subject: [PATCH 058/141] do not show message anymore, if keyword list is empty --- views/bootstrap/class.KeywordChooser.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.KeywordChooser.php b/views/bootstrap/class.KeywordChooser.php index e73199984..bf0f5d888 100644 --- a/views/bootstrap/class.KeywordChooser.php +++ b/views/bootstrap/class.KeywordChooser.php @@ -142,8 +142,7 @@ myTA.focus(); $owner = $category->getOwner(); if($owner->isAdmin()) { $lists = $category->getKeywordLists(); - if(count($lists) == 0) print getMLText("no_default_keywords"); - else { + if(count($lists)) { $kw = array(); foreach ($lists as $list) { $kw[] = "".htmlspecialchars($list["keywords"]).""; @@ -180,8 +179,7 @@ myTA.focus(); $owner = $category->getOwner(); if(!$owner->isAdmin()) { $lists = $category->getKeywordLists(); - if(count($lists) == 0) print getMLText("no_default_keywords"); - else { + if(count($lists)) { $kw = array(); foreach ($lists as $list) { $kw[] = "".htmlspecialchars($list["keywords"]).""; From 585fa964d576fb6cf2529ed6ab2c4952bb5eb114 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:41:21 +0200 Subject: [PATCH 059/141] add class 'form-control' to some select tags --- views/bootstrap4/class.Bootstrap4.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index cd9b50caf..d8209cf9a 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1780,7 +1780,7 @@ $(document).ready(function() { if($users) { $allowempty = $attrdef->getMinValues() == 0; $allowmultiple = $attrdef->getMultipleValues(); - $content .= "getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_user")."\">"; if($allowempty) $content .= ""; foreach($users as $curuser) { @@ -1800,7 +1800,7 @@ $(document).ready(function() { if($groups) { $allowempty = $attrdef->getMinValues() == 0; $allowmultiple = $attrdef->getMultipleValues(); - $content .= "getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_group")."\">"; if($allowempty) $content .= ""; foreach($groups as $curgroup) { @@ -1823,7 +1823,7 @@ $(document).ready(function() { } else { $content .= "\" data-allow-clear=\"true\""; } - $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; + $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"form-control chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; if(!$attrdef->getMultipleValues()) { $content .= ""; } From b5116e3c1b06e4ce914b377e442dfef4affefcf5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:49:36 +0200 Subject: [PATCH 060/141] place submit button outside of contentContainer --- views/bootstrap/class.AddEvent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.AddEvent.php b/views/bootstrap/class.AddEvent.php index eb7cdebab..b013885d7 100644 --- a/views/bootstrap/class.AddEvent.php +++ b/views/bootstrap/class.AddEvent.php @@ -78,7 +78,6 @@ $(document).ready(function() { $this->pageNavigation("", "calendar"); $this->contentHeading(getMLText("add_event")); - $this->contentContainerStart(); $expdate = getReadableDate(); ?> @@ -87,6 +86,7 @@ $(document).ready(function() { contentContainerStart(); $this->formField( getMLText("from"), $this->getDateChooser($expdate, "from", $this->params['session']->getLanguage()) @@ -114,13 +114,13 @@ $(document).ready(function() { 'cols'=>80 ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('add_event')); ?> contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 073ba8281ccdcf16f86abdac5a7305722e3f4478 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:50:18 +0200 Subject: [PATCH 061/141] place submit button outside of contentContainer --- views/bootstrap/class.Calendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Calendar.php b/views/bootstrap/class.Calendar.php index ef364f11d..d59f8d1b8 100644 --- a/views/bootstrap/class.Calendar.php +++ b/views/bootstrap/class.Calendar.php @@ -65,13 +65,13 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style { if($event) { // print_r($event); $this->contentHeading(getMLText('edit_event')); - $this->contentContainerStart(); ?>
      "> contentContainerStart(); $this->formField( getMLText("from"), $this->getDateChooser(getReadableDate($event["start"]), "from") @@ -100,11 +100,11 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style { 'required'=>$strictformcheck ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?>
      contentContainerEnd(); $this->contentHeading(getMLText('rm_event')); $this->contentContainerStart(); ?> From 22882e2634adbcc3bc76645958f9e7b46b62e688 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:50:36 +0200 Subject: [PATCH 062/141] pass access object to view --- out/out.AddEvent.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/out/out.AddEvent.php b/out/out.AddEvent.php index 8f8f0d6d9..3f81697bb 100644 --- a/out/out.AddEvent.php +++ b/out/out.AddEvent.php @@ -25,6 +25,7 @@ require_once("inc/inc.Init.php"); require_once("inc/inc.Extension.php"); require_once("inc/inc.DBInit.php"); require_once("inc/inc.ClassUI.php"); +require_once("inc/inc.ClassAccessOperation.php"); require_once("inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); @@ -34,6 +35,8 @@ if ($user->isGuest()) { UI::exitError(getMLText("edit_event"),getMLText("access_denied")); } +$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); + if($view) { $view->setParam('accessobject', $accessop); $view->setParam('strictformcheck', $settings->_strictFormCheck); From 84a61cbd14d2ae6698594d3b6460bcd792c1230f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 18:08:19 +0200 Subject: [PATCH 063/141] fix parameters of SeedDMS_AccessOperation() --- out/out.AddEvent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/out/out.AddEvent.php b/out/out.AddEvent.php index 84e14e158..0510b6035 100644 --- a/out/out.AddEvent.php +++ b/out/out.AddEvent.php @@ -39,7 +39,7 @@ if ($user->isGuest()) { UI::exitError(getMLText("edit_event"),getMLText("access_denied")); } -$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); +$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if($view) { $view->setParam('accessobject', $accessop); From ff4151093c3482f9446e3d344a9e5da043caedb1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 18:08:31 +0200 Subject: [PATCH 064/141] nicer layout --- views/bootstrap/class.Setup2Factor.php | 32 +++++++++++++++++--------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/views/bootstrap/class.Setup2Factor.php b/views/bootstrap/class.Setup2Factor.php index 59f5f2d2d..a42bb4b9b 100644 --- a/views/bootstrap/class.Setup2Factor.php +++ b/views/bootstrap/class.Setup2Factor.php @@ -76,36 +76,46 @@ $(document).ready( function() { $this->contentStart(); $this->pageNavigation(getMLText("my_account"), "my_account"); $this->contentHeading(getMLText('2_factor_auth')); - echo "
      ".getMLText('2_factor_auth_info')."
      "; + $this->infoMsg(getMLText('2_factor_auth_info')); $this->rowStart(); - $this->contentContainerStart('span6'); + $this->columnStart(6); + $this->contentHeading(getMLText('2_fact_auth_new_secret')); $tfa = new \RobThree\Auth\TwoFactorAuth('SeedDMS'); $oldsecret = $user->getSecret(); $secret = $tfa->createSecret(); ?>
      -
      -
      -
      +formField( + getMLText('2_fact_auth_secret'), + array( + 'element'=>'input', + 'type'=>'text', + 'name'=>'secret', + 'class'=>'secret', + 'value'=>htmlspecialchars($secret), + 'required'=>true + ) + ); + $this->formSubmit(getMLText('submit_2_fact_auth')); +?>
      -formSubmit(getMLText('submit_2_fact_auth')); -?>
      contentContainerEnd(); - $this->contentContainerStart('span6'); + $this->columnEnd(); + $this->columnStart(6); + $this->contentHeading(getMLText('2_fact_auth_current_secret')); echo '
      '.$oldsecret.'
      '; echo '
      '; ?> contentContainerEnd(); + $this->columnEnd(); $this->rowEnd(); $this->contentEnd(); $this->htmlEndPage(); From 26b376296278c38eeefca0b63b8e5deae9cbafea Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 18:11:18 +0200 Subject: [PATCH 065/141] fix layout --- views/bootstrap/class.EditUserData.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.EditUserData.php b/views/bootstrap/class.EditUserData.php index f84d4cefa..2c79c39d9 100644 --- a/views/bootstrap/class.EditUserData.php +++ b/views/bootstrap/class.EditUserData.php @@ -100,11 +100,11 @@ $(document).ready( function() { $this->pageNavigation(getMLText("my_account"), "my_account"); $this->contentHeading(getMLText("edit_user_details")); - $this->contentContainerStart(); ?>
      contentContainerStart(); $this->formField( getMLText("current_password"), array( @@ -118,12 +118,12 @@ $(document).ready( function() { ); $this->formField( getMLText("new_password"), - '' + '' ); if($passwordstrength) { $this->formField( getMLText("password_strength"), - '
      ' + '
      ' ); } $this->formField( @@ -206,12 +206,12 @@ $(document).ready( function() { ) ); } + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?>
      contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From f5b8b5b45d4f4a29fe4fe9b229f69048685fd19e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 18:25:33 +0200 Subject: [PATCH 066/141] major rework, make it work again --- op/op.AddToTransmittal.php | 2 +- views/bootstrap/class.AddToTransmittal.php | 35 ++++++++++++---------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/op/op.AddToTransmittal.php b/op/op.AddToTransmittal.php index 6aa99dc12..de8d6c466 100644 --- a/op/op.AddToTransmittal.php +++ b/op/op.AddToTransmittal.php @@ -68,7 +68,7 @@ if (!is_object($transmittal)) { } if ($transmittal->getUser()->getID() != $user->getID()) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_transmittal")); } if($transmittal->addContent($version)) { diff --git a/views/bootstrap/class.AddToTransmittal.php b/views/bootstrap/class.AddToTransmittal.php index dd9c665a9..0f8a43a39 100644 --- a/views/bootstrap/class.AddToTransmittal.php +++ b/views/bootstrap/class.AddToTransmittal.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Class which outputs the html page for AddToTransmittal view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_AddToTransmittal extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_AddToTransmittal extends SeedDMS_Theme_Style { function show() { /* {{{ */ $dms = $this->params['dms']; @@ -42,31 +42,34 @@ class SeedDMS_View_AddToTransmittal extends SeedDMS_Bootstrap_Style { $this->contentStart(); $this->pageNavigation(getMLText("my_documents"), "my_documents"); $this->contentHeading(getMLText("add_to_transmittal")); - $this->contentContainerStart(); - ?> -
      + - -

      -: - -

      - -

      -
      contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From edd60363f363abc45828632ab9dacee5a8275467 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 May 2021 13:43:40 +0200 Subject: [PATCH 067/141] return false if query fails --- SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php index 2eb15428b..cc5b39119 100644 --- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php +++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php @@ -175,6 +175,8 @@ class SeedDMS_SQLiteFTS_Indexer { if($query) $sql .= " WHERE docs MATCH ".$this->_conn->quote($query); $res = $this->_conn->query($sql); + if(!$res) + return false; $row = $res->fetch(); $sql = "SELECT ".$this->_rawid.", documentid FROM docs"; From 1e08ea06e9c0acf487ac31c4d451719ccb879e6e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 May 2021 13:44:02 +0200 Subject: [PATCH 068/141] add missing ' AND ' in query string --- SeedDMS_SQLiteFTS/SQLiteFTS/Search.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php index 78b5ed86c..77b3993f6 100644 --- a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php +++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php @@ -79,11 +79,11 @@ class SeedDMS_SQliteFTS_Search { if(!empty($fields['owner'])) { if(is_string($fields['owner'])) { if($querystr) - $querystr .= ' '; + $querystr .= ' AND '; $querystr .= 'owner:'.$fields['owner']; } elseif(is_array($fields['owner'])) { if($querystr) - $querystr .= ' '; + $querystr .= ' AND '; $querystr .= '(owner:'; $querystr .= implode(' OR owner:', $fields['owner']); $querystr .= ')'; @@ -91,14 +91,14 @@ class SeedDMS_SQliteFTS_Search { } if(!empty($fields['category'])) { if($querystr) - $querystr .= ' '; + $querystr .= ' AND '; $querystr .= '(category:'; $querystr .= implode(' OR category:', $fields['category']); $querystr .= ')'; } if(!empty($fields['status'])) { if($querystr) - $querystr .= ' '; + $querystr .= ' AND '; $status = array_map(function($v){return $v+10;}, $fields['status']); $querystr .= '(status:'; $querystr .= implode(' OR status:', $status); @@ -106,21 +106,21 @@ class SeedDMS_SQliteFTS_Search { } if(!empty($fields['user'])) { if($querystr) - $querystr .= ' '; + $querystr .= ' AND '; $querystr .= '(users:'; $querystr .= implode(' OR users:', $fields['user']); $querystr .= ')'; } if(!empty($fields['rootFolder']) && $fields['rootFolder']->getFolderList()) { if($querystr) - $querystr .= ' '; + $querystr .= ' AND '; $querystr .= '(path:'; $querystr .= str_replace(':', 'x', $fields['rootFolder']->getFolderList().$fields['rootFolder']->getID().':'); $querystr .= ')'; } if(!empty($fields['startFolder']) && $fields['startFolder']->getFolderList()) { if($querystr) - $querystr .= ' '; + $querystr .= ' AND '; $querystr .= '(path:'; $querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':'); $querystr .= ')'; From 805dbe212ade0440427676f37861837a86032fa7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 May 2021 13:46:05 +0200 Subject: [PATCH 069/141] fix html for date picker and accordion --- views/bootstrap4/class.Bootstrap4.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index d8209cf9a..1a181e7f3 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1366,7 +1366,7 @@ $(document).ready(function() { $dateformat = getConvertDateFormat(); $content = '
      - +
      @@ -1743,7 +1743,7 @@ $(document).ready(function() { */ $content = '
      - +
      @@ -3527,13 +3527,13 @@ $("body").on("click", "span.openpopupbox", function(e) { ?>
      -
      - + -
      -
      +
      +
      From e870e2071b9131a32ab3c4d091a2ef4c0c3bb539 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 May 2021 13:47:38 +0200 Subject: [PATCH 070/141] redo the search form --- out/out.Search.php | 189 ++++------- views/bootstrap/class.Search.php | 559 ++++++++++++++----------------- 2 files changed, 313 insertions(+), 435 deletions(-) diff --git a/out/out.Search.php b/out/out.Search.php index d34d3b572..1b0b00e41 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -64,15 +64,7 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext $categories = array(); $categorynames = array(); if(isset($_GET['category']) && $_GET['category']) { - foreach($_GET['category'] as $catname) { - if($catname) { - $cat = $dms->getDocumentCategoryByName($catname); - $categories[] = $cat; - $categorynames[] = $cat->getName(); - } - } - } elseif(isset($_GET['categoryids']) && $_GET['categoryids']) { - foreach($_GET['categoryids'] as $catid) { + foreach($_GET['category'] as $catid) { if($catid) { $cat = $dms->getDocumentCategory($catid); $categories[] = $cat; @@ -104,16 +96,18 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext // Check to see if the search has been restricted to a particular // document owner. $owner = []; + $ownernames = []; if (isset($_GET["owner"])) { + $owner = $_GET['owner']; if (!is_array($_GET['owner'])) { - if(!empty($_GET['owner']) && $o = $dms->getUserByLogin($_GET['owner'])) - $owner[] = $o->getLogin(); + if(!empty($_GET['owner']) && $o = $dms->getUser($_GET['owner'])) + $ownernames[] = $o->getLogin(); else UI::exitError(getMLText("search"),getMLText("unknown_owner")); } else { foreach($_GET["owner"] as $l) { - if($l && $o = $dms->getUserByLogin($l)) - $owner[] = $o->getLogin(); + if($l && $o = $dms->getUser($l)) + $ownernames[] = $o->getLogin(); } } } @@ -134,34 +128,16 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext } // status - $status = array(); - if (isset($_GET["pendingReview"])){ - $status[] = S_DRAFT_REV; - } - if (isset($_GET["pendingApproval"])){ - $status[] = S_DRAFT_APP; - } - if (isset($_GET["inWorkflow"])){ - $status[] = S_IN_WORKFLOW; - } - if (isset($_GET["released"])){ - $status[] = S_RELEASED; - } - if (isset($_GET["rejected"])){ - $status[] = S_REJECTED; - } - if (isset($_GET["obsolete"])){ - $status[] = S_OBSOLETE; - } - if (isset($_GET["expired"])){ - $status[] = S_EXPIRED; - } + if(isset($_GET['status'])) + $status = $_GET['status']; + else + $status = array(); // Check to see if the search has been restricted to a particular sub-tree in // the folder hierarchy. $startFolder = null; - if (isset($_GET["targetid"]) && is_numeric($_GET["targetid"]) && $_GET["targetid"]>0) { - $targetid = $_GET["targetid"]; + if (isset($_GET["folderfullsearchid"]) && is_numeric($_GET["folderfullsearchid"]) && $_GET["folderfullsearchid"]>0) { + $targetid = $_GET["folderfullsearchid"]; $startFolder = $dms->getFolder($targetid); if (!is_object($startFolder)) { UI::exitError(getMLText("search"),getMLText("invalid_folder_id")); @@ -188,7 +164,7 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext $index = $fulltextservice->Indexer(); if($index) { $lucenesearch = $fulltextservice->Search(); - $searchresult = $lucenesearch->search($query, array('owner'=>$owner, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1)))); + $searchresult = $lucenesearch->search($query, array('owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1)))); if($searchresult === false) { $session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_invalid_searchterm'))); $dcount = 0; @@ -313,105 +289,81 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext $owner = array(); $ownerobjs = array(); if (isset($_GET["owner"])) { + $owner = $_GET['owner']; if (!is_array($_GET['owner'])) { - if(!empty($_GET['owner']) && $o = $dms->getUserByLogin($_GET['owner'])) { + if(!empty($_GET['owner']) && $o = $dms->getUser($_GET['owner'])) { $ownerobjs[] = $o; - $owner = $o->getLogin(); } else UI::exitError(getMLText("search"),getMLText("unknown_owner")); } else { foreach($_GET["owner"] as $l) { - if($o = $dms->getUserByLogin($l)) { + if($o = $dms->getUser($l)) { $ownerobjs[] = $o; - $owner[] = $o->getLogin(); } } } } - // Is the search restricted to documents created between two specific dates? - $startdate = array(); - $stopdate = array(); - if (isset($_GET["creationdate"]) && $_GET["creationdate"]!=null) { - $creationdate = true; - } else { - $creationdate = false; + /* Creation date {{{ */ + $createstartdate = array(); + $createenddate = array(); + if(!empty($_GET["createstart"])) { + $createstartts = makeTsFromDate($_GET["createstart"]); + $createstartdate = array('year'=>(int)date('Y', $createstartts), 'month'=>(int)date('m', $createstartts), 'day'=>(int)date('d', $createstartts), 'hour'=>0, 'minute'=>0, 'second'=>0); } - - if(isset($_GET["createstart"])) { - $tmp = explode("-", $_GET["createstart"]); - $startdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0); - } else { - if(isset($_GET["createstartyear"])) - $startdate = array('year'=>$_GET["createstartyear"], 'month'=>$_GET["createstartmonth"], 'day'=>$_GET["createstartday"], 'hour'=>0, 'minute'=>0, 'second'=>0); - } - if ($startdate && !checkdate($startdate['month'], $startdate['day'], $startdate['year'])) { + if ($createstartdate && !checkdate($createstartdate['month'], $createstartdate['day'], $createstartdate['year'])) { UI::exitError(getMLText("search"),getMLText("invalid_create_date_end")); } - if(isset($_GET["createend"])) { - $tmp = explode("-", $_GET["createend"]); - $stopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>23, 'minute'=>59, 'second'=>59); - } else { - if(isset($_GET["createendyear"])) - $stopdate = array('year'=>$_GET["createendyear"], 'month'=>$_GET["createendmonth"], 'day'=>$_GET["createendday"], 'hour'=>23, 'minute'=>59, 'second'=>59); + if(!empty($_GET["createend"])) { + $createendts = makeTsFromDate($_GET["createend"]); + $createenddate = array('year'=>(int)date('Y', $createendts), 'month'=>(int)date('m', $createendts), 'day'=>(int)date('d', $createendts), 'hour'=>23, 'minute'=>59, 'second'=>59); } - if ($stopdate && !checkdate($stopdate['month'], $stopdate['day'], $stopdate['year'])) { + if ($createenddate && !checkdate($createenddate['month'], $createenddate['day'], $createenddate['year'])) { UI::exitError(getMLText("search"),getMLText("invalid_create_date_end")); } + /* }}} */ + /* Status date {{{ */ $statusstartdate = array(); - $statusstopdate = array(); - if (isset($_GET["statusdate"]) && $_GET["statusdate"]!=null) { - $statusdate = true; - } else { - $statusdate = false; + $statusenddate = array(); + if(!empty($_GET["statusdatestart"])) { + $statusstartts = makeTsFromDate($_GET["statusdatestart"]); + $statusstartdate = array('year'=>(int)date('Y', $statusstartts), 'month'=>(int)date('m', $statusstartts), 'day'=>(int)date('d', $statusstartts), 'hour'=>0, 'minute'=>0, 'second'=>0); } - - if(isset($_GET["statusstart"])) { - $tmp = explode("-", $_GET["statusstart"]); - $statusstartdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0); + if ($statusstartdate && !checkdate($statusstartdate['month'], $statusstartdate['day'], $statusstartdate['year'])) { + UI::exitError(getMLText("search"),getMLText("invalid_status_date_start")); } - if ($statusstartdate && !checkdate($statusstartdate['month'], $startdate['day'], $startdate['year'])) { - UI::exitError(getMLText("search"),getMLText("invalid_status_date_end")); - } - if(isset($_GET["statusend"])) { - $tmp = explode("-", $_GET["statusend"]); - $statusstopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>23, 'minute'=>59, 'second'=>59); - } - if ($statusstopdate && !checkdate($statusstopdate['month'], $stopdate['day'], $stopdate['year'])) { + if(!empty($_GET["statusdateend"])) { + $statusendts = makeTsFromDate($_GET["statusdateend"]); + $statusenddate = array('year'=>(int)date('Y', $statusendts), 'month'=>(int)date('m', $statusendts), 'day'=>(int)date('d', $statusendts), 'hour'=>23, 'minute'=>59, 'second'=>59); + } + if ($statusenddate && !checkdate($statusenddate['month'], $statusenddate['day'], $statusenddate['year'])) { UI::exitError(getMLText("search"),getMLText("invalid_status_date_end")); } + /* }}} */ + /* Expiration date {{{ */ $expstartdate = array(); - $expstopdate = array(); - if (isset($_GET["expirationdate"]) && $_GET["expirationdate"]!=null) { - $expirationdate = true; - } else { - $expirationdate = false; - } - - if(isset($_GET["expirationstart"]) && $_GET["expirationstart"]) { - $tmp = explode("-", $_GET["expirationstart"]); - $expstartdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0); + $expenddate = array(); + if(!empty($_GET["expirationstart"])) { + $expstartts = makeTsFromDate($_GET["expirationstart"]); + $expstartdate = array('year'=>(int)date('Y', $expstartts), 'month'=>(int)date('m', $expstartts), 'day'=>(int)date('d', $expstartts), 'hour'=>0, 'minute'=>0, 'second'=>0); if (!checkdate($expstartdate['month'], $expstartdate['day'], $expstartdate['year'])) { UI::exitError(getMLText("search"),getMLText("invalid_expiration_date_start")); } - } else { -// $expstartdate = array('year'=>$_GET["expirationstartyear"], 'month'=>$_GET["expirationstartmonth"], 'day'=>$_GET["expirationstartday"], 'hour'=>0, 'minute'=>0, 'second'=>0); - $expstartdate = array(); } - if(isset($_GET["expirationend"]) && $_GET["expirationend"]) { - $tmp = explode("-", $_GET["expirationend"]); - $expstopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0); - if (!checkdate($expstopdate['month'], $expstopdate['day'], $expstopdate['year'])) { + if(!empty($_GET["expirationend"])) { + $expendts = makeTsFromDate($_GET["expirationend"]); + $expenddate = array('year'=>(int)date('Y', $expendts), 'month'=>(int)date('m', $expendts), 'day'=>(int)date('d', $expendts), 'hour'=>23, 'minute'=>59, 'second'=>59); + if (!checkdate($expenddate['month'], $expenddate['day'], $expenddate['year'])) { UI::exitError(getMLText("search"),getMLText("invalid_expiration_date_end")); } - } else { - //$expstopdate = array('year'=>$_GET["expirationendyear"], 'month'=>$_GET["expirationendmonth"], 'day'=>$_GET["expirationendday"], 'hour'=>23, 'minute'=>59, 'second'=>59); - $expstopdate = array(); } + /* }}} */ // status + $status = isset($_GET['status']) ? $_GET['status'] : array(); + /* $status = array(); if (isset($_GET["pendingReview"])){ $status[] = S_DRAFT_REV; @@ -434,6 +386,7 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext if (isset($_GET["expired"])){ $status[] = S_EXPIRED; } + */ /* Do not search for folders if result shall be filtered by status. * If this is not done, unexplainable results will be delivered. @@ -446,13 +399,10 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext // category $categories = array(); - $categorynames = array(); if(isset($_GET['category']) && $_GET['category']) { - foreach($_GET['category'] as $catname) { - if($catname) { - $cat = $dms->getDocumentCategoryByName($catname); + foreach($_GET['category'] as $catid) { + if($cat = $dms->getDocumentCategory($catid)) { $categories[] = $cat; - $categorynames[] = $cat->getName(); } } } @@ -513,17 +463,17 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext 'startFolder'=>$startFolder, 'owner'=>$ownerobjs, 'status'=>$status, - 'creationstartdate'=>$creationdate ? $startdate : array(), - 'creationenddate'=>$creationdate ? $stopdate : array(), + 'creationstartdate'=>$createstartdate ? $createstartdate : array(), + 'creationenddate'=>$createenddate ? $createenddate : array(), 'modificationstartdate'=>array(), 'modificationenddate'=>array(), 'categories'=>$categories, 'attributes'=>$attributes, 'mode'=>$resultmode, - 'expirationstartdate'=>$expirationdate ? $expstartdate : array(), - 'expirationenddate'=>$expirationdate ? $expstopdate : array(), - 'statusstartdate'=>$statusdate ? $statusstartdate : array(), - 'statusenddate'=>$statusdate ? $statusstopdate : array(), + 'expirationstartdate'=>$expstartdate ? $expstartdate : array(), + 'expirationenddate'=>$expenddate ? $expenddate : array(), + 'statusstartdate'=>$statusstartdate ? $statusstartdate : array(), + 'statusenddate'=>$statusenddate ? $statusenddate : array(), 'orderby'=>$orderby )); $total = $resArr['totalDocs'] + $resArr['totalFolders']; @@ -593,18 +543,17 @@ if($settings->_showSingleSearchHit && count($entries) == 1) { $view->setParam('searchin', isset($searchin) ? $searchin : array()); $view->setParam('startfolder', isset($startFolder) ? $startFolder : null); $view->setParam('owner', $owner); - $view->setParam('startdate', isset($startdate) ? $startdate : array()); - $view->setParam('stopdate', isset($stopdate) ? $stopdate : array()); - $view->setParam('expstartdate', isset($expstartdate) ? $expstartdate : array()); - $view->setParam('expstopdate', isset($expstopdate) ? $expstopdate : array()); - $view->setParam('statusstartdate', isset($statusstartdate) ? $statusstartdate : array()); - $view->setParam('statusstopdate', isset($statusstopdate) ? $statusstopdate : array()); + $view->setParam('createstartdate', $createstartdate ? getReadableDate($createstartts) : ''); + $view->setParam('createenddate', $createenddate ? getReadableDate($createendts) : ''); + $view->setParam('expstartdate', $expstartdate ? getReadableDate($expstartts) : ''); + $view->setParam('expenddate', $expenddate ? getReadableDate($expendts) : ''); + $view->setParam('statusstartdate', $statusstartdate ? getReadableDate($statusstartts) : ''); + $view->setParam('statusenddate', $statusenddate ? getReadableDate($statusendts) : ''); $view->setParam('creationdate', isset($creationdate) ? $creationdate : ''); $view->setParam('expirationdate', isset($expirationdate) ? $expirationdate: ''); $view->setParam('statusdate', isset($statusdate) ? $statusdate: ''); $view->setParam('status', isset($status) ? $status : array()); $view->setParam('categories', isset($categories) ? $categories : ''); - $view->setParam('category', isset($categorynames) ? $categorynames : ''); $view->setParam('mimetype', isset($mimetype) ? $mimetype : ''); $view->setParam('attributes', isset($attributes) ? $attributes : ''); $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index f36c870ef..01ff9bcb0 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -132,17 +132,16 @@ function typeahead() { /* {{{ */ $enablefullsearch = $this->params['enablefullsearch']; $enableclipboard = $this->params['enableclipboard']; $attributes = $this->params['attributes']; - $category = $this->params['category']; $categories = $this->params['categories']; $mimetype = $this->params['mimetype']; $owner = $this->params['owner']; $startfolder = $this->params['startfolder']; - $startdate = $this->params['startdate']; - $stopdate = $this->params['stopdate']; + $createstartdate = $this->params['createstartdate']; + $createenddate = $this->params['createenddate']; $expstartdate = $this->params['expstartdate']; - $expstopdate = $this->params['expstopdate']; + $expenddate = $this->params['expenddate']; $statusstartdate = $this->params['statusstartdate']; - $statusstopdate = $this->params['statusstopdate']; + $statusenddate = $this->params['statusenddate']; $creationdate = $this->params['creationdate']; $expirationdate = $this->params['expirationdate']; $statusdate = $this->params['statusdate']; @@ -161,8 +160,6 @@ function typeahead() { /* {{{ */ $timeout = $this->params['timeout']; $xsendfile = $this->params['xsendfile']; - $this->htmlAddHeader(''."\n", 'js'); - $this->htmlStartPage(getMLText("search_results")); $this->globalNavigation(); $this->contentStart(); @@ -172,7 +169,7 @@ function typeahead() { /* {{{ */ $this->columnStart(4); //echo "
      ";print_r($_GET);echo "
      "; ?> - "; } /* }}} */ + protected function showVersionDetails($latestContent) { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $accessop = $this->params['accessobject']; + $viewonlinefiletypes = $this->params['viewonlinefiletypes']; + $enableownerrevapp = $this->params['enableownerrevapp']; + $workflowmode = $this->params['workflowmode']; + $cachedir = $this->params['cachedir']; + $previewwidthlist = $this->params['previewWidthList']; + $previewwidthdetail = $this->params['previewWidthDetail']; + $previewconverters = $this->params['previewConverters']; + $timeout = $this->params['timeout']; + $xsendfile = $this->params['xsendfile']; + + // verify if file exists + $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); + + $status = $latestContent->getStatus(); + +// print ""; +// print "\n\n"; +// print "\n"; +// print "\n"; +// print "\n"; +// print "\n"; + +// print "\n"; + +// print ""; +// print "\n
      ".htmlspecialchars($latestContent->getOriginalFileName())."
      "; + $this->contentHeading(htmlspecialchars($latestContent->getOriginalFileName())); + $this->rowStart(); + $this->columnStart(4); + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); + $previewer->setConverters($previewconverters); + $previewer->createPreview($latestContent); + if ($file_exists) { + if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) { + print "getDocument()->getId()."&version=". $latestContent->getVersion()."\">"; + } else { + print "getDocument()->getId()."&version=".$latestContent->getVersion()."\">"; + } + } + if($previewer->hasPreview($latestContent)) { + print("getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"); + } else { + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + if ($file_exists) { + print ""; + } +// print ""; + $this->columnEnd(); + $this->columnStart(4); + print "
        \n"; + print "
      • ".getMLText('version').": ".$latestContent->getVersion()."
      • \n"; + + if ($file_exists) + print "
      • ". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ".htmlspecialchars($latestContent->getMimeType())."
      • "; + else print "
      • ".getMLText("document_deleted")."
      • "; + + $updatingUser = $latestContent->getUser(); + print "
      • ".getMLText("uploaded_by")." getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."
      • "; + print "
      • ".getLongReadableDate($latestContent->getDate())."
      • "; + + print "
      • ".getMLText('status').": ".getOverallStatusText($status["status"]); + if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_IN_WORKFLOW || $status["status"]==S_EXPIRED ){ + print "
        getDocument()->hasExpired()?" class=\"warning\" ":"").">".(!$latestContent->getDocument()->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($latestContent->getDocument()->getExpires())).""; + } + print "
      • "; + print "
      \n"; + + $txt = $this->callHook('showVersionComment', $latestContent); + if($txt) { + echo $txt; + } else { + if($latestContent->getComment()) + print "

      ".htmlspecialchars($latestContent->getComment())."

      "; + } + print "
        \n"; + $this->printVersionAttributes($folder, $latestContent); + print "
      "; +// print "
      "; + + $this->columnEnd(); + $this->columnStart(4); + if ($file_exists){ + $items = array(); + $items[] = array('link'=>"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'download', 'label'=>'download'); + if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) + $items[] = array('link'=>"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion(), 'icon'=>'eye', 'label'=>'view_online', 'target'=>'_blank'); + if($newitems = $this->callHook('extraVersionViews', $latestContent)) + $items = array_merge($items, $newitems); + if($items) { + $this->showActions($items); + } + } + + $items = array(); + if ($file_exists){ + if($accessop->mayEditVersion()) { + $items[] = array('link'=>"../out/out.EditOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_version'); + } + } + /* Only admin has the right to remove version in any case or a regular + * user if enableVersionDeletion is on + */ + if($accessop->mayRemoveVersion()) { + $items[] = array('link'=>"../out/out.RemoveVersion.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'remove', 'label'=>'rm_version'); + } + if($accessop->mayOverwriteStatus()) { + $items[] = array('link'=>"../out/out.OverrideContentStatus.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'align-justify', 'label'=>'change_status'); + } + if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { + // Allow changing reviewers/approvals only if not reviewed + if($accessop->maySetReviewersApprovers()) { + $items[] = array('link'=>"../out/out.SetReviewersApprovers.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'change_assignments'); + } + } elseif($workflowmode == 'advanced') { + if($accessop->maySetWorkflow()) { + if(!$workflow) { + $items[] = array('link'=>"../out/out.SetWorkflow.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'random', 'label'=>'set_workflow'); + } + } + } + if($accessop->mayEditComment()) { + $items[] = array('link'=>"out.EditComment.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'comment', 'label'=>'edit_comment'); + } + if($accessop->mayEditAttributes()) { + $items[] = array('link'=>"out.EditAttributes.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_attributes'); + } + + if($newitems = $this->callHook('extraVersionActions', $latestContent)) + $items = array_merge($items, $newitems); + if($items) { + $this->showActions($items); + } + +// echo "
      \n"; + $this->columnEnd(); + $this->rowEnd(); + } /* }}} */ + function show() { /* {{{ */ parent::show(); @@ -559,7 +703,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $this->infoMsg(getMLText('needs_workflow_action')); } - $status = $latestContent->getStatus(); $reviewStatus = $latestContent->getReviewStatus(); $approvalStatus = $latestContent->getApprovalStatus(); @@ -631,125 +774,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { if(is_string($txt)) echo $txt; - // verify if file exists - $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); - $this->contentContainerStart(); - print ""; - print "\n\n"; - print "\n"; -// print "\n"; -// print "\n"; -// print "\n"; - print "\n"; - print "\n"; - print "\n"; - - print "\n"; - -// print ""; - print "\n
      ".htmlspecialchars($latestContent->getOriginalFileName())."".getMLText("file")."".getMLText("comment")."
      "; - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); - $previewer->setConverters($previewconverters); - $previewer->createPreview($latestContent); - if ($file_exists) { - if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) { - print "getDocument()->getId()."&version=". $latestContent->getVersion()."\">"; - } else { - print "getDocument()->getId()."&version=".$latestContent->getVersion()."\">"; - } - } - if($previewer->hasPreview($latestContent)) { - print("getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"); - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } - if ($file_exists) { - print ""; - } - print "
        \n"; - print "
      • ".getMLText('version').": ".$latestContent->getVersion()."
      • \n"; - - if ($file_exists) - print "
      • ". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ".htmlspecialchars($latestContent->getMimeType())."
      • "; - else print "
      • ".getMLText("document_deleted")."
      • "; - - $updatingUser = $latestContent->getUser(); - print "
      • ".getMLText("uploaded_by")." getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."
      • "; - print "
      • ".getLongReadableDate($latestContent->getDate())."
      • "; - - print "
      • ".getMLText('status').": ".getOverallStatusText($status["status"]); - if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_IN_WORKFLOW || $status["status"]==S_EXPIRED ){ - print "
        hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; - } - print "
      • "; - print "
      \n"; - - $txt = $this->callHook('showVersionComment', $latestContent); - if($txt) { - echo $txt; - } else { - if($latestContent->getComment()) - print "

      ".htmlspecialchars($latestContent->getComment())."

      "; - } - print "
        \n"; - $this->printVersionAttributes($folder, $latestContent); - print "
      "; -// print "
      "; - - if ($file_exists){ - $items = array(); - $items[] = array('link'=>"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'download', 'label'=>'download'); - if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) - $items[] = array('link'=>"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion(), 'icon'=>'eye', 'label'=>'view_online', 'target'=>'_blank'); - if($newitems = $this->callHook('extraVersionViews', $latestContent)) - $items = array_merge($items, $newitems); - if($items) { - $this->showActions($items); - } - } - - $items = array(); - if ($file_exists){ - if($accessop->mayEditVersion()) { - $items[] = array('link'=>"../out/out.EditOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_version'); - } - } - /* Only admin has the right to remove version in any case or a regular - * user if enableVersionDeletion is on - */ - if($accessop->mayRemoveVersion()) { - $items[] = array('link'=>"../out/out.RemoveVersion.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'remove', 'label'=>'rm_version'); - } - if($accessop->mayOverwriteStatus()) { - $items[] = array('link'=>"../out/out.OverrideContentStatus.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'align-justify', 'label'=>'change_status'); - } - if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { - // Allow changing reviewers/approvals only if not reviewed - if($accessop->maySetReviewersApprovers()) { - $items[] = array('link'=>"../out/out.SetReviewersApprovers.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'change_assignments'); - } - } elseif($workflowmode == 'advanced') { - if($accessop->maySetWorkflow()) { - if(!$workflow) { - $items[] = array('link'=>"../out/out.SetWorkflow.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'random', 'label'=>'set_workflow'); - } - } - } - if($accessop->mayEditComment()) { - $items[] = array('link'=>"out.EditComment.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'comment', 'label'=>'edit_comment'); - } - if($accessop->mayEditAttributes()) { - $items[] = array('link'=>"out.EditAttributes.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_attributes'); - } - - if($newitems = $this->callHook('extraVersionActions', $latestContent)) - $items = array_merge($items, $newitems); - if($items) { - $this->showActions($items); - } - - echo "
      \n"; + $this->showVersionDetails($latestContent); $this->contentContainerEnd(); if($user->isAdmin()) { From 8807257aa22d216bb3e9ae4867e5cd0fa3e3addf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 12:18:51 +0200 Subject: [PATCH 086/141] check if array element exists --- views/bootstrap/class.Bootstrap.php | 3 ++- views/bootstrap4/class.Bootstrap4.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 59f8eb91b..0612c31b6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1271,7 +1271,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $attrs[] = array('href', $config['remote']); $attrs[] = array('data-toggle', 'modal'); $attrs[] = array('role', 'button'); - $attrs[] = array('class', $config['class']); + if(isset($config['class'])) + $attrs[] = array('class', $config['class']); return $attrs; } /* }}} */ diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 00435adb7..4278c3fe0 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1273,7 +1273,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $attrs[] = array('href', $config['remote']); $attrs[] = array('data-toggle', 'modal'); $attrs[] = array('role', 'button'); - $attrs[] = array('class', $config['class']); + if(isset($config['class'])) + $attrs[] = array('class', $config['class']); return $attrs; } /* }}} */ From 0cbfba4d41f77e46e6e028868d0f4da741ac9ab0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 12:52:24 +0200 Subject: [PATCH 087/141] pass previewer to showVersionDetails() --- views/bootstrap/class.ViewDocument.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 0d9ef7d95..1f77cb57b 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -449,7 +449,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { if(is_string($item)) echo "
    • ".$item."
    • "; elseif(is_array($item)) { - echo "
    • "; } /* }}} */ - protected function showVersionDetails($latestContent) { /* {{{ */ + protected function showVersionDetails($latestContent, $previewer) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $folder = $this->params['folder']; @@ -485,12 +485,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $viewonlinefiletypes = $this->params['viewonlinefiletypes']; $enableownerrevapp = $this->params['enableownerrevapp']; $workflowmode = $this->params['workflowmode']; - $cachedir = $this->params['cachedir']; - $previewwidthlist = $this->params['previewWidthList']; - $previewwidthdetail = $this->params['previewWidthDetail']; - $previewconverters = $this->params['previewConverters']; - $timeout = $this->params['timeout']; - $xsendfile = $this->params['xsendfile']; // verify if file exists $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); @@ -506,9 +500,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $this->contentHeading(htmlspecialchars($latestContent->getOriginalFileName())); $this->rowStart(); $this->columnStart(4); - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); - $previewer->setConverters($previewconverters); - $previewer->createPreview($latestContent); if ($file_exists) { if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) { print "getDocument()->getId()."&version=". $latestContent->getVersion()."\">"; @@ -516,6 +507,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { print "getDocument()->getId()."&version=".$latestContent->getVersion()."\">"; } } + $previewer->createPreview($latestContent); if($previewer->hasPreview($latestContent)) { print("getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"); } else { @@ -775,7 +767,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { echo $txt; $this->contentContainerStart(); - $this->showVersionDetails($latestContent); + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); + $previewer->setConverters($previewconverters); + $this->showVersionDetails($latestContent, $previewer); $this->contentContainerEnd(); if($user->isAdmin()) { From 9be41bca0b6d743a09aee44a7d4e1a801bb65e85 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 12:53:05 +0200 Subject: [PATCH 088/141] set class of modal box link button --- views/bootstrap4/class.Bootstrap4.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 4278c3fe0..c15da71bf 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1498,6 +1498,7 @@ $(document).ready(function() { array( 'target' => 'docChooser'.$formid, 'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$this->params['dms']->getRootFolder()->getId(), + 'class' => 'btn btn-secondary', 'title' => getMLText('document').'…' )); $content .= "
    • \n"; From be7df6ffab2fe34ac6fede5395f552e9e856908b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 13:13:12 +0200 Subject: [PATCH 089/141] get previewwidthdetail from view in showVersionDetails() --- views/bootstrap/class.ViewDocument.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 1f77cb57b..7fc509db3 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -485,6 +485,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $viewonlinefiletypes = $this->params['viewonlinefiletypes']; $enableownerrevapp = $this->params['enableownerrevapp']; $workflowmode = $this->params['workflowmode']; + $previewwidthdetail = $this->params['previewWidthDetail']; // verify if file exists $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); From 75d033d73c12d00c14e635d5c1105f5e31330841 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 13:42:18 +0200 Subject: [PATCH 090/141] use showVersionDetails() for previous versions --- views/bootstrap/class.ViewDocument.php | 112 ++----------------------- 1 file changed, 9 insertions(+), 103 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 7fc509db3..99ffbcaab 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -477,7 +477,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { print "
    "; } /* }}} */ - protected function showVersionDetails($latestContent, $previewer) { /* {{{ */ + protected function showVersionDetails($latestContent, $previewer, $islatest=false) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $folder = $this->params['folder']; @@ -570,7 +570,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $items = array(); if ($file_exists){ - if($accessop->mayEditVersion()) { + if($islatest && $accessop->mayEditVersion()) { $items[] = array('link'=>"../out/out.EditOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_version'); } } @@ -580,7 +580,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { if($accessop->mayRemoveVersion()) { $items[] = array('link'=>"../out/out.RemoveVersion.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'remove', 'label'=>'rm_version'); } - if($accessop->mayOverwriteStatus()) { + if($islatest && $accessop->mayOverwriteStatus()) { $items[] = array('link'=>"../out/out.OverrideContentStatus.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'align-justify', 'label'=>'change_status'); } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { @@ -601,6 +601,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { if($accessop->mayEditAttributes()) { $items[] = array('link'=>"out.EditAttributes.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_attributes'); } + if(!$islatest) + $items[] = array('link'=>"out.DocumentVersionDetail.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'info', 'label'=>'details'); if($newitems = $this->callHook('extraVersionActions', $latestContent)) $items = array_merge($items, $newitems); @@ -770,7 +772,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { $this->contentContainerStart(); $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); $previewer->setConverters($previewconverters); - $this->showVersionDetails($latestContent, $previewer); + $this->showVersionDetails($latestContent, $previewer, true); $this->contentContainerEnd(); if($user->isAdmin()) { @@ -1275,108 +1277,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { if(is_string($txt)) echo $txt; - $this->contentContainerStart(); - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - for ($i = count($versions)-2; $i >= 0; $i--) { $version = $versions[$i]; - $vstat = $version->getStatus(); - $workflow = $version->getWorkflow(); - $workflowstate = $version->getWorkflowState(); - - // verify if file exists - $file_exists=file_exists($dms->contentDir . $version->getPath()); - - print "\n"; - print "\n"; - print "\n"; -// print ""; - print "\n\n"; + $this->contentContainerStart(); + $this->showVersionDetails($version, $previewer, false); + $this->contentContainerEnd(); } - print "\n
    "; - if($file_exists) { - if ($viewonlinefiletypes && (in_array(strtolower($version->getFileType()), $viewonlinefiletypes) || in_array(strtolower($version->getMimeType()), $viewonlinefiletypes))) { - print "getDocument()->getId()."&version=".$version->getVersion()."\">"; - } else { - print "getDocument()->getId()."&version=".$version->getVersion()."\">"; - } - } - $previewer->createPreview($version); - if($previewer->hasPreview($version)) { - print("getDocument()->getId()."&version=".$version->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($version->getMimeType())."\">"); - } else { - print "getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; - } - if($file_exists) { - print "\n"; - } - print "
      \n"; - print "
    • ".htmlspecialchars($version->getOriginalFileName())."
    • \n"; - print "
    • ".getMLText('version').": ".$version->getVersion()."
    • \n"; - if ($file_exists) print "
    • ". SeedDMS_Core_File::format_filesize($version->getFileSize()) .", ".htmlspecialchars($version->getMimeType())."
    • "; - else print "
    • ".getMLText("document_deleted")."
    • "; - $updatingUser = $version->getUser(); - print "
    • ".getMLText("uploaded_by")." getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; - print "
    • ".getLongReadableDate($version->getDate())."
    • "; - print "
    • ".getMLText('status').": ".getOverallStatusText($vstat["status"])."
    • "; - print "
    \n"; - $txt = $this->callHook('showVersionComment', $version); - if($txt) { - echo $txt; - } else { - if($version->getComment()) - print "

    ".htmlspecialchars($version->getComment())."

    "; - } - print "
      \n"; - $this->printVersionAttributes($folder, $version); - print "
    ".htmlspecialchars($version->getComment()).""; - if ($file_exists){ - print ""; - } - print ""; - print "
    \n"; - $this->contentContainerEnd(); ?> Date: Thu, 6 May 2021 14:22:37 +0200 Subject: [PATCH 091/141] make button primary --- views/bootstrap/class.SetRecipients.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.SetRecipients.php b/views/bootstrap/class.SetRecipients.php index cf6f9ba0d..f3083dab7 100644 --- a/views/bootstrap/class.SetRecipients.php +++ b/views/bootstrap/class.SetRecipients.php @@ -132,7 +132,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style {

    -"> +">

    Date: Thu, 6 May 2021 14:22:50 +0200 Subject: [PATCH 092/141] support custom date format, remove some html --- op/op.SetRevisors.php | 5 ++-- views/bootstrap/class.SetRevisors.php | 35 ++++++++++----------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/op/op.SetRevisors.php b/op/op.SetRevisors.php index 087b2eb27..4c6b9568b 100644 --- a/op/op.SetRevisors.php +++ b/op/op.SetRevisors.php @@ -56,10 +56,11 @@ if (!is_object($content)) { } if (isset($_POST["startdate"])) { - $startdate = $_POST["startdate"]; + $ts = makeTsFromDate($_POST["startdate"]); } else { - $startdate = date('Y-m-d'); + $ts = time(); } +$startdate = date('Y-m-d', $ts); if(!$content->setRevisionDate($startdate)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); diff --git a/views/bootstrap/class.SetRevisors.php b/views/bootstrap/class.SetRevisors.php index dd5c836f3..7d7ef29bc 100644 --- a/views/bootstrap/class.SetRevisors.php +++ b/views/bootstrap/class.SetRevisors.php @@ -47,7 +47,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style { $this->globalNavigation($folder); $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - $this->contentHeading(getMLText("change_assignments")); + $this->contentHeading(getMLText("update_revisors")); // Retrieve a list of all users and groups that have review / approve privileges. $docAccess = $document->getReadAccessList($enableadminrevapp, $enableownerrevapp); @@ -55,7 +55,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style { // Retrieve list of currently assigned revisors, along with // their latest status. $revisionStatus = $content->getRevisionStatus(); - $startdate = substr($content->getRevisionDate(), 0, 10); + $startdate = getReadableDate(makeTsFromDate($content->getRevisionDate())); // Index the revision results for easy cross-reference with the revisor list. $revisionIndex = array("i"=>array(), "g"=>array()); @@ -68,21 +68,15 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style { } ?> -contentContainerStart(); ?> -
    -contentSubHeading(getMLText("update_revisors"));?> - -
    - -
    - - - - -
    -
    +contentContainerStart(); + $this->formField( + getMLText("revision_date"), + $this->getDateChooser($startdate, "startdate", $this->params['session']->getLanguage()) + ); +?>
    @@ -160,15 +154,12 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style { -
    - -
    - "> -
    -
    - contentContainerEnd(); + $this->formSubmit(" ".getMLText('update')); +?> + +contentEnd(); $this->htmlEndPage(); } /* }}} */ From f48bdb1280379c32c9e156d260d1d3cba65bad85 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 14:33:24 +0200 Subject: [PATCH 093/141] set class of modal box link --- views/bootstrap4/class.Bootstrap4.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index c15da71bf..7f81d11a2 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1565,6 +1565,7 @@ function folderSelected(id, name) { array( 'target' => 'folderChooser'.$formid, 'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude, + 'class' => 'btn btn-secondary', 'title' => getMLText('folder').'…' )); } @@ -1639,6 +1640,7 @@ $(document).ready(function() { array( 'target' => 'keywordChooser', 'remote' => "../out/out.KeywordChooser.php?target=".$formName, + 'class' => 'btn btn-secondary', 'title' => getMLText('keywords').'…' )); $content .= ' @@ -1902,6 +1904,7 @@ $(document).ready(function() { array( 'target' => 'dropfolderChooser', 'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders, + 'class' => 'btn btn-secondary', 'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")).'…' )); $content .= "
    \n"; From 8a2aa4bdda4a06353c7ce6363f878b2d11a78366 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 14:49:10 +0200 Subject: [PATCH 094/141] better html layout --- views/bootstrap/class.DocumentNotify.php | 9 ++++----- views/bootstrap/class.FolderNotify.php | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php index 4633cc28b..a6463abcf 100644 --- a/views/bootstrap/class.DocumentNotify.php +++ b/views/bootstrap/class.DocumentNotify.php @@ -146,11 +146,10 @@ $(document).ready( function() { columnEnd(); $this->columnStart(6); - print "\n"; if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) { - print ""; - } - else { + $this->infoMsg(getMLText("empty_notify_list")); + } else { + print "
    ".getMLText("empty_notify_list")."
    \n"; foreach ($notifyList["users"] as $userNotify) { print ""; print ""; @@ -185,8 +184,8 @@ $(document).ready( function() { }else print ""; print ""; } + print "
    \n"; } - print "
    \n"; $this->columnEnd(); $this->rowEnd(); diff --git a/views/bootstrap/class.FolderNotify.php b/views/bootstrap/class.FolderNotify.php index 35c53e3d5..56a7a5961 100644 --- a/views/bootstrap/class.FolderNotify.php +++ b/views/bootstrap/class.FolderNotify.php @@ -146,11 +146,10 @@ $(document).ready(function() { columnEnd(); $this->columnStart(6); - print "\n"; if (empty($notifyList["users"]) && empty($notifyList["groups"])) { - print ""; - } - else { + $this->infoMsg(getMLText("empty_notify_list")); + } else { + print "
    ".getMLText("empty_notify_list")."
    \n"; foreach ($notifyList["users"] as $userNotify) { print ""; print ""; @@ -185,8 +184,8 @@ $(document).ready(function() { }else print ""; print ""; } + print "
    \n"; } - print "
    \n"; $this->columnEnd(); $this->rowEnd(); From 2001f4f0d356af920b1dcaa379ffb8328b0cb235 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 15:08:11 +0200 Subject: [PATCH 095/141] slightly improved layout --- views/bootstrap/class.DefaultKeywords.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.DefaultKeywords.php b/views/bootstrap/class.DefaultKeywords.php index 7ee55f052..79cbabcbd 100644 --- a/views/bootstrap/class.DefaultKeywords.php +++ b/views/bootstrap/class.DefaultKeywords.php @@ -190,7 +190,7 @@ $(document).ready( function() { contentHeading(getMLText("default_keywords")); - $this->contentContainerStart(); +// $this->contentContainerStart(); ?> getKeywordLists(); @@ -205,7 +205,7 @@ $(document).ready( function() { "> "> - +
    @@ -213,7 +213,7 @@ $(document).ready( function() { "> - +

    @@ -232,7 +232,7 @@ $(document).ready( function() { contentContainerEnd(); +// $this->contentContainerEnd(); } } /* }}} */ From cdd75239e3b0659f495c2e9f88e57704aeb82756 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 15:08:33 +0200 Subject: [PATCH 096/141] fix wrong call of parent method --- views/bootstrap/class.Settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index f6be1d89f..6b9534c0e 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -32,7 +32,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { protected function showStartPaneContent($name, $isactive) { /* {{{ */ - self::parent($name, $isactive); + parent::showStartPaneContent($name, $isactive); $this->contentContainerStart(); echo ''; echo ''; @@ -41,7 +41,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { protected function showEndPaneContent($name, $currentab) { /* {{{ */ echo '
    '; $this->contentContainerEnd(); - self::parent($name, $isactive); + parent::showEndPaneContent($name, $isactive); } /* }}} */ protected function getTextField($name, $value, $type='', $placeholder='') { /* {{{ */ @@ -421,7 +421,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) showConfigText('settings_smtpSendFrom', 'smtpSendFrom'); ?> showConfigText('settings_smtpUser', 'smtpUser'); ?> showConfigText('settings_smtpPassword', 'smtpPassword', 'password'); ?> -showConfigPlain(htmlspecialchars(getMLText('settings_smtpSendTestMail')), htmlspecialchars(getMLText('settings_smtpSendTestMail_desc')), ''.getMLText('send_test_mail').'
    You will see debug messages here
    '); ?> +showConfigPlain(htmlspecialchars(getMLText('settings_smtpSendTestMail')), htmlspecialchars(getMLText('settings_smtpSendTestMail_desc')), ''.getMLText('send_test_mail').'
    You will see debug messages here
    '); ?> showEndPaneContent('system', $currenttab); From 5d008374894b096a5c55564910ada595cdc0973d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 May 2021 15:12:11 +0200 Subject: [PATCH 097/141] use warningMsg() instead of plain html --- views/bootstrap/class.Settings.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 6b9534c0e..d03deeec8 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -254,11 +254,9 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { _configFilePath)) { - print "
    "; - echo "

    ".getMLText("settings_notwritable")."

    "; - print "
    "; -} + if(!is_writeable($settings->_configFilePath)) { + $this->warningMsg(getMLText("settings_notwritable")); + } ?>