Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2016-11-15 15:53:00 +08:00
11 changed files with 127 additions and 53 deletions
+24 -12
View File
@@ -62,18 +62,30 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
</div>
</div>
<div class='btn-group'>
<?php
common::printIcon('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID");
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams"), "<i class='icon-plus'></i> {$lang->bug->create}",'', "class='btn btn-bug-create'");
}
else
{
common::printIcon('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", 'btn', 'button', 'plus', '', 'btn-bug-create');
}
?>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->bug->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createBugActionMenu'>
<?php
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams"), $lang->bug->create);
}
else
{
$misc = common::hasPriv('bug', 'create') ? '' : "class=disabled";
$link = common::hasPriv('bug', 'create') ? $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->bug->create, '', $misc) . "</li>";
}
$misc = common::hasPriv('bug', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('bug', 'batchCreate') ? $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->bug->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
+1
View File
@@ -74,6 +74,7 @@ $lang->tutorialConfirm = 'You are using tutorial. Do you want to exit right now
$lang->preShortcutKey = '[Shortcut:←]';
$lang->nextShortcutKey = '[Shortcut:→]';
$lang->backShortcutKey = '[Shortcut:Alt+↑]';
$lang->select = 'Select';
$lang->selectAll = 'Select All';
+1
View File
@@ -74,6 +74,7 @@ $lang->tutorialConfirm = '检测到你尚未退出新手教程模式,是否现
$lang->preShortcutKey = '[快捷键:←]';
$lang->nextShortcutKey = '[快捷键:→]';
$lang->backShortcutKey = '[快捷键:Alt+↑]';
$lang->select = '选择';
$lang->selectAll = '全选';
+2 -1
View File
@@ -828,7 +828,8 @@ class commonModel extends model
global $lang, $app;
if(isonlybody()) return false;
echo html::a($backLink, '<i class="icon-goback icon-level-up icon-large icon-rotate-270"></i>', '', "class='btn' title={$lang->goback}");
$title = $lang->goback . $lang->backShortcutKey;
echo html::a($backLink, '<i class="icon-goback icon-level-up icon-large icon-rotate-270"></i>', '', "id='back' class='btn' title={$title}");
if(isset($preAndNext->pre) and $preAndNext->pre)
{
+24 -12
View File
@@ -56,18 +56,30 @@
<?php common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", '', 'button', 'bar-chart'); ?>
</div>
<div class='btn-group'>
<?php
common::printIcon('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID", '', 'button', 'plus-sign');
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
echo html::a($this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams"), "<i class='icon-plus'></i> {$lang->story->create}",'', "class='btn create-story-btn'");
}
else
{
common::printIcon('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID", 'btn', 'button', 'plus', '', 'create-story-btn');
}
?>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->story->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createStoryActionMenu'>
<?php
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
echo "<li>" . html::a($this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams"), $lang->story->create) . "</li>";
}
else
{
$misc = common::hasPriv('story', 'create') ? '' : "class=disabled";
$link = common::hasPriv('story', 'create') ? $this->createLink('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->story->create, '', $misc) . "</li>";
}
$misc = common::hasPriv('story', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->story->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
+16 -2
View File
@@ -91,12 +91,26 @@ class productplanModel extends model
public function getPairs($product = 0, $branch = 0, $expired = '')
{
$date = date('Y-m-d');
return array('' => '') + $this->dao->select('id,CONCAT(title, " [", begin, " ~ ", end, "]") as title')->from(TABLE_PRODUCTPLAN)
$plans = $this->dao->select('id,CONCAT(title, " [", begin, " ~ ", end, "]") as title')->from(TABLE_PRODUCTPLAN)
->where('product')->in($product)
->andWhere('deleted')->eq(0)
->beginIF($branch)->andWhere("branch")->in("0,$branch")->fi()
->beginIF($expired == 'unexpired')->andWhere('end')->gt($date)->fi()
->orderBy('begin desc')->fetchPairs();
->orderBy('begin desc')
->fetchPairs();
if($expired == 'unexpired' and empty($plans))
{
$plans = $this->dao->select('id,CONCAT(title, " [", begin, " ~ ", end, "]") as title')->from(TABLE_PRODUCTPLAN)
->where('product')->in($product)
->andWhere('deleted')->eq(0)
->beginIF($branch)->andWhere("branch")->in("0,$branch")->fi()
->orderBy('begin desc')
->limit(5)
->fetchPairs();
}
return array('' => '') + $plans;
}
/**
+17 -4
View File
@@ -121,10 +121,23 @@
</div>
</div>
<div class='btn-group'>
<?php
common::printIcon('task', 'batchCreate', "projectID=$projectID");
common::printIcon('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''), '', 'button', 'sitemap');
?>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->task->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createTaskActionMenu'>
<?php
$misc = common::hasPriv('task', 'create') ? '' : "class=disabled";
$link = common::hasPriv('task', 'create') ? $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')) : '#';
echo "<li>" . html::a($link, $lang->task->create, '', $misc) . "</li>";
$misc = common::hasPriv('task', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('task', 'batchCreate') ? $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')) : '#';
echo "<li>" . html::a($link, $lang->task->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
+10 -10
View File
@@ -126,25 +126,25 @@ $lang->task->reasonList[''] = '';
$lang->task->reasonList['done'] = 'Done';
$lang->task->reasonList['cancel'] = 'Cancelled';
$lang->task->afterChoices['continueAdding'] = 'Contine Add Task';
$lang->task->afterChoices['continueAdding'] = 'Continue adding Tasks';
$lang->task->afterChoices['toTaskList'] = 'Back to Task List';
$lang->task->afterChoices['toStoryList'] = 'Back to Story List';
$lang->task->legendBasic = 'Basic Info';
$lang->task->legendEffort = 'Man-Hour';
$lang->task->legendLife = 'Task Life';
$lang->task->legendDesc = 'Task Desn';
$lang->task->legendDesc = 'Task Desc';
$lang->task->confirmDelete = "Do you want to delete this Task?";
$lang->task->confirmDeleteEstimate = "Do you want to delete it?";
$lang->task->copyStoryTitle = "Same Story";
$lang->task->afterSubmit = "After Created";
$lang->task->afterSubmit = "After Created,";
$lang->task->successSaved = "Created!";
$lang->task->delayWarning = " <strong class='delayed f-14px'> Delay %s days </strong>";
$lang->task->remindBug = "This Task is converted from a Bug. Do you want to update te Bug:%s?";
$lang->task->confirmChangeProject = "If you change {$lang->projectCommon}, the related Module,Story and Assignor will be changed. Do you want to do it?";
$lang->task->confirmFinish = '"Estimated Left" is 0. Do you want to change the Status to "Done"?';
$lang->task->confirmRecord = '"Left" is 0. Do you want to set Task as "Done"?';
$lang->task->confirmChangeProject = "If you change {$lang->projectCommon}, the related Module, Story and Assignor will be changed. Do you want to do it?";
$lang->task->confirmFinish = '"Estimated reamin hour" is 0. Do you want to change the Status to "Done"?';
$lang->task->confirmRecord = '"Remain hour" is 0. Do you want to set Task as "Done"?';
$lang->task->noticeSaveRecord = 'Your man-hour is not saved. Please save it first.';
$lang->task->commentActions = '%s. %s, commented by <strong>%s</strong>.';
@@ -206,11 +206,11 @@ $lang->task->report->tasksPerType->item = 'Type';
$lang->task->report->tasksPerPri->item = 'Priority';
$lang->task->report->tasksPerStatus->item = 'Status';
$lang->task->report->tasksPerDeadline->item = 'Date';
$lang->task->report->tasksPerEstimate->item = '预计';
$lang->task->report->tasksPerLeft->item = '剩余';
$lang->task->report->tasksPerConsumed->item = '消耗';
$lang->task->report->tasksPerEstimate->item = 'Est.';
$lang->task->report->tasksPerLeft->item = 'Reamin';
$lang->task->report->tasksPerConsumed->item = 'Consume';
$lang->task->report->tasksPerFinishedBy->item = 'User';
$lang->task->report->tasksPerClosedReason->item = '原因';
$lang->task->report->tasksPerClosedReason->item = 'Reason';
$lang->task->report->finishedTasksPerDay->item = 'Date';
$lang->task->report->tasksPerProject->graph = new stdclass();
+20 -7
View File
@@ -76,13 +76,26 @@
?>
</ul>
</div>
<?php
common::printIcon('testcase', 'import', "productID=$productID&branch=$branch", '', 'button', '', '', 'export cboxElement iframe');
$initModule = isset($moduleID) ? (int)$moduleID : 0;
common::printIcon('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
common::printIcon('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
?>
<?php common::printIcon('testcase', 'import', "productID=$productID&branch=$branch", '', 'button', '', '', 'export cboxElement iframe');?>
</div>
<div class='btn-group'>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->testcase->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createCaseActionMenu'>
<?php
$initModule = isset($moduleID) ? (int)$moduleID : 0;
$misc = common::hasPriv('testcase', 'create') ? '' : "class=disabled";
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
echo "<li>" . html::a($link, $lang->testcase->create, '', $misc) . "</li>";
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
+5 -5
View File
@@ -33,17 +33,17 @@ $lang->tree->dragAndSort = "Drag and Sort";
$lang->tree->addChild = "Add Child Module";
$lang->tree->confirmDelete = 'Do you want to delete this Module and its Child?';
$lang->tree->confirmRoot = "Modify the module {$lang->productCommon}s, modified the {$lang->productCommon}s belong to the needs of the module, bug, use case, and {$lang->projectCommon} and {$lang->productCommon} relationship. This is dangerous, please be careful. To confirm the change?";
$lang->tree->successSave = 'Successfully saved';
$lang->tree->successFixed = 'Successfully fixed.';
$lang->tree->repeatName = 'The name "%s" has exists!';
$lang->tree->confirmRoot = "Changes on {$lang->productCommon} will change the Story, Bug, Case of {$lang->productCommon} it belongs to, as well as the realtion of {$lang->projectCommon} and {$lang->productCommon}, which is dangerous, please be aware of it. Do you want to change?";
$lang->tree->successSave = 'Saved.';
$lang->tree->successFixed = 'Fixed.';
$lang->tree->repeatName = 'The name "%s" has existed!';
$lang->tree->name = 'Name';
$lang->tree->parent = 'Parent';
$lang->tree->child = 'Child';
$lang->tree->owner = 'Owner';
$lang->tree->order = 'Order';
$lang->tree->short = 'Sort';
$lang->tree->short = 'Short';
$lang->tree->all = 'All Modules';
$lang->tree->projectDoc = "{$lang->projectCommon} Doc";
$lang->tree->product = $lang->productCommon;
+7
View File
@@ -1684,6 +1684,13 @@ function initHotKey()
return false;
});
/* Alt+up, go back to the previous page. */
$(document).bind('keydown', 'Alt+up', function(evt)
{
backLink = ($('#back').attr("href"));
if(typeof(backLink) != 'undefined') location.href = backLink;
});
/* left, go to pre object. */
$(document).bind('keydown', 'left', function(evt)
{