*Finish task #7628.

This commit is contained in:
tianshujie98
2020-08-20 10:22:00 +08:00
parent c23c6e721c
commit acb8d93ec4
11 changed files with 570 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
<?php
$config->design = new stdclass();
$config->design->editor = new stdclass();
$config->design->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->design->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
$config->design->affectedFixedNum = 7;
+7
View File
@@ -0,0 +1,7 @@
.searchBox{min-height: 45px;}
.searchBox .srearch-date{float: left; width: 20%}
.searchBox h4{float:left;display: inline-block}
.searchBox span{float:left;line-height:30px}
#logForm .table thead th{background: #efefef}
#begin{margin-right:5px}
#end{margin-left:5px}
+20
View File
@@ -0,0 +1,20 @@
$('#begin, #end').change(function()
{
var begin = $('#begin').val();
var end = $('#end').val();
if(begin.indexOf('-') != -1)
{
var beginarray = begin.split("-");
var begin = '';
for(i = 0; i < beginarray.length; i++) begin = begin + beginarray[i];
}
if(end.indexOf('-') != -1)
{
var endarray = end.split("-");
var end = '';
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
}
location.href = createLink('design', 'commit', "designID=" + designID + '&begin=' + begin + '&end=' + end);
})
+5
View File
@@ -0,0 +1,5 @@
$(document).on('click', '.ajaxPager', function()
{
$('#logBox').load($(this).attr('href'));
return false;
})
+46
View File
@@ -0,0 +1,46 @@
<?php
$lang->design->common = '设计';
$lang->design->browse = '浏览列表';
$lang->design->commit = '关联提交';
$lang->design->submission = '相关提交';
$lang->design->version = '版本号';
$lang->design->assignedTo = '指派给';
$lang->design->actions = '操作';
$lang->design->delete = '删除';
$lang->design->confirmDelete = '您确定要删除这个设计吗?';
$lang->design->edit = '变更';
$lang->design->products = '所属产品';
$lang->design->story = '相关需求';
$lang->design->file = '附件';
$lang->design->type = '设计类型';
$lang->design->name = '设计名称';
$lang->design->create = '创建设计';
$lang->design->view = '查看设计';
$lang->design->desc = '设计描述';
$lang->design->product = '所属产品';
$lang->design->basicInfo = '基础信息';
$lang->design->commitDate = '提交时间';
$lang->design->affectedStory = "影响{$lang->storyCommon}";
$lang->design->affectedTasks = '影响任务';
$lang->design->submit = '提交评审';
$lang->design->revision = '查看关联代码';
$lang->design->designView = '查看详情';
$lang->design->reviewObject = '评审对象';
$lang->design->createdBy = '由谁创建';
$lang->design->createdDate = '创建时间';
$lang->design->typeList = array();
$lang->design->typeList['all'] = '所有';
$lang->design->typeList['HLDS'] = '概要设计';
$lang->design->typeList['DDS'] = '详细设计';
$lang->design->typeList['DBDS'] = '数据库设计';
$lang->design->typeList['ADS'] = '接口设计';
$lang->design->range = '影响范围';
$lang->design->errorSelection = '还没有选中记录!';
$lang->design->noDesign = '暂时没有记录';
$lang->design->rangeList = array();
$lang->design->rangeList['all'] = '全部记录';
$lang->design->rangeList['assign'] = '选中记录';
+123
View File
@@ -0,0 +1,123 @@
<?php
/**
* The browse view file of flow module of RanZhi.
*
* @copyright Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license 商业软件,非开源软件
* @author Gang Liu <liugang@cnezsoft.com>
* @package flow
* @version $Id$
* @link http://www.ranzhico.com
*/
?>
<?php
if(!empty($dataList))
{
foreach($dataList as $data)
{
$relations = $this->loadModel('common')->getRelations('design', $data->id, 'commit');
$data->commit = '';
foreach($relations as $relation) $data->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID", '', true), "#$relation->BID", '', "class='iframe' data-width='80%' data-height='550'");
}
}
?>
<?php include '../../' . 'common/view/header.html.php';?>
<style>
#featurebar{display:inline-block;}
.modal-dialog{width:70% !important}
table td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
</style>
<?php include '../../common/view/sortable.html.php';?>
<?php js::set('productID', $productID);?>
<?php
$showSubHeader = $program->category == 'single' ? 'hidden' : 'show';
js::set('showSubHeader', $showSubHeader);
?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink('browse', "productID={$productID}&type=all"), "<span class='text'>{$lang->design->typeList['all']}</span>" . ($type == 'all' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'all' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=HLDS"), "<span class='text'>{$lang->design->typeList['HLDS']}</span>" . ($type == 'HLDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'HLDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=DDS"), "<span class='text'>{$lang->design->typeList['DDS']}</span>" . ($type == 'DDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'DDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=DBDS"), "<span class='text'>{$lang->design->typeList['DBDS']}</span>" . ($type == 'DBDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'DBDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=ADS"), "<span class='text'>{$lang->design->typeList['ADS']}</span>" . ($type == 'ADS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'ADS' ? ' btn-active-text' : '') . "'");
?>
</div>
<div class='btn-toolbar pull-right'>
<?php
if(common::hasPriv('design', 'create')) echo html::a($this->createLink('design', 'create', "productID=$productID&designID=0"), "<i class='icon icon-plus'></i> {$lang->design->create}", '', "class='btn btn-primary'");
?>
</div>
</div>
<div id="mainContent" class="main-row fade in">
<?php if(empty($designs)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->design->noDesign;?></span></p>
</div>
<?php else:?>
<form id='designFrom' method='post' class="main-table">
<table class='table has-sort-head table-fixrd' id="designTable">
<?php $vars = "productID=$productID&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";?>
<thead>
<tr>
<th class="text-left w-120px">
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll;?>"></div>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class="text-left w-120px">
<?php common::printOrderLink('type', $orderBy, $vars, $lang->design->type);?>
</th>
<th class="text-left">
<?php common::printOrderLink('name', $orderBy, $vars, $lang->design->name);?>
</th>
<th class="text-left w-130px">
<?php common::printOrderLink('commit', $orderBy, $vars, $lang->design->submission);?>
</th>
<th class="text-left w-70px">
<?php common::printOrderLink('version', $orderBy, $vars, $lang->design->version);?>
</th>
<th class="text-left w-120px">
<?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->design->createdBy);?>
</th>
<th class="text-left w-150px">
<?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->design->createdDate);?>
</th>
<th class="text-left w-120px">
<?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->design->assignedTo);?>
</th>
<th class="text-center w-100px">
<?php echo $lang->design->actions;?>
</th>
</tr>
</thead>
<tbody>
<?php foreach($designs as $design):?>
<tr>
<td class='text-left'><?php printf('%03d', $design->id);?></td>
<td class='text-left'><?php echo zget($lang->design->typeList, $design->type);?></td>
<td class='text-left' title="<?php echo $design->name;?>"><?php echo html::a($this->createLink('design', 'view', "id={$design->id}"), $design->name);?></td>
<td class='text-left'><?php echo zget($lang->design->submission, $design->commit);?></td>
<td class='text-left'><?php echo zget($lang->design->version, $design->version);?></td>
<td class='text-left'><?php echo $design->createdBy;?></td>
<td class='text-left'><?php echo $design->createdDate;?></td>
<td class='text-left'><?php echo $design->assignedTo;?></td>
<td class='c-actions text-center'>
<?php
$vars = "design={$design->id}";
common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
common::printIcon('design', 'commit', $vars, $design, 'list', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
<?php include '../../' . 'common/view/footer.html.php';?>
+62
View File
@@ -0,0 +1,62 @@
<?php include '../../common/view/header.lite.html.php';?>
<style>.m-design-commit{padding-left: 0px;}</style>
<div class='main-content' id='mainContent'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $design->id;?></span>
<span title='<?php echo $design->name?>'><?php echo $design->name?></span>
<small><?php echo $lang->arrow . $lang->design->commit;?></small>
</h2>
</div>
<div class='searchBox'>
<h4><?php echo $lang->design->commitDate . ':';?></h4>
<?php echo html::input('begin', $begin, "class='form-control form-date srearch-date'");?>
<span>~</span>
<?php echo html::input('end', $end, "class='form-control form-date srearch-date'");?>
</div>
<form id='logForm' class='main-table form-ajax' data-ride='table' action=<?php echo inlink('commit', "designID=$designID");?> method='post'>
<table class='table'>
<thead>
<tr>
<th class='w-40px'></th>
<th class='w-80px'><?php echo $lang->repo->revisionA?></th>
<?php if(isset($repo->SCM) and $repo->SCM == 'Git'):?>
<th class='w-70px'><?php echo $lang->repo->commit?></th>
<?php endif;?>
<th class='w-120px'><?php echo $lang->repo->time?></th>
<th class='w-100px'><?php echo $lang->repo->committer?></th>
<th><?php echo $lang->repo->comment?></th>
</tr>
</thead>
<tbody>
<?php foreach($revisions as $log):?>
<tr>
<td>
<div class='checkbox-primary'>
<input type='checkbox' name='revision[]' value="<?php echo $log->id?>" <?php if(in_array($log->revision, $linkedRevisions)) echo 'checked="checked"'?>/>
<label></label>
</div>
</td>
<td class='versions'><span class="revision"><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&revision={$log->revision}"), $repo->SCM == 'Git' ? substr($log->revision, 0, 10) : $log->revision);?></span></td>
<?php if($repo->SCM == 'Git'):?>
<td><?php echo $log->commit?></td>
<?php endif;?>
<td><?php echo substr($log->time, 0, 10);?></td>
<td><?php echo $log->committer;?></td>
<?php $comment = htmlspecialchars($log->comment, ENT_QUOTES);?>
<td title='<?php echo $comment?>' class='comment'><?php echo $log->comment?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton('', '', 'btn btn-primary')?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
</div>
<?php js::set('designID', $designID);?>
<?php include '../../common/view/footer.lite.html.php';?>
+71
View File
@@ -0,0 +1,71 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php
$showSubHeader = $program->category == 'single' ? 'hidden' : 'show';
js::set('showSubHeader', $showSubHeader);
?>
<div id="mainContent" class="main-content fade">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->design->create;?></h2>
</div>
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
<table class="table table-form">
<tbody>
<?php if($program->category == 'multiple'):?>
<tr>
<th class='w-120px'><?php echo $lang->design->product;?></th>
<td><?php echo html::select('product', $products, $productID, "class='form-control chosen'");?></td>
<td></td>
</tr>
<?php endif;?>
<?php if($program->category == 'single'):?>
<?php echo html::hidden('product', $productID);?>
<?php endif;?>
<tr>
<th class='w-120px'><?php echo $lang->design->story;?></th>
<td><?php echo html::select('story', empty($stories) ? '' : $stories, '', "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->design->type;?></th>
<td><?php echo html::select('type', $lang->design->typeList, '', "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->design->name;?></th>
<td><?php echo html::input('name', '', "class='form-control'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->design->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->design->file;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<script>
$('#product').change(function()
{
productID = $(this).val();
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
$.post(link, function(data)
{
$('#story').replaceWith(data);
$('#story_chosen').remove();
$('#story').chosen();
})
})
if(showSubHeader == 'hidden') $("#subHeader").remove();
</script>
<?php include '../../common/view/footer.html.php';?>
+107
View File
@@ -0,0 +1,107 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php
$showSubHeader = $program->category == 'single' ? 'hidden' : 'show';
js::set('showSubHeader', $showSubHeader);
?>
<style> .tabs .tab-pane .table{border: 1px solid #ddd; border-top: none} </style>
<div id="mainContent" class="main-content fade">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->design->edit;?></h2>
</div>
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
<table class="table table-form">
<tbody>
<?php if($program->category == 'multiple'):?>
<tr>
<th class='w-120px'><?php echo $lang->design->product;?></th>
<td><?php echo html::select('product', $products, $design->product, "class='form-control chosen'");?></td>
<td></td>
</tr>
<?php endif;?>
<tr>
<th class='w-120px'><?php echo $lang->design->story;?></th>
<td><?php echo html::select('story', empty($stories) ? '' : $stories, $design->story, "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->design->type;?></th>
<td><?php echo html::select('type', $lang->design->typeList, $design->type, "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->design->name;?></th>
<td><?php echo html::input('name', $design->name, "class='form-control'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->design->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', $design->desc, 'class="form-control"');?></td>
</tr>
<tr>
<th><?php echo $lang->design->file;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85');?></td>
</tr>
<tr>
<th><?php echo $lang->story->checkAffection;?></th>
<td colspan='2'>
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a data-toggle='tab' href='#affectedTasks'><?php echo $lang->design->affectedTasks;?><span class='label label-danger label-badge label-circle'><?php echo count($design->tasks);?></span></a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='affectedTasks'>
<table class='table'>
<thead>
<tr class='text-center'>
<th class='c-id'><?php echo $lang->task->id;?></th>
<th class='text-left'><?php echo $lang->task->name;?></th>
<th class='w-100px'><?php echo $lang->task->assignedTo;?></th>
<th class='c-status'><?php echo $lang->task->status;?></th>
<th class='w-100px'><?php echo $lang->task->consumed;?></th>
<th class='w-90px'><?php echo $lang->task->left;?></th>
</tr>
</thead>
<tbody>
<?php foreach($design->tasks as $task):?>
<tr class='text-center'>
<td><?php $task->id?></td>
<td class='text-left'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, '_blank');?></td>;
<td><?php echo zget($users, $task->assignedTo);?></td>
<td><span class='status-task status-<?php echo $task->status;?>'><?php $this->processStatus('task', $task);?></span></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<script>
$('#product').change(function()
{
productID = $(this).val();
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
$.post(link, function(data)
{
$('#story').replaceWith(data);
$('#story_chosen').remove();
$('#story').chosen();
})
})
if(showSubHeader == 'hidden') $("#subHeader").remove();
</script>
<?php include '../../common/view/footer.html.php';?>
+35
View File
@@ -0,0 +1,35 @@
<?php include '../../common/view/header.lite.html.php';?>
<main id="main">
<div class="container">
<div id="mainContent" class='main-content load-indicator'>
<div class='main-header'>
<h2><?php echo $lang->design->submit;?></h2>
</div>
<form class='main-form' method='post' target='hiddenwin'>
<table class="table table-form">
<tr>
<th><?php echo $lang->design->reviewObject;?></th>
<td>
<?php echo html::select('object', $lang->design->typeList, $designType, "class='form-control'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->design->range;?></th>
<td>
<?php echo html::select('range', $lang->design->rangeList, '', "class='form-control'");?>
</td>
</tr>
<tr>
<th></th>
<?php echo html::hidden('designID', '');?>
<td><?php echo html::submitButton('', '', 'btn btn-primary');?></td>
</tr>
</table>
</form>
</div>
</div>
<script>
var designID = $.cookie('submitDesignID');
$("#designID").val(designID);
</script>
</main>
+87
View File
@@ -0,0 +1,87 @@
<?php include '../../' . 'common/view/header.html.php';?>
<?php
if(!empty($_GET['onlybody']))
{
$data->commit = '';
foreach($relations as $relation) $data->commit .= " #$relation->BID";
$data->story = $storyTitle;
}
?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('design', 'browse', "productID=$productID"), '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
<div class="divider"></div>
<div class="page-title">
<span class="label label-id"><?php echo $data->id?></span>
<span class="text" title="<?php echo $data->name;?>"><?php echo $data->name;?></span>
</div>
</div>
</div>
<div id="mainContent" class="main-row">
<div class="main-col col-8">
<div class="cell">
<div class="detail">
<div class="detail-title"><?php echo $lang->design->desc;?></div>
<div class="detail-content article-content">
<?php echo $data->desc;?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $data->files, 'fieldset' => 'true'));?>
</div>
</div>
</div>
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
<div class='main-actions'>
<div class="btn-toolbar">
<?php common::printBack($this->session->designList);?>
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
<?php if(!$data->deleted):?>
<?php
common::printIcon('design', 'commit',"designID=$data->id", $data, 'button', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'edit', "designID=$data->id", $data, 'button', '', '', '', true);
common::printIcon('design', 'delete', "designID=$data->id", $data, 'button', 'trash', 'hiddenwin');
?>
<?php endif;?>
</div>
</div>
</div>
<div class='side-col col4'>
<div class='cell'>
<div class="detail">
<table class='table table-data'>
<tr>
<th><?php echo $lang->design->type;?></th>
<td><?php echo zget($lang->design->typeList, $data->type);?></td>
</tr>
<tr>
<th><?php echo $lang->design->product;?></th>
<td><?php echo $data->productName;?></td>
</tr>
<tr>
<th><?php echo $lang->design->story;?></th>
<td><?php echo $data->story;?></td>
</tr>
<tr>
<th><?php echo $lang->design->commit;?></th>
<td><?php echo $data->commit;?></td>
</tr>
<tr>
<th><?php echo $lang->design->createdBy;?></th>
<td><?php echo zget($users, $data->createdBy);?></td>
</tr>
<tr>
<th><?php echo $lang->design->createdDate;?></th>
<td><?php echo $data->createdDate;?></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<script>
$('.main-actions').width($('.main-col').outerWidth());
if(showAction == 'hidden')
{
$('.main-actions').remove();
$('.pull-left').children('a').remove();
};
</script>
<?php include '../../' . 'common/view/footer.html.php';?>