diff --git a/Gruntfile.js b/Gruntfile.js index e1015ea84..1ad6013f0 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'; @@ -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: [ @@ -152,6 +173,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: [ diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index 7beab4283..2b601f65e 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 = ''; } @@ -102,15 +108,21 @@ 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) { - require($filename); + /* Always include the base class which defines class SeedDMS_Theme_Style */ + require_once($settings->_rootDir."views/".$theme."/class.".ucfirst($theme).".php"); + require_once($filename); $view = new $classname($params, $theme); /* Set some configuration parameters */ $view->setParam('accessobject', new SeedDMS_AccessOperation($dms, $user, $settings)); $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); diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 0baec5ea4..28b788b6e 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -478,10 +478,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); } } /* }}} */ diff --git a/out/out.ChangePassword.php b/out/out.ChangePassword.php index 3d7153d19..3bd9572e8 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"); diff --git a/out/out.Login.php b/out/out.Login.php index 99a0dffff..8fc053f1d 100644 --- a/out/out.Login.php +++ b/out/out.Login.php @@ -27,6 +27,7 @@ require_once("inc/inc.Language.php"); require_once("inc/inc.Init.php"); require_once("inc/inc.Extension.php"); require_once("inc/inc.ClassAccessOperation.php"); +require_once("inc/inc.DBInit.php"); require_once("inc/inc.ClassUI.php"); include $settings->_rootDir . "languages/" . $settings->_language . "/lang.inc"; diff --git a/package.json b/package.json index ef7720150..b16c40b8b 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,7 @@ "license": "ISC", "dependencies": { "@coreui/coreui": "^3.3.0", - "@coreui/icons": "^1.0.1", - "@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", @@ -34,6 +33,6 @@ "perfect-scrollbar": "^1.5.0", "popper.js": "^1.16.1", "select2": "^4.0.13", - "simple-line-icons": "^2.5.5" + "vis-timeline": "^7.4.7" } } diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 2d866475e..ea329edeb 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() { /* {{{ */ $libraryfolder = $this->params['libraryfolder']; 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 38bfc80fa..54f28b99f 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 37151c0e5..57a17c7f6 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 03cf6a95d..7d196feb1 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(); @@ -83,7 +83,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { print "
"; $this->printFolderChooserHtml("form2",M_READWRITE); print ""; - print ""; + print ""; print "
\n"; } @@ -147,7 +147,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { if($accessop->check_controller_access('CreateDump', array('action'=>'run'))) { print "
"; - print ""; + print ""; print "
\n"; } diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 601ce1cc1..747475021 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 @@ -103,8 +103,8 @@ class SeedDMS_Bootstrap_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_Bootstrap_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();'); } @@ -603,66 +605,152 @@ 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']; $accessobject = $this->params['accessobject']; if (!is_object($folder) || !$folder->isType('folder')) { - 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) { if ($accessobject->check_view_access('FolderNotify')) - $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) { if ($accessobject->check_view_access('AddSubFolder')) - $menuitems['add_subfolder'] = array('link'=>"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_subfolder'); + $menuitems['add_subfolder'] = array('link'=>"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_subfolder')); if ($accessobject->check_view_access('AddDocument')) - $menuitems['add_document'] = array('link'=>"../out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_document'); + $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()) if ($accessobject->check_view_access('RemoveFolder')) - $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) { if ($accessobject->check_view_access('FolderAccess')) - $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')); } if ($accessobject->check_view_access('FolderNotify')) - $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 ($accessobject->check_view_access('Indexer') && $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 */ @@ -671,7 +759,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -682,62 +769,61 @@ 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()) { if($accessobject->check_controller_access('UpdateDocument')) - $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>'update_document'); + $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document')); if($accessobject->check_controller_access('LockDocument')) - $menuitems['lock_document'] = array('link'=>"../op/op.LockDocument".$docid, 'label'=>'lock_document'); + $menuitems['lock_document'] = array('link'=>"../op/op.LockDocument".$docid, 'label'=>getMLText('lock_document')); if($document->isCheckedOut()) - $menuitems['checkin_document'] = array('link'=>"../out/out.CheckInDocument".$docid, 'label'=>'checkin_document'); + $menuitems['checkin_document'] = array('link'=>"../out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document')); else { if($this->params['checkoutdir']) { - $menuitems['checkout_document'] = array('link'=>"../op/op.CheckOutDocument".$docid, 'label'=>'checkout_document'); + $menuitems['checkout_document'] = array('link'=>"../op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document')); } } if($accessobject->check_controller_access('EditDocument')) - $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['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)) { if($accessobject->check_controller_access('UpdateDocument')) - $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>'update_document'); + $menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document')); if($accessobject->check_controller_access('UnlockDocument')) - $menuitems['unlock_document'] = array('link'=>"../op/op.UnlockDocument".$docid, 'label'=>'unlock_document'); + $menuitems['unlock_document'] = array('link'=>"../op/op.UnlockDocument".$docid, 'label'=>getMLText('unlock_document')); if($document->isCheckedOut()) { - $menuitems['checkin_document'] = array('link'=>"../out/out.CheckInDocument".$docid, 'label'=>'checkin_document'); + $menuitems['checkin_document'] = array('link'=>"../out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document')); } else { if($this->params['checkoutdir']) { - $menuitems['checkout_document'] = array('link'=>"../op/op.CheckOutDocument".$docid, 'label'=>'checkout_document'); + $menuitems['checkout_document'] = array('link'=>"../op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document')); } } if($accessobject->check_controller_access('EditDocument')) - $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['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($document)) { if ($accessobject->check_view_access('SetExpires')) - $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) { if ($accessobject->check_view_access('RemoveDocument')) - $menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>'rm_document'); + $menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document')); if ($accessobject->check_view_access('DocumentAccess')) - $menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>'edit_document_access'); + $menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access')); } if ($accessMode >= M_READ) { if ($accessobject->check_view_access('DocumentNotify')) - $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 ($accessobject->check_view_access('TransferDocument')) { - $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 */ @@ -758,7 +844,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -767,24 +852,23 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $accessobject = $this->params['accessobject']; echo "".getMLText("my_account")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); if ($accessobject->check_view_access('EditUserData') || !$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')); $menuitems['2_factor_auth'] = array('link'=>"../out/out.Setup2Factor.php", 'label'=>'2_factor_auth'); if ($this->params['enableusersview']){ if ($accessobject->check_view_access('UsrView')) - $menuitems['users'] = array('link'=>"../out/out.UsrView.php", 'label'=>'users'); + $menuitems['users'] = array('link'=>"../out/out.UsrView.php", 'label'=>getMLText('users')); if ($accessobject->check_view_access('GroupView')) - $menuitems['groups'] = array('link'=>"../out/out.GroupView.php", 'label'=>'groups'); + $menuitems['groups'] = array('link'=>"../out/out.GroupView.php", 'label'=>getMLText('groups')); } /* Check if hook exists because otherwise callHook() will override $menuitems */ @@ -793,7 +877,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -803,24 +886,23 @@ 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') { if ($accessobject->check_view_access('ReviewSummary')) - $menuitems['review_summary'] = array('link'=>"../out/out.ReviewSummary.php", 'label'=>'review_summary'); + $menuitems['review_summary'] = array('link'=>"../out/out.ReviewSummary.php", 'label'=>getMLText('review_summary')); if ($accessobject->check_view_access('ApprovalSummary')) - $menuitems['approval_summary'] = array('link'=>"../out/out.ApprovalSummary.php", 'label'=>'approval_summary'); + $menuitems['approval_summary'] = array('link'=>"../out/out.ApprovalSummary.php", 'label'=>getMLText('approval_summary')); } else { if ($accessobject->check_view_access('WorkflowSummary')) - $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')); } if ($accessobject->check_view_access('ReceiptSummary')) - $menuitems['receipt_summary'] = array('link'=>"../out/out.ReceiptSummary.php", 'label'=>'receipt_summary'); + $menuitems['receipt_summary'] = array('link'=>"../out/out.ReceiptSummary.php", 'label'=>getMLText('receipt_summary')); if ($accessobject->check_view_access('RevisionSummary')) - $menuitems['revision_summary'] = array('link'=>"../out/out.RevisionSummary.php", 'label'=>'revision_summary'); + $menuitems['revision_summary'] = array('link'=>"../out/out.RevisionSummary.php", 'label'=>getMLText('revision_summary')); /* Check if hook exists because otherwise callHook() will override $menuitems */ if($this->hasHook('mydocumentsNavigationBar')) @@ -828,7 +910,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -838,92 +919,91 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $settings = $this->params['settings']; echo " ".getMLText("admin_tools")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); if($accessobject->check_view_access(array('UsrMgr', 'RoleMgr', 'GroupMgr', 'UserList', 'Acl'))) { - $menuitems['user_group_management'] = array('link'=>"#", 'label'=>'user_group_management'); + $menuitems['user_group_management'] = array('link'=>"#", 'label'=>getMLText('user_group_management')); if ($accessobject->check_view_access('UsrMgr')) - $menuitems['user_group_management']['children']['user_management'] = array('link'=>"../out/out.UsrMgr.php", 'label'=>'user_management'); + $menuitems['user_group_management']['children']['user_management'] = array('link'=>"../out/out.UsrMgr.php", 'label'=>getMLText('user_management')); if ($accessobject->check_view_access('RoleMgr')) - $menuitems['user_group_management']['children']['role_management'] = array('link'=>"../out/out.RoleMgr.php", 'label'=>'role_management'); + $menuitems['user_group_management']['children']['role_management'] = array('link'=>"../out/out.RoleMgr.php", 'label'=>getMLText('role_management')); if ($accessobject->check_view_access('GroupMgr')) - $menuitems['user_group_management']['children']['group_management'] = array('link'=>"../out/out.GroupMgr.php", 'label'=>'group_management'); + $menuitems['user_group_management']['children']['group_management'] = array('link'=>"../out/out.GroupMgr.php", 'label'=>getMLText('group_management')); if ($accessobject->check_view_access('UserList')) - $menuitems['user_group_management']['children']['user_list'] = array('link'=>"../out/out.UserList.php", 'label'=>'user_list'); + $menuitems['user_group_management']['children']['user_list'] = array('link'=>"../out/out.UserList.php", 'label'=>getMLText('user_list')); if ($accessobject->check_view_access('Acl')) - $menuitems['user_group_management']['children']['access_control'] = array('link'=>"../out/out.Acl.php", 'label'=>'access_control'); + $menuitems['user_group_management']['children']['access_control'] = array('link'=>"../out/out.Acl.php", 'label'=>getMLText('access_control')); } if($accessobject->check_view_access(array('DefaultKeywords', 'Categories', 'AttributeMgr', 'WorkflowMgr', 'WorkflowStatesMgr', 'WorkflowActionsMgr'))) { - $menuitems['definitions'] = array('link'=>"#", 'label'=>'definitions'); + $menuitems['definitions'] = array('link'=>"#", 'label'=>getMLText('definitions')); if ($accessobject->check_view_access('DefaultKeywords')) - $menuitems['definitions']['children']['default_keywords'] = array('link'=>"../out/out.DefaultKeywords.php", 'label'=>'global_default_keywords'); + $menuitems['definitions']['children']['default_keywords'] = array('link'=>"../out/out.DefaultKeywords.php", 'label'=>getMLText('global_default_keywords')); if ($accessobject->check_view_access('Categories')) - $menuitems['definitions']['children']['document_categories'] = array('link'=>"../out/out.Categories.php", 'label'=>'global_document_categories'); + $menuitems['definitions']['children']['document_categories'] = array('link'=>"../out/out.Categories.php", 'label'=>getMLText('global_document_categories')); if ($accessobject->check_view_access('AttributeMgr')) - $menuitems['definitions']['children']['attribute_definitions'] = array('link'=>"../out/out.AttributeMgr.php", 'label'=>'global_attributedefinitions'); + $menuitems['definitions']['children']['attribute_definitions'] = array('link'=>"../out/out.AttributeMgr.php", 'label'=>getMLText('global_attributedefinitions')); if($this->params['workflowmode'] == 'advanced') { if ($accessobject->check_view_access('WorkflowMgr')) - $menuitems['definitions']['children']['workflows'] = array('link'=>"../out/out.WorkflowMgr.php", 'label'=>'global_workflows'); + $menuitems['definitions']['children']['workflows'] = array('link'=>"../out/out.WorkflowMgr.php", 'label'=>getMLText('global_workflows')); if ($accessobject->check_view_access('WorkflowStatesMgr')) - $menuitems['definitions']['children']['workflow_states'] = array('link'=>"../out/out.WorkflowStatesMgr.php", 'label'=>'global_workflow_states'); + $menuitems['definitions']['children']['workflow_states'] = array('link'=>"../out/out.WorkflowStatesMgr.php", 'label'=>getMLText('global_workflow_states')); if ($accessobject->check_view_access('WorkflowActionsMgr')) - $menuitems['definitions']['children']['workflow_actions'] = array('link'=>"../out/out.WorkflowActionsMgr.php", 'label'=>'global_workflow_actions'); + $menuitems['definitions']['children']['workflow_actions'] = array('link'=>"../out/out.WorkflowActionsMgr.php", 'label'=>getMLText('global_workflow_actions')); } } if($this->params['enablefullsearch']) { if($accessobject->check_view_access(array('Indexer', 'CreateIndex', 'IndexInfo'))) { - $menuitems['fulltext'] = array('link'=>"#", 'label'=>'fullsearch'); + $menuitems['fulltext'] = array('link'=>"#", 'label'=>getMLText('fullsearch')); if ($accessobject->check_view_access('Indexer')) - $menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>"../out/out.Indexer.php", 'label'=>'update_fulltext_index'); + $menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>"../out/out.Indexer.php", 'label'=>getMLText('update_fulltext_index')); if ($accessobject->check_view_access('CreateIndex')) - $menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>"../out/out.CreateIndex.php", 'label'=>'create_fulltext_index'); + $menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>"../out/out.CreateIndex.php", 'label'=>getMLText('create_fulltext_index')); if ($accessobject->check_view_access('IndexInfo')) - $menuitems['fulltext']['children']['fulltext_info'] = array('link'=>"../out/out.IndexInfo.php", 'label'=>'fulltext_info'); + $menuitems['fulltext']['children']['fulltext_info'] = array('link'=>"../out/out.IndexInfo.php", 'label'=>getMLText('fulltext_info')); } } if($accessobject->check_view_access(array('BackupTools', 'LogManagement'))) { - $menuitems['backup_log_management'] = array('link'=>"#", 'label'=>'backup_log_management'); + $menuitems['backup_log_management'] = array('link'=>"#", 'label'=>getMLText('backup_log_management')); if ($accessobject->check_view_access('BackupTools')) - $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.BackupTools.php", 'label'=>'backup_tools'); + $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.BackupTools.php", 'label'=>getMLText('backup_tools')); if ($this->params['logfileenable']) if ($accessobject->check_view_access('LogManagement')) - $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')); } if($accessobject->check_view_access(array('ImportFS', 'ImportUsers', 'Statistic', 'Charts', 'Timeline', 'ObjectCheck', 'ExtensionMgr', 'Info'))) { - $menuitems['misc'] = array('link'=>"#", 'label'=>'misc'); + $menuitems['misc'] = array('link'=>"#", 'label'=>getMLText('misc')); if ($accessobject->check_view_access('ImportFS')) - $menuitems['misc']['children']['import_fs'] = array('link'=>"../out/out.ImportFS.php", 'label'=>'import_fs'); + $menuitems['misc']['children']['import_fs'] = array('link'=>"../out/out.ImportFS.php", 'label'=>getMLText('import_fs')); if ($accessobject->check_view_access('ImportUsers')) - $menuitems['misc']['children']['import_users'] = array('link'=>"../out/out.ImportUsers.php", 'label'=>'import_users'); + $menuitems['misc']['children']['import_users'] = array('link'=>"../out/out.ImportUsers.php", 'label'=>getMLText('import_users')); if ($accessobject->check_view_access('Statistic')) - $menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>"../out/out.Statistic.php", 'label'=>'folders_and_documents_statistic'); + $menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>"../out/out.Statistic.php", 'label'=>getMLText('folders_and_documents_statistic')); if ($accessobject->check_view_access('Charts')) - $menuitems['misc']['children']['charts'] = array('link'=>"../out/out.Charts.php", 'label'=>'charts'); + $menuitems['misc']['children']['charts'] = array('link'=>"../out/out.Charts.php", 'label'=>getMLText('charts')); if ($accessobject->check_view_access('Timeline')) - $menuitems['misc']['children']['timeline'] = array('link'=>"../out/out.Timeline.php", 'label'=>'timeline'); + $menuitems['misc']['children']['timeline'] = array('link'=>"../out/out.Timeline.php", 'label'=>getMLText('timeline')); if ($accessobject->check_view_access('SchedulerTaskMgr')) - $menuitems['misc']['children']['schedulertaskmgr'] = array('link'=>"../out/out.SchedulerTaskMgr.php", 'label'=>'scheduler_task_mgr'); + $menuitems['misc']['children']['schedulertaskmgr'] = array('link'=>"../out/out.SchedulerTaskMgr.php", 'label'=>getMLText('scheduler_task_mgr')); if ($accessobject->check_view_access('ObjectCheck')) - $menuitems['misc']['children']['objectcheck'] = array('link'=>"../out/out.ObjectCheck.php", 'label'=>'objectcheck'); + $menuitems['misc']['children']['objectcheck'] = array('link'=>"../out/out.ObjectCheck.php", 'label'=>getMLText('objectcheck')); if ($accessobject->check_view_access('ExpiredDocuments')) - $menuitems['misc']['children']['documents_expired'] = array('link'=>"../out/out.ExpiredDocuments.php", 'label'=>'documents_expired'); + $menuitems['misc']['children']['documents_expired'] = array('link'=>"../out/out.ExpiredDocuments.php", 'label'=>getMLText('documents_expired')); if ($accessobject->check_view_access('ExtensionMgr')) - $menuitems['misc']['children']['extension_manager'] = array('link'=>"../out/out.ExtensionMgr.php", 'label'=>'extension_manager'); + $menuitems['misc']['children']['extension_manager'] = array('link'=>"../out/out.ExtensionMgr.php", 'label'=>getMLText('extension_manager')); if ($accessobject->check_view_access('ClearCache')) - $menuitems['misc']['children']['clear_cache'] = array('link'=>"../out/out.ClearCache.php", 'label'=>'clear_cache'); + $menuitems['misc']['children']['clear_cache'] = array('link'=>"../out/out.ClearCache.php", 'label'=>getMLText('clear_cache')); if ($accessobject->check_view_access('Info')) - $menuitems['misc']['children']['version_info'] = array('link'=>"../out/out.Info.php", 'label'=>'version_info'); + $menuitems['misc']['children']['version_info'] = array('link'=>"../out/out.Info.php", 'label'=>getMLText('version_info')); } if ($settings->_enableDebugMode) { - $menuitems['debug'] = array('link'=>"#", 'label'=>'debug'); + $menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug')); if ($accessobject->check_view_access('Hooks')) - $menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>'list_hooks'); + $menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks')); } /* Check if hook exists because otherwise callHook() will override $menuitems */ @@ -932,7 +1012,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; } /* }}} */ @@ -959,11 +1038,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $accessobject = $this->params['accessobject']; echo "".getMLText("calendar")."\n"; echo "
    \n"; - echo "
      \n"; $menuitems = array(); if($accessobject->check_view_access(array('AddEvent'))) - $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')) @@ -971,7 +1049,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; self::showNavigationBar($menuitems); - echo "
    \n"; echo "
    \n"; return; @@ -3534,3 +3611,5 @@ $("body").on("click", "span.openpopupbox", function(e) { 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 ec711b891..119ca805a 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 * @@ -50,29 +50,38 @@ class SeedDMS_View_Clipboard extends SeedDMS_Bootstrap_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 d07f473e6..75a2ea7cd 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 @@ -162,9 +162,9 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { $this->rowStart(); $this->columnStart(4); $this->contentHeading(getMLText("document_infos")); - $this->contentContainerStart(); +// $this->contentContainerStart(); ?> - +
        : @@ -241,7 +241,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { ?>
        contentContainerEnd(); +// $this->contentContainerEnd(); $this->preview(); $this->columnEnd(); $this->columnStart(8); @@ -265,8 +265,20 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); $previewer->setConverters($previewconverters); $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 5c7ad16bc..4d0209315 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'); @@ -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,36 +80,32 @@ $('.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); if(file_exists($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 02d905f8f..abba022a6 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; @@ -128,10 +128,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(); @@ -144,7 +144,7 @@ $(document).ready(function() { ?>
        -