* revert project-task and adjust grouptask page.

This commit is contained in:
wangyidong
2016-04-29 14:46:03 +08:00
parent b556ffe47d
commit c53e78728d
6 changed files with 71 additions and 60 deletions
+2 -1
View File
@@ -3,7 +3,8 @@
tr.groupdivider td {background: #fff!important;}
.groupdivider .text {color: #808080}
.groupdivider .text strong {color: #333}
.groupby{background:#f1f1f1!important; border-right:1px solid #ddd;cursor: pointer;}
.groupby{border-right:1px solid #ddd;cursor: pointer;}
#groupTable tr > th:first-child, #groupTable tr > td:first-child{padding:6px 5px;}
.sub-featurebar {margin: -20px -20px -1px; padding: 5px 20px 0; border-bottom: none}
.sub-featurebar .nav-tabs > li {margin-bottom: 0}
+3 -2
View File
@@ -22,10 +22,10 @@
</ul>
</div>
<?php endif;?>
<table class='table active-disabled table-condensed table-fixed table-custom' id='groupTable'>
<table class='table active-disabled table-condensed table-fixed' id='groupTable'>
<thead>
<tr>
<th class='w-120px'>
<th class='w-120px text-left'>
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $lang->task->$groupBy, '', "class='expandAll' data-action='expand'")?>
<?php echo html::a('###', "<i class='icon-caret-right'></i> " . $lang->task->$groupBy, '', "class='collapseAll hidden' data-action='collapse'")?>
</th>
@@ -64,6 +64,7 @@
$groupLeft = 0.0;
$groupName = $groupKey;
if($groupBy == 'story' and $groupName == 0) $groupName = $this->lang->task->noStory;
if(!empty($groupByList[$groupKey])) $groupName .= '::' . $groupByList[$groupKey];
?>
<tbody>
+63
View File
@@ -19,6 +19,69 @@ js::set('moduleID', $moduleID);
js::set('productID', $productID);
js::set('browseType', $browseType);
?>
<div class='sub-featurebar'>
<ul class='nav'>
<li style='padding-top:5px;'>
<span>
<?php
if($productID)
{
$product = $this->product->getById($productID);
$removeLink = $browseType == 'byproduct' ? inlink('task', "projectID=$projectID&browseType=$status&param=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("productBrowseParam")';
echo $product->name;
echo '&nbsp;' . html::a($removeLink, "<i class='icon icon-remove'></i>") . '&nbsp;';
}
elseif($moduleID)
{
$module = $this->tree->getById($moduleID);
$removeLink = $browseType == 'bymodule' ? inlink('task', "projectID=$projectID&browseType=$status&param=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("moduleBrowseParam")';
echo $module->name;
echo '&nbsp;' . html::a($removeLink, "<i class='icon icon-remove'></i>") . '&nbsp;';
}
else
{
echo $this->lang->tree->all;
}
echo " <i class='icon-angle-right'></i>&nbsp; ";
?>
</span>
</li>
<?php foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem):?>
<?php
if(isset($menuItem->hidden)) continue;
$type = $menuItem->name;
if(strpos($type, 'QUERY') === 0)
{
$queryID = (int)substr($type, 5);
echo "<li id='{$type}Tab'>" . html::a(inlink('task', "project=$projectID&type=bySearch&param=$queryID"), $menuItem->text) . '</li>' ;
}
elseif($type != 'status')
{
echo "<li id='{$type}Tab'>" . html::a(inlink('task', "project=$projectID&type=$type"), $menuItem->text) . '</li>' ;
}
elseif($type == 'status')
{
echo "<li id='statusTab' class='dropdown'>";
$taskBrowseType = isset($status) ? $this->session->taskBrowseType : '';
$current = zget($lang->project->statusSelects, $taskBrowseType, '');
if(empty($current)) $current = $menuItem->text;
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
echo "<ul class='dropdown-menu'>";
foreach ($lang->project->statusSelects as $key => $value)
{
if($key == '') continue;
echo '<li' . ($key == $taskBrowseType ? " class='active'" : '') . '>';
echo html::a($this->createLink('project', 'task', "project=$projectID&type=$key"), $value);
}
echo '</ul></li>';
}
?>
<?php endforeach;?>
<?php echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;{$lang->project->byQuery}</a></li> ";?>
</ul>
<div id='querybox' class='<?php if($browseType == 'bysearch') echo 'show';?>'></div>
</div>
<div class='side' id='taskTree'>
<a class='side-handle' data-id='projectTree'><i class='icon-caret-left'></i></a>
<div class='side-body'>
+1 -57
View File
@@ -1,61 +1,7 @@
<div id='featurebar'>
<ul class='nav'>
<?php
if($this->methodName === 'task')
{
echo '<li><span>';
if($productID)
{
$product = $this->product->getById($productID);
$removeLink = $browseType == 'byproduct' ? inlink('task', "projectID=$projectID&browseType=$status&param=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("productBrowseParam")';
echo $product->name;
echo '&nbsp;' . html::a($removeLink, "<i class='icon icon-remove'></i>", '', "class='text-muted'") . '&nbsp;';
}
elseif($moduleID)
{
$module = $this->tree->getById($moduleID);
$removeLink = $browseType == 'bymodule' ? inlink('task', "projectID=$projectID&browseType=$status&param=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("moduleBrowseParam")';
echo $module->name;
echo '&nbsp;' . html::a($removeLink, "<i class='icon icon-remove'></i>", '', "class='text-muted'") . '&nbsp;';
}
else
{
echo $this->lang->tree->all;
}
echo " <i class='icon-angle-right'></i>&nbsp; </span></li>";
}
foreach(customModel::getFeatureMenu($this->moduleName, 'task') as $menuItem)
{
if(isset($menuItem->hidden)) continue;
$type = $menuItem->name;
if(strpos($type, 'QUERY') === 0)
{
$queryID = (int)substr($type, 5);
echo "<li id='{$type}Tab'>" . html::a(inlink('task', "project=$projectID&type=bySearch&param=$queryID"), $menuItem->text) . '</li>' ;
}
elseif($type != 'status')
{
echo "<li id='{$type}Tab'>" . html::a(inlink('task', "project=$projectID&type=$type"), $menuItem->text) . '</li>' ;
}
elseif($type == 'status')
{
echo "<li id='statusTab' class='dropdown'>";
$taskBrowseType = isset($status) ? $this->session->taskBrowseType : '';
$current = zget($lang->project->statusSelects, $taskBrowseType, '');
if(empty($current)) $current = $menuItem->text;
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
echo "<ul class='dropdown-menu'>";
foreach ($lang->project->statusSelects as $key => $value)
{
if($key == '') continue;
echo '<li' . ($key == $taskBrowseType ? " class='active'" : '') . '>';
echo html::a($this->createLink('project', 'task', "project=$projectID&type=$key"), $value);
}
echo '</ul></li>';
}
}
echo "<li id='listTab'>"; common::printLink('project', 'task', "project=$projectID&type=unclosed", $lang->project->list); echo '</li>';
echo "<li id='kanbanTab'>"; common::printLink('project', 'kanban', "projectID=$projectID", $lang->project->kanban) . '</li>';
if($project->type == 'sprint' or $project->type == 'waterfall') echo "<li id='burnTab'>"; common::printLink('project', 'burn', "project=$projectID", $lang->project->burn); echo '</li>';
echo "<li id='treeTab'>"; common::printLink('project', 'tree', "projectID=$projectID", $lang->project->tree); echo '</li>';
@@ -71,7 +17,6 @@
common::printLink('project', 'groupTask', "project=$projectID&groupBy=$key", $value);
}
echo '</ul></li>';
if($this->methodName === 'task') echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;{$lang->project->byQuery}</a></li> ";
?>
</ul>
<div class='actions'>
@@ -121,7 +66,6 @@
?>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
</div>
<?php
$headerHooks = glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php");
+1
View File
@@ -92,6 +92,7 @@ $lang->task->files = 'Files';
$lang->task->ditto = 'Ditto';
$lang->task->dittoNotice = "Current task and task above it do not belong to same project!";
$lang->task->selectAllUser = 'All';
$lang->task->noStory = 'No Story';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = 'Pending';
+1
View File
@@ -92,6 +92,7 @@ $lang->task->files = '附件';
$lang->task->ditto = '同上';
$lang->task->dittoNotice = "该任务与上一任务不属于同一项目!";
$lang->task->selectAllUser = '全部';
$lang->task->noStory = '无需求';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = '未开始';