* Modify the filter label of the mr Module.
This commit is contained in:
@@ -11,20 +11,19 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php foreach($lang->mr->statusList as $key => $label):?>
|
||||
<?php $active = $param == $key ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php if($param == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('browse', "repoID=$repoID&mode=status¶m=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php $active = $mode == 'assignee' ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>{$lang->mr->assignedToMe}</span>";?>
|
||||
<?php if($mode == 'assignee') $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('browse', "repoID=$repoID&mode=assignee¶m={$this->app->user->account}"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php $active = $mode == 'creator' ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>{$lang->mr->createdByMe}</span>";?>
|
||||
<?php if($mode == 'creator') $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('browse', "repoID=$repoID&mode=creator¶m={$this->app->user->account}"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php
|
||||
$menus = customModel::getFeatureMenu('mr', 'browse');
|
||||
foreach($menus as $menuItem)
|
||||
{
|
||||
$label = "<span class='text'>{$menuItem->text}</span>";
|
||||
$active = ($param == $menuItem->name or $mode == $menuItem->name) ? 'btn-active-text' : '';
|
||||
$modeParam = in_array($menuItem->name, array('assignee', 'creator')) ? $menuItem->name : 'status';
|
||||
$paramName = in_array($menuItem->name, array('assignee', 'creator')) ? $this->app->user->account : $menuItem->name;
|
||||
|
||||
if($param == $menuItem->name) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
|
||||
echo html::a(inlink('browse', "repoID=$repoID&mode=$modeParam¶m=$paramName"), $label, '', "class='btn btn-link $active'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('mr', 'create', '', "<i class='icon icon-plus'></i> " . $lang->mr->create, '', "class='btn btn-primary'");?>
|
||||
|
||||
Reference in New Issue
Block a user