-
diff --git a/module/gitlab/view/browseproject.html.php b/module/gitlab/view/browseproject.html.php
index 286ff6c9a7..93fddbd2f7 100644
--- a/module/gitlab/view/browseproject.html.php
+++ b/module/gitlab/view/browseproject.html.php
@@ -16,7 +16,7 @@
gitlab->getGitlabMenu($gitlabID, 'project');?>
-
@@ -45,7 +45,7 @@
gitlab->project->name);?>
gitlab->lastUpdate;?>
- actions;?>
+ actions;?>
diff --git a/module/gitlab/view/browseuser.html.php b/module/gitlab/view/browseuser.html.php
index 12ba265311..66da47013d 100644
--- a/module/gitlab/view/browseuser.html.php
+++ b/module/gitlab/view/browseuser.html.php
@@ -14,20 +14,20 @@
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index ba67f94a53..d23fcfc023 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -1146,6 +1146,7 @@ $lang->resource->repo->download = 'downloadAction';
$lang->resource->repo->maintain = 'maintain';
$lang->resource->repo->setRules = 'setRules';
$lang->resource->repo->apiGetRepoByUrl = 'apiGetRepoByUrl';
+$lang->resource->repo->downloadCode = 'downloadCode';
$lang->repo->methodOrder[5] = 'create';
$lang->repo->methodOrder[10] = 'edit';
@@ -1161,6 +1162,7 @@ $lang->repo->methodOrder[55] = 'blame';
$lang->repo->methodOrder[60] = 'download';
$lang->repo->methodOrder[65] = 'setRules';
$lang->repo->methodOrder[70] = 'apiGetRepoByUrl';
+$lang->repo->methodOrder[75] = 'downloadCode';
$lang->resource->ci = new stdclass();
$lang->resource->ci->commitResult = 'commitResult';
diff --git a/module/my/view/feedback.html.php b/module/my/view/feedback.html.php
index f8f30c1940..eb26feeb56 100644
--- a/module/my/view/feedback.html.php
+++ b/module/my/view/feedback.html.php
@@ -32,7 +32,7 @@
' + item + ' ');
var newItem = $('#names' + itemIndex).closest('tr');
newItem.find('.form-date').datepicker();
- $("#output" + itemIndex).chosen();
- $("#PM_i__chosen").remove();
- $("#PM" + itemIndex).chosen();
- $("#output_i__chosen").remove();
+ $("#output" + itemIndex).picker();
+ $("#PM" + itemIndex).picker();
itemIndex ++;
}
diff --git a/module/programplan/view/create.html.php b/module/programplan/view/create.html.php
index 0cbc6974bf..521bfa5d6c 100644
--- a/module/programplan/view/create.html.php
+++ b/module/programplan/view/create.html.php
@@ -80,7 +80,7 @@
- >
+ >
>
'>stage->typeList, $stage->type, "class='form-control'");?>
'>execution->aclList, 'open', "class='form-control' $class");?>
- >programplan->milestoneList, 0);?>
+ >programplan->milestoneList, 0);?>
>
>
config->edition == 'max'):?>
-
+
-
+
@@ -111,7 +111,7 @@
id);?>
- >PM, "class='form-control chosen'");?>
+ >PM, "class='form-control picker-select'");?>
>
'>stage->typeList, $plan->attribute, "class='form-control'");?>
>execution->aclList, $plan->acl, "class='form-control' $class");?>
- >programplan->milestoneList, $plan->milestone, $disabled);?>
+ >programplan->milestoneList, $plan->milestone, $disabled);?>
>
>
config->edition == 'max'):?>
output) ? 0 : explode(',', $plan->output);?>
-
+
-
+
+
@@ -139,7 +140,7 @@
- >
+ >
>
'>stage->typeList, '', "class='form-control'");?>
>execution->aclList, 'open', "class='form-control' $class");?>
- >programplan->milestoneList, 0);?>
+ >programplan->milestoneList, 0);?>
>
>
config->edition == 'max'):?>
-
+
-
+
@@ -180,7 +181,7 @@
gitlab->getGitlabMenu($gitlabID, 'user');?>
-
- " . $lang->gitlab->user->create, '', "class='btn btn-primary'");?>
+ " . $lang->gitlab->user->create, '', "class='btn btn-primary'");?>
noData;?> - createLink('gitlab', 'createProject', "gitlabID=$gitlabID"), " " . $lang->gitlab->user->create, '', "class='btn btn-info'");?> + createLink('gitlab', 'createProject', "gitlabID=$gitlabID"), " " . $lang->gitlab->user->create, '', "class='btn btn-info'");?>
-
dao->insert(TABLE_PIPELINE)->data($pipeline)
->batchCheck($this->config->pipeline->create->requiredFields, 'notempty')
->batchCheck("url", 'URL')
+ ->check('name', 'unique', "`type` = '$type'")
->autoCheck()
->exec();
if(dao::isError()) return false;
@@ -116,6 +117,7 @@ class pipelineModel extends model
$this->dao->update(TABLE_PIPELINE)->data($pipeline)
->batchCheck($this->config->pipeline->edit->requiredFields, 'notempty')
->batchCheck("url", 'URL')
+ ->check('name', 'unique', "`type` = '$type' and id <> $id")
->autoCheck()
->where('id')->eq($id)
->exec();
diff --git a/module/programplan/js/create.js b/module/programplan/js/create.js
index e87c94a816..79a3c250ae 100644
--- a/module/programplan/js/create.js
+++ b/module/programplan/js/create.js
@@ -11,10 +11,8 @@ function addItem(obj)
$(obj).closest('tr').after('noData;?>
+feedback->noFeedback;?>
@@ -89,15 +89,15 @@
@@ -120,17 +120,18 @@
@@ -148,15 +149,15 @@
| - | > | +> | >
@@ -190,15 +191,15 @@
|
'>stage->typeList, '', "class='form-control'");?> | >execution->aclList, 'open', "class='form-control' $class");?> | ->programplan->milestoneList, 0);?> | +>programplan->milestoneList, 0);?> | > | > | config->edition == 'max'):?> -+ | - | + | diff --git a/module/repo/control.php b/module/repo/control.php index 7942fe6a84..fee4f2957b 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -497,6 +497,7 @@ class repo extends control $this->view->pager = $pager; $this->view->path = urldecode($path); $this->view->logType = $logType; + $this->view->cloneUrl = $this->repo->getCloneUrl($repo); $this->view->cacheTime = date('m-d H:i', filemtime($cacheFile)); $this->view->branchOrTag = $branchOrTag; @@ -1293,4 +1294,21 @@ class repo extends control $executions = $this->repo->getExecutionPairs($productID, $branch); echo html::select('execution', array('' => '') + $executions, '', 'class="form-control chosen"'); } + + /** + * Download zip code. + * + * @param int $repoID + * @param string $branch + * @access public + * @return void + */ + public function downloadCode($repoID = 0, $branch = '') + { + $repo = $this->repo->getRepoByID($repoID); + if($repo->SCM == 'Gitlab') + { + return ''; + } + } } diff --git a/module/repo/css/browse.css b/module/repo/css/browse.css index 5a0a4b0799..9ecc8cca58 100644 --- a/module/repo/css/browse.css +++ b/module/repo/css/browse.css @@ -26,3 +26,8 @@ /* Fix bug #21893. */ .in #sidebar>.sidebar-toggle>.icon-angle-left:before {content: "\e315";} .hide-sidebar #sidebar>.sidebar-toggle>.icon-angle-left:before {content: "\e314";} + +.download-popover {width: 400px; max-width: none;} +.popover-content {padding: 0;} +.download-popover .table {margin-bottom: 0;} +.download-popover .table td {padding-right: 0;} diff --git a/module/repo/js/browse.js b/module/repo/js/browse.js new file mode 100644 index 0000000000..4439789721 --- /dev/null +++ b/module/repo/js/browse.js @@ -0,0 +1,82 @@ +function getDownload() +{ + var content = " |
| " + lang.sshClone + " | "; + content += "|
|---|---|
| "; + content += " | "; + content += " |
| " + lang.httpClone + " | "; + content += "|
| "; + content += " | "; + content += " |
| "; + content += " | "; + content += " | "; + content += "
repo->create = 'Create';
$lang->repo->maintain = 'Repo List';
$lang->repo->edit = 'Edit';
$lang->repo->delete = 'Delete Repo';
-$lang->repo->showSyncCommit = 'Display Synchronization';
+$lang->repo->showSyncCommit = 'Display Sync';
$lang->repo->ajaxSyncCommit = 'Interface: Ajax Sync Note';
-$lang->repo->setRules = 'Set rules';
+$lang->repo->setRules = 'Set Rules';
$lang->repo->download = 'Download File';
$lang->repo->downloadDiff = 'Download Diff';
$lang->repo->addBug = 'Add Review';
@@ -30,16 +30,22 @@ $lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
$lang->repo->browseAction = 'Browse Repo';
$lang->repo->createAction = 'Create Repo';
$lang->repo->editAction = 'Edit Repo';
-$lang->repo->diffAction = 'Revision Diff';
+$lang->repo->diffAction = 'Diff Revision';
$lang->repo->downloadAction = 'Download File';
$lang->repo->revisionAction = 'Revision Detail';
-$lang->repo->blameAction = 'Repo Blame';
+$lang->repo->blameAction = 'Blame';
$lang->repo->reviewAction = 'Review List';
+$lang->repo->downloadCode = 'Download Code';
+$lang->repo->downloadZip = 'Download Zip file';
+$lang->repo->sshClone = 'Clone by SSH';
+$lang->repo->httpClone = 'Clone by HTTP';
$lang->repo->submit = 'Submit';
$lang->repo->cancel = 'Cancel';
$lang->repo->addComment = 'Add Comment';
+$lang->repo->copy = 'Click to copy';
+$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Type';
$lang->repo->assign = 'AssignTo';
@@ -106,7 +112,7 @@ $lang->repo->openedDate = 'CreatedDate';
$lang->repo->latestRevision = 'Latest Revision';
$lang->repo->actionInfo = "Add by %s in %s";
$lang->repo->changes = "Change Log";
-$lang->repo->reviewLocation = "File: %s@%s, line:%s - %s";
+$lang->repo->reviewLocation = "File: %s@%s, Line: %s - %s";
$lang->repo->commentEdit = '';
$lang->repo->commentDelete = '';
$lang->repo->allChanges = "Other Changes";
@@ -119,7 +125,7 @@ $lang->repo->objectIdRule = 'Object ID Rule';
$lang->repo->actionRule = 'Action Rule';
$lang->repo->manHourRule = 'Man-hour Rule';
$lang->repo->ruleUnit = "Unit";
-$lang->repo->ruleSplit = "Multiple keywords are divided by ';'. For example: task multiple keywords: Task;task";
+$lang->repo->ruleSplit = "Multiple keywords are divided by ';', e.g. task multiple keywords: Task;task";
$lang->repo->viewDiffList['inline'] = 'Inline';
$lang->repo->viewDiffList['appose'] = 'Parallel';
@@ -136,7 +142,7 @@ $lang->repo->encodingList['gbk'] = 'GBK';
$lang->repo->scmList['Gitlab'] = 'GitLab';
$lang->repo->scmList['Git'] = 'Git';
-$lang->repo->scmList['Subversion'] = 'Subversion';
+$lang->repo->scmList['Subversion'] = 'SVN';
$lang->repo->gitlabHost = 'GitLab Host';
$lang->repo->gitlabToken = 'GitLab Token';
@@ -149,12 +155,12 @@ $lang->repo->notice = new stdclass();
$lang->repo->notice->syncing = 'Synchronizing. Please wait ...';
$lang->repo->notice->syncComplete = 'Synchronized. Now redirecting ...';
$lang->repo->notice->syncedCount = 'The number of records synchronized is ';
-$lang->repo->notice->delete = 'Are you sure delete this repo?';
+$lang->repo->notice->delete = 'Do you want to delete this repo?';
$lang->repo->notice->successDelete = 'Repository is removed.';
$lang->repo->notice->commentContent = 'Comment';
$lang->repo->notice->deleteReview = 'Do you want to delete this review?';
-$lang->repo->notice->deleteBug = 'Are you sure to delete this bug?';
-$lang->repo->notice->deleteComment = 'Are you sure to delete this comment?';
+$lang->repo->notice->deleteBug = 'Do you want to delete this bug?';
+$lang->repo->notice->deleteComment = 'Do you want to delete this comment?';
$lang->repo->notice->lastSyncTime = 'Last Sync:';
$lang->repo->rules = new stdclass();
@@ -182,14 +188,14 @@ $lang->repo->error->noFile = '%s does not exist.';
$lang->repo->error->noPriv = 'The program does not have the privilege to switch to %s';
$lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n";
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
-$lang->repo->error->encoding = "The encoding maybe wrong. Please change the encoding and try again.";
+$lang->repo->error->encoding = "The encoding might be wrong. Please change the encoding and try again.";
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design.";
$lang->repo->error->linkedJob = "Deletion of the repository failed. The current repository has associated with the Compile.";
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
$lang->repo->error->notFound = "The repository %s’s URL %s does not exist. Please confirm if this repository has been deleted from the local server.";
$lang->repo->syncTips = 'You may find the reference about how to set Git sync from here.';
-$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,e.g. utf-8";
+$lang->repo->encodingsTips = "The encodings of comments can be comma separated values, e.g. utf-8.";
$lang->repo->pathTipsForGitlab = "GitLab Project URL";
$lang->repo->example = new stdclass();
diff --git a/module/repo/lang/en.php b/module/repo/lang/en.php
index bbbdd4996f..7e6dabca74 100644
--- a/module/repo/lang/en.php
+++ b/module/repo/lang/en.php
@@ -35,11 +35,17 @@ $lang->repo->downloadAction = 'Download File';
$lang->repo->revisionAction = 'Revision Detail';
$lang->repo->blameAction = 'Blame';
$lang->repo->reviewAction = 'Review List';
+$lang->repo->downloadCode = 'Download Code';
+$lang->repo->downloadZip = 'Download compressed package';
+$lang->repo->sshClone = 'Clone by SSH';
+$lang->repo->httpClone = 'Clone by HTTP';
$lang->repo->submit = 'Submit';
$lang->repo->cancel = 'Cancel';
$lang->repo->addComment = 'Add Comment';
+$lang->repo->copy = 'Click to copy';
+$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Type';
$lang->repo->assign = 'AssignTo';
diff --git a/module/repo/lang/fr.php b/module/repo/lang/fr.php
index 0be6154245..4c0dd7754a 100644
--- a/module/repo/lang/fr.php
+++ b/module/repo/lang/fr.php
@@ -35,11 +35,17 @@ $lang->repo->downloadAction = 'Download File';
$lang->repo->revisionAction = 'Détail Révision';
$lang->repo->blameAction = 'Blâme du Référentiel';
$lang->repo->reviewAction = 'Review List';
+$lang->repo->downloadCode = 'Download Code';
+$lang->repo->downloadZip = 'Download compressed package';
+$lang->repo->sshClone = 'Clone by SSH';
+$lang->repo->httpClone = 'Clone by HTTP';
$lang->repo->submit = 'Soumettre';
$lang->repo->cancel = 'Annuler';
$lang->repo->addComment = 'Ajout Comment.';
+$lang->repo->copy = 'Click to copy';
+$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Type';
$lang->repo->assign = 'Assigner à';
diff --git a/module/repo/lang/vi.php b/module/repo/lang/vi.php
index 18f8986521..d950a23f27 100644
--- a/module/repo/lang/vi.php
+++ b/module/repo/lang/vi.php
@@ -27,10 +27,25 @@ $lang->repo->tag = 'Tag';
$lang->repo->addWebHook = 'Add Webhook';
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
+$lang->repo->browseAction = 'Browse Repo';
+$lang->repo->createAction = 'Create Repo';
+$lang->repo->editAction = 'Edit Repo';
+$lang->repo->diffAction = 'Diff Revision';
+$lang->repo->downloadAction = 'Download File';
+$lang->repo->revisionAction = 'Revision Detail';
+$lang->repo->blameAction = 'Blame';
+$lang->repo->reviewAction = 'Review List';
+$lang->repo->downloadCode = 'Download Code';
+$lang->repo->downloadZip = 'Download compressed package';
+$lang->repo->sshClone = 'Clone by SSH';
+$lang->repo->httpClone = 'Clone by HTTP';
+
$lang->repo->submit = 'Gửi';
$lang->repo->cancel = 'Hủy';
$lang->repo->addComment = 'Thêm nhận xét';
+$lang->repo->copy = 'Click to copy';
+$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Loại';
$lang->repo->assign = 'Giao cho';
diff --git a/module/repo/lang/zh-cn.php b/module/repo/lang/zh-cn.php
index c59dcf047b..9b23233d17 100644
--- a/module/repo/lang/zh-cn.php
+++ b/module/repo/lang/zh-cn.php
@@ -35,11 +35,17 @@ $lang->repo->downloadAction = '下载代码库文件';
$lang->repo->revisionAction = '版本详情';
$lang->repo->blameAction = '版本追溯';
$lang->repo->reviewAction = '评审列表';
+$lang->repo->downloadCode = '下载代码';
+$lang->repo->downloadZip = '下载压缩包';
+$lang->repo->sshClone = '使用SSH克隆';
+$lang->repo->httpClone = '使用HTTP克隆';
$lang->repo->submit = '提交';
$lang->repo->cancel = '取消';
$lang->repo->addComment = '添加评论';
+$lang->repo->copy = '点击复制';
+$lang->repo->copied = '复制成功';
$lang->repo->module = '模块';
$lang->repo->type = '类型';
$lang->repo->assign = '指派';
diff --git a/module/repo/model.php b/module/repo/model.php
index 390d4a8414..3e9ca0c39f 100644
--- a/module/repo/model.php
+++ b/module/repo/model.php
@@ -2131,4 +2131,29 @@ class repoModel extends model
foreach($executions as $execution) $pairs[$execution->id] = $execution->name;
return $pairs;
}
+
+ /**
+ * Get clone url.
+ *
+ * @param object $repo
+ * @access public
+ * @return object
+ */
+ public function getCloneUrl($repo)
+ {
+ if(empty($repo)) return null;
+
+ $url = new stdClass();
+ if($repo->SCM == 'Gitlab')
+ {
+ $project = $this->loadModel('gitlab')->apiGetSingleProject($repo->gitlab, $repo->project);
+ if(isset($project->id))
+ {
+ $url->http = $project->http_url_to_repo;
+ $url->ssh = $project->ssh_url_to_repo;
+ }
+ }
+
+ return $url;
+ }
}
diff --git a/module/repo/view/browse.html.php b/module/repo/view/browse.html.php
index 853959ab83..9553bfc7b7 100644
--- a/module/repo/view/browse.html.php
+++ b/module/repo/view/browse.html.php
@@ -9,6 +9,10 @@
*/
?>
+
+
+repo);?>
+
@@ -82,7 +86,9 @@
repo->notice->lastSyncTime . $cacheTime?>
repo->createLink('browse', "repoID=$repoID&branchID=" . $base64BranchID . "&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"), " " . $lang->refresh, '', "class='btn btn-primary' data-app={$app->tab}");?>
- SCM == 'Gitlab' and common::hasPriv('gitlab', 'createBranch')) echo html::a($this->createLink('gitlab', 'createBranch', "gitlabID={$repo->gitlab}&projectID={$repo->project}"), " " . $lang->gitlab->createBranch, '', "class='btn btn-primary'");?>
+
+
+
diff --git a/module/report/control.php b/module/report/control.php
index 60e3ff54e9..15d582fa4f 100644
--- a/module/report/control.php
+++ b/module/report/control.php
@@ -315,6 +315,20 @@ class report extends control
$users[''] = $this->lang->report->annualData->allUser;
$depts = $this->loadModel('dept')->getOptionMenu();
+ $accounts = array();
+ if($userID)
+ {
+ $user = $this->loadModel('user')->getById($userID, 'id');
+ $dept = $user->dept;
+ $users = $this->loadModel('dept')->getDeptUserPairs($dept, 'id');
+ $accounts = array($user->account => ($user->realname ? $user->realname : $user->account));
+ }
+ else
+ {
+ $users = $this->loadModel('dept')->getDeptUserPairs($dept, 'id');
+ $users = array('' => $this->lang->report->annualData->allUser) + $users;
+ $accounts = $this->loadModel('dept')->getDeptUserPairs($dept);
+ }
if(!$this->app->user->admin)
{
foreach($depts as $id => $name) if($id != $this->app->user->dept) unset($depts[$id]);
@@ -323,25 +337,9 @@ class report extends control
{
$depts = array('' => $this->lang->report->annualData->allDept) + $depts;
}
- if(empty($userID)) unset($depts[0]);
- $accounts = array();
- if($dept) $accounts = $this->loadModel('dept')->getDeptUserPairs($dept);
- if($userID)
- {
- $user = $this->loadModel('user')->getById($userID, 'id');
- $dept = $user->dept;
- $accounts = array($user->account => ($user->realname ? $user->realname : $user->account));
- }
- if(empty($accounts)) $accounts = $this->user->getPairs('noletter|noclosed');
if($accounts) $accounts = array_keys($accounts);
- if($dept)
- {
- $users = $this->loadModel('dept')->getDeptUserPairs($dept, 'id');
- $users = array('' => $this->lang->report->annualData->allUser) + $users;
- }
-
/* Get annual data. */
$data = array();
if(!$userID)
diff --git a/module/search/lang/de.php b/module/search/lang/de.php
index 21f5a94ed4..d288633203 100644
--- a/module/search/lang/de.php
+++ b/module/search/lang/de.php
@@ -30,6 +30,7 @@ $lang->search->noQuery = 'Keine Suche gespeichert';
$lang->search->onMenuBar = 'In Menü anzeigen';
$lang->search->custom = 'Eigene';
$lang->search->setCommon = 'Set as public query criteria';
+$lang->search->saveCondition = 'Save search options';
$lang->search->account = 'Konto';
$lang->search->module = 'Module';
diff --git a/module/search/lang/en.php b/module/search/lang/en.php
index 794fb39cbf..9f98c458a8 100644
--- a/module/search/lang/en.php
+++ b/module/search/lang/en.php
@@ -30,6 +30,7 @@ $lang->search->noQuery = 'No query is saved yet!';
$lang->search->onMenuBar = 'Show in Menu';
$lang->search->custom = 'Custom';
$lang->search->setCommon = 'Set as public query criteria';
+$lang->search->saveCondition = 'Save search options';
$lang->search->account = 'Account';
$lang->search->module = 'Module';
diff --git a/module/search/lang/fr.php b/module/search/lang/fr.php
index 220cbced6e..fe4d94d716 100644
--- a/module/search/lang/fr.php
+++ b/module/search/lang/fr.php
@@ -30,6 +30,7 @@ $lang->search->noQuery = 'Aucune query de sauvegardée !';
$lang->search->onMenuBar = 'Montrer dans le Menu';
$lang->search->custom = 'Personnalisation';
$lang->search->setCommon = 'Set as public query criteria';
+$lang->search->saveCondition = 'Save search options';
$lang->search->account = 'Compte';
$lang->search->module = 'Module';
diff --git a/module/search/lang/zh-cn.php b/module/search/lang/zh-cn.php
index 67106e3256..683212dffd 100644
--- a/module/search/lang/zh-cn.php
+++ b/module/search/lang/zh-cn.php
@@ -30,6 +30,7 @@ $lang->search->noQuery = '还没有保存查询!';
$lang->search->onMenuBar = '显示在菜单栏';
$lang->search->custom = '自定义';
$lang->search->setCommon = '设为公共查询条件';
+$lang->search->saveCondition = '保存搜索条件';
$lang->search->account = '用户名';
$lang->search->module = '模块';
diff --git a/module/search/model.php b/module/search/model.php
index 7896fc839b..f548435229 100644
--- a/module/search/model.php
+++ b/module/search/model.php
@@ -320,7 +320,7 @@ class searchModel extends model
{
$params[$fieldName]['values'] = array('' => '', 'null' => $this->lang->search->null);
}
- elseif(empty($params[$fieldName]['notnull']))
+ elseif(empty($params[$fieldName]['nonull']))
{
$params[$fieldName]['values'] = $params[$fieldName]['values'] + array('null' => $this->lang->search->null);
}
diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php
index 4010442081..2203a44222 100644
--- a/module/search/view/buildform.html.php
+++ b/module/search/view/buildform.html.php
@@ -64,6 +64,7 @@ $formId = 'searchForm-' . uniqid('');
html[lang^='zh-'] .fieldWidth {width: 110px !important;}
html[lang^='zh-'] .operatorWidth {width: 90px !important;}
.table tbody tr td input {display: block !important;}
+#save-query {color: #0061f2;}
@@ -242,12 +243,9 @@ foreach($fieldParams as $fieldName => $param)
echo html::hidden('actionURL', $actionURL);
echo html::hidden('groupItems', $groupItems);
echo html::submitButton($lang->search->common, '', 'btn btn-primary') . " ";
- if($style != 'simple')
- {
- if(common::hasPriv('search', 'saveQuery')) echo html::a($this->createLink('search', 'saveQuery', "module=$module&onMenuBar=$onMenuBar"), $lang->save, '', "class='btn-save-form btn btn-secondary iframe' id='save-query'") . " ";
- echo html::commonButton($lang->search->reset, '', 'btn-reset-form btn');
- }
+ if($style != 'simple') echo html::commonButton($lang->search->reset, '', 'btn-reset-form btn');
echo html::commonButton('', '', 'btn-expand-form btn btn-info pull-right');
+ if($style != 'simple' and common::hasPriv('search', 'saveQuery')) echo html::a($this->createLink('search', 'saveQuery', "module=$module&onMenuBar=$onMenuBar"), ' ' . $lang->search->saveCondition, '', "class='btn-save-form btn btn-link iframe pull-right' id='save-query'");
echo html::hidden('formType', zget($formSession, 'formType', 'lite'));
?>
@@ -306,9 +304,11 @@ $(function()
$select.picker(pickerOptions);
});
- $('#queryBox select, #queryBox input').change(function(){
- $('#save-query').attr("disabled","disabled");
+ $('#queryBox select, #queryBox input').change(function()
+ {
+ $('#save-query').attr("disabled", "disabled");
})
+
/* Toggle user queries action. */
$('#toggle-queries').click(function()
{
diff --git a/module/stakeholder/config.php b/module/stakeholder/config.php
index 574eeef4ce..30a3aae3e5 100644
--- a/module/stakeholder/config.php
+++ b/module/stakeholder/config.php
@@ -1,6 +1,6 @@
stakeholder->create = new stdclass();
-$config->stakeholder->create->requiredFields = 'name,company';
+$config->stakeholder->create->requiredFields = 'user,name,company';
$config->stakeholder->expect = new stdclass();
$config->stakeholder->expect->requiredFields = 'expect,progress';
diff --git a/module/stakeholder/js/create.js b/module/stakeholder/js/create.js
index 501390e135..bb9d4e8632 100644
--- a/module/stakeholder/js/create.js
+++ b/module/stakeholder/js/create.js
@@ -2,6 +2,8 @@ $(function()
{
$('input[name*=from]').change(function()
{
+ $('#userLabel').remove();
+
if($(this).val() == 'team')
{
$('.user-info').addClass('hidden');
diff --git a/module/stakeholder/model.php b/module/stakeholder/model.php
index 309d719b83..b9a7d84002 100644
--- a/module/stakeholder/model.php
+++ b/module/stakeholder/model.php
@@ -26,7 +26,7 @@ class stakeholderModel extends model
{
if(!$account)
{
- dao::$errors[] = $this->lang->stakeholder->userEmpty;
+ dao::$errors['user'] = $this->lang->stakeholder->userEmpty;
return false;
}
$user = new stdclass();
@@ -43,7 +43,7 @@ class stakeholderModel extends model
{
if(!$data->name)
{
- dao::$errors[] = $this->lang->stakeholder->nameEmpty;
+ dao::$errors['name'] = $this->lang->stakeholder->nameEmpty;
return false;
}
diff --git a/module/story/control.php b/module/story/control.php
index bdb44544f0..8c192953c8 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -175,6 +175,12 @@ class story extends control
{
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec();
$this->action->create('todo', $todoID, 'finished', '', "STORY:$storyID");
+
+ if($this->config->edition == 'biz' || $this->config->edition == 'max')
+ {
+ $todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($todoID)->fetch();
+ if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done');
+ }
}
$message = $this->executeHooks($storyID);
@@ -184,7 +190,24 @@ class story extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $storyID));
/* If link from no head then reload. */
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($this->session->execution);
+ if($this->app->tab == 'execution' and $execution->type == 'kanban')
+ {
+ $execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
+ $execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
+ $rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
+ $kanbanData = json_encode($kanbanData);
+
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, 0)"));
+ }
+ else
+ {
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ }
+ }
if($this->post->newStory)
{
@@ -2187,6 +2210,7 @@ class story extends control
$storyInfo['estimate'] = $story->estimate;
$storyInfo['pri'] = $story->pri;
$storyInfo['spec'] = html_entity_decode($story->spec, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');
+ $storyInfo['status'] = $story->status;
echo json_encode($storyInfo);
}
diff --git a/module/task/control.php b/module/task/control.php
index 104163f453..f9b4f79327 100755
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -168,6 +168,8 @@ class task extends control
{
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec();
$this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID");
+
+ if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done');
}
$message = $this->executeHooks($taskID);
diff --git a/module/tree/lang/de.php b/module/tree/lang/de.php
index 9101102259..7b81ef314a 100644
--- a/module/tree/lang/de.php
+++ b/module/tree/lang/de.php
@@ -73,6 +73,8 @@ $lang->tree->all = 'Alle Module';
$lang->tree->executionDoc = "{$lang->executionCommon} Dok";
$lang->tree->product = $lang->productCommon;
+$lang->tree->emptyHistory = "No History";
+
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, created \$extra by \$actor.");
diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php
index 3304056bd7..a0d96af45a 100644
--- a/module/tree/lang/en.php
+++ b/module/tree/lang/en.php
@@ -73,6 +73,8 @@ $lang->tree->all = 'All Modules';
$lang->tree->executionDoc = "{$lang->executionCommon} Document";
$lang->tree->product = $lang->productCommon;
+$lang->tree->emptyHistory = "No History";
+
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, created \$extra by \$actor.");
diff --git a/module/tree/lang/fr.php b/module/tree/lang/fr.php
index fc699b8018..644eaa3b38 100644
--- a/module/tree/lang/fr.php
+++ b/module/tree/lang/fr.php
@@ -73,6 +73,8 @@ $lang->tree->all = 'Tous les Modules';
$lang->tree->executionDoc = "Document {$lang->executionCommon}";
$lang->tree->product = $lang->productCommon;
+$lang->tree->emptyHistory = "Pas Historique";
+
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, créé \$extra par \$actor.");
diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php
index d84c4e25ac..3e34d65234 100644
--- a/module/tree/lang/zh-cn.php
+++ b/module/tree/lang/zh-cn.php
@@ -73,6 +73,8 @@ $lang->tree->all = '所有模块';
$lang->tree->executionDoc = "{$lang->executionCommon}文档";
$lang->tree->product = "所属{$lang->productCommon}";
+$lang->tree->emptyHistory = "暂时没有历史记录。";
+
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, 由 \$actor 创建了 \$extra。");
diff --git a/module/tree/view/viewhistory.html.php b/module/tree/view/viewhistory.html.php
index ec6f96d252..2fdb64c232 100644
--- a/module/tree/view/viewhistory.html.php
+++ b/module/tree/view/viewhistory.html.php
@@ -11,5 +11,11 @@
*/
?>
+
+
+
+
+
tree->emptyHistory;?>
+