From 2ecdc58a3d4dedaa251e34170951426c7f89dc59 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Apr 2018 09:39:01 +0800 Subject: [PATCH] * finish task #3769. --- module/common/lang/en.php | 2 +- module/common/lang/zh-cn.php | 6 +- module/file/view/printfiles.html.php | 13 +- module/product/model.php | 7 +- module/project/lang/zh-cn.php | 2 +- module/project/model.php | 13 +- module/task/view/view.html.php | 633 ++++++++++++++------------- 7 files changed, 345 insertions(+), 331 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index bf3f0a738c..cc4bbc17fb 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -546,7 +546,7 @@ $lang->icons['report'] = 'bar-chart'; $lang->icons['export'] = 'download-alt'; $lang->icons['report-file'] = 'file-powerpoint'; $lang->icons['import'] = 'upload-alt'; -$lang->icons['finish'] = 'ok-sign'; +$lang->icons['finish'] = 'checked'; $lang->icons['resolve'] = 'ok-sign'; $lang->icons['start'] = 'play'; $lang->icons['restart'] = 'play'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index d777813d8c..682cfcf672 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -215,7 +215,6 @@ $lang->release->menu = $lang->product->menu; $lang->project = new stdclass(); $lang->project->menu = new stdclass(); -$lang->project->menu->list = array('link' => '%s', 'fixed' => true); $lang->project->menu->task = array('link' => '任务|project|task|projectID=%s', 'subModule' => 'task,tree', 'alias' => 'grouptask,importtask,burn,importbug,kanban,printkanban,tree'); $lang->project->menu->story = array('link' => '需求|project|story|projectID=%s', 'subModule' => 'story', 'alias' => 'linkstory,storykanban'); $lang->project->menu->bug = 'Bug|project|bug|projectID=%s'; @@ -226,9 +225,6 @@ $lang->project->menu->team = array('link' => '团队|project|team|projectID= $lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc'); $lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s'; $lang->project->menu->view = array('link' => '概况|project|view|projectID=%s', 'alias' => 'edit,start,suspend,putoff,close'); -$lang->project->menu->create = array('link' => " 添加{$lang->projectCommon}|project|create", 'float' => 'right'); -$lang->project->menu->all = array('link' => " 所有{$lang->projectCommon}|project|all|status=undone&projectID=%s", 'float' => 'right'); -$lang->project->menu->index = array('link' => "{$lang->projectCommon}主页|project|index|locate=no", 'float' => 'right'); $lang->task = new stdclass(); $lang->build = new stdclass(); @@ -542,7 +538,7 @@ $lang->icons['report'] = 'bar-chart'; $lang->icons['export'] = 'download-alt'; $lang->icons['report-file'] = 'file-powerpoint'; $lang->icons['import'] = 'upload-alt'; -$lang->icons['finish'] = 'ok-sign'; +$lang->icons['finish'] = 'checked'; $lang->icons['resolve'] = 'ok-sign'; $lang->icons['start'] = 'play'; $lang->icons['restart'] = 'play'; diff --git a/module/file/view/printfiles.html.php b/module/file/view/printfiles.html.php index ee097a8881..8b1dc23893 100644 --- a/module/file/view/printfiles.html.php +++ b/module/file/view/printfiles.html.php @@ -1,13 +1,13 @@ + requestType == 'PATH_INFO' ? '?' : '&'; $sessionString .= session_name() . '=' . session_id(); ?> - -
- file->common;?> -
+
file->common;?>
+
+ -
file->common;?>
-
+
-';?> + diff --git a/module/product/model.php b/module/product/model.php index 4893e259c8..f6ddbf238e 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -90,9 +90,12 @@ class productModel extends model setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot); $currentProduct = $this->getById($productID); $this->session->set('currentProductType', $currentProduct->type); - $output = "
"; - if($isMobile) $output = "{$currentProduct->name} "; + + $output = "
"; + if($isMobile) $output = "{$currentProduct->name} "; + if($currentProduct->type == 'normal') unset($this->lang->product->menu->branch); + if($currentProduct->type != 'normal') { $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]); diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 49fea0814b..16acdd523c 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -100,7 +100,7 @@ $lang->project->aclList['private'] = "私有{$lang->projectCommon}(只有{$lang- $lang->project->aclList['custom'] = "自定义白名单(团队成员和白名单的成员可以访问)"; /* 方法列表。*/ -$lang->project->index = "{$lang->projectCommon}首页"; +$lang->project->index = "{$lang->projectCommon}主页"; $lang->project->task = '任务列表'; $lang->project->groupTask = '分组浏览任务'; $lang->project->story = '需求列表'; diff --git a/module/project/model.php b/module/project/model.php index 995250acfb..f8702ab304 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -100,9 +100,18 @@ class projectModel extends model } $selectHtml = $this->select($projects, $projectID, $moduleName, $methodName, $extra); + + $projectIndex = '
'; + $projectIndex .= '
'; + $projectIndex .= $selectHtml; + + $this->lang->modulePageNav = $projectIndex; foreach($this->lang->project->menu as $key => $menu) { - $replace = $key == 'list' ? $selectHtml : $projectID; + $replace = $projectID; common::setMenuVars($this->lang->project->menu, $key, $replace); } } @@ -126,7 +135,7 @@ class projectModel extends model setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot); $currentProject = $this->getById($projectID); - $output = "{$currentProject->name}
"; + $output = "
"; if($isMobile) $output = "{$currentProject->name} "; return $output; } diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 7aa2f8a765..03eb00ef91 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -12,131 +12,96 @@ ?> -
-
- icons['task']);?> id;?> - - parent)) echo '' . $this->lang->task->childrenAB . ' ';?> - team)) echo '' . $this->lang->task->multipleAB . ' ';?> - parentName) ? $task->parentName . '/' : '';?>name;?> - - deleted):?> - task->deleted;?> - - fromBug != 0):?> - icons['bug']) . " {$lang->task->fromBug}$lang->colon$task->fromBug";?> - -
-
- session->taskList != false ? $app->session->taskList : $this->createLink('project', 'browse', "projectID=$task->project"); - $actionLinks = ''; - if(!$task->deleted) - { - ob_start(); - echo "
"; - common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $lang->task->assignTo : $lang->task->transfer); - common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - common::printIcon('task', 'pause', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody text-success', true); - common::printIcon('task', 'close', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - common::printIcon('task', 'activate', "taskID=$task->id", $task, 'button', '', '', 'iframe text-success', true); - common::printIcon('task', 'cancel', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - echo '
'; - - echo "
"; - if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'button','plus','','','','',' '); - common::printIcon('task', 'edit', "taskID=$task->id", $task); - common::printCommentIcon('task', $task); - common::printIcon('task', 'create', "productID=0&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy'); - common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task); - echo '
'; - - echo "
"; - if(!empty($task->parent)) echo html::a(helper::createLink('task', 'view', "taskID=$task->parent"), "", '', "class='btn' title='{$lang->task->parent}'"); - common::printRPN($browseLink, $preAndNext); - echo '
'; - - $actionLinks = ob_get_contents(); - ob_end_clean(); - echo $actionLinks; - } - else - { - common::printRPN($browseLink); - } - ?> -
-
-
-
-
-
- task->legendDesc;?> -
desc;?>
-
- type != 'ops'):?> - fromBug != 0):?> -
- bug->steps;?> -
bugSteps;?>
-
- -
- task->storySpec;?> -
storySpec;?>
- fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?> -
-
- task->storyVerify;?> -
storyVerify;?>
-
- - cases) and $task->cases):?> -
- task->case;?> -
-
    - cases as $caseID => $case) echo '
  • ' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', "data-toggle='modal' data-type='iframe' data-width='90%'") . '
  • ';?> -
