Files
EasySoft-ZenTaoPMS/module/task/view/edit.html.php
2018-05-23 14:51:09 +08:00

269 lines
15 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* The edit view of task 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 task
* @version $Id: edit.html.php 4897 2013-06-26 01:13:16Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('oldStoryID', $task->story); ?>
<?php js::set('oldAssignedTo', $task->assignedTo); ?>
<?php js::set('oldProjectID', $task->project); ?>
<?php js::set('confirmChangeProject', $lang->task->confirmChangeProject); ?>
<?php js::set('changeProjectConfirmed', false); ?>
<div class='main-content' id='mainContent'>
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, '', "class='task-name'");?>
<small><?php echo $lang->arrow . $lang->task->edit;?></small>
</h2>
</div>
<div class='main-row'>
<div class='main-col col-8'>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->name;?></div>
<div class='detail-content'>
<div class='form-group'>
<div class='<?php if(empty($task->children) and empty($task->parent) and $task->type != 'affair') echo 'input-group';?>'>
<div class="input-control has-icon-right">
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $task->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".task-name" data-provide="colorpicker">
</div>
<?php echo html::input('name', $task->name, 'class="form-control task-name" autocomplete="off" placeholder="' . $lang->task->name . '"');?>
</div>
<?php if(empty($task->children) and empty($task->parent) and $task->type != 'affair'):?>
<span class='input-group-addon'>
<div class='checkbox-primary'>
<input type='checkBox' name='multiple' id='multiple' value='1' <?php echo empty($task->team) ? '' : 'checked';?> />
<label for='multiple'><?php echo $lang->task->multipleAB;?></label>
</div>
</span>
<?php endif;?>
</div>
</div>
</div>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->desc;?></div>
<div class='detail-content'>
<?php echo html::textarea('desc', htmlspecialchars($task->desc), "rows='8' class='form-control'");?>
</div>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->comment;?></div>
<div class='detail-content'><?php echo html::textarea('comment', '', "rows='5' class='form-control'");?></div>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->files;?></div>
<div class='detail-content'><?php echo $this->fetch('file', 'buildform');?></div>
</div>
<div class='detail text-center form-actions'>
<?php echo html::hidden('lastEditedDate', $task->lastEditedDate);?>
<?php echo html::hidden('consumed', $task->consumed);?>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</div>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<div class='side-col col-4'>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->legendBasic;?></div>
<table class='table table-form'>
<?php if(empty($task->parent)):?>
<tr>
<th class='w-80px'><?php echo $lang->task->project;?></th>
<td><?php echo html::select('project', $projects, $task->project, 'class="form-control chosen" onchange="loadAll(this.value)"');?></td>
</tr>
<?php endif;?>
<tr>
<th class='w-80px'><?php echo $lang->task->module;?></th>
<td id="moduleIdBox"><?php echo html::select('module', $modules, $task->module, 'class="form-control chosen" onchange="loadModuleRelated()"');?></td>
</tr>
<?php if($config->global->flow != 'onlyTask' and $project->type != 'ops'):?>
<tr>
<th><?php echo $lang->task->story;?></th>
<td><span id="storyIdBox"><?php echo html::select('story', $stories, $task->story, "class='form-control chosen'");?></span></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $members, $task->assignedTo, "class='form-control chosen'");?></span></td>
</tr>
<tr class='<?php echo empty($task->team) ? 'hidden' : ''?>' id='teamTr'>
<th><?php echo $lang->task->team;?></th>
<td><?php echo html::a('javascript:;', $lang->task->team, '', "class='form-control btn' data-toggle='modalTeam'");?></td>
</tr>
<tr>
<th><?php echo $lang->task->type;?></th>
<td><?php echo html::select('type', $lang->task->typeList, $task->type, "class='form-control chosen'");?></td>
</tr>
<?php if(empty($task->children)):?>
<tr>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::select('status', (array)$lang->task->statusList, $task->status, "class='form-control chosen'");?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->pri;?></th>
<td><?php echo html::select('pri', $lang->task->priList, $task->pri, "class='form-control chosen'");?> </td>
</tr>
<tr>
<th><?php echo $lang->task->mailto;?></th>
<td>
<div class='input-group'>
<?php echo html::select('mailto[]', $project->acl == 'private' ? $members : $users, str_replace(' ' , '', $task->mailto), 'class="form-control" multiple');?>
<div class='input-group-btn'><?php echo $this->fetch('my', 'buildContactLists');?></div>
</div>
</td>
</tr>
</table>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->legendEffort;?></div>
<table class='table table-form'>
<tr>
<th class='w-70px'><?php echo $lang->task->estStarted;?></th>
<td><?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->task->realStarted;?></th>
<td><?php echo html::input('realStarted', $task->realStarted, "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->task->deadline;?></th>
<td><?php echo html::input('deadline', $task->deadline, "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->task->estimate;?></th>
<td>
<?php $disabled = !empty($task->team) ? "disabled='disabled'" : '';?>
<?php echo html::input('estimate', $task->estimate, "class='form-control' autocomplete='off' {$disabled}");?>
</td>
</tr>
<tr>
<th><?php echo $lang->task->consumed;?></th>
<td><?php echo $task->consumed . ' '; common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'record-estimate-toggle btn-link', true);?></td>
</tr>
<tr>
<th><?php echo $lang->task->left;?></th>
<td>
<?php $disabled = !empty($task->team) ? "disabled='disabled'" : '';?>
<?php echo html::input('left', $task->left, "class='form-control' autocomplete='off' {$disabled}");?>
</td>
</tr>
</table>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->legendLife;?></div>
<table class='table table-form'>
<tr>
<th class='w-70px'><?php echo $lang->task->openedBy;?></th>
<td><?php echo $users[$task->openedBy];?></td>
</tr>
<tr>
<th><?php echo $lang->task->finishedBy;?></th>
<td><?php echo html::select('finishedBy', $members, $task->finishedBy, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->task->finishedDate;?></th>
<td><?php echo html::input('finishedDate', $task->finishedDate, 'class="form-control form-date"');?></td>
</tr>
<tr>
<th><?php echo $lang->task->canceledBy;?></th>
<td><?php echo html::select('canceledBy', $users, $task->canceledBy, 'class="form-control chosen"');?></td>
</tr>
<tr>
<th><?php echo $lang->task->canceledDate;?></th>
<td><?php echo html::input('canceledDate', $task->canceledDate, 'class="form-control form-date"');?></td>
</tr>
<tr>
<th><?php echo $lang->task->closedBy;?></th>
<td><?php echo html::select('closedBy', $users, $task->closedBy, 'class="form-control chosen"');?></td>
</tr>
<tr>
<th><?php echo $lang->task->closedReason;?></th>
<td><?php echo html::select('closedReason', $lang->task->reasonList, $task->closedReason, 'class="form-control chosen"');?></td>
</tr>
<tr>
<th><?php echo $lang->task->closedDate;?></th>
<td><?php echo html::input('closedDate', $task->closedDate, 'class="form-control form-date"');?></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="modal fade modal-team" id="modalTeam">
<div class="modal-dialog">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">×</span><span class="sr-only"><?php echo $lang->task->close;?></span>
</button>
<h4 class="modal-title"><?php echo $lang->task->team?></h4>
</div>
<div class="modal-content with-padding">
<table class='table table-form'>
<?php foreach($task->team as $member):?>
<tr>
<td class='w-250px'><?php echo html::select("team[]", $members, $member->account, "class='form-control chosen'")?></td>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->task->estimate?></span>
<?php echo html::input("teamEstimate[]", $member->estimate, "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
<span class='input-group-addon fix-border'><?php echo $lang->task->consumed?></span>
<?php echo html::input("teamConsumed[]", $member->consumed, "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
<span class='input-group-addon fix-border'><?php echo $lang->task->left?></span>
<?php echo html::input("teamLeft[]", $member->left, "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
</div>
</td>
<td class='w-90px'>
<a href='javascript:;' class='btn btn-icon btn-move-up btn-sm'><i class='icon-arrow-up'></i></a>
<a href='javascript:;' class='btn btn-icon btn-move-down btn-sm'><i class='icon-arrow-down'></i></a>
</td>
</tr>
<?php endforeach;?>
<?php for($i = 0; $i < 5; $i++):?>
<tr>
<td class='w-150px'><?php echo html::select("team[]", $members, '', "class='form-control chosen'")?></td>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->task->estimate?></span>
<?php echo html::input("teamEstimate[]", '', "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
<span class='input-group-addon fix-border'><?php echo $lang->task->consumed?></span>
<?php echo html::input("teamConsumed[]", '', "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
<span class='input-group-addon fix-border'><?php echo $lang->task->left?></span>
<?php echo html::input("teamLeft[]", '', "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
</div>
</td>
<td class='w-90px'>
<a class='btn btn-move-add btn-icon btn-sm'><i class='icon-plus'></i></a>
<a class='btn btn-icon btn-move-up btn-sm'><i class='icon-arrow-up'></i></a>
<a class='btn btn-icon btn-move-down btn-sm'><i class='icon-arrow-down'></i></a>
</td>
</tr>
<?php endfor;?>
<tr><td colspan='3' class='text-center'><?php echo html::a('javascript:void(0)', $lang->confirm, '', "class='btn btn-primary' data-dismiss='modal'");?></td></tr>
</table>
</div>
</div>
</div>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>