This commit is contained in:
sgm0422
2021-02-10 10:56:26 +08:00
33 changed files with 138 additions and 166 deletions
+1 -2
View File
@@ -687,7 +687,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->durationestimation = 'project';
$lang->navGroup->stage = 'system';
$lang->navGroup->report = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
@@ -954,7 +953,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
+1 -2
View File
@@ -687,7 +687,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->durationestimation = 'project';
$lang->navGroup->stage = 'system';
$lang->navGroup->report = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
@@ -954,7 +953,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
+1 -2
View File
@@ -687,7 +687,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->durationestimation = 'project';
$lang->navGroup->stage = 'system';
$lang->navGroup->report = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
@@ -954,7 +953,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
+1 -2
View File
@@ -687,7 +687,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->durationestimation = 'project';
$lang->navGroup->stage = 'system';
$lang->navGroup->report = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
@@ -954,7 +953,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
+2 -3
View File
@@ -687,7 +687,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->durationestimation = 'project';
$lang->navGroup->stage = 'system';
$lang->navGroup->report = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
@@ -917,7 +916,7 @@ $lang->menu = new stdclass();
$lang->menu->scrum = new stdclass();
$lang->menu->scrum->programindex = '仪表盘|program|index|project={PROJECT}';
$lang->menu->scrum->project = "$lang->executionCommon|project|index|locate=no";
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'subModule' => 'story', 'alias' => 'story,track');
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'alias' => 'story,track');
$lang->menu->scrum->doc = '文档|doc|index|';
$lang->menu->scrum->qa = '测试|qa|index';
$lang->menu->scrum->ci = '代码|repo|browse';
@@ -954,7 +953,7 @@ $lang->menu->waterfall->track = array('link' => '矩阵|projectstory|tr
$lang->menu->waterfall->qa = '测试|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord');
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => '设置|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
+1 -2
View File
@@ -687,7 +687,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->durationestimation = 'project';
$lang->navGroup->stage = 'system';
$lang->navGroup->report = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
@@ -954,7 +953,7 @@ $lang->menu->waterfall->track = array('link' => '矩陣|projectstory|tr
$lang->menu->waterfall->qa = '測試|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => '發佈|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord');
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => '設置|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
+2 -2
View File
@@ -353,7 +353,7 @@ class custom extends control
$this->lang->navGroup->custom = 'system';
$this->lang->system->menu->company['subModule'] .= ',custom';
$key = array_search('custom', $this->lang->noMenuModule);
unset($this->lang->noMenuModule[$key]);
if($key !== false) unset($this->lang->noMenuModule[$key]);
$unit = zget($this->config->custom, 'hourPoint', '1');
@@ -412,7 +412,7 @@ class custom extends control
$this->lang->navGroup->custom = 'system';
$this->lang->system->menu->company['subModule'] .= ',custom';
$key = array_search('custom', $this->lang->noMenuModule);
unset($this->lang->noMenuModule[$key]);
if($key !== false) unset($this->lang->noMenuModule[$key]);
$this->view->title = $this->lang->custom->browseStoryConcept;
$this->view->position[] = $this->lang->custom->browseStoryConcept;
+11 -1
View File
@@ -583,7 +583,17 @@ class customModel extends model
{
foreach($systemFields as $method => $fields)
{
$systemField = $this->config->$moduleName->$method->requiredFields;
$optionFields = isset($this->config->custom->fieldList[$moduleName][$method]) ? explode(',', $this->config->custom->fieldList[$moduleName][$method]) : array();
$systemFieldList = explode(',', $this->config->$moduleName->$method->requiredFields);
foreach($optionFields as $field)
{
if(in_array($field, $systemFieldList))
{
$key = array_search($field, $systemFieldList);
unset($systemFieldList[$key]);
}
}
$systemField = implode(',', $systemFieldList);
/* Keep the original required fields when the fields is empty. */
if(!isset($data->requiredFields[$method]))
+1 -1
View File
@@ -14,7 +14,7 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php $browseLink = $app->session->designList != false ? $app->session->designList : $this->createLink('design', 'browse', "productID=$design->product");?>
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
<?php if(!isonlybody()) echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
<div class="divider"></div>
<div class="page-title">
<span class="label label-id"><?php echo $design->id?></span>
+1 -1
View File
@@ -950,7 +950,7 @@ class doc extends control
$crumb .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID"), $object->name);
$productID = $type == 'product' ? $objectID : 0;
$projectID = $type == 'project' ? $objectID : 0;
$this->doc->setMenu($type, $libID = 0, $moduleID = 0, $productID, $projectID, $crumb);
$this->doc->setMenu($type, 0, 0, $productID, $projectID, $crumb);
}
/* Set Custom. */
+13 -4
View File
@@ -120,9 +120,6 @@
}
}
if(moduleName == 'report' && methodLowerCase == 'programsummary') return project;
if(moduleName == 'measrecord' && methodLowerCase == 'browse') return project;
var myMethods = 'todocalendar|effortcalendar|todo|task|story|bug|testtask|testcase|execution|issue|risk|dynamic|profile';
if(moduleName === 'user' && myMethods.indexOf(methodLowerCase) != -1) return 'my';
@@ -466,6 +463,7 @@
$("#recentMenu").click(function(event)
{
$('#globalSearchInput').click();
event.stopPropagation();
getExecutions();
});
@@ -630,6 +628,17 @@ $(function()
event.stopPropagation();
}
});
$('.has-avatar').hover(function(event)
{
$('.contextmenu').attr('class', 'contextmenu');
$('.contextmenu-menu').attr('class', 'contextmenu-menu fade');
});
$('#bars').mousedown(function()
{
$('#globalSearchInput').click();
});
});
/* Change the search object according to the module and method. */
@@ -647,7 +656,7 @@ function changeSearchObject()
if(tabPageModuleName == 'my' || tabPageModuleName == 'user') var searchType = tabPageMethodName;
if(searchObjectList.indexOf(searchType) == -1) var searchType = 'bug';
if(searchObjectList.indexOf(',' + searchType + ',') == -1) var searchType = 'bug';
if(searchType == 'program') var searchType = 'program-pgmproduct';
if(searchType == 'project') var searchType = 'program-index';
+1 -1
View File
@@ -117,5 +117,5 @@ js::set('defaultOpen', $open);
</div>
</div>
<?php js::set('searchAB', $lang->searchAB);?>
<?php js::set('searchObjectList', implode(',', array_keys($lang->searchObjects)));?>
<?php js::set('searchObjectList', ',' . implode(',', array_keys($lang->searchObjects)) . ',');?>
<?php include '../../common/view/footer.lite.html.php';?>
+4
View File
@@ -69,6 +69,7 @@
<?php if($project->status == 'wait' || $project->status == 'suspended') common::printIcon('program', 'PRJStart', "projectID=$project->id", $project, 'list', 'play', '', 'iframe', true);?>
<?php if($project->status == 'doing') common::printIcon('program', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
<?php if($project->status == 'closed') common::printIcon('program', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
<?php if(common::hasPriv('program','PRJSuspend') || (common::hasPriv('program','PRJClose') && $project->status != 'doing') || (common::hasPriv('program','PRJActivate') && $project->status != 'closed')):?>
<div class='btn-group'>
<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>" style="width: 16px; padding-left: 0px;"></button>
<ul class='dropdown-menu pull-right text-center' role='menu' style="min-width:auto; padding: 5px 10px;">
@@ -77,9 +78,11 @@
<?php if($project->status != 'closed') common::printIcon('program', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
</ul>
</div>
<?php endif;?>
<?php common::printIcon('program', 'PRJEdit', "projectID=$project->id&programID=$project->parent&from=PRJ", $project, 'list', 'edit', '', '', false, "data-group='project'", '', $project->id);?>
<?php common::printIcon('program', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', false, "data-group='project'", '', $project->id);?>
<?php common::printIcon('program', 'PRJGroup', "projectID=$project->id", $project, 'list', 'lock', '', '', false, "data-group='project'", '', $project->id);?>
<?php if(common::hasPriv('program','PRJManageProducts') || common::hasPriv('program','PRJWhitelist') || common::hasPriv('program','PRJDelete')):?>
<div class='btn-group'>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"><i class='icon-more-alt'></i></button>
<ul class='dropdown-menu pull-right text-center' role='menu'>
@@ -88,6 +91,7 @@
<?php if(common::hasPriv('program','PRJDelete')) echo html::a($this->createLink("program", "PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->program->PRJDelete}' data-group='my'");?>
</ul>
</div>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
+2 -2
View File
@@ -429,7 +429,7 @@ class product extends control
$this->product->setMenu($this->products, $productID);
$moduleIndex = array_search('product', $this->lang->noMenuModule);
unset($this->lang->noMenuModule[$moduleIndex]);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
if($programID)
{
@@ -602,7 +602,7 @@ class product extends control
if(!$product) die(js::error($this->lang->notFound) . js::locate('back'));
$moduleIndex = array_search('product', $this->lang->noMenuModule);
unset($this->lang->noMenuModule[$moduleIndex]);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->product->menu = $this->lang->product->viewMenu;
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
+1 -1
View File
@@ -105,7 +105,7 @@ $lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory :
$openModule = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
$misc = common::hasPriv('story', 'export') ? "class='export' data-group='$openModule'" : "class=disabled";
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType&type=$storyType") : '#';
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
?>
</ul>
+22 -16
View File
@@ -1809,14 +1809,17 @@ class programModel extends model
if($project->status == 'doing') common::printIcon('program', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);
if($project->status == 'closed') common::printIcon('program', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);
echo "<div class='btn-group'>";
echo "<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}' style='width: 16px; padding-left: 0px; border-radius: 4px;'></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu' style='position: unset; min-width: auto; padding: 5px 6px;'>";
common::printIcon('program', 'PRJSuspend', "projectID=$project->id", $project, 'list', 'pause', '', 'iframe btn-action', true);
if($project->status != 'doing') common::printIcon('program', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe btn-action', true);
if($project->status != 'closed') common::printIcon('program', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe btn-action', true);
echo "</ul>";
echo "</div>";
if(common::hasPriv('program','PRJSuspend') || (common::hasPriv('program','PRJClose') && $project->status != 'doing') || (common::hasPriv('program','PRJActivate') && $project->status != 'closed'))
{
echo "<div class='btn-group'>";
echo "<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}' style='width: 16px; padding-left: 0px; border-radius: 4px;'></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu' style='position: unset; min-width: auto; padding: 5px 6px;'>";
common::printIcon('program', 'PRJSuspend', "projectID=$project->id", $project, 'list', 'pause', '', 'iframe btn-action', true);
if($project->status != 'doing') common::printIcon('program', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe btn-action', true);
if($project->status != 'closed') common::printIcon('program', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe btn-action', true);
echo "</ul>";
echo "</div>";
}
$from = $project->from == 'PRJ' ? 'PRJ' : 'pgmproject';
$openModule = $project->from == 'PRJ' ? 'project' : 'program';
@@ -1824,14 +1827,17 @@ class programModel extends model
common::printIcon('program', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', '', $project->id);
common::printIcon('program', 'PRJGroup', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
echo "<div class='btn-group'>";
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
if(common::hasPriv('program','PRJDelete')) echo html::a(inLink("PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->program->PRJDelete}'");
echo "</ul>";
echo "</div>";
if(common::hasPriv('program','PRJManageProducts') || common::hasPriv('program','PRJWhitelist') || common::hasPriv('program','PRJDelete'))
{
echo "<div class='btn-group'>";
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
if(common::hasPriv('program','PRJDelete')) echo html::a(inLink("PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->program->PRJDelete}'");
echo "</ul>";
echo "</div>";
}
break;
}
echo '</td>';
@@ -65,6 +65,8 @@
<?php if($program->status == 'wait' || $program->status == 'suspended') common::printIcon('program', 'PGMStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true, '', $this->lang->program->PGMStart);?>
<?php if($program->status == 'doing') common::printIcon('program', 'PGMClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if($program->status == 'closed') common::printIcon('program', 'PGMActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'PGMSuspend') || (common::hasPriv('program', 'PGMClose') && $program->status != 'doing') || (common::hasPriv('program', 'PGMActivate') && $program->status != 'closed')):?>
<div class='btn-group'>
<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>" style="width: 16px; padding-left: 0px;"></button>
<ul class='dropdown-menu pull-right text-center' role='menu' style="min-width:auto; padding: 5px 10px;">
@@ -73,6 +75,7 @@
<?php if($program->status != 'closed') common::printIcon('program', 'PGMActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
</ul>
</div>
<?php endif;?>
<?php common::printIcon('program', 'PGMEdit', "programID=$program->id", '', 'list', 'edit');?>
<?php common::printIcon('program', 'PGMCreate', "programID=$program->id", '', 'list', 'split', '', '', '', '', $this->lang->program->PGMChildren);?>
<?php if(common::hasPriv('program', 'PGMDelete')) echo html::a($this->createLink("program", "PGMDelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->program->PGMDelete}'");?>
@@ -81,6 +84,7 @@
<?php if($program->status == 'wait' || $program->status == 'suspended') common::printIcon('program', 'PRJStart', "projectID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
<?php if($program->status == 'doing') common::printIcon('program', 'PRJClose', "projectID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if($program->status == 'closed') common::printIcon('program', 'PRJActivate', "projectID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'PRJSuspend') || (common::hasPriv('program', 'PRJClose') && $program->status != 'doing') || (common::hasPriv('program', 'PRJActivate') && $program->status != 'closed')):?>
<div class='btn-group'>
<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>" style="width: 16px; padding-left: 0px;"></button>
<ul class='dropdown-menu pull-right text-center' role='menu' style="min-width:auto; padding: 5px 10px;">
@@ -89,9 +93,11 @@
<?php if($program->status != 'closed') common::printIcon('program', 'PRJActivate', "projectID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
</ul>
</div>
<?php endif;?>
<?php common::printIcon('program', 'PRJEdit', "projectID=$program->id&programID=$program->parent&from=pgmbrowse", $program, 'list', 'edit', '', '', '', "data-group='program'", '', $program->id);?>
<?php common::printIcon('program', 'PRJManageMembers', "projectID=$program->id", $program, 'list', 'group', '', '', '', 'data-group="program"', '', $program->id);?>
<?php common::printIcon('program', 'PRJGroup', "projectID=$program->id", $program, 'list', 'lock', '', '', '', 'data-group="program"', '', $program->id);?>
<?php if(common::hasPriv('program', 'PRJManageProducts') || common::hasPriv('program', 'PRJWhitelist') || common::hasPriv('program', 'PRJDelete')):?>
<div class='btn-group'>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"><i class='icon-more-alt'></i></button>
<ul class='dropdown-menu pull-right text-center' role='menu'>
@@ -101,6 +107,7 @@
</ul>
</div>
<?php endif;?>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
-1
View File
@@ -1619,7 +1619,6 @@ class project extends control
public function view($executionID)
{
$execution = $this->project->getById($executionID, true);
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
$this->app->loadLang('program');
+2 -1
View File
@@ -1947,6 +1947,7 @@ class projectModel extends model
$task = new stdClass();
$task->bug = $bug;
$task->PRJ = $this->session->PRJ;
$task->project = $projectID;
$task->story = $bug->story;
$task->storyVersion = $bug->storyVersion;
@@ -1984,7 +1985,7 @@ class projectModel extends model
return false;
}
if(!preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $task->estimate))
if(!preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $task->estimate) and !empty($task->estimate))
{
dao::$errors['message'][] = $this->lang->task->error->estimateNumber;
return false;
+2 -2
View File
@@ -43,7 +43,7 @@ var browseType = '<?php echo $browseType;?>';
<th class='w-100px <?php echo in_array('pri', $requiredFields) ? 'required' : ''?>'><?php echo $lang->task->pri;?></th>
<th class='w-150px <?php echo in_array('assignedTo', $requiredFields) ? 'required' : ''?>'><?php echo $lang->task->assignedTo;?></th>
<th class='w-80px <?php echo in_array('estimate', $requiredFields) ? 'required' : ''?>'><?php echo $lang->task->estimate;?></th>
<th class='w-120px <?php echo in_array('deadline', $requiredFields) ? 'required' : ''?>'><?php echo $lang->task->deadline;?></th>
<th class='w-180px <?php echo in_array('deadline', $requiredFields) ? 'required' : ''?>'><?php echo $lang->task->deadline;?></th>
</tr>
</thead>
<tbody>
@@ -73,7 +73,7 @@ var browseType = '<?php echo $browseType;?>';
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar show-always">
<?php echo html::submitButton('<i class="icon icon-import icon-sm"></i> ' . $lang->import, '', 'btn btn-secondary');?>
<?php echo html::submitButton('<i class="icon icon-import icon-sm"></i> ' . $lang->import, '', 'btn');?>
</div>
<div class='btn-toolbar'>
<?php echo html::backButton('', '', 'btn');?>
+6 -6
View File
@@ -495,8 +495,8 @@ class projectrelease extends control
*/
public function batchUnlinkStory($releaseID)
{
$this->projectrelease->batchUnlinkStory($releaseID);
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=story"), 'parent'));
$this->loadModel('release')->batchUnlinkStory($releaseID);
die(js::locate($this->createLink('projectrelease', 'view', "releaseID=$releaseID&type=story"), 'parent'));
}
/**
@@ -596,7 +596,7 @@ class projectrelease extends control
*/
public function unlinkBug($releaseID, $bugID, $type = 'bug')
{
$this->projectrelease->unlinkBug($releaseID, $bugID, $type);
$this->loadModel('release')->unlinkBug($releaseID, $bugID, $type);
/* if ajax request, send result. */
if($this->server->ajax)
@@ -626,8 +626,8 @@ class projectrelease extends control
*/
public function batchUnlinkBug($releaseID, $type = 'bug')
{
$this->projectrelease->batchUnlinkBug($releaseID, $type);
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=$type"), 'parent'));
$this->loadModel('release')->batchUnlinkBug($releaseID, $type);
die(js::locate($this->createLink('projectrelease', 'view', "releaseID=$releaseID&type=$type"), 'parent'));
}
/**
@@ -640,7 +640,7 @@ class projectrelease extends control
*/
public function changeStatus($releaseID, $status)
{
$this->projectrelease->changeStatus($releaseID, $status);
$this->loadModel('release')->changeStatus($releaseID, $status);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('release', $releaseID, 'changestatus', '', $status);
die(js::reload('parent'));
-79
View File
@@ -292,28 +292,6 @@ class projectreleaseModel extends model
$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.
*
@@ -339,61 +317,4 @@ class projectreleaseModel extends model
$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();
}
}
-1
View File
@@ -360,7 +360,6 @@ class releaseModel extends model
*/
public function batchUnlinkBug($releaseID, $type = 'bug')
{
$bugList = $this->post->unlinkBugs;
if(empty($bugList)) return true;
+1 -1
View File
@@ -29,7 +29,7 @@ class repo extends control
/* Set repo menu group. */
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
if(!$this->projectID)
if(!$this->projectID)
{
$this->lang->navGroup->repo = 'repo';
$this->lang->navGroup->jenkins = 'repo';
+4 -4
View File
@@ -32,12 +32,12 @@
<td class='text'><?php echo zget($lang->repo->scmList, $repo->SCM); ?></td>
<td class='text' title='<?php echo $repo->name; ?>'><?php echo html::a($this->createLink('repo', 'browse', "repoID={$repo->id}"), $repo->name);?></td>
<td class='text'>
<?php
$productList = explode(',', str_replace(' ', '', $repo->product));
<?php
$productList = explode(',', str_replace(' ', '', $repo->product));
if(isset($productList) and $productList[0])
{
{
foreach($productList as $productID) echo ' ' . html::a($this->createLink('product', 'browse', "productID=$productID"), zget($products, $productID, $productID));
}
}
?>
</td>
<td class='text' title='<?php echo $repo->path; ?>'><?php echo $repo->path; ?></td>
+15
View File
@@ -11,6 +11,21 @@
*/
class report extends control
{
/**
* Construct.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
/* Set report menu group. */
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
if(!$this->projectID) $this->lang->navGroup->report = 'system';
}
/**
* The index of report, goto project deviation.
*
+1 -1
View File
@@ -51,7 +51,7 @@
</tr>
<tr class='track hidden'>
<th><?php echo $lang->risk->pri;?></th>
<td><?php echo html::select('pri', $lang->risk->priList, $risk->pri, "class='form-control chosen'");?></td>
<td id='priValue'><?php echo html::select('pri', $lang->risk->priList, $risk->pri, "class='form-control chosen'");?></td>
</tr>
<tr class='track hidden'>
<th><?php echo $lang->risk->trackedBy;?></th>
+5 -4
View File
@@ -642,7 +642,7 @@ class story extends control
/* The stories of a project. */
$this->lang->navGroup->story = 'project';
$moduleIndex = array_search('story', $this->lang->noMenuModule);
unset($this->lang->noMenuModule[$moduleIndex]);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->story->menu = $this->lang->project->menu;
$this->project->setMenu($this->project->getExecutionPairs($this->session->PRJ, 'all', 'nodeleted'), $projectID);
@@ -1189,7 +1189,7 @@ class story extends control
$response['result'] = 'success';
$response['message'] = $this->lang->story->successToTask;
$this->story->batchToTask($projectID);
$this->story->batchToTask($projectID, $this->session->PRJ);
if(dao::isError())
{
@@ -1761,10 +1761,11 @@ class story extends control
* @param string $orderBy
* @param int $projectID
* @param string $browseType
* @param string $type requirement|story
* @access public
* @return void
*/
public function export($productID, $orderBy, $projectID = 0, $browseType = '')
public function export($productID, $orderBy, $projectID = 0, $browseType = '', $type = 'story')
{
/* format the fields of every story in order to export data. */
if($_POST)
@@ -2003,7 +2004,7 @@ class story extends control
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
}
$fileName = $this->lang->story->common;
$fileName = $type == 'requirement' ? $this->lang->URCommon : $this->lang->SRCommon;
if($projectID)
{
$projectName = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch('name');
+3 -1
View File
@@ -1547,10 +1547,11 @@ class storyModel extends model
* Batch to task.
*
* @param int $projectID
* @param int $PRJID
* @access public
* @return bool
*/
public function batchToTask($projectID)
public function batchToTask($projectID, $PRJID = 0)
{
/* load Module and get the data from the post and get the current time. */
$this->loadModel('action');
@@ -1581,6 +1582,7 @@ class storyModel extends model
$task = new stdclass();
$task->project = $projectID;
$task->PRJ = $PRJID;
$task->name = $story->title;
$task->story = $story->id;
$task->type = $data->type;
+2
View File
@@ -1040,6 +1040,8 @@ class taskModel extends model
if($data->finishedBys[$taskID] == 'ditto') $data->finishedBys[$taskID] = isset($prev['finishedBy']) ? $prev['finishedBy'] : '';
if($data->canceledBys[$taskID] == 'ditto') $data->canceledBys[$taskID] = isset($prev['canceledBy']) ? $prev['canceledBy'] : '';
if($data->closedBys[$taskID] == 'ditto') $data->closedBys[$taskID] = isset($prev['closedBy']) ? $prev['closedBy'] : '';
if($data->estStarteds[$taskID] == '0000-00-00') $data->estStarteds[$taskID] = '';
if($data->deadlines[$taskID] == '0000-00-00') $data->deadlines[$taskID] = '';
$prev['module'] = $data->modules[$taskID];
$prev['type'] = $data->types[$taskID];
+11 -23
View File
@@ -79,7 +79,7 @@ class user extends control
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
/* set menus. */
$this->lang->set('menugroup.user', 'company');
@@ -128,7 +128,7 @@ class user extends control
$this->lang->set('menugroup.user', 'company');
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
/* Modify story title. */
$this->loadModel('story');
@@ -177,7 +177,7 @@ class user extends control
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
/* Assign. */
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->task;
@@ -224,7 +224,7 @@ class user extends control
$this->app->loadLang('bug');
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->bug;
$this->view->position[] = $this->lang->user->bug;
@@ -272,7 +272,7 @@ class user extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->testTask;
$this->view->position[] = $this->lang->user->testTask;
@@ -320,7 +320,7 @@ class user extends control
$this->lang->set('menugroup.user', 'company');
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$cases = array();
if($type == 'case2Him')
@@ -380,7 +380,7 @@ class user extends control
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->execution;
$this->view->position[] = $this->lang->user->execution;
@@ -422,7 +422,7 @@ class user extends control
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->issue;
$this->view->position[] = $this->lang->user->issue;
@@ -466,7 +466,7 @@ class user extends control
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->risk;
$this->view->position[] = $this->lang->user->risk;
@@ -495,7 +495,7 @@ class user extends control
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$this->view->title = "USER #$user->id $user->account/" . $this->lang->user->profile;
$this->view->position[] = $this->lang->user->common;
@@ -1116,7 +1116,7 @@ class user extends control
$date = empty($date) ? '' : date('Y-m-d', $date);
/* Change the menu when in my module. */
$this->resetMenu();
$this->user->resetMenu();
$actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', 'all', $date, $direction);
@@ -1133,18 +1133,6 @@ class user extends control
$this->display();
}
/**
* Reset menu when from my module.
*
* @access public
* @return void
*/
public function resetMenu()
{
$this->lang->admin->menu = $this->lang->my->menu;
$this->lang->noMenuModule[] = 'user';
}
/**
* crop avatar
*
+13
View File
@@ -2414,4 +2414,17 @@ class userModel extends model
return $personalData;
}
/**
* Reset menu when from my module.
*
* @access public
* @return void
*/
public function resetMenu()
{
$this->lang->navGroup->user = 'my';
$this->lang->admin->menu = $this->lang->my->menu;
$this->lang->noMenuModule[] = 'user';
}
}
+1
View File
@@ -48,6 +48,7 @@ try
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // 设置报错处理方式。
$dbh->exec("SET GLOBAL sql_mode = '';");
$dbh->exec("set names 'utf8'");
$dbh->beginTransaction();
foreach($sqlFilePath as $file)