mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
put list of open tasks into table
This commit is contained in:
parent
1a6f2e9b17
commit
c1d2b46b2e
|
@ -35,10 +35,10 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Theme_Style {
|
|||
$this->printClickDocumentJs();
|
||||
?>
|
||||
$(document).ready( function() {
|
||||
$('body').on('click', 'label.checkbox', function(ev){
|
||||
$('body').on('click', 'label.checkbox, td span', function(ev){
|
||||
ev.preventDefault();
|
||||
$('#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')});
|
||||
});
|
||||
});
|
||||
<?php
|
||||
|
@ -187,14 +187,7 @@ $(document).ready( function() {
|
|||
$this->warningMsg(getMLText("confirm_rm_user_from_processes", array ("username" => htmlspecialchars($rmuser->getFullName()))));
|
||||
$this->rowStart();
|
||||
$this->columnStart(4);
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.UsrMgr.php" name="form1" method="post">
|
||||
<input type="hidden" name="userid" value="<?php print $rmuser->getID();?>">
|
||||
<input type="hidden" name="action" value="removefromprocesses">
|
||||
<?php echo createHiddenFieldWithKey('removefromprocesses'); ?>
|
||||
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$reviewStatus = $rmuser->getReviewStatus();
|
||||
$tmpr = array();
|
||||
$cr = array("-2"=>0, '-1'=>0, '0'=>0, '1'=>0);
|
||||
|
@ -222,111 +215,77 @@ $(document).ready( function() {
|
|||
else
|
||||
$tmpa[$ai['status']] = array($ai);
|
||||
}
|
||||
?>
|
||||
<?php if(isset($tmpr["0"])) { ?>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText('reviews_not_touched', array('no_reviews' => count($tmpr["0"]))),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'status[review][]',
|
||||
'value'=>'0',
|
||||
'checked'=>true
|
||||
),
|
||||
array(
|
||||
'field_wrap' => array('<label class="checkbox" data-action="printList" data-userid="'.$rmuser->getId().'" data-task="reviews_not_touched">', ' '.getMLText('reviews_not_touched_latest', array('no_reviews' => $cr["0"]))."</label>")
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php } ?>
|
||||
<?php if(isset($tmpr["1"])) { ?>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText('reviews_accepted', array('no_reviews' => count($tmpr["1"]))),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'status[approval][]',
|
||||
'value'=>'1',
|
||||
'checked'=>true
|
||||
),
|
||||
array(
|
||||
'field_wrap' => array('<label class="checkbox" data-action="printList" data-userid="'.$rmuser->getId().'" data-task="reviews_accepted">', ' '.getMLText('reviews_accepted_latest', array('no_reviews' => $cr["1"]))."</label>")
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php } ?>
|
||||
<?php if(isset($tmpr["-1"])) { ?>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText('reviews_rejected', array('no_reviews' => count($tmpr["-1"]))),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'status[approval][]',
|
||||
'value'=>'-1',
|
||||
'checked'=>true
|
||||
),
|
||||
array(
|
||||
'field_wrap' => array('<label class="checkbox" data-action="printList" data-userid="'.$rmuser->getId().'" data-task="reviews_rejected">', ' '.getMLText('reviews_rejected_latest', array('no_reviews' => $cr["-1"]))."</label>")
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(isset($tmpa["0"])) { ?>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText('approvals_not_touched', array('no_approvals' => count($tmpa["0"]))),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'status[approval][]',
|
||||
'value'=>'0',
|
||||
'checked'=>true
|
||||
),
|
||||
array(
|
||||
'field_wrap' => array('<label class="checkbox" data-action="printList" data-userid="'.$rmuser->getId().'" data-task="approvals_not_touched">', getMLText('approvals_not_touched_latest', array('no_approvals' => $ca["0"]))."</label>")
|
||||
)
|
||||
);
|
||||
$out = array();
|
||||
if(isset($tmpr["0"])) {
|
||||
$out[] = array(
|
||||
'0',
|
||||
'review',
|
||||
'not_touched',
|
||||
getMLText('reviews_not_touched', array('no_reviews' => count($tmpr["0"]))),
|
||||
getMLText('reviews_not_touched_latest', array('no_reviews' => $cr["0"]))
|
||||
);
|
||||
}
|
||||
if(isset($tmpr["1"])) {
|
||||
$out[] = array(
|
||||
'1',
|
||||
'review',
|
||||
'accepted',
|
||||
getMLText('reviews_accepted', array('no_reviews' => count($tmpr["1"]))),
|
||||
getMLText('reviews_accepted_latest', array('no_reviews' => $cr["1"]))
|
||||
);
|
||||
}
|
||||
if(isset($tmpr["-1"])) {
|
||||
$out[] = array(
|
||||
'-1',
|
||||
'review',
|
||||
'rejected',
|
||||
getMLText('reviews_rejected', array('no_reviews' => count($tmpr["-1"]))),
|
||||
getMLText('reviews_rejected_latest', array('no_reviews' => $cr["-1"]))
|
||||
);
|
||||
}
|
||||
if(isset($tmpa["0"])) {
|
||||
$out[] = array(
|
||||
'0',
|
||||
'approval',
|
||||
'not_touched',
|
||||
getMLText('approvals_not_touched', array('no_approvals' => count($tmpa["0"]))),
|
||||
getMLText('approvals_not_touched_latest', array('no_approvals' => $ca["0"]))
|
||||
);
|
||||
}
|
||||
if(isset($tmpa["1"])) {
|
||||
$out[] = array(
|
||||
'1',
|
||||
'approval',
|
||||
'accepted',
|
||||
getMLText('approvals_accepted', array('no_approvals' => count($tmpa["1"]))),
|
||||
getMLText('approvals_accepted_latest', array('no_approvals' => $ca["1"]))
|
||||
);
|
||||
}
|
||||
if(isset($tmpa["-1"])) {
|
||||
$out[] = array(
|
||||
'-1',
|
||||
'approval',
|
||||
'rejected',
|
||||
getMLText('approvals_rejected', array('no_approvals' => count($tmpa["-1"]))),
|
||||
getMLText('approvals_rejected_latest', array('no_approvals' => $ca["-1"]))
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
<?php } ?>
|
||||
<?php if(isset($tmpa["1"])) { ?>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText('approvals_accepted', array('no_approvals' => count($tmpa["1"]))),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'status[approval][]',
|
||||
'value'=>'1',
|
||||
'checked'=>true
|
||||
),
|
||||
array(
|
||||
'field_wrap' => array('<label class="checkbox" data-action="printList" data-userid="'.$rmuser->getId().'" data-task="approvals_accepted">',getMLText('approvals_accepted_latest', array('no_approvals' => $ca["1"]))."</label>")
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php } ?>
|
||||
<?php if(isset($tmpa["-1"])) { ?>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText('approvals_rejected', array('no_approvals' => count($tmpa["-1"]))),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'status[approval][]',
|
||||
'value'=>'-1',
|
||||
'checked'=>true
|
||||
),
|
||||
array(
|
||||
'field_wrap' => array('<label class="checkbox" data-action="printList" data-userid="'.$rmuser->getId().'" data-task="approvals_rejected">', getMLText('approvals_rejected_latest', array('no_approvals' => $ca["-1"]))."</label>")
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<form class="form-horizontal" action="../op/op.UsrMgr.php" name="form1" method="post">
|
||||
<input type="hidden" name="userid" value="<?php print $rmuser->getID();?>">
|
||||
<input type="hidden" name="action" value="removefromprocesses">
|
||||
<?php echo createHiddenFieldWithKey('removefromprocesses'); ?>
|
||||
|
||||
<?php
|
||||
echo "<table class=\"table table-condensed table-sm\">";
|
||||
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 "</table>";
|
||||
|
||||
/*
|
||||
$options = array();
|
||||
$allUsers = $dms->getAllUsers($sortusersinlist);
|
||||
|
@ -345,7 +304,6 @@ $(document).ready( function() {
|
|||
)
|
||||
);
|
||||
*/
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-remove\"></i> ".getMLText('rm_user_from_processes'));
|
||||
?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user