* code for task #49352.

This commit is contained in:
王怡栋
2022-03-08 10:52:48 +08:00
parent 01c96e266c
commit b960a07ecf
11 changed files with 81 additions and 27 deletions
@@ -1 +0,0 @@
<?php include dirname(__FILE__) . '/featurebar.lite.html.hook.php';?>
@@ -1 +0,0 @@
<?php include dirname(__FILE__) . '/featurebar.lite.html.hook.php';?>
@@ -0,0 +1,66 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
if(!isset($type)) $type = 'today';
if(!isset($period)) $period = 'today';
$date = isset($date) ? $date : helper::today();
echo "<div class='input-control w-120px'>" . $userList . "</div>";
$methodName = $this->app->getMethodName();
$label = "<span class='text'>{$lang->user->schedule}</span>";
if($this->config->edition != 'open' and common::hasPriv('user', 'todocalendar'))
{
$link = $this->createLink('user', 'todocalendar', "userID={$user->id}");
}
elseif($this->config->edition != 'open' and common::hasPriv('user', 'effortcalendar'))
{
$link = $this->createLink('user', 'effortcalendar', "userID={$user->id}");
}
elseif(common::hasPriv('user', 'todo'))
{
$link = $this->createLink('user', 'todo', "userID={$user->id}");
}
elseif(common::hasPriv('user', 'effort'))
{
$link = $this->createLink('user', 'effort', "userID={$user->id}");
}
if($link)
{
$active = '';
if($methodName == 'todocalendar' or $methodName == 'todo' or $methodName == 'effortcalendar' or $methodName == 'effort') $active = ' btn-active-text';
echo html::a($link, $label, '', "class='btn btn-link $active todoTab'");
}
$label = "<span class='text'>{$lang->user->task}</span>";
$active = $methodName == 'task' ? ' btn-active-text' : '';
common::printLink('user', 'task', "userID={$user->id}", $label, '', "class='btn btn-link $active taskTab'");
$label = "<span class='text'>{$lang->SRCommon}</span>";
$active = ($methodName == 'story' and $storyType == 'story') ? ' btn-active-text' : '';
common::printLink('user', 'story', "userID={$user->id}&storyType=story", $label, '', "class='btn btn-link $active SRTab'");
if($this->config->systemMode == 'new')
{
$label = "<span class='text'>{$lang->user->execution}</span>";
$active = $methodName == 'execution' ? ' btn-active-text' : '';
common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active executionTab'");
}
$label = "<span class='text'>{$lang->user->dynamic}</span>";
$active = $methodName == 'dynamic' ? ' btn-active-text' : '';
common::printLink('user', 'dynamic', "userID={$user->id}&type=today", $label, '', "class='btn btn-link $active dynamicTab'");
$label = "<span class='text'>{$lang->user->profile}</span>";
$active = $methodName == 'profile' ? ' btn-active-text' : '';
common::printLink('user', 'profile', "userID={$user->id}", $label, '', "class='btn btn-link $active profileTab'");
?>
</div>
<div class='actions'></div>
</div>
<script>
var type = '<?php echo $type;?>';
var period = '<?php echo $period;?>';
</script>
@@ -1,6 +0,0 @@
<script>
$('#mainMenu .btn-toolbar > a[href*="bug"], a[href*="testtask"], a[href*="testcase"], a[href*="issue"], a[href*="risk"], a[href*="requirement"]').remove();
<?php if($this->config->edition != 'open' and common::hasPriv('user', 'todocalendar')):?>
$('#mainMenu .btn-toolbar > a:first[href*="todo"]').attr('href', createLink('user', 'todocalendar', 'userID=<?php echo $user->id?>'));
<?php endif;?>
</script>
@@ -1 +0,0 @@
<?php include dirname(__FILE__) . '/featurebar.lite.html.hook.php';?>
@@ -1 +0,0 @@
<?php include dirname(__FILE__) . '/featurebar.lite.html.hook.php';?>
@@ -1 +0,0 @@
<?php include dirname(__FILE__) . '/featurebar.lite.html.hook.php';?>
@@ -1 +0,0 @@
<?php include dirname(__FILE__) . '/featurebar.lite.html.hook.php';?>
@@ -1 +0,0 @@
<?php include dirname(__FILE__) . '/featurebar.lite.html.hook.php';?>
+3 -2
View File
@@ -416,12 +416,13 @@ class baseControl
$moduleName = basename(dirname(dirname(realpath($viewFile))));
$extPath = $this->app->getModuleExtPath('', $moduleName, 'view');
$checkedOrder = array('site', 'common', 'xuan', 'vision', 'custom');
$checkedOrder = array('site', 'custom', 'vision', 'xuan', 'common');
$fileName = basename($viewFile);
foreach($checkedOrder as $checkedType)
{
if(!empty($extPath[$checkedType]))
{
$extViewFile = $extPath[$checkedType] . basename($viewFile);
$extViewFile = $extPath[$checkedType] . $fileName;
if(file_exists($extViewFile))
{
helper::cd($extPath[$checkedType]);
+12 -12
View File
@@ -10,60 +10,60 @@
$label = "<span class='text'>{$lang->user->schedule}</span>";
$active = $methodName == 'todo' ? ' btn-active-text' : '';
common::printLink('user', 'todo', "userID={$user->id}&type=all", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'todo', "userID={$user->id}&type=all", $label, '', "class='btn btn-link $active todoTab'");
$label = "<span class='text'>{$lang->user->task}</span>";
$active = $methodName == 'task' ? ' btn-active-text' : '';
common::printLink('user', 'task', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'task', "userID={$user->id}", $label, '', "class='btn btn-link $active taskTab'");
if($config->URAndSR)
{
$label = "<span class='text'>{$lang->URCommon}</span>";
$active = ($methodName == 'story' and $storyType == 'requirement') ? ' btn-active-text' : '';
common::printLink('user', 'story', "userID={$user->id}&storyType=requirement", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'story', "userID={$user->id}&storyType=requirement", $label, '', "class='btn btn-link $active URTab'");
}
$label = "<span class='text'>{$lang->SRCommon}</span>";
$active = ($methodName == 'story' and $storyType == 'story') ? ' btn-active-text' : '';
common::printLink('user', 'story', "userID={$user->id}&storyType=story", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'story', "userID={$user->id}&storyType=story", $label, '', "class='btn btn-link $active SRTab'");
$label = "<span class='text'>{$lang->user->bug}</span>";
$active = $methodName == 'bug' ? ' btn-active-text' : '';
common::printLink('user', 'bug', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'bug', "userID={$user->id}", $label, '', "class='btn btn-link $active bugTab'");
$label = "<span class='text'>{$lang->user->testTask}</span>";
$active = $methodName == 'testtask' ? ' btn-active-text' : '';
common::printLink('user', 'testtask', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'testtask', "userID={$user->id}", $label, '', "class='btn btn-link $active testtaskTab'");
$label = "<span class='text'>{$lang->user->testCase}</span>";
$active = $methodName == 'testcase' ? ' btn-active-text' : '';
common::printLink('user', 'testcase', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'testcase', "userID={$user->id}", $label, '', "class='btn btn-link $active testcaseTab'");
if($this->config->systemMode == 'new')
{
$label = "<span class='text'>{$lang->user->execution}</span>";
$active = $methodName == 'execution' ? ' btn-active-text' : '';
common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active executionTab'");
}
if($this->config->edition == 'max')
{
$label = "<span class='text'>{$lang->user->issue}</span>";
$active = $methodName == 'issue' ? ' btn-active-text' : '';
common::printLink('user', 'issue', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'issue', "userID={$user->id}", $label, '', "class='btn btn-link $active issueTab'");
$label = "<span class='text'>{$lang->user->risk}</span>";
$active = $methodName == 'risk' ? ' btn-active-text' : '';
common::printLink('user', 'risk', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'risk', "userID={$user->id}", $label, '', "class='btn btn-link $active riskTab'");
}
$label = "<span class='text'>{$lang->user->dynamic}</span>";
$active = $methodName == 'dynamic' ? ' btn-active-text' : '';
common::printLink('user', 'dynamic', "userID={$user->id}&type=today", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'dynamic', "userID={$user->id}&type=today", $label, '', "class='btn btn-link $active dynamicTab'");
$label = "<span class='text'>{$lang->user->profile}</span>";
$active = $methodName == 'profile' ? ' btn-active-text' : '';
common::printLink('user', 'profile', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'profile', "userID={$user->id}", $label, '', "class='btn btn-link $active profileTab'");
?>
</div>
</div>