* Make the action buttons of story in my module call the isClickable function.

This commit is contained in:
hufangzhou
2021-08-05 15:08:59 +08:00
parent 3503223e89
commit f20f3d1658
3 changed files with 10 additions and 7 deletions
+4 -1
View File
@@ -196,10 +196,13 @@ class my extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$stories = $this->loadModel('story')->getUserStories($this->app->user->account, $type, $sort, $pager, 'story');
if(!empty($stories)) $stories = $this->story->mergeReviewer($stories);
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->story;
$this->view->position[] = $this->lang->my->story;
$this->view->stories = $this->loadModel('story')->getUserStories($this->app->user->account, $type, $sort, $pager, 'story');
$this->view->stories = $stories;
$this->view->users = $this->user->getPairs('noletter');
$this->view->projects = $this->loadModel('project')->getPairsByProgram();
$this->view->type = $type;
+5 -5
View File
@@ -101,11 +101,11 @@
if($canBeChanged)
{
$vars = "story={$story->id}";
common::printIcon('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true);
common::printIcon('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true);
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
echo common::buildIconButton('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true);
echo common::buildIconButton('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true);
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
echo common::buildIconButton('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
}
?>
</td>
+1 -1
View File
@@ -2708,7 +2708,7 @@ class storyModel extends model
->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($type != 'all')
->beginIF($type == 'assignedTo')->andWhere('assignedTo')->eq($account)->fi()
->beginIF($type == 'reviewBy')->andWhere('t3.reviewer')->eq($account)->andWhere('t3.result')->eq('')->fi()
->beginIF($type == 'reviewBy')->andWhere('t3.reviewer')->eq($account)->andWhere('t3.result')->eq('')->andWhere('t1.status')->in('draft,changed')->fi()
->beginIF($type == 'openedBy')->andWhere('openedBy')->eq($account)->fi()
->beginIF($type == 'reviewedBy')->andWhere("CONCAT(',', reviewedBy, ',')")->like("%,$account,%")->fi()
->beginIF($type == 'closedBy')->andWhere('closedBy')->eq($account)->fi()