* Finish task #7119.

This commit is contained in:
Yagami
2020-05-06 11:13:13 +08:00
parent bf33d10b9d
commit 6d1a047b02
17 changed files with 904 additions and 18 deletions
+114
View File
@@ -0,0 +1,114 @@
<?php
/**
* The create view of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php if(isset($tips)):?>
<?php $defaultURL = $this-> createLink('project', 'task', 'projectID=' . $projectID);?>
<?php include '../../common/view/header.lite.html.php';?>
<body>
<div class='modal-dialog mw-500px' id='tipsModal'>
<div class='modal-header'>
<a href='<?php echo $defaultURL;?>' class='close'><i class="icon icon-close"></i></a>
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->project->tips;?></h4>
</div>
<div class='modal-body'>
<?php echo $tips;?>
</div>
</div>
</body>
</html>
<?php exit;?>
<?php endif;?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('holders', $lang->project->placeholder);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->program->create;?></h2>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->program->type;?></th>
<td><?php echo html::select('type', $lang->program->typeList, '', "class='form-control'");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->name;?></th>
<td class="col-main"><?php echo html::input('name', '', "class='form-control' required");?></td>
<td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->code;?></th>
<td><?php echo html::input('code', '', "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->PM;?></th>
<td><?php echo html::select('PM', $pmUsers, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->program->budget;?></th>
<td><?php echo html::input('budget', '', "class='form-control'");?></td>
<td style='float:left'><?php echo html::select('budgetUnit', $lang->program->unitList, 'yuan', "class='form-control'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', date('Y-m-d'), "class='form-control form-date' placeholder='" . $lang->program->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->program->to;?></span>
<?php echo html::input('end', '', "class='form-control form-date' placeholder='" . $lang->program->end . "' required");?>
</div>
</td>
<td colspan='2'></td>
</tr>
<tr>
<th><?php echo $lang->project->teamname;?></th>
<td><?php echo html::input('team', '', "class='form-control'");?></td><td></td><td></td>
</tr>
<tr class='hide'>
<th><?php echo $lang->project->status;?></th>
<td><?php echo html::hidden('status', 'wait');?></td>
<td></td>
<td></td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<th><?php echo $lang->program->desc;?></th>
<td colspan='3'>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=project&link=desc');?>
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->project->aclList, 'open', "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr id='whitelistBox' class='hidden'>
<th><?php echo $lang->project->whitelist;?></th>
<td colspan='3'><?php echo html::checkbox('whitelist', $groups, '', '', '', 'inline');?></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</table>
<?php echo html::hidden('products[]') . html::hidden('plans[]');?>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+97
View File
@@ -0,0 +1,97 @@
<?php
/**
* The create view of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php $projectTemplates = $this->project->getTemplateOptions();?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->program->edit;?></h2>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->template;?></th>
<td class="col-main"><?php echo html::select('parent', $projectTemplates, $project->parent, "class='form-control' required");?></td>
<td></td><td></td>
</tr>
<tr>
<th class='w-120px'><?php echo $lang->program->name;?></th>
<td class="col-main"><?php echo html::input('name', $project->name, "class='form-control' required");?></td>
<td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->code;?></th>
<td><?php echo html::input('code', $project->code, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->category;?></th>
<td><?php echo html::select('category', $lang->program->categoryList, $project->category, "class='form-control'");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->PM;?></th>
<td><?php echo html::select('PM', $pmUsers, $project->PM, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->program->budget;?></th>
<td><?php echo html::input('budget', $project->budget, "class='form-control'");?></td>
<td style='float:left'><?php echo html::select('budgetUnit', $lang->program->unitList, $project->budgetUnit, "class='form-control'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->program->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', $project->begin, "class='form-control form-date' placeholder='" . $lang->program->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->program->to;?></span>
<?php echo html::input('end', $project->end, "class='form-control form-date' placeholder='" . $lang->program->end . "' required");?>
</div>
</td>
<td colspan='2'></td>
</tr>
<tr>
<th><?php echo $lang->project->teamname;?></th>
<td><?php echo html::input('team', $project->team, "class='form-control'");?></td><td></td><td></td>
</tr>
<tr class='hide'>
<th><?php echo $lang->project->status;?></th>
<td><?php echo html::hidden('status', 'wait');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->program->desc;?></th>
<td colspan='3'>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=project&link=desc');?>
<?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr id='whitelistBox' class='hidden'>
<th><?php echo $lang->project->whitelist;?></th>
<td colspan='3'><?php echo html::checkbox('whitelist', $groups, $project->whitelist, '', '', 'inline');?></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</table>
<?php echo html::hidden('products[]') . html::hidden('plans[]');?>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+36
View File
@@ -0,0 +1,36 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->project->finish;?></small>
<?php endif;?>
</h2>
</div>
<form class='load-indicator main-form' method='post' target='hiddenwin'>
<table class='table table-form'>
<tbody>
<tr>
<th class='w-100px'><?php echo $lang->program->realFinished;?></th>
<td><?php echo html::input('realFinished', helper::today(), "class='form-control form-date'");?></td>
<td></td>
</tr>
<tr>
<th class='w-40px'><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton($lang->project->finish) . ' ' . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?></td>
</tr>
</tbody>
</table>
</form>
<hr class='small' />
<div class='main'>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+125
View File
@@ -0,0 +1,125 @@
<?php
/**
* The html template file of index method of index module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id: index.html.php 5094 2013-07-10 08:46:15Z chencongzhi520@gmail.com $
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('status', $status);?>
<style>
.footerbar .right-info{position: absolute; bottom: 10px; right: 10px;}
.footerbar .left-info{position: absolute; bottom: 15px; left: 20px;}
.flow-block {height: 230px;}
.panel-body .card-content{overflow-y: scroll; height: 100px;}
</style>
<?php if($programType == 'bygrid'):?>
<style>
#mainMenu{padding-left: 10px; padding-right: 10px;}
</style>
<?php endif;?>
<div id='mainMenu' class='clearfix'>
<div class="btn-group pull-left">
<?php echo html::a('javascript:setProgramType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='看板' class='btn btn-icon " . ($programType == 'bygrid' ? 'text-primary' : '') . "'");?>
<?php echo html::a('javascript:setProgramType("bylist")', "<i class='icon icon-bars'></i>", '', "title='列表' class='btn btn-icon " . ($programType == 'bylist' ? 'text-primary' : '') . "'");?>
</div>
<div class='pull-right'><?php echo $lang->pageActions;?></div>
</div>
<div id='mainContent' class='main-row'>
<?php if(empty($projectList)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->program->noProgram;?></span> <?php common::printLink('program', 'create', '', "<i class='icon icon-plus'></i> " . $lang->program->create, '', "class='btn btn-info'");?></p>
</div>
<?php else:?>
<div class='main-col'>
<?php if($programType == 'bygrid'):?>
<?php foreach ($projectList as $projectID => $project):?>
<div class='col-sm-6 col-md-4' data-id='<?php echo $projectID?>'>
<div class='main-table panel flow-block'>
<div class='main-table panel-heading'>
<strong title='<?php echo $project->name;?>'><?php echo $project->name;?></strong>
<span class="label label-primary label-outline"><?php echo zget($templates, $project->parent);?></span>
<span class="label label-success label-outline"><?php echo zget($lang->project->statusList, $project->status);?></span>
<span class="label label-danger label-outline"><?php echo zget($users,$project->PM);?></span>
<span class="label label-warning label-outline"><?php echo $project->budget . ' ' . zget($lang->program->unitList, $project->budgetUnit);?></span>
<nav class='panel-actions nav nav-default'>
<li class='dropdown'>
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
<ul class='dropdown-menu pull-right'>
<li><?php common::printicon('program', 'activate', "projectid=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "projectID=$project->id"), "<i class='icon-edit'></i> " . $lang->edit, '', "class='btn btn-link'");?></li>
<li><?php common::printIcon('program', 'start', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php common::printIcon('program', 'suspend', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php common::printIcon('program', 'finish', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php common::printIcon('program', 'close', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("project", "delete", "projectID=$project->id"), "<i class='icon-trash'></i> " . $lang->delete, 'hiddenwin', "class='btn btn-link'");?></li>
</ul>
</li>
</nav>
</div>
<div class='main-table panel-body'>
<div class='card-content text-muted scrollbar-hover'><?php echo $project->desc;?></div>
<div class='footerbar'>
<div class='right-info'>
<?php common::printLink('programplan', 'browse', "programplan=$project->id", $lang->project->enter, '', "class='btn btn-primary'");?>
</div>
</div>
</div>
</div>
</div>
<?php endforeach;?>
<?php else:?>
<div class='main-table'>
<table class='table has-sort-head table-fixed' id='projectList'>
<?php $vars = "status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<thead>
<tr>
<th class='c-id'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th><?php common::printOrderLink('name', $orderBy, $vars, $lang->program->name);?></th>
<th class='w-120px'><?php common::printOrderLink('code', $orderBy, $vars, $lang->program->code);?></th>
<th class='w-120px'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->program->budget);?></th>
<th class='w-100px'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->program->PM);?></th>
<th class='w-200px text-left'><?php echo $lang->program->desc;?></th>
<th class='text-center w-200px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class='sortable' id='projectTableList'>
<?php foreach($projectList as $project):?>
<tr data-id='<?php echo $project->id ?>' data-order='<?php echo $project->order ?>'>
<td class='c-id'>
<?php printf('%03d', $project->id);?>
</td>
<td class='text-left' title='<?php echo $project->name?>'>
<?php echo html::a($this->createLink('project', 'task', 'projectID=' . $project->id), $project->name);?>
</td>
<td class='text-left'><?php echo $project->code;?></td>
<td class='text-left'><?php echo $project->budget . ' ' . zget($lang->program->unitList, $project->budgetUnit);?></td>
<td><?php echo zget($users, $project->PM);?></td>
<td title='<?php echo strip_tags($project->desc);?>'><?php echo strip_tags($project->desc);?></td>
<td class='text-center c-actions'>
<?php common::printIcon('program', 'start', "projectID=$project->id", $project, 'list', '', '', 'iframe', true);?>
<?php common::printIcon('program', 'activate', "projectID=$project->id", $project, 'list', '', '', 'iframe', true);?>
<?php common::printIcon('program', 'suspend', "projectID=$project->id", $project, 'list', '', '', 'iframe', true);?>
<?php common::printIcon('program', 'finish', "projectID=$project->id", $project, 'list', '', '', 'iframe', true);?>
<?php common::printIcon('program', 'close', "projectID=$project->id", $project, 'list', '', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "projectID=$project->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
</div>
</div>
<?php endif;?>
</div>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
+36
View File
@@ -0,0 +1,36 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->project->start;?></small>
<?php endif;?>
</h2>
</div>
<form class='load-indicator main-form' method='post' target='hiddenwin'>
<table class='table table-form'>
<tbody>
<tr>
<th class='w-100px'><?php echo $lang->program->realStarted;?></th>
<td><?php echo html::input('realStarted', helper::today(), "class='form-control form-date'");?></td>
<td></td>
</tr>
<tr>
<th class='w-40px'><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton($lang->project->start) . ' ' . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?></td>
</tr>
</tbody>
</table>
</form>
<hr class='small' />
<div class='main'>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>