This commit is contained in:
liugang
2018-04-26 15:59:34 +08:00
17 changed files with 291 additions and 14565 deletions
+49 -2
View File
@@ -242,7 +242,8 @@ class block extends control
$block->actionLink = '';
if($block->block == 'overview' && common::hasPriv('product', 'create'))
{
$block->actionLink = html::a($this->createLink('product', 'create'), "<i class='icon icon-plus'> </i>" . $this->lang->product->create, '', "class='btn'");
if($module == 'product' && common::hasPriv('product', 'create')) $block->actionLink = html::a($this->createLink('product', 'create'), "<i class='icon icon-plus'> </i>" . $this->lang->product->create, '', "class='btn'");
if($module == 'project' && common::hasPriv('project', 'create')) $block->actionLink = html::a($this->createLink('project', 'create'), "<i class='icon icon-sm icon-plus'> </i>" . $this->lang->project->create, '', "class='btn btn-sm'");
}
if($this->block->isLongBlock($block))
@@ -835,7 +836,20 @@ class block extends control
* @access public
* @return void
*/
public function printOverviewBlock()
public function printOverviewBlock($module = 'product')
{
$func = 'print' . ucfirst($module) . 'OverviewBlock';
$this->view->module = $module;
$this->$func();
}
/**
* Print product overview block.
*
* @access public
* @return void
*/
public function printProductOverviewBlock()
{
$normal = 0;
$closed = 0;
@@ -854,6 +868,39 @@ class block extends control
$this->view->closed = $closed;
}
/**
* Print project overview block.
*
* @access public
* @return void
*/
public function printProjectOverviewBlock()
{
$projects = $this->loadModel('project')->getList();
$total = 0;
foreach($projects as $project)
{
if(!$this->project->checkPriv($project)) continue;
if(!isset($overview[$project->status])) $overview[$project->status] = 0;
$overview[$project->status]++;
$total++;
}
$overviewPercent = array();
foreach($this->lang->project->statusList as $statusKey => $statusName)
{
if(!isset($overview[$statusKey])) $overview[$statusKey] = 0;
$overviewPercent[$statusKey] = round($overview[$statusKey] / $total, 2) * 100 . '%';
}
$this->view->total = $total;
$this->view->overview = $overview;
$this->view->overviewPercent = $overviewPercent;
}
/**
* Print project block.
*
+23 -9
View File
@@ -83,21 +83,33 @@ $lang->block->default['product']['4']['params']['num'] = 15;
$lang->block->default['product']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['product']['4']['params']['type'] = 'assignedTo';
$lang->block->default['project']['1']['title'] = 'Active ' . $lang->projectCommon . 's';
$lang->block->default['project']['1']['block'] = 'list';
$lang->block->default['project']['1']['title'] = $lang->projectCommon . 'statistic';
$lang->block->default['project']['1']['block'] = 'statistic';
$lang->block->default['project']['1']['grid'] = 8;
$lang->block->default['project']['1']['params']['num'] = 15;
$lang->block->default['project']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['1']['params']['type'] = 'undone';
$lang->block->default['project']['1']['params']['type'] = 'noclosed';
$lang->block->default['project']['1']['params']['num'] = 5;
$lang->block->default['project']['2']['title'] = 'My Tasks';
$lang->block->default['project']['2']['block'] = 'task';
$lang->block->default['project']['2']['title'] = $lang->projectCommon . 'overview';
$lang->block->default['project']['2']['block'] = 'overview';
$lang->block->default['project']['2']['grid'] = 4;
$lang->block->default['project']['2']['params']['num'] = 15;
$lang->block->default['project']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['2']['params']['type'] = 'assignedTo';
$lang->block->default['project']['3']['title'] = 'Active ' . $lang->projectCommon . 's';
$lang->block->default['project']['3']['block'] = 'list';
$lang->block->default['project']['3']['grid'] = 8;
$lang->block->default['project']['3']['params']['num'] = 15;
$lang->block->default['project']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['3']['params']['type'] = 'undone';
$lang->block->default['project']['4']['title'] = 'My Tasks';
$lang->block->default['project']['4']['block'] = 'task';
$lang->block->default['project']['4']['grid'] = 4;
$lang->block->default['project']['4']['params']['num'] = 15;
$lang->block->default['project']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['4']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['title'] = 'My Bugs';
$lang->block->default['qa']['1']['block'] = 'bug';
@@ -232,6 +244,8 @@ $lang->block->modules['product']->availableBlocks->plan = 'Plans';
$lang->block->modules['product']->availableBlocks->release = 'Releases';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
$lang->block->modules['project']->availableBlocks->statistic = $lang->projectCommon . 'statistic';
$lang->block->modules['project']->availableBlocks->overview = $lang->projectCommon . 'overview';
$lang->block->modules['project']->availableBlocks->list = $lang->projectCommon . 'List';
$lang->block->modules['project']->availableBlocks->task = 'Tasks';
$lang->block->modules['project']->availableBlocks->build = 'Builds';
+26 -12
View File
@@ -83,21 +83,33 @@ $lang->block->default['product']['4']['params']['num'] = 15;
$lang->block->default['product']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['product']['4']['params']['type'] = 'assignedTo';
$lang->block->default['project']['1']['title'] = '进行中的' . $lang->projectCommon;
$lang->block->default['project']['1']['block'] = 'list';
$lang->block->default['project']['1']['title'] = $lang->projectCommon . '统计';
$lang->block->default['project']['1']['block'] = 'statistic';
$lang->block->default['project']['1']['grid'] = 8;
$lang->block->default['project']['1']['params']['num'] = 15;
$lang->block->default['project']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['1']['params']['type'] = 'undone';
$lang->block->default['project']['1']['params']['type'] = 'noclosed';
$lang->block->default['project']['1']['params']['num'] = 5;
$lang->block->default['project']['2']['title'] = '指派给我的任务';
$lang->block->default['project']['2']['block'] = 'task';
$lang->block->default['project']['2']['title'] = $lang->projectCommon . '总览';
$lang->block->default['project']['2']['block'] = 'overview';
$lang->block->default['project']['2']['grid'] = 4;
$lang->block->default['project']['2']['params']['num'] = 15;
$lang->block->default['project']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['2']['params']['type'] = 'assignedTo';
$lang->block->default['project']['3']['title'] = '进行中的' . $lang->projectCommon;
$lang->block->default['project']['3']['block'] = 'list';
$lang->block->default['project']['3']['grid'] = 8;
$lang->block->default['project']['3']['params']['num'] = 15;
$lang->block->default['project']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['3']['params']['type'] = 'undone';
$lang->block->default['project']['4']['title'] = '指派给我的任务';
$lang->block->default['project']['4']['block'] = 'task';
$lang->block->default['project']['4']['grid'] = 4;
$lang->block->default['project']['4']['params']['num'] = 15;
$lang->block->default['project']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['4']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['1']['title'] = '指派给我的Bug';
$lang->block->default['qa']['1']['block'] = 'bug';
@@ -232,9 +244,11 @@ $lang->block->modules['product']->availableBlocks->plan = '计划列表';
$lang->block->modules['product']->availableBlocks->release = '发布列表';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
$lang->block->modules['project']->availableBlocks->list = $lang->projectCommon . '列表';
$lang->block->modules['project']->availableBlocks->task = '任务列表';
$lang->block->modules['project']->availableBlocks->build = '版本列表';
$lang->block->modules['project']->availableBlocks->statistic = $lang->projectCommon . '统计';
$lang->block->modules['project']->availableBlocks->overview = $lang->projectCommon . '总览';
$lang->block->modules['project']->availableBlocks->list = $lang->projectCommon . '列表';
$lang->block->modules['project']->availableBlocks->task = '任务列表';
$lang->block->modules['project']->availableBlocks->build = '版本列表';
$lang->block->modules['qa'] = new stdclass();
$lang->block->modules['qa']->availableBlocks = new stdclass();
$lang->block->modules['qa']->availableBlocks->bug = 'Bug列表';
+2 -27
View File
@@ -5,34 +5,9 @@
* @copyright Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Gang Liu <liugang@cnezsoft.com>
* @package block
* @package block
* @version $Id$
* @link http://www.zentao.net
*/
?>
<style>
.block-overview .status-list li + li {margin-top: 5px;}
.block-overview .status-list li > strong {font-size: 16px;}
.block-overview .panel-body {padding: 25px 0;}
.progress-pie {position: relative;}
.progress-pie .progress-info {position: absolute; width: 100%; height: 100%; left: 0; top: 0; text-align: center; padding-top: 25px;}
.progress-pie .progress-info > small {display: block; color: #A6AAB8; line-height: 14px;}
.progress-pie .progress-info > strong {display: block; font-size: 36px; line-height: 40px;}
</style>
<div class="panel-body table-row">
<div class="col-6 text-middle text-center">
<div class="progress-pie inline-block" data-value="72" data-doughnut-size="80">
<canvas width="100" height="100" style="width: 100px; height: 100px;"></canvas>
<div class="progress-info">
<small><?php echo $lang->product->all;?></small>
<strong><?php echo $total;?></strong>
</div>
</div>
</div>
<div class="col-6 text-middle">
<ul class="list-unstyled status-list">
<li><span class="status-unclosed"><span class="label label-dot"></span> <?php echo $lang->product->statusList['normal'];?></span> &nbsp; <strong><?php echo $normal;?></strong></li>
<li><span class="status-closed"><span class="label label-dot"></span> <?php echo $lang->product->statusList['closed'];?></span> &nbsp; <strong><?php echo $closed;?></strong></li>
</ul>
</div>
</div>
<?php include "./{$module}overviewblock.html.php";?>
@@ -0,0 +1,38 @@
<?php
/**
* The overview block view file of block module of RanZhi.
*
* @copyright Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Gang Liu <liugang@cnezsoft.com>
* @package block
* @version $Id$
* @link http://www.zentao.net
*/
?>
<style>
.block-overview .status-list li + li {margin-top: 5px;}
.block-overview .status-list li > strong {font-size: 16px;}
.block-overview .panel-body {padding: 25px 0;}
.progress-pie {position: relative;}
.progress-pie .progress-info {position: absolute; width: 100%; height: 100%; left: 0; top: 0; text-align: center; padding-top: 25px;}
.progress-pie .progress-info > small {display: block; color: #A6AAB8; line-height: 14px;}
.progress-pie .progress-info > strong {display: block; font-size: 36px; line-height: 40px;}
</style>
<div class="panel-body table-row">
<div class="col-6 text-middle text-center">
<div class="progress-pie inline-block" data-value="72" data-doughnut-size="80">
<canvas width="100" height="100" style="width: 100px; height: 100px;"></canvas>
<div class="progress-info">
<small><?php echo $lang->product->all;?></small>
<strong><?php echo $total;?></strong>
</div>
</div>
</div>
<div class="col-6 text-middle">
<ul class="list-unstyled status-list">
<li><span class="status-unclosed"><span class="label label-dot"></span> <?php echo $lang->product->statusList['normal'];?></span> &nbsp; <strong><?php echo $normal;?></strong></li>
<li><span class="status-closed"><span class="label label-dot"></span> <?php echo $lang->product->statusList['closed'];?></span> &nbsp; <strong><?php echo $closed;?></strong></li>
</ul>
</div>
</div>
@@ -0,0 +1,38 @@
<?php
/**
* The project overview block view file of block module of RanZhi.
*
* @copyright Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Tingting Dai <daitingting@xirangit.com>
* @package block
* @version $Id$
* @link http://www.zentao.net
*/
?>
<div class="panel-body table-row">
<div class="col-6 text-middle text-center">
<div class="tile">
<div class="tile-title"><?php echo $lang->project->allProject;?></div>
<div class="tile-amount"><?php echo $total;?></div>
<a class="btn btn-primary btn-circle btn-icon-right btn-sm" href="<?php echo $this->createLink('project', 'all');?>"><?php echo $lang->project->viewAll;?> <span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span></a>
</div>
</div>
<div class="col-6 text-middle">
<ul class="status-bars">
<?php foreach($lang->project->statusList as $statusKey => $statusName):?>
<li>
<span class="value"><?php echo $overview[$statusKey];?></span>
<span class="bar" style="height: <?php echo $overviewPercent[$statusKey];?>"></span>
<span class="title"><?php echo $statusName;?></span>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
<style>
.block-overview .tile-amount {font-size: 48px; margin-bottom: 10px;}
.nav > li > a.btn{color: #3c4353;}
.nav > li > a.btn-sm{padding: 2px 8px; font-size: 12px; line-height: 1.5; border-radius: 4px;}
</style>
+2 -2
View File
@@ -14,7 +14,7 @@
<table class='table table-borderless table-hover table-fixed-head block-tasks <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB?></th>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='c-pri'><?php echo $lang->priAB?></th>
<th class='c-name'> <?php echo $lang->task->name;?></th>
<?php if($longBlock):?>
@@ -36,7 +36,7 @@
<td class='c-name' style='color: <?php echo $task->color?>' title='<?php echo $task->name?>'><?php echo $task->name?></td>
<?php if($longBlock):?>
<td class='c-estimate'><?php echo $task->estimate?></td>
<td class='c-status'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td class='c-deadline'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<?php endif;?>
<td class='c-status' title='<?php echo zget($lang->task->statusList, $task->status)?>'>
<span class="task-status-<?php echo $task->status?>">
+7 -11
View File
@@ -48,19 +48,15 @@ $lang->branch->menuOrder = $lang->product->menuOrder;
/* project menu order. */
$lang->project->menuOrder[5] = 'list';
$lang->project->menuOrder[10] = 'index';
$lang->project->menuOrder[15] = 'task';
$lang->project->menuOrder[10] = 'kanban';
$lang->project->menuOrder[15] = 'burn';
$lang->project->menuOrder[20] = 'story';
$lang->project->menuOrder[25] = 'bug';
$lang->project->menuOrder[30] = 'build';
$lang->project->menuOrder[35] = 'testtask';
$lang->project->menuOrder[25] = 'qa';
$lang->project->menuOrder[30] = 'doc';
$lang->project->menuOrder[35] = 'action';
$lang->project->menuOrder[40] = 'team';
$lang->project->menuOrder[45] = 'dynamic';
$lang->project->menuOrder[50] = 'doc';
$lang->project->menuOrder[55] = 'product';
$lang->project->menuOrder[60] = 'view';
$lang->project->menuOrder[65] = 'create';
$lang->project->menuOrder[70] = 'all';
$lang->project->menuOrder[45] = 'product';
$lang->project->menuOrder[50] = 'view';
$lang->task->menuOrder = $lang->project->menuOrder;
$lang->build->menuOrder = $lang->project->menuOrder;
+29 -8
View File
@@ -221,21 +221,42 @@ $lang->release->menu = $lang->product->menu;
$lang->project = new stdclass();
$lang->project->menu = new stdclass();
$lang->project->menu->task = array('link' => '任务|project|task|projectID=%s', 'subModule' => 'task,tree', 'alias' => 'grouptask,importtask,burn,importbug,kanban,printkanban,tree');
$lang->project->menu->list = array('link' => '%s', 'subModule' => 'task,tree', 'alias' => 'grouptask,importtask,importbug,tree');
$lang->project->menu->kanban = array('link' => '看板|project|kanban|projectID=%s');
$lang->project->menu->burn = array('link' => '燃尽图|project|burn|projectID=%s');
$lang->project->menu->story = array('link' => '需求|project|story|projectID=%s', 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
$lang->project->menu->bug = 'Bug|project|bug|projectID=%s';
$lang->project->menu->dynamic = '动态|project|dynamic|projectID=%s';
$lang->project->menu->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build');
$lang->project->menu->testtask = array('link' => '测试单|project|testtask|projectID=%s');
$lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers');
$lang->project->menu->qa = array('link' => '%s', 'subModule' => 'build');
$lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
$lang->project->menu->action = array('link' => '%s');
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
$lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers');
$lang->project->menu->view = array('link' => '概况|project|view|projectID=%s', 'alias' => 'edit,start,suspend,putoff,close');
$lang->project->subMenu = new stdclass();
$lang->project->subMenu->list = new stdclass();
$lang->project->subMenu->list->task = '任务列表|project|task|projectID=%s';
$lang->project->subMenu->list->tree = '树状图|project|tree|projectID=%s';
$lang->project->subMenu->list->groupTask = '分组视图|project|groupTask|projectID=%s';
$lang->project->subMenu->qa = new stdclass();
$lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s';
$lang->project->subMenu->qa->build = '版本|project|build|projectID=%s';
$lang->project->subMenu->qa->testtask = '测试单|project|testtask|projectID=%s';
$lang->project->subMenu->action = new stdclass();
$lang->project->subMenu->action->dynamic = '动态|project|dynamic|projectID=%s';
$lang->project->dividerMenu = ',story,doc,';
$lang->task = new stdclass();
$lang->build = new stdclass();
$lang->task->menu = $lang->project->menu;
$lang->build->menu = $lang->project->menu;
$lang->task->menu = $lang->project->menu;
$lang->task->subMenu = $lang->project->subMenu;
$lang->build->menu = $lang->project->menu;
$lang->build->subMenu = $lang->project->subMenu;
$lang->task->dividerMenu = $lang->project->dividerMenu;
$lang->build->dividerMenu = $lang->project->dividerMenu;
/* QA视图菜单设置。*/
$lang->qa = new stdclass();
+12 -14
View File
@@ -456,40 +456,38 @@ class commonModel extends model
/* Cycling to print every sub menus. */
foreach($menu as $menuItem)
{
if(isset($lang->$moduleName->dividerMenu) and strpos($lang->$moduleName->dividerMenu, ",{$menuItem->name},") !== false) echo "<li class='divider'></li>";
if(isset($menuItem->hidden) && $menuItem->hidden) continue;
if($isMobile and empty($menuItem->link)) continue;
/* Init the these vars. */
$alias = isset($menuItem->alias) ? $menuItem->alias : '';
$subModule = isset($menuItem->subModule) ? explode(',', $menuItem->subModule) : array();
$class = isset($menuItem->class) ? $menuItem->class : '';
$active = '';
if($subModule and in_array($currentModule, $subModule)) $active = 'active';
if($alias and $moduleName == $currentModule and strpos(",$alias,", ",$currentMethod,") !== false) $active = 'active';
if($menuItem->link)
{
$active = '';
$float = isset($menuItem->float) ? $menuItem->float : '';
$alias = '';
$target = '';
$module = '';
$method = '';
$link = commonModel::createMenuLink($menuItem);
if(is_array($menuItem->link))
{
if(isset($menuItem->link['subModule']))
{
$subModules = explode(',', $menuItem->link['subModule']);
if(in_array($currentModule, $subModules) and $float != 'right') $active = 'active';
}
if(isset($menuItem->link['alias'])) $alias = $menuItem->link['alias'];
if(isset($menuItem->link['target'])) $target = $menuItem->link['target'];
if(isset($menuItem->link['module'])) $module = $menuItem->link['module'];
if(isset($menuItem->link['method'])) $method = $menuItem->link['method'];
}
if($float != 'right' and $module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false)) $active = 'active';
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false)) $active = 'active';
$menuItemHtml = "<li class='$float $active' data-id='$menuItem->name'>" . html::a($link, $menuItem->text, $target) . "</li>\n";
if($isMobile) $menuItemHtml = html::a($link, $menuItem->text, $target, "class='$active'") . "\n";
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $menuItem->text, $target) . "</li>\n";
if($isMobile) $menuItemHtml = html::a($link, $menuItem->text, $target, "class='$class $active'") . "\n";
echo $menuItemHtml;
}
else
{
echo $isMobile ? $menuItem->text : "<li data-id='$menuItem->name'>$menuItem->text</li>\n";
echo $isMobile ? $menuItem->text : "<li class='$class $active' data-id='$menuItem->name'>$menuItem->text</li>\n";
}
}
echo $isMobile ? '' : "</ul>\n";
@@ -1290,7 +1288,7 @@ EOD;
if(!empty($app->user->admin)) return true;
if($module == 'todo' and ($method == 'create' or $method == 'batchcreate')) return true;
if($module == 'effort' and $method == 'batchcreate') return true;
if($module == 'effort' and ($method == 'batchcreate' or $method == 'createforobject')) return true;
// limited project
$limitedProject = false;
+16 -18
View File
@@ -209,11 +209,12 @@ class customModel extends model
{
if(is_object($item)) $item = (array)$item;
$label = '';
$module = '';
$method = '';
$float = '';
$fixed = '';
$label = '';
$module = '';
$method = '';
$class = '';
$subModule = '';
$alias = '';
$link = (is_array($item) and isset($item['link'])) ? $item['link'] : $item;
/* The variable of item has not link and is not link then ignore it. */
@@ -235,31 +236,28 @@ class customModel extends model
{
$itemLink = array('module' => $module, 'method' => $method);
if(isset($link[3])) $itemLink['vars'] = $link[3];
if(is_array($item))
{
if(isset($item['subModule'])) $itemLink['subModule'] = $item['subModule'];
if(isset($item['alias'])) $itemLink['alias'] = $item['alias'];
if(isset($item['target'])) $itemLink['target'] = $item['target'];
}
if(is_array($item) and isset($item['target'])) $itemLink['target'] = $item['target'];
}
if(is_array($item))
{
if(isset($item['float'])) $float = $item['float'];
if(isset($item['fixed'])) $fixed = $item['fixed'];
if(isset($item['class'])) $class = $item['class'];
if(isset($item['subModule'])) $subModule = $item['subModule'];
if(isset($item['alias'])) $alias = $item['alias'];
}
$hidden = !$fixed && isset($customMenuMap[$name]) && isset($customMenuMap[$name]->hidden) && $customMenuMap[$name]->hidden;
$hidden = isset($customMenuMap[$name]) && isset($customMenuMap[$name]->hidden) && $customMenuMap[$name]->hidden;
if(strpos($name, 'QUERY') === 0 and !isset($customMenuMap[$name])) $hidden = true;
$menuItem = new stdclass();
$menuItem->name = $name;
$menuItem->link = $itemLink;
$menuItem->text = $label;
$menuItem->order = $fixed ? -1 : (isset($customMenuMap[$name]) && isset($customMenuMap[$name]->order) ? $customMenuMap[$name]->order : $order++);
if($float) $menuItem->float = $float;
if($fixed) $menuItem->fixed = $fixed;
if($hidden) $menuItem->hidden = $hidden;
$menuItem->order = (isset($customMenuMap[$name]) && isset($customMenuMap[$name]->order) ? $customMenuMap[$name]->order : $order++);
if($hidden) $menuItem->hidden = $hidden;
if($class) $menuItem->class = $class;
if($subModule)$menuItem->subModule = $subModule;
if($alias) $menuItem->alias = $alias;
if($isTutorialMode) $menuItem->tutorial = true;
/* Hidden menu by config in mobile. */
-4
View File
@@ -1,7 +1,3 @@
.container {max-width: 950px!important;}
.container .actions {margin-bottom: 10px; padding: 0}
.container .actions > .text {padding: 5px 5px 5px 15px; line-height: 20px}
.mw-220px {max-width: 220px!important}
#wrap h1{font-size:14px;}
#interval{margin-right:10px;}
.canvas-wrapper {padding: 15px; border: 1px solid #ddd;}
+1
View File
@@ -146,6 +146,7 @@ $lang->project->storySort = 'Sort Story';
$lang->project->importPlanStory = 'Create ' . $lang->projectCommon . ' success!\nImport the stories with the plan?';
$lang->project->iteration = 'Iteration';
$lang->project->iterationInfo = 'Iteration %s times';
$lang->project->viewAll = 'View All';
/* 分组浏览。*/
$lang->project->allTasks = 'All';
+1
View File
@@ -147,6 +147,7 @@ $lang->project->storySort = '需求排序';
$lang->project->importPlanStory = '创建' . $lang->projectCommon . '成功!\n是否导入计划关联的相关需求?';
$lang->project->iteration = '版本迭代';
$lang->project->iterationInfo = '迭代%s次';
$lang->project->viewAll = '查看所有';
/* 分组浏览。*/
$lang->project->allTasks = '所有';
+33 -3
View File
@@ -78,9 +78,9 @@ class projectModel extends model
if($project and $project->type == 'ops')
{
unset($this->lang->project->menu->story);
unset($this->lang->project->menu->bug);
unset($this->lang->project->menu->build);
unset($this->lang->project->menu->testtask);
unset($this->lang->project->subMenu->qa->bug);
unset($this->lang->project->subMenu->qa->build);
unset($this->lang->project->subMenu->qa->testtask);
}
if($projects and !isset($projects[$projectID]) and !$this->checkPriv($project))
@@ -118,6 +118,36 @@ class projectModel extends model
foreach($this->lang->project->menu as $key => $menu)
{
$replace = $projectID;
/* Replace for dropdown submenu. */
if(isset($this->lang->project->subMenu->$key))
{
$dropTitle = '';
$hasActive = false;
$replace = "<ul class='dropdown-menu'>";
foreach($this->lang->project->subMenu->$key as $subMenuKey => $subMenuLink)
{
list($subMenuName, $subMenuModule, $subMenuMethod, $subMenuParams) = explode('|', $subMenuLink);
if(!commonModel::hasPriv($subMenuModule, $subMenuMethod)) continue;
if(empty($dropTitle)) $dropTitle = $subMenuName;
$active = '';
if($moduleName == $subMenuModule and $methodName == $subMenuMethod)
{
$active = "class='active'";
$dropTitle = $subMenuName;
}
$replace .= "<li $active>" . html::a(helper::createLink($subMenuModule, $subMenuMethod, sprintf($subMenuParams, $projectID)), $subMenuName) . '</li>';
if($active) $hasActive = true;
}
$replace .= '</ul>';
$replace = "<a data-toggle='dropdown'>$dropTitle <span class='caret'></span></a>" . $replace;
$this->lang->project->menu->$key['class'] = 'dropdown';
if($hasActive) $this->lang->project->menu->$key['class'] .= ' active';
}
common::setMenuVars($this->lang->project->menu, $key, $replace);
}
}
+11 -14452
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long