Conflicts:
	module/tutorial/control.php
	module/tutorial/view/index.html.php
This commit is contained in:
Catouse
2016-04-25 11:44:41 +08:00
11 changed files with 39 additions and 32 deletions
+15
View File
@@ -248,4 +248,19 @@ class custom extends control
$this->display();
}
}
/**
* Ajax restore menu.
*
* @param string $confirm
* @access public
* @return void
*/
public function ajaxRestoreMenu($confirm = 'no')
{
if($confirm == 'no') die(js::confirm($this->lang->custom->confirmRestore, inlink('ajaxRestoreMenu', "confirm=yes")));
$this->loadModel('setting')->deleteItems("owner={$this->app->user->account}&module=common&section=menucustom");
die(js::reload('parent.parent'));
}
}
+2 -1
View File
@@ -7,6 +7,7 @@ $lang->custom->key = 'Key';
$lang->custom->value = 'Value';
$lang->custom->flow = 'Flow';
$lang->custom->select = 'Select flow:';
$lang->custom->branch = 'Multi branch';
$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Task';
@@ -63,7 +64,7 @@ $lang->custom->user->fields['statusList'] = 'Status';
$lang->custom->currentLang = 'For current language';
$lang->custom->allLang = 'For all language';
$lang->custom->confirmRestore = 'Are you sure to restore the default lang setting?';
$lang->custom->confirmRestore = 'Are you sure to restore the default setting?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = 'The length of key must be less than 20!';
+2 -1
View File
@@ -7,6 +7,7 @@ $lang->custom->key = '键';
$lang->custom->value = '值';
$lang->custom->flow = '流程';
$lang->custom->select = '请选择流程:';
$lang->custom->branch = '多分支';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任务';
@@ -63,7 +64,7 @@ $lang->custom->user->fields['statusList'] = '状态';
$lang->custom->currentLang = '适用当前语言';
$lang->custom->allLang = '适用所有语言';
$lang->custom->confirmRestore = '是否要恢复默认语言配置?';
$lang->custom->confirmRestore = '是否要恢复默认配置?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
+3 -2
View File
@@ -246,8 +246,9 @@ class customModel extends model
if(!empty($menuConfig)) $menuConfig = json_decode($menuConfig);
if(!isset($menuConfig) && common::inNoviceMode()) $menuConfig = $config->menu->$module['novice'];
$allMenu = $module == 'main' ? $lang->menu : $lang->$module->menu;
$menu = self::buildMenuConfig($allMenu, $menuConfig);
$allMenu = $module == 'main' ? $lang->menu : (isset($lang->$module->menu) ? $lang->$module->menu : $lang->my->menu);
if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch);
$menu = self::buildMenuConfig($allMenu, $menuConfig);
$app->customMenu[$module] = $menu;
return $menu;
+2 -1
View File
@@ -32,7 +32,8 @@
</div>
<div class='text-center'>
<button id='saveMenuBtn' type='button' class='btn btn-primary'><?php echo $lang->save ?></button> &nbsp;
<button id='closeModalBtn' type='button' class='btn'><?php echo $lang->close ?></button>
<button id='closeModalBtn' type='button' class='btn'><?php echo $lang->close ?></button> &nbsp;
<?php echo html::a(inlink('ajaxRestoreMenu'), $lang->custom->restore, 'hiddenwin', "class='btn'")?>
</div>
</div>
</div>
+1 -20
View File
@@ -33,26 +33,7 @@ class my extends control
*/
public function index()
{
$account = $this->app->user->account;
/* Get project and product stats. */
$projectStats = $this->loadModel('project')->getProjectStats();
$productStats = $this->loadModel('product')->getStats();
/* Set the dynamic pager. */
$this->app->loadClass('pager', true);
$pager = new pager($recTotal = 1000, $this->config->my->dynamicCounts); // Init the $recTotal var, thus omit one sql query.
$this->view->projectStats = $projectStats;
$this->view->productStats = $productStats;
$this->view->actions = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager);
$this->view->todos = $this->loadModel('todo')->getList('all', $account, 'wait, doing', $this->config->my->todoCounts);
$this->view->tasks = $this->loadModel('task')->getUserTasks($account, 'assignedTo', $this->config->my->taskCounts);
$this->view->bugs = $this->loadModel('bug')->getUserBugPairs($account, false, $this->config->my->bugCounts);
$this->view->stories = $this->loadModel('story')->getUserStoryPairs($account, $this->config->my->storyCounts);
$this->view->users = $this->loadModel('user')->getPairs('noletter|withguest');
$this->view->title = $this->lang->my->common;
$this->view->title = $this->lang->my->common;
$this->display();
}
+2
View File
@@ -1260,6 +1260,8 @@ class project extends control
}
$this->view->title = $this->lang->project->tree;
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
$this->view->position[] = $this->lang->project->tree;
$this->view->project = $project;
$this->view->projectID = $projectID;
$this->view->level = $type;
+2
View File
@@ -5,6 +5,8 @@
#hideButton span{padding:2px 10px; background:url(theme/default/images/main/zt-icons.png) -100px -161px;}
#featurebar .f-right .icon-green-task-import {padding:2px 8px; background:url(theme/default/images/main/zt-icons.png) 0px -82px;}
.sub-featurebar #querybox {margin:0px;}
.sub-featurebar #bysearchTab.active {padding:0px;}
.sub-featurebar #bysearchTab.active:hover {background:#fff;}
.dropdown-menu.with-search {padding-bottom: 34px; min-width: 150px; overflow: hidden; max-height: 305px}
.dropdown-menu > .menu-search {padding: 0; position: absolute; z-index: 0; bottom: 0; left: 0; right: 0}
+2 -1
View File
@@ -1,5 +1,6 @@
.outer > #titlebar {display: none}
.btn-file {float:right}
.table > thead > tr > th {vertical-align: middle;}
.btn-file {float:right; padding: 0px 5px!important}
.fix-border td {border:0px;}
.fix-position td {vertical-align: middle;}
+5 -3
View File
@@ -42,12 +42,14 @@
<td class='w-180px'><?php echo $result->date;?></td>
<td><?php echo $users[$result->lastRunner] . ' ' . $lang->testtask->runCase;?></td>
<td class='w-150px'><?php echo zget($builds, $result->build, '');?></td>
<td class='w-50px'><?php if(!empty($result->files)) echo html::a("#caseResult{$result->id}", '<i class="icon icon-file"></i>', '', "data-toggle='modal' title='{$lang->files}' data-type='iframe'")?></td>
<td class='w-50px text-right'><strong class='text-<?php echo $class;?>'><?php echo $lang->testcase->resultList[$result->caseResult]?></strong></td>
<?php if(!empty($result->files)):?>
<td class='w-20px'><?php echo html::a("#caseResult{$result->id}", '<i class="btn-icon icon-file"></i>', '', "data-toggle='modal' title='{$lang->files}' data-type='iframe'")?></td>
<?php endif;?>
<td class='w-50px text-center'><i class='collapse-handle icon-chevron-down text-muted'></i></td>
</tr>
<tr class='result-detail hide'>
<td colspan='7' class='pd-0'>
<td colspan='<?php echo empty($result->files) ? 6 : 7?>' class='pd-0'>
<table class='table table-condensed borderless mg-0'>
<thead>
<tr>
@@ -71,7 +73,7 @@
<td class='<?php echo $stepResult['result'];?> text-center'><?php echo $lang->testcase->resultList[$stepResult['result']];?></td>
<td>
<?php echo $stepResult['real'];?>
<?php if(!empty($stepResult['files'])) echo html::a("#stepResult{$modalID}", '<i class="icon icon-file"></i>', '', "data-toggle='modal' title='{$lang->files}' data-type='iframe' style='float:right'")?>
<?php if(!empty($stepResult['files'])) echo html::a("#stepResult{$modalID}", '<i class="btn-icon icon-file"></i>', '', "data-toggle='modal' title='{$lang->files}' data-type='iframe' style='float:right'")?>
</td>
</tr>
<?php else:?>
+3 -3
View File
@@ -25,7 +25,7 @@
<tr>
<td colspan='5' style='word-break: break-all;'><strong><?php echo $lang->testcase->precondition;?></strong> <?php echo $run->case->precondition;?></td>
</tr>
<tr class='fix-position'>
<tr>
<th class='w-40px'><?php echo $lang->testcase->stepID;?></th>
<th class='w-p30'><?php echo $lang->testcase->stepDesc;?></th>
<th class='w-p30'><?php echo $lang->testcase->stepExpect;?></th>
@@ -33,7 +33,7 @@
<th>
<?php echo $lang->testcase->real;?>
<?php if(empty($run->case->steps)):?>
<button type='button' class='btn-file' data-toggle='modal' data-target='#fileModal'><?php echo $lang->testtask->files;?></button>
<button type='button' class='btn btn-file' data-toggle='modal' data-target='#fileModal'><?php echo $lang->testtask->files;?></button>
<?php endif;?>
</th>
</tr>
@@ -49,7 +49,7 @@
<table class='fix-border fix-position'>
<tr>
<td><?php echo html::textarea("reals[$step->id]", '', "rows=2 class='form-control fix-textarea'");?></td>
<td><button type='button' title='<?php echo $lang->testtask->files?>' class='btn-file' data-toggle='modal' data-target='#fileModal<?php echo $step->id?>'><i class='icon icon-paper-clip'></i></button></td>
<td><button type='button' title='<?php echo $lang->testtask->files?>' class='btn btn-file' data-toggle='modal' data-target='#fileModal<?php echo $step->id?>'><i class='icon icon-paper-clip'></i></button></td>
</tr>
</table>
</td>