-
-
- - - children)):?> -
- lang->task->children;?> - - - - - - - - - - - - - children as $child):?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
task->id;?> task->lblPri;?> task->name;?>task->deadline;?> task->assignedTo;?> task->status;?>task->consumedAB . $lang->task->lblHour;?>task->leftAB . $lang->task->lblHour;?>actions;?>
id;?> - lang->task->priList, $child->pri, $child->pri) . "'>"; - echo $child->pri == '0' ? '' : zget($this->lang->task->priList, $child->pri, $child->pri); - echo ""; - ?> - id"); ?>">name;?>deadline;?>assignedTo])) echo $users[$child->assignedTo];?>task->statusList, $child->status);?>consumed;?>left;?> +
+
+ session->taskList != false ? $app->session->taskList : $this->createLink('project', 'browse', "projectID=$task->project");?> + +
+
+
+
+
task->legendDesc;?>
+
desc;?>
+
+ type != 'ops'):?> + fromBug != 0):?> +
+
task->steps;?>
+
bugSteps;?>
+
+ story):?> +
+
task->storySpec;?>
+
storySpec;?>
+ fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?> +
+
+
task->storyVerify;?>
+
storyVerify;?>
+
+ + cases) and $task->cases):?> +
+
task->case;?>
+
+
    + cases as $caseID => $case) echo '
  • ' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', "data-toggle='modal' data-type='iframe' data-width='90%'") . '
  • ';?> +
