mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add menu item for adding folder/document to clipboard
This commit is contained in:
parent
da992a7bdd
commit
37f64d0a3e
|
@ -651,6 +651,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
private function folderNavigationBar($folder) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$enableClipboard = $this->params['enableclipboard'];
|
||||
$accessobject = $this->params['accessobject'];
|
||||
if (!is_object($folder) || !$folder->isType('folder')) {
|
||||
self::showNavigationBar(array());
|
||||
|
@ -689,7 +690,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
if ($accessobject->check_view_access('FolderNotify'))
|
||||
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify'));
|
||||
}
|
||||
if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) {
|
||||
if($enableClipboard) {
|
||||
$menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'F'.$folder->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard"));
|
||||
}
|
||||
if ($accessobject->check_view_access('Indexer') && $this->params['enablefullsearch']) {
|
||||
$menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
|
||||
}
|
||||
|
||||
|
@ -711,6 +715,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
private function documentNavigationBar($document) { /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
$enableClipboard = $this->params['enableclipboard'];
|
||||
$accessMode = $document->getAccessMode($this->params['user']);
|
||||
$docid=".php?documentid=" . $document->getID();
|
||||
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.ViewDocument". $docid ."\" class=\"brand\">".getMLText("document")."</a>\n";
|
||||
|
@ -754,6 +759,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
if ($accessobject->check_view_access('DocumentNotify'))
|
||||
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify'));
|
||||
}
|
||||
if($enableClipboard) {
|
||||
$menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'D'.$document->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard"));
|
||||
}
|
||||
if ($accessobject->check_view_access('TransferDocument')) {
|
||||
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style {
|
|||
*/
|
||||
public function menuClipboard() { /* {{{ */
|
||||
$clipboard = $this->params['session']->getClipboard();
|
||||
if ($this->params['user']->isGuest() || (count($clipboard['docs']) + count($clipboard['folders'])) == 0) {
|
||||
if (/*$this->params['user']->isGuest() ||*/ (count($clipboard['docs']) + count($clipboard['folders'])) == 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -656,6 +656,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
private function folderNavigationBar($folder) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$enableClipboard = $this->params['enableclipboard'];
|
||||
$accessobject = $this->params['accessobject'];
|
||||
if (!is_object($folder) || !$folder->isType('folder')) {
|
||||
self::showNavigationBar(array());
|
||||
|
@ -692,6 +693,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
if ($accessobject->check_view_access('FolderNotify'))
|
||||
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify'));
|
||||
}
|
||||
if($enableClipboard) {
|
||||
$menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'F'.$folder->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard"));
|
||||
}
|
||||
if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) {
|
||||
$menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
|
||||
}
|
||||
|
@ -712,6 +716,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
private function documentNavigationBar($document) { /* {{{ */
|
||||
$accessobject = $this->params['accessobject'];
|
||||
$enableClipboard = $this->params['enableclipboard'];
|
||||
$accessMode = $document->getAccessMode($this->params['user']);
|
||||
$docid=".php?documentid=" . $document->getID();
|
||||
$menuitems = array();
|
||||
|
@ -753,6 +758,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
if ($accessobject->check_view_access('DocumentNotify'))
|
||||
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify'));
|
||||
}
|
||||
if($enableClipboard) {
|
||||
$menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'D'.$document->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard"));
|
||||
}
|
||||
if ($accessobject->check_view_access('TransferDocument')) {
|
||||
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user