mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
call dummy check_[view|controller]_access method
This commit is contained in:
parent
91e4351ccc
commit
4d24b0a11d
|
@ -304,6 +304,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
function globalNavigation($folder=null) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$accessobject = $this->params['accessobject'];
|
||||
echo "<div class=\"navbar navbar-inverse navbar-fixed-top\">\n";
|
||||
echo " <div class=\"navbar-inner\">\n";
|
||||
echo " <div class=\"container-fluid\">\n";
|
||||
|
@ -319,8 +320,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
if (!$this->params['user']->isGuest()) {
|
||||
$menuitems = array();
|
||||
$menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>'my_documents');
|
||||
$menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account');
|
||||
if ($accessobject->check_view_access('MyDocuments'))
|
||||
$menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>'my_documents');
|
||||
if ($accessobject->check_view_access('MyAccount'))
|
||||
$menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account');
|
||||
$hookObjs = $this->getHookObjects('SeedDMS_View_Bootstrap');
|
||||
foreach($hookObjs as $hookObj) {
|
||||
if (method_exists($hookObj, 'userMenuItems')) {
|
||||
|
@ -371,15 +374,17 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
/* menu tasks {{{ */
|
||||
if($this->params['enablemenutasks'] && !$this->params['user']->isGuest()) {
|
||||
echo " <div id=\"menu-tasks\">";
|
||||
echo " <div class=\"ajax\" data-no-spinner=\"true\" data-view=\"Tasks\" data-action=\"menuTasks\"></div>";
|
||||
// echo " <ul id=\"main-menu-tasks\" class=\"nav pull-right\">\n";
|
||||
// echo " <li class=\"dropdown\">\n";
|
||||
// echo $this->menuTasks(array('review'=>array(), 'approval'=>array(), 'receipt'=>array(), 'revision'=>array()));
|
||||
// echo " </li>\n";
|
||||
// echo " </ul>\n";
|
||||
echo " </div>";
|
||||
//$this->addFooterJS('checkTasks();');
|
||||
if($accessobject->check_view_access('Tasks', array('action'=>'menuTasks'))) {
|
||||
echo " <div id=\"menu-tasks\">";
|
||||
echo " <div class=\"ajax\" data-no-spinner=\"true\" data-view=\"Tasks\" data-action=\"menuTasks\"></div>";
|
||||
// echo " <ul id=\"main-menu-tasks\" class=\"nav pull-right\">\n";
|
||||
// echo " <li class=\"dropdown\">\n";
|
||||
// echo $this->menuTasks(array('review'=>array(), 'approval'=>array(), 'receipt'=>array(), 'revision'=>array()));
|
||||
// echo " </li>\n";
|
||||
// echo " </ul>\n";
|
||||
echo " </div>";
|
||||
//$this->addFooterJS('checkTasks();');
|
||||
}
|
||||
}
|
||||
/* }}} End of menu tasks */
|
||||
|
||||
|
@ -412,7 +417,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
echo " <ul class=\"nav\">\n";
|
||||
$menuitems = array();
|
||||
if ($this->params['enablecalendar']) $menuitems['calendar'] = array('link'=>'../out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
|
||||
if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) $menuitems['calendar'] = array('link'=>'../out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
|
||||
if ($this->params['user']->isAdmin()) $menuitems['admintools'] = array('link'=>'../out/out.AdminTools.php', 'label'=>"admin_tools");
|
||||
if($this->params['enablehelp']) {
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
|
@ -636,6 +641,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
private function folderNavigationBar($folder) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$accessobject = $this->params['accessobject'];
|
||||
if (!is_object($folder) || !$folder->isType('folder')) {
|
||||
self::showNavigationBar(array());
|
||||
return;
|
||||
|
@ -647,10 +653,13 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$menuitems = array();
|
||||
|
||||
if ($accessMode == M_READ && !$this->params['user']->isGuest()) {
|
||||
if ($accessobject->check_view_access('FolderNotify'))
|
||||
$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'=>getMLText('add_subfolder'));
|
||||
if ($accessobject->check_view_access('AddDocument'))
|
||||
$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'=>getMLText('add_multiple_documents'));
|
||||
|
@ -660,11 +669,14 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
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'=>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'=>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'=>getMLText('edit_existing_notify'));
|
||||
}
|
||||
if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) {
|
||||
|
@ -690,7 +702,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
if ($accessMode >= M_READWRITE) {
|
||||
if (!$document->isLocked()) {
|
||||
if($accessobject->check_controller_access('UpdateDocument'))
|
||||
$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'=>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'));
|
||||
|
@ -698,22 +712,28 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
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'=>getMLText('update_document'));
|
||||
if($accessobject->check_controller_access('UnlockDocument'))
|
||||
$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'=>getMLText('expires'));
|
||||
if ($accessobject->check_view_access('SetExpires'))
|
||||
$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'=>getMLText('rm_document'));
|
||||
$menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access'));
|
||||
if ($accessobject->check_view_access('RemoveDocument'))
|
||||
$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'=>getMLText('edit_document_access'));
|
||||
}
|
||||
if ($accessMode >= M_READ && !$this->params['user']->isGuest()) {
|
||||
$menuitems['edit_existing_notify'] = array('link'=>"../out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify'));
|
||||
if ($accessobject->check_view_access('DocumentNotify'))
|
||||
$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'=>getMLText('transfer_document'));
|
||||
|
@ -741,6 +761,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
} /* }}} */
|
||||
|
||||
private function accountNavigationBar() { /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
echo "<id=\"first\"><a href=\"../out/out.MyAccount.php\" class=\"brand\">".getMLText("my_account")."</a>\n";
|
||||
echo "<div class=\"nav-collapse col2\">\n";
|
||||
|
||||
|
@ -754,7 +775,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$menuitems['edit_notify'] = array('link'=>"../out/out.ManageNotify.php", 'label'=>getMLText('edit_existing_notify'));
|
||||
|
||||
if ($this->params['enableusersview']){
|
||||
if ($accessobject->check_view_access('UsrView'))
|
||||
$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'=>getMLText('groups'));
|
||||
}
|
||||
|
||||
|
@ -768,6 +791,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
} /* }}} */
|
||||
|
||||
private function myDocumentsNavigationBar() { /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
|
||||
echo "<id=\"first\"><a href=\"../out/out.MyDocuments.php?inProcess=1\" class=\"brand\">".getMLText("my_documents")."</a>\n";
|
||||
echo "<div class=\"nav-collapse col2\">\n";
|
||||
|
@ -776,9 +800,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$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'=>getMLText('review_summary'));
|
||||
if ($accessobject->check_view_access('ApprovalSummary'))
|
||||
$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'=>getMLText('workflow_summary'));
|
||||
}
|
||||
|
||||
|
@ -792,48 +819,84 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
} /* }}} */
|
||||
|
||||
private function adminToolsNavigationBar() { /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
$settings = $this->params['settings'];
|
||||
echo " <id=\"first\"><a href=\"../out/out.AdminTools.php\" class=\"brand\">".getMLText("admin_tools")."</a>\n";
|
||||
echo "<div class=\"nav-collapse col2\">\n";
|
||||
|
||||
$menuitems = array();
|
||||
if($accessobject->check_view_access(array('UsrMgr', 'GroupMgr', 'UserList'))) {
|
||||
$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'=>getMLText('user_management'));
|
||||
if ($accessobject->check_view_access('GroupMgr'))
|
||||
$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'=>getMLText('user_list'));
|
||||
|
||||
}
|
||||
|
||||
if($accessobject->check_view_access(array('DefaultKeywords', 'Categories', 'AttributeMgr', 'WorkflowMgr', 'WorkflowStatesMgr', 'WorkflowActionsMgr'))) {
|
||||
$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'=>getMLText('global_default_keywords'));
|
||||
if ($accessobject->check_view_access('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'=>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'=>getMLText('global_workflows'));
|
||||
if ($accessobject->check_view_access('WorkflowStatesMgr'))
|
||||
$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'=>getMLText('global_workflow_actions'));
|
||||
}
|
||||
}
|
||||
|
||||
if($this->params['enablefullsearch']) {
|
||||
if($accessobject->check_view_access(array('Indexer', 'CreateIndex', 'IndexInfo'))) {
|
||||
$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'=>getMLText('update_fulltext_index'));
|
||||
if ($accessobject->check_view_access('CreateIndex'))
|
||||
$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'=>getMLText('fulltext_info'));
|
||||
}
|
||||
}
|
||||
|
||||
if($accessobject->check_view_access(array('BackupTools', 'LogManagement'))) {
|
||||
$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'=>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'=>getMLText('log_management'));
|
||||
}
|
||||
|
||||
if($accessobject->check_view_access(array('ImportFS', 'ImportUsers', 'Statistic', 'Charts', 'Timeline', 'ObjectCheck', 'ExtensionMgr', 'Info'))) {
|
||||
$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'=>getMLText('import_fs'));
|
||||
if ($accessobject->check_view_access('ImportUsers'))
|
||||
$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'=>getMLText('folders_and_documents_statistic'));
|
||||
if ($accessobject->check_view_access('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'=>getMLText('timeline'));
|
||||
if ($accessobject->check_view_access('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'=>getMLText('documents_expired'));
|
||||
if ($accessobject->check_view_access('ExtensionMgr'))
|
||||
$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'=>getMLText('clear_cache'));
|
||||
if ($accessobject->check_view_access('Info'))
|
||||
$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'))
|
||||
|
@ -845,6 +908,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
} /* }}} */
|
||||
|
||||
private function calendarOldNavigationBar($d){ /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
$ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2];
|
||||
echo "<id=\"first\"><a href=\"../out/out.CalendarOld.php?mode=y\" class=\"brand\">".getMLText("calendar")."</a>\n";
|
||||
echo "<div class=\"nav-collapse col2\">\n";
|
||||
|
@ -862,6 +926,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
} /* }}} */
|
||||
|
||||
private function calendarNavigationBar($d){ /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
echo "<id=\"first\"><a href=\"../out/out.Calendar.php\" class=\"brand\">".getMLText("calendar")."</a>\n";
|
||||
echo "<div class=\"nav-collapse col2\">\n";
|
||||
|
||||
|
@ -2354,12 +2419,17 @@ $(function() {
|
|||
} /* }}} */
|
||||
|
||||
function printLockButton($document, $msglock, $msgunlock, $return=false) { /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
$docid = $document->getID();
|
||||
if($document->isLocked()) {
|
||||
if(!$accessobject->check_controller_access('UnlockDocument'))
|
||||
return '';
|
||||
$icon = 'unlock';
|
||||
$msg = $msgunlock;
|
||||
$title = 'unlock_document';
|
||||
} else {
|
||||
if(!$accessobject->check_controller_access('LockDocument'))
|
||||
return '';
|
||||
$icon = 'lock';
|
||||
$msg = $msglock;
|
||||
$title = 'lock_document';
|
||||
|
@ -2694,6 +2764,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$workflowmode = $this->params['workflowmode'];
|
||||
$previewwidth = $this->params['previewWidthList'];
|
||||
$enableClipboard = $this->params['enableclipboard'];
|
||||
$accessop = $this->params['accessobject'];
|
||||
$onepage = $this->params['onepage'];
|
||||
|
||||
$content = '';
|
||||
|
@ -2742,12 +2813,14 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
|
||||
$content .= "<td>";
|
||||
if (file_exists($dms->contentDir . $latestContent->getPath())) {
|
||||
if($accessop->check_controller_access('Download', array('action'=>'version')))
|
||||
$content .= "<a draggable=\"false\" href=\"../op/op.Download.php?documentid=".$docID."&version=".$version."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" ".($previewwidth ? "width=\"".$previewwidth."\"" : "")."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
if($accessop->check_controller_access('Download', array('action'=>'version')))
|
||||
$content .= "</a>";
|
||||
} else
|
||||
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
|
@ -2799,10 +2872,12 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= "<div class=\"list-action\">";
|
||||
if(!empty($extracontent['begin_action_list']))
|
||||
$content .= $extracontent['begin_action_list'];
|
||||
if($document->getAccessMode($user) >= M_ALL) {
|
||||
$content .= $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
||||
} else {
|
||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
if($accessop->check_view_access('RemoveDocument')) {
|
||||
if($document->getAccessMode($user) >= M_ALL) {
|
||||
$content .= $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
||||
} else {
|
||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
}
|
||||
}
|
||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||
$content .= '<a href="../out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
|
||||
|
@ -2878,6 +2953,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$enableRecursiveCount = $this->params['enableRecursiveCount'];
|
||||
$maxRecursiveCount = $this->params['maxRecursiveCount'];
|
||||
$enableClipboard = $this->params['enableclipboard'];
|
||||
$accessop = $this->params['accessobject'];
|
||||
$onepage = $this->params['onepage'];
|
||||
|
||||
$owner = $subFolder->getOwner();
|
||||
|
@ -2934,10 +3010,12 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if(!empty($extracontent['begin_action_list']))
|
||||
$content .= $extracontent['begin_action_list'];
|
||||
$subFolderAccessMode = $subFolder->getAccessMode($user);
|
||||
if($subFolderAccessMode >= M_ALL) {
|
||||
$content .= $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true);
|
||||
} else {
|
||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
if ($accessop->check_view_access('RemoveFolder')) {
|
||||
if($subFolderAccessMode >= M_ALL) {
|
||||
$content .= $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true);
|
||||
} else {
|
||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
}
|
||||
}
|
||||
if($subFolderAccessMode >= M_READWRITE) {
|
||||
$content .= '<a class_="btn btn-mini" href="../out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
|
||||
|
@ -3162,6 +3240,7 @@ $(document).ready(function() {
|
|||
protected function printProtocol($latestContent, $type="") { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$document = $latestContent->getDocument();
|
||||
$accessop = $this->params['accessobject'];
|
||||
?>
|
||||
<legend><?php printMLText($type.'_log'); ?></legend>
|
||||
<table class="table condensed">
|
||||
|
@ -3213,16 +3292,18 @@ $(document).ready(function() {
|
|||
echo "<br />".htmlspecialchars($rec['comment']);
|
||||
switch($type) {
|
||||
case "review":
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
if($accessop->check_controller_access('Download', array('action'=>'review')))
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
break;
|
||||
case "approval":
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
if($accessop->check_controller_access('Download', array('action'=>'approval')))
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo "</td>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user