Merge branch 'sprint/285' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/285_navigation
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
/* atomic class */
|
||||
.flex {display: flex;}
|
||||
.align-center {align-items: center;}
|
||||
.justify-between {justify-content: space-between;}
|
||||
.title-color {color: #313C52}
|
||||
.font-13 {font-size: 13px;}
|
||||
.color-gray {color: #5E626D;}
|
||||
.border-gray {border: 1px solid #E3E4E9;}
|
||||
.h-56 {height: 56px;}
|
||||
.h-40 {height: 40px;}
|
||||
.pl-16 {padding-left: 16px;}
|
||||
.px-16 {padding: 0 16px;}
|
||||
.mb-16 {margin-bottom: 16px;}
|
||||
|
||||
#notice {margin: -20px -20px 20px; padding: 20px;}
|
||||
#zentaoLinks {margin-top: 20px;}
|
||||
#zentaoLinks .panel .panel-heading {padding: 6px 10px;}
|
||||
@@ -7,7 +21,6 @@
|
||||
.admin > .main {flex: 1 1 70%;}
|
||||
.admin > .side {flex: 1 1 30%; padding-left: 10px; margin-left: 16px;}
|
||||
.panel-title {padding: 10px 0px;}
|
||||
.flex {display: flex;}
|
||||
.panel {padding: 0 0 0 16px;}
|
||||
.settings.panel, .plug.panel {margin-bottom: 16px;}
|
||||
|
||||
@@ -19,7 +32,6 @@
|
||||
.settings-list > .setting-box > h4 > img {padding-right: 8px; padding-bottom: 3px; width: 32px; height: 27px;}
|
||||
.settings-list > .setting-box > .setting-desc {padding-bottom: 16px; color: #5E626D;}
|
||||
.settings-list.lite-setting > .setting-box {flex: 1 1 30%;}
|
||||
.panel-title > a {display: flex; align-items: center;}
|
||||
|
||||
.plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;}
|
||||
.plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px; cursor: pointer;}
|
||||
@@ -38,6 +50,7 @@
|
||||
.official-content > .content {color: #838A9D; font-size: 12px; line-height: 22px; padding-top: 6px;}
|
||||
.official-content > .title {color: #313C52; font-size: 13px; line-height: 14px;}
|
||||
|
||||
.classList {aspect-ratio: 4/1;}
|
||||
.classList > .classItem {flex: 1 1 30%; margin: 5px; border: 1px solid rgba(227, 228, 233, 0.6); border-radius: 4px; margin-bottom: 16px; align-items: center;}
|
||||
.classItem > .imgBack {flex: 1 1 50%;}
|
||||
.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9; background-position: center; margin: 0px; border-top-left-radius: 4px; border-top-right-radius: 4px;}
|
||||
@@ -55,3 +68,16 @@
|
||||
.main.without-internet > .plug.panel {flex: 1 1 60%; margin-bottom: unset; margin-right: 16px;}
|
||||
.main.without-internet > .bottom > .official.panel {margin-right: unset;}
|
||||
.main.without-internet > .bottom > .official.panel > .main-panel {flex-direction: row-reverse;}
|
||||
|
||||
/* css in side */
|
||||
.time-block {background: #EDEEF2; padding: 4px; border-radius: 4px; color: #0B0F18; font-size: 15px;}
|
||||
.dynamic-block {height: 64px; padding: 12px 16px; display: flex; justify-content: space-between; position: relative; line-height: 20px; border-top: 1px solid #E3E4E9;}
|
||||
.dynamic-content {height: 40px; overflow: hidden;}
|
||||
.dynamic-time {white-space: nowrap; position: absolute; right: 20px; bottom: 10px; padding-right: 12px; background: white;}
|
||||
|
||||
.patch-block {padding: 12px 16px; line-height: 20px; border-top: 1px solid #E3E4E9;}
|
||||
.patch-content {height: 40px; overflow: hidden;}
|
||||
|
||||
.upgrade-block {padding: 16px 16px; line-height: 20px; border-top: 1px solid #E3E4E9;}
|
||||
.upgrade-content {height: 20px; padding-left: 20px; position: relative; margin: 5px 0;}
|
||||
.upgrade-content:before {content: ' '; width: 10px; height: 10px; background: #E3E4E9; border-radius: 50%; position: absolute; left: 0px; top: 5px;}
|
||||
|
||||
@@ -170,4 +170,10 @@ $lang->admin->menuSetting['dev']['desc'] = 'Support for secondary developm
|
||||
$lang->admin->menuSetting['convert']['name'] = 'Data Import';
|
||||
$lang->admin->menuSetting['convert']['desc'] = 'Data import from third-party systems.';
|
||||
|
||||
$lang->admin->mon = 'month';
|
||||
$lang->admin->day = 'day';
|
||||
$lang->admin->updateDynamics = 'updateDynamics';
|
||||
$lang->admin->updatePatch = 'updatePatch';
|
||||
$lang->admin->upgradeRecommend = 'upgradeRecommend';
|
||||
|
||||
include dirname(__FILE__) . '/menu.php';
|
||||
|
||||
@@ -170,4 +170,10 @@ $lang->admin->menuSetting['dev']['desc'] = 'Support for secondary developm
|
||||
$lang->admin->menuSetting['convert']['name'] = 'Data Import';
|
||||
$lang->admin->menuSetting['convert']['desc'] = 'Data import from third-party systems.';
|
||||
|
||||
$lang->admin->mon = 'month';
|
||||
$lang->admin->day = 'day';
|
||||
$lang->admin->updateDynamics = 'updateDynamics';
|
||||
$lang->admin->updatePatch = 'updatePatch';
|
||||
$lang->admin->upgradeRecommend = 'upgradeRecommend';
|
||||
|
||||
include dirname(__FILE__) . '/menu.php';
|
||||
|
||||
@@ -170,4 +170,10 @@ $lang->admin->menuSetting['dev']['desc'] = 'Support for secondary developm
|
||||
$lang->admin->menuSetting['convert']['name'] = 'Data Import';
|
||||
$lang->admin->menuSetting['convert']['desc'] = 'Data import from third-party systems.';
|
||||
|
||||
$lang->admin->mon = 'month';
|
||||
$lang->admin->day = 'day';
|
||||
$lang->admin->updateDynamics = 'updateDynamics';
|
||||
$lang->admin->updatePatch = 'updatePatch';
|
||||
$lang->admin->upgradeRecommend = 'upgradeRecommend';
|
||||
|
||||
include dirname(__FILE__) . '/menu.php';
|
||||
|
||||
@@ -93,4 +93,10 @@ $lang->admin->safe->noticeMode = 'Mật khẩu sẽ được kiểm tra khi ng
|
||||
$lang->admin->safe->noticeStrong = '';
|
||||
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.';
|
||||
|
||||
$lang->admin->mon = 'month';
|
||||
$lang->admin->day = 'day';
|
||||
$lang->admin->updateDynamics = 'updateDynamics';
|
||||
$lang->admin->updatePatch = 'updatePatch';
|
||||
$lang->admin->upgradeRecommend = 'upgradeRecommend';
|
||||
|
||||
include dirname(__FILE__) . '/menu.php';
|
||||
|
||||
@@ -170,4 +170,10 @@ $lang->admin->menuSetting['dev']['desc'] = '支持对系统进行二次开
|
||||
$lang->admin->menuSetting['convert']['name'] = '数据导入';
|
||||
$lang->admin->menuSetting['convert']['desc'] = '第三方系统的数据导入。';
|
||||
|
||||
$lang->admin->mon = '月';
|
||||
$lang->admin->day = '日';
|
||||
$lang->admin->updateDynamics = '更新动态';
|
||||
$lang->admin->updatePatch = '补丁更新';
|
||||
$lang->admin->upgradeRecommend = '推荐升级';
|
||||
|
||||
include dirname(__FILE__) . '/menu.php';
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="plug panel">
|
||||
<div class="panel-title">
|
||||
<?php echo $lang->admin->pluginRecommendation;?>
|
||||
<?php echo html::a($config->admin->extensionURL, "{$lang->more} <i class='icon icon-caret-right'></i>", '_blank', 'class="more text-muted"');?>
|
||||
<?php echo html::a($config->admin->extensionURL, "{$lang->more} <i class='icon icon-caret-right'></i>", '_blank', 'class="more text-muted flex align-center"');?>
|
||||
</div>
|
||||
<div class="plugin-list" <?php if($langNotCN) echo 'style="flex-wrap: nowrap"';?>>
|
||||
<?php foreach($plugins as $plugin):?>
|
||||
@@ -68,7 +68,7 @@
|
||||
<div class="panel publicClass">
|
||||
<div class="panel-title">
|
||||
<?php echo $lang->admin->publicClass;?>
|
||||
<?php echo html::a($config->admin->classURL, "{$lang->more} <i class='icon icon-caret-right'></i>", '_blank', 'class="more text-muted"');?>
|
||||
<?php echo html::a($config->admin->classURL, "{$lang->more} <i class='icon icon-caret-right'></i>", '_blank', 'class="more text-muted flex align-center"');?>
|
||||
</div>
|
||||
<div class="classList flex">
|
||||
<?php foreach($publicClass as $class):?>
|
||||
@@ -87,8 +87,71 @@
|
||||
</div>
|
||||
|
||||
<?php if($hasInternet and !$langNotCN):?>
|
||||
<div class="side panel hidden">
|
||||
<div class="panel-title"><?php echo $lang->admin->zentaoInfo?></div>
|
||||
<div class="side panel">
|
||||
<div class="h-56 flex align-center justify-between">
|
||||
<div class="panel-title"><?php echo $lang->admin->zentaoInfo?></div>
|
||||
<div class="time-count color-gray">您已使用禅道<span class="time-block">05</span><?php echo $lang->year?><span class="time-block">09</span><?php echo $lang->admin->day?><span class="time-block">19</span>日</div>
|
||||
</div>
|
||||
<div class="border-gray mb-16">
|
||||
<div class="h-40 pl-16 flex align-center justify-between">
|
||||
<div class="panel-title"><?php echo $lang->admin->updateDynamics?></div>
|
||||
<?php echo html::a($config->admin->extensionURL, "{$lang->more} <i class='icon icon-caret-right'></i>", '_blank', 'class="more text-muted flex align-center"');?>
|
||||
</div>
|
||||
<div class="dynamic-block">
|
||||
<div class="dynamic-content"><i class="icon icon-horn text-primary"></i>禅道18.0发布,新增自动化测试方案、使用帮助及全新IDE风格</div>
|
||||
<div class="dynamic-time">2022-03-12</div>
|
||||
</div>
|
||||
<div class="dynamic-block">
|
||||
<div class="dynamic-content"><i class="icon icon-horn text-primary"></i>禅道18.0发布,新增自动化测试方案、使用帮助及全新IDE风格</div>
|
||||
<div class="dynamic-time">2022-03-12</div>
|
||||
</div>
|
||||
<div class="dynamic-block">
|
||||
<div class="dynamic-content"><i class="icon icon-horn text-primary"></i>禅道18.0发布,新增自动化测试方案、使用帮助及全新IDE风格</div>
|
||||
<div class="dynamic-time">2022-03-12</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-gray mb-16">
|
||||
<div class="h-40 pl-16 flex align-center justify-between">
|
||||
<div class="panel-title"><?php echo $lang->admin->updatePatch?></div>
|
||||
<?php echo html::a($config->admin->extensionURL, "{$lang->more} <i class='icon icon-caret-right'></i>", '_blank', 'class="more text-muted flex align-center"');?>
|
||||
</div>
|
||||
<?php foreach($this->view->patches as $patch):?>
|
||||
<div class="patch-block">
|
||||
<div class="title flex justify-between">
|
||||
<div class="panel-title"><?php echo $patch->name?></div>
|
||||
<a href="<?php echo $patch->viewLink;?>" class='ext-download flex align-center' target='_blank'><i class='icon icon-download-alt text-primary bg-primary-100 pd-3'></i></a>
|
||||
</div>
|
||||
<div class="patch-content color-gray">
|
||||
<?php echo $patch->desc?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="border-gray mb-16">
|
||||
<div class="h-40 pl-16 flex align-center justify-between">
|
||||
<div class="panel-title"><?php echo $lang->admin->upgradeRecommend?></div>
|
||||
<?php echo html::a($config->admin->extensionURL, "{$lang->more} <i class='icon icon-caret-right'></i>", '_blank', 'class="more text-muted flex align-center"');?>
|
||||
</div>
|
||||
<div class="upgrade-block">
|
||||
<div class="title text-primary flex justify-between">
|
||||
<div>禅道企业版</div>
|
||||
<div class="flex align-center"><div>查看详情</div><i class="icon icon-caret-right text-primary"></i></div>
|
||||
</div>
|
||||
<div class="upgrade-content color-gray">工时管理、甘特图、导入导出</div>
|
||||
<div class="upgrade-content color-gray">40+内置统计报表、自定义报表功能</div>
|
||||
<div class="upgrade-content color-gray">强大的自定义工作流、反馈管理功能</div>
|
||||
</div>
|
||||
<div class="upgrade-block">
|
||||
<div class="title text-primary flex justify-between">
|
||||
<div>禅道旗舰版</div>
|
||||
<div class="flex align-center"><div>查看详情</div><i class="icon icon-caret-right text-primary"></i></div>
|
||||
</div>
|
||||
<div class="upgrade-content color-gray">工时管理、甘特图、导入导出</div>
|
||||
<div class="upgrade-content color-gray">40+内置统计报表、自定义报表功能</div>
|
||||
<div class="upgrade-content color-gray">强大的自定义工作流、反馈管理功能</div>
|
||||
<div class="upgrade-content color-gray">工时管理、甘特图、导入导出</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -88,6 +88,7 @@ $lang->sonarqube = new stdclass();
|
||||
$lang->app = new stdclass();
|
||||
$lang->zahost = new stdclass();
|
||||
$lang->zanode = new stdclass();
|
||||
$lang->holiday = new stdclass();
|
||||
|
||||
$lang->projectbuild = new stdclass();
|
||||
$lang->projectrelease = new stdclass();
|
||||
|
||||
@@ -200,6 +200,7 @@ class group extends control
|
||||
public function managePriv($type = 'byGroup', $param = 0, $menu = '', $version = '')
|
||||
{
|
||||
if($type == 'byGroup') $groupID = $param;
|
||||
|
||||
$this->view->type = $type;
|
||||
foreach($this->lang->resource as $moduleName => $action)
|
||||
{
|
||||
@@ -234,6 +235,9 @@ class group extends control
|
||||
if(version_compare($currentVersion, $realVersion, '>=')) $changelog[] = join(',', $currentChangeLog);
|
||||
}
|
||||
|
||||
$this->lang->custom->common = $this->lang->group->config;
|
||||
if($this->config->edition == 'max') $this->lang->baseline->common = $this->lang->group->docTemplate;
|
||||
|
||||
$this->view->group = $group;
|
||||
$this->view->changelogs = ',' . join(',', $changelog) . ',';
|
||||
$this->view->groupPrivs = $groupPrivs;
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->group->outside = 'Andere Benutzer';
|
||||
$lang->group->limited = 'Limited Users';
|
||||
$lang->group->other = 'Andere';
|
||||
$lang->group->all = 'Alle';
|
||||
$lang->group->config = 'Config';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = 'Rechte kopieren';
|
||||
$lang->group->copyOptions['copyUser'] = 'Benutzer kopieren';
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->group->outside = 'Other Users';
|
||||
$lang->group->limited = 'Limited Users';
|
||||
$lang->group->other = 'Others';
|
||||
$lang->group->all = 'All Privileges';
|
||||
$lang->group->config = 'Config';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = 'Copy Privileges';
|
||||
$lang->group->copyOptions['copyUser'] = 'Copy Users';
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->group->outside = 'Autres utilisateurs';
|
||||
$lang->group->limited = 'Limited Users';
|
||||
$lang->group->other = 'Autres';
|
||||
$lang->group->all = 'Tous les Privilèges';
|
||||
$lang->group->config = 'Config';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = 'Copier Privilèges';
|
||||
$lang->group->copyOptions['copyUser'] = 'Copier Utilisateurs';
|
||||
|
||||
@@ -1418,7 +1418,6 @@ $lang->resource->custom->execution = 'execution';
|
||||
$lang->resource->custom->required = 'required';
|
||||
$lang->resource->custom->restore = 'restore';
|
||||
$lang->resource->custom->flow = 'flow';
|
||||
$lang->resource->custom->working = 'working';
|
||||
$lang->resource->custom->setPublic = 'setPublic';
|
||||
$lang->resource->custom->timezone = 'timezone';
|
||||
$lang->resource->custom->setStoryConcept = 'setStoryConcept';
|
||||
@@ -1436,16 +1435,15 @@ $lang->custom->methodOrder[20] = 'execution';
|
||||
$lang->custom->methodOrder[25] = 'required';
|
||||
$lang->custom->methodOrder[30] = 'restore';
|
||||
$lang->custom->methodOrder[35] = 'flow';
|
||||
$lang->custom->methodOrder[40] = 'working';
|
||||
$lang->custom->methodOrder[45] = 'setPublic';
|
||||
$lang->custom->methodOrder[50] = 'timezone';
|
||||
$lang->custom->methodOrder[55] = 'setStoryConcept';
|
||||
$lang->custom->methodOrder[60] = 'editStoryConcept';
|
||||
$lang->custom->methodOrder[65] = 'browseStoryConcept';
|
||||
$lang->custom->methodOrder[70] = 'setDefaultConcept';
|
||||
$lang->custom->methodOrder[75] = 'deleteStoryConcept';
|
||||
$lang->custom->methodOrder[80] = 'kanban';
|
||||
$lang->custom->methodOrder[85] = 'code';
|
||||
$lang->custom->methodOrder[40] = 'setPublic';
|
||||
$lang->custom->methodOrder[45] = 'timezone';
|
||||
$lang->custom->methodOrder[50] = 'setStoryConcept';
|
||||
$lang->custom->methodOrder[55] = 'editStoryConcept';
|
||||
$lang->custom->methodOrder[60] = 'browseStoryConcept';
|
||||
$lang->custom->methodOrder[65] = 'setDefaultConcept';
|
||||
$lang->custom->methodOrder[70] = 'deleteStoryConcept';
|
||||
$lang->custom->methodOrder[75] = 'kanban';
|
||||
$lang->custom->methodOrder[80] = 'code';
|
||||
|
||||
$lang->resource->datatable = new stdclass();
|
||||
$lang->resource->datatable->setGlobal = 'setGlobal';
|
||||
@@ -1917,6 +1915,19 @@ $lang->message->methodOrder[5] = 'index';
|
||||
$lang->message->methodOrder[10] = 'browser';
|
||||
$lang->message->methodOrder[15] = 'setting';
|
||||
|
||||
/* Holiday. */
|
||||
$lang->resource->holiday = new stdclass();
|
||||
$lang->resource->holiday->create = 'createAction';
|
||||
$lang->resource->holiday->edit = 'editAction';
|
||||
$lang->resource->holiday->delete = 'deleteAction';
|
||||
$lang->resource->holiday->browse = 'browse';
|
||||
|
||||
$lang->holiday->methodOrder[0] = 'browse';
|
||||
$lang->holiday->methodOrder[5] = 'create';
|
||||
$lang->holiday->methodOrder[10] = 'edit';
|
||||
$lang->holiday->methodOrder[15] = 'delete';
|
||||
|
||||
/* Action. */
|
||||
$lang->resource->action = new stdclass();
|
||||
$lang->resource->action->trash = 'trash';
|
||||
$lang->resource->action->undelete = 'undeleteAction';
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->group->outside = '组外用户';
|
||||
$lang->group->limited = '受限用户组';
|
||||
$lang->group->other = '其他模块';
|
||||
$lang->group->all = '所有权限';
|
||||
$lang->group->config = '配置';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = '复制权限';
|
||||
$lang->group->copyOptions['copyUser'] = '复制用户';
|
||||
|
||||
@@ -10,7 +10,7 @@ tbody.sortable > tr > td.sort-handler {color: #3c4353 !important;}
|
||||
|
||||
.has-prefix {position: relative; display: flex; align-items: center;}
|
||||
.has-prefix > span {flex: none;}
|
||||
.has-prefix > a {padding-left: 5px;}
|
||||
.has-prefix > .icon-cards-view {padding-right: 4px;}
|
||||
|
||||
.has-suffix > a {max-width: calc(100% - 100px); padding-right: 5px; color: #0c60e1; display: inline-block;}
|
||||
|
||||
|
||||
@@ -73,7 +73,11 @@ class story extends control
|
||||
if(empty($objectID)) $objectID = $this->session->project;
|
||||
|
||||
$projectID = $objectID;
|
||||
if(!$this->session->multiple) $projectID = $this->session->project;
|
||||
if(!$this->session->multiple)
|
||||
{
|
||||
$projectID = $this->session->project;
|
||||
$objectID = $this->execution->getNoMultipleID($projectID);
|
||||
}
|
||||
$projectID = isset($objects[$projectID]) ? $projectID : $this->session->project;
|
||||
$projectID = $this->project->saveState($projectID, $objects);
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
@@ -910,8 +910,10 @@ class storyModel extends model
|
||||
if(!empty($_POST['plan'])) $storyPlan = is_array($_POST['plan']) ? array_filter($_POST['plan']) : array($_POST['plan']);
|
||||
if(count($storyPlan) > 1)
|
||||
{
|
||||
$oldStoryPlan = !empty($oldStory->planTitle) ? array_keys($oldStory->planTitle) : array();
|
||||
if(!empty(array_diff($storyPlan, $oldStoryPlan)) or !empty(array_diff($oldStoryPlan, $storyPlan)))
|
||||
$oldStoryPlan = !empty($oldStory->planTitle) ? array_keys($oldStory->planTitle) : array();
|
||||
$oldPlanDiff = array_diff($storyPlan, $oldStoryPlan);
|
||||
$storyPlanDiff = array_diff($oldStoryPlan, $storyPlan);
|
||||
if(!empty($oldPlanDiff) or !empty($storyPlanDiff))
|
||||
{
|
||||
dao::$errors[] = $this->lang->story->notice->changePlan;
|
||||
return false;
|
||||
|
||||
@@ -79,6 +79,7 @@ class weekly extends control
|
||||
$projects = $this->dao->select('id, name')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('type')->eq('project')
|
||||
->andWhere('status')->ne('closed')
|
||||
->fetchPairs();
|
||||
|
||||
$date = helper::today();
|
||||
|
||||
@@ -117,11 +117,11 @@ class weeklyModel extends model
|
||||
{
|
||||
$weekStart = $this->getThisMonday($date);
|
||||
$report = new stdclass();
|
||||
$PVEV = $this->getPVEV($project, $date);
|
||||
$PVEV = $this->getPVEV($project, $date, $mode = 'new');
|
||||
|
||||
$report->pv = $PVEV['PV'];
|
||||
$report->ev = $PVEV['EV'];
|
||||
$report->ac = $this->getAC($project, $date);
|
||||
$report->ac = $this->getAC($project, $date, $mode = 'new');
|
||||
$report->sv = $this->getSV($report->ev, $report->pv);
|
||||
$report->cv = $this->getCV($report->ev, $report->ac);
|
||||
$report->project = $project;
|
||||
@@ -372,13 +372,14 @@ class weeklyModel extends model
|
||||
*
|
||||
* @param int $project
|
||||
* @param string $date
|
||||
* @param string $mode
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPVEV($projectID, $date = '')
|
||||
public function getPVEV($projectID, $date = '', $mode = 'old')
|
||||
{
|
||||
$report = $this->getFromDB($projectID, $date);
|
||||
if(!empty($report)) return array('PV' => $report->pv, 'EV' => $report->ev);
|
||||
if(!empty($report) && $mode == 'old') return array('PV' => $report->pv, 'EV' => $report->ev);
|
||||
|
||||
if(!$date) $date = date('Y-m-d');
|
||||
$lastDay = $this->getLastDay($date);
|
||||
@@ -434,13 +435,14 @@ class weeklyModel extends model
|
||||
*
|
||||
* @param int $project
|
||||
* @param string $date
|
||||
* @param string $mode
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getAC($project, $date = '')
|
||||
public function getAC($project, $date = '', $mode = 'old')
|
||||
{
|
||||
$report = $this->getFromDB($project, $date);
|
||||
if(!empty($report)) return $report->ac;
|
||||
if(!empty($report) && $mode == 'old') return $report->ac;
|
||||
|
||||
if(!$date) $date = date('Y-m-d');
|
||||
$lastDay = $this->getLastDay($date);
|
||||
|
||||
@@ -72,7 +72,7 @@ $(function(){$('#exportreport').modalTrigger();});
|
||||
<td><?php echo $cv ? $cv . '%' : '';?></td>
|
||||
<td><?php echo $lang->weekly->cost;?></td>
|
||||
<?php $projectCost = zget($this->config->custom, 'cost', 1);?>
|
||||
<td><?php echo empty($projectCost) ? 0 : $ac * $projectCost;?></td>
|
||||
<td class='projectCost'><?php echo empty($projectCost) ? 0 : $ac * $projectCost;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='page-title'><h4><?php echo $lang->weekly->finished;?></h4></div>
|
||||
|
||||
@@ -6,6 +6,12 @@ class prepareUpdate
|
||||
public $internalZT;
|
||||
public $mysqlConfig;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->initZT();
|
||||
@@ -21,6 +27,12 @@ class prepareUpdate
|
||||
$this->checkLang();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init mysql config.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function initMysql()
|
||||
{
|
||||
$this->mysqlConfig = new stdclass();
|
||||
@@ -29,6 +41,12 @@ class prepareUpdate
|
||||
$this->mysqlConfig->databaseName = 'zentaostandard';
|
||||
}
|
||||
|
||||
/**
|
||||
* Init zentao config.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function initZT()
|
||||
{
|
||||
$this->internalZT = new stdclass();
|
||||
@@ -44,6 +62,12 @@ class prepareUpdate
|
||||
$this->getLatestVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get zentao token.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getZTToken()
|
||||
{
|
||||
$tokenUrl = "{$this->internalZT->apiRoot}/tokens";
|
||||
@@ -55,6 +79,12 @@ class prepareUpdate
|
||||
return $response->token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the changelog of the newest release.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addChangelog()
|
||||
{
|
||||
$relatedStoriesAndBugs = $this->getRelatedStoriesAndBugs();
|
||||
@@ -62,6 +92,12 @@ class prepareUpdate
|
||||
file_put_contents('../doc/CHANGELOG', $relatedStoriesAndBugs . "\n" . $oldChangelog);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stories and bugs of the releases for changelog.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getRelatedStoriesAndBugs()
|
||||
{
|
||||
$latestReleases = $this->getLatestRelease();
|
||||
@@ -92,6 +128,12 @@ class prepareUpdate
|
||||
return $releaseHeader . $doneStories . $fixedBugs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the title of story or bug.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getStoryOrBugTitle($objectType, $objectID)
|
||||
{
|
||||
$type = $objectType == 'story' ? 'stories' : 'bugs';
|
||||
@@ -104,6 +146,12 @@ class prepareUpdate
|
||||
return $response ? $response->title : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pms, biz and max latest version.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getLatestVersion()
|
||||
{
|
||||
$releases = $this->getLatestRelease();
|
||||
@@ -115,6 +163,13 @@ class prepareUpdate
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last max version.
|
||||
*
|
||||
* @param object $lastMaxRelease
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLastMaxVersion($lastMaxRelease)
|
||||
{
|
||||
$releaseParse = explode(' ', $lastMaxRelease->name);
|
||||
@@ -122,6 +177,12 @@ class prepareUpdate
|
||||
$this->internalZT->lastMaxVersionAB = str_replace('.', '_', $this->internalZT->lastMaxVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pms, biz and max latest release.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLatestRelease()
|
||||
{
|
||||
$pmsReleases = $this->getReleases($this->internalZT->pmsProductID);
|
||||
@@ -137,6 +198,13 @@ class prepareUpdate
|
||||
return array('pms' => $pmsLatestRelease, 'biz' => $bizLatestRelease, 'max' => $maxLatestRelease);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get releases by api.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getReleases($productID)
|
||||
{
|
||||
$releaseUrl = "{$this->internalZT->apiRoot}/products/{$productID}/releases";
|
||||
@@ -148,6 +216,12 @@ class prepareUpdate
|
||||
return $response->releases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the newest version.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function changeVersion()
|
||||
{
|
||||
$lastVersion = file_get_contents('../VERSION');
|
||||
@@ -160,6 +234,12 @@ class prepareUpdate
|
||||
`sed -i "s/\$config->version = '$lastVersion'/\$config->version = '{$this->internalZT->pmsVersion}'/" ../config/config.php`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the release's detail.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addReleaseDetail()
|
||||
{
|
||||
$date = date('Y-m-d');
|
||||
@@ -174,6 +254,12 @@ class prepareUpdate
|
||||
/* Other lang. */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the last version for update.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addLastVersion()
|
||||
{
|
||||
`sed -i "s/ \/\/ pms insert position\.$/\\n\\\$lang->upgrade->fromVersions['{$this->internalZT->pmsVersionAB}'] = '{$this->internalZT->pmsVersion}'; \/\/ pms insert position\./" ../module/upgrade/lang/version.php`;
|
||||
@@ -181,17 +267,35 @@ class prepareUpdate
|
||||
`sed -i "s/ \/\/ max insert position\.$/\\n\\\$lang->upgrade->fromVersions['max{$this->internalZT->lastMaxVersionAB}'] = 'Max{$this->internalZT->lastMaxVersion}'; \/\/ max insert position\./" ../module/upgrade/lang/version.php`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the version correspondence between open source and business.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addVersionCorrespondence()
|
||||
{
|
||||
`sed -i "s/ \/\/ biz insert position\.$/\\n\\\$config->upgrade->bizVersion['biz{$this->internalZT->bizVersionAB}'] = '{$this->internalZT->pmsVersionAB}'; \/\/ biz insert position\./" ../module/upgrade/config.php`;
|
||||
`sed -i "s/ \/\/ max insert position\.$/\\n\\\$config->upgrade->maxVersion['max{$this->internalZT->maxVersionAB}'] = '{$this->internalZT->pmsVersionAB}'; \/\/ max insert position\./" ../module/upgrade/config.php`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the confirm sql for update.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addConfirmedSql()
|
||||
{
|
||||
`sed -i "s/ \/\/ confirm insert position\.$/\\n case '{$this->internalZT->lastPmsVersionAB}':\\n \\\$confirmContent .= file_get_contents(\\\$this->getUpgradeFile('{$this->internalZT->lastPmsVersion}')); \/\/ confirm insert position\./" ../module/upgrade/model.php`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Export standard sql.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function exportStandardSql()
|
||||
{
|
||||
$lastStandardSql = file_get_contents("../db/standard/zentao{$this->internalZT->lastPmsVersion}.sql");
|
||||
@@ -209,6 +313,12 @@ class prepareUpdate
|
||||
file_put_contents("../db/standard/zentao{$this->internalZT->pmsVersion}.sql", $content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether update sql and install sql are consistent.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkInstallSql()
|
||||
{
|
||||
$updateSql = file_get_contents("../db/update{$this->internalZT->lastPmsVersion}.sql");
|
||||
@@ -259,6 +369,12 @@ class prepareUpdate
|
||||
echo $errorSql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check lang.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkLang()
|
||||
{
|
||||
`php check.php`;
|
||||
|
||||
Reference in New Issue
Block a user