mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
first create a list of action buttons and then render it in documetListRow
This commit is contained in:
parent
d47e2377bb
commit
96ef457183
|
@ -294,7 +294,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
echo "<div class=\"navbar navbar-inverse navbar-fixed-top\">\n";
|
echo "<div class=\"navbar navbar-inverse navbar-fixed-top\">\n";
|
||||||
echo " <div class=\"navbar-inner\">\n";
|
echo " <div class=\"navbar-inner\">\n";
|
||||||
echo " <div class=\"container-fluid\">\n";
|
echo " <div class=\"container-fluid\">\n";
|
||||||
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".(!empty($this->params['dms']) ? $this->params['dms']->getRootFolder()->getId() : '1')."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'"/>' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg"/>')."</a>";
|
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".(!empty($this->params['dms']) ? $this->params['dms']->getRootFolder()->getId() : '1')."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'"/>' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg"/>')."</a>";
|
||||||
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
|
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
|
@ -313,7 +313,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
echo " <a class=\"btn btn-navbar\" href=\"".$this->params['settings']->_httpRoot."op/op.Logout.php\">\n";
|
echo " <a class=\"btn btn-navbar\" href=\"".$this->params['settings']->_httpRoot."op/op.Logout.php\">\n";
|
||||||
echo " <span class=\"fa fa-sign-out\"></span>\n";
|
echo " <span class=\"fa fa-sign-out\"></span>\n";
|
||||||
echo " </a>\n";
|
echo " </a>\n";
|
||||||
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg">')."</a>";
|
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'">' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg">')."</a>";
|
||||||
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
||||||
|
|
||||||
/* user profile menu {{{ */
|
/* user profile menu {{{ */
|
||||||
|
@ -2976,32 +2976,37 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
||||||
|
|
||||||
$content = '';
|
$content = '';
|
||||||
$content .= "<div class=\"list-action\">";
|
$content .= "<div class=\"list-action\">";
|
||||||
|
$actions = array();
|
||||||
if(!empty($extracontent['begin_action_list']))
|
if(!empty($extracontent['begin_action_list']))
|
||||||
$content .= $extracontent['begin_action_list'];
|
$content .= $extracontent['begin_action_list'];
|
||||||
if($accessop->check_view_access('RemoveDocument')) {
|
if($accessop->check_view_access('RemoveDocument')) {
|
||||||
if($document->getAccessMode($user) >= M_ALL) {
|
if($document->getAccessMode($user) >= M_ALL) {
|
||||||
$content .= $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
$actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
||||||
} else {
|
} else {
|
||||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
$actions['remove_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$docID = $document->getID();
|
$docID = $document->getID();
|
||||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||||
$content .= '<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>';
|
||||||
} else {
|
} else {
|
||||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
$actions['edit_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
||||||
}
|
}
|
||||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||||
$content .= $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
|
$actions['lock_document'] = $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
|
||||||
}
|
}
|
||||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||||
$content .= $this->printAccessButton($document, true);
|
$actions['document_access'] = $this->printAccessButton($document, true);
|
||||||
}
|
}
|
||||||
if($enableClipboard) {
|
if($enableClipboard) {
|
||||||
$content .= '<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'] = '<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($onepage)
|
if($onepage)
|
||||||
$content .= '<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'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
|
||||||
|
foreach($actions as $action) {
|
||||||
|
if(is_string($action))
|
||||||
|
$content .= $action;
|
||||||
|
}
|
||||||
if(!empty($extracontent['end_action_list']))
|
if(!empty($extracontent['end_action_list']))
|
||||||
$content .= $extracontent['end_action_list'];
|
$content .= $extracontent['end_action_list'];
|
||||||
$content .= "</div>";
|
$content .= "</div>";
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
margin: auto auto;
|
margin: auto auto;
|
||||||
width: 460px;
|
width: 460px;
|
||||||
}
|
}
|
||||||
.navbar img {
|
#navbar-logo {
|
||||||
height: 1.93rem;
|
height: 1.93rem;
|
||||||
float: left;
|
float: left;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
|
|
|
@ -306,7 +306,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
|
|
||||||
function globalBanner() { /* {{{ */
|
function globalBanner() { /* {{{ */
|
||||||
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark fixed-top\">\n";
|
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark fixed-top\">\n";
|
||||||
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'"/>' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg"/>')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'"/>' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg"/>')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
||||||
echo "</nav>\n";
|
echo "</nav>\n";
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$accessobject = $this->params['accessobject'];
|
$accessobject = $this->params['accessobject'];
|
||||||
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark border-bottom fixed-top\">\n";
|
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark border-bottom fixed-top\">\n";
|
||||||
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'">' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
||||||
|
|
||||||
if(isset($this->params['user']) && $this->params['user']) {
|
if(isset($this->params['user']) && $this->params['user']) {
|
||||||
/* search form {{{ */
|
/* search form {{{ */
|
||||||
|
@ -3051,32 +3051,37 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
||||||
|
|
||||||
$content = '';
|
$content = '';
|
||||||
$content .= "<div class=\"list-action\">";
|
$content .= "<div class=\"list-action\">";
|
||||||
|
$actions = array();
|
||||||
if(!empty($extracontent['begin_action_list']))
|
if(!empty($extracontent['begin_action_list']))
|
||||||
$content .= $extracontent['begin_action_list'];
|
$content .= $extracontent['begin_action_list'];
|
||||||
if($accessop->check_view_access('RemoveDocument')) {
|
if($accessop->check_view_access('RemoveDocument')) {
|
||||||
if($document->getAccessMode($user) >= M_ALL) {
|
if($document->getAccessMode($user) >= M_ALL) {
|
||||||
$content .= $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
$actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
||||||
} else {
|
} else {
|
||||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
$actions['remove_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$docID = $document->getID();
|
$docID = $document->getID();
|
||||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||||
$content .= '<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>';
|
||||||
} else {
|
} else {
|
||||||
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
$actions['edit_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
|
||||||
}
|
}
|
||||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||||
$content .= $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
|
$actions['lock_document'] = $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
|
||||||
}
|
}
|
||||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||||
$content .= $this->printAccessButton($document, true);
|
$actions['document_access'] = $this->printAccessButton($document, true);
|
||||||
}
|
}
|
||||||
if($enableClipboard) {
|
if($enableClipboard) {
|
||||||
$content .= '<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'] = '<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($onepage)
|
if($onepage)
|
||||||
$content .= '<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'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
|
||||||
|
foreach($actions as $action) {
|
||||||
|
if(is_string($action))
|
||||||
|
$content .= $action;
|
||||||
|
}
|
||||||
if(!empty($extracontent['end_action_list']))
|
if(!empty($extracontent['end_action_list']))
|
||||||
$content .= $extracontent['end_action_list'];
|
$content .= $extracontent['end_action_list'];
|
||||||
$content .= "</div>";
|
$content .= "</div>";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user