Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
+18
-13
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
|
||||
$lang->svn = new stdclass();
|
||||
$lang->git = new stdclass();
|
||||
|
||||
/* Project release menu settings. */
|
||||
$lang->projectrelease = new stdclass();
|
||||
$lang->projectrelease->menu = new stdclass();
|
||||
|
||||
/* Report menu settings. */
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
|
||||
$lang->navGroup->jenkins = 'project';
|
||||
$lang->navGroup->compile = 'project';
|
||||
$lang->navGroup->build = 'project';
|
||||
$lang->navGroup->projectrelease = 'project';
|
||||
|
||||
$lang->navGroup->durationestimation = 'project';
|
||||
|
||||
@@ -862,19 +867,19 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
|
||||
+18
-13
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
|
||||
$lang->svn = new stdclass();
|
||||
$lang->git = new stdclass();
|
||||
|
||||
/* Project release menu settings. */
|
||||
$lang->projectrelease = new stdclass();
|
||||
$lang->projectrelease->menu = new stdclass();
|
||||
|
||||
/* Report menu settings. */
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
|
||||
$lang->navGroup->jenkins = 'project';
|
||||
$lang->navGroup->compile = 'project';
|
||||
$lang->navGroup->build = 'project';
|
||||
$lang->navGroup->projectrelease = 'project';
|
||||
|
||||
$lang->navGroup->durationestimation = 'project';
|
||||
|
||||
@@ -862,19 +867,19 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
|
||||
+18
-13
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
|
||||
$lang->svn = new stdclass();
|
||||
$lang->git = new stdclass();
|
||||
|
||||
/* Project release menu settings. */
|
||||
$lang->projectrelease = new stdclass();
|
||||
$lang->projectrelease->menu = new stdclass();
|
||||
|
||||
/* Report menu settings. */
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
|
||||
$lang->navGroup->jenkins = 'project';
|
||||
$lang->navGroup->compile = 'project';
|
||||
$lang->navGroup->build = 'project';
|
||||
$lang->navGroup->projectrelease = 'project';
|
||||
|
||||
$lang->navGroup->durationestimation = 'project';
|
||||
|
||||
@@ -862,19 +867,19 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
|
||||
@@ -11,7 +11,7 @@ $lang->waterfall->menuOrder[40] = 'product';
|
||||
$lang->waterfall->menuOrder[45] = 'design';
|
||||
$lang->waterfall->menuOrder[50] = 'ci';
|
||||
$lang->waterfall->menuOrder[55] = 'qa';
|
||||
$lang->waterfall->menuOrder[60] = 'release';
|
||||
$lang->waterfall->menuOrder[60] = 'projectrelease';
|
||||
$lang->waterfall->menuOrder[65] = 'issue';
|
||||
$lang->waterfall->menuOrder[70] = 'risk';
|
||||
$lang->waterfall->menuOrder[75] = 'report';
|
||||
|
||||
+18
-13
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
|
||||
$lang->svn = new stdclass();
|
||||
$lang->git = new stdclass();
|
||||
|
||||
/* Project release menu settings. */
|
||||
$lang->projectrelease = new stdclass();
|
||||
$lang->projectrelease->menu = new stdclass();
|
||||
|
||||
/* Report menu settings. */
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
|
||||
$lang->navGroup->jenkins = 'project';
|
||||
$lang->navGroup->compile = 'project';
|
||||
$lang->navGroup->build = 'project';
|
||||
$lang->navGroup->projectrelease = 'project';
|
||||
|
||||
$lang->navGroup->durationestimation = 'project';
|
||||
|
||||
@@ -862,19 +867,19 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
|
||||
@@ -455,6 +455,10 @@ $lang->doc->menu = new stdclass();
|
||||
$lang->svn = new stdclass();
|
||||
$lang->git = new stdclass();
|
||||
|
||||
/* 发布视图菜单设置。*/
|
||||
$lang->projectrelease = new stdclass();
|
||||
$lang->projectrelease->menu = new stdclass();
|
||||
|
||||
/* 统计视图菜单设置。*/
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
@@ -627,6 +631,7 @@ $lang->navGroup->job = 'project';
|
||||
$lang->navGroup->jenkins = 'project';
|
||||
$lang->navGroup->compile = 'project';
|
||||
$lang->navGroup->build = 'project';
|
||||
$lang->navGroup->projectrelease = 'project';
|
||||
|
||||
$lang->navGroup->durationestimation = 'project';
|
||||
|
||||
@@ -864,20 +869,20 @@ $lang->menu->scrum->qa = '测试|qa|index';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->projectstory = array('link' => '需求|projectstory|requirement|product={PRODUCT}', 'subModule' => 'requirement,story,');
|
||||
//$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = '代码|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
//$lang->menu->waterfall->release = array('link' => '发布|release|browse|product={PRODUCT}', 'subModule' => 'release');
|
||||
$lang->menu->waterfall->issue = '问题|issue|browse|';
|
||||
$lang->menu->waterfall->risk = '风险|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->projectstory = array('link' => '需求|projectstory|requirement|product={PRODUCT}', 'subModule' => 'requirement,story,');
|
||||
//$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = '代码|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = '问题|issue|browse|';
|
||||
$lang->menu->waterfall->risk = '风险|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
|
||||
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
|
||||
$lang->svn = new stdclass();
|
||||
$lang->git = new stdclass();
|
||||
|
||||
/* 項目發布視圖菜單設置。*/
|
||||
$lang->projectrelease = new stdclass();
|
||||
$lang->projectrelease->menu = new stdclass();
|
||||
|
||||
/* 統計視圖菜單設置。*/
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
|
||||
$lang->navGroup->jenkins = 'project';
|
||||
$lang->navGroup->compile = 'project';
|
||||
$lang->navGroup->build = 'project';
|
||||
$lang->navGroup->projectrelease = 'project';
|
||||
|
||||
$lang->navGroup->durationestimation = 'project';
|
||||
|
||||
@@ -862,19 +867,19 @@ $lang->menu->scrum->qa = '測試|qa|index';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => '儀表盤|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => '計劃|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => '報告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文檔|doc|index|program={PROGRAM}');
|
||||
//$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = '設計|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = '代碼|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => '測試|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
//$lang->menu->waterfall->release = array('link' => '發佈|release|browse|product={PRODUCT}', 'subModule' => 'release');
|
||||
$lang->menu->waterfall->issue = '問題|issue|browse|';
|
||||
$lang->menu->waterfall->risk = '風險|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->programindex = array('link' => '儀表盤|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => '計劃|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => '報告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文檔|doc|index|program={PROGRAM}');
|
||||
//$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = '設計|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = '代碼|repo|browse|';
|
||||
$lang->menu->waterfall->qa = array('link' => '測試|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
|
||||
$lang->menu->waterfall->projectrelease = array('link' => '發布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = '問題|issue|browse|';
|
||||
$lang->menu->waterfall->risk = '風險|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
|
||||
@@ -1212,7 +1212,7 @@ class productModel extends model
|
||||
public function getProductLink($module, $method, $extra, $branch = false)
|
||||
{
|
||||
$link = '';
|
||||
if(strpos('programplan,product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport,build', $module) !== false)
|
||||
if(strpos('programplan,product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport,build,projectrelease', $module) !== false)
|
||||
{
|
||||
if($module == 'product' && $method == 'project')
|
||||
{
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$config->release = new stdclass();
|
||||
$config->release->create = new stdclass();
|
||||
$config->release->edit = new stdclass();
|
||||
$config->release->create->requiredFields = 'name,date';
|
||||
$config->release->edit->requiredFields = 'name,date,build';
|
||||
|
||||
$config->release->editor = new stdclass();
|
||||
$config->release->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->release->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
@@ -0,0 +1,603 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: control.php 4178 2013-01-20 09:32:11Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class projectrelease extends control
|
||||
{
|
||||
public $products = array();
|
||||
|
||||
/**
|
||||
* Construct function, load module auto.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$products = array();
|
||||
$this->loadModel('product');
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
* Common actions.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function commonAction($productID, $branch = 0)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
|
||||
|
||||
$this->loadModel('product');
|
||||
$product = $this->product->getById($productID);
|
||||
if(empty($product)) $this->locate($this->createLink('product', 'create'));
|
||||
$this->view->product = $product;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id);
|
||||
$this->view->position[] = html::a($this->createLink('product', 'browse', "productID={$this->view->product->id}&branch=$branch"), $this->view->product->name);
|
||||
$this->product->setMenu($this->product->getPairs(), $productID, $branch);
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse releases.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($productID, $branch = 0, $type = 'all')
|
||||
{
|
||||
$this->commonAction($productID, $branch);
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
|
||||
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->browse;
|
||||
$this->view->position[] = $this->lang->release->browse;
|
||||
$this->view->releases = $this->projectrelease->getList($productID, $branch, $type);
|
||||
$this->view->type = $type;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($productID, $branch = 0)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$releaseID = $this->projectrelease->create($productID, $branch);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('release', $releaseID, 'opened');
|
||||
|
||||
$this->executeHooks($releaseID);
|
||||
|
||||
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadProductBuilds($productID)"));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
|
||||
}
|
||||
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'notrunk|withbranch', false);
|
||||
$releaseBuilds = $this->projectrelease->getReleaseBuilds($productID, $branch);
|
||||
foreach($releaseBuilds as $build) unset($builds[$build]);
|
||||
unset($builds['trunk']);
|
||||
|
||||
$this->commonAction($productID, $branch);
|
||||
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->position[] = $this->lang->release->create;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->lastRelease = $this->projectrelease->getLast($productID, $branch);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($releaseID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->projectrelease->update($releaseID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$files = $this->loadModel('file')->saveUpload('release', $releaseID);
|
||||
if($changes or $files)
|
||||
{
|
||||
$fileAction = '';
|
||||
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
|
||||
$actionID = $this->loadModel('action')->create('release', $releaseID, 'Edited', $fileAction);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($releaseID);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
|
||||
}
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('build');
|
||||
|
||||
/* Get release and build. */
|
||||
$release = $this->projectrelease->getById((int)$releaseID);
|
||||
$this->commonAction($release->product, $release->branch);
|
||||
$build = $this->build->getById($release->build);
|
||||
|
||||
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->edit;
|
||||
$this->view->position[] = $this->lang->release->edit;
|
||||
$this->view->release = $release;
|
||||
$this->view->build = $build;
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($release->product, $release->branch, 'notrunk|withbranch', false);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* View a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @param string $link
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
if($type == 'story') $this->session->set('storyList', $this->app->getURI(true));
|
||||
if($type == 'bug' or $type == 'leftBug') $this->session->set('bugList', $this->app->getURI(true));
|
||||
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('bug');
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
|
||||
|
||||
$release = $this->projectrelease->getById((int)$releaseID, true);
|
||||
if(!$release) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
|
||||
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
|
||||
->beginIF($type == 'story')->orderBy($orderBy)->fi()
|
||||
->page($storyPager)
|
||||
->fetchAll('id');
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
|
||||
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($release->stories)->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage');
|
||||
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
|
||||
|
||||
$bugPager = new pager($type == 'bug' ? $recTotal : 0, $recPerPage, $type == 'bug' ? $pageID : 1);
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->bugs)->andWhere('deleted')->eq(0)
|
||||
->beginIF($type == 'bug')->orderBy($orderBy)->fi()
|
||||
->page($bugPager)
|
||||
->fetchAll();
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'linkedBug');
|
||||
|
||||
$leftBugPager = new pager($type == 'leftBug' ? $recTotal : 0, $recPerPage, $type == 'leftBug' ? $pageID : 1);
|
||||
$leftBugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->leftBugs)->andWhere('deleted')->eq(0)
|
||||
->beginIF($type == 'leftBug')->orderBy($orderBy)->fi()
|
||||
->page($leftBugPager)
|
||||
->fetchAll();
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'leftBugs');
|
||||
|
||||
$this->commonAction($release->product);
|
||||
$product = $this->product->getById($release->product);
|
||||
|
||||
$this->executeHooks($releaseID);
|
||||
|
||||
$this->view->title = "RELEASE #$release->id $release->name/" . $product->name;
|
||||
$this->view->position[] = $this->lang->release->view;
|
||||
$this->view->release = $release;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->leftBugs = $leftBugs;
|
||||
$this->view->actions = $this->loadModel('action')->getList('release', $releaseID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->type = $type;
|
||||
$this->view->link = $link;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->branchName = $release->productType == 'normal' ? '' : $this->loadModel('branch')->getById($release->branch);
|
||||
$this->view->storyPager = $storyPager;
|
||||
$this->view->bugPager = $bugPager;
|
||||
$this->view->leftBugPager = $leftBugPager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Export the stories of release to HTML.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function export()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$type = $this->post->type;
|
||||
$html = '';
|
||||
|
||||
if($type == 'story' or $type == 'all')
|
||||
{
|
||||
$html .= "<h3>{$this->lang->release->stories}</h3>";
|
||||
$this->loadModel('story');
|
||||
|
||||
$stories = $this->dao->select('id, title')->from(TABLE_STORY)->where($this->session->storyQueryCondition)
|
||||
->beginIF($this->session->storyOrderBy != false)->orderBy($this->session->storyOrderBy)->fi()
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($stories as $story) $story->title = "<a href='" . common::getSysURL() . $this->createLink('story', 'view', "storyID=$story->id") . "' target='_blank'>$story->title</a>";
|
||||
|
||||
$fields = array('id' => $this->lang->story->id, 'title' => $this->lang->story->title);
|
||||
$rows = $stories;
|
||||
|
||||
$html .= '<table><tr>';
|
||||
foreach($fields as $fieldLabel) $html .= "<th><nobr>$fieldLabel</nobr></th>\n";
|
||||
$html .= '</tr>';
|
||||
foreach($rows as $row)
|
||||
{
|
||||
$html .= "<tr valign='top'>\n";
|
||||
foreach($fields as $fieldName => $fieldLabel)
|
||||
{
|
||||
$fieldValue = isset($row->$fieldName) ? $row->$fieldName : '';
|
||||
$html .= "<td><nobr>$fieldValue</nobr></td>\n";
|
||||
}
|
||||
$html .= "</tr>\n";
|
||||
}
|
||||
$html .= '</table>';
|
||||
}
|
||||
|
||||
if($type == 'bug' or $type == 'all')
|
||||
{
|
||||
$html .= "<h3>{$this->lang->release->bugs}</h3>";
|
||||
$this->loadModel('bug');
|
||||
|
||||
$bugs = $this->dao->select('id, title')->from(TABLE_BUG)->where($this->session->linkedBugQueryCondition)
|
||||
->beginIF($this->session->bugOrderBy != false)->orderBy($this->session->bugOrderBy)->fi()
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($bugs as $bug) $bug->title = "<a href='" . common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id") . "' target='_blank'>$bug->title</a>";
|
||||
|
||||
$fields = array('id' => $this->lang->bug->id, 'title' => $this->lang->bug->title);
|
||||
$rows = $bugs;
|
||||
|
||||
$html .= '<table><tr>';
|
||||
foreach($fields as $fieldLabel) $html .= "<th><nobr>$fieldLabel</nobr></th>\n";
|
||||
$html .= '</tr>';
|
||||
foreach($rows as $row)
|
||||
{
|
||||
$html .= "<tr valign='top'>\n";
|
||||
foreach($fields as $fieldName => $fieldLabel)
|
||||
{
|
||||
$fieldValue = isset($row->$fieldName) ? $row->$fieldName : '';
|
||||
$html .= "<td><nobr>$fieldValue</nobr></td>\n";
|
||||
}
|
||||
$html .= "</tr>\n";
|
||||
}
|
||||
$html .= '</table>';
|
||||
}
|
||||
|
||||
if($type == 'leftbug' or $type == 'all')
|
||||
{
|
||||
$html .= "<h3>{$this->lang->release->generatedBugs}</h3>";
|
||||
|
||||
$bugs = $this->dao->select('id, title')->from(TABLE_BUG)->where($this->session->leftBugsQueryCondition)
|
||||
->beginIF($this->session->bugOrderBy != false)->orderBy($this->session->bugOrderBy)->fi()
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($bugs as $bug) $bug->title = "<a href='" . common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id") . "' target='_blank'>$bug->title</a>";
|
||||
|
||||
$fields = array('id' => $this->lang->bug->id, 'title' => $this->lang->bug->title);
|
||||
$rows = $bugs;
|
||||
|
||||
$html .= '<table><tr>';
|
||||
foreach($fields as $fieldLabel) $html .= "<th><nobr>$fieldLabel</nobr></th>\n";
|
||||
$html .= '</tr>';
|
||||
foreach($rows as $row)
|
||||
{
|
||||
$html .= "<tr valign='top'>\n";
|
||||
foreach($fields as $fieldName => $fieldLabel)
|
||||
{
|
||||
$fieldValue = isset($row->$fieldName) ? $row->$fieldName : '';
|
||||
$html .= "<td><nobr>$fieldValue</nobr></td>\n";
|
||||
}
|
||||
$html .= "</tr>\n";
|
||||
}
|
||||
$html .= '</table>';
|
||||
}
|
||||
|
||||
$html = "<html><head><meta charset='utf-8'><title>{$this->post->fileName}</title><style>table, th, td{font-size:12px; border:1px solid gray; border-collapse:collapse;}</style></head><body>$html</body></html>";
|
||||
die($this->fetch('file', 'sendDownHeader', array('fileName' => $this->post->fileName, 'html', $html)));
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Link stories
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkStory($releaseID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
if(!empty($_POST['stories']))
|
||||
{
|
||||
$this->projectrelease->linkStory($releaseID);
|
||||
die(js::locate(inlink('view', "releaseID=$releaseID&type=story"), 'parent'));
|
||||
}
|
||||
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
|
||||
|
||||
$release = $this->projectrelease->getById($releaseID);
|
||||
$build = $this->loadModel('build')->getByID($release->build);
|
||||
$this->commonAction($release->product);
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('product');
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Build search form. */
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
unset($this->config->product->search['fields']['product']);
|
||||
unset($this->config->product->search['fields']['project']);
|
||||
$this->config->product->search['actionURL'] = $this->createLink('release', 'view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
|
||||
$this->config->product->search['queryID'] = $queryID;
|
||||
$this->config->product->search['style'] = 'simple';
|
||||
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
|
||||
$this->config->product->search['params']['module']['values'] = $this->tree->getOptionMenu($release->product, $viewType = 'story', $startModuleID = 0);
|
||||
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList);
|
||||
if($this->session->currentProductType == 'normal')
|
||||
{
|
||||
unset($this->config->product->search['fields']['branch']);
|
||||
unset($this->config->product->search['params']['branch']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->config->product->search['fields']['branch'] = $this->lang->product->branch;
|
||||
$branches = array('' => '') + $this->loadModel('branch')->getPairs($release->product, 'noempty');
|
||||
if($release->branch) $branches = array('' => '', $release->branch => $branches[$release->branch]);
|
||||
$this->config->product->search['params']['branch']['values'] = $branches;
|
||||
}
|
||||
$this->loadModel('search')->setSearchParams($this->config->product->search);
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allStories = $this->story->getBySearch($release->product, $release->branch, $queryID, 'id', $build->project ? $build->project : '', 'story', $release->stories, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
$allStories = $this->story->getProjectStories($build->project, 't1.`order`_desc', 'byProduct', $release->product, 'story', $release->stories, $pager);
|
||||
}
|
||||
|
||||
$this->view->allStories = $allStories;
|
||||
$this->view->release = $release;
|
||||
$this->view->releaseStories = empty($release->stories) ? array() : $this->story->getByList($release->stories);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkStory($releaseID, $storyID)
|
||||
{
|
||||
$this->projectrelease->unlinkStory($releaseID, $storyID);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
$this->send($response);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchUnlinkStory($releaseID)
|
||||
{
|
||||
$this->projectrelease->batchUnlinkStory($releaseID);
|
||||
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=story"), 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Link bugs.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkBug($releaseID = 0, $browseType = '', $param = 0, $type = 'bug', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
if(!empty($_POST['bugs']))
|
||||
{
|
||||
$this->projectrelease->linkBug($releaseID, $type);
|
||||
die(js::locate(inlink('view', "releaseID=$releaseID&type=$type"), 'parent'));
|
||||
}
|
||||
|
||||
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
|
||||
/* Set menu. */
|
||||
$release = $this->projectrelease->getByID($releaseID);
|
||||
$build = $this->loadModel('build')->getByID($release->build);
|
||||
$this->commonAction($release->product);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Build the search form. */
|
||||
$this->loadModel('bug');
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
unset($this->config->bug->search['fields']['product']);
|
||||
$this->config->bug->search['actionURL'] = $this->createLink('release', 'view', "releaseID=$releaseID&type=$type&link=true¶m=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
|
||||
$this->config->bug->search['queryID'] = $queryID;
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product);
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
|
||||
if($this->session->currentProductType == 'normal')
|
||||
{
|
||||
unset($this->config->bug->search['fields']['branch']);
|
||||
unset($this->config->bug->search['params']['branch']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->config->bug->search['fields']['branch'] = $this->lang->product->branch;
|
||||
$branches = array('' => '') + $this->loadModel('branch')->getPairs($release->product, 'noempty');
|
||||
if($release->branch) $branches = array('' => '', $release->branch => $branches[$release->branch]);
|
||||
$this->config->bug->search['params']['branch']['values'] = $branches;
|
||||
}
|
||||
$this->loadModel('search')->setSearchParams($this->config->bug->search);
|
||||
|
||||
$allBugs = array();
|
||||
$releaseBugs = $type == 'bug' ? $release->bugs : $release->leftBugs;
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allBugs = $this->bug->getBySearch($release->product, $release->branch, $queryID, 'id_desc', $releaseBugs, $pager);
|
||||
}
|
||||
elseif($build->project)
|
||||
{
|
||||
if($type == 'bug')
|
||||
{
|
||||
$allBugs = $this->bug->getReleaseBugs($build->id, $release->product, $release->branch, $releaseBugs, $pager);
|
||||
}
|
||||
elseif($type == 'leftBug')
|
||||
{
|
||||
$allBugs = $this->bug->getProductLeftBugs($build->id, $release->product, $release->branch, $releaseBugs, $pager);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->allBugs = $allBugs;
|
||||
$this->view->releaseBugs = empty($releaseBugs) ? array() : $this->bug->getByList($releaseBugs);
|
||||
$this->view->release = $release;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->type = $type;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $bugID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkBug($releaseID, $bugID, $type = 'bug')
|
||||
{
|
||||
$this->projectrelease->unlinkBug($releaseID, $bugID, $type);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
$this->send($response);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchUnlinkBug($releaseID, $type = 'bug')
|
||||
{
|
||||
$this->projectrelease->batchUnlinkBug($releaseID, $type);
|
||||
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=$type"), 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change status.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function changeStatus($releaseID, $status)
|
||||
{
|
||||
$this->projectrelease->changeStatus($releaseID, $status);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('release', $releaseID, 'changestatus', '', $status);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
#releaseList {font-size: 13px;}
|
||||
td{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
.contentDiv { height:190px; overflow-y:auto; margin-bottom: 10px!important}
|
||||
.contentDiv .panel-heading {line-height: 14px;}
|
||||
.checkbox-primary{display:inline-block;}
|
||||
@@ -0,0 +1,3 @@
|
||||
.table-form > tbody > tr > td > .row > [class*="col-"] .panel-heading {line-height: 16px}
|
||||
.contentDiv { height:190px; overflow-y:auto; margin-bottom: 10px!important}
|
||||
.contentDiv .panel-heading {line-height: 14px;}
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
.checkbox.btn{margin-top:0px}
|
||||
#releaseInfo > div {padding-top: 15px;}
|
||||
|
||||
.linkBox #queryBox .search-form .form-actions {padding-bottom: 5px;}
|
||||
.linkBox .table-header {padding: 8px 15px; border-bottom: 1px solid #cbd0db;}
|
||||
#unlinkStoryList, #unlinkBugList, #unlinkLeftBugList {border-top: 1px solid #cbd0db;}
|
||||
|
||||
#tabsNav .nav-tabs > li.pull-right {margin-right: 120px; margin-top: -5px}
|
||||
#tabsNav .nav-tabs > li.active + li.pull-right {margin-right: 0;}
|
||||
ol, ul { padding-left: 20px; }
|
||||
@@ -0,0 +1,4 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.preview").modalTrigger({width:1000, type:'iframe'});
|
||||
})
|
||||
@@ -0,0 +1,72 @@
|
||||
function showLink(releaseID, type, param)
|
||||
{
|
||||
var method = type == 'story' ? 'linkStory' : 'linkBug';
|
||||
if(typeof(param) == 'undefined') param = '&browseType=' + type + '¶m=0';
|
||||
if(type == 'leftBug') param += '&type=leftBug';
|
||||
loadURL(createLink('release', method, 'releaseID=' + releaseID + param), type);
|
||||
|
||||
$('.actions').find("a[href*='" + type + "']").addClass('hidden');
|
||||
}
|
||||
|
||||
/**
|
||||
* Load URL.
|
||||
*
|
||||
* @param string $url
|
||||
* @param string$type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadURL(url, type)
|
||||
{
|
||||
$.get(url, function(data)
|
||||
{
|
||||
var $pane = $(type == 'story' ? '#stories' : (type == 'leftBug' ? '#leftBugs' : '#bugs'));
|
||||
$pane.find('.main-table').hide();
|
||||
var $linkBox = $pane.find('.linkBox');
|
||||
$linkBox.html(data).removeClass('hidden');
|
||||
$linkBox.find('[data-ride="table"]').table();
|
||||
$linkBox.find('[data-ride="pager"]').pager();
|
||||
$linkBox.find('[data-ride="pager"] li a.pager-item').click(function()
|
||||
{
|
||||
loadURL($(this).attr('href'), type);
|
||||
return false;
|
||||
});
|
||||
$linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').off('click');
|
||||
$linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').click(function()
|
||||
{
|
||||
line = $linkBox.find('[data-ride="pager"]').attr('data-link-creator');
|
||||
line = line.replace('{recPerPage}', $(this).attr('data-size')).replace('{page}', $linkBox.find('[data-ride="pager"]').attr('data-page'));
|
||||
$.cookie($linkBox.find('[data-ride="pager"]').attr('data-page-cookie'), $(this).attr('data-size'), {expires:config.cookieLife, path:config.webRoot});
|
||||
loadURL(line, type);
|
||||
return false;
|
||||
});
|
||||
$.toggleQueryBox(true, $linkBox.find('#queryBox'));
|
||||
});
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
if(link == 'true') showLink(releaseID, type, param);
|
||||
var infoShowed = false;
|
||||
$('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e)
|
||||
{
|
||||
var href = $(e.target).attr('href');
|
||||
var tabPane = $(href + '.tab-pane');
|
||||
if(tabPane.size() == 0) return;
|
||||
var formID = tabPane.find('.linkBox').find('form:last');
|
||||
if(formID.size() == 0) formID = tabPane.find('form:last');
|
||||
|
||||
if(href == '#releaseInfo' && !infoShowed)
|
||||
{
|
||||
var $tr = $('#releaseInfo .detail-content .table-data tbody tr:first');
|
||||
width = $tr.width() - $tr.find('th').width();
|
||||
$('#releaseInfo img').each(function()
|
||||
{
|
||||
if($(this).parent().prop('tagName').toLowerCase() == 'a') $(this).unwrap();
|
||||
setImageSize($(this), width, 0);
|
||||
});
|
||||
|
||||
infoShowed = true;
|
||||
}
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The release module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: en.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->release->common = 'Release';
|
||||
$lang->release->create = "Erstellen";
|
||||
$lang->release->edit = "Bearbeiten";
|
||||
$lang->release->linkStory = "Story verknüpfen";
|
||||
$lang->release->linkBug = "Bug verknüpfen";
|
||||
$lang->release->delete = "Löschen";
|
||||
$lang->release->deleted = 'Gelöscht';
|
||||
$lang->release->view = "Übersicht";
|
||||
$lang->release->browse = "Durchsuchen";
|
||||
$lang->release->changeStatus = "Status ändern";
|
||||
$lang->release->batchUnlink = "Mehrere entfernen";
|
||||
$lang->release->batchUnlinkStory = "Mehrere Storys entfernen";
|
||||
$lang->release->batchUnlinkBug = "Mehrere Bugs entfernen";
|
||||
|
||||
$lang->release->confirmDelete = "Möchten Sie dieses Releas löschen?";
|
||||
$lang->release->confirmUnlinkStory = "Möchten Sie diese Story löschen?";
|
||||
$lang->release->confirmUnlinkBug = "Möchten Sie diesen Bug löschen?";
|
||||
$lang->release->existBuild = '『Build』『%s』 existiert bereits. Sie können den 『name』 ändern oder ein anderes 『build』 wählen.';
|
||||
$lang->release->noRelease = 'Keine Releases. ';
|
||||
$lang->release->errorDate = 'The release date should not be greater than today.';
|
||||
|
||||
$lang->release->basicInfo = 'Basis Info';
|
||||
|
||||
$lang->release->id = 'ID';
|
||||
$lang->release->product = $lang->productCommon;
|
||||
$lang->release->branch = 'Platform/Branch';
|
||||
$lang->release->build = 'Build';
|
||||
$lang->release->name = 'Name';
|
||||
$lang->release->marker = 'Meilensteine';
|
||||
$lang->release->date = 'Datum';
|
||||
$lang->release->desc = 'Beschreibung';
|
||||
$lang->release->status = 'Status';
|
||||
$lang->release->subStatus = 'Sub Status';
|
||||
$lang->release->last = 'Letztes Release';
|
||||
$lang->release->unlinkStory = 'Story entfernen';
|
||||
$lang->release->unlinkBug = 'Bug entfernen';
|
||||
$lang->release->stories = 'Abgeschlossene Story';
|
||||
$lang->release->bugs = 'Gelöste Bugs';
|
||||
$lang->release->leftBugs = 'Verbleibende Bugs';
|
||||
$lang->release->generatedBugs = 'Gemeldete Bugs';
|
||||
$lang->release->finishStories = 'Abgeschlossene %s Storys';
|
||||
$lang->release->resolvedBugs = 'Gelöste %s Bugs';
|
||||
$lang->release->createdBugs = 'Erstellte %s Bugs';
|
||||
$lang->release->export = 'Export as HTML';
|
||||
$lang->release->yesterday = 'Gestern veröffentlicht';
|
||||
$lang->release->all = 'All';
|
||||
|
||||
$lang->release->filePath = 'Download : ';
|
||||
$lang->release->scmPath = 'SCM Pfad : ';
|
||||
|
||||
$lang->release->exportTypeList['all'] = 'Alle';
|
||||
$lang->release->exportTypeList['story'] = 'Story';
|
||||
$lang->release->exportTypeList['bug'] = 'Bug';
|
||||
$lang->release->exportTypeList['leftbug'] = 'Ungelöste Bugs';
|
||||
|
||||
$lang->release->statusList[''] = '';
|
||||
$lang->release->statusList['normal'] = 'Normal';
|
||||
$lang->release->statusList['terminate'] = 'Terminiert';
|
||||
|
||||
$lang->release->changeStatusList['normal'] = 'Aktiviert';
|
||||
$lang->release->changeStatusList['terminate'] = 'Terminiert';
|
||||
|
||||
$lang->release->action = new stdclass();
|
||||
$lang->release->action->changestatus = array('main' => '$date, 由 <strong>$actor</strong> $extra。', 'extra' => 'changeStatusList');
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The release module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: en.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->release->common = 'Release';
|
||||
$lang->release->create = "Create Release";
|
||||
$lang->release->edit = "Edit Release";
|
||||
$lang->release->linkStory = "Link Story";
|
||||
$lang->release->linkBug = "Link Bug";
|
||||
$lang->release->delete = "Delete Release";
|
||||
$lang->release->deleted = 'Deleted';
|
||||
$lang->release->view = "Release Detail";
|
||||
$lang->release->browse = "Release List";
|
||||
$lang->release->changeStatus = "Change Status";
|
||||
$lang->release->batchUnlink = "Batch Unlink";
|
||||
$lang->release->batchUnlinkStory = "Batch Unlink Stories";
|
||||
$lang->release->batchUnlinkBug = "Batch Unlink Bugs";
|
||||
|
||||
$lang->release->confirmDelete = "Do you want to delete this release?";
|
||||
$lang->release->confirmUnlinkStory = "Do you want to remove this story?";
|
||||
$lang->release->confirmUnlinkBug = "Do you want to remove this bug?";
|
||||
$lang->release->existBuild = '『Build』『%s』existed. You could change『name』or choose a『build』.';
|
||||
$lang->release->noRelease = 'No releases yet.';
|
||||
$lang->release->errorDate = 'The release date should not be greater than today.';
|
||||
|
||||
$lang->release->basicInfo = 'Basic Info';
|
||||
|
||||
$lang->release->id = 'ID';
|
||||
$lang->release->product = $lang->productCommon;
|
||||
$lang->release->branch = 'Platform/Branch';
|
||||
$lang->release->build = 'Build';
|
||||
$lang->release->name = 'Name';
|
||||
$lang->release->marker = 'Milestone';
|
||||
$lang->release->date = 'Release Date';
|
||||
$lang->release->desc = 'Description';
|
||||
$lang->release->status = 'Status';
|
||||
$lang->release->subStatus = 'Sub Status';
|
||||
$lang->release->last = 'Last Release';
|
||||
$lang->release->unlinkStory = 'Unlink Story';
|
||||
$lang->release->unlinkBug = 'Unlink Bug';
|
||||
$lang->release->stories = 'Finished Story';
|
||||
$lang->release->bugs = 'Resolved Bug';
|
||||
$lang->release->leftBugs = 'Active Bug';
|
||||
$lang->release->generatedBugs = 'Active Bug';
|
||||
$lang->release->finishStories = 'Finished %s Stories';
|
||||
$lang->release->resolvedBugs = 'Resolved %s Bugs';
|
||||
$lang->release->createdBugs = 'Unresolved %s Bug';
|
||||
$lang->release->export = 'Export as HTML';
|
||||
$lang->release->yesterday = 'Released Yesterday';
|
||||
$lang->release->all = 'All';
|
||||
|
||||
$lang->release->filePath = 'Download : ';
|
||||
$lang->release->scmPath = 'SCM Path : ';
|
||||
|
||||
$lang->release->exportTypeList['all'] = 'All';
|
||||
$lang->release->exportTypeList['story'] = 'Story';
|
||||
$lang->release->exportTypeList['bug'] = 'Bug';
|
||||
$lang->release->exportTypeList['leftbug'] = 'Active Bug';
|
||||
|
||||
$lang->release->statusList[''] = '';
|
||||
$lang->release->statusList['normal'] = 'Active';
|
||||
$lang->release->statusList['terminate'] = 'Terminated';
|
||||
|
||||
$lang->release->changeStatusList['normal'] = 'Active';
|
||||
$lang->release->changeStatusList['terminate'] = 'Terminated';
|
||||
|
||||
$lang->release->action = new stdclass();
|
||||
$lang->release->action->changestatus = array('main' => '$date, $extra by <strong>$actor</strong>', 'extra' => 'changeStatusList');
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The release module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: en.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link https://www.zentao.pm
|
||||
*/
|
||||
$lang->release->common = 'Release';
|
||||
$lang->release->create = "Créer Release";
|
||||
$lang->release->edit = "Editer Release";
|
||||
$lang->release->linkStory = "Intégrer Story";
|
||||
$lang->release->linkBug = "Intégrer Bug";
|
||||
$lang->release->delete = "Supprimer Release";
|
||||
$lang->release->deleted = 'Supprimée';
|
||||
$lang->release->view = "Détail Release";
|
||||
$lang->release->browse = "Liste Release";
|
||||
$lang->release->changeStatus = "Change Statut";
|
||||
$lang->release->batchUnlink = "Retirer par Lot";
|
||||
$lang->release->batchUnlinkStory = "Retirer Stories par Lot";
|
||||
$lang->release->batchUnlinkBug = "Retirer Bugs par Lot";
|
||||
|
||||
$lang->release->confirmDelete = "Voulez-vous réellement supprimer cette release ?";
|
||||
$lang->release->confirmUnlinkStory = "Voulez-vous retirer cette story de la release ?";
|
||||
$lang->release->confirmUnlinkBug = "Voulez-vous retirer ce bug de la release ?";
|
||||
$lang->release->existBuild = '『Build』『%s』existant. Vous pouvez changer『name』ou choisir un『build』.';
|
||||
$lang->release->noRelease = 'Pas de release à ce jour.';
|
||||
$lang->release->errorDate = "La date de release ne doit pas être supérieure à aujourd'hui.";
|
||||
|
||||
$lang->release->basicInfo = 'Infos de Base';
|
||||
|
||||
$lang->release->id = 'ID';
|
||||
$lang->release->product = $lang->productCommon;
|
||||
$lang->release->branch = 'Plateforme/Branche';
|
||||
$lang->release->build = 'Build';
|
||||
$lang->release->name = 'Nom';
|
||||
$lang->release->marker = 'Etape Importante';
|
||||
$lang->release->date = 'Date Release';
|
||||
$lang->release->desc = 'Description';
|
||||
$lang->release->status = 'Statut';
|
||||
$lang->release->subStatus = 'Sous-statut';
|
||||
$lang->release->last = 'Dernière Release';
|
||||
$lang->release->unlinkStory = 'Retirer Story';
|
||||
$lang->release->unlinkBug = 'Retirer Bug';
|
||||
$lang->release->stories = 'Stories Terminées';
|
||||
$lang->release->bugs = 'Bugs Résolus';
|
||||
$lang->release->leftBugs = 'Bugs Actifs';
|
||||
$lang->release->generatedBugs = 'Bugs Actifs';
|
||||
$lang->release->finishStories = '%s Stories Terminées';
|
||||
$lang->release->resolvedBugs = '%s Bugs Résolus';
|
||||
$lang->release->createdBugs = '%s Bugs non résolus';
|
||||
$lang->release->export = 'Export HTML';
|
||||
$lang->release->yesterday = 'Versionné Hier';
|
||||
$lang->release->all = 'Tout';
|
||||
|
||||
$lang->release->filePath = 'Télecharger : ';
|
||||
$lang->release->scmPath = 'SCM Path : ';
|
||||
|
||||
$lang->release->exportTypeList['all'] = 'Tous';
|
||||
$lang->release->exportTypeList['story'] = 'Story';
|
||||
$lang->release->exportTypeList['bug'] = 'Bug';
|
||||
$lang->release->exportTypeList['leftbug'] = 'Bug Actifs';
|
||||
|
||||
$lang->release->statusList[''] = '';
|
||||
$lang->release->statusList['normal'] = 'Normale';
|
||||
$lang->release->statusList['terminate'] = 'Terminée';
|
||||
|
||||
$lang->release->changeStatusList['normal'] = 'Active';
|
||||
$lang->release->changeStatusList['terminate'] = 'Terminée';
|
||||
|
||||
$lang->release->action = new stdclass();
|
||||
$lang->release->action->changestatus = array('main' => '$date, $extra par <strong>$actor</strong>', 'extra' => 'changeStatusList');
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The release module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Nguyễn Quốc Nho <quocnho@gmail.com>
|
||||
* @package release
|
||||
* @version $Id: vi.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->release->common = 'Phát hành';
|
||||
$lang->release->create = "Tạo phát hành";
|
||||
$lang->release->edit = "Sửa phát hành";
|
||||
$lang->release->linkStory = "Liên kết câu chuyện";
|
||||
$lang->release->linkBug = "Liên kết Bug";
|
||||
$lang->release->delete = "Xóa phát hành";
|
||||
$lang->release->deleted = 'Đã xóa';
|
||||
$lang->release->view = "Chi tiết phát hành";
|
||||
$lang->release->browse = "Danh sách phát hành";
|
||||
$lang->release->changeStatus = "Thay đổi tình trạng";
|
||||
$lang->release->batchUnlink = "Hủy liên kết hàng loạt";
|
||||
$lang->release->batchUnlinkStory = "Hủy liên kết câu chuyện hàng loạt";
|
||||
$lang->release->batchUnlinkBug = "Hủy liên kết Bug hàng loạt";
|
||||
|
||||
$lang->release->confirmDelete = "Bạn có muốn xóa phát hành này?";
|
||||
$lang->release->confirmUnlinkStory = "Bạn có muốn gỡ câu chuyện này?";
|
||||
$lang->release->confirmUnlinkBug = "Bạn có muốn gỡ bug này?";
|
||||
$lang->release->existBuild = '『Bản dựng』 『%s』 đã tồn tại. Bạn có thể thay đổi 『Tên』 hoặc chọn một 『Bản dựng』.';
|
||||
$lang->release->noRelease = 'Không có phát hành nào';
|
||||
$lang->release->errorDate = 'Ngày phát hành này không nên lớn hơn Hôm nay.';
|
||||
|
||||
$lang->release->basicInfo = 'Thông tin cơ bản';
|
||||
|
||||
$lang->release->id = 'ID';
|
||||
$lang->release->product = $lang->productCommon;
|
||||
$lang->release->branch = 'Platform/Branch';
|
||||
$lang->release->build = 'Bản dựng';
|
||||
$lang->release->name = 'Tên';
|
||||
$lang->release->marker = 'Cột mốc';
|
||||
$lang->release->date = 'Ngày';
|
||||
$lang->release->desc = 'Mô tả';
|
||||
$lang->release->status = 'Tình trạng';
|
||||
$lang->release->subStatus = 'Tình trạng con';
|
||||
$lang->release->last = 'Phát hành gần nhất';
|
||||
$lang->release->unlinkStory = 'Hủy liên kết câu chuyện';
|
||||
$lang->release->unlinkBug = 'Hủy liên kết Bug';
|
||||
$lang->release->stories = 'Câu chuyện đã kết thúc';
|
||||
$lang->release->bugs = 'Bug đã giải quyết';
|
||||
$lang->release->leftBugs = 'Kích hoạt Bug';
|
||||
$lang->release->generatedBugs = 'Kích hoạt Bug';
|
||||
$lang->release->finishStories = 'Câu chuyện %s đã kết thúc';
|
||||
$lang->release->resolvedBugs = 'Bugs %s đã giải quyết';
|
||||
$lang->release->createdBugs = 'Bug %s chưa được giải quyết';
|
||||
$lang->release->export = 'Xuất ra HTML';
|
||||
$lang->release->yesterday = 'Phát hành hôm qua';
|
||||
$lang->release->all = 'Tất cả';
|
||||
|
||||
$lang->release->filePath = 'Tải về : ';
|
||||
$lang->release->scmPath = 'SCM Path : ';
|
||||
|
||||
$lang->release->exportTypeList['all'] = 'Tất cả';
|
||||
$lang->release->exportTypeList['story'] = 'Câu chuyện';
|
||||
$lang->release->exportTypeList['bug'] = 'Bug';
|
||||
$lang->release->exportTypeList['leftbug'] = 'Kích hoạt Bug';
|
||||
|
||||
$lang->release->statusList[''] = '';
|
||||
$lang->release->statusList['normal'] = 'Kích hoạt';
|
||||
$lang->release->statusList['terminate'] = 'Hoàn thành';
|
||||
|
||||
$lang->release->changeStatusList['normal'] = 'Kích hoạt';
|
||||
$lang->release->changeStatusList['terminate'] = 'Hoàn thành';
|
||||
|
||||
$lang->release->action = new stdclass();
|
||||
$lang->release->action->changestatus = array('main' => '$date, $extra bởi <strong>$actor</strong>', 'extra' => 'changeStatusList');
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The release module zh-cn file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: zh-cn.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->release->common = '发布';
|
||||
$lang->release->create = "创建发布";
|
||||
$lang->release->edit = "编辑发布";
|
||||
$lang->release->linkStory = "关联{$lang->storyCommon}";
|
||||
$lang->release->linkBug = "关联Bug";
|
||||
$lang->release->delete = "删除发布";
|
||||
$lang->release->deleted = '已删除';
|
||||
$lang->release->view = "发布详情";
|
||||
$lang->release->browse = "浏览发布";
|
||||
$lang->release->changeStatus = "修改状态";
|
||||
$lang->release->batchUnlink = "批量移除";
|
||||
$lang->release->batchUnlinkStory = "批量移除{$lang->storyCommon}";
|
||||
$lang->release->batchUnlinkBug = "批量移除Bug";
|
||||
|
||||
$lang->release->confirmDelete = "您确认删除该发布吗?";
|
||||
$lang->release->confirmUnlinkStory = "您确认移除该{$lang->storyCommon}吗?";
|
||||
$lang->release->confirmUnlinkBug = "您确认移除该Bug吗?";
|
||||
$lang->release->existBuild = '『版本』已经有『%s』这条记录了。您可以更改『发布名称』或者选择一个『版本』。';
|
||||
$lang->release->noRelease = '暂时没有发布。';
|
||||
$lang->release->errorDate = '发布日期不能大于今天。';
|
||||
|
||||
$lang->release->basicInfo = '基本信息';
|
||||
|
||||
$lang->release->id = 'ID';
|
||||
$lang->release->product = $lang->productCommon;
|
||||
$lang->release->branch = '平台/分支';
|
||||
$lang->release->build = '版本';
|
||||
$lang->release->name = '发布名称';
|
||||
$lang->release->marker = '里程碑';
|
||||
$lang->release->date = '发布日期';
|
||||
$lang->release->desc = '描述';
|
||||
$lang->release->status = '状态';
|
||||
$lang->release->subStatus = '子状态';
|
||||
$lang->release->last = '上次发布';
|
||||
$lang->release->unlinkStory = "移除{$lang->storyCommon}";
|
||||
$lang->release->unlinkBug = '移除Bug';
|
||||
$lang->release->stories = "完成的{$lang->storyCommon}";
|
||||
$lang->release->bugs = '解决的Bug';
|
||||
$lang->release->leftBugs = '遗留的Bug';
|
||||
$lang->release->generatedBugs = '遗留的Bug';
|
||||
$lang->release->finishStories = "本次共完成 %s 个{$lang->storyCommon}";
|
||||
$lang->release->resolvedBugs = '本次共解决 %s 个Bug';
|
||||
$lang->release->createdBugs = '本次共遗留 %s 个Bug';
|
||||
$lang->release->export = '导出HTML';
|
||||
$lang->release->yesterday = '昨日发布';
|
||||
$lang->release->all = '所有';
|
||||
|
||||
$lang->release->filePath = '下载地址:';
|
||||
$lang->release->scmPath = '版本库地址:';
|
||||
|
||||
$lang->release->exportTypeList['all'] = '所有';
|
||||
$lang->release->exportTypeList['story'] = $lang->storyCommon;
|
||||
$lang->release->exportTypeList['bug'] = 'Bug';
|
||||
$lang->release->exportTypeList['leftbug'] = '遗留Bug';
|
||||
|
||||
$lang->release->statusList[''] = '';
|
||||
$lang->release->statusList['normal'] = '正常';
|
||||
$lang->release->statusList['terminate'] = '停止维护';
|
||||
|
||||
$lang->release->changeStatusList['normal'] = '激活';
|
||||
$lang->release->changeStatusList['terminate'] = '停止维护';
|
||||
|
||||
$lang->release->action = new stdclass();
|
||||
$lang->release->action->changestatus = array('main' => '$date, 由 <strong>$actor</strong> $extra。', 'extra' => 'changeStatusList');
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The release module zh-tw file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: zh-tw.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->release->common = '發佈';
|
||||
$lang->release->create = "創建發佈";
|
||||
$lang->release->edit = "編輯發佈";
|
||||
$lang->release->linkStory = "關聯{$lang->storyCommon}";
|
||||
$lang->release->linkBug = "關聯Bug";
|
||||
$lang->release->delete = "刪除發佈";
|
||||
$lang->release->deleted = '已刪除';
|
||||
$lang->release->view = "發佈詳情";
|
||||
$lang->release->browse = "瀏覽發佈";
|
||||
$lang->release->changeStatus = "修改狀態";
|
||||
$lang->release->batchUnlink = "批量移除";
|
||||
$lang->release->batchUnlinkStory = "批量移除{$lang->storyCommon}";
|
||||
$lang->release->batchUnlinkBug = "批量移除Bug";
|
||||
|
||||
$lang->release->confirmDelete = "您確認刪除該發佈嗎?";
|
||||
$lang->release->confirmUnlinkStory = "您確認移除該{$lang->storyCommon}嗎?";
|
||||
$lang->release->confirmUnlinkBug = "您確認移除該Bug嗎?";
|
||||
$lang->release->existBuild = '『版本』已經有『%s』這條記錄了。您可以更改『發佈名稱』或者選擇一個『版本』。';
|
||||
$lang->release->noRelease = '暫時沒有發佈。';
|
||||
$lang->release->errorDate = '發佈日期不能大於今天。';
|
||||
|
||||
$lang->release->basicInfo = '基本信息';
|
||||
|
||||
$lang->release->id = 'ID';
|
||||
$lang->release->product = $lang->productCommon;
|
||||
$lang->release->branch = '平台/分支';
|
||||
$lang->release->build = '版本';
|
||||
$lang->release->name = '發佈名稱';
|
||||
$lang->release->marker = '里程碑';
|
||||
$lang->release->date = '發佈日期';
|
||||
$lang->release->desc = '描述';
|
||||
$lang->release->status = '狀態';
|
||||
$lang->release->subStatus = '子狀態';
|
||||
$lang->release->last = '上次發佈';
|
||||
$lang->release->unlinkStory = "移除{$lang->storyCommon}";
|
||||
$lang->release->unlinkBug = '移除Bug';
|
||||
$lang->release->stories = "完成的{$lang->storyCommon}";
|
||||
$lang->release->bugs = '解決的Bug';
|
||||
$lang->release->leftBugs = '遺留的Bug';
|
||||
$lang->release->generatedBugs = '遺留的Bug';
|
||||
$lang->release->finishStories = "本次共完成 %s 個{$lang->storyCommon}";
|
||||
$lang->release->resolvedBugs = '本次共解決 %s 個Bug';
|
||||
$lang->release->createdBugs = '本次共遺留 %s 個Bug';
|
||||
$lang->release->export = '導出HTML';
|
||||
$lang->release->yesterday = '昨日發佈';
|
||||
$lang->release->all = '所有';
|
||||
|
||||
$lang->release->filePath = '下載地址:';
|
||||
$lang->release->scmPath = '版本庫地址:';
|
||||
|
||||
$lang->release->exportTypeList['all'] = '所有';
|
||||
$lang->release->exportTypeList['story'] = $lang->storyCommon;
|
||||
$lang->release->exportTypeList['bug'] = 'Bug';
|
||||
$lang->release->exportTypeList['leftbug'] = '遺留Bug';
|
||||
|
||||
$lang->release->statusList[''] = '';
|
||||
$lang->release->statusList['normal'] = '正常';
|
||||
$lang->release->statusList['terminate'] = '停止維護';
|
||||
|
||||
$lang->release->changeStatusList['normal'] = '激活';
|
||||
$lang->release->changeStatusList['terminate'] = '停止維護';
|
||||
|
||||
$lang->release->action = new stdclass();
|
||||
$lang->release->action->changestatus = array('main' => '$date, 由 <strong>$actor</strong> $extra。', 'extra' => 'changeStatusList');
|
||||
@@ -0,0 +1,395 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: model.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class projectreleaseModel extends model
|
||||
{
|
||||
/**
|
||||
* Get release by id.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param bool $setImgSize
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByID($releaseID, $setImgSize = false)
|
||||
{
|
||||
$release = $this->dao->select('t1.*, t2.id as buildID, t2.filePath, t2.scmPath, t2.name as buildName, t2.project, t3.name as productName, t3.type as productType')
|
||||
->from(TABLE_RELEASE)->alias('t1')
|
||||
->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
|
||||
->where('t1.id')->eq((int)$releaseID)
|
||||
->orderBy('t1.id DESC')
|
||||
->fetch();
|
||||
if(!$release) return false;
|
||||
|
||||
$this->loadModel('file');
|
||||
$release = $this->file->replaceImgURL($release, 'desc');
|
||||
$release->files = $this->file->getByObject('release', $releaseID);
|
||||
if(empty($release->files))$release->files = $this->file->getByObject('build', $release->buildID);
|
||||
if($setImgSize) $release->desc = $this->file->setImgSize($release->desc);
|
||||
return $release;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of releases.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($productID, $branch = 0, $type = 'all')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.project')
|
||||
->from(TABLE_RELEASE)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
|
||||
->where('t1.product')->eq((int)$productID)
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.date DESC')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return bool | object
|
||||
*/
|
||||
public function getLast($productID, $branch = 0)
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_RELEASE)
|
||||
->where('product')->eq((int)$productID)
|
||||
->beginIF($branch)->andWhere('branch')->eq($branch)->fi()
|
||||
->orderBy('date DESC')
|
||||
->limit(1)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get release builds from product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getReleaseBuilds($productID, $branch = 0)
|
||||
{
|
||||
$releases = $this->dao->select('build')->from(TABLE_RELEASE)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('product')->eq($productID)
|
||||
->beginIF($branch)->andWhere('branch')->eq($branch)->fi()
|
||||
->fetchAll('build');
|
||||
return array_keys($releases);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function create($productID, $branch = 0)
|
||||
{
|
||||
$productID = (int)$productID;
|
||||
$branch = (int)$branch;
|
||||
$buildID = 0;
|
||||
|
||||
/* Check build if build is required. */
|
||||
if(strpos($this->config->release->create->requiredFields, 'build') !== false and $this->post->build == false) return dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->release->build);
|
||||
|
||||
/* Check date must be not more than today. */
|
||||
if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate;
|
||||
|
||||
$release = fixer::input('post')
|
||||
->add('PRJ', $this->session->PRJ)
|
||||
->add('product', (int)$productID)
|
||||
->add('branch', (int)$branch)
|
||||
->setDefault('stories', '')
|
||||
->join('stories', ',')
|
||||
->join('bugs', ',')
|
||||
->setIF($this->post->build == false, 'build', $buildID)
|
||||
->stripTags($this->config->release->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('allchecker,files,labels,uid')
|
||||
->get();
|
||||
|
||||
/* Auto create build when release is not link build. */
|
||||
if(empty($release->build) and $release->name)
|
||||
{
|
||||
$build = $this->dao->select('*')->from(TABLE_BUILD)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('name')->eq($release->name)
|
||||
->andWhere('product')->eq($productID)
|
||||
->andWhere('branch')->eq($branch)
|
||||
->fetch();
|
||||
if($build)
|
||||
{
|
||||
return dao::$errors['build'] = sprintf($this->lang->release->existBuild, $release->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$build = new stdclass();
|
||||
$build->PRJ = $this->session->PRJ;
|
||||
$build->product = (int)$productID;
|
||||
$build->branch = (int)$branch;
|
||||
$build->name = $release->name;
|
||||
$build->date = $release->date;
|
||||
$build->builder = $this->app->user->account;
|
||||
$build->desc = $release->desc;
|
||||
$build->project = 0;
|
||||
|
||||
$build = $this->loadModel('file')->processImgURL($build, $this->config->release->editor->create['id']);
|
||||
$this->dao->insert(TABLE_BUILD)->data($build)
|
||||
->autoCheck()
|
||||
->check('name', 'unique', "product = {$productID} AND branch = {$branch} AND deleted = '0'")
|
||||
->batchCheck($this->config->release->create->requiredFields, 'notempty')
|
||||
->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$buildID = $this->dao->lastInsertID();
|
||||
$release->build = $buildID;
|
||||
}
|
||||
}
|
||||
|
||||
if($release->build) $release->branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq($release->build)->fetch('branch');
|
||||
|
||||
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->create['id'], $this->post->uid);
|
||||
$this->dao->insert(TABLE_RELEASE)->data($release)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->release->create->requiredFields, 'notempty')
|
||||
->check('name', 'unique', "product = {$release->product} AND branch = {$release->branch} AND deleted = '0'");
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
if(!empty($buildID)) $this->dao->delete()->from(TABLE_BUILD)->where('id')->eq($buildID)->exec();
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->dao->exec();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
if(!empty($buildID)) $this->dao->delete()->from(TABLE_BUILD)->where('id')->eq($buildID)->exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$releaseID = $this->dao->lastInsertID();
|
||||
$this->file->updateObjectID($this->post->uid, $releaseID, 'release');
|
||||
$this->file->saveUpload('release', $releaseID);
|
||||
$this->loadModel('score')->create('release', 'create', $releaseID);
|
||||
|
||||
return $releaseID;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function update($releaseID)
|
||||
{
|
||||
$releaseID = (int)$releaseID;
|
||||
$oldRelease = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq($releaseID)->fetch();
|
||||
$branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq((int)$this->post->build)->fetch('branch');
|
||||
|
||||
$release = fixer::input('post')->stripTags($this->config->release->editor->edit['id'], $this->config->allowedTags)
|
||||
->add('branch', (int)$branch)
|
||||
->setIF(!$this->post->marker, 'marker', 0)
|
||||
->cleanInt('product')
|
||||
->remove('files,labels,allchecker,uid')
|
||||
->get();
|
||||
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->edit['id'], $this->post->uid);
|
||||
$this->dao->update(TABLE_RELEASE)->data($release)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->release->edit->requiredFields, 'notempty')
|
||||
->check('name', 'unique', "id != '$releaseID' AND product = '{$release->product}' AND branch = '$branch' AND deleted = '0'")
|
||||
->where('id')->eq((int)$releaseID)
|
||||
->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->file->updateObjectID($this->post->uid, $releaseID, 'release');
|
||||
return common::createChanges($oldRelease, $release);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Link stories
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkStory($releaseID)
|
||||
{
|
||||
$release = $this->getByID($releaseID);
|
||||
$product = $this->loadModel('product')->getByID($release->product);
|
||||
|
||||
foreach($this->post->stories as $i => $storyID)
|
||||
{
|
||||
if(strpos(",{$release->stories},", ",{$storyID},") !== false) unset($_POST['stories'][$i]);
|
||||
}
|
||||
|
||||
$release->stories .= ',' . join(',', $this->post->stories);
|
||||
$this->dao->update(TABLE_RELEASE)->set('stories')->eq($release->stories)->where('id')->eq((int)$releaseID)->exec();
|
||||
|
||||
if($release->stories)
|
||||
{
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('action');
|
||||
foreach($this->post->stories as $storyID)
|
||||
{
|
||||
/* Reset story stagedBy field for auto compute stage. */
|
||||
$this->dao->update(TABLE_STORY)->set('stagedBy')->eq('')->where('id')->eq($storyID)->exec();
|
||||
if($product->type != 'normal') $this->dao->update(TABLE_STORYSTAGE)->set('stagedBy')->eq('')->where('story')->eq($storyID)->andWhere('branch')->eq($release->branch)->exec();
|
||||
|
||||
$this->story->setStage($storyID);
|
||||
|
||||
$this->action->create('story', $storyID, 'linked2release', '', $releaseID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkStory($releaseID, $storyID)
|
||||
{
|
||||
$release = $this->getByID($releaseID);
|
||||
$release->stories = trim(str_replace(",$storyID,", ',', ",$release->stories,"), ',');
|
||||
$this->dao->update(TABLE_RELEASE)->set('stories')->eq($release->stories)->where('id')->eq((int)$releaseID)->exec();
|
||||
$this->loadModel('action')->create('story', $storyID, 'unlinkedfromrelease', '', $releaseID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchUnlinkStory($releaseID)
|
||||
{
|
||||
$storyList = $this->post->storyIdList;
|
||||
if(empty($storyList)) return true;
|
||||
|
||||
$release = $this->getByID($releaseID);
|
||||
$release->stories = ",$release->stories,";
|
||||
foreach($storyList as $storyID) $release->stories = str_replace(",$storyID,", ',', $release->stories);
|
||||
$release->stories = trim($release->stories, ',');
|
||||
$this->dao->update(TABLE_RELEASE)->set('stories')->eq($release->stories)->where('id')->eq((int)$releaseID)->exec();
|
||||
|
||||
$this->loadModel('action');
|
||||
foreach($this->post->storyIdList as $unlinkStoryID) $this->action->create('story', $unlinkStoryID, 'unlinkedfromrelease', '', $releaseID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link bugs.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkBug($releaseID, $type = 'bug')
|
||||
{
|
||||
$release = $this->getByID($releaseID);
|
||||
|
||||
$field = $type == 'bug' ? 'bugs' : 'leftBugs';
|
||||
|
||||
foreach($this->post->bugs as $i => $bugID)
|
||||
{
|
||||
if(strpos(",{$release->$field},", ",{$bugID},") !== false) unset($_POST['bugs'][$i]);
|
||||
}
|
||||
|
||||
$release->$field .= ',' . join(',', $this->post->bugs);
|
||||
$this->dao->update(TABLE_RELEASE)->set($field)->eq($release->$field)->where('id')->eq((int)$releaseID)->exec();
|
||||
|
||||
$this->loadModel('action');
|
||||
foreach($this->post->bugs as $bugID) $this->action->create('bug', $bugID, 'linked2release', '', $releaseID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink bug.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $bugID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkBug($releaseID, $bugID, $type = 'bug')
|
||||
{
|
||||
$release = $this->getByID($releaseID);
|
||||
$field = $type == 'bug' ? 'bugs' : 'leftBugs';
|
||||
$release->{$field} = trim(str_replace(",$bugID,", ',', ",{$release->$field},"), ',');
|
||||
$this->dao->update(TABLE_RELEASE)->set($field)->eq($release->$field)->where('id')->eq((int)$releaseID)->exec();
|
||||
$this->loadModel('action')->create('bug', $bugID, 'unlinkedfromrelease', '', $releaseID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink bug.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchUnlinkBug($releaseID, $type = 'bug')
|
||||
{
|
||||
|
||||
$bugList = $this->post->unlinkBugs;
|
||||
if(empty($bugList)) return true;
|
||||
|
||||
$release = $this->getByID($releaseID);
|
||||
$field = $type == 'bug' ? 'bugs' : 'leftBugs';
|
||||
$release->$field = ",{$release->$field},";
|
||||
foreach($bugList as $bugID) $release->$field = str_replace(",$bugID,", ',', $release->$field);
|
||||
$release->$field = trim($release->$field, ',');
|
||||
$this->dao->update(TABLE_RELEASE)->set($field)->eq($release->$field)->where('id')->eq((int)$releaseID)->exec();
|
||||
|
||||
$this->loadModel('action');
|
||||
foreach($this->post->unlinkBugs as $unlinkBugID) $this->action->create('bug', $unlinkBugID, 'unlinkedfromrelease', '', $releaseID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change status.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function changeStatus($releaseID, $status)
|
||||
{
|
||||
$this->dao->update(TABLE_RELEASE)->set('status')->eq($status)->where('id')->eq($releaseID)->exec();
|
||||
return dao::isError();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yuchun Li <liyuchun@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: browse.html.php 4129 2020-11-25 11:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->release->confirmDelete)?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('product', $product)):?>
|
||||
<?php common::printLink('projectrelease', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class='main-table'>
|
||||
<?php if(empty($releases)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
|
||||
<?php if(common::canModify('product', $product) and common::hasPriv('release', 'create')):?>
|
||||
<?php echo html::a($this->createLink('projectrelease', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<table class="table" id='releaseList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'><?php echo $lang->release->id;?></th>
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<th class='text-center w-100px'><?php echo $lang->product->branch;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-date text-center'><?php echo $lang->release->date;?></th>
|
||||
<th class='text-center w-90px'><?php echo $lang->release->status;?></th>
|
||||
<?php
|
||||
$extendFields = $this->projectrelease->getFlowExtendFields();
|
||||
foreach($extendFields as $extendField) echo "<th>{$extendField->name}</th>";
|
||||
?>
|
||||
<th class='c-actions-5 text-center'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($releases as $release):?>
|
||||
<?php $canBeChanged = common::canBeChanged('release', $release);?>
|
||||
<tr>
|
||||
<td><?php echo html::a(inlink('view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
|
||||
<td>
|
||||
<?php
|
||||
$flagIcon = $release->marker ? "<icon class='icon icon-flag-alt' title='{$lang->release->marker}'></icon> " : '';
|
||||
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
|
||||
?>
|
||||
</td>
|
||||
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<td class='text-center' title='<?php echo zget($branches, $release->branch, '');?>'><?php echo $branches[$release->branch];?></td>
|
||||
<?php endif;?>
|
||||
<td class='text-center'><?php echo $release->date;?></td>
|
||||
<?php $status = $this->processStatus('release', $release);?>
|
||||
<td class='c-status text-center' title='<?php echo $status;?>'>
|
||||
<span class="status-release status-<?php echo $release->status?>"><?php echo $status;?></span>
|
||||
</td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $release) . "</td>";?>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($canBeChanged)
|
||||
{
|
||||
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
|
||||
if(common::hasPriv('release', 'linkBug')) echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
|
||||
if(common::hasPriv('release', 'changeStatus', $release))
|
||||
{
|
||||
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
|
||||
echo html::a($this->createLink('release', 'changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
|
||||
}
|
||||
common::printIcon('projectrelease', 'edit', "release=$release->id", $release, 'list');
|
||||
if(common::hasPriv('release', 'delete', $release))
|
||||
{
|
||||
$deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->release->delete}'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->release->create;?></h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' id='dataform' method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control' required");?></td>
|
||||
<td class='muted'>
|
||||
<div class='checkbox-primary'>
|
||||
<input id='marker' name='marker' value='1' type='checkbox' />
|
||||
<label for='marker'><?php echo $lang->release->marker;?></label>
|
||||
</div>
|
||||
<?php if($lastRelease) echo '(' . $lang->release->last . ': ' . $lastRelease->name . ')';?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<td><?php echo html::select('build', $builds, '', "class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->date;?></th>
|
||||
<td><?php echo html::input('date', helper::today(), "class='form-control form-date' required");?></td><td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->release->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'normal', "disabled");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "rows='10' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$(".form-date").datetimepicker('setEndDate', '<?php echo date(DT_DATE1)?>');
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: edit.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['release']);?> <strong><?php echo $release->id;?></strong></span>
|
||||
<strong><?php echo html::a(inlink('view', "release=$release->id"), $release->name);?></strong>
|
||||
<small><?php echo $lang->arrow . ' ' . $lang->release->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<td><?php echo html::input('name', $release->name, "class='form-control' required");?></td>
|
||||
<td>
|
||||
<?php $checked = !empty($release->marker) ? "checked='checked'" : '';?>
|
||||
<div class='checkbox-primary'>
|
||||
<input id='marker' name='marker' value='1' type='checkbox' <?php echo $checked;?> />
|
||||
<label for='marker'><?php echo $lang->release->marker;?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<td><?php echo html::select('build', $builds, $release->build, "class='form-control chosen' required"); ?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->date;?></th>
|
||||
<td><?php echo html::input('date', $release->date, "class='form-control form-date' required");?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->status;?></th>
|
||||
<td><?php echo html::select('status', $lang->release->statusList, $release->status, "class='form-control'");?></td><td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($release, 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($release->desc), "rows=10 class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
<?php echo html::hidden('product', $release->product);?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* The export stories or bugs to html view file of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Congzhi Chen <congzhi@cnezsoft.com>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<script>
|
||||
function setDownloading()
|
||||
{
|
||||
if(navigator.userAgent.toLowerCase().indexOf("opera") > -1) return true; // Opera don't support, omit it.
|
||||
|
||||
$.cookie('downloading', 0);
|
||||
time = setInterval("closeWindow()", 300);
|
||||
return true;
|
||||
}
|
||||
|
||||
function closeWindow()
|
||||
{
|
||||
if($.cookie('downloading') == 1 || i >= 30)
|
||||
{
|
||||
parent.$.closeModal();
|
||||
$.cookie('downloading', null);
|
||||
clearInterval(time);
|
||||
}
|
||||
i ++;
|
||||
}
|
||||
</script>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->export;?></h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin' onsubmit='setDownloading();' style='padding: 10px 5%'>
|
||||
<table class='w-p100'>
|
||||
<tr>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->setFileName;?></span>
|
||||
<?php echo html::input('fileName', '', "class='form-control'");?>
|
||||
<span class='input-group-addon'>.html</span>
|
||||
<?php echo html::select('type', $lang->release->exportTypeList, 'all', "class='form-control'")?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::submitButton($lang->export, '', 'btn btn-primary');?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* The link bug view of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: linkbug.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<div id='queryBox' data-module='bug' class='show'></div>
|
||||
<?php
|
||||
$releaseBugs = $type == 'bug' ? $release->bugs : $release->leftBugs;
|
||||
$formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
|
||||
?>
|
||||
<div id='<?php echo $type == 'bug' ? 'unlinkBugList' : 'unlinkLeftBugList';?>'>
|
||||
<form class='main-table' method='post' target='hiddenwin' id='<?php echo $formID?>' action='<?php echo $this->createLink('release', 'linkBug', "releaseID=$release->id&browseType=$browseType¶m=$param&type=$type")?>' data-ride='table'>
|
||||
<div class='table-header hl-primary text-primary strong'>
|
||||
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedBugs;?>
|
||||
</div>
|
||||
<table class='table tablesorter'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($allBugs):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='text-left'><?php echo $lang->bug->title;?></th>
|
||||
<th class='c-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='c-user'><?php echo $lang->bug->resolvedBy;?></th>
|
||||
<th class='w-80px'><?php echo $lang->statusAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php $unlinkedCount = 0;?>
|
||||
<?php foreach($allBugs as $bug):?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php echo html::checkbox('bugs', array($bug->id => sprintf('%03d', $bug->id)), ($type == 'leftBug' or $bug->status == 'resolved' or $bug->status == 'closed') ? $bug->id : '');?>
|
||||
</td>
|
||||
<td><span class='label-pri label-pri-<?php echo $bug->pri;?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo zget($users, $bug->resolvedBy);?></td>
|
||||
<td>
|
||||
<span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $unlinkedCount++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($unlinkedCount):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->release->linkBug, '', 'btn btn-secondary');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="btn-toolbar">
|
||||
<?php echo html::a(inlink('view', "releaseID=$release->id&type=$type"), $lang->goback, '', "class='btn'");?>
|
||||
</div>
|
||||
<div class='table-statistic'></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#<?php echo $formID;?> .tablesorter').sortTable();
|
||||
setForm()
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* The link story view of release module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: linkstory.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<div id='queryBox' data-module='story' class='show'></div>
|
||||
<div id='unlinkStoryList'>
|
||||
<form class='main-table' method='post' target='hiddenwin' id='unlinkedStoriesForm' action='<?php echo $this->createLink('release', 'linkStory', "releaseID=$release->id&browseType=$browseType¶m=$param")?>' data-ride='table'>
|
||||
<div class='table-header hl-primary text-primary strong'>
|
||||
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedStories;?>
|
||||
</div>
|
||||
<table class='table tablesorter'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($allStories):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='text-left'><?php echo $lang->story->title;?></th>
|
||||
<th class='c-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='c-user'> <?php echo $lang->assignedToAB;?></th>
|
||||
<th class='w-50px'> <?php echo $lang->story->estimateAB;?></th>
|
||||
<th class='c-status'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->story->stageAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php $unlinkedCount = 0;?>
|
||||
<?php foreach($allStories as $story):?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='stories[]' value='<?php echo $story->id;?>' <?php if($story->stage == 'developed' or $story->status == 'closed') echo 'checked';?> />
|
||||
<label></label>
|
||||
</div>
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td><span class='status-story status-<?php echo $story->status?>'><?php echo $this->processStatus('story', $story);?></span></td>
|
||||
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
|
||||
</tr>
|
||||
<?php $unlinkedCount++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($unlinkedCount):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class='table-actions btn-toolbar'>
|
||||
<?php echo html::submitButton($lang->release->linkStory, '', 'btn btn-secondary');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="btn-toolbar">
|
||||
<?php echo html::a(inlink('view', "releaseID=$release->id&type=story"), $lang->goback, '', "class='btn'");?>
|
||||
</div>
|
||||
<div class='table-statistic'></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#unlinkStoryList .tablesorter').sortTable();
|
||||
setForm();
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,410 @@
|
||||
<?php
|
||||
/**
|
||||
* The view file of release module's view method of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package release
|
||||
* @version $Id: view.html.php 4386 2013-02-19 07:37:45Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<?php js::set('confirmUnlinkStory', $lang->release->confirmUnlinkStory)?>
|
||||
<?php js::set('confirmUnlinkBug', $lang->release->confirmUnlinkBug)?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php $browseLink = $this->session->releaseList ? $this->session->releaseList : inlink('browse', "productID=$release->product");?>
|
||||
<?php common::printBack($browseLink, 'btn btn-primary');?>
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $release->id;?></span>
|
||||
<span class='text' title='<?php echo $release->name;?>'><?php echo $release->name;?></span>
|
||||
<?php $flagIcon = $release->marker ? "<icon class='icon icon-flag-alt' title='{$lang->release->marker}'></icon> " : '';?>
|
||||
<?php echo $flagIcon;?>
|
||||
<?php if($release->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->release->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
$canBeChanged = common::canBeChanged('release', $release);
|
||||
|
||||
if(!$release->deleted and $canBeChanged)
|
||||
{
|
||||
echo $this->buildOperateMenu($release, 'view');
|
||||
|
||||
if(common::hasPriv('release', 'changeStatus', $release))
|
||||
{
|
||||
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
|
||||
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
|
||||
}
|
||||
if(common::hasPriv('release', 'edit')) echo html::a(inlink('edit', "releaseID=$release->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('release', 'delete')) echo html::a(inlink('delete', "releaseID=$release->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-col'>
|
||||
<div class='main'>
|
||||
<div class='tabs' id='tabsNav'>
|
||||
<?php $countStories = count($stories); $countBugs = count($bugs); $countLeftBugs = count($leftBugs);?>
|
||||
<ul class='nav nav-tabs'>
|
||||
<li <?php if($type == 'story') echo "class='active'"?>><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-green') . ' ' . $lang->release->stories;?></a></li>
|
||||
<li <?php if($type == 'bug') echo "class='active'"?>><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-green') . ' ' . $lang->release->bugs;?></a></li>
|
||||
<li <?php if($type == 'leftBug') echo "class='active'"?>><a href='#leftBugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->release->generatedBugs;?></a></li>
|
||||
<li <?php if($type == 'releaseInfo') echo "class='active'"?>><a href='#releaseInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan'], 'text-info') . ' ' . $lang->release->view;?></a></li>
|
||||
<?php if($countStories or $countBugs or $countLeftBugs):?>
|
||||
<li class='pull-right'><div><?php common::printIcon('release', 'export', '', '', 'button', '', '', "export btn-sm");?></div></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
|
||||
<?php if(common::hasPriv('release', 'linkStory') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"story\")", '<i class="icon-link"></i> ' . $lang->release->linkStory, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-story' method='post' id='linkedStoriesForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='storyList'>
|
||||
<?php
|
||||
$canBatchUnlink = common::hasPriv('release', 'batchUnlinkStory');
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
?>
|
||||
<?php $vars = "releaseID={$release->id}&type=story&link=$link¶m=$param&orderBy=%s";?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class="text-left"><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th class='w-90px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-100px'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='c-actions-1'> <?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($stories as $storyID => $story):?>
|
||||
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='storyIdList[]' value='<?php echo $story->id;?>'/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo sprintf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($storyLink,$story->title, '', "class='preview'");
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td>
|
||||
<span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
|
||||
</td>
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkStory') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkStory}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countStories and ($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
if(common::hasPriv('release', 'batchUnlinkStory'))
|
||||
{
|
||||
$unlinkURL = inlink('batchUnlinkStory', "release=$release->id");
|
||||
echo html::a('###', $lang->release->batchUnlink, '', "onclick='setFormAction(\"$unlinkURL\", \"hiddenwin\", this)' class='btn'");
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchClose'))
|
||||
{
|
||||
$closeURL = $this->createLink('story', 'batchClose', "productID=$release->product");
|
||||
echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"\", this)' class='btn'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='table-statistic'><?php echo sprintf($lang->release->finishStories, $countStories);?></div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$this->app->rawParams['type'] = 'story';
|
||||
$storyPager->show('right', 'pagerjs');
|
||||
$this->app->rawParams['type'] = $type;
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"bug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "releaseID=$release->id");?>" id='linkedBugsForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<?php $canBatchUnlink = common::hasPriv('release', 'batchUnlinkBug');?>
|
||||
<?php $vars = "releaseID={$release->id}&type=bug&link=$link¶m=$param&orderBy=%s";?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
|
||||
<th class='w-100px'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo sprintf('%03d', $bug->id);?>
|
||||
</td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
|
||||
<td>
|
||||
<span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
|
||||
</td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
|
||||
<td><?php echo zget($users, $bug->resolvedBy);?></td>
|
||||
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countBugs and $canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
|
||||
</div>
|
||||
<div class='table-statistic'><?php echo sprintf($lang->release->resolvedBugs, $countBugs);?></div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$this->app->rawParams['type'] = 'bug';
|
||||
$bugPager->show('right', 'pagerjs');
|
||||
$this->app->rawParams['type'] = $type;
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'leftBug') echo 'active'?>' id='leftBugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"leftBug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo inlink('batchUnlinkBug', "releaseID=$release->id&type=leftBug");?>" id='linkedBugsForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='leftBugList'>
|
||||
<?php $canBatchUnlink = common::hasPriv('release', 'batchUnlinkBug');?>
|
||||
<?php $vars = "releaseID={$release->id}&type=leftBug&link=$link¶m=$param&orderBy=%s";?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
|
||||
<th class='text-left'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-150px'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$hasCustomSeverity = false;
|
||||
foreach($lang->bug->severityList as $severityKey => $severityValue)
|
||||
{
|
||||
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
|
||||
{
|
||||
$hasCustomSeverity = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($leftBugs as $bug):?>
|
||||
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo sprintf('%03d', $bug->id);?>
|
||||
</td>
|
||||
<td class='c-severity'>
|
||||
<?php if($hasCustomSeverity):?>
|
||||
<span class='<?php echo 'label-severity-custom';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
|
||||
<?php else:?>
|
||||
<span class='label-severity' data-severity='<?php echo $bug->severity;?>' title='<?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'></span>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
|
||||
<td><span class='status-<?php echo $bug->status?>'> <?php echo $this->processStatus('bug', $bug);?></span></td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo $bug->openedDate?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countLeftBugs and $canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
|
||||
</div>
|
||||
<div class='table-statistic'><?php echo sprintf($lang->release->createdBugs, $countLeftBugs);?></div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$this->app->rawParams['type'] = 'leftBug';
|
||||
$leftBugPager->show('right', 'pagerjs');
|
||||
$this->app->rawParams['type'] = $type;
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class='tab-pane <?php if($type == 'releaseInfo') echo 'active'?>' id='releaseInfo'>
|
||||
<div class='cell'>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->release->basicInfo?></div>
|
||||
<div class='detail-content'>
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th class='w-90px'><?php echo $lang->release->product;?></th>
|
||||
<td><?php echo $release->productName;?></td>
|
||||
</tr>
|
||||
<?php if($release->productType != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php echo $branchName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<td><?php echo $release->name;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<td title='<?php echo $release->buildName?>'>
|
||||
<?php echo ($release->project) ? html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName, '_blank') : $release->buildName;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->status;?></th>
|
||||
<td><?php echo $this->processStatus('release', $release);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->date;?></th>
|
||||
<td><?php echo $release->date;?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($release, 'table', 'inForm=0');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->desc;?></th>
|
||||
<td><?php echo $release->desc;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->files?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<?php
|
||||
if($release->files)
|
||||
{
|
||||
echo $this->fetch('file', 'printFiles', array('files' => $release->files, 'fieldset' => 'false'));
|
||||
}
|
||||
elseif($release->filePath)
|
||||
{
|
||||
echo $lang->release->filePath . html::a($release->filePath, $release->filePath, '_blank');
|
||||
}
|
||||
elseif($release->scmPath)
|
||||
{
|
||||
echo $lang->release->scmPath . html::a($release->scmPath, $release->scmPath, '_blank');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.tabs .tab-content .tab-pane .action{position: absolute; right: <?php echo ($countStories or $countBugs or $countLeftBugs) ? '100px' : '-1px'?>; top: 0px;}
|
||||
</style>
|
||||
<?php js::set('param', helper::safe64Decode($param))?>
|
||||
<?php js::set('link', $link)?>
|
||||
<?php js::set('releaseID', $release->id)?>
|
||||
<?php js::set('type', $type)?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1315,10 +1315,12 @@ class story extends control
|
||||
* Story track.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function track($productID)
|
||||
public function track($productID, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
@@ -1326,11 +1328,17 @@ class story extends control
|
||||
$products = $this->product->getPairs();
|
||||
$productID = $this->product->saveState($productID, $products);
|
||||
$this->product->setMenu($products, $productID, 0, 0, '');
|
||||
$tracks = $this->story->getTracks($productID);
|
||||
|
||||
$this->view->tracks = $tracks;
|
||||
/* Load pager and get tracks. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, $recPerPage, $pageID);
|
||||
$tracks = $this->story->getTracks($productID, $pager);
|
||||
|
||||
$this->view->title = $this->lang->story->track;
|
||||
$this->view->posision[] = $this->lang->story->track;
|
||||
|
||||
$this->view->tracks = $tracks;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
+23
-17
@@ -3586,13 +3586,20 @@ class storyModel extends model
|
||||
/**
|
||||
* Get tracks.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $productID
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return bool|array
|
||||
*/
|
||||
public function getTracks($productID)
|
||||
public function getTracks($productID, $pager = null)
|
||||
{
|
||||
$requirements = $this->getProductStories($productID, 0, 0, 'all', 'requirement', 'id_desc');
|
||||
$sourcePageID = $pager->pageID;
|
||||
$requirements = $this->getProductStories($productID, 0, 0, 'all', 'requirement', 'id_desc', true, '', $pager);
|
||||
if($pager->pageID != $sourcePageID)
|
||||
{
|
||||
$requirements = array();
|
||||
$pager->pageID = $sourcePageID;
|
||||
}
|
||||
|
||||
foreach($requirements as $requirement)
|
||||
{
|
||||
@@ -3612,24 +3619,23 @@ class storyModel extends model
|
||||
}
|
||||
|
||||
/* Get no requirements story. */
|
||||
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc');
|
||||
foreach($stories as $id => $story)
|
||||
$subdividedStories = $this->dao->select('BID')->from(TABLE_RELATION)->where('AType')->eq('requirement')->andWhere('BType')->eq('story')->andWhere('relation')->eq('subdivideinto')->andWhere('product')->eq($productID)->fetchPairs('BID', 'BID');
|
||||
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $subdividedStories);
|
||||
if($stories) $pager->recTotal += 1;
|
||||
|
||||
if(count($requirements) < $pager->recPerPage)
|
||||
{
|
||||
$counts = $this->getStoryRelationCounts($story->id, 'story');
|
||||
if($counts != 0)
|
||||
foreach($stories as $id => $story)
|
||||
{
|
||||
unset($stories[$id]);
|
||||
continue;
|
||||
$stories[$id] = new stdclass();
|
||||
$stories[$id]->title = $story->title;
|
||||
$stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
|
||||
$stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
|
||||
}
|
||||
$title = $stories[$id]->title;
|
||||
$stories[$id] = new stdclass();
|
||||
$stories[$id]->title = $title;
|
||||
$stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
|
||||
$stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
|
||||
$requirements['noRequirement'] = $stories;
|
||||
}
|
||||
$requirements['noRequirement'] = $stories;
|
||||
|
||||
return $requirements;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user