Skip to content

Commit

Permalink
* [bug#59297,done,0.2h] add tips when no project in doc block.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxin authored and 宋辰轩 committed Jan 15, 2025
1 parent 0674230 commit 8079310
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions module/doc/lang/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@

$lang->doc->tips = new stdclass();
$lang->doc->tips->noProduct = 'No product, please create first';
$lang->doc->tips->noProject = 'No project, please create first';
$lang->doc->tips->noExecution = 'No execution, please create first';
$lang->doc->tips->noCaselib = 'No caselib, please create first';

Expand Down
1 change: 1 addition & 0 deletions module/doc/lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@

$lang->doc->tips = new stdclass();
$lang->doc->tips->noProduct = 'No product, please create first';
$lang->doc->tips->noProject = 'No project, please create first';
$lang->doc->tips->noExecution = 'No execution, please create first';
$lang->doc->tips->noCaselib = 'No caselib, please create first';

Expand Down
1 change: 1 addition & 0 deletions module/doc/lang/fr.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@

$lang->doc->tips = new stdclass();
$lang->doc->tips->noProduct = 'No product, please create first';
$lang->doc->tips->noProject = 'No project, please create first';
$lang->doc->tips->noExecution = 'No execution, please create first';
$lang->doc->tips->noCaselib = 'No caselib, please create first';

Expand Down
1 change: 1 addition & 0 deletions module/doc/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@

$lang->doc->tips = new stdclass();
$lang->doc->tips->noProduct = '暂时没有产品,请先创建';
$lang->doc->tips->noProject = '暂时没有项目,请先创建';
$lang->doc->tips->noExecution = '暂时没有执行,请先创建';
$lang->doc->tips->noCaselib = '暂时没有用例库,请先创建';

Expand Down
2 changes: 2 additions & 0 deletions module/projectstory/control.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public function story(int $projectID = 0, int $productID = 0, string $branch = '
{
if($from == 'doc')
{
$this->app->loadLang('doc');
$projects = $this->loadModel('project')->getPairsByProgram();
if(empty($projects)) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->tips->noProject));

if(!$projectID)
{
Expand Down

0 comments on commit 8079310

Please sign in to comment.