This commit is contained in:
滔哥
2018-05-31 15:04:24 +08:00
21 changed files with 69 additions and 56 deletions
+1 -1
View File
@@ -50,7 +50,7 @@
$methodName = 'libview';
$module = 'testsuite';
}
if($module == 'doclib' or $module == 'module')
if(strpos(',doclib,module,webhook,', ",{$module},") !== false)
{
echo $action->objectName;
}
+3 -1
View File
@@ -10,13 +10,15 @@
* @link http://www.zentao.net
*/
?>
<?php if($block->block != 'welcome' and $block->block != 'flowchart' and $block->block != 'statistic'):?>
<div class='form-group'>
<label for='title' class='col-sm-3'><?php echo $lang->block->name?></label>
<div class='col-sm-7'><?php echo html::input('title', $block ? $block->title : '', "class='form-control' autocomplete='off'")?></div>
</div>
<?php endif;?>
<div class='form-group'>
<label for='grid' class='col-sm-3'><?php echo $lang->block->grid;?></label>
<div class='col-sm-7'>
<?php echo html::select('grid', $lang->block->gridOptions, $block ? $block->grid : 8, "class='form-control chosen'")?>
</div>
</div>
</div>
+1 -1
View File
@@ -20,7 +20,7 @@ if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile;
<hrgroup id='heading'>
<?php if(empty($this->config->sso->redirect)):?>
<?php $heading = sprintf($lang->welcome, $app->company->name);?>
<h1 id='companyname' title='<?php echo $heading . strlen($heading);?>'<?php if(strlen($heading) > 36) echo " class='long-name'" ?>><?php echo $heading;?></h1>
<h1 id='companyname' title='<?php echo $heading . strlen($heading);?>'<?php if(strlen($heading) > 36) echo " class='long-name'" ?>><?php echo html::a(helper::createLink('index'), $heading);?></h1>
<?php endif;?>
</hrgroup>
<nav id='navbar'><?php commonModel::printMainmenu($this->moduleName);?></nav>
+23 -19
View File
@@ -19,28 +19,32 @@ js::set('params', $params);
js::set('uid', $uid);
?>
<style>
#uploader{padding: 20px;}
#uploader > span{display:block; margin-bottom:10px; color: #29a8cd;}
#uploader .uploader-files {border-bottom: 1px solid #e5e5e5; margin: 0 0 10px 0; min-height: 164px;}
.file-list .file[data-status=queue] .file-status>.icon:before {content: '\e92b'}
.uploader-files .file-status > .icon:before, .file-list .file-status > .icon:before {content: '\e92f'}
</style>
<div class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->file->uploadImages;?></h2>
</div>
<div class='uploader' id='uploader' data-url='<?php echo inlink('uploadImages', "module=$module&params=$params&uid=$uid");?>'>
<div class='uploader-message text-center'>
<div class='content'></div>
<button type='button' class='close'>×</button>
</div>
<div class='uploader-files file-list file-list-grid' data-drag-placeholder="<?php echo $lang->file->dragFile;?>"></div>
<hr/>
<span><?php echo $this->lang->file->uploadImagesExplain?></span>
<div class='uploader-footer'>
<div class='uploader-status pull-right text-muted'></div>
<button type='button' class='btn btn-primary uploader-btn-browse'><i class='icon icon-plus'></i><?php echo $lang->file->addFile;?></button>
<button type='button' class='btn btn-success uploader-btn-start'><i class='icon icon-cloud-upload'></i><?php echo $lang->file->beginUpload;?></button>
<main id='main'>
<div class='container'>
<div id='mainContent'>
<div class='main-header'>
<h2><?php echo $lang->file->uploadImages;?></h2>
</div>
<div class='uploader' id='uploader' data-url='<?php echo inlink('uploadImages', "module=$module&params=$params&uid=$uid");?>'>
<div class='uploader-message text-center'>
<div class='content'></div>
<button type='button' class='close'>×</button>
</div>
<div class='uploader-files file-list file-list-grid' data-drag-placeholder="<?php echo $lang->file->dragFile;?>"></div>
<div class='text-info space-sm'><?php echo $this->lang->file->uploadImagesExplain?></div>
<div class='uploader-footer'>
<div class='uploader-status pull-right text-muted'></div>
<button type='button' class='btn btn-secondary uploader-btn-browse btn-wide'><i class='icon icon-plus'></i><?php echo $lang->file->addFile;?></button> &nbsp;
<button type='button' class='btn btn-primary uploader-btn-start btn-wide'><i class='icon icon-arrow-up'></i><?php echo $lang->file->beginUpload;?></button>
</div>
</div>
</div>
</div>
</div>
</main>
<script>
$('#uploader').uploader({
onUploadComplete:function()
+1 -1
View File
@@ -40,7 +40,7 @@
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line"), $lang->tree->manageLine, '_blank');
echo '&nbsp; ';
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh, "class='refresh'");
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh, '', "class='refresh'");
echo '</span>';
}
?>
+1 -1
View File
@@ -19,7 +19,7 @@
<?php echo $this->fetch('block', 'dashboard', 'module=product');?>
<?php endif;?>
<script>
<?php if($this->config->product->homepage != 'index'):?>
<?php if(isset($this->config->product->homepage) && $this->config->product->homepage != 'index'):?>
$(function()
{
$('#modulemenu .nav li.right:last').after("<li class='right'><a style='font-size:12px' href='javascript:setHomepage(\"product\", \"index\")'><i class='icon icon-cog'></i> <?php echo $lang->homepage?></a></li>")
+1 -1
View File
@@ -27,7 +27,7 @@
<?php echo ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? $lang->productplan->future : $plan->begin . '~' . $plan->end;?>
</span>
<?php if($plan->deleted):?>
<span class='label label-danger'><?php echo $lang->plan->deleted;?></span>
<span class='label label-danger'><?php echo $lang->product->deleted;?></span>
<?php endif; ?>
</div>
</div>
+4 -1
View File
@@ -31,4 +31,7 @@
#kanban .table-grouped tbody > tr:hover {background: transparent;}
#kanban .c-boards, #kanban td.c-side {border-bottom: 1px solid #eee;}
#kanban .group-info > span + span {display: inline-block; margin-left: 8px;}
#kanban th.c-board {color: #3c4353; font-weight: bold;}
#kanban th.c-board {color: #3c4353; font-weight: bold;}
#kanban .fix-table-copy-wrapper {overflow: visible!important;}
#kanban .fix-table-copy-wrapper th.c-board {color: #eee;}
#kanban .fix-table-copy-wrapper th.c-board .btn-link {color: #fff;}
+2
View File
@@ -33,4 +33,6 @@
#kanban .c-boards, #kanban td.c-side {border-bottom: 1px solid #eee;}
#kanban .group-info > span + span {display: inline-block; margin-left: 8px;}
#kanban th.c-board {color: #3c4353; font-weight: bold;}
#kanban .fix-table-copy-wrapper {overflow: visible!important;}
#kanban .fix-table-copy-wrapper th.c-board {color: #eee;}
.story-estimate{margin-right: 5px;}
+2 -2
View File
@@ -70,7 +70,7 @@
?>
</div>
</div>
<div class="main-table" data-ride="table" data-checkable="false" data-group="true">
<div id='tasksTable' class='main-table' data-ride='table' data-checkable='false' data-group='true' data-hot='true'>
<table class="table table-grouped text-center">
<thead>
<tr class="<?php if($allCount) echo 'divider';?>">
@@ -96,7 +96,7 @@
<th class="c-pri"><?php echo $lang->priAB;?></th>
<th class="c-name"><?php echo $lang->task->name;?></th>
<th class="c-status"><?php echo $lang->task->status;?></th>
<th class="c-assign"><?php echo $lang->task->assignedTo;?></th>
<th class="c-assign text-left"><?php echo $lang->task->assignedTo;?></th>
<th class="c-user"><?php echo $lang->task->finishedBy;?></th>
<th class="c-hours"><?php echo $lang->task->estimateAB;?></th>
<th class="c-hours"><?php echo $lang->task->consumedAB;?></th>
+10 -1
View File
@@ -105,8 +105,12 @@
<script>
$(function()
{
var imageTitles = <?php echo json_encode($titles);?>;
var storyTitles = <?php echo json_encode(array_keys($titles));?>;
$('#batchCreateForm').batchActionForm(
{
idEnd: <?php echo max(count($titles), 9)?>,
rowCreator: function($row, index)
{
$row.find('select').each(function()
@@ -119,7 +123,12 @@ $(function()
{
$select.next('.chosen-container').find('.chosen-drop').width($select.closest('td').width() + 50);
}, 200);
});
});
var storyTitle = storyTitles && storyTitles[index];
if (storyTitle && storyTitle.length)
{
$row.find('.input-story-title').val(storyTitle).after('<input type="hidden" name="uploadImage[' + index + ']" id="uploadImage[' + index + ']" value="' + imageTitles[storyTitle] + '">');
}
}
});
});
+3 -3
View File
@@ -84,17 +84,17 @@ $config->task->datatable->fieldList['status']['required'] = 'no';
$config->task->datatable->fieldList['estimate']['title'] = 'estimateAB';
$config->task->datatable->fieldList['estimate']['fixed'] = 'no';
$config->task->datatable->fieldList['estimate']['width'] = '70';
$config->task->datatable->fieldList['estimate']['width'] = '60';
$config->task->datatable->fieldList['estimate']['required'] = 'no';
$config->task->datatable->fieldList['consumed']['title'] = 'consumedAB';
$config->task->datatable->fieldList['consumed']['fixed'] = 'no';
$config->task->datatable->fieldList['consumed']['width'] = '70';
$config->task->datatable->fieldList['consumed']['width'] = '60';
$config->task->datatable->fieldList['consumed']['required'] = 'no';
$config->task->datatable->fieldList['left']['title'] = 'leftAB';
$config->task->datatable->fieldList['left']['fixed'] = 'no';
$config->task->datatable->fieldList['left']['width'] = '70';
$config->task->datatable->fieldList['left']['width'] = '60';
$config->task->datatable->fieldList['left']['required'] = 'no';
$config->task->datatable->fieldList['progress']['title'] = 'progress';
+2 -4
View File
@@ -2241,10 +2241,8 @@ class taskModel extends model
if($id == 'id') $class .= ' cell-id';
if($id == 'name') $class .= ' text-left';
if($id == 'deadline' and isset($task->delay)) $class .= ' delayed';
if($id == 'assignedTo')
{
$class .= ' has-btn text-left';
}
if($id == 'assignedTo') $class .= ' has-btn text-left';
if(strpos('consumed,left,progress', $id) !== false) $class .= ' text-right';
$title = '';
if($id == 'name')
+2 -2
View File
@@ -48,7 +48,7 @@
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control w-p98'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center'>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
<?php echo html::linkButton($lang->goback, $this->session->taskList);?>
</td>
@@ -56,7 +56,7 @@
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
<?php include '../../common/view/action.html.php';?>
<?php endif;?>
</div>
</div>
+1 -1
View File
@@ -204,6 +204,6 @@ $config->testcase->datatable->fieldList['stepNumber']['name'] = $lang->testc
$config->testcase->datatable->fieldList['actions']['title'] = 'actions';
$config->testcase->datatable->fieldList['actions']['fixed'] = 'right';
$config->testcase->datatable->fieldList['actions']['width'] = '160';
$config->testcase->datatable->fieldList['actions']['width'] = '190';
$config->testcase->datatable->fieldList['actions']['required'] = 'yes';
$config->testcase->datatable->fieldList['actions']['sort'] = 'no';
+1 -9
View File
@@ -1393,17 +1393,9 @@ class testcaseModel extends model
break;
}
echo "<div class='more'>";
if($this->config->testcase->needReview or !empty($this->config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'glasses', '', 'iframe');
if(common::hasPriv('testcase', 'delete', $case))
{
$deleteURL = helper::createLink('testcase', 'delete', "caseID=$case->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"batchForm\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$this->lang->testcase->delete}' class='btn-icon'");
}
echo '</div>';
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", $case, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
if($this->config->testcase->needReview or !empty($this->config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'glasses', '', 'iframe');
common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug', '', 'iframe', '', "data-width='90%'");
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy');
+2
View File
@@ -105,12 +105,14 @@
<nav class='container'></nav>
<div class='btn-toolbar'>
<?php common::printBack($browseLink);?>
<?php if(!$report->deleted):?>
<div class='divider'></div>
<?php
if(common::hasPriv('testreport', 'create')) echo html::a(inLink('create', "objectID=$report->objectID&objectType=$report->objectType"), "<i class='icon-refresh'></i>", '', "class='btn' title='{$lang->testreport->recreate}'");
common::printIcon('testreport', 'edit', "reportID=$report->id", '', 'button');
common::printIcon('testreport', 'delete', "reportID=$report->id", '', 'button', '', 'hiddenwin');
?>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+4 -3
View File
@@ -751,6 +751,7 @@ class userModel extends model
$viewAllow = true;
break;
}
if(empty($acl['products'])) $productAllow = true;
if(empty($acl['projects'])) $projectAllow = true;
if(empty($acl['views'])) $viewAllow = true;
@@ -765,9 +766,9 @@ class userModel extends model
if(!empty($acl['projects'])) $acls['projects'] = !empty($acls['projects']) ? array_merge($acls['projects'], $acl['projects']) : $acl['projects'];
}
if($productAllow) $acls['products'] = array();
if($projectAllow) $acls['projects'] = array();
if($viewAllow) $acls['views'] = array();
if($productAllow && empty($acls['products'])) $acls['products'] = array();
if($projectAllow && empty($acls['projects'])) $acls['projects'] = array();
if($viewAllow && empty($acl['views'])) $acls['views'] = array();
$sql = $this->dao->select('module, method')->from(TABLE_USERGROUP)->alias('t1')->leftJoin(TABLE_GROUPPRIV)->alias('t2')
->on('t1.group = t2.group')
+1 -1
View File
@@ -34,7 +34,7 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js');
<table class='table table-form'>
<tbody>
<tr>
<th class='w-70px'><?php echo $lang->user->account;?></th>
<th class='w-60px'><?php echo $lang->user->account;?></th>
<td><input class='form-control' type='text' name='account' id='account' autofocus /></td>
</tr>
<tr>
+1 -1
View File
@@ -342,7 +342,7 @@ class webhookModel extends model
{
$attachment = array();
$attachment['title'] = $file->title;
$attachment['images'][]['url'] = $data->host . $this->file->webPath . $file->pathname;
$attachment['images'][]['url'] = common::getSysURL() . $this->file->webPath . $file->pathname;
$data->attachments[] = $attachment;
}
}
+3 -3
View File
File diff suppressed because one or more lines are too long