mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
restrict operation on selected documents
This commit is contained in:
parent
2aa67b93a0
commit
2b6a68cc28
|
@ -53,6 +53,11 @@ if (isset($_GET["task"])) {
|
||||||
$task = $_GET['task'];
|
$task = $_GET['task'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$type = null;
|
||||||
|
if (isset($_GET["type"])) {
|
||||||
|
$type = $_GET['type'];
|
||||||
|
}
|
||||||
|
|
||||||
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||||
|
|
||||||
if($view) {
|
if($view) {
|
||||||
|
@ -60,6 +65,7 @@ if($view) {
|
||||||
$view->setParam('rmuser', $rmuser);
|
$view->setParam('rmuser', $rmuser);
|
||||||
$view->setParam('allusers', $allusers);
|
$view->setParam('allusers', $allusers);
|
||||||
$view->setParam('task', $task);
|
$view->setParam('task', $task);
|
||||||
|
$view->setParam('type', $type);
|
||||||
$view->setParam('cachedir', $settings->_cacheDir);
|
$view->setParam('cachedir', $settings->_cacheDir);
|
||||||
$view->setParam('rootfolder', $dms->getFolder($settings->_rootFolderID));
|
$view->setParam('rootfolder', $dms->getFolder($settings->_rootFolderID));
|
||||||
$view->setParam('conversionmgr', $conversionmgr);
|
$view->setParam('conversionmgr', $conversionmgr);
|
||||||
|
|
|
@ -43,7 +43,11 @@ $(document).ready( function() {
|
||||||
$('body').on('click', 'label.checkbox, td span', function(ev){
|
$('body').on('click', 'label.checkbox, td span', function(ev){
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
$('#kkkk.ajax').data('action', $(this).data('action'));
|
$('#kkkk.ajax').data('action', $(this).data('action'));
|
||||||
$('#kkkk.ajax').trigger('update', {userid: $(this).data('userid'), task: $(this).data('task')});
|
$('#kkkk.ajax').trigger('update', {userid: $(this).data('userid'), task: $(this).data('task'), type: $(this).data('type')});
|
||||||
|
});
|
||||||
|
$('body').on('click', '#selectall', function(ev){
|
||||||
|
$("input.markforprocess").each(function () { this.checked = !this.checked; });
|
||||||
|
ev.preventDefault();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
<?php
|
<?php
|
||||||
|
@ -60,7 +64,9 @@ $(document).ready( function() {
|
||||||
$previewconverters = $this->params['previewconverters'];
|
$previewconverters = $this->params['previewconverters'];
|
||||||
$timeout = $this->params['timeout'];
|
$timeout = $this->params['timeout'];
|
||||||
$rmuser = $this->params['rmuser'];
|
$rmuser = $this->params['rmuser'];
|
||||||
|
$allusers = $this->params['allusers'];
|
||||||
$task = $this->params['task'];
|
$task = $this->params['task'];
|
||||||
|
$type = $this->params['type'];
|
||||||
|
|
||||||
if(!$task)
|
if(!$task)
|
||||||
return;
|
return;
|
||||||
|
@ -155,12 +161,23 @@ $(document).ready( function() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if($docs) {
|
if($docs) {
|
||||||
|
echo '<form id="processform" action="../op/op.UsrMgr.php" method="post">';
|
||||||
|
echo '<input type="hidden" name="userid" value="'.$rmuser->getID().'">';
|
||||||
|
if($type) {
|
||||||
|
$kk = explode('_', $type, 2);
|
||||||
|
echo '<input type="hidden" name="status['.$kk[0].'][]" value="'.$kk[1].'">';
|
||||||
|
}
|
||||||
|
echo '<input type="hidden" name="task" value="'.$task.'">';
|
||||||
|
echo '<input type="hidden" name="action" value="removefromprocesses">';
|
||||||
|
echo '<input type="hidden" name="needsdocs" value="1">';
|
||||||
|
echo createHiddenFieldWithKey('removefromprocesses');
|
||||||
print "<table class=\"table table-condensed table-sm\">";
|
print "<table class=\"table table-condensed table-sm\">";
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
print "<th></th>\n";
|
print "<th></th>\n";
|
||||||
print "<th>".getMLText("name")."</th>\n";
|
print "<th>".getMLText("name")."</th>\n";
|
||||||
print "<th>".getMLText("status")."</th>\n";
|
print "<th>".getMLText("status")."</th>\n";
|
||||||
print "<th>".getMLText("action")."</th>\n";
|
print "<th>".getMLText("action")."</th>\n";
|
||||||
|
print "<th><span id=\"selectall\"><i class=\"fa fa-arrows-h\" title=\"".getMLText('object_cleaner_toggle_checkboxes')."\"></i></span></th>\n";
|
||||||
print "</tr>\n</thead>\n<tbody>\n";
|
print "</tr>\n</thead>\n<tbody>\n";
|
||||||
foreach($docs as $document) {
|
foreach($docs as $document) {
|
||||||
$document->verifyLastestContentExpriry();
|
$document->verifyLastestContentExpriry();
|
||||||
|
@ -174,11 +191,33 @@ $(document).ready( function() {
|
||||||
$extracontent['below_title'] = $this->getListRowPath($document);
|
$extracontent['below_title'] = $this->getListRowPath($document);
|
||||||
echo $this->documentListRowStart($document);
|
echo $this->documentListRowStart($document);
|
||||||
echo $this->documentListRow($document, $previewer, true, 0, $extracontent);
|
echo $this->documentListRow($document, $previewer, true, 0, $extracontent);
|
||||||
|
echo '<td>';
|
||||||
|
echo '<input type="checkbox" class="markforprocess" value="'.$document->getId().'" name="docs['.$document->getId().']">';
|
||||||
|
echo '</td>';
|
||||||
echo $this->documentListRowEnd($document);
|
echo $this->documentListRowEnd($document);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</tbody>\n</table>";
|
echo "</tbody>\n</table>";
|
||||||
|
$options = array(array(0, getMLText('do_no_transfer_to_user')));
|
||||||
|
foreach ($allusers as $currUser) {
|
||||||
|
if ($currUser->isGuest() || ($currUser->getID() == $rmuser->getID()) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ($rmuser && $currUser->getID()==$rmuser->getID()) $selected=$count;
|
||||||
|
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName()));
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
getMLText("transfer_process_to_user"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'name'=>'assignTo',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'options'=>$options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo '<p><button type="submit" class="btn btn-primary"><i class="fa fa-remove"></i> '.getMLText('transfer').'</button>';
|
||||||
|
echo '</form>';
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -186,6 +225,7 @@ $(document).ready( function() {
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$rmuser = $this->params['rmuser'];
|
$rmuser = $this->params['rmuser'];
|
||||||
|
$allusers = $this->params['allusers'];
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
|
@ -291,7 +331,7 @@ $(document).ready( function() {
|
||||||
<?php
|
<?php
|
||||||
echo "<table class=\"table table-condensed table-sm\">";
|
echo "<table class=\"table table-condensed table-sm\">";
|
||||||
foreach($out as $o) {
|
foreach($out as $o) {
|
||||||
echo "<tr><td>".$o[3]."</td><td>".$o[4]."</td><td><input style=\"margin-top: 0px;\" type=\"checkbox\" name=\"status[".$o[1]."][]\" value=\"".$o[0]."\"></td><td><span data-action=\"printList\" data-userid=\"".$rmuser->getId()."\" data-task=\"".$o[1]."s_".$o[2]."\"><i class=\"fa fa-list\"></i></span></td></tr>";
|
echo "<tr><td>".$o[3]."</td><td>".$o[4]."</td><td><input style=\"margin-top: 0px;\" type=\"checkbox\" name=\"status[".$o[1]."][]\" value=\"".$o[0]."\"></td><td><span data-action=\"printList\" data-userid=\"".$rmuser->getId()."\" data-task=\"".$o[1]."s_".$o[2]."\" data-type=\"".$o[1]."_".$o[0]."\"><i class=\"fa fa-list\"></i></span></td></tr>";
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user