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();
?>
contentContainerStart();
print "\n";
$this->contentContainerEnd();
@@ -81,7 +81,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style {
print "\n";
// list backup files
@@ -137,7 +137,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style {
$this->contentContainerStart();
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";
+ 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 .= '
+
+';
+ echo $content;
} /* }}} */
private function folderNavigationBar($folder) { /* {{{ */
$dms = $this->params['dms'];
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 && !$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();
?>
-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 .= "
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 .= "\n";
+ $subitem['label'] .= "";
+ $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";
- $content .= " - \n";
- $content .= " ".getMLText('menu_dropfolder')." (".$c.") \n";
- $content .= " \n";
- $content .= "
\n";
- $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();
?>
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() {
?>