+
+
+ + + children)):?> +
+
lang->task->children;?>
+ + + + + + + + + + + + + children as $child):?> + + + + + + + + + + - - -
task->id;?> task->lblPri;?> task->name;?>task->deadline;?> task->assignedTo;?> task->status;?>task->consumedAB . $lang->task->lblHour;?>task->leftAB . $lang->task->lblHour;?>actions;?>
id;?> + pri . "'>"; + echo $child->pri == '0' ? '' : zget($this->lang->task->priList, $child->pri, $child->pri); + echo ""; + ?> + id"); ?>">name;?>deadline;?>assignedTo])) echo $users[$child->assignedTo];?>task->statusList, $child->status);?>consumed;?>left;?> project&taskID=$child->id", $child, 'list', '', '', 'iframe', true); common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); @@ -145,196 +110,238 @@ common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); common::printIcon('task', 'edit',"taskID=$child->id", $child, 'list'); ?> -
- - - fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?> - -
deleted) echo $actionLinks;?>
-
- comment;?> -
id")?>' target='hiddenwin'> -
- -
-
-
-
-
-
-
- task->legendBasic;?> - - - - - - - - name . '/'; - echo $product->name . $lang->arrow; - } - foreach($modulePath as $key => $module) - { - $moduleTitle .= $module->name; - if(!common::printLink('project', 'task', "projectID=$task->project&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; - if(isset($modulePath[$key + 1])) - { - $moduleTitle .= '/'; - echo $lang->arrow; - } - } - } - $printModule = ob_get_contents(); - ob_end_clean(); - ?> - - - - - - - fromBug):?> - - - - + + + +
task->project;?>project", $project->name)) echo $project->name;?>
task->module;?>
task->story;?> - storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class='iframe' data-width='80%'", true, true)) echo $task->storyTitle; - if($task->needConfirm) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - ?> -
task->fromBug;?>createLink('bug', 'view', "bugID=$task->fromBug"), "#$task->fromBug " . $fromBug->title, '_blank');?>
+
-
team) ? $lang->task->assignTo : $lang->task->transferTo;?>assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : '';?>
task->type;?>task->typeList[$task->type];?>
task->status;?>show($lang->task->statusList, $task->status);?>
task->pri;?>task->priList, $task->pri);?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri)?>
task->mailto;?>mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account, $account); ?>
-
- team)) :?> -
- task->team;?> - - - - - - - - - - team as $member):?> - - - - - - - -
task->team?>task->estimate?>task->consumed?>task->left?>
account)?>estimate?>consumed?>left?>
-
- -
- task->legendEffort;?> - - - - - - - - - - - - - - - - - - - - - - - - - -
task->estStarted;?>estStarted;?>
task->realStarted;?>realStarted; ?>
task->deadline;?> - deadline; - if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay); - ?> -
task->estimate;?>estimate . $lang->workingHour;?>
task->consumed;?>consumed, 2) . $lang->workingHour;?>
task->left;?>left . $lang->workingHour;?>
-
-
- task->legendLife;?> - - - - - - - - - - - - - - - - - - - - - - - - - -
task->openedBy;?>openedBy) echo zget($users, $task->openedBy, $task->openedBy) . $lang->at . $task->openedDate;?>
task->finishedBy;?>finishedBy) echo zget($users, $task->finishedBy, $task->finishedBy) . $lang->at . $task->finishedDate;?>
task->canceledBy;?>canceledBy) echo zget($users, $task->canceledBy, $task->canceledBy) . $lang->at . $task->canceledDate;?>
task->closedBy;?>closedBy) echo zget($users, $task->closedBy, $task->closedBy) . $lang->at . $task->closedDate;?>
task->closedReason;?>task->reasonList[$task->closedReason];?>
task->lastEdited;?>lastEditedBy) echo zget($users, $task->lastEditedBy, $task->lastEditedBy) . $lang->at . $task->lastEditedDate;?>
-
+ fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?> + createLink('action', 'comment', "objectType=task&objectID=$task->id");?> + +
+
+
+
+
+ task->legendBasic;?> +
+ + + + + + + + + name . '/'; + echo $product->name . $lang->arrow; + } + foreach($modulePath as $key => $module) + { + $moduleTitle .= $module->name; + if(!common::printLink('project', 'task', "projectID=$task->project&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; + if(isset($modulePath[$key + 1])) + { + $moduleTitle .= '/'; + echo $lang->arrow; + } + } + } + $printModule = ob_get_contents(); + ob_end_clean(); + ?> + + + + + + + fromBug):?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
task->project;?>project", $project->name)) echo $project->name;?>
task->module;?>
task->story;?> + storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class='iframe' data-width='80%'", true, true)) echo $task->storyTitle; + if($task->needConfirm) + { + echo "({$lang->story->changed} "; + echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin'); + echo ")"; + } + ?> +
task->fromBug;?>createLink('bug', 'view', "bugID=$task->fromBug"), "#$task->fromBug " . $fromBug->title, '_blank');?>
team) ? $lang->task->assignTo : $lang->task->transferTo;?>assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : '';?>
task->type;?>task->typeList[$task->type];?>
task->status;?>show($lang->task->statusList, $task->status);?>
task->pri;?>task->priList, $task->pri);?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri)?>
task->mailto;?>mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account, $account); ?>
+
+
+
+ team)) :?> +
+
+ task->team;?> +
+ + + + + + + + + + team as $member):?> + + + + + + + +
task->team?>task->estimate?>task->consumed?>task->left?>
account)?>estimate?>consumed?>left?>
+
+
+
+ +
+
+ task->legendEffort;?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
task->estStarted;?>estStarted;?>
task->realStarted;?>realStarted; ?>
task->deadline;?> + deadline; + if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay); + ?> +
task->estimate;?>estimate . $lang->workingHour;?>
task->consumed;?>consumed, 2) . $lang->workingHour;?>
task->left;?>left . $lang->workingHour;?>
+
+
+
+
+
+ task->legendLife;?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
task->openedBy;?>openedBy) echo zget($users, $task->openedBy, $task->openedBy) . $lang->at . $task->openedDate;?>
task->finishedBy;?>finishedBy) echo zget($users, $task->finishedBy, $task->finishedBy) . $lang->at . $task->finishedDate;?>
task->canceledBy;?>canceledBy) echo zget($users, $task->canceledBy, $task->canceledBy) . $lang->at . $task->canceledDate;?>
task->closedBy;?>closedBy) echo zget($users, $task->closedBy, $task->closedBy) . $lang->at . $task->closedDate;?>
task->closedReason;?>task->reasonList[$task->closedReason];?>
task->lastEdited;?>lastEditedBy) echo zget($users, $task->lastEditedBy, $task->lastEditedBy) . $lang->at . $task->lastEditedDate;?>
+
+
+
+
-
+ +
+ +
+ deleted):?> + project&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $lang->task->assignTo : $lang->task->transfer); + common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); + common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); + common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); + common::printIcon('task', 'pause', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); + common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody text-success', true); + common::printIcon('task', 'close', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); + common::printIcon('task', 'activate', "taskID=$task->id", $task, 'button', '', '', 'iframe text-success', true); + common::printIcon('task', 'cancel', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); + + echo "
"; + if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'button','plus','','','','',' '); + common::printIcon('task', 'edit', "taskID=$task->id", $task); + common::printIcon('task', 'create', "productID=0&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy'); + common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task); + + echo "
"; + if(!empty($task->parent)) echo html::a(helper::createLink('task', 'view', "taskID=$task->parent"), "", '', "class='btn' title='{$lang->task->parent}'"); + common::printBack($browseLink); + ?> + + + +
+
+