* Modify method for my::epic.
This commit is contained in:
@@ -19,10 +19,10 @@ featureBar
|
||||
li(searchToggle(set::module($this->app->rawMethod . 'Epic'), set::open($type == 'bysearch')))
|
||||
);
|
||||
|
||||
$canBatchEdit = common::hasPriv('story', 'batchEdit');
|
||||
$canBatchReview = common::hasPriv('story', 'batchReview');
|
||||
$canBatchAssignTo = common::hasPriv('story', 'batchAssignTo');
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
$canBatchEdit = common::hasPriv('epic', 'batchEdit');
|
||||
$canBatchReview = common::hasPriv('epic', 'batchReview');
|
||||
$canBatchAssignTo = common::hasPriv('epic', 'batchAssignTo');
|
||||
$canBatchClose = common::hasPriv('epic', 'batchClose');
|
||||
$canBatchAction = $canBatchEdit || $canBatchReview || $canBatchAssignTo || $canBatchClose;
|
||||
|
||||
$reviewItems = array();
|
||||
@@ -32,7 +32,7 @@ if($canBatchReview)
|
||||
foreach($lang->story->reasonList as $key => $reason)
|
||||
{
|
||||
if(!$key || $key == 'subdivided' || $key == 'duplicate') continue;
|
||||
$rejectItems[] = array('text' => $reason, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('story', 'batchReview', "result=reject&reason={$key}&storyType=epic"));
|
||||
$rejectItems[] = array('text' => $reason, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('epic', 'batchReview', "result=reject&reason={$key}&storyType=epic"));
|
||||
}
|
||||
|
||||
foreach($lang->story->reviewResultList as $key => $result)
|
||||
@@ -44,7 +44,7 @@ if($canBatchReview)
|
||||
}
|
||||
else
|
||||
{
|
||||
$reviewItems[] = array('text' => $result, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('story', 'batchReview', "result={$key}&reason=&storyType=epic"));
|
||||
$reviewItems[] = array('text' => $result, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('epic', 'batchReview', "result={$key}&reason=&storyType=epic"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,16 +55,16 @@ if($canBatchAssignTo)
|
||||
foreach($users as $key => $value)
|
||||
{
|
||||
if(empty($key) || $key == 'closed') continue;
|
||||
$assignedToItems[] = array('text' => $value, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('story', 'batchAssignTo', "storyType=epic&assignedTo={$key}"));
|
||||
$assignedToItems[] = array('text' => $value, 'innerClass' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('epic', 'batchAssignTo', "storyType=epic&assignedTo={$key}"));
|
||||
}
|
||||
}
|
||||
|
||||
$footToolbar = array('items' => array
|
||||
(
|
||||
$canBatchEdit ? array('text' => $lang->edit, 'className' => 'batch-btn', 'data-url' => helper::createLink('story', 'batchEdit', "productID=0&executionID=0&branch=0&storyType=epic&from={$app->rawMethod}")) : null,
|
||||
$canBatchEdit ? array('text' => $lang->edit, 'className' => 'batch-btn', 'data-url' => helper::createLink('epic', 'batchEdit', "productID=0&executionID=0&branch=0&storyType=epic&from={$app->rawMethod}")) : null,
|
||||
$canBatchReview ? array('caret' => 'up', 'text' => $lang->story->review, 'type' => 'dropdown', 'items' => $reviewItems, 'data-placement' => 'top-start') : null,
|
||||
$canBatchAssignTo ? array('caret' => 'up', 'text' => $lang->story->assignedTo, 'type' => 'dropdown', 'items' => $assignedToItems, 'data-placement' => 'top-start') : null,
|
||||
$canBatchClose ? array('text' => $lang->story->close, 'className' => 'batch-btn', 'data-url' => helper::createLink('story', 'batchClose', "productID=0&executionID=0&storyType=epic&from={$app->rawMethod}")) : null
|
||||
$canBatchClose ? array('text' => $lang->story->close, 'className' => 'batch-btn', 'data-url' => helper::createLink('epic', 'batchClose', "productID=0&executionID=0&storyType=epic&from={$app->rawMethod}")) : null
|
||||
), 'btnProps' => array('size' => 'sm', 'btnType' => 'secondary'));
|
||||
|
||||
if($canBatchAction) $config->my->epic->dtable->fieldList['id']['type'] = 'checkID';
|
||||
|
||||
Reference in New Issue
Block a user