mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-02-02 06:31:56 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
cac6a27a4c
|
|
@ -363,6 +363,8 @@
|
|||
--------------------------------------------------------------------------------
|
||||
- fix rest api endpoint PUT /folder/{id}/comment
|
||||
- show document preview when editing attributes of a document
|
||||
- fix utilities which require translations
|
||||
- fix potential XSS attack when deleting a folder/document
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.44
|
||||
|
|
|
|||
|
|
@ -85,13 +85,14 @@ class SeedDMS_Controller_ExtensionMgr extends SeedDMS_Controller_Common {
|
|||
$extmgr = $this->params['extmgr'];
|
||||
$extname = $this->params['extname'];
|
||||
|
||||
if($settings->extensionIsDisabled($extname))
|
||||
if ($settings->extensionIsDisabled($extname)) {
|
||||
$settings->enableExtension($extname);
|
||||
else
|
||||
} else {
|
||||
$settings->disableExtension($extname);
|
||||
$settings->save();
|
||||
}
|
||||
$ret = $settings->save();
|
||||
|
||||
return true;
|
||||
return $ret;
|
||||
} /* }}} */
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ extracting text, creating an image, and converting to pdf.
|
|||
|
||||
Unless you run a very old version of SeedDMS, you will never need
|
||||
this command for converting text files. SeedDMS has this trivial
|
||||
converter build in.
|
||||
converter built in.
|
||||
|
||||
### application/pdf
|
||||
|
||||
|
|
@ -63,7 +63,9 @@ If pdftotext takes too long on large document, then you may want to
|
|||
pass parameter `-l` to specify the last page to be converted. `-q` is
|
||||
for suppressing error/warnings send to stderr
|
||||
|
||||
`mutool draw -F txt -q -N -o - %s`
|
||||
`mutool draw -F txt -q -N -o - '%s'`
|
||||
|
||||
`mutool convert -F text -o - '%s'`
|
||||
|
||||
### application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
|
||||
|
|
@ -161,6 +163,10 @@ Converting from application/x-xopp to pdf only works if the xopp file
|
|||
does not use a pdf document as a background, because this pdf is not
|
||||
stored in the xopp fіle.
|
||||
|
||||
### application/epub+zip
|
||||
|
||||
`mutool convert -F pdf -o "%o" "%f"`
|
||||
|
||||
### Many office formats
|
||||
|
||||
As already mentioned above, `unoconv` has some disadvantages. It is
|
||||
|
|
@ -210,6 +216,10 @@ needed if the output goes to stdout.
|
|||
`pdftocairo` needs to output to stdout because the output file name passed
|
||||
to pdftocairo will be suffixed with `.png`
|
||||
|
||||
### application/epub+zip
|
||||
|
||||
`mutool draw -F png -w %w -q -N -o '%o' '%f' 1`
|
||||
|
||||
### application/postscript
|
||||
|
||||
`convert -density 100 -resize %wx '%f[0]' 'png:%o'`
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
namespace Seeddms\Seeddms;
|
||||
|
||||
use PDO;
|
||||
use SeedDMS_Core_File;
|
||||
use SeedDMS_Core_DMS;
|
||||
use SeedDMS_Core_DatabaseAccess;
|
||||
|
|
@ -384,6 +385,8 @@ class Settings { /* {{{ */
|
|||
var $_incItemsPerPage = 0;
|
||||
// parse comments of folders and documents as markdown
|
||||
var $_markdownComments = false;
|
||||
// show dropdown menu for actions on folders/documents
|
||||
var $_actiondropdown = false;
|
||||
// Show form to submit missing translations at end of page
|
||||
var $_showMissingTranslations = false;
|
||||
// Extra Path to additional software, will be added to include path
|
||||
|
|
@ -615,6 +618,7 @@ class Settings { /* {{{ */
|
|||
if(isset($tab["incItemsPerPage"]))
|
||||
$this->_incItemsPerPage = intval($tab["incItemsPerPage"]);
|
||||
$this->_markdownComments = Settings::boolVal($tab["markdownComments"]);
|
||||
$this->_actiondropdown = Settings::boolVal($tab["actiondropdown"]);
|
||||
|
||||
// XML Path: /configuration/site/edition
|
||||
$node = $xml->xpath('/configuration/site/edition');
|
||||
|
|
@ -958,7 +962,7 @@ class Settings { /* {{{ */
|
|||
$disabled = strval($tmp['disable']);
|
||||
else
|
||||
$disabled = 0;
|
||||
$this->_extensions[$extname]['__disable__'] = $disabled=='1' || $disabled == 'true' ? true : false;
|
||||
$this->_extensions[$extname]['__disable__'] = ($disabled=='1' || $disabled == 'true') ? true : false;
|
||||
foreach($extension->children() as $parameter) {
|
||||
$tmp2 = $parameter->attributes();
|
||||
/* Do not read a parameter with the same name. Just a pre caution */
|
||||
|
|
@ -1059,6 +1063,7 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "maxItemsPerPage", $this->_maxItemsPerPage);
|
||||
$this->setXMLAttributValue($node, "incItemsPerPage", $this->_incItemsPerPage);
|
||||
$this->setXMLAttributValue($node, "markdownComments", $this->_markdownComments);
|
||||
$this->setXMLAttributValue($node, "actiondropdown", $this->_actiondropdown);
|
||||
|
||||
// XML Path: /configuration/site/edition
|
||||
$node = $this->getXMLNode($xml, '/configuration/site', 'edition');
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ if ($action == "saveSettings")
|
|||
setIntValue('maxItemsPerPage');
|
||||
setIntValue('incItemsPerPage');
|
||||
setBoolValue('markdownComments');
|
||||
setBoolValue('actiondropdown');
|
||||
|
||||
// SETTINGS - SITE - EDITION
|
||||
setBoolValue('strictFormCheck');
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ include($myincpath."/inc/inc.Language.php");
|
|||
include($myincpath."/inc/inc.Init.php");
|
||||
include($myincpath."/inc/inc.Extension.php");
|
||||
include($myincpath."/inc/inc.DBInit.php");
|
||||
include($myincpath."/inc/inc.ClassNotificationService.php");
|
||||
include($myincpath."/inc/inc.Notification.php");
|
||||
include($myincpath."/inc/inc.ClassController.php");
|
||||
|
||||
|
|
|
|||
|
|
@ -731,41 +731,68 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo $content;
|
||||
} /* }}} */
|
||||
|
||||
protected function showButtonwithMenu($button, $options=array()) { /* {{{ */
|
||||
protected function getMenu($menuitems=[], $options=[]) { /* {{{ */
|
||||
$content = '';
|
||||
$content .= '
|
||||
<ul class="dropdown-menu'.(!empty($options['class']) ? ' '.$options['class'] : '').'" role="menu"'.(!empty($options['id']) ? ' id="'.$options['id'].'"' : '').'>
|
||||
';
|
||||
foreach($menuitems as $menuitem) {
|
||||
if(is_array($menuitem)) {
|
||||
$content .= '
|
||||
<li><a ';
|
||||
if(!empty($menuitem['link']))
|
||||
$content .= 'href="'.$menuitem['link'].'" ';
|
||||
$content .= 'class="dropdown-item';
|
||||
if (!empty($menuitem['class']))
|
||||
$content .= ' '.$menuitem['class'];
|
||||
$content .= '" ';
|
||||
if (!empty($menuitem['msg']))
|
||||
$content .= 'msg="'.$menuitem['msg'].'" ';
|
||||
if (!empty($menuitem['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$menuitem['confirmmsg'].'" ';
|
||||
if (!empty($menuitem['rel']))
|
||||
$content .= 'rel="'.$menuitem['rel'].'" ';
|
||||
if(!empty($menuitem['onclick']))
|
||||
$content .= ' onclick="'.$menuitem['onclick'].'" ';
|
||||
if (!empty($menuitem['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$menuitem['data-formtoken'].'" ';
|
||||
$content .= '>';
|
||||
if (!empty($menuitem['icon']))
|
||||
$content .= '<i class="fa fa-'.$menuitem['icon'].'"></i> ';
|
||||
$content .= $menuitem['label'].'</a><li>
|
||||
';
|
||||
} else {
|
||||
// $content .= $menuitem;
|
||||
}
|
||||
}
|
||||
$content .= '
|
||||
</ul>
|
||||
';
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
protected function getButtonWithMenu($button, $options=array()) { /* {{{ */
|
||||
$content = '';
|
||||
if ($button['menuitems']) {
|
||||
$content .= '
|
||||
<div class="btn-group">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
'.$button['label'].'
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
';
|
||||
if($button['menuitems']) {
|
||||
$content .= '
|
||||
<ul class="dropdown-menu">
|
||||
';
|
||||
foreach($button['menuitems'] as $menuitem) {
|
||||
if(is_array($menuitem)) {
|
||||
$content .= '
|
||||
<li><a';
|
||||
if(!empty($menuitem['link']))
|
||||
$content .= ' href="'.$menuitem['link'].'"';
|
||||
if(!empty($menuitem['onclick']))
|
||||
$content .= ' onclick="'.$menuitem['onclick'].'"';
|
||||
$content .= '>'.$menuitem['label'].'</a><li>
|
||||
';
|
||||
} else {
|
||||
$content .= $menuitem;
|
||||
}
|
||||
if($button['menuitems']) {
|
||||
$content .= $this->getMenu($button['menuitems'], $options);
|
||||
}
|
||||
$content .= '
|
||||
</ul>
|
||||
';
|
||||
}
|
||||
$content .= '
|
||||
</div>
|
||||
';
|
||||
echo $content;
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
protected function showButtonWithMenu($button, $options=array()) { /* {{{ */
|
||||
echo $this->getButtonWithMenu($button, $options);
|
||||
} /* }}} */
|
||||
|
||||
protected function showPaneHeader($name, $title, $isactive) { /* {{{ */
|
||||
|
|
@ -1183,7 +1210,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
function pageList($pageNumber, $totalPages, $baseURI, $params, $dataparams=[]) { /* {{{ */
|
||||
|
||||
$maxpages = 25; // skip pages when more than this is shown
|
||||
$range = 5; // pages left and right of current page
|
||||
$range = 3; // pages left and right of current page
|
||||
if (!is_numeric($pageNumber) || !is_numeric($totalPages) || $totalPages<2) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1437,7 +1464,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
default:
|
||||
$class = 'btn-primary';
|
||||
}
|
||||
echo "<div class=\"controls\">\n";
|
||||
echo "<div class=\"_controls\">\n";
|
||||
if(is_string($value)) {
|
||||
echo "<button type=\"submit\" class=\"btn ".$class."\"".($name ? ' name="'.$name.'" id="'.$name.'"' : '').($target ? ' formtarget="'.$target.'"' : '').">".$value."</button>\n";
|
||||
} else {
|
||||
|
|
@ -1593,8 +1620,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'])) {
|
||||
|
|
@ -2531,7 +2559,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));
|
||||
|
|
@ -2757,7 +2784,7 @@ $(function() {
|
|||
function printDeleteDocumentButton($document, $msg, $return=false){ /* {{{ */
|
||||
$docid = $document->getID();
|
||||
$content = '';
|
||||
$content .= '<a class="delete-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => $document->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
|
||||
$content .= '<a 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").'"><i class="fa fa-remove"></i></a>';
|
||||
if($return)
|
||||
return $content;
|
||||
else
|
||||
|
|
@ -2765,6 +2792,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 () {
|
||||
|
|
@ -2831,7 +2863,7 @@ $(function() {
|
|||
function printDeleteFolderButton($folder, $msg, $return=false){ /* {{{ */
|
||||
$folderid = $folder->getID();
|
||||
$content = '';
|
||||
$content .= '<a class="delete-folder-btn" rel="'.$folderid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => $folder->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
|
||||
$content .= '<a 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").'"><i class="fa fa-remove"></i></a>';
|
||||
if($return)
|
||||
return $content;
|
||||
else
|
||||
|
|
@ -2839,6 +2871,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 () {
|
||||
|
|
@ -2909,6 +2946,7 @@ $(function() {
|
|||
}
|
||||
$content = '';
|
||||
$content .= '<a class="lock-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" title="'.getMLText($title).'" data-formtoken="'.createFormKey('tooglelockdocument').'"><i class="fa fa-'.$icon.'"></i></a>';
|
||||
$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
|
||||
|
|
@ -2921,11 +2959,15 @@ $(function() {
|
|||
$content = '';
|
||||
$objid = $object->getId();
|
||||
if($object->isType('document')) {
|
||||
if($accessobject->check_view_access('DocumentAccess'))
|
||||
$content .= '<a class="access-document-btn" href="'.$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
if($accessobject->check_view_access('DocumentAccess')) {
|
||||
// $content .= '<a class="access-document-btn" href="'.$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
$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 .= '<a class="access-folder-btn" href="'.$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
if($accessobject->check_view_access('FolderAccess')) {
|
||||
// $content .= '<a class="access-folder-btn" href="'.$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
$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;
|
||||
|
|
@ -3427,14 +3469,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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
}
|
||||
}
|
||||
$docID = $document->getID();
|
||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||
$actions['edit_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
|
||||
// $actions['edit_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
|
||||
$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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
||||
}
|
||||
|
|
@ -3445,13 +3488,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'] = '<a class="removefromclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
else
|
||||
$actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
if($session->isOnClipboard($document)) {
|
||||
// $actions['remove_from_clipboard'] = '<a class="removefromclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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'] = '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
|
||||
$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'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
|
||||
|
||||
/* 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
|
||||
|
|
@ -3464,14 +3512,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 .= '<a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
if (!empty($action['title']))
|
||||
$content .= 'title="'.$action['title'].'" ';
|
||||
if (!empty($action['class']))
|
||||
$content .= 'class="'.$action['class'].'" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i></a>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$content .= $this->getButtonWithMenu(['label'=>'<i class="fa fa-navicon"></i>', 'menuitems'=>$actions], ['class'=>'pull-right']);
|
||||
}
|
||||
|
||||
if(!empty($extracontent['end_action_list']))
|
||||
$content .= $extracontent['end_action_list'];
|
||||
$content .= "</div>";
|
||||
|
||||
if (0) {
|
||||
$content .= '<ul class="dropdown-menu contextmenu" role="menu" id="contextmenu-d'.$docID.'" style="display: none; position: absolute;">';
|
||||
foreach($actions as $action) {
|
||||
if(is_array($action)) {
|
||||
$content .= '<li><a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
$content .= 'class="dropdown-item';
|
||||
if (!empty($action['class']))
|
||||
$content .= ' '.$action['class'];
|
||||
$content .= '" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i> '.$action['title'].'</a></li>';
|
||||
}
|
||||
}
|
||||
$content .= '</ul>';
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
|
|
@ -3480,7 +3575,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.
|
||||
*/
|
||||
|
|
@ -3652,7 +3747,7 @@ $('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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
}
|
||||
|
|
@ -3660,6 +3755,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if ($accessop->check_view_access('EditFolder')) {
|
||||
if($subFolderAccessMode >= M_READWRITE) {
|
||||
$actions['edit_folder'] = '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
|
||||
$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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
||||
}
|
||||
|
|
@ -3669,12 +3765,14 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
}
|
||||
if($enableClipboard) {
|
||||
if($session->isOnClipboard($subFolder))
|
||||
$actions['add_to_clipboard'] = '<a class="removefromclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
// $actions['add_to_clipboard'] = '<a class="removefromclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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'] = '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
// $actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
|
||||
$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
|
||||
|
|
@ -3687,14 +3785,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 .= '<a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
if (!empty($action['title']))
|
||||
$content .= 'title="'.$action['title'].'" ';
|
||||
if (!empty($action['class']))
|
||||
$content .= 'class="'.$action['class'].'" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i></a>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$content .= $this->getButtonWithMenu(['label'=>'<i class="fa fa-navicon"></i>', 'menuitems'=>$actions], ['class'=>'pull-right']);
|
||||
}
|
||||
|
||||
if(!empty($extracontent['end_action_list']))
|
||||
$content .= $extracontent['end_action_list'];
|
||||
$content .= "</div>";
|
||||
|
||||
if (0) {
|
||||
$content .= '<ul class="dropdown-menu contextmenu" role="menu" id="contextmenu-f'.$subFolder->getId().'" style="display: none; position: absolute;">';
|
||||
foreach($actions as $action) {
|
||||
if(is_array($action)) {
|
||||
$content .= '<li><a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
$content .= 'class="dropdown-item';
|
||||
if (!empty($action['class']))
|
||||
$content .= ' '.$action['class'];
|
||||
$content .= '" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i> '.$action['title'].'</a></li>';
|
||||
}
|
||||
}
|
||||
$content .= "</ul>";
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ $(document).ready( function() {
|
|||
|
||||
function showCategoryForm($category) { /* {{{ */
|
||||
?>
|
||||
<form class="form-horizontal" style="margin-bottom: 0px;" action="../op/op.Categories.php" method="post">
|
||||
<form class="form-horizontal" action="../op/op.Categories.php" method="post">
|
||||
<?php if(!$category) { ?>
|
||||
<?php echo createHiddenFieldWithKey('addcategory'); ?>
|
||||
<input type="hidden" name="action" value="addcategory">
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
$httproot = $this->params['httproot'];
|
||||
$extmgr = $this->params['extmgr'];
|
||||
$extdir = $this->params['extdir'];
|
||||
$extconf = $extmgr->getExtensionConfiguration();
|
||||
$extconfall = $extmgr->getExtensionConfiguration();
|
||||
|
||||
echo "<table id=\"extensionlist\" class=\"table\">\n";
|
||||
print "<thead>\n<tr>\n";
|
||||
|
|
@ -251,7 +251,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
print "<th>".getMLText('version')."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr></thead><tbody>\n";
|
||||
foreach($extconf as $extname=>$extconf) {
|
||||
foreach($extconfall as $extname=>$extconf) {
|
||||
$check = $extmgr->checkExtensionByDir($extname);
|
||||
$class = "";
|
||||
if(!$settings->extensionIsDisabled($extname)) {
|
||||
|
|
|
|||
|
|
@ -653,6 +653,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
<?php $this->showConfigText('settings_maxItemsPerPage', 'maxItemsPerPage'); ?>
|
||||
<?php $this->showConfigText('settings_incItemsPerPage', 'incItemsPerPage'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_markdownComments', 'markdownComments'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_actiondropdown', 'actiondropdown'); ?>
|
||||
|
||||
<!--
|
||||
-- SETTINGS - SITE - EDITION
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ $(document).ready( function() {
|
|||
'name'=>'pwd',
|
||||
'class'=>'pwd',
|
||||
'autocomplete'=>'off',
|
||||
'required'=>true,
|
||||
'required'=>false,
|
||||
'attributes'=>[['rel', 'strengthbar'.($currUser ? $currUser->getID() : "0")]],
|
||||
'addon'=>'<i class="fa fa-eye-slash"></i>'
|
||||
)
|
||||
|
|
|
|||
|
|
@ -133,6 +133,33 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Theme_Style {
|
|||
header('Content-Type: application/javascript; charset=UTF-8');
|
||||
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder', 'must_drop_one_file','confirm_upload_new_version', 'upload_new_version'));
|
||||
?>
|
||||
/*
|
||||
$('body').on('contextmenu', 'tr.table-row-folder', function(ev) {
|
||||
ev.preventDefault();
|
||||
$('.contextmenu').hide();
|
||||
id = $(ev.currentTarget).attr('rel').split("_")[1],
|
||||
cl = $(this).closest('div.ajax').parent();
|
||||
$('#contextmenu-f'+id).css({
|
||||
'display': 'block',
|
||||
'left': (ev.pageX - cl.offset().left) + 'px', // Position horizontally
|
||||
'top': (ev.pageY - cl.offset().top) + 'px' // Position vertically
|
||||
});
|
||||
});
|
||||
$('body').on('contextmenu', 'tr.table-row-document', function(ev) {
|
||||
ev.preventDefault();
|
||||
$('.contextmenu').hide();
|
||||
id = $(ev.currentTarget).attr('rel').split("_")[1],
|
||||
cl = $(this).closest('div.ajax').parent();
|
||||
$('#contextmenu-d'+id).css({
|
||||
'display': 'block',
|
||||
'left': (ev.pageX - cl.offset().left) + 'px', // Position horizontally
|
||||
'top': (ev.pageY - cl.offset().top) + 'px' // Position vertically
|
||||
});
|
||||
});
|
||||
$(document).on('click', function() {
|
||||
$('.contextmenu').hide();
|
||||
});
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$('#searchfield').focus();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ span.list-details {
|
|||
color: #666;
|
||||
}
|
||||
|
||||
.list-action a {
|
||||
.list-action > a {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
padding: 2px;
|
||||
|
|
|
|||
|
|
@ -527,6 +527,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
else {
|
||||
$txtpath .= ($tagAll ? "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" data-name=\"".htmlspecialchars($path[$i]->getName())."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".htmlspecialchars($path[$i]->getName())."</a>" : htmlspecialchars($path[$i]->getName()));
|
||||
}
|
||||
$txtpath .= "</li>";
|
||||
}
|
||||
if($document)
|
||||
$txtpath .= "<li class=\"breadcrumb-item active table-row-document\" aria-current=\"page\"><a href=\"".$this->params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getId()."\" class=\"table-document-row\" rel=\"document_".$document->getId()."\" data-name=\"".htmlspecialchars($document->getName())."\" formtoken=\"".createFormKey('')."\">".htmlspecialchars($document->getName())."</a></li>";
|
||||
|
|
@ -664,41 +665,71 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo $content;
|
||||
} /* }}} */
|
||||
|
||||
protected function showButtonwithMenu($button, $options=array()) { /* {{{ */
|
||||
protected function getMenu($menuitems=[], $options=[]) { /* {{{ */
|
||||
$content = '';
|
||||
$content .= '
|
||||
<div class="btn-group" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
'.$button['label'].'
|
||||
</button>
|
||||
<div class="dropdown-menu'.(!empty($options['class']) ? ' '.$options['class'] : '').'" role="menu"'.(!empty($options['id']) ? ' id="'.$options['id'].'"' : '').'>
|
||||
';
|
||||
if($button['menuitems']) {
|
||||
$content .= '
|
||||
<div class="dropdown-menu">
|
||||
foreach($menuitems as $menuitem) {
|
||||
if(is_array($menuitem)) {
|
||||
$content .= '
|
||||
<a ';
|
||||
if(!empty($menuitem['link']))
|
||||
$content .= 'href="'.$menuitem['link'].'" ';
|
||||
$content .= 'class="dropdown-item';
|
||||
if (!empty($menuitem['class']))
|
||||
$content .= ' '.$menuitem['class'];
|
||||
$content .= '" ';
|
||||
if (!empty($menuitem['msg']))
|
||||
$content .= 'msg="'.$menuitem['msg'].'" ';
|
||||
if (!empty($menuitem['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$menuitem['confirmmsg'].'" ';
|
||||
if (!empty($menuitem['rel']))
|
||||
$content .= 'rel="'.$menuitem['rel'].'" ';
|
||||
if(!empty($menuitem['onclick']))
|
||||
$content .= ' onclick="'.$menuitem['onclick'].'"';
|
||||
if (!empty($menuitem['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$menuitem['data-formtoken'].'" ';
|
||||
$content .= '>';
|
||||
if (!empty($menuitem['icon']))
|
||||
$content .= '<i class="fa fa-'.$menuitem['icon'].'"></i> ';
|
||||
$content .= $menuitem['label'].'</a>
|
||||
';
|
||||
foreach($button['menuitems'] as $menuitem) {
|
||||
if(is_array($menuitem)) {
|
||||
$content .= '
|
||||
<a class="dropdown-item"';
|
||||
if(!empty($menuitem['link']))
|
||||
$content .= ' href="'.$menuitem['link'].'"';
|
||||
if(!empty($menuitem['onclick']))
|
||||
$content .= ' onclick="'.$menuitem['onclick'].'"';
|
||||
$content .= '>'.$menuitem['label'].'</a>
|
||||
';
|
||||
} else {
|
||||
$content .= $menuitem;
|
||||
}
|
||||
} else {
|
||||
// $content .= $menuitem;
|
||||
}
|
||||
$content .= '
|
||||
</div>
|
||||
';
|
||||
}
|
||||
$content .= '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
echo $content;
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
protected function getButtonWithMenu($button, $options=array()) { /* {{{ */
|
||||
$content = '';
|
||||
if ($button['menuitems']) {
|
||||
$content .= '
|
||||
<div class="btn-group" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<span type="button" class="'.(!empty($button['type']) ? '' : 'btn btn-secondary').' dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
'.$button['label'].'
|
||||
</span>
|
||||
';
|
||||
if($button['menuitems']) {
|
||||
$content .= $this->getMenu($button['menuitems'], $options);
|
||||
}
|
||||
$content .= '
|
||||
</div>
|
||||
';
|
||||
$content .= '
|
||||
</div>
|
||||
';
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
protected function showButtonWithMenu($button, $options=array()) { /* {{{ */
|
||||
echo $this->getButtonWithMenu($button, $options);
|
||||
} /* }}} */
|
||||
|
||||
protected function showPaneHeader($name, $title, $isactive) { /* {{{ */
|
||||
|
|
@ -1095,7 +1126,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
function pageList($pageNumber, $totalPages, $baseURI, $params, $dataparams=[]) { /* {{{ */
|
||||
|
||||
$maxpages = 25; // skip pages when more than this is shown
|
||||
$range = 2; // pages left and right of current page
|
||||
$range = 3; // pages left and right of current page
|
||||
if (!is_numeric($pageNumber) || !is_numeric($totalPages) || $totalPages<2) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1288,6 +1319,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']))
|
||||
|
|
@ -2707,7 +2739,7 @@ $(function() {
|
|||
function printDeleteDocumentButton($document, $msg, $return=false){ /* {{{ */
|
||||
$docid = $document->getID();
|
||||
$content = '';
|
||||
$content .= '<a class="delete-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => $document->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
|
||||
$content .= '<a 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").'"><i class="fa fa-remove"></i></a>';
|
||||
if($return)
|
||||
return $content;
|
||||
else
|
||||
|
|
@ -2715,6 +2747,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 () {
|
||||
|
|
@ -2787,7 +2824,7 @@ $(function() {
|
|||
function printDeleteFolderButton($folder, $msg, $return=false){ /* {{{ */
|
||||
$folderid = $folder->getID();
|
||||
$content = '';
|
||||
$content .= '<a class="delete-folder-btn" rel="'.$folderid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => $folder->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
|
||||
$content .= '<a 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").'"><i class="fa fa-remove"></i></a>';
|
||||
if($return)
|
||||
return $content;
|
||||
else
|
||||
|
|
@ -2795,6 +2832,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 () {
|
||||
|
|
@ -2871,6 +2913,7 @@ $(function() {
|
|||
}
|
||||
$content = '';
|
||||
$content .= '<a class="lock-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" title="'.getMLText($title).'" data-formtoken="'.createFormKey('tooglelockdocument').'"><i class="fa fa-'.$icon.'"></i></a>';
|
||||
$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
|
||||
|
|
@ -2883,11 +2926,15 @@ $(function() {
|
|||
$content = '';
|
||||
$objid = $object->getId();
|
||||
if($object->isType('document')) {
|
||||
if($accessobject->check_view_access('DocumentAccess'))
|
||||
$content .= '<a class="access-document-btn" href="'.$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
if($accessobject->check_view_access('DocumentAccess')) {
|
||||
// $content .= '<a class="access-document-btn" href="'.$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
$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 .= '<a class="access-folder-btn" href="'.$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
if($accessobject->check_view_access('FolderAccess')) {
|
||||
// $content .= '<a class="access-folder-btn" href="'.$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
|
||||
$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;
|
||||
|
|
@ -3401,14 +3448,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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
}
|
||||
}
|
||||
$docID = $document->getID();
|
||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||
$actions['edit_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
|
||||
// $actions['edit_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
|
||||
$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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
||||
}
|
||||
|
|
@ -3419,13 +3467,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'] = '<a class="removefromclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
else
|
||||
$actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
if($session->isOnClipboard($document)) {
|
||||
// $actions['remove_from_clipboard'] = '<a class="removefromclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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'] = '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
|
||||
$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'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
|
||||
|
||||
/* 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
|
||||
|
|
@ -3438,13 +3491,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 .= '<a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
if (!empty($action['title']))
|
||||
$content .= 'title="'.$action['title'].'" ';
|
||||
if (!empty($action['class']))
|
||||
$content .= 'class="'.$action['class'].'" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i></a>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$content .= $this->getButtonWithMenu(['label'=>'<i class="fa fa-navicon"></i>', 'type'=>'plain', 'menuitems'=>$actions], ['class'=>'dropdown-menu-right']);
|
||||
}
|
||||
|
||||
if(!empty($extracontent['end_action_list']))
|
||||
$content .= $extracontent['end_action_list'];
|
||||
$content .= "</div>";
|
||||
|
||||
if (0) {
|
||||
$content .= '<div class="dropdown-menu contextmenu" id="contextmenu-d'.$docID.'" style="display: none; position: absolute;">';
|
||||
foreach($actions as $action) {
|
||||
if(is_array($action)) {
|
||||
$content .= '<a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
$content .= 'class="dropdown-item';
|
||||
if (!empty($action['class']))
|
||||
$content .= ' '.$action['class'];
|
||||
$content .= '" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i> '.$action['label'].'</a>';
|
||||
}
|
||||
}
|
||||
$content .= '</div>';
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
|
|
@ -3611,6 +3712,122 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
return "</tr>\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 .= "<div class=\"list-action\">";
|
||||
$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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
}
|
||||
}
|
||||
if ($accessop->check_view_access('EditFolder')) {
|
||||
if($subFolderAccessMode >= M_READWRITE) {
|
||||
// $actions['edit_folder'] = '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
|
||||
$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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
||||
}
|
||||
}
|
||||
if($subFolderAccessMode >= M_READWRITE) {
|
||||
$actions['folder_access'] = $this->printAccessButton($subFolder, true);
|
||||
}
|
||||
if($enableClipboard) {
|
||||
if($session->isOnClipboard($subFolder))
|
||||
// $actions['add_to_clipboard'] = '<a class="removefromclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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'] = '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
$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 .= '<a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
if (!empty($action['title']))
|
||||
$content .= 'title="'.$action['title'].'" ';
|
||||
if (!empty($action['class']))
|
||||
$content .= 'class="'.$action['class'].'" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i></a>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$content .= $this->getButtonWithMenu(['label'=>'<i class="fa fa-navicon"></i>', 'type'=>'plain', 'menuitems'=>$actions], ['class'=>'dropdown-menu-right']);
|
||||
}
|
||||
|
||||
if(!empty($extracontent['end_action_list']))
|
||||
$content .= $extracontent['end_action_list'];
|
||||
$content .= "</div>";
|
||||
|
||||
if (0) {
|
||||
$content .= '<div class="dropdown-menu contextmenu" id="contextmenu-f'.$subFolder->getId().'" style="display: none; position: absolute;">';
|
||||
foreach($actions as $action) {
|
||||
if(is_array($action)) {
|
||||
$content .= '<a ';
|
||||
if (!empty($action['link']))
|
||||
$content .= 'href="'.$action['link'].'" ';
|
||||
$content .= 'class="dropdown-item';
|
||||
if (!empty($action['class']))
|
||||
$content .= ' '.$action['class'];
|
||||
$content .= '" ';
|
||||
if (!empty($action['msg']))
|
||||
$content .= 'msg="'.$action['msg'].'" ';
|
||||
if (!empty($action['confirmmsg']))
|
||||
$content .= 'confirmmsg="'.$action['confirmmsg'].'" ';
|
||||
if (!empty($action['rel']))
|
||||
$content .= 'rel="'.$action['rel'].'" ';
|
||||
if (!empty($action['data-formtoken']))
|
||||
$content .= 'data-formtoken="'.$action['data-formtoken'].'" ';
|
||||
$content .= '><i class="fa fa-'.$action['icon'].'"></i> '.$action['label'].'</a>';
|
||||
}
|
||||
}
|
||||
$content .= "</div>";
|
||||
}
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function folderListRowStatus($subFolder) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
|
@ -3658,72 +3875,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 .= "<div class=\"list-action\">";
|
||||
$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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
}
|
||||
}
|
||||
if ($accessop->check_view_access('EditFolder')) {
|
||||
if($subFolderAccessMode >= M_READWRITE) {
|
||||
$actions['edit_folder'] = '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
|
||||
} else {
|
||||
$actions['edit_folder'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
||||
}
|
||||
}
|
||||
if($subFolderAccessMode >= M_READWRITE) {
|
||||
$actions['folder_access'] = $this->printAccessButton($subFolder, true);
|
||||
}
|
||||
if($enableClipboard) {
|
||||
if($session->isOnClipboard($subFolder))
|
||||
$actions['add_to_clipboard'] = '<a class="removefromclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_removed_from_clipboard').'" title="'.getMLText("remove_from_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
else
|
||||
$actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
|
||||
}
|
||||
if($onepage)
|
||||
$actions['view_folder'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
|
||||
|
||||
/* 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 .= "</div>";
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function folderListRow($subFolder, $skipcont=false, $extracontent=array()) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ span.list-details {
|
|||
color: #666;
|
||||
}
|
||||
|
||||
.list-action a {
|
||||
.list-action > a {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
padding: 2px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user