diff --git a/module/project/control.php b/module/project/control.php
index ff14d15e11..b44d2400ee 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1947,6 +1947,19 @@ class project extends control
}
}
+ /**
+ * All project.
+ *
+ * @param string $status
+ * @param int $projectID
+ * @param string $orderBy
+ * @param int $productID
+ * @param int $recTotal
+ * @param int $recPerPage
+ * @param int $pageID
+ * @access public
+ * @return void
+ */
public function all($status = 'undone', $projectID = 0, $orderBy = 'order_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
{
if($this->projects) $this->commonAction($projectID);
diff --git a/module/project/lang/en.php b/module/project/lang/en.php
index 62688cda9e..9be9a8527f 100644
--- a/module/project/lang/en.php
+++ b/module/project/lang/en.php
@@ -238,3 +238,14 @@ $lang->printKanban->taskStatus = 'Status';
$lang->printKanban->typeList['all'] = 'All';
$lang->printKanban->typeList['increment'] = 'Increment';
+
+$lang->project->featurebar['task']['unclosed'] = $lang->project->unclosed;
+$lang->project->featurebar['task']['all'] = $lang->project->allTasks;
+$lang->project->featurebar['task']['kanban'] = $lang->project->kanban;
+$lang->project->featurebar['task']['burn'] = $lang->project->burn;
+$lang->project->featurebar['task']['assignedtome'] = $lang->project->assignedToMe;
+$lang->project->featurebar['task']['status'] = $lang->project->statusSelects[''];
+$lang->project->featurebar['task']['group'] = $lang->project->groups[''];
+$lang->project->featurebar['grouptask'] = $lang->project->featurebar['task'];
+$lang->project->featurebar['kanban'] = $lang->project->featurebar['task'];
+$lang->project->featurebar['burn'] = $lang->project->featurebar['task'];
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index 04a00e6eb6..185238d582 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -249,3 +249,14 @@ $lang->printKanban->taskStatus = '状态';
$lang->printKanban->typeList['all'] = '全部';
$lang->printKanban->typeList['increment'] = '增量';
+
+$lang->project->featurebar['task']['unclosed'] = $lang->project->unclosed;
+$lang->project->featurebar['task']['all'] = $lang->project->allTasks;
+$lang->project->featurebar['task']['kanban'] = $lang->project->kanban;
+$lang->project->featurebar['task']['burn'] = $lang->project->burn;
+$lang->project->featurebar['task']['assignedtome'] = $lang->project->assignedToMe;
+$lang->project->featurebar['task']['status'] = $lang->project->statusSelects[''];
+$lang->project->featurebar['task']['group'] = $lang->project->groups[''];
+$lang->project->featurebar['grouptask'] = $lang->project->featurebar['task'];
+$lang->project->featurebar['kanban'] = $lang->project->featurebar['task'];
+$lang->project->featurebar['burn'] = $lang->project->featurebar['task'];
diff --git a/module/project/view/taskheader.html.php b/module/project/view/taskheader.html.php
index 4f676cbdc1..710d8d4d14 100644
--- a/module/project/view/taskheader.html.php
+++ b/module/project/view/taskheader.html.php
@@ -15,44 +15,54 @@
+
+ customMenu['featurebar'] as $type => $featurebar):?>
+ " . html::a(inlink('task', "project=$projectID&type=$type"), $featurebar['link']) . '' ;
+ if($hasKanbanPriv and $type == 'kanban') echo "
" . html::a(inlink('kanban', "projectID=$projectID"), $featurebar['link']) . '';
+ if($hasBurnPriv and $type == 'burn' and ($project->type == 'sprint' or $project->type == 'waterfall')) echo "
" . html::a(inlink('burn', "project=$projectID"), $featurebar['link']) . '' ;
+ if($hasBrowsePriv and $type == 'status')
+ {
+ echo "
";
+ $taskBrowseType = isset($status) ? $this->session->taskBrowseType : '';
+ $current = zget($lang->project->statusSelects, $taskBrowseType, '');
+ if(empty($current)) $current = $featurebar['link'];
+ echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown'");
+ echo "';
+ }
+ elseif($hasGroupTaskPriv and $type == 'group')
+ {
+ echo "
";
+ $groupBy = isset($groupBy) ? $groupBy : '';
+ $current = zget($lang->project->groups, isset($groupBy) ? $groupBy : '', '');
+ if(empty($current)) $current = $featurebar['link'];
+ echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown'");
+ echo "';
+ }
+ ?>
+
"; common::printLink('project', 'task', "project=$projectID&type=unclosed", $lang->project->unclosed); echo '' ;
- echo "
"; common::printLink('project', 'task', "project=$projectID&type=all", $lang->project->allTasks); echo '' ;
- echo "
"; common::printLink('project', 'kanban', "projectID=$projectID", $lang->project->kanban, '', '', false); echo '';
- echo "
"; common::printLink('project', 'tree', "projectID=$projectID", $lang->project->tree, '', '', false); echo '';
- if($project->type == 'sprint' or $project->type == 'waterfall') print "
" and common::printLink('project', 'burn', "project=$projectID", $lang->project->burn); print '' ;
- echo "
"; common::printLink('project', 'task', "project=$projectID&type=assignedtome", $lang->project->assignedToMe); echo '' ;
-
- echo "
";
- $taskBrowseType = isset($status) ? $this->session->taskBrowseType : '';
- $current = zget($lang->project->statusSelects, $taskBrowseType, '');
- if(empty($current)) $current = $lang->project->statusSelects[''];
- echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown'");
- echo "';
-
- echo "
";
- $groupBy = isset($groupBy) ? $groupBy : '';
- $current = zget($lang->project->groups, isset($groupBy) ? $groupBy : '', '');
- if(empty($current)) $current = $lang->project->groups[''];
- echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown'");
- echo "';
-
-
if($this->methodName == 'task') echo "
{$lang->project->byQuery} ";
?>
diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php
index 4e80f9e6eb..0ef0b12128 100644
--- a/module/testcase/lang/en.php
+++ b/module/testcase/lang/en.php
@@ -145,3 +145,10 @@ $lang->testcase->noFunction = 'Iconv and mb_convert_encoding does not exist, yo
$lang->testcase->noRequire = "In the row of %s, the %s is a required field";
$lang->testcase->searchStories = 'Type to search stories';
+
+$lang->testcase->featurebar['browse']['all'] = $lang->testcase->allCases;
+$lang->testcase->featurebar['browse']['needconfirm'] = $lang->testcase->needConfirm;
+$lang->testcase->featurebar['browse']['group'] = '';
+$lang->testcase->featurebar['browse']['zerocase'] = '';
+$lang->testcase->featurebar['groupcase'] = $lang->testcase->featurebar['browse'];
+if(isset($lang->story))$lang->story->featurebar['zerocase'] = $lang->testcase->featurebar['browse'];
diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php
index 3260342ab3..bc01be9917 100644
--- a/module/testcase/lang/zh-cn.php
+++ b/module/testcase/lang/zh-cn.php
@@ -145,3 +145,10 @@ $lang->testcase->noFunction = '不存在iconv和mb_convert_encoding转码方法
$lang->testcase->noRequire = "%s行的“%s”是必填字段,不能为空";
$lang->testcase->searchStories = '键入来搜索需求';
+
+$lang->testcase->featurebar['browse']['all'] = $lang->testcase->allCases;
+$lang->testcase->featurebar['browse']['needconfirm'] = $lang->testcase->needConfirm;
+$lang->testcase->featurebar['browse']['group'] = '';
+$lang->testcase->featurebar['browse']['zerocase'] = '';
+$lang->testcase->featurebar['groupcase'] = $lang->testcase->featurebar['browse'];
+if(isset($lang->story))$lang->story->featurebar['zerocase'] = $lang->testcase->featurebar['browse'];
diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php
index 4f4306c575..bb10d7233e 100644
--- a/module/testcase/view/caseheader.html.php
+++ b/module/testcase/view/caseheader.html.php
@@ -16,11 +16,14 @@
+ customMenu['featurebar'] as $type => $featurebar):?>
+
" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=all"), $lang->testcase->allCases) . "";
- echo "
" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=needconfirm"), $lang->testcase->needConfirm) . "";
-
- if(common::hasPriv('testcase', 'groupcase'))
+ if(common::hasPriv('testcase', 'browse') and ($type == 'all' or $type == 'needconfirm'))
+ {
+ echo "
" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$type"), $featurebar['link']) . "";
+ }
+ elseif($type == 'group' and common::hasPriv('testcase', 'groupcase'))
{
echo "
";
$groupBy = isset($groupBy) ? $groupBy : '';
@@ -36,8 +39,13 @@
}
echo '';
}
-
- if(common::hasPriv('story', 'zeroCase')) echo "
" . html::a($this->createLink('story', 'zeroCase', "productID=$productID"), $lang->story->zeroCase) . '';
+ elseif($type == 'zerocase' and common::hasPriv('story', 'zeroCase'))
+ {
+ echo "
" . html::a($this->createLink('story', 'zeroCase', "productID=$productID"), $lang->story->zeroCase) . '';
+ }
+ ?>
+
+ methodName == 'browse') echo "
{$lang->testcase->bySearch} ";
?>
diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php
index e0f4557527..c223e9d842 100644
--- a/module/testtask/lang/en.php
+++ b/module/testtask/lang/en.php
@@ -103,3 +103,8 @@ $lang->testtask->action = new stdclass();
$lang->testtask->action->testtaskopened = '$date, 由
$actor opened test task.
$extra。' . "\n";
$lang->testtask->action->testtaskstarted = '$date, 由
$actor started test task.
$extra。' . "\n";
$lang->testtask->action->testtaskclosed = '$date, 由
$actor finished test task.
$extra。' . "\n";
+
+$lang->testtask->featurebar['cases']['all'] = $lang->testtask->allCases;
+$lang->testtask->featurebar['cases']['assignedtome'] = $lang->testtask->assignedToMe;
+$lang->testtask->featurebar['cases']['group'] = '';
+$lang->testtask->featurebar['groupcase'] = $lang->testtask->featurebar['cases'];
diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php
index b07da7ee4d..7045f9bd12 100644
--- a/module/testtask/lang/zh-cn.php
+++ b/module/testtask/lang/zh-cn.php
@@ -103,3 +103,8 @@ $lang->testtask->action = new stdclass();
$lang->testtask->action->testtaskopened = '$date, 由
$actor 创建版本
$extra。' . "\n";
$lang->testtask->action->testtaskstarted = '$date, 由
$actor 启动版本
$extra。' . "\n";
$lang->testtask->action->testtaskclosed = '$date, 由
$actor 完成版本
$extra。' . "\n";
+
+$lang->testtask->featurebar['cases']['all'] = $lang->testtask->allCases;
+$lang->testtask->featurebar['cases']['assignedtome'] = $lang->testtask->assignedToMe;
+$lang->testtask->featurebar['cases']['group'] = '';
+$lang->testtask->featurebar['groupcase'] = $lang->testtask->featurebar['cases'];
diff --git a/module/testtask/view/caseheader.html.php b/module/testtask/view/caseheader.html.php
index 60a6f22bb9..6b9c4c5155 100644
--- a/module/testtask/view/caseheader.html.php
+++ b/module/testtask/view/caseheader.html.php
@@ -3,25 +3,32 @@
" . html::icon($lang->icons['usecase']) . '
' . $task->name . '';?>
+ customMenu['featurebar'] as $type => $featurebar):?>
+
" . html::a($this->inlink('cases', "taskID=$taskID&browseType=all¶m=0"), $lang->testtask->allCases) . "";
- echo "
" . html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome¶m=0"), $lang->testtask->assignedToMe) . "";
-
- echo "
";
- $groupBy = isset($groupBy) ? $groupBy : '';
- $current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
- if(empty($current)) $current = $lang->testcase->groups[''];
- echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown'");
- echo "';
-
-
+ elseif(common::hasPriv('testtask', 'cases') and $type == 'group')
+ {
+ echo "
";
+ $groupBy = isset($groupBy) ? $groupBy : '';
+ $current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
+ if(empty($current)) $current = $lang->testcase->groups[''];
+ echo html::a('javascript:;', $current . " ", '', "data-toggle='dropdown'");
+ echo "';
+ }
+ ?>
+
+ methodName == 'cases') echo "
{$lang->testcase->bySearch} ";
echo '
' . html::a(inlink('view', "taskID=$taskID"), $lang->testtask->view) . '';
?>
diff --git a/module/user/control.php b/module/user/control.php
index f6b4a247b6..f0d4e6b065 100644
--- a/module/user/control.php
+++ b/module/user/control.php
@@ -901,90 +901,6 @@ class user extends control
$this->display();
}
- /**
- * Manage contacts.
- *
- * @param int $listID
- * @access public
- * @return void
- */
- public function manageContacts($listID = 0)
- {
- $lists = $this->user->getContactLists($this->app->user->account);
-
- /* If set $mode, need to update database. */
- if($this->post->mode)
- {
- /* The mode is new: append or new a list. */
- if($this->post->mode == 'new')
- {
- if($this->post->list2Append)
- {
- $this->user->append2ContactList($this->post->list2Append, $this->post->users);
- die(js::locate(inlink('manageContacts', "listID={$this->post->list2Append}"), 'parent'));
- }
- elseif($this->post->newList)
- {
- $listID = $this->user->createContactList($this->post->newList, $this->post->users);
- die(js::locate(inlink('manageContacts', "listID=$listID"), 'parent'));
- }
- }
- elseif($this->post->mode == 'edit')
- {
- $this->user->updateContactList($this->post->listID, $this->post->listName, $this->post->users);
- die(js::locate(inlink('manageContacts', "listID={$this->post->listID}"), 'parent'));
- }
- }
- if($this->post->users)
- {
- $mode = 'new';
- $users = $this->user->getContactUserPairs($this->post->users);
- }
- else
- {
- $mode = 'edit';
- $listID= $listID ? $listID : key($lists);
- if(!$listID) die(js::alert($this->lang->user->contacts->noListYet) . js::locate($this->createLink('company', 'browse'), 'parent'));
-
- $list = $this->user->getContactListByID($listID);
- $users = explode(',', $list->userList);
- $users = $this->user->getContactUserPairs($users);
- $this->view->list = $list;
- }
-
- $this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->user->manageContacts;
- $this->view->position[] = $this->lang->company->common;
- $this->view->position[] = $this->lang->user->manageContacts;
- $this->view->lists = $this->user->getContactLists($this->app->user->account);
- $this->view->users = $users;
- $this->view->listID = $listID;
- $this->view->mode = $mode;
- $this->display();
- }
-
- /**
- * Delete a contact list.
- *
- * @param int $listID
- * @param string $confirm
- * @access public
- * @return void
- */
- public function deleteContacts($listID, $confirm = 'no')
- {
- if($confirm == 'no')
- {
- echo js::confirm($this->lang->user->contacts->confirmDelete, inlink('deleteContacts', "listID=$listID&confirm=yes"));
- exit;
- }
- else
- {
- $this->user->deleteContactList($listID);
- echo js::locate(inlink('manageContacts'), 'parent');
- exit;
- }
- }
-
/**
* Get user for ajax
*
diff --git a/module/user/lang/en.php b/module/user/lang/en.php
index b97ae68f84..51ef77c624 100644
--- a/module/user/lang/en.php
+++ b/module/user/lang/en.php
@@ -59,8 +59,6 @@ $lang->user->unbind = "Unbind ranzhi";
$lang->user->login = "Login";
$lang->user->mobileLogin = "Mobile";
$lang->user->editProfile = "Edit profile";
-$lang->user->manageContacts = 'Manage contacts';
-$lang->user->deleteContacts = 'Delete contacts';
$lang->user->deny = "Denied";
$lang->user->confirmDelete = "Are you sure to delete this user?";
$lang->user->confirmUnlock = "Are you sure to unlock this user?";
diff --git a/module/user/lang/zh-cn.php b/module/user/lang/zh-cn.php
index bb660d8b3c..8c20dbd658 100644
--- a/module/user/lang/zh-cn.php
+++ b/module/user/lang/zh-cn.php
@@ -59,8 +59,6 @@ $lang->user->unbind = "解除然之绑定";
$lang->user->login = "用户登录";
$lang->user->mobileLogin = "手机访问";
$lang->user->editProfile = "修改档案";
-$lang->user->manageContacts = '维护联系人';
-$lang->user->deleteContacts = '删除联系人';
$lang->user->deny = "访问受限";
$lang->user->confirmDelete = "您确定删除该用户吗?";
$lang->user->confirmUnlock = "您确定解除该用户的锁定状态吗?";
diff --git a/module/user/model.php b/module/user/model.php
index 4327539442..4ecf105a3a 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -915,26 +915,6 @@ class userModel extends model
return $this->dao->lastInsertID();
}
- /**
- * Append some users to a contact list.
- *
- * @param int $listID
- * @param string $userList
- * @access public
- * @return void
- */
- public function append2ContactList($listID, $userList)
- {
- $list = $this->getContactListByID($listID);
- if($list->userList) $userList = array_merge($userList, explode(',', $list->userList));
-
- $userList = array_unique($userList);
- sort($userList);
- $userList = join(',', $userList);
-
- $this->dao->update(TABLE_USERCONTACT)->set('userList')->eq($userList)->where('id')->eq($listID)->exec();
- }
-
/**
* Update a contact list.
*