From 7ffced9c4b95f3ee523e9363bf5c127402388148 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 14 Mar 2016 15:28:06 +0100 Subject: [PATCH] add delete, move, clipboard buttons to document list --- views/bootstrap/class.ObjectCheck.php | 37 ++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index 73a732e3c..2f59c4e87 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -32,6 +32,7 @@ require_once("class.Bootstrap.php"); class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { function tree($dms, $folder, $repair, $path=':', $indent='') { /* {{{ */ + global $user; /* Don't do folderlist check for root folder */ if($path != ':') { @@ -124,7 +125,8 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { $filepath = $dms->contentDir . $version->getPath(); if(!file_exists($filepath)) { print "\n"; - print "getID()."\">getMimeIcon($version->getFileType())."\" title=\"".$version->getMimeType()."\">"; + print "getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">"; + print "getID()."\">getMimeIcon($version->getFileType())."\" title=\"".$version->getMimeType()."\">"; print "getID()."\">/"; $folder = $document->getFolder(); $tmppath = $folder->getPath(); @@ -141,6 +143,26 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { } else { print "\n"; } + echo ""; + echo "
"; + if($document->getAccessMode($user) >= M_ALL) { + echo $this->printDeleteDocumentButton($document, 'splash_rm_document', true); + } else { + echo ''; + } + if($document->getAccessMode($user) >= M_READWRITE) { + print ''; + } else { + print ''; + } + if($document->getAccessMode($user) >= M_READWRITE) { + print $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true); + } + if($this->enableClipboard) { + print ''; + } + echo "
"; + echo ""; print "\n"; } } @@ -163,6 +185,16 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { } } /* }}} */ + function js() { /* {{{ */ + $user = $this->params['user']; + $folder = $this->params['folder']; + + header('Content-Type: application/javascript; charset=UTF-8'); + + $this->printDeleteFolderButtonJs(); + $this->printDeleteDocumentButtonJs(); + } /* }}} */ + function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -178,6 +210,9 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { $setfilesize = $this->params['setfilesize']; $setchecksum = $this->params['setchecksum']; $rootfolder = $this->params['rootfolder']; + $this->enableClipboard = $this->params['enableclipboard']; + + $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation();