diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 81de2d272..e005ad4cd 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -641,41 +641,68 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo $content; } /* }}} */ - protected function showButtonwithMenu($button, $options=array()) { /* {{{ */ + protected function getMenu($menuitems=[], $options=[]) { /* {{{ */ $content = ''; $content .= ' + +'; + return $content; + } /* }}} */ + + protected function getButtonWithMenu($button, $options=array()) { /* {{{ */ + $content = ''; + if ($button['menuitems']) { + $content .= '
'.$button['label'].' '; - if($button['menuitems']) { - $content .= ' - -'; - } - $content .= '
'; - echo $content; + } + return $content; + } /* }}} */ + + protected function showButtonWithMenu($button, $options=array()) { /* {{{ */ + echo $this->getButtonWithMenu($button, $options); } /* }}} */ protected function showPaneHeader($name, $title, $isactive) { /* {{{ */ @@ -1465,8 +1492,9 @@ function getOverallStatusIcon($status) { /* {{{ */ function getModalBoxLinkAttributes($config) { /* {{{ */ $attrs = array(); $attrs[] = array('data-target', '#'.$config['target']); - if(isset($config['remote'])) + if(isset($config['remote'])) { $attrs[] = array('href', $config['remote']); + } $attrs[] = array('data-toggle', 'modal'); $attrs[] = array('role', 'button'); if(isset($config['class'])) { @@ -2392,7 +2420,6 @@ $(document).ready(function() { } else { $tree[] = $node; } - } else { if($root = $this->params['dms']->getFolder($this->params['rootfolderid'])) $tree = array(array('label'=>$root->getName(), 'id'=>$root->getID(), 'load_on_demand'=>false, 'is_folder'=>true)); @@ -2626,6 +2653,11 @@ $(function() { return ''; } /* }}} */ + function getDeleteDocumentButton($document, $msg, $return=false){ /* {{{ */ + $docid = $document->getID(); + return ['class'=>'delete-document-btn', 'rel'=>$docid, 'msg'=>getMLText($msg), 'confirmmsg'=>htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => htmlspecialchars($document->getName()))), ENT_QUOTES), 'title'=>getMLText('delete'), 'label'=>getMLText('delete'), 'icon'=>'remove']; + } /* }}} */ + function printDeleteDocumentButtonJs(){ /* {{{ */ echo " $(document).ready(function () { @@ -2700,6 +2732,11 @@ $(function() { return ''; } /* }}} */ + function getDeleteFolderButton($folder, $msg, $return=false){ /* {{{ */ + $folderid = $folder->getID(); + return ['class'=>'delete-folder-btn', 'rel'=>$folderid, 'msg'=>getMLText($msg), 'confirmmsg'=>htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => htmlspecialchars($folder->getName()))), ENT_QUOTES), 'title'=>getMLText("delete"), 'label'=>getMLText("delete"), 'label'=>getMLText("delete"), 'icon'=>'remove']; + } /* }}} */ + function printDeleteFolderButtonJs(){ /* {{{ */ echo " $(document).ready(function () { @@ -2770,6 +2807,7 @@ $(function() { } $content = ''; $content .= ''; + $content = ['class'=>'lock-document-btn', 'rel'=>$docid, 'msg'=>getMLText($msg), 'title'=>getMLText($title), 'label'=>getMLText($title), 'data-formtoken'=>createFormKey('tooglelockdocument'), 'icon'=>$icon]; if($return) return $content; else @@ -2782,11 +2820,15 @@ $(function() { $content = ''; $objid = $object->getId(); if($object->isType('document')) { - if($accessobject->check_view_access('DocumentAccess')) - $content .= ''; + if($accessobject->check_view_access('DocumentAccess')) { +// $content .= ''; + $content = ['class'=>'access-document-btn', 'link'=>$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid, 'title'=>getMLText('edit_document_access'), 'label'=>getMLText('edit_document_access'), 'icon'=>'bolt']; + } } elseif($object->isType('folder')) { - if($accessobject->check_view_access('FolderAccess')) - $content .= ''; + if($accessobject->check_view_access('FolderAccess')) { +// $content .= ''; + $content = ['class'=>'access-folder-btn', 'link'=>$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid, 'title'=>getMLText('edit_folder_access'), 'label'=>getMLText('edit_folder_access'), 'icon'=>'bolt']; + } } if($return) return $content; @@ -3245,14 +3287,15 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $content .= $extracontent['begin_action_list']; if($accessop->check_view_access('RemoveDocument')) { if($document->getAccessMode($user, 'removeDocument') >= M_ALL) { - $actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true); + $actions['remove_document'] = $this->getDeleteDocumentButton($document, 'splash_rm_document', true); } else { $actions['remove_document'] = ''; } } $docID = $document->getID(); if($document->getAccessMode($user) >= M_READWRITE) { - $actions['edit_document'] = ''; +// $actions['edit_document'] = ''; + $actions['edit_document'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID, 'title'=>getMLText("edit_document_props"), 'label'=>getMLText("edit_document_props"), 'icon'=>'edit']; } else { $actions['edit_document'] = ''; } @@ -3263,13 +3306,18 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $actions['document_access'] = $this->printAccessButton($document, true); } if($enableClipboard) { - if($session->isOnClipboard($document)) - $actions['remove_from_clipboard'] = ''; - else - $actions['add_to_clipboard'] = ''; + if($session->isOnClipboard($document)) { +// $actions['remove_from_clipboard'] = ''; + $actions['remove_from_clipboard'] = ['class'=>'removefromclipboard', 'rel'=>'D'.$docID, 'msg'=>getMLText('splash_removed_from_clipboard'), 'title'=>getMLText("remove_from_clipboard"), 'label'=>getMLText("remove_from_clipboard"), 'icon'=>'clipboard']; + } else { +// $actions['add_to_clipboard'] = ''; + $actions['add_to_clipboard'] = ['class'=>'addtoclipboard', 'rel'=>'D'.$docID, 'msg'=>getMLText('splash_added_to_clipboard'), 'title'=>getMLText("add_to_clipboard"), 'label'=>getMLText("add_to_clipboard"), 'icon'=>'clipboard']; + } + } + if($onepage) { +// $actions['view_document'] = ''; + $actions['view_document'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID, 'title'=>getMLText("view_document"), 'label'=>getMLText("view_document"), 'icon'=>'eye']; } - if($onepage) - $actions['view_document'] = ''; /* Do not use $this->callHook() because $menuitems must be returned by the the * first hook and passed to next hook. $this->callHook() will just pass @@ -3282,14 +3330,61 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } } - foreach($actions as $action) { - if(is_string($action)) - $content .= $action; + if (empty($this->params['settings']->_actiondropdown)) { + foreach($actions as $action) { + if(is_string($action)) + $content .= $action; + elseif(is_array($action)) { + $content .= ''; + } + } + } else { + $content .= $this->getButtonWithMenu(['label'=>'', 'menuitems'=>$actions], ['class'=>'pull-right']); } if(!empty($extracontent['end_action_list'])) $content .= $extracontent['end_action_list']; $content .= ""; + + if (0) { + $content .= ''; + } return $content; } /* }}} */ @@ -3298,7 +3393,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) * * @param object $document * @param object $previewer - * @param boolean $skipcont set to true if embrasing tr shall be skipped + * @param boolean $skipcont set to true if embrasing tr shall be skipped. * In that case call documentListRowStart() before and documentListRowEnd() * after this method. */ @@ -3469,13 +3564,14 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $subFolderAccessMode = $subFolder->getAccessMode($user); if ($accessop->check_view_access('RemoveFolder')) { if($subFolderAccessMode >= M_ALL) { - $actions['remove_folder'] = $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true); + $actions['remove_folder'] = $this->getDeleteFolderButton($subFolder, 'splash_rm_folder', true); } else { $actions['remove_folder'] = ''; } } if($subFolderAccessMode >= M_READWRITE) { - $actions['edit_folder'] = ''; +// $actions['edit_folder'] = ''; + $actions['edit_folder'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID(), 'title'=>getMLText('edit_folder_props'), 'label'=>getMLText('edit_folder_props'), 'icon'=>'edit']; } else { $actions['edit_folder'] = ''; } @@ -3484,12 +3580,14 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } if($enableClipboard) { if($session->isOnClipboard($subFolder)) - $actions['add_to_clipboard'] = ''; +// $actions['add_to_clipboard'] = ''; + $actions['add_to_clipboard'] = ['class'=>'removefromclipboard', 'title'=>getMLText('remove_from_clipboard'), 'label'=>getMLText('remove_from_clipboard'), 'rel'=>'F'.$subFolder->getID(), 'msg'=>getMLText('splash_removed_from_clipboard'), 'icon'=>'clipboard']; else - $actions['add_to_clipboard'] = ''; +// $actions['add_to_clipboard'] = ''; + $actions['add_to_clipboard'] = ['class'=>'addtoclipboard', 'title'=>getMLText('add_to_clipboard'), 'label'=>getMLText('add_to_clipboard'), 'rel'=>'F'.$subFolder->getID(), 'msg'=>getMLText('splash_added_to_clipboard'), 'icon'=>'clipboard']; } if($onepage) - $actions['view_folder'] = ''; + $actions['view_folder'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID(), 'title'=>getMLText("view_folder"), 'label'=>getMLText("view_folder"), 'icon'=>'eye']; /* Do not use $this->callHook() because $menuitems must be returned by the the * first hook and passed to next hook. $this->callHook() will just pass @@ -3502,14 +3600,61 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } } - foreach($actions as $action) { - if(is_string($action)) - $content .= $action; + if (empty($this->params['settings']->_actiondropdown)) { + foreach($actions as $action) { + if(is_string($action)) + $content .= $action; + elseif(is_array($action)) { + $content .= ''; + } + } + } else { + $content .= $this->getButtonWithMenu(['label'=>'', 'menuitems'=>$actions], ['class'=>'pull-right']); } if(!empty($extracontent['end_action_list'])) $content .= $extracontent['end_action_list']; $content .= ""; + + if (0) { + $content .= '"; + } return $content; } /* }}} */ diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 74d01f42c..e443c4a6f 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -647,41 +647,71 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo $content; } /* }}} */ - protected function showButtonwithMenu($button, $options=array()) { /* {{{ */ + protected function getMenu($menuitems=[], $options=[]) { /* {{{ */ $content = ''; $content .= ' -
-
- + +
'; - echo $content; + return $content; + } /* }}} */ + + protected function getButtonWithMenu($button, $options=array()) { /* {{{ */ + $content = ''; + if ($button['menuitems']) { + $content .= ' +
+
+ + '.$button['label'].' + +'; + if($button['menuitems']) { + $content .= $this->getMenu($button['menuitems'], $options); + } + $content .= ' +
+'; + $content .= ' +
+'; + } + return $content; + } /* }}} */ + + protected function showButtonWithMenu($button, $options=array()) { /* {{{ */ + echo $this->getButtonWithMenu($button, $options); } /* }}} */ protected function showPaneHeader($name, $title, $isactive) { /* {{{ */ @@ -1242,6 +1272,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; ((isset($value['value']) && is_string($value['value'])) || !empty($value['value']) ? ' value="'.$value['value'].'"' : ''). (!empty($value['placeholder']) ? ' placeholder="'.$value['placeholder'].'"' : ''). (!empty($value['autocomplete']) ? ' autocomplete="'.$value['autocomplete'].'"' : ''). + (isset($value['min']) ? ' min="'.$value['min'].'"' : ''). (!empty($value['checked']) ? ' checked' : ''). (!empty($value['required']) ? ' required="required"' : ''); if(!empty($value['attributes']) && is_array($value['attributes'])) @@ -2653,6 +2684,11 @@ $(function() { return ''; } /* }}} */ + function getDeleteDocumentButton($document, $msg, $return=false){ /* {{{ */ + $docid = $document->getID(); + return ['class'=>'delete-document-btn', 'rel'=>$docid, 'msg'=>getMLText($msg), 'confirmmsg'=>htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => htmlspecialchars($document->getName()))), ENT_QUOTES), 'title'=>getMLText('delete'), 'label'=>getMLText('delete'), 'icon'=>'remove']; + } /* }}} */ + function printDeleteDocumentButtonJs(){ /* {{{ */ echo " $(document).ready(function () { @@ -2733,6 +2769,11 @@ $(function() { return ''; } /* }}} */ + function getDeleteFolderButton($folder, $msg, $return=false){ /* {{{ */ + $folderid = $folder->getID(); + return ['class'=>'delete-folder-btn', 'rel'=>$folderid, 'msg'=>getMLText($msg), 'confirmmsg'=>htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => htmlspecialchars($folder->getName()))), ENT_QUOTES), 'title'=>getMLText("delete"), 'label'=>getMLText("delete"), 'label'=>getMLText("delete"), 'icon'=>'remove']; + } /* }}} */ + function printDeleteFolderButtonJs(){ /* {{{ */ echo " $(document).ready(function () { @@ -2809,6 +2850,7 @@ $(function() { } $content = ''; $content .= '
'; + $content = ['class'=>'lock-document-btn', 'rel'=>$docid, 'msg'=>getMLText($msg), 'title'=>getMLText($title), 'label'=>getMLText($title), 'data-formtoken'=>createFormKey('tooglelockdocument'), 'icon'=>$icon]; if($return) return $content; else @@ -2821,11 +2863,15 @@ $(function() { $content = ''; $objid = $object->getId(); if($object->isType('document')) { - if($accessobject->check_view_access('DocumentAccess')) - $content .= ''; + if($accessobject->check_view_access('DocumentAccess')) { +// $content .= ''; + $content = ['class'=>'access-document-btn', 'link'=>$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid, 'title'=>getMLText('edit_document_access'), 'label'=>getMLText('edit_document_access'), 'icon'=>'bolt']; + } } elseif($object->isType('folder')) { - if($accessobject->check_view_access('FolderAccess')) - $content .= ''; + if($accessobject->check_view_access('FolderAccess')) { +// $content .= ''; + $content = ['class'=>'access-folder-btn', 'link'=>$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid, 'title'=>getMLText('edit_folder_access'), 'label'=>getMLText('edit_folder_access'), 'icon'=>'bolt']; + } } if($return) return $content; @@ -3296,14 +3342,15 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $content .= $extracontent['begin_action_list']; if($accessop->check_view_access('RemoveDocument')) { if($document->getAccessMode($user, 'removeDocument') >= M_ALL) { - $actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true); + $actions['remove_document'] = $this->getDeleteDocumentButton($document, 'splash_rm_document', true); } else { $actions['remove_document'] = ''; } } $docID = $document->getID(); if($document->getAccessMode($user) >= M_READWRITE) { - $actions['edit_document'] = ''; +// $actions['edit_document'] = ''; + $actions['edit_document'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID, 'title'=>getMLText("edit_document_props"), 'label'=>getMLText("edit_document_props"), 'icon'=>'edit']; } else { $actions['edit_document'] = ''; } @@ -3314,13 +3361,18 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $actions['document_access'] = $this->printAccessButton($document, true); } if($enableClipboard) { - if($session->isOnClipboard($document)) - $actions['remove_from_clipboard'] = ''; - else - $actions['add_to_clipboard'] = ''; + if($session->isOnClipboard($document)) { +// $actions['remove_from_clipboard'] = ''; + $actions['remove_from_clipboard'] = ['class'=>'removefromclipboard', 'rel'=>'D'.$docID, 'msg'=>getMLText('splash_removed_from_clipboard'), 'title'=>getMLText("remove_from_clipboard"), 'label'=>getMLText("remove_from_clipboard"), 'icon'=>'clipboard']; + } else { +// $actions['add_to_clipboard'] = ''; + $actions['add_to_clipboard'] = ['class'=>'addtoclipboard', 'rel'=>'D'.$docID, 'msg'=>getMLText('splash_added_to_clipboard'), 'title'=>getMLText("add_to_clipboard"), 'label'=>getMLText("add_to_clipboard"), 'icon'=>'clipboard']; + } + } + if($onepage) { +// $actions['view_document'] = ''; + $actions['view_document'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID, 'title'=>getMLText("view_document"), 'label'=>getMLText("view_document"), 'icon'=>'eye']; } - if($onepage) - $actions['view_document'] = ''; /* Do not use $this->callHook() because $menuitems must be returned by the the * first hook and passed to next hook. $this->callHook() will just pass @@ -3333,13 +3385,61 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } } - foreach($actions as $action) { - if(is_string($action)) - $content .= $action; + if (empty($this->params['settings']->_actiondropdown)) { + foreach($actions as $action) { + if(is_string($action)) + $content .= $action; + elseif(is_array($action)) { + $content .= ''; + } + } + } else { + $content .= $this->getButtonWithMenu(['label'=>'', 'type'=>'plain', 'menuitems'=>$actions], ['class'=>'dropdown-menu-right']); } + if(!empty($extracontent['end_action_list'])) $content .= $extracontent['end_action_list']; $content .= "
"; + + if (0) { + $content .= ''; + } return $content; } /* }}} */ @@ -3505,6 +3605,120 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) return "\n"; } /* }}} */ + function folderListRowAction($subFolder, $skipcont=false, $extracontent=array()) { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $session = $this->params['session']; +// $folder = $this->params['folder']; + $showtree = $this->params['showtree']; + $enableRecursiveCount = $this->params['enableRecursiveCount']; + $maxRecursiveCount = $this->params['maxRecursiveCount']; + $enableClipboard = $this->params['enableclipboard']; + $accessop = $this->params['accessobject']; + $onepage = $this->params['onepage']; + + $content = ''; + $content .= "
"; + $actions = array(); + if(!empty($extracontent['begin_action_list'])) + $content .= $extracontent['begin_action_list']; + $subFolderAccessMode = $subFolder->getAccessMode($user); + if ($accessop->check_view_access('RemoveFolder')) { + if($subFolderAccessMode >= M_ALL) { + $actions['remove_folder'] = $this->getDeleteFolderButton($subFolder, 'splash_rm_folder', true); + } else { + $actions['remove_folder'] = ''; + } + } + if($subFolderAccessMode >= M_READWRITE) { +// $actions['edit_folder'] = ''; + $actions['edit_folder'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID(), 'title'=>getMLText('edit_folder_props'), 'label'=>getMLText('edit_folder_props'), 'icon'=>'edit']; + } else { + $actions['edit_folder'] = ''; + } + if($subFolderAccessMode >= M_READWRITE) { + $actions['folder_access'] = $this->printAccessButton($subFolder, true); + } + if($enableClipboard) { + if($session->isOnClipboard($subFolder)) +// $actions['add_to_clipboard'] = ''; + $actions['add_to_clipboard'] = ['class'=>'removefromclipboard', 'title'=>getMLText('remove_from_clipboard'), 'label'=>getMLText('remove_from_clipboard'), 'rel'=>'F'.$subFolder->getID(), 'msg'=>getMLText('splash_removed_from_clipboard'), 'icon'=>'clipboard']; + else +// $actions['add_to_clipboard'] = ''; + $actions['add_to_clipboard'] = ['class'=>'addtoclipboard', 'title'=>getMLText('add_to_clipboard'), 'label'=>getMLText('add_to_clipboard'), 'rel'=>'F'.$subFolder->getID(), 'msg'=>getMLText('splash_added_to_clipboard'), 'icon'=>'clipboard']; + } + if($onepage) + $actions['view_folder'] = ['link'=>$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID(), 'title'=>getMLText("view_folder"), 'label'=>getMLText("view_folder"), 'icon'=>'eye']; + + /* Do not use $this->callHook() because $menuitems must be returned by the the + * first hook and passed to next hook. $this->callHook() will just pass + * the menuitems to each single hook. Hence, the last hook will win. + */ + $hookObjs = $this->getHookObjects(); + foreach($hookObjs as $hookObj) { + if (method_exists($hookObj, 'folderRowAction')) { + $actions = $hookObj->folderRowAction($this, $subFolder, $actions); + } + } + + if (empty($this->params['settings']->_actiondropdown)) { + foreach($actions as $action) { + if(is_string($action)) + $content .= $action; + elseif(is_array($action)) { + $content .= ''; + } + } + } else { + $content .= $this->getButtonWithMenu(['label'=>'', 'type'=>'plain', 'menuitems'=>$actions], ['class'=>'dropdown-menu-right']); + } + + if(!empty($extracontent['end_action_list'])) + $content .= $extracontent['end_action_list']; + $content .= "
"; + + if (0) { + $content .= '"; + } + return $content; + } /* }}} */ + function folderListRowStatus($subFolder) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -3552,70 +3766,6 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) return $content; } /* }}} */ - function folderListRowAction($subFolder, $skipcont=false, $extracontent=array()) { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $session = $this->params['session']; -// $folder = $this->params['folder']; - $showtree = $this->params['showtree']; - $enableRecursiveCount = $this->params['enableRecursiveCount']; - $maxRecursiveCount = $this->params['maxRecursiveCount']; - $enableClipboard = $this->params['enableclipboard']; - $accessop = $this->params['accessobject']; - $onepage = $this->params['onepage']; - - $content = ''; - $content .= "
"; - $actions = array(); - if(!empty($extracontent['begin_action_list'])) - $content .= $extracontent['begin_action_list']; - $subFolderAccessMode = $subFolder->getAccessMode($user); - if ($accessop->check_view_access('RemoveFolder')) { - if($subFolderAccessMode >= M_ALL) { - $actions['remove_folder'] = $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true); - } else { - $actions['remove_folder'] = ''; - } - } - if($subFolderAccessMode >= M_READWRITE) { - $actions['edit_folder'] = ''; - } else { - $content .= ''; - } - if($subFolderAccessMode >= M_READWRITE) { - $actions['folder_access'] = $this->printAccessButton($subFolder, true); - } - if($enableClipboard) { - if($session->isOnClipboard($subFolder)) - $actions['add_to_clipboard'] = ''; - else - $actions['add_to_clipboard'] = ''; - } - if($onepage) - $actions['view_folder'] = ''; - - /* Do not use $this->callHook() because $menuitems must be returned by the the - * first hook and passed to next hook. $this->callHook() will just pass - * the menuitems to each single hook. Hence, the last hook will win. - */ - $hookObjs = $this->getHookObjects(); - foreach($hookObjs as $hookObj) { - if (method_exists($hookObj, 'folderRowAction')) { - $actions = $hookObj->folderRowAction($this, $subFolder, $actions); - } - } - - foreach($actions as $action) { - if(is_string($action)) - $content .= $action; - } - - if(!empty($extracontent['end_action_list'])) - $content .= $extracontent['end_action_list']; - $content .= "
"; - return $content; - } /* }}} */ - function folderListRow($subFolder, $skipcont=false, $extracontent=array()) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user'];