* code for task #72981.
This commit is contained in:
+5
-5
@@ -1172,11 +1172,11 @@ class myModel extends model
|
||||
foreach($tmpDept as $d) $managedDeptList[$d->id] = $d->name;
|
||||
|
||||
$oa = array();
|
||||
if(common::hasPriv('attend', 'review')) $oa['attend'] = $this->getReviewingAttends($allDeptList, $managedDeptList);
|
||||
if(common::hasPriv('leave', 'review')) $oa['leave'] = $this->getReviewingLeaves($allDeptList, $managedDeptList, $orderBy);
|
||||
if(common::hasPriv('overtime', 'review')) $oa['overtime'] = $this->getReviewingOvertimes($allDeptList, $managedDeptList, $orderBy);
|
||||
if(common::hasPriv('makeup', 'review')) $oa['makeup'] = $this->getReviewingMakeups($allDeptList, $managedDeptList, $orderBy);
|
||||
if(common::hasPriv('lieu', 'review')) $oa['lieu'] = $this->getReviewingLieus($allDeptList, $managedDeptList, $orderBy);
|
||||
if(common::hasPriv('attend', 'review')) $oa['attend'] = $this->getReviewingAttends($allDeptList, $managedDeptList);
|
||||
if(common::hasPriv('leave', 'review') and common::hasPriv('leave', 'view')) $oa['leave'] = $this->getReviewingLeaves($allDeptList, $managedDeptList, $orderBy);
|
||||
if(common::hasPriv('overtime', 'review') and common::hasPriv('overtime', 'view')) $oa['overtime'] = $this->getReviewingOvertimes($allDeptList, $managedDeptList, $orderBy);
|
||||
if(common::hasPriv('makeup', 'review') and common::hasPriv('makeup', 'view')) $oa['makeup'] = $this->getReviewingMakeups($allDeptList, $managedDeptList, $orderBy);
|
||||
if(common::hasPriv('lieu', 'review') and common::hasPriv('lieu', 'view')) $oa['lieu'] = $this->getReviewingLieus($allDeptList, $managedDeptList, $orderBy);
|
||||
|
||||
$reviewList = array();
|
||||
foreach($oa as $type => $reviewings)
|
||||
|
||||
@@ -94,19 +94,11 @@
|
||||
}
|
||||
elseif($module == 'attend')
|
||||
{
|
||||
extCommonModel::printLink('attend', 'review', "attendID={$review->id}&status=pass", $passIcon, "class='btn' title='{$lang->attend->reviewStatusList['pass']}' data-status='pass' data-toggle='ajax'");
|
||||
extCommonModel::printLink('attend', 'review', "attendID={$review->id}&status=reject", $rejectIcon, "class='btn' title='{$lang->attend->reviewStatusList['reject']}' data-toggle='modal'");
|
||||
common::printLink($module, 'review', "attendID={$review->id}&status=", $reviewIcon, '', "class='btn' data-toggle='modal' title='{$lang->review->common}'", true, true);
|
||||
}
|
||||
elseif($module == 'leave')
|
||||
elseif(strpos(",{$config->my->oaObjectType},", ",$module,") !== false)
|
||||
{
|
||||
$leaveMode = $review->status == 'pass' ? 'back' : '';
|
||||
extCommonModel::printLink('leave', 'review', "id={$review->id}&status=pass&mode=$leaveMode", $passIcon, "class='btn' title='{$lang->$module->statusList['pass']}' data-status='pass' data-toggle='ajax'");
|
||||
extCommonModel::printLink('leave', 'review', "id={$review->id}&status=reject&mode=$leaveMode", $rejectIcon, "class='btn' title='{$lang->$module->statusList['reject']}' data-toggle='modal'");
|
||||
}
|
||||
elseif(strpos('|makeup|overtime|lieu|', "|$module|") !== false)
|
||||
{
|
||||
extCommonModel::printLink($module, $method, "id={$review->id}&status=pass", $passIcon, "class='btn' title='{$lang->$module->statusList['pass']}' data-status='pass' data-toggle='ajax'");
|
||||
extCommonModel::printLink($module, $method, "id={$review->id}&status=reject", $rejectIcon, "class='btn' title='{$lang->$module->statusList['reject']}' data-toggle='modal'");
|
||||
common::printLink($module, 'view', $params, $reviewIcon, '', "class='btn' data-toggle='modal' title='{$lang->review->common}'", true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user