* Adjust the code.
This commit is contained in:
+14
-10
@@ -609,19 +609,23 @@ class story extends control
|
||||
/* Get users. */
|
||||
$users = $this->user->getPairs('pofirst|nodeleted', "$story->assignedTo,$story->openedBy,$story->closedBy");
|
||||
|
||||
$reviewerList = $this->dao->select('reviewer')->from(TABLE_STORYREVIEW)->where('story')->eq($story->id)->andWhere('version')->eq($story->version)->fetchPairs('reviewer');
|
||||
$isShowReviewer = true;
|
||||
$reviewerList = $this->dao->select('reviewer')->from(TABLE_STORYREVIEW)->where('story')->eq($story->id)->andWhere('version')->eq($story->version)->fetchPairs('reviewer');
|
||||
$reviewedBy = explode(',', trim($story->reviewedBy, ','));
|
||||
if(!array_diff($reviewerList, $reviewedBy)) $isShowReviewer = false;
|
||||
|
||||
$this->story->replaceURLang($story->type);
|
||||
|
||||
$this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title;
|
||||
$this->view->position[] = $this->lang->story->edit;
|
||||
$this->view->story = $story;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->users = $users;
|
||||
$this->view->product = $product;
|
||||
$this->view->products = $myProducts + $othersProducts;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($story->product);
|
||||
$this->view->reviewers = implode(',', $reviewerList);
|
||||
$this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title;
|
||||
$this->view->position[] = $this->lang->story->edit;
|
||||
$this->view->story = $story;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->users = $users;
|
||||
$this->view->product = $product;
|
||||
$this->view->products = $myProducts + $othersProducts;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($story->product);
|
||||
$this->view->reviewers = implode(',', $reviewerList);
|
||||
$this->view->isShowReviewer = $isShowReviewer;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -204,9 +204,9 @@
|
||||
<th><?php echo $lang->story->assignedTo;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, $story->assignedTo, 'class="form-control chosen"');?></td>
|
||||
</tr>
|
||||
<?php if($story->status == 'draft' or $story->status == 'changed'):?>
|
||||
<?php if($isShowReviewer):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->reviewedBy;?></th>
|
||||
<th><?php echo $lang->story->reviewers;?></th>
|
||||
<td><?php echo html::select('reviewer[]', $users, $reviewers, 'class="form-control chosen" multiple')?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user