mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +00:00
run hook folderNavigationMenu
This commit is contained in:
parent
a6d8ed829f
commit
8ed3264ae6
|
@ -498,30 +498,39 @@ $(document).ready(function () {
|
|||
echo "<id=\"first\"><a href=\"../out/out.ViewFolder.php?folderid=". $folderID ."&showtree=".showtree()."\" class=\"brand\">".getMLText("folder")."</a>\n";
|
||||
echo "<div class=\"nav-collapse col2\">\n";
|
||||
echo "<ul class=\"nav\">\n";
|
||||
$menuitems = array();
|
||||
|
||||
if ($accessMode == M_READ && !$this->params['user']->isGuest()) {
|
||||
echo "<li id=\"first\"><a href=\"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("edit_folder_notify")."</a></li>\n";
|
||||
$menuitems['edit_folder_notify'] = array('link'=>"../out/out.FolderNotify".$folderID."&showtree=".showtree(), 'label'=>'edit_folder_notify');
|
||||
}
|
||||
else if ($accessMode >= M_READWRITE) {
|
||||
echo "<li id=\"first\"><a href=\"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("add_subfolder")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("add_document")."</a></li>\n";
|
||||
$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');
|
||||
if($this->params['enablelargefileupload'])
|
||||
echo "<li><a href=\"../out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("add_multiple_documents")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.EditFolder.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("edit_folder_props")."</a></li>\n";
|
||||
$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');
|
||||
if ($folderID != $this->params['rootfolderid'] && $folder->getParent())
|
||||
echo "<li><a href=\"../out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("move_folder")."</a></li>\n";
|
||||
$menuitems['move_folder'] = array('link'=>"../out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'move_folder');
|
||||
|
||||
if ($accessMode == M_ALL) {
|
||||
if ($folderID != $this->params['rootfolderid'] && $folder->getParent())
|
||||
echo "<li><a href=\"../out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("rm_folder")."</a></li>\n";
|
||||
$menuitems['rm_folder'] = array('link'=>"../out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'rm_folder');
|
||||
}
|
||||
if ($accessMode == M_ALL) {
|
||||
echo "<li><a href=\"../out/out.FolderAccess.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("edit_folder_access")."</a></li>\n";
|
||||
$menuitems['edit_folder_access'] = array('link'=>"../out/out.FolderAccess.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>'edit_folder_access');
|
||||
}
|
||||
echo "<li><a href=\"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("edit_existing_notify")."</a></li>\n";
|
||||
$menuitems['edit_existing_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>'edit_existing_notify');
|
||||
}
|
||||
if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) {
|
||||
echo "<li><a href=\"../out/out.Indexer.php?folderid=". $folderID ."\">".getMLText("index_folder")."</a></li>\n";
|
||||
$menuitems['index_folder'] = array('link'=>"../out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>'index_folder');
|
||||
}
|
||||
|
||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
||||
if($this->hasHook('folderNavigationBar'))
|
||||
$menuitems = $this->callHook('folderNavigationBar', $folder, $menuitems);
|
||||
|
||||
foreach($menuitems as $menuitem) {
|
||||
echo "<li><a href=\"".$menuitem['link']."\">".getMLText($menuitem['label'])."</a></li>";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
echo "</div>\n";
|
||||
|
|
Loading…
Reference in New Issue
Block a user