From ac85cfe26da6249dcea065d934c4a455cceb0b3a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Apr 2021 10:31:37 +0200 Subject: [PATCH 01/14] fall back to bootstrap file, include theme style --- inc/inc.ClassUI.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index 9abad35cf..c80408aca 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -102,9 +102,14 @@ class UI extends UI_Default { } if(!$filename) $filename = $settings->_rootDir."views/".$theme."/class.".$class.".php"; + /* Fall back onto the view class in bootstrap theme */ + if(!file_exists($filename)) + $filename = $settings->_rootDir."views/bootstrap/class.".$class.".php"; if(!file_exists($filename)) $filename = ''; if($filename) { + /* Always include the base class which defines class SeedDMS_Theme_Style */ + require($settings->_rootDir."views/".$theme."/class.".ucfirst($theme).".php"); require($filename); $view = new $classname($params, $theme); /* Set some configuration parameters */ From 3e81ad7654da9fe838adbfb2a072e90ee05deec1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Apr 2021 10:32:42 +0200 Subject: [PATCH 02/14] rename SeedDMS_Bootstrap_Style to SeedDMS_Theme_Style --- views/bootstrap/class.Bootstrap.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 0e291157d..fcbc8a277 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -20,7 +20,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { +class SeedDMS_Theme_Style extends SeedDMS_View_Common { /** * @var string $extraheader extra html code inserted in the html header * of the page @@ -3297,3 +3297,5 @@ $("body").on("click", "span.openpopupbox", function(e) { Date: Thu, 15 Apr 2021 10:33:29 +0200 Subject: [PATCH 03/14] switch to new class name SeedDMS_Theme_Style --- views/bootstrap/class.ExtensionMgr.php | 4 ++-- views/bootstrap/class.ForcePasswordChange.php | 6 +++--- views/bootstrap/class.MyAccount.php | 4 ++-- views/bootstrap/class.ViewFolder.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php index 44850cb15..3dcd17aa0 100644 --- a/views/bootstrap/class.ExtensionMgr.php +++ b/views/bootstrap/class.ExtensionMgr.php @@ -14,7 +14,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Class which outputs the html page for ExtensionMgr view @@ -25,7 +25,7 @@ require_once("class.Bootstrap.php"); * @copyright Copyright (C) 2013 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); diff --git a/views/bootstrap/class.ForcePasswordChange.php b/views/bootstrap/class.ForcePasswordChange.php index 0038e466a..c1bf33a31 100644 --- a/views/bootstrap/class.ForcePasswordChange.php +++ b/views/bootstrap/class.ForcePasswordChange.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 ForcePasswordChange view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_ForcePasswordChange extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_ForcePasswordChange extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); @@ -74,7 +74,7 @@ $(document).ready( function() { $this->globalBanner(); $this->contentStart(); $this->contentHeading(getMLText('password_expiration')); - echo "
".getMLText('password_expiration_text')."
"; + $this->warningMsg(getMLText('password_expiration_text')); $this->contentContainerStart(); ?>
diff --git a/views/bootstrap/class.MyAccount.php b/views/bootstrap/class.MyAccount.php index c145e2e0a..bc8149d26 100644 --- a/views/bootstrap/class.MyAccount.php +++ b/views/bootstrap/class.MyAccount.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 MyAccount view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_MyAccount extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_MyAccount extends SeedDMS_Theme_Style { function show() { /* {{{ */ $dms = $this->params['dms']; diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 8f2fff505..334f97b97 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_ViewFolder extends SeedDMS_Theme_Style { function data() { /* {{{ */ $dms = $this->params['dms']; From 5a903365836ad1fa046c762cb1957bc95e775470 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Apr 2021 15:35:11 +0200 Subject: [PATCH 04/14] change bootstrapDir to bootstrap4 --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index e1015ea84..e542805a8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,7 @@ module.exports = function (grunt) { 'use strict'; - var bootstrapDir = 'views/bootstrap/vendors', + var bootstrapDir = 'views/bootstrap4/vendors', tdkDir = 'views/tdk/vendors', nodeDir = 'node_modules'; From 4a9d3666f1230c7b57bbef02f9358f12c6d1ba07 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Apr 2021 15:35:53 +0200 Subject: [PATCH 05/14] move css and js files into theme directory --- views/bootstrap/class.Bootstrap.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index fcbc8a277..36a879c23 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -103,8 +103,8 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { echo ''."\n"; echo ''."\n"; echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''."\n"; + echo ''."\n"; if($this->extraheader['css']) echo $this->extraheader['css']; if(method_exists($this, 'css')) @@ -118,8 +118,10 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { echo ''."\n"; echo ''."\n"; echo ''."\n"; - echo ''."\n"; -// echo ''."\n"; + echo ''."\n"; + echo ''."\n"; +// echo ''."\n"; +// echo ''."\n"; if(!empty($this->extraheader['favicon'])) echo $this->extraheader['favicon']; else { @@ -182,13 +184,13 @@ background-image: linear-gradient(to bottom, #882222, #111111);; foreach(array('de', 'es', 'ar', 'el', 'bg', 'ru', 'hr', 'hu', 'ko', 'pl', 'ro', 'sk', 'tr', 'uk', 'ca', 'nl', 'fi', 'cs', 'it', 'fr', 'sv', 'sl', 'pt-BR', 'zh-CN', 'zh-TW') as $lang) echo ''."\n"; echo ''."\n"; - echo ''."\n"; + echo ''."\n"; parse_str($_SERVER['QUERY_STRING'], $tmp); $tmp['action'] = 'webrootjs'; if(isset($tmp['formtoken'])) unset($tmp['formtoken']); echo ''."\n"; - echo ''."\n"; + echo ''."\n"; if($this->params['enablemenutasks'] && isset($this->params['user']) && $this->params['user']) { $this->addFooterJS('SeedDMSTask.run();'); } From 1b7a5c48ba0edf6b0c8dfac572f7b017d2389377 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Apr 2021 15:36:32 +0200 Subject: [PATCH 06/14] replace SeedDMS_Bootstrap_Style by SeedDMS_Theme_Style --- views/bootstrap/class.Clipboard.php | 4 ++-- views/bootstrap/class.DropFolderChooser.php | 4 ++-- views/bootstrap/class.Session.php | 4 ++-- views/bootstrap/class.Tasks.php | 4 ++-- views/bootstrap/class.ViewFolder.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php index ec711b891..928013494 100644 --- a/views/bootstrap/class.Clipboard.php +++ b/views/bootstrap/class.Clipboard.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_Clipboard extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style { /** * Returns the html needed for the clipboard list in the menu * diff --git a/views/bootstrap/class.DropFolderChooser.php b/views/bootstrap/class.DropFolderChooser.php index 477a48d25..20a140212 100644 --- a/views/bootstrap/class.DropFolderChooser.php +++ b/views/bootstrap/class.DropFolderChooser.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_DropFolderChooser extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_DropFolderChooser extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); diff --git a/views/bootstrap/class.Session.php b/views/bootstrap/class.Session.php index 7c29b5431..9d2355a9f 100644 --- a/views/bootstrap/class.Session.php +++ b/views/bootstrap/class.Session.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 clipboard view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_Session extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_Session extends SeedDMS_Theme_Style { /** * Returns the html needed for the clipboard list in the menu * diff --git a/views/bootstrap/class.Tasks.php b/views/bootstrap/class.Tasks.php index 58a402cd6..f1af0f875 100644 --- a/views/bootstrap/class.Tasks.php +++ b/views/bootstrap/class.Tasks.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_Tasks extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_Tasks extends SeedDMS_Theme_Style { private function __myTasks() { /* {{{ */ $dms = $this->params['dms']; diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 334f97b97..69581b930 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -563,7 +563,7 @@ $('body').on('click', '.order-btn', function(ev) { $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); $previewer->setConverters($previewconverters); - $this->htmlAddHeader(''."\n", 'js'); + //$this->htmlAddHeader(''."\n", 'js'); echo $this->callHook('startPage'); $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); From 91a98ac6c6747d0770a3ca36c6a6b7a338ff920d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Apr 2021 17:33:18 +0200 Subject: [PATCH 07/14] copy bootstrap --- Gruntfile.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index e542805a8..2a37b60a9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -152,6 +152,14 @@ module.exports = function (grunt) { ], dest: bootstrapDir + '/perfect-scrollbar', flatten: true + },{ + expand: true, + src: [ + nodeDir + '/bootstrap/dist/js/bootstrap.min.js', + nodeDir + '/bootstrap/dist/css/bootstrap.min.css' + ], + dest: bootstrapDir + '/bootstrap', + flatten: true },{ expand: true, src: [ From 888d75953ed242c8afd91d48a44ea68ea7aabb9d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:02:01 +0200 Subject: [PATCH 08/14] use require_once for style classes, set 'theme' in view --- inc/inc.ClassUI.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index c80408aca..d88cd2eff 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -95,6 +95,12 @@ class UI extends UI_Default { if(file_exists($filename)) { $httpbasedir = 'ext/'.$extname.'/'; break; + } else { + $filename = $settings->_rootDir.'ext/'.$extname.'/views/bootstrap/class.'.$class.".php"; + if(file_exists($filename)) { + $httpbasedir = 'ext/'.$extname.'/'; + break; + } } $filename = ''; } @@ -109,12 +115,13 @@ class UI extends UI_Default { $filename = ''; if($filename) { /* Always include the base class which defines class SeedDMS_Theme_Style */ - require($settings->_rootDir."views/".$theme."/class.".ucfirst($theme).".php"); - require($filename); + require_once($settings->_rootDir."views/".$theme."/class.".ucfirst($theme).".php"); + require_once($filename); $view = new $classname($params, $theme); /* Set some configuration parameters */ $view->setParam('refferer', $_SERVER['REQUEST_URI']); $view->setParam('absbaseprefix', $settings->_httpRoot.$httpbasedir); + $view->setParam('theme', $theme); $view->setParam('class', $class); $view->setParam('session', $session); $view->setParam('settings', $settings); From 6c0b544446bec1c9238758be24227d0c8aafb924 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:02:53 +0200 Subject: [PATCH 09/14] do not use session id in form key if not logged in --- inc/inc.Utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 92969360c..82bee8308 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -473,10 +473,10 @@ function showtree() { /* {{{ */ function createFormKey($formid='') { /* {{{ */ global $settings, $session; - if($id = $session->getId()) { + if($session && $id = $session->getId()) { return md5($id.$settings->_encryptionKey.$formid); } else { - return false; + return md5($settings->_encryptionKey.$formid); } } /* }}} */ From 2458655961d0729cf9a1e62034983e14520024e8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:03:31 +0200 Subject: [PATCH 10/14] add more packages for new bootstrap4 theme --- Gruntfile.js | 21 +++++++++++++++++++++ package.json | 6 ++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2a37b60a9..1ad6013f0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -78,6 +78,20 @@ module.exports = function (grunt) { ], dest: bootstrapDir + '/select2/css', flatten: true + },{ + expand: true, + src: [ + nodeDir + '/@ttskch/select2-bootstrap4-theme/dist/*' + ], + dest: bootstrapDir + '/select2-bootstrap4-theme', + flatten: true + },{ + expand: true, + src: [ + nodeDir + '/vis-timeline/dist/*' + ], + dest: bootstrapDir + '/vis-timeline', + flatten: true },{ expand: true, src: [ @@ -145,6 +159,13 @@ module.exports = function (grunt) { ], dest: bootstrapDir + '/moment/locale', flatten: true + },{ + expand: true, + src: [ + nodeDir + '/popper.js/dist/umd/*' + ], + dest: bootstrapDir + '/popper', + flatten: true },{ expand: true, src: [ diff --git a/package.json b/package.json index 4084e288c..8ea4d5328 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@coreui/coreui": "^3.3.0", - "@popperjs/core": "^2.5.3", + "@ttskch/select2-bootstrap4-theme": "^1.5.2", "bootstrap": "^4.5.2", "bootstrap-datepicker": "^1.9.0", "chartjs": "^0.3.24", @@ -29,6 +29,8 @@ "moment": "^2.29.1", "noty": "^2.4.1", "perfect-scrollbar": "^1.5.0", - "select2": "^4.0.13" + "popper.js": "^1.16.1", + "select2": "^4.0.13", + "vis-timeline": "^7.4.7" } } From 43567ac1d7acaacfe2ac8e477d04d0958ef6a113 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:04:15 +0200 Subject: [PATCH 11/14] include missing inc.Utils.php --- out/out.ChangePassword.php | 1 + 1 file changed, 1 insertion(+) diff --git a/out/out.ChangePassword.php b/out/out.ChangePassword.php index 5e3365307..7121b40da 100644 --- a/out/out.ChangePassword.php +++ b/out/out.ChangePassword.php @@ -21,6 +21,7 @@ if(!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.LogInit.php"); +require_once("inc/inc.Utils.php"); require_once("inc/inc.Language.php"); require_once("inc/inc.Init.php"); require_once("inc/inc.Extension.php"); From a6ac5d546a1069da3c6399812dda5303433a63aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:05:10 +0200 Subject: [PATCH 12/14] include inc.DBInit.php --- out/out.Login.php | 1 + 1 file changed, 1 insertion(+) diff --git a/out/out.Login.php b/out/out.Login.php index 079c74c3d..77f4318ee 100644 --- a/out/out.Login.php +++ b/out/out.Login.php @@ -26,6 +26,7 @@ require_once("inc/inc.Utils.php"); require_once("inc/inc.Language.php"); require_once("inc/inc.Init.php"); require_once("inc/inc.Extension.php"); +require_once("inc/inc.DBInit.php"); require_once("inc/inc.ClassUI.php"); include $settings->_rootDir . "languages/" . $settings->_language . "/lang.inc"; From 28480a87335e109bbe86fdab6cba411e091a055c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:05:57 +0200 Subject: [PATCH 13/14] move 'new SeedDMS_AccessOperation' after document is known --- out/out.RunSubWorkflow.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/out/out.RunSubWorkflow.php b/out/out.RunSubWorkflow.php index 3980b2e0f..b54bcef87 100644 --- a/out/out.RunSubWorkflow.php +++ b/out/out.RunSubWorkflow.php @@ -33,7 +33,6 @@ require_once("inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); -$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings); if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); @@ -44,6 +43,8 @@ if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } +$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings); + if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"])<1) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); } From 871460899cb3e359da2ec91d104074af558dfbef Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:08:00 +0200 Subject: [PATCH 14/14] use new SeedDMS_Theme_Style, replace plain html by methods in theme style --- views/bootstrap/class.AddDocument.php | 4 +- views/bootstrap/class.AddEvent.php | 4 +- views/bootstrap/class.AddFile.php | 4 +- views/bootstrap/class.AddSubFolder.php | 4 +- views/bootstrap/class.AdminTools.php | 4 +- views/bootstrap/class.ApprovalSummary.php | 4 +- views/bootstrap/class.ApproveDocument.php | 10 +- views/bootstrap/class.AttributeMgr.php | 6 +- views/bootstrap/class.BackupTools.php | 10 +- views/bootstrap/class.Bootstrap.php | 243 ++++++++++++------ views/bootstrap/class.Calendar.php | 4 +- views/bootstrap/class.Categories.php | 4 +- views/bootstrap/class.CategoryChooser.php | 4 +- views/bootstrap/class.ChangePassword.php | 9 +- views/bootstrap/class.Charts.php | 4 +- views/bootstrap/class.ClearCache.php | 4 +- views/bootstrap/class.Clipboard.php | 22 +- views/bootstrap/class.CreateIndex.php | 10 +- views/bootstrap/class.DefaultKeywords.php | 4 +- views/bootstrap/class.DocumentAccess.php | 8 +- views/bootstrap/class.DocumentChooser.php | 4 +- views/bootstrap/class.DocumentNotify.php | 4 +- .../bootstrap/class.DocumentVersionDetail.php | 22 +- views/bootstrap/class.DropFolderChooser.php | 26 +- views/bootstrap/class.EditAttributes.php | 4 +- views/bootstrap/class.EditComment.php | 4 +- views/bootstrap/class.EditDocument.php | 4 +- views/bootstrap/class.EditDocumentFile.php | 10 +- views/bootstrap/class.EditFolder.php | 4 +- views/bootstrap/class.EditOnline.php | 14 +- views/bootstrap/class.EditUserData.php | 4 +- views/bootstrap/class.ErrorDlg.php | 10 +- views/bootstrap/class.ExpiredDocuments.php | 4 +- views/bootstrap/class.ExtensionMgr.php | 4 +- views/bootstrap/class.FolderAccess.php | 11 +- views/bootstrap/class.FolderChooser.php | 4 +- views/bootstrap/class.FolderNotify.php | 4 +- views/bootstrap/class.GroupMgr.php | 26 +- views/bootstrap/class.GroupView.php | 4 +- views/bootstrap/class.Help.php | 4 +- views/bootstrap/class.Hooks.php | 6 +- views/bootstrap/class.ImportFS.php | 4 +- views/bootstrap/class.ImportUsers.php | 4 +- views/bootstrap/class.IndexInfo.php | 4 +- views/bootstrap/class.Indexer.php | 12 +- views/bootstrap/class.Info.php | 4 +- views/bootstrap/class.KeywordChooser.php | 4 +- views/bootstrap/class.LogManagement.php | 4 +- views/bootstrap/class.Login.php | 8 +- views/bootstrap/class.ManageNotify.php | 20 +- views/bootstrap/class.MoveDocument.php | 4 +- views/bootstrap/class.MoveFolder.php | 4 +- views/bootstrap/class.MyDocuments.php | 4 +- views/bootstrap/class.ObjectCheck.php | 4 +- views/bootstrap/class.OpensearchDesc.php | 4 +- .../bootstrap/class.OverrideContentStatus.php | 4 +- views/bootstrap/class.PasswordForgotten.php | 12 +- views/bootstrap/class.PasswordSend.php | 12 +- views/bootstrap/class.RemoveArchive.php | 10 +- views/bootstrap/class.RemoveDocument.php | 4 +- views/bootstrap/class.RemoveDocumentFile.php | 11 +- views/bootstrap/class.RemoveDump.php | 14 +- views/bootstrap/class.RemoveFolder.php | 4 +- views/bootstrap/class.RemoveGroup.php | 15 +- views/bootstrap/class.RemoveLog.php | 8 +- views/bootstrap/class.RemoveUser.php | 17 +- .../class.RemoveUserFromProcesses.php | 14 +- views/bootstrap/class.RemoveVersion.php | 6 +- views/bootstrap/class.RemoveWorkflow.php | 6 +- .../class.RemoveWorkflowFromDocument.php | 6 +- .../bootstrap/class.ReturnFromSubWorkflow.php | 12 +- views/bootstrap/class.ReviewDocument.php | 10 +- views/bootstrap/class.ReviewSummary.php | 4 +- views/bootstrap/class.RewindWorkflow.php | 10 +- views/bootstrap/class.RunSubWorkflow.php | 10 +- views/bootstrap/class.Search.php | 12 +- views/bootstrap/class.SendLoginData.php | 4 +- views/bootstrap/class.Session.php | 26 +- views/bootstrap/class.SetExpires.php | 4 +- .../bootstrap/class.SetReviewersApprovers.php | 12 +- views/bootstrap/class.SetWorkflow.php | 4 +- views/bootstrap/class.Settings.php | 4 +- views/bootstrap/class.Setup2Factor.php | 4 +- views/bootstrap/class.Statistic.php | 4 +- views/bootstrap/class.SubstituteUser.php | 6 +- views/bootstrap/class.Tasks.php | 24 +- views/bootstrap/class.Timeline.php | 10 +- views/bootstrap/class.TransferDocument.php | 8 +- views/bootstrap/class.TransferObjects.php | 4 +- views/bootstrap/class.TriggerWorkflow.php | 4 +- views/bootstrap/class.UpdateDocument.php | 4 +- views/bootstrap/class.UserDefaultKeywords.php | 4 +- views/bootstrap/class.UserList.php | 4 +- views/bootstrap/class.UsrMgr.php | 34 +-- views/bootstrap/class.UsrView.php | 6 +- views/bootstrap/class.ViewDocument.php | 62 ++--- views/bootstrap/class.ViewFolder.php | 10 +- views/bootstrap/class.WorkflowActionsMgr.php | 10 +- views/bootstrap/class.WorkflowGraph.php | 16 +- views/bootstrap/class.WorkflowMgr.php | 34 +-- views/bootstrap/class.WorkflowStatesMgr.php | 10 +- views/bootstrap/class.WorkflowSummary.php | 8 +- 102 files changed, 597 insertions(+), 551 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index a4d5ca1ac..66b0296fa 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.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 AddDocument view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_AddDocument extends SeedDMS_Theme_Style { function js() { /* {{{ */ $dropfolderdir = $this->params['dropfolderdir']; diff --git a/views/bootstrap/class.AddEvent.php b/views/bootstrap/class.AddEvent.php index 65d32b90e..eb7cdebab 100644 --- a/views/bootstrap/class.AddEvent.php +++ b/views/bootstrap/class.AddEvent.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 AddEvent view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_AddEvent extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_AddEvent extends SeedDMS_Theme_Style { function js() { /* {{{ */ $strictformcheck = $this->params['strictformcheck']; diff --git a/views/bootstrap/class.AddFile.php b/views/bootstrap/class.AddFile.php index 7e7acb6b2..7e7f51e2d 100644 --- a/views/bootstrap/class.AddFile.php +++ b/views/bootstrap/class.AddFile.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 AddFile view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_AddFile extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_AddFile extends SeedDMS_Theme_Style { function js() { /* {{{ */ $enablelargefileupload = $this->params['enablelargefileupload']; diff --git a/views/bootstrap/class.AddSubFolder.php b/views/bootstrap/class.AddSubFolder.php index f0b573c62..0282c54fb 100644 --- a/views/bootstrap/class.AddSubFolder.php +++ b/views/bootstrap/class.AddSubFolder.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 AddSubFolder view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_AddSubFolder extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_AddSubFolder extends SeedDMS_Theme_Style { function js() { /* {{{ */ $strictformcheck = $this->params['strictformcheck']; diff --git a/views/bootstrap/class.AdminTools.php b/views/bootstrap/class.AdminTools.php index 9d03fda18..ee856936f 100644 --- a/views/bootstrap/class.AdminTools.php +++ b/views/bootstrap/class.AdminTools.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 AdminTools view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_AdminTools extends SeedDMS_Theme_Style { static function wrapRow($content) { /* {{{ */ return self::startRow().$content.self::endRow(); diff --git a/views/bootstrap/class.ApprovalSummary.php b/views/bootstrap/class.ApprovalSummary.php index ea2c46e3c..5dba410e8 100644 --- a/views/bootstrap/class.ApprovalSummary.php +++ b/views/bootstrap/class.ApprovalSummary.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_ApprovalSummary extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); diff --git a/views/bootstrap/class.ApproveDocument.php b/views/bootstrap/class.ApproveDocument.php index 48528649d..fa3a31af5 100644 --- a/views/bootstrap/class.ApproveDocument.php +++ b/views/bootstrap/class.ApproveDocument.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 ApproveDocument view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_ApproveDocument extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_ApproveDocument extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); @@ -111,8 +111,6 @@ $(document).ready(function() { $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("add_approval")); - $this->contentContainerStart(); - // Display the Approval form. $approvaltype = ($approvalStatus['type'] == 0) ? 'ind' : 'grp'; if($approvalStatus["status"]!=0) { @@ -134,6 +132,8 @@ $(document).ready(function() { contentContainerStart(); + $this->formField( getMLText("comment"), array( @@ -160,6 +160,7 @@ $(document).ready(function() { 'options'=>$options, ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('submit_approval'), $approvaltype.'Approval'); ?> @@ -170,7 +171,6 @@ $(document).ready(function() { contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index 28857d099..45a4a8dc4 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_AttributeMgr extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_AttributeMgr extends SeedDMS_Theme_Style { function js() { /* {{{ */ $selattrdef = $this->params['selattrdef']; @@ -172,7 +172,7 @@ $(document).ready( function() { - + contentContainerStart(); print "
"; $this->printFolderChooserHtml("form1",M_READWRITE); - print ""; + print ""; print "
\n"; $this->contentContainerEnd(); @@ -81,7 +81,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { print "
"; $this->printFolderChooserHtml("form2",M_READWRITE); print ""; - print ""; + print ""; print "
\n"; // list backup files @@ -137,7 +137,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { $this->contentContainerStart(); print "
"; - print ""; + print ""; print "
\n"; // list backup files diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 36a879c23..3a524e7a0 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -520,59 +520,145 @@ background-image: linear-gradient(to bottom, #882222, #111111);; return; } /* }}} */ - protected function showNavigationBar($menuitems) { /* {{{ */ + protected function showNavigationBar($menuitems, $options = array()) { /* {{{ */ + $content = ''; + $content .= "\n"; foreach($menuitems as $menuitem) { if(!empty($menuitem['children'])) { - echo "
  • \n"; - echo " ".getMLText($menuitem['label'])." \n"; - echo " \n"; } else { - echo "
  • ".getMLText($menuitem['label'])."
  • "; + if(!empty($submenuitem['divider'])) { + $content .= "
  • \n"; + } else { + $content .= "
  • "; + if(!empty($menuitem['attributes'])) + foreach($menuitem['attributes'] as $attr) + $content .= ' '.$attr[0].'="'.$attr[1].'"'; + $content .= $menuitem['label']."
  • "; + } } } + $content .= "\n"; + echo $content; + } /* }}} */ + + protected function showNavigationListWithBadges($menuitems, $options=array()) { /* {{{ */ + $content = ''; + $content .= "\n"; + foreach($menuitems as $menuitem) { + $content .= "
  • \n"; + $content .= ' "; + $content .= ' '."\n"; + $content .= "
  • \n"; + } + + $content .= "\n"; + echo $content; + } /* }}} */ + + protected function showButtonwithMenu($button, $options=array()) { /* {{{ */ + $content = ''; + $content .= ' +
    + + '.$button['label'].' + + +'; + if($button['menuitems']) { + $content .= ' + +'; + } + $content .= ' +
    +'; + echo $content; } /* }}} */ private function folderNavigationBar($folder) { /* {{{ */ $dms = $this->params['dms']; if (!is_object($folder) || !$folder->isType('folder')) { - echo "
      \n"; - echo "
    \n"; + self::showNavigationBar(array()); return; } $accessMode = $folder->getAccessMode($this->params['user']); $folderID = $folder->getID(); echo "".getMLText("folder")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); if ($accessMode == M_READ && !$this->params['user']->isGuest()) { - $menuitems['edit_folder_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>'edit_folder_notify'); + $menuitems['edit_folder_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_notify')); } else if ($accessMode >= M_READWRITE) { - $menuitems['add_subfolder'] = array('link'=>"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_subfolder'); - $menuitems['add_document'] = array('link'=>"../out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_document'); + $menuitems['add_subfolder'] = array('link'=>"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_subfolder')); + $menuitems['add_document'] = array('link'=>"../out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_document')); if(0 && $this->params['enablelargefileupload']) - $menuitems['add_multiple_documents'] = array('link'=>"../out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_multiple_documents'); - $menuitems['edit_folder_props'] = array('link'=>"../out/out.EditFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'edit_folder_props'); + $menuitems['add_multiple_documents'] = array('link'=>"../out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_multiple_documents')); + $menuitems['edit_folder_props'] = array('link'=>"../out/out.EditFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('edit_folder_props')); if ($folderID != $this->params['rootfolderid'] && $folder->getParent()) - $menuitems['move_folder'] = array('link'=>"../out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'move_folder'); + $menuitems['move_folder'] = array('link'=>"../out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('move_folder')); if ($accessMode == M_ALL) { if ($folderID != $this->params['rootfolderid'] && $folder->getParent()) - $menuitems['rm_folder'] = array('link'=>"../out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'rm_folder'); + $menuitems['rm_folder'] = array('link'=>"../out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('rm_folder')); } if ($accessMode == M_ALL) { - $menuitems['edit_folder_access'] = array('link'=>"../out/out.FolderAccess.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>'edit_folder_access'); + $menuitems['edit_folder_access'] = array('link'=>"../out/out.FolderAccess.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_access')); } - $menuitems['edit_existing_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>'edit_existing_notify'); + $menuitems['edit_existing_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify')); } if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) { - $menuitems['index_folder'] = array('link'=>"../out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>'index_folder'); + $menuitems['index_folder'] = array('link'=>"../out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder')); } /* Check if hook exists because otherwise callHook() will override $menuitems */ @@ -581,7 +667,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -592,38 +677,37 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $docid=".php?documentid=" . $document->getID(); echo "".getMLText("document")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); if ($accessMode >= M_READWRITE) { if (!$document->isLocked()) { - $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>'update_document'); - $menuitems['lock_document'] = array('link'=>"../op/op.LockDocument".$docid, 'label'=>'lock_document'); - $menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid , 'label'=>'edit_document_props'); - $menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>'move_document'); + $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document')); + $menuitems['lock_document'] = array('link'=>"../op/op.LockDocument".$docid, 'label'=>getMLText('lock_document')); + $menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid , 'label'=>getMLText('edit_document_props')); + $menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>getMLText('move_document')); } else { $lockingUser = $document->getLockingUser(); if (($lockingUser->getID() == $this->params['user']->getID()) || ($document->getAccessMode($this->params['user']) == M_ALL)) { - $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>'update_document'); - $menuitems['unlock_document'] = array('link'=>"../op/op.UnlockDocument".$docid, 'label'=>'unlock_document'); - $menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid, 'label'=>'edit_document_props'); - $menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>'move_document'); + $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document')); + $menuitems['unlock_document'] = array('link'=>"../op/op.UnlockDocument".$docid, 'label'=>getMLText('unlock_document')); + $menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid, 'label'=>getMLText('edit_document_props')); + $menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>getMLText('move_document')); } } if($accessobject->maySetExpires()) { - $menuitems['expires'] = array('link'=>"../out/out.SetExpires".$docid, 'label'=>'expires'); + $menuitems['expires'] = array('link'=>"../out/out.SetExpires".$docid, 'label'=>getMLText('expires')); } } if ($accessMode == M_ALL) { - $menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>'rm_document'); - $menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>'edit_document_access'); + $menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document')); + $menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access')); } if ($accessMode >= M_READ && !$this->params['user']->isGuest()) { - $menuitems['edit_existing_notify'] = array('link'=>"../out/out.DocumentNotify". $docid, 'label'=>'edit_existing_notify'); + $menuitems['edit_existing_notify'] = array('link'=>"../out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify')); } if ($this->params['user']->isAdmin()) { - $menuitems['transfer_document'] = array('link'=>"../out/out.TransferDocument". $docid, 'label'=>'transfer_document'); + $menuitems['transfer_document'] = array('link'=>"../out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document')); } /* Check if hook exists because otherwise callHook() will override $menuitems */ @@ -644,7 +728,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -652,20 +735,19 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function accountNavigationBar() { /* {{{ */ echo "".getMLText("my_account")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); if ($this->params['user']->isAdmin() || !$this->params['disableselfedit']) - $menuitems['edit_user_details'] = array('link'=>"../out/out.EditUserData.php", 'label'=>'edit_user_details'); + $menuitems['edit_user_details'] = array('link'=>"../out/out.EditUserData.php", 'label'=>getMLText('edit_user_details')); if (!$this->params['user']->isAdmin()) - $menuitems['edit_default_keywords'] = array('link'=>"../out/out.UserDefaultKeywords.php", 'label'=>'edit_default_keywords'); + $menuitems['edit_default_keywords'] = array('link'=>"../out/out.UserDefaultKeywords.php", 'label'=>getMLText('edit_default_keywords')); - $menuitems['edit_notify'] = array('link'=>"../out/out.ManageNotify.php", 'label'=>'edit_existing_notify'); + $menuitems['edit_notify'] = array('link'=>"../out/out.ManageNotify.php", 'label'=>getMLText('edit_existing_notify')); if ($this->params['enableusersview']){ - $menuitems['users'] = array('link'=>"../out/out.UsrView.php", 'label'=>'users'); - $menuitems['groups'] = array('link'=>"../out/out.GroupView.php", 'label'=>'groups'); + $menuitems['users'] = array('link'=>"../out/out.UsrView.php", 'label'=>getMLText('users')); + $menuitems['groups'] = array('link'=>"../out/out.GroupView.php", 'label'=>getMLText('groups')); } /* Check if hook exists because otherwise callHook() will override $menuitems */ @@ -674,7 +756,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -683,16 +764,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "".getMLText("my_documents")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); - $menuitems['inprocess'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>'documents_in_process'); - $menuitems['all_documents'] = array('link'=>"../out/out.MyDocuments.php", 'label'=>'all_documents'); + $menuitems['inprocess'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>getMLText('documents_in_process')); + $menuitems['all_documents'] = array('link'=>"../out/out.MyDocuments.php", 'label'=>getMLText('all_documents')); if($this->params['workflowmode'] == 'traditional' || $this->params['workflowmode'] == 'traditional_only_approval') { - $menuitems['review_summary'] = array('link'=>"../out/out.ReviewSummary.php", 'label'=>'review_summary'); - $menuitems['approval_summary'] = array('link'=>"../out/out.ApprovalSummary.php", 'label'=>'approval_summary'); + $menuitems['review_summary'] = array('link'=>"../out/out.ReviewSummary.php", 'label'=>getMLText('review_summary')); + $menuitems['approval_summary'] = array('link'=>"../out/out.ApprovalSummary.php", 'label'=>getMLText('approval_summary')); } else { - $menuitems['workflow_summary'] = array('link'=>"../out/out.WorkflowSummary.php", 'label'=>'workflow_summary'); + $menuitems['workflow_summary'] = array('link'=>"../out/out.WorkflowSummary.php", 'label'=>getMLText('workflow_summary')); } /* Check if hook exists because otherwise callHook() will override $menuitems */ @@ -701,7 +781,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -709,47 +788,46 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function adminToolsNavigationBar() { /* {{{ */ echo " ".getMLText("admin_tools")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); - $menuitems['user_group_management'] = array('link'=>"#", 'label'=>'user_group_management'); - $menuitems['user_group_management']['children']['user_management'] = array('link'=>"../out/out.UsrMgr.php", 'label'=>'user_management'); - $menuitems['user_group_management']['children']['group_management'] = array('link'=>"../out/out.GroupMgr.php", 'label'=>'group_management'); - $menuitems['user_group_management']['children']['user_list'] = array('link'=>"../out/out.UserList.php", 'label'=>'user_list'); + $menuitems['user_group_management'] = array('link'=>"#", 'label'=>getMLText('user_group_management')); + $menuitems['user_group_management']['children']['user_management'] = array('link'=>"../out/out.UsrMgr.php", 'label'=>getMLText('user_management')); + $menuitems['user_group_management']['children']['group_management'] = array('link'=>"../out/out.GroupMgr.php", 'label'=>getMLText('group_management')); + $menuitems['user_group_management']['children']['user_list'] = array('link'=>"../out/out.UserList.php", 'label'=>getMLText('user_list')); - $menuitems['definitions'] = array('link'=>"#", 'label'=>'definitions'); - $menuitems['definitions']['children']['default_keywords'] = array('link'=>"../out/out.DefaultKeywords.php", 'label'=>'global_default_keywords'); - $menuitems['definitions']['children']['document_categories'] = array('link'=>"../out/out.Categories.php", 'label'=>'global_document_categories'); - $menuitems['definitions']['children']['attribute_definitions'] = array('link'=>"../out/out.AttributeMgr.php", 'label'=>'global_attributedefinitions'); + $menuitems['definitions'] = array('link'=>"#", 'label'=>getMLText('definitions')); + $menuitems['definitions']['children']['default_keywords'] = array('link'=>"../out/out.DefaultKeywords.php", 'label'=>getMLText('global_default_keywords')); + $menuitems['definitions']['children']['document_categories'] = array('link'=>"../out/out.Categories.php", 'label'=>getMLText('global_document_categories')); + $menuitems['definitions']['children']['attribute_definitions'] = array('link'=>"../out/out.AttributeMgr.php", 'label'=>getMLText('global_attributedefinitions')); if($this->params['workflowmode'] == 'advanced') { - $menuitems['definitions']['children']['workflows'] = array('link'=>"../out/out.WorkflowMgr.php", 'label'=>'global_workflows'); - $menuitems['definitions']['children']['workflow_states'] = array('link'=>"../out/out.WorkflowStatesMgr.php", 'label'=>'global_workflow_states'); - $menuitems['definitions']['children']['workflow_actions'] = array('link'=>"../out/out.WorkflowActionsMgr.php", 'label'=>'global_workflow_actions'); + $menuitems['definitions']['children']['workflows'] = array('link'=>"../out/out.WorkflowMgr.php", 'label'=>getMLText('global_workflows')); + $menuitems['definitions']['children']['workflow_states'] = array('link'=>"../out/out.WorkflowStatesMgr.php", 'label'=>getMLText('global_workflow_states')); + $menuitems['definitions']['children']['workflow_actions'] = array('link'=>"../out/out.WorkflowActionsMgr.php", 'label'=>getMLText('global_workflow_actions')); } if($this->params['enablefullsearch']) { - $menuitems['fulltext'] = array('link'=>"#", 'label'=>'fullsearch'); - $menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>"../out/out.Indexer.php", 'label'=>'update_fulltext_index'); - $menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>"../out/out.CreateIndex.php", 'label'=>'create_fulltext_index'); - $menuitems['fulltext']['children']['fulltext_info'] = array('link'=>"../out/out.IndexInfo.php", 'label'=>'fulltext_info'); + $menuitems['fulltext'] = array('link'=>"#", 'label'=>getMLText('fullsearch')); + $menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>"../out/out.Indexer.php", 'label'=>getMLText('update_fulltext_index')); + $menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>"../out/out.CreateIndex.php", 'label'=>getMLText('create_fulltext_index')); + $menuitems['fulltext']['children']['fulltext_info'] = array('link'=>"../out/out.IndexInfo.php", 'label'=>getMLText('fulltext_info')); } - $menuitems['backup_log_management'] = array('link'=>"#", 'label'=>'backup_log_management'); - $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.BackupTools.php", 'label'=>'backup_tools'); + $menuitems['backup_log_management'] = array('link'=>"#", 'label'=>getMLText('backup_log_management')); + $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.BackupTools.php", 'label'=>getMLText('backup_tools')); if ($this->params['logfileenable']) - $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.LogManagement.php", 'label'=>'log_management'); + $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.LogManagement.php", 'label'=>getMLText('log_management')); - $menuitems['misc'] = array('link'=>"#", 'label'=>'misc'); - $menuitems['misc']['children']['import_fs'] = array('link'=>"../out/out.ImportFS.php", 'label'=>'import_fs'); - $menuitems['misc']['children']['import_users'] = array('link'=>"../out/out.ImportUsers.php", 'label'=>'import_users'); - $menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>"../out/out.Statistic.php", 'label'=>'folders_and_documents_statistic'); - $menuitems['misc']['children']['charts'] = array('link'=>"../out/out.Charts.php", 'label'=>'charts'); - $menuitems['misc']['children']['timeline'] = array('link'=>"../out/out.Timeline.php", 'label'=>'timeline'); - $menuitems['misc']['children']['objectcheck'] = array('link'=>"../out/out.ObjectCheck.php", 'label'=>'objectcheck'); - $menuitems['misc']['children']['documents_expired'] = array('link'=>"../out/out.ExpiredDocuments.php", 'label'=>'documents_expired'); - $menuitems['misc']['children']['extension_manager'] = array('link'=>"../out/out.ExtensionMgr.php", 'label'=>'extension_manager'); - $menuitems['misc']['children']['clear_cache'] = array('link'=>"../out/out.ClearCache.php", 'label'=>'clear_cache'); - $menuitems['misc']['children']['version_info'] = array('link'=>"../out/out.Info.php", 'label'=>'version_info'); + $menuitems['misc'] = array('link'=>"#", 'label'=>getMLText('misc')); + $menuitems['misc']['children']['import_fs'] = array('link'=>"../out/out.ImportFS.php", 'label'=>getMLText('import_fs')); + $menuitems['misc']['children']['import_users'] = array('link'=>"../out/out.ImportUsers.php", 'label'=>getMLText('import_users')); + $menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>"../out/out.Statistic.php", 'label'=>getMLText('folders_and_documents_statistic')); + $menuitems['misc']['children']['charts'] = array('link'=>"../out/out.Charts.php", 'label'=>getMLText('charts')); + $menuitems['misc']['children']['timeline'] = array('link'=>"../out/out.Timeline.php", 'label'=>getMLText('timeline')); + $menuitems['misc']['children']['objectcheck'] = array('link'=>"../out/out.ObjectCheck.php", 'label'=>getMLText('objectcheck')); + $menuitems['misc']['children']['documents_expired'] = array('link'=>"../out/out.ExpiredDocuments.php", 'label'=>getMLText('documents_expired')); + $menuitems['misc']['children']['extension_manager'] = array('link'=>"../out/out.ExtensionMgr.php", 'label'=>getMLText('extension_manager')); + $menuitems['misc']['children']['clear_cache'] = array('link'=>"../out/out.ClearCache.php", 'label'=>getMLText('clear_cache')); + $menuitems['misc']['children']['version_info'] = array('link'=>"../out/out.Info.php", 'label'=>getMLText('version_info')); /* Check if hook exists because otherwise callHook() will override $menuitems */ if($this->hasHook('admintoolsNavigationBar')) @@ -757,7 +835,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -782,11 +859,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function calendarNavigationBar($d){ /* {{{ */ echo "".getMLText("calendar")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); if (!$this->params['user']->isGuest()) - $menuitems['addevent'] = array('link'=>"../out/out.AddEvent.php", 'label'=>'add_event'); + $menuitems['addevent'] = array('link'=>"../out/out.AddEvent.php", 'label'=>getMLText('add_event')); /* Check if hook exists because otherwise callHook() will override $menuitems */ if($this->hasHook('calendarNavigationBar')) @@ -794,7 +870,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; diff --git a/views/bootstrap/class.Calendar.php b/views/bootstrap/class.Calendar.php index bee4fe63d..ef364f11d 100644 --- a/views/bootstrap/class.Calendar.php +++ b/views/bootstrap/class.Calendar.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_Calendar extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_Calendar extends SeedDMS_Theme_Style { function iteminfo() { /* {{{ */ $dms = $this->params['dms']; diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 2dbf313ba..3931cfd80 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_Categories extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_Categories extends SeedDMS_Theme_Style { function js() { /* {{{ */ $selcat = $this->params['selcategory']; diff --git a/views/bootstrap/class.CategoryChooser.php b/views/bootstrap/class.CategoryChooser.php index 737252655..5521b5a29 100644 --- a/views/bootstrap/class.CategoryChooser.php +++ b/views/bootstrap/class.CategoryChooser.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 CategoryChooser view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_CategoryChooser extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_CategoryChooser extends SeedDMS_Theme_Style { function show() { /* {{{ */ $dms = $this->params['dms']; diff --git a/views/bootstrap/class.ChangePassword.php b/views/bootstrap/class.ChangePassword.php index 41e4b4e5b..158f8e462 100644 --- a/views/bootstrap/class.ChangePassword.php +++ b/views/bootstrap/class.ChangePassword.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 ChangePassword view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_ChangePassword extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_ChangePassword extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); @@ -48,7 +48,6 @@ document.form1.newpassword.focus(); $this->globalBanner(); $this->contentStart(); $this->pageNavigation(getMLText("change_password")); - $this->contentContainerStart(); ?>
    @@ -59,6 +58,7 @@ document.form1.newpassword.focus(); if ($hash) { echo ""; } + $this->contentContainerStart(); $this->formField( getMLText("password"), '' @@ -83,11 +83,10 @@ document.form1.newpassword.focus(); 'autocomplete'=>'off', ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('submit_password')); ?> -
    -contentContainerEnd(); ?>

    contentEnd(); diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index 117caecc0..282b8c05f 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.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 Charts view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_Charts extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_Charts extends SeedDMS_Theme_Style { function js() { /* {{{ */ $data = $this->params['data']; diff --git a/views/bootstrap/class.ClearCache.php b/views/bootstrap/class.ClearCache.php index 69ef1972e..099bcadcd 100644 --- a/views/bootstrap/class.ClearCache.php +++ b/views/bootstrap/class.ClearCache.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 ClearCache view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_ClearCache extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style { function show() { /* {{{ */ $dms = $this->params['dms']; diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php index 928013494..119ca805a 100644 --- a/views/bootstrap/class.Clipboard.php +++ b/views/bootstrap/class.Clipboard.php @@ -50,29 +50,38 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style { if ($this->params['user']->isGuest() || (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { return ''; } + + $menuitems = []; + $content = ''; $content .= "
      \n"; $content .= "
    • \n"; $content .= " ".getMLText('clipboard')." (".count($clipboard['folders'])."/".count($clipboard['docs']).") \n"; $content .= "
        \n"; + $subitems = []; foreach($clipboard['folders'] as $folderid) { - if($folder = $this->params['dms']->getFolder($folderid)) + if($folder = $this->params['dms']->getFolder($folderid)) { $content .= "
      • getID()."\" class=\"table-row-folder droptarget\" data-droptarget=\"folder_".$folder->getID()."\" rel=\"folder_".$folder->getID()."\" data-name=\"".htmlspecialchars($folder->getName(), ENT_QUOTES)."\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\"> ".htmlspecialchars($folder->getName())."
      • \n"; + $subitems[] = array('label'=>' '.$folder->getName(), 'link'=>"../out/out.ViewFolder.php?folderid=".$folder->getID(), 'class'=>"table-row-folder droptarget", 'rel'=>"folder_".$folder->getID(), 'attributes'=>array(array('data-droptarget', "folder_".$folder->getID()), array('data-name', htmlspecialchars($folder->getName(), ENT_QUOTES)))); + } } foreach($clipboard['docs'] as $docid) { if($document = $this->params['dms']->getDocument($docid)) $content .= "
      • getID()."\" class=\"table-row-document droptarget\" data-droptarget=\"document_".$document->getID()."\" rel=\"document_".$document->getID()."\" data-name=\"".htmlspecialchars($document->getName(), ENT_QUOTES)."\" formtoken=\"".createFormKey('')."\"> ".htmlspecialchars($document->getName())."
      • \n"; + $subitems[] = array('label'=>' '.$document->getName(), 'link'=>"../out/out.ViewDocument.php?documentid=".$document->getID(), 'class'=>"table-row-document droptarget", 'rel'=>"document_".$document->getID(), 'attributes'=>array(array('data-droptarget', "document_".$document->getID()), array('data-name', htmlspecialchars($document->getName(), ENT_QUOTES)))); } $content .= "
      • \n"; + $subitems[] = array('divider'=>true); if(isset($this->params['folder']) && $this->params['folder']->getAccessMode($this->params['user']) >= M_READWRITE) { $content .= "
      • params['folder']->getID()."&refferer=".urlencode('../out/out.ViewFolder.php?folderid='.$this->params['folder']->getID())."\">".getMLText("move_clipboard")."
      • \n"; + $subitems[] = array('label'=>getMLText("move_clipboard"), 'link'=>"../op/op.MoveClipboard.php?targetid=".$this->params['folder']->getID()."&refferer=".urlencode('../out/out.ViewFolder.php?folderid='.$this->params['folder']->getID())); } // $content .= "
      • params['refferer'])."\">".getMLText("clear_clipboard")."kkk
      • \n"; // $content .= "
      • ".getMLText("clear_clipboard")."
      • \n"; - $menuitems = array(); - $menuitems['clear_clipboard'] = array('label'=>'clear_clipboard', 'attributes'=>array(array('class', 'ajax-click'), array('data-href', '../op/op.Ajax.php'), array('data-param1', 'command=clearclipboard'))); + $subitems[] = array('label'=>getMLText('clear_clipboard'), 'attributes'=>array(array('class', 'ajax-click'), array('data-href', '../op/op.Ajax.php'), array('data-param1', 'command=clearclipboard'))); if($this->hasHook('clipboardMenuItems')) - $menuitems = $this->callHook('clipboardMenuItems', $clipboard, $menuitems); + $subitems = $this->callHook('clipboardMenuItems', $clipboard, $subitems); + /* foreach($menuitems as $menuitem) { $content .= "
      • "; $content .= "getMLText('clipboard')." (".count($clipboard['folders'])."/". count($clipboard['docs']).")", 'children'=>$subitems); + self::showNavigationBar($menuitems, array('right'=>true)); +// echo $content; } /* }}} */ /** diff --git a/views/bootstrap/class.CreateIndex.php b/views/bootstrap/class.CreateIndex.php index 733e5a7d7..7ec208154 100644 --- a/views/bootstrap/class.CreateIndex.php +++ b/views/bootstrap/class.CreateIndex.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 CreateIndex view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_CreateIndex extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_CreateIndex extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); @@ -41,12 +41,10 @@ class SeedDMS_View_CreateIndex extends SeedDMS_Bootstrap_Style { $this->contentStart(); $this->pageNavigation(getMLText('admin_tools'), 'admin_tools'); $this->contentHeading(getMLText("create_fulltext_index")); - $this->contentContainerStart(); - echo '

        '.getMLText('create_fulltext_index_warning').'

        '; - echo ''.getMLText('confirm_create_fulltext_index').''; + $this->warningMsg(getMLText('create_fulltext_index_warning')); + echo '

        '.getMLText('confirm_create_fulltext_index').'

        '; - $this->contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.DefaultKeywords.php b/views/bootstrap/class.DefaultKeywords.php index 6c891dca6..dcd12592f 100644 --- a/views/bootstrap/class.DefaultKeywords.php +++ b/views/bootstrap/class.DefaultKeywords.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 DefaultKeywords view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_DefaultKeywords extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_DefaultKeywords extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); diff --git a/views/bootstrap/class.DocumentAccess.php b/views/bootstrap/class.DocumentAccess.php index 5c4bf6e1a..acccb932d 100644 --- a/views/bootstrap/class.DocumentAccess.php +++ b/views/bootstrap/class.DocumentAccess.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 DocumentAccess view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_DocumentAccess extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_DocumentAccess extends SeedDMS_Theme_Style { function printAccessModeSelection($defMode) { /* {{{ */ echo self::getAccessModeSelection($defMode); } /* }}} */ @@ -137,14 +137,14 @@ $(document).ready( function() { - "> + ">
        - "> + ">

        params['user']; diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php index d94baf2fa..c9a1750ff 100644 --- a/views/bootstrap/class.DocumentNotify.php +++ b/views/bootstrap/class.DocumentNotify.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 DocumentNotify view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_DocumentNotify extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_DocumentNotify extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); diff --git a/views/bootstrap/class.DocumentVersionDetail.php b/views/bootstrap/class.DocumentVersionDetail.php index 14e78b499..9c75985be 100644 --- a/views/bootstrap/class.DocumentVersionDetail.php +++ b/views/bootstrap/class.DocumentVersionDetail.php @@ -16,7 +16,7 @@ /** * Include parent class */ -require_once("class.Bootstrap.php"); +//require_once("class.Bootstrap.php"); /** * Include class to preview documents @@ -34,7 +34,7 @@ require_once("SeedDMS/Preview.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Theme_Style { /** * Output a single attribute in the document info section @@ -160,9 +160,9 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { $this->rowStart(); $this->columnStart(4); $this->contentHeading(getMLText("document_infos")); - $this->contentContainerStart(); +// $this->contentContainerStart(); ?> - +
        : @@ -239,7 +239,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { ?>
        contentContainerEnd(); +// $this->contentContainerEnd(); $this->preview(); $this->columnEnd(); $this->columnStart(8); @@ -262,8 +262,20 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { print "
      "; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); $previewer->createPreview($version); + 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()."\">"; + } + } if($previewer->hasPreview($version)) { print("getID()."&version=".$version->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($version->getMimeType())."\">"); + } else { + print "getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; + } + if ($file_exists) { + print ""; } print "\n"; diff --git a/views/bootstrap/class.DropFolderChooser.php b/views/bootstrap/class.DropFolderChooser.php index 20a140212..0800c9868 100644 --- a/views/bootstrap/class.DropFolderChooser.php +++ b/views/bootstrap/class.DropFolderChooser.php @@ -66,7 +66,7 @@ $('.folderselect').click(function(ev) { $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); $c = 0; // count files - $filecontent = ''; + $menuitems['dropfolder'] = array('label'=>'', 'children'=>array()); $dir = rtrim($dropfolderdir, '/').'/'.$user->getLogin(); /* Check if we are still looking in the configured directory and * not somewhere else, e.g. if the login was '../test' @@ -80,34 +80,30 @@ $('.folderselect').click(function(ev) { if($entry != '..' && $entry != '.') { if($showfolders == 0 && !is_dir($dir.'/'.$entry)) { $c++; + $subitem = array('label'=>'', 'attributes'=>array(array('title', getMLText('menu_upload_from_dropfolder')))); + if($folder) + $subitem['link'] = '../out/out.AddDocument.php?folderid='.$folder->getId()."&dropfolderfileform1=".urldecode($entry); $mimetype = finfo_file($finfo, $dir.'/'.$entry); - $filecontent .= "
    • getId()."&dropfolderfileform1=".urldecode($entry)."\" title=\"".getMLText('menu_upload_from_dropfolder')."\"" : "").">"; if($previewwidth) { $previewer->createRawPreview($dir.'/'.$entry, 'dropfolder/', $mimetype); if($previewer->hasRawPreview($dir.'/'.$entry, 'dropfolder/')) { - $filecontent .= "
      "; + $subitem['label'] .= "
      "; } } - $filecontent .= "
      ".$entry."
      ".SeedDMS_Core_File::format_filesize(filesize($dir.'/'.$entry)).", ".date('Y-m-d H:i:s', filectime($dir.'/'.$entry))."
    • \n"; + $subitem['label'] .= "
      ".$entry."
      ".SeedDMS_Core_File::format_filesize(filesize($dir.'/'.$entry)).", ".date('Y-m-d H:i:s', filectime($dir.'/'.$entry))."
      "; + $menuitems['dropfolder']['children'][] = $subitem; } elseif($showfolders && is_dir($dir.'/'.$entry)) { - $filecontent .= "
    • ".$entry."
    • "; + $subitem = array('label'=>$entry); + $menuitems['dropfolder']['children'][] = $subitem; } } } } } - $content = ''; if($c) { - $content .= " \n"; + $menuitems['dropfolder']['label'] = getMLText('menu_dropfolder')." (".$c.")"; + self::showNavigationBar($menuitems, array('id'=>'main-menu-dropfolderlist', 'right'=>true)); } - echo $content; } /* }}} */ function show() { /* {{{ */ diff --git a/views/bootstrap/class.EditAttributes.php b/views/bootstrap/class.EditAttributes.php index 7708b7515..80d4c0559 100644 --- a/views/bootstrap/class.EditAttributes.php +++ b/views/bootstrap/class.EditAttributes.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 EditAttributes view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_EditAttributes extends SeedDMS_Theme_Style { function show() { /* {{{ */ $dms = $this->params['dms']; diff --git a/views/bootstrap/class.EditComment.php b/views/bootstrap/class.EditComment.php index 8f049b377..072c96820 100644 --- a/views/bootstrap/class.EditComment.php +++ b/views/bootstrap/class.EditComment.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 EditComment view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_EditComment extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_EditComment extends SeedDMS_Theme_Style { function js() { /* {{{ */ $strictformcheck = $this->params['strictformcheck']; diff --git a/views/bootstrap/class.EditDocument.php b/views/bootstrap/class.EditDocument.php index 41f759cd0..89f49bdde 100644 --- a/views/bootstrap/class.EditDocument.php +++ b/views/bootstrap/class.EditDocument.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 EditDocument view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_EditDocument extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_EditDocument extends SeedDMS_Theme_Style { function js() { /* {{{ */ $strictformcheck = $this->params['strictformcheck']; diff --git a/views/bootstrap/class.EditDocumentFile.php b/views/bootstrap/class.EditDocumentFile.php index 7fa5691ac..226b20b71 100644 --- a/views/bootstrap/class.EditDocumentFile.php +++ b/views/bootstrap/class.EditDocumentFile.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 EditDocumentFile view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_EditDocumentFile extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_EditDocumentFile extends SeedDMS_Theme_Style { function show() { /* {{{ */ $dms = $this->params['dms']; @@ -43,7 +43,6 @@ class SeedDMS_View_EditDocumentFile extends SeedDMS_Bootstrap_Style { $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("edit")); - $this->contentContainerStart(); ?>
      @@ -51,6 +50,7 @@ class SeedDMS_View_EditDocumentFile extends SeedDMS_Bootstrap_Style { contentContainerStart(); $options = array(); $options[] = array("", getMLText('document')); $versions = $document->getContent(); @@ -94,13 +94,11 @@ class SeedDMS_View_EditDocumentFile extends SeedDMS_Bootstrap_Style { 'checked'=>$file->isPublic() ) ); -?> -contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?>
      contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ diff --git a/views/bootstrap/class.EditFolder.php b/views/bootstrap/class.EditFolder.php index 8f64ba3d0..927a37ba7 100644 --- a/views/bootstrap/class.EditFolder.php +++ b/views/bootstrap/class.EditFolder.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 EditFolder view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_EditFolder extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_EditFolder extends SeedDMS_Theme_Style { function js() { /* {{{ */ $strictformcheck = $this->params['strictformcheck']; diff --git a/views/bootstrap/class.EditOnline.php b/views/bootstrap/class.EditOnline.php index f366e9131..5b2fe136b 100644 --- a/views/bootstrap/class.EditOnline.php +++ b/views/bootstrap/class.EditOnline.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 EditOnline view @@ -29,7 +29,7 @@ require_once("class.Bootstrap.php"); * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_View_EditOnline extends SeedDMS_Bootstrap_Style { +class SeedDMS_View_EditOnline extends SeedDMS_Theme_Style { var $dms; var $folder_count; var $document_count; @@ -127,10 +127,10 @@ $(document).ready(function() { $set = 'markdown'; //default or markdown $skin = 'simple'; // simple or markitup - $this->htmlAddHeader(''."\n", 'css'); - $this->htmlAddHeader(''."\n", 'css'); - $this->htmlAddHeader(''."\n", 'js'); - $this->htmlAddHeader(''."\n", 'js'); + $this->htmlAddHeader(''."\n", 'css'); + $this->htmlAddHeader(''."\n", 'css'); + $this->htmlAddHeader(''."\n", 'js'); + $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("edit_online")); $this->globalNavigation(); @@ -143,7 +143,7 @@ $(document).ready(function() { ?>
      -