* Finish task #8812.

This commit is contained in:
Yagami
2020-12-23 10:28:28 +08:00
parent 58425400f4
commit f4db6376b2
22 changed files with 325 additions and 43 deletions
+2
View File
@@ -1385,6 +1385,8 @@ class bugModel extends model
->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi()
->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('status')->ne('closed')->fi()
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
->beginIF($this->app->rawMethod == 'contribute')->andWhere("status")->in('resolved,closed')->fi()
->beginIF($this->app->rawMethod == 'work')->andWhere("status")->eq('active')->fi()
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()
->page($pager)
+1 -1
View File
@@ -285,7 +285,7 @@ $lang->my->contributeMenu->execution = '执行|my|contribute|mode=execution&type
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
$lang->my->contributeMenu->story = '需求|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = '用例|my|contribute|mode=testtask&type=wait';
$lang->my->contributeMenu->testtask = '用例|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->issue = '问题|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = '风险|my|contribute|mode=risk';
+13 -23
View File
@@ -87,14 +87,9 @@ $lang->resource->my = new stdclass();
$lang->resource->my->index = 'index';
$lang->resource->my->todo = 'todo';
$lang->resource->my->calendar = 'calendar';
$lang->resource->my->task = 'task';
$lang->resource->my->bug = 'bug';
$lang->resource->my->testTask = 'testTask';
$lang->resource->my->testCase = 'testCase';
$lang->resource->my->story = 'story';
$lang->resource->my->requirement = 'requirement';
$lang->resource->my->work = 'work';
$lang->resource->my->contribute = 'contribute';
$lang->resource->my->project = 'project';
$lang->resource->my->execution = 'execution';
$lang->resource->my->profile = 'profile';
$lang->resource->my->dynamic = 'dynamic';
$lang->resource->my->editProfile = 'editProfile';
@@ -106,22 +101,17 @@ $lang->resource->my->unbind = 'unbind';
$lang->my->methodOrder[0] = 'index';
$lang->my->methodOrder[5] = 'todo';
$lang->my->methodOrder[10] = 'task';
$lang->my->methodOrder[15] = 'bug';
$lang->my->methodOrder[20] = 'testTask';
$lang->my->methodOrder[25] = 'testCase';
$lang->my->methodOrder[30] = 'story';
$lang->my->methodOrder[35] = 'requirement';
$lang->my->methodOrder[40] = 'project';
$lang->my->methodOrder[45] = 'execution';
$lang->my->methodOrder[50] = 'profile';
$lang->my->methodOrder[55] = 'dynamic';
$lang->my->methodOrder[60] = 'editProfile';
$lang->my->methodOrder[65] = 'changePassword';
$lang->my->methodOrder[75] = 'manageContacts';
$lang->my->methodOrder[80] = 'deleteContacts';
$lang->my->methodOrder[85] = 'score';
$lang->my->methodOrder[90] = 'unbind';
$lang->my->methodOrder[10] = 'work';
$lang->my->methodOrder[15] = 'contribute';
$lang->my->methodOrder[20] = 'project';
$lang->my->methodOrder[25] = 'profile';
$lang->my->methodOrder[30] = 'dynamic';
$lang->my->methodOrder[35] = 'editProfile';
$lang->my->methodOrder[40] = 'changePassword';
$lang->my->methodOrder[45] = 'manageContacts';
$lang->my->methodOrder[50] = 'deleteContacts';
$lang->my->methodOrder[55] = 'score';
$lang->my->methodOrder[60] = 'unbind';
/* Todo. */
$lang->resource->todo = new stdclass();
+2
View File
@@ -160,6 +160,8 @@ class issueModel extends model
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
->where('deleted')->eq('0')
->andWhere($type)->eq($this->app->user->account)->fi()
->beginIF($this->app->rawMethod == 'contribute')->andWhere("status")->in('resolved,canceled,closed')->fi()
->beginIF($this->app->rawMethod == 'work')->andWhere("status")->notin('resolved,canceled,closed')->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll();
+2
View File
@@ -5,6 +5,8 @@ $lang->my->common = 'Dashboard';
$lang->my->index = 'Home';
$lang->my->todo = 'Meine ToDos';
$lang->my->calendar = 'Kalender';
$lang->my->work = 'Work';
$lang->my->contribute = 'Contribute';
$lang->my->task = 'Aufgaben';
$lang->my->bug = 'Bugs';
$lang->my->testTask = 'Builds';
+2
View File
@@ -5,6 +5,8 @@ $lang->my->common = 'Dashboard';
$lang->my->index = 'Home';
$lang->my->todo = 'My Todos';
$lang->my->calendar = 'Schedule';
$lang->my->work = 'Work';
$lang->my->contribute = 'Contribute';
$lang->my->task = 'My Tasks';
$lang->my->bug = 'My Bugs';
$lang->my->testTask = 'My Builds';
+2
View File
@@ -5,6 +5,8 @@ $lang->my->common = 'Tableau de Bord';
$lang->my->index = 'Accueil';
$lang->my->todo = 'Mon Agenda';
$lang->my->calendar = 'Calendrier';
$lang->my->work = 'Work';
$lang->my->contribute = 'Contribute';
$lang->my->task = 'Mes Tâches';
$lang->my->bug = 'Mes Bugs';
$lang->my->testTask = 'Mes Builds';
+2
View File
@@ -5,6 +5,8 @@ $lang->my->common = '';
$lang->my->index = 'Trang chủ';
$lang->my->todo = 'Việc của bạn';
$lang->my->calendar = 'Lịch trình';
$lang->my->work = 'Work';
$lang->my->contribute = 'Contribute';
$lang->my->task = 'Nhiệm vụ';
$lang->my->bug = 'Bugs của bạn';
$lang->my->testTask = 'Bản dựng của bạn';
+2
View File
@@ -5,6 +5,8 @@ $lang->my->common = '我的地盘';
$lang->my->index = '首页';
$lang->my->todo = '我的待办';
$lang->my->calendar = '日程';
$lang->my->work = '待处理';
$lang->my->contribute = '贡献';
$lang->my->task = '我的任务';
$lang->my->bug = '我的Bug';
$lang->my->testTask = '我的版本';
+5 -2
View File
@@ -18,8 +18,11 @@
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "<span class='text'>{$lang->bug->assignedTo}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=openedBy"), "<span class='text'>{$lang->bug->openedByMe}</span>" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=resolvedBy"), "<span class='text'>{$lang->bug->resolvedByMe}</span>" . ($type == 'resolvedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'resolvedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->bug->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute')
{
echo html::a(inlink($app->rawMethod, "mode=$mode&type=resolvedBy"), "<span class='text'>{$lang->bug->resolvedByMe}</span>" . ($type == 'resolvedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'resolvedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->bug->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
}
?>
</div>
</div>
+1 -1
View File
@@ -18,7 +18,7 @@
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "<span class='text'>{$lang->my->taskMenu->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=createdBy"), "<span class='text'>{$lang->my->taskMenu->openedByMe}</span>" . ($type == 'createdBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'createdBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->my->taskMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute') echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->my->taskMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
?>
</div>
</div>
+254
View File
@@ -0,0 +1,254 @@
<?php
/**
* The requirement view file of my module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package my
* @version $Id
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('mode', $mode);?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<div class="btn-group active">
<div class="btn-group">
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
<?php echo $lang->generalUR;?><span class='caret'></span>
</button>
<ul class='dropdown-menu'>
<li><?php echo html::a($this->inLink($app->rawMethod, "mode=story&type=$type"), $lang->generalSR);?></li>
<li><?php echo html::a($this->inLink($app->rawMethod, "mode=requirement&type=$type"), $lang->generalUR);?></li>
</ul>
</div>
</div>
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink($app->rawMethod, "mode=requirement&type=assignedTo"), "<span class='text'>{$lang->my->storyMenu->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=openedBy"), "<span class='text'>{$lang->my->storyMenu->openedByMe}</span>" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=reviewedBy"), "<span class='text'>{$lang->my->storyMenu->reviewedByMe}</span>" . ($type == 'reviewedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewedBy' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute') echo html::a(inlink($app->rawMethod, "mode=requirement&type=closedBy"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
?>
</div>
</div>
<div id="mainContent">
<?php if(!$stories):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->story->noStory;?></span></p>
</div>
<?php else:?>
<form id='myStoryForm' class="main-table table-story" data-ride="table" method="post">
<table id='storyList' class="table has-sort-head table-fixed">
<?php $vars = "mode=requirement&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = (common::hasPriv('story', 'batchClose') and strtolower($type) != 'closedby');
$canBatchReview = common::hasPriv('story', 'batchReview');
$canBatchAssignTo = common::hasPriv('story', 'batchAssignTo');
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchAssignTo);
?>
<thead>
<tr>
<th class="c-id">
<?php if($canBatchAction):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri w-40px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-hours'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-stage'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-5'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($stories as $story):?>
<?php
$storyLink = $this->createLink('story', 'view', "id=$story->id");
$canBeChanged = common::canBeChanged('story', $story);
?>
<tr>
<td class="c-id">
<?php if($canBatchAction):?>
<div class="checkbox-primary">
<input type='checkbox' name='storyIdList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' <?php if(!$canBeChanged) echo 'disabled';?>/>
<label></label>
</div>
<?php endif;?>
<?php printf('%03d', $story->id);?>
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='c-product'><?php echo $story->productTitle;?></td>
<td class='c-name nobr <?php if(!empty($story->children)) echo "has-child" ?>'>
<?php echo html::a($storyLink, $story->title, null, "style='color: $story->color'");?>
<?php if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';;?>
</td>
<td class='c-user'><?php echo zget($users, $story->openedBy);?></td>
<td class='c-hours'><?php echo $story->estimate;?></td>
<td class='c-status'><span class='status-story status-<?php echo $story->status;?>'> <?php echo $this->processStatus('story', $story);?></span></td>
<td class='c-stage'><?php echo zget($lang->story->stageList, $story->stage);?></td>
<td class='c-actions'>
<?php
if($canBeChanged)
{
$vars = "story={$story->id}";
common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses');
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars, $story, 'list');
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap');
}
?>
</td>
</tr>
<?php if(!empty($story->children)):?>
<?php $i = 0;?>
<?php foreach($story->children as $key => $child):?>
<?php $storyLink = $this->createLink('story', 'view', "id=$child->id");?>
<?php $class = $i == 0 ? ' table-child-top' : '';?>
<?php $class .= ($i + 1 == count($story->children)) ? ' table-child-bottom' : '';?>
<tr class='table-children<?php echo $class;?> parent-<?php echo $story->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>'>
<td class="c-id">
<?php if($canBatchAction):?>
<div class="checkbox-primary">
<input type='checkbox' name='storyIdList[<?php echo $child->id;?>]' value='<?php echo $child->id;?>' />
<label></label>
</div>
<?php endif;?>
<?php printf('%03d', $child->id);?>
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $child->pri;?>' title='<?php echo zget($lang->story->priList, $child->pri, $child->pri);?>'><?php echo zget($lang->story->priList, $child->pri, $child->pri);?></span></td>
<td class='c-product'><?php echo $child->productTitle;?></td>
<td class='c-name nobr'>
<?php echo '<span class="label label-badge label-light" title="' . $this->lang->story->children .'">' . $this->lang->story->childrenAB . '</span> ' . html::a($storyLink, $child->title, null, "style='color: $child->color'");?>
</td>
<td class='c-user'><?php echo zget($users, $child->openedBy);?></td>
<td class='c-hours'><?php echo $child->estimate;?></td>
<td class='c-status'><span class='status-story status-<?php echo $child->status;?>'> <?php echo $this->processStatus('story', $child);?></span></td>
<td class='c-stage'><?php echo zget($lang->story->stageList, $child->stage);?></td>
<td class='c-actions'>
<?php
if($canBeChanged)
{
$vars = "story={$child->id}";
common::printIcon('story', 'change', $vars, $child, 'list', 'fork');
common::printIcon('story', 'review', $vars, $child, 'list', 'glasses');
common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars, $child, 'list');
common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=&param=0&$vars", $child, 'list', 'sitemap');
}
?>
</td>
</tr>
<?php $i ++;?>
<?php endforeach;?>
<?php endif;?>
<?php endforeach;?>
</tbody>
</table>
<div class="table-footer">
<?php if($canBatchAction):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class="table-actions btn-toolbar">
<?php
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit');
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
?>
<?php if($canBatchReview):?>
<div class="btn-group dropup">
<button type='button' class='btn' data-toggle='dropdown'><?php echo $lang->story->review;?> <span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php
unset($lang->story->reviewResultList['']);
unset($lang->story->reviewResultList['revert']);
foreach($lang->story->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
if($key == 'reject')
{
echo "<li class='dropdown-submenu'>";
echo html::a('#', $result, '', "id='rejectItem'");
echo "<ul class='dropdown-menu'>";
unset($lang->story->reasonList['']);
unset($lang->story->reasonList['subdivided']);
unset($lang->story->reasonList['duplicate']);
foreach($lang->story->reasonList as $key => $reason)
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
echo "</li>";
}
echo '</ul></li>';
}
else
{
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . '</li>';
}
}
?>
</ul>
</div>
<?php endif;?>
<?php if($canBatchAssignTo):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo?> <span class="caret"></span></button>
<?php
$withSearch = count($users) > 10;
$actionLink = $this->createLink('story', 'batchAssignTo');
echo html::select('assignedTo', $users, '', 'class="hidden"');
if($withSearch)
{
echo "<div class='dropdown-menu search-list search-box-sink' data-ride='searchList'>";
echo '<div class="input-control search-box has-icon-left has-icon-right search-example">';
echo '<input id="userSearchBox" type="search" class="form-control search-input" autocomplete="off" />';
echo '<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>';
echo '<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>';
echo '</div>';
$usersPinYin = common::convert2Pinyin($users);
}
else
{
echo "<div class='dropdown-menu search-list'>";
}
echo '<div class="list-group">';
foreach($users as $key => $value)
{
if(empty($key) or $key == 'closed') continue;
$searchKey = $withSearch ? ('data-key="' . zget($usersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
echo html::a('javascript:$(".table-actions #assignedTo").val("' . $key . '");setFormAction("' . $actionLink . '")', '<i class="icon icon-person icon-sm"></i> ' . $value, '', $searchKey);
}
echo "</div>";
echo "</div>";
?>
</div>
<?php endif;?>
<?php if($canBatchClose):?>
<?php
$actionLink = $this->createLink('story', 'batchClose');
$misc = "data-form-action=\"$actionLink\"";
echo html::commonButton($lang->close, $misc);
?>
<?php endif;?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -18,7 +18,7 @@
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "<span class='text'>{$lang->my->taskMenu->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=createdBy"), "<span class='text'>{$lang->my->taskMenu->openedByMe}</span>" . ($type == 'createdBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'createdBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->my->taskMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute') echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->my->taskMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
?>
</div>
</div>
+2 -2
View File
@@ -20,13 +20,13 @@
echo html::a(inlink($app->rawMethod, "mode=requirement&type=assignedTo"), "<span class='text'>{$lang->my->storyMenu->assignedToMe}</span>" . ($type == 'assignedTo' & $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' & $mode == 'requirement' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=openedBy"), "<span class='text'>{$lang->my->storyMenu->openedByMe}</span>" . ($type == 'openedBy' & $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' & $mode == 'requirement' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=reviewedBy"), "<span class='text'>{$lang->my->storyMenu->reviewedByMe}</span>" . ($type == 'reviewedBy' & $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewedBy' & $mode == 'requirement' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=closedBy"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' & $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' & $mode == 'requirement' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute') echo html::a(inlink($app->rawMethod, "mode=requirement&type=closedBy"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' & $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' & $mode == 'requirement' ? ' btn-active-text' : '') . "'");
echo "<span class='nav-title'> | </span>";
echo "<span class='nav-title'>{$lang->my->story}</span>";
echo html::a(inlink($app->rawMethod, "mode=story&type=assignedTo"), "<span class='text'>{$lang->my->storyMenu->assignedToMe}</span>" . ($type == 'assignedTo' & $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' & $mode == 'story' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=openedBy"), "<span class='text'>{$lang->my->storyMenu->openedByMe}</span>" . ($type == 'openedBy' & $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' & $mode == 'story' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=reviewedBy"), "<span class='text'>{$lang->my->storyMenu->reviewedByMe}</span>" . ($type == 'reviewedBy' & $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewedBy' & $mode == 'story' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=closedBy"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' & $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' & $mode == 'story' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute') echo html::a(inlink($app->rawMethod, "mode=story&type=closedBy"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' & $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' & $mode == 'story' ? ' btn-active-text' : '') . "'");
?>
</div>
</div>
+4
View File
@@ -18,10 +18,14 @@
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "<span class='text'>{$lang->my->taskMenu->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=openedBy"), "<span class='text'>{$lang->my->taskMenu->openedByMe}</span>" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'");
?>
<?php if($app->rawMethod == 'contribute'):?>
<?php
echo html::a(inlink($app->rawMethod, "mode=$mode&type=finishedBy"), "<span class='text'>{$lang->my->taskMenu->finishedByMe}</span>" . ($type == 'finishedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'finishedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->my->taskMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=canceledBy"), "<span class='text'>{$lang->my->taskMenu->canceledByMe}</span>" . ($type == 'canceledBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'canceledBy' ? ' btn-active-text' : '') . "'");
?>
<?php endif;?>
</div>
</div>
<div id="mainContent">
+2 -2
View File
@@ -21,8 +21,8 @@
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo "<span class='nav-title'>{$lang->testtask->common}: </span>";
echo html::a(inlink($app->rawMethod, "mode=testtask&type=wait"), "<span class='text'>{$lang->testtask->wait}</span>", '', "class='btn btn-link'");
echo html::a(inlink($app->rawMethod, "mode=testtask&type=done"), "<span class='text'>{$lang->testtask->done}</span>", '', "class='btn btn-link'");
if($app->rawMethod == 'work') echo html::a(inlink($app->rawMethod, "mode=testtask&type=wait"), "<span class='text'>{$lang->testtask->wait}</span>", '', "class='btn btn-link'");
if($app->rawMethod == 'contribute') echo html::a(inlink($app->rawMethod, "mode=testtask&type=done"), "<span class='text'>{$lang->testtask->done}</span>", '', "class='btn btn-link'");
echo "<span class='divider'></span>";
echo "<span class='nav-title'>{$lang->testcase->common}: </span>";
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assigntome"), "<span class='text'>{$lang->testcase->assignToMe}</span>" . ($type == 'assigntome' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assigntome' ? ' btn-active-text' : '') . "'");
+2 -2
View File
@@ -18,8 +18,8 @@
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo "<span class='nav-title'>{$lang->testtask->common}: </span>";
echo html::a(inlink($app->rawMethod, "mode=$mode&type=wait"), "<span class='text'>{$lang->testtask->wait}</span>" . ($type == 'wait' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'wait' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=done"), "<span class='text'>{$lang->testtask->done}</span>" . ($type == 'done' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'done' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'work') echo html::a(inlink($app->rawMethod, "mode=$mode&type=wait"), "<span class='text'>{$lang->testtask->wait}</span>" . ($type == 'wait' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'wait' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute') echo html::a(inlink($app->rawMethod, "mode=$mode&type=done"), "<span class='text'>{$lang->testtask->done}</span>" . ($type == 'done' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'done' ? ' btn-active-text' : '') . "'");
echo "<span class='divider'></span>";
echo "<span class='nav-title'>{$lang->testcase->common}: </span>";
echo html::a(inlink($app->rawMethod, "mode=testcase&type=assigntome"), "<span class='text'>{$lang->testcase->assignToMe}</span>", '', "class='btn btn-link'");
+11
View File
@@ -1293,6 +1293,17 @@ class programModel extends model
{
$projectID = $this->dao->lastInsertId();
/* Add the creator to team. */
$this->app->loadLang('user');
$member = new stdclass();
$member->root = $projectID;
$member->account = $this->app->user->account;
$member->role = $this->lang->user->roleList[$this->app->user->role];
$member->join = helper::today();
$member->type = 'project';
$member->hours = $this->config->project->defaultWorkhours;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
$whitelist = explode(',', $project->whitelist);
$this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID);
if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project');
+9 -9
View File
@@ -399,7 +399,7 @@ class projectModel extends model
$member->hours = $this->config->project->defaultWorkhours;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
$this->addExecutionMembers($this->session->PRJ, array($member));
$this->addProjectMembers($this->session->PRJ, array($member));
}
/* Create doc lib. */
@@ -2377,7 +2377,7 @@ class projectModel extends model
/* Add iteration or phase team members to the project team. */
if($projectType == 'stage' || $projectType == 'sprint')
{
$this->addExecutionMembers($project->project, $projectMember);
$this->addProjectMembers($project->project, $projectMember);
if($project->acl != 'open') $this->updateUserView($projectID, 'sprint', $changedAccounts);
}
}
@@ -2390,10 +2390,10 @@ class projectModel extends model
* @access public
* @return void
*/
public function addExecutionMembers($executionID = 0, $members = array())
public function addProjectMembers($projectID = 0, $members = array())
{
$executionType = 'project';
$oldJoin = $this->dao->select('`account`, `join`')->from(TABLE_TEAM)->where('root')->eq($executionID)->andWhere('type')->eq($executionType)->fetchPairs();
$projectType = 'project';
$oldJoin = $this->dao->select('`account`, `join`')->from(TABLE_TEAM)->where('root')->eq($projectID)->andWhere('type')->eq($projectType)->fetchPairs();
$accounts = array();
foreach($members as $account => $member)
@@ -2401,8 +2401,8 @@ class projectModel extends model
if(isset($oldJoin[$member->account])) continue;
$accounts[] = $member->account;
$member->root = $executionID;
$member->type = $executionType;
$member->root = $projectID;
$member->type = $projectType;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
}
@@ -2412,8 +2412,8 @@ class projectModel extends model
$changedAccounts = array_merge($changedAccounts, array_diff($oldAccounts, $accounts));
$changedAccounts = array_unique($changedAccounts);
$this->loadModel('user')->updateUserView($executionID, $executionType, $changedAccounts);
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($executionID);
$this->loadModel('user')->updateUserView($projectID, $projectType, $changedAccounts);
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', $changedAccounts);
}
+2
View File
@@ -246,6 +246,8 @@ class riskModel extends model
$riskList = $this->dao->select('*')->from(TABLE_RISK)
->where('deleted')->eq('0')
->andWhere($type)->eq($this->app->user->account)->fi()
->beginIF($this->app->rawMethod == 'contribute')->andWhere("status")->in('closed,canceled')->fi()
->beginIF($this->app->rawMethod == 'work')->andWhere("status")->in('active,hangup')->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll();
+2
View File
@@ -2503,6 +2503,8 @@ class storyModel extends model
->beginIF($type == 'reviewedBy')->andWhere("CONCAT(',', reviewedBy, ',')")->like("%,$account,%")->fi()
->beginIF($type == 'closedBy')->andWhere('closedBy')->eq($account)->fi()
->fi()
->beginIF($this->app->rawMethod == 'contribute')->andWhere("t1.status")->eq('closed')->fi()
->beginIF($this->app->rawMethod == 'work')->andWhere("t1.status")->in('draft,active,changed')->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
+2
View File
@@ -2072,6 +2072,8 @@ class taskModel extends model
->orWhere('t1.finishedList')->like("%,{$account},%")
->markRight(1)
->fi()
->beginIF($this->app->rawMethod == 'contribute')->andWhere("t1.status")->in('closed,done,cancel')->fi()
->beginIF($this->app->rawMethod == 'work')->andWhere("t1.status")->in('wait,doing,pause')->fi()
->beginIF($type != 'all' and $type != 'finishedBy')->andWhere("t1.`$type`")->eq($account)->fi()
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()