* Fix bug#26859.
This commit is contained in:
+15
-7
@@ -4214,7 +4214,7 @@ class storyModel extends model
|
||||
|
||||
if(strpos('draft,changing', $story->status) !== false)
|
||||
{
|
||||
$menu .= $this->buildMenu('story', 'submitReview', "storyID=$story->id&storyType=$story->type", $story, $type, 'sub-review', '', 'iframe', true, "data-width='50%'");
|
||||
$menu .= $this->buildMenu('story', 'submitReview', "storyID=$story->id&storyType=$story->type", $story, $type, 'confirm', '', 'iframe', true, "data-width='50%'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4291,7 +4291,7 @@ class storyModel extends model
|
||||
if($type == 'view')
|
||||
{
|
||||
$menu .= $this->buildMenu('story', 'change', $params . "&from=&storyType=$story->type", $story, $type, 'alter', '', 'showinonlybody');
|
||||
if(strpos('draft,changing', $story->status) !== false) $menu .= $this->buildMenu('story', 'submitReview', $params . "&storyType=$story->type", $story, $type, 'sub-review', '', 'showinonlybody iframe', true, "data-width='50%'");
|
||||
if(strpos('draft,changing', $story->status) !== false) $menu .= $this->buildMenu('story', 'submitReview', $params . "&storyType=$story->type", $story, $type, 'confirm', '', 'showinonlybody iframe', true, "data-width='50%'");
|
||||
|
||||
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
$menu .= $this->buildMenu('story', 'recall', $params . "&from=view&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
|
||||
@@ -4355,17 +4355,25 @@ class storyModel extends model
|
||||
$story->reviewer = isset($story->reviewer) ? $story->reviewer : array();
|
||||
$story->notReview = isset($story->notReview) ? $story->notReview : array();
|
||||
|
||||
if(common::hasPriv('story', 'review'))
|
||||
if(strpos('draft,changing', $story->status) !== false)
|
||||
{
|
||||
$reviewDisabled = in_array($this->app->user->account, $story->notReview) and ($story->status == 'draft' or $story->status == 'changing') ? '' : 'disabled';
|
||||
$story->from = 'execution';
|
||||
$menu .= common::printIcon('story', 'review', "story={$story->id}&from=story", $story, 'list', 'search', '', $reviewDisabled, false, "data-group=execution");
|
||||
if(common::hasPriv('story', 'submitReview')) $menu .= common::printIcon('story', 'submitReview', "storyID=$story->id&from=story", $story, 'list', 'confirm', '', 'iframe', true, "data-width='50%'");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(common::hasPriv('story', 'review'))
|
||||
{
|
||||
$reviewDisabled = in_array($this->app->user->account, $story->notReview) and ($story->status == 'draft' or $story->status == 'changing') ? '' : 'disabled';
|
||||
$story->from = 'execution';
|
||||
$menu .= common::printIcon('story', 'review', "story={$story->id}&from=story", $story, 'list', 'search', '', $reviewDisabled, false, "data-group=execution");
|
||||
}
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'recall'))
|
||||
{
|
||||
$recallDisabled = empty($story->reviewedBy) and strpos('draft,changing', $story->status) !== false and !empty($story->reviewer) ? '' : 'disabled';
|
||||
$menu .= common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'undo', 'hiddenwin', $recallDisabled, '', '', $this->lang->story->recall);
|
||||
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
$menu .= common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'undo', 'hiddenwin', $recallDisabled, '', '', $title);
|
||||
}
|
||||
|
||||
$this->lang->task->create = $this->lang->execution->wbs;
|
||||
|
||||
Reference in New Issue
Block a user