* Modify the filter label of the mr Module.

This commit is contained in:
tianshujie
2023-02-21 16:49:09 +08:00
parent 4ee0aabe5f
commit aeb2ae52f8
5 changed files with 41 additions and 14 deletions
+7
View File
@@ -205,3 +205,10 @@ $lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are <strong>%s</strong> tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
$lang->mr->featureBar['browse']['all'] = $lang->mr->statusList['all'];
$lang->mr->featureBar['browse']['opened'] = $lang->mr->statusList['opened'];
$lang->mr->featureBar['browse']['merged'] = $lang->mr->statusList['merged'];
$lang->mr->featureBar['browse']['closed'] = $lang->mr->statusList['closed'];
$lang->mr->featureBar['browse']['assignee'] = $lang->mr->assignedToMe;
$lang->mr->featureBar['browse']['creator'] = $lang->mr->createdByMe;
+7
View File
@@ -205,3 +205,10 @@ $lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are <strong>%s</strong> tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
$lang->mr->featureBar['browse']['all'] = $lang->mr->statusList['all'];
$lang->mr->featureBar['browse']['opened'] = $lang->mr->statusList['opened'];
$lang->mr->featureBar['browse']['merged'] = $lang->mr->statusList['merged'];
$lang->mr->featureBar['browse']['closed'] = $lang->mr->statusList['closed'];
$lang->mr->featureBar['browse']['assignee'] = $lang->mr->assignedToMe;
$lang->mr->featureBar['browse']['creator'] = $lang->mr->createdByMe;
+7
View File
@@ -205,3 +205,10 @@ $lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are <strong>%s</strong> tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
$lang->mr->featureBar['browse']['all'] = $lang->mr->statusList['all'];
$lang->mr->featureBar['browse']['opened'] = $lang->mr->statusList['opened'];
$lang->mr->featureBar['browse']['merged'] = $lang->mr->statusList['merged'];
$lang->mr->featureBar['browse']['closed'] = $lang->mr->statusList['closed'];
$lang->mr->featureBar['browse']['assignee'] = $lang->mr->assignedToMe;
$lang->mr->featureBar['browse']['creator'] = $lang->mr->createdByMe;
+7
View File
@@ -205,3 +205,10 @@ $lang->mr->confirmUnlinkTask = "您确认移除该任务吗?";
$lang->mr->taskSummary = "本页共 <strong>%s</strong> 个任务";
$lang->mr->notDelbranch = "源分支为受保护分支时不可删除";
$lang->mr->addForApp = "该服务器下没有项目,是否前往添加?";
$lang->mr->featureBar['browse']['all'] = $lang->mr->statusList['all'];
$lang->mr->featureBar['browse']['opened'] = $lang->mr->statusList['opened'];
$lang->mr->featureBar['browse']['merged'] = $lang->mr->statusList['merged'];
$lang->mr->featureBar['browse']['closed'] = $lang->mr->statusList['closed'];
$lang->mr->featureBar['browse']['assignee'] = $lang->mr->assignedToMe;
$lang->mr->featureBar['browse']['creator'] = $lang->mr->createdByMe;
+13 -14
View File
@@ -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&param=$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&param={$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&param={$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&param=$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'");?>