- [misc] Remove unused view files.

This commit is contained in:
liugang
2025-09-11 16:30:53 +08:00
parent 6861dd7679
commit 53be2c64c6
663 changed files with 0 additions and 73131 deletions
-131
View File
@@ -1,131 +0,0 @@
<?php
/**
* The activate file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jia Fu <fujia@cnezsoft.com>
* @package task
* @version $Id: start.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php js::set('oldConsumed', $task->consumed);?>
<?php js::set('currentUser', $app->user->account);?>
<?php js::set('members', $members);?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php js::set('teamLeftEmpty', $lang->task->error->teamLeftEmpty);?>
<?php js::set('totalLeftError', sprintf($this->lang->task->error->leftEmptyAB, $this->lang->task->statusList[$task->status]));?>
<?php js::set('estimateNotEmpty', sprintf($lang->task->error->notempty, $lang->task->estimate))?>
<?php js::set('leftNotEmpty', sprintf($lang->task->error->notempty, $lang->task->left))?>
<?php js::set('teamNotEmpty', sprintf($lang->error->notempty, $lang->task->assignedTo))?>
<?php $isMultiple = !empty($task->team);?>
<?php js::set('isMultiple', $isMultiple);?>
<?php js::set('taskMode', $task->mode);?>
<?php if($isMultiple) js::set('assignedToHtml', html::select('assignedTo', $teamMembers, '', "class='form-control' disabled"));?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<?php if(!isonlybody()):?>
<small> <?php echo $lang->arrow . $lang->task->activate;?></small>
<?php endif;?>
</h2>
</div>
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<?php if($isMultiple):?>
<tr>
<th class='thWidth'><?php echo $lang->task->mode;?></th>
<td class='w-p35-f'><?php echo zget($lang->task->modeList, $task->mode) . html::hidden('mode', $task->mode);?></td>
<td></td>
</tr>
<?php endif;?>
<tr>
<th class='thWidth'><?php echo $lang->task->assignedTo;?></th>
<td class='w-p35-f'>
<div class="input-group<?php if($isMultiple) echo ' required';?>" id="dataPlanGroup">
<?php echo html::select('assignedTo', $isMultiple ? $teamMembers : $members, $isMultiple ? '' : $task->finishedBy, "class='form-control chosen'");?>
<?php if($isMultiple):?>
<span class="input-group-btn team-group hidden"><a class="btn br-0" href="#modalTeam" data-toggle="modal"><?php echo $lang->task->team;?></a></span>
<?php endif;?>
</div>
</td>
<td>
<?php if($isMultiple):?>
<div class="checkbox-primary c-multipleTask affair">
<input type="checkbox" name="multiple" value="1" id="multiple" /><label for="multiple" class="no-margin"><?php echo $lang->task->manageTeam;?></label>
</div>
<?php endif;?>
</td>
</tr>
<?php if($task->isParent == '0'):?>
<tr>
<th><?php echo $lang->task->left;?></th>
<td>
<div class='input-group'>
<?php echo html::input('left', '', "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->task->hour;?></span>
</div>
</td>
</tr>
<?php endif;?>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'doing');?></td>
</tr>
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center'>
<?php
echo html::submitButton($lang->task->activate);
echo html::linkButton($lang->goback, $this->session->taskList);
?>
</td>
</tr>
</table>
<div class='modal fade modal-team' id='modalTeam' data-scroll-inside='false'>
<div class='modal-dialog'>
<div class='modal-content with-padding'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'>
<i class="icon icon-close"></i>
</button>
<h4 class='modal-title'><?php echo $lang->task->team;?></h4>
</div>
<div class='modal-body'>
<table class="table table-form" id='taskTeamEditor'>
<tbody class='sortable'>
<?php include __DIR__ . DS . 'taskteam.html.php';?>
</tbody>
<tfoot>
<tr>
<td colspan='4' class='text-center form-actions'>
<div class='multi-append'></div>
<?php echo html::a('javascript:void(0)', $lang->confirm, '', "id='confirmButton' class='btn btn-primary btn-wide'");?>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php js::set('newRowCount', (!empty($task->team) and count($task->team) < 6) ? 6 - count($task->team) : 1);?>
<?php include '../../common/view/footer.html.php';?>
-72
View File
@@ -1,72 +0,0 @@
<?php
/**
* The complete file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jia Fu <fujia@cnezsoft.com>
* @package task
* @version $Id: complete.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<?php if(!empty($task->members) and strpos('wait,doing,pause', $task->status) !== false and (!isset($task->members[$app->user->account]) or $task->mode == 'linear')):?>
<div class="alert with-icon">
<i class="icon-exclamation-sign"></i>
<div class="content">
<?php if($task->mode == 'linear'):?>
<p><?php echo $lang->task->transferNotice;?></p>
<?php else:?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->transfer);?></p>
<?php endif;?>
</div>
</div>
<?php else:?>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<?php if(!isonlybody()):?>
<small> <?php echo $lang->arrow . (empty($task->team) ? $lang->task->assign : $lang->task->transfer);?></small>
<?php endif;?>
</h2>
</div>
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo (empty($task->team) or strpos('done,cancel,closed', $task->status) !== false) ? $lang->task->assign : $lang->task->transferTo;?></th>
<td class='w-p25-f'><?php echo html::select('assignedTo', $members, (empty($task->team) or strpos('done,cancel,closed', $task->status) !== false) ? $task->assignedTo : $task->nextUser, "class='form-control chosen'");?></td><td></td>
</tr>
<?php if($task->status != 'done' and $task->status != 'closed' and $task->parent >= 0):?>
<tr>
<th><?php echo $lang->task->left;?></th>
<td><div class='input-group'><?php echo html::input('left', $task->left, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td><td></td>
</tr>
<?php endif;?>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', $task->status);?></td>
</tr>
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control w-p98'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::linkButton($lang->goback, $this->session->taskList);?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<?php include '../../common/view/action.html.php';?>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-347
View File
@@ -1,347 +0,0 @@
<?php
/**
* The batch create view of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yangyang Shi <shiyangyang@cnezsoft.com>
* @package task
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('taskConsumed', $taskConsumed);?>
<?php js::set('addChildTask', $lang->task->addChildTask);?>
<?php js::set('isonlybody', isonlybody())?>
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $checkedFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
$colspan = count($visibleFields) + 3;
?>
<?php js::set('checkedFields', $checkedFields);?>
<div id="mainContent" class="main-content fade">
<div class="main-header clearfix">
<h2 class="pull-left">
<?php if($parent):?>
<span class='pull-left'><?php echo $parentTitle . $this->lang->hyphen;?></span>
<?php echo $lang->task->batchCreateChildren;?>
<?php else:?>
<?php echo $lang->task->batchCreate;?>
<?php endif;?>
</h2>
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
<a class="checkbox-primary pull-left" id='zeroTaskStory' href='javascript:toggleZeroTaskStory();'>
<label><?php echo $lang->story->zeroTask;?></label>
</a>
<?php endif;?>
<div class="pull-right btn-toolbar">
<button type='button' data-toggle='modal' data-target="#importLinesModal" class="btn btn-primary"><?php echo $lang->pasteText;?></button>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=batchCreateFields')?>
<?php include '../../common/view/customfield.html.php';?>
<?php if(isonlybody()):?>
<div class="divider"></div>
<button id="closeModal" type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>
<?php endif;?>
</div>
</div>
<form method='post' class='batch-actions-form' target='hiddenwin' enctype='multipart/form-data' id="batchCreateForm">
<div class="table-responsive">
<table class="table table-form" id="tableBody">
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?> moduleBox'><?php echo $lang->task->module?></th>
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?> storyBox'><?php echo $lang->task->story;?></th>
<?php endif;?>
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
<?php if($execution->type == 'kanban'):?>
<th class='c-module'><?php echo $lang->kanbancard->region;?></th>
<th class='c-module'><?php echo $lang->kanbancard->lane;?></th>
<?php endif;?>
<th class='c-type required'><?php echo $lang->task->type;?></span></th>
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?> assignedToBox'><?php echo $lang->task->assignedTo;?></th>
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?> estimateBox'><?php echo $lang->task->estimateAB;?></th>
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?> estStartedBox'><?php echo $lang->task->estStarted;?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->task->deadline;?></th>
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?> descBox'><?php echo $lang->task->desc;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->task->pri;?></th>
<?php
$extendFields = $this->task->getFlowExtendFields();
foreach($extendFields as $extendField)
{
$required = strpos(",$extendField->rules,", ',1,') !== false ? 'required' : '';
echo "<th class='w-100px $required'>{$extendField->name}</th>";
}
?>
<th class='c-actions'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$stories['ditto'] = $lang->task->ditto;
$lang->task->typeList['ditto'] = $lang->task->ditto;
$members['ditto'] = $lang->task->ditto;
$modules['ditto'] = $lang->task->ditto;
if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review') $colspan = $colspan - 1;
?>
<?php for($i = 1; $i <= $config->task->batchCreate; $i++):?>
<?php
if($i == 1)
{
$currentStory = $storyID;
$type = '';
$member = '';
}
else
{
$currentStory = $type = $member = $moduleID = 'ditto';
}
?>
<?php $pri = $parent ? $parentPri : 3;?>
<tr>
<td class='text-left c-id'><?php echo $i;?></td>
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id, $i)'")?>
<?php echo html::hidden("parent[$i]", $parent);?>
</td>
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
<span class='input-group-btn'>
<a id='preview<?php echo $i;?>' href='#' class='btn iframe btn-link btn-icon btn-copy' style='pointer-events:none' data-width='95%' disabled='disabled' title='<?php echo $lang->preview; ?>'><i class='icon-eye'></i></a>
<a href='javascript:copyStoryTitle(<?php echo $i;?>)' class='btn btn-link btn-icon btn-copy' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-arrow-right'></i></a>
<?php echo html::hidden("storyEstimate$i") . html::hidden("storyDesc$i") . html::hidden("storyPri$i");?>
</span>
</div>
</td>
<?php endif;?>
<td style='overflow:visible'>
<div class="input-control has-icon-right">
<?php echo html::input("name[$i]", '', "class='form-control title-import'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix pull-right">
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-icon='color' data-wrapper='input-control-icon-right' data-update-color='#name\\[$i\\]'");?>
</div>
</div>
</td>
<?php if($execution->type == 'kanban'):?>
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen' onchange='setLane(this.value, $i)'");?></td>
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=form-control');?></td>
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
<div class='input-group'>
<?php
echo html::input("estStarted[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
if($i != 1) echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[$i]' id='estStartedDitto$i' " . ($i > 1 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
?>
</div>
</td>
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
<div class='input-group'>
<?php
echo html::input("deadline[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
if($i != 1) echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[$i]' id='deadlineDitto$i' " . ($i > 1 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
?>
</div>
</td>
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
?>
<td class='c-actions text-left'>
<a href='javascript:;' onclick='addRow(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<?php if($i != 1):?>
<a href='javascript:;' onclick='deleteRow(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
<?php endif;?>
</td>
</tr>
<?php endfor;?>
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo $colspan?>' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</tfoot>
</table>
</div>
</form>
</div>
<?php js::set('rowIndex', -- $i);?>
<table class='template' id='trTemp'>
<tbody>
<tr>
<td class='text-left c-id'>%s</td>
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
<?php echo html::select("module[%s]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id, \"%s\")'")?>
<?php echo html::hidden("parent[%s]", $parent);?>
</td>
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated(\"%s\")'");?>
<span class='input-group-btn'>
<a id="preview%s" href='#' class='btn iframe btn-link btn-icon btn-copy' disabled='disabled' title='<?php echo $lang->preview; ?>'><i class='icon-eye'></i></a>
<a href='javascript:copyStoryTitle("%s")' class='btn btn-link btn-icon btn-copy' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-arrow-right'></i></a>
</span>
</div>
</td>
<td style='overflow:visible'>
<div class="input-control has-icon-right">
<?php echo html::input("name[%s]", '', "class='form-control title-import'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix pull-right">
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<?php echo html::hidden("color[%s]", '', "data-provide='colorpicker-later' data-icon='color' data-wrapper='input-control-icon-right' data-update-color='#name\\[%s\\]'");?>
</div>
</div>
</div>
</td>
<td><?php echo html::select("type[%s]", $lang->task->typeList, $type, 'class="form-control"');?></td>
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
<div class='input-group'>
<?php
echo html::input("estStarted[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[%s]' id='estStartedDitto%s' checked/>{$lang->task->ditto}</span>";
?>
</div>
</td>
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
<div class='input-group'>
<?php
echo html::input("deadline[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[%s]' id='deadlineDitto%s' checked/>{$lang->task->ditto}</span>";
?>
</div>
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
?>
<td class='c-actions text-left'>
<a href='javascript:;' onclick='addRow(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteRow(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
</tbody>
</table>
<div>
<?php $i = '%i%';?>
<table class='hidden'>
<tr id='addRow' class='hidden'>
<td class='text-left c-id'><?php echo $i;?></td>
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
<?php echo html::hidden("parent[$i]", $parent);?>
</td>
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
<span class='input-group-btn'>
<a id='preview<?php echo $i;?>' href='#' class='btn iframe btn-link btn-icon btn-copy' style='pointer-events:none' data-width='80%' disabled='disabled' title='<?php echo $lang->preview; ?>'><i class='icon-eye'></i></a>
<a href='javascript:copyStoryTitle(<?php echo $i;?>)' class='btn btn-link btn-icon btn-copy' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-arrow-right'></i></a>
<?php echo html::hidden("storyEstimate$i") . html::hidden("storyDesc$i") . html::hidden("storyPri$i");?>
</span>
</div>
</td>
<?php endif;?>
<td style='overflow:visible'>
<div class="input-control has-icon-right">
<?php echo html::input("name[$i]", '', "class='form-control title-import'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix pull-right">
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-icon='color' data-wrapper='input-control-icon-right' data-update-color='#name\\[$i\\]'");?>
</div>
</div>
</td>
<?php if($execution->type == 'kanban'):?>
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen' onchange='setLane(this.value, $i)'");?></td>
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=form-control');?></td>
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
<div class='input-group'>
<?php
echo html::input("estStarted[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[$i]' id='estStartedDitto$i' checked/> {$lang->task->ditto}</span>";
?>
</div>
</td>
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
<div class='input-group'>
<?php
echo html::input("deadline[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[$i]' id='deadlineDitto$i' checked/> {$lang->task->ditto}</span>";
?>
</div>
</td>
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
?>
<td class='c-actions text-left'>
<a href='javascript:;' onclick='addRow(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteRow(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
</table>
</div>
<?php js::set('executionType', $execution->type);?>
<?php js::set('storyTasks', $storyTasks);?>
<?php js::set('mainField', 'name');?>
<?php js::set('ditto', $lang->task->ditto);?>
<?php js::set('storyID', $storyID);?>
<?php if(isonlybody()):?>
<style>
.body-modal .main-header {padding-right: 0px;}
.btn-toolbar > .dropdown {margin: 0px;}
</style>
<script>
$(function()
{
parent.$('#triggerModal .modal-content .modal-header .close').hide();
});
</script>
<?php endif;?>
<?php include '../../common/view/pastetext.html.php';?>
<?php include '../../common/view/footer.html.php';?>
-183
View File
@@ -1,183 +0,0 @@
<?php
/**
* The batch edit view of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package task
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php
$dittoNotice = sprintf($this->lang->task->dittoNotice, $lang->executionCommon);
js::set('dittoNotice', $dittoNotice);
js::set('showFields', $showFields);
js::set('requiredFields', $config->task->edit->requiredFields);
?>
<div id='mainContent' class='main-content fade'>
<div class='main-header'>
<h2>
<?php echo $lang->task->common . $lang->hyphen . $lang->task->batchEdit;?>
<?php if($executionName and $execution->multiple):?>
<small class='text-muted'><?php echo $lang->task->execution . $lang->hyphen . ' ' . $executionName;?></small>
<?php endif;?>
</h2>
<div class='pull-right btn-toolbar'>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=batchEditFields')?>
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
<?php if(isset($suhosinInfo)):?>
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
<?php else:?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
foreach(explode(',', $config->task->edit->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->task->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
?>
<form id='batchEditForm' class='main-form' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "executionID={$executionID}")?>">
<div class="table-responsive">
<table class='table table-form table-fixed with-border'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='required <?php if(count($visibleFields) > 10) echo 'c-name';?>'><?php echo $lang->task->name?></th>
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?>'><?php echo $lang->task->module?></th>
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
<th class='c-type required'><?php echo $lang->task->type; ?></th>
<th class='c-status<?php echo zget($visibleFields, 'status', ' hidden') . zget($requiredFields, 'status', '', ' required');?>'><?php echo $lang->task->status;?></th>
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
<th class='c-record<?php echo zget($visibleFields, 'record', ' hidden') . zget($requiredFields, 'record', '', ' required');?>'><?php echo $lang->task->consumedThisTime;?></th>
<th class='c-left<?php echo zget($visibleFields, 'left', ' hidden') . zget($requiredFields, 'left', '', ' required');?>'><?php echo $lang->task->leftAB?></th>
<th class='c-user<?php echo zget($visibleFields, 'finishedBy', ' hidden') . zget($requiredFields, 'finishedBy', '', ' required');?>'><?php echo $lang->task->finishedBy;?></th>
<th class='c-user<?php echo zget($visibleFields, 'canceledBy', ' hidden') . zget($requiredFields, 'canceledBy', '', ' required');?>'><?php echo $lang->task->canceledBy;?></th>
<th class='c-user<?php echo zget($visibleFields, 'closedBy', ' hidden') . zget($requiredFields, 'closedBy', '', ' required');?>'><?php echo $lang->task->closedBy;?></th>
<th class='c-reason<?php echo zget($visibleFields, 'closedReason', ' hidden') . zget($requiredFields, 'closedReason', '', ' required');?>'><?php echo $lang->task->closedReason;?></th>
<?php
$extendFields = $this->task->getFlowExtendFields();
foreach($extendFields as $extendField) echo "<th class='c-extend'>{$extendField->name}</th>";
?>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $taskID => $task):?>
<?php
if(!isset($execution))
{
$prjInfo = $this->execution->getById($task->execution);
$modules = $this->tree->getTaskOptionMenu($task->execution, 0, 'allModule');
foreach($modules as $moduleID => $moduleName) $modules[$moduleID] = $prjInfo->name. $moduleName;
$modules = array('ditto' => $this->lang->task->ditto) + $modules;
}
?>
<tr>
<?php $disableAssignedTo = (isset($teams[$taskID]) and (($task->assignedTo != $this->app->user->account and $task->mode == 'linear') or !isset($teams[$taskID][$app->user->account]))) ? "disabled='disabled'" : '';?>
<?php $disableHour = (isset($teams[$taskID]) or $task->parent < 0) ? "disabled='disabled'" : '';?>
<?php
$members = array('' => '', 'ditto' => $this->lang->task->ditto);
$teamAccounts = !empty($executionTeams[$task->execution]) ? array_column($executionTeams[$task->execution], 'account') : array();
foreach($teamAccounts as $teamAccount) $members[$teamAccount] = zget($users, $teamAccount);
$taskMembers = array();
if(isset($teams[$taskID]))
{
$teamAccounts = $teams[$taskID];
foreach($teamAccounts as $teamAccount) $taskMembers[$teamAccount->account] = $users[$teamAccount->account];
}
else
{
if($task->status == 'closed') $members['closed'] = 'Closed';
$taskMembers = $members;
}
if($task->assignedTo and !isset($taskMembers[$task->assignedTo]))
{
$taskMembers[$task->assignedTo] = $users[$task->assignedTo];
}
?>
<td><?php echo $taskID . html::hidden("taskIDList[$taskID]", $taskID);?></td>
<td style='overflow:visible' title='<?php echo $task->name?>'>
<div class="input-control has-icon-right">
<?php echo html::input("name[$taskID]", $task->name, "class='form-control'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><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->story->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<?php echo html::hidden("color[$taskID]", $task->color, "data-provide='colorpicker' data-wrapper='input-control-icon-right' data-icon='color' data-btn-tip='{$lang->task->colorTag}' data-update-text='#name\\[{$taskID}\\]'");?>
</div>
</div>
</td>
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$taskID]", $modules, $task->module, "class='form-control picker-select' data-drop-width='auto'")?></td>
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTo[$taskID]", $taskMembers, $task->assignedTo, "class='form-control picker-select' data-drop-width='auto' {$disableAssignedTo}");?></td>
<td><?php echo html::select("type[$taskID]", $lang->task->typeList, $task->type, "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("status[$taskID]", $lang->task->statusList, $task->status, "class='form-control' {$disableHour}");?></td>
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>><?php echo html::input("estStarted[$taskID]", helper::isZeroDate($task->estStarted) ? '' : $task->estStarted, "class='form-control text-center form-date'");?></td>
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>><?php echo html::input("deadline[$taskID]", helper::isZeroDate($task->deadline) ? '' : $task->deadline, "class='form-control text-center form-date'");?></td>
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[$taskID]", $lang->task->priList, $task->pri, "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[$taskID]", $task->estimate, "class='form-control text-center' {$disableHour}");?></td>
<td <?php echo zget($visibleFields, 'record', "class='hidden'")?>><?php echo html::input("consumed[$taskID]", 0, "class='form-control text-center' {$disableHour}");?></td>
<td <?php echo zget($visibleFields, 'left', "class='hidden'")?>><?php echo html::input("left[$taskID]", $task->left, "class='form-control text-center' {$disableHour}");?></td>
<td class='text-left<?php echo zget($visibleFields, 'finishedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("finishedBy[$taskID]", $members, $task->finishedBy, "class='form-control picker-select' data-drop-width='auto'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'canceledBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("canceledBy[$taskID]", $members, $task->canceledBy, "class='form-control picker-select' data-drop-width='auto'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'closedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("closedBy[$taskID]", $members, $task->closedBy, "class='form-control picker-select' data-drop-width='auto'");?></td>
<td <?php echo zget($visibleFields, 'closedReason', "class='hidden'")?>>
<?php
$reasonList[''] = '';
$closedReason = $task->closedReason;
if(!empty($closedReason))
{
$reasonList[$closedReason] = $lang->task->reasonList[$closedReason];
}
else
{
$status = $task->status;
if($status == 'done' or $status == 'cancel')
{
$reasonList[$status] = $lang->task->reasonList[$status];
}
else
{
$reasonList = $lang->task->reasonList;
}
}
echo html::select("closedReason[$taskID]", $reasonList, $closedReason, 'class=form-control');
?>
</td>
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, $task, $extendField->field . "[{$taskID}]") . "</td>";?>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo count($visibleFields) + 3;?>' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</tfoot>
</table>
</div>
</form>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
-50
View File
@@ -1,50 +0,0 @@
<?php
/**
* The cancel file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jia Fu <fujia@cnezsoft.com>
* @package task
* @version $Id: cancel.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link https://www.zentao.net
*/
?>
<?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>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<?php if(!isonlybody()):?>
<small> <?php echo $lang->arrow . $lang->task->cancel;?></small>
<?php endif;?>
</div>
</div>
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<tr class='w-50px hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'cancel');?></td>
</tr>
<?php $this->printExtendFields($task, 'table');?>
<tr>
<th class='w-50px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center'>
<?php echo html::submitButton($lang->save);?>
<?php echo html::linkButton($lang->goback, $this->session->taskList);?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-49
View File
@@ -1,49 +0,0 @@
<?php
/**
* The close file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author chunsheng wang <chunsheng@cnezsoft.com>
* @package task
* @version $Id: cancel.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link https://www.zentao.net
*/
?>
<?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>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->task->close;?></small>
<?php endif;?>
</h2>
</div>
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'closed');?></td>
</tr>
<?php $this->printExtendFields($task, 'table');?>
<tr>
<th class='w-50px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center'>
<?php echo html::submitButton($lang->task->close);?>
<?php echo html::linkButton($lang->goback, $this->session->taskList);?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-357
View File
@@ -1,357 +0,0 @@
<?php
/**
* The create view of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package task
* @version $Id: create.html.php 5090 2013-07-10 05:49:24Z zhujinyonging@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php js::set('toTaskList', !empty($task->id));?>
<?php js::set('blockID', $blockID);?>
<?php js::set('executionID', $execution->id);?>
<?php js::set('ditto', $lang->task->ditto);?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php js::set('vision', $config->vision);?>
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
<?php js::set('estimateNotEmpty', sprintf($lang->error->gt, $lang->task->estimate, '0'))?>
<?php js::set('lifetime', $execution->lifetime);?>
<?php js::set('attribute', $execution->attribute);?>
<?php js::set('lifetimeList', $lifetimeList);?>
<?php js::set('attributeList', $attributeList);?>
<?php js::set('hasProduct', $execution->hasProduct);?>
<?php
$requiredFields = array();
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field) $requiredFields[$field] = '';
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
}
?>
<?php js::set('showFields', $showFields);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->task->create;?></h2>
<div class='btn-toolbar pull-right'>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=createFields')?>
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
<?php if($execution->type != 'kanban' or $this->config->vision == 'lite'):?>
<tr class="<?php echo !$execution->multiple ? 'hidden' : '';?>">
<th><?php echo $lang->task->execution;?></th>
<td><?php echo html::select('execution', $executions, $execution->id, "class='form-control chosen' onchange='loadAll(this.value)' required");?></td><td></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->type;?></th>
<td><?php echo html::select('type', $lang->task->typeList, $task->type, "class='form-control chosen' onchange='setOwners(this.value)' required");?></td>
<td>
<div class="checkbox-primary c-selectStory hidden" id='selectTestStoryBox'>
<input type="checkbox" name='selectTestStory' id="selectTestStory" value='1' onchange='toggleSelectTestStory()' /><label for="selectTestStory" class="no-margin"><?php echo $lang->task->selectTestStory;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->task->module;?></th>
<td id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $task->module, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'");?></td>
<td>
<div class="checkbox-primary c-modulel">
<input type="checkbox" id="showAllModule" <?php if($showAllModule) echo 'checked';?>><label for="showAllModule" class="no-margin"><?php echo $lang->task->allModule;?></label>
</div>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
<td>
<div class="input-group" id="dataPlanGroup">
<?php echo html::select('assignedTo[]', $members, $task->assignedTo, "class='form-control chosen'");?>
<?php
$teamMember = '';
if(!empty($task->team))
{
foreach($task->team as $team) $teamMember .= ' ' . zget($members, $team->account);
}
?>
<?php echo html::input('teamMember', $teamMember, "class='form-control team-group fix-border hidden' readonly='readonly'");?>
<span class="input-group-btn team-group hidden"><a class="btn br-0" href="#modalTeam" data-toggle="modal"><?php echo $lang->task->team;?></a></span>
</div>
</td>
<td colspan='2'>
<div class="checkbox-primary c-multipleTask affair" style='display: inline-block; margin-right: 10px'>
<input type="checkbox" name="multiple" value="1" id="multipleBox" /><label for="multipleBox" class="no-margin"><?php echo $lang->task->multiple;?></label>
</div>
<div class='hidden modeBox' style='display: inline-block'><?php echo html::radio('mode', $lang->task->modeList, !empty($task->mode) ? $task->mode: 'linear');?></div>
<button id='selectAllUser' type="button" class="btn btn-link<?php if($task->type !== 'affair') echo ' hidden';?>"><?php echo $lang->task->selectAllUser;?></button>
</td>
</tr>
<?php if($execution->type == 'kanban'):?>
<tr>
<th><?php echo $lang->kanbancard->region;?></th>
<td><?php echo html::select('region', $regionPairs, $regionID, "onchange='setLane(this.value)' class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->kanbancard->lane;?></th>
<td><?php echo html::select('lane', $lanePairs, $laneID, "class='form-control chosen'");?></td>
</tr>
<?php endif;?>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'wait');?></td>
</tr>
<?php $this->printExtendFields('', 'table', 'columns=3');?>
<?php $hiddenStory = (strpos(",$showFields,", ',story,') !== false and $features['story']) ? '' : 'hidden'?>
<tr class="<?php echo $hiddenStory?> storyBox">
<th><?php echo $lang->task->story;?></th>
<td colspan='3'>
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> ">
<?php
$noticeLinkStory = sprintf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));
if(empty($execution->hasProduct)) $noticeLinkStory = $lang->task->noticeLinkStoryNoProduct;
echo $noticeLinkStory;
?>
</span>
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<?php if(common::hasPriv('execution', 'storyView')):?>
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe' data-width="85%" data-height="300px"><?php echo $lang->preview;?></a></span>
<?php endif;?>
</div>
</td>
</tr>
<?php if($execution->lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))):?>
<tr id='testStoryBox' class='hidden'>
<th><?php echo $lang->task->selectTestStory;?></th>
<td colspan='3'>
<table class='table table-form mg-0 table-bordered'>
<thead>
<tr class='text-center'>
<th class='c-name'><?php echo $lang->task->storyAB;?></th>
<th class='c-pri <?php if(isset($requiredFields['pri'])) echo 'required';?>'><?php echo $lang->task->pri;?></th>
<th class='c-date <?php if(isset($requiredFields['estStarted'])) echo 'required';?>'><?php echo $lang->task->estStarted;?></th>
<th class='c-date <?php if(isset($requiredFields['deadline'])) echo 'required';?>'><?php echo $lang->task->deadline;?></th>
<th class='c-assignedTo'><?php echo $lang->task->assignedTo;?></th>
<th class='c-estimate <?php if(isset($requiredFields['estimate'])) echo 'required';?>'><?php echo $lang->task->estimate;?></th>
<th class='c-actions'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class="resarch">
<?php $i = 0;?>
<?php foreach($testStories as $storyID => $storyTitle):?>
<?php if($i > 0) $members['ditto'] = $lang->task->ditto;?>
<tr>
<td><?php echo html::select("testStory[$i]", array($storyID => $storyTitle), $storyID, "class='form-control chosen'");?></td>
<td><?php echo html::select("testPri[$i]", $lang->task->priList, $task->pri, "class='form-control chosen'");?></td>
<td>
<div class='input-group'>
<?php
echo html::input("testEstStarted[$i]", $task->estStarted, "class='startInput form-control form-date' onchange='hiddenDitto(this)' placeholder='{$lang->task->estStarted}'");
if($i != 0) echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[$i]' id='estStartedDitto' " . ($i > 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
?>
</div>
<td>
<div class='input-group'>
<?php
echo html::input("testDeadline[$i]", $task->deadline, "class='deadlineInput form-control form-date' onchange='hiddenDitto(this)' placeholder='{$lang->task->deadline}'");
if($i != 0) echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[$i]' id='deadlineDitto' " . ($i > 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
?>
</div>
</td>
<td><?php echo html::select("testAssignedTo[$i]", $members, $i == 0 ? $task->assignedTo : 'ditto', "class='form-control chosen'");?></td>
<td><?php echo html::input("testEstimate[$i]", '', "class='form-control'");?></td>
<td class='text-center'>
<div class="btn-group">
<button type="button" class="btn btn-sm" tabindex="-1" onclick='addItem(this)'><i class="icon icon-plus"></i></button>
<button type="button" class="btn btn-sm" tabindex="-1" onclick='removeItem(this)'><i class="icon icon-close"></i></button>
</div>
</td>
</tr>
<?php $i++;?>
<?php if($i > 30) break;?>
<?php endforeach;?>
<?php js::set('index', $i);?>
<?php unset($members['ditto']);?>
</tbody>
</table>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->name;?></th>
<td colspan='3'>
<div class='keep-row-height'>
<div class="input-group title-group">
<div class="input-control has-icon-right">
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><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="" data-icon="color" data-wrapper="input-control-icon-right" data-update-color="#name" data-provide="colorpicker">
</div>
<?php echo html::input('name', $task->name, "class='form-control' required");?>
<a href='javascript:copyStoryTitle();' id='copyButton' class='input-control-icon-right'><?php echo $lang->task->copyStoryTitle;?></a>
<?php echo html::hidden("storyEstimate") . html::hidden("storyDesc") . html::hidden("storyPri");?>
</div>
<?php $hiddenPri = strpos(",$showFields,", ',pri,') !== false ? '' : 'hidden'; // begin print pri selector?>
<span class="input-group-addon fix-border br-0 <?php echo $hiddenPri;?> priBox"><?php echo $lang->task->pri;?></span>
<?php
$hasCustomPri = false;
foreach($lang->task->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
$priList = $lang->task->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$task->pri]))
{
reset($priList);
$task->pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control $hiddenPri'");?>
<?php else: ?>
<div class="input-group-btn pri-selector <?php echo $hiddenPri;?> priBox" data-type="pri">
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($task->pri) ? '0' : $task->pri?>" title="<?php echo $task->pri?>"><?php echo $task->pri?></span></span> &nbsp;<span class="caret"></span>
</button>
<div class='dropdown-menu pull-right'>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
</div>
</div>
<?php endif; ?>
<?php $hiddenEstimate = strpos(",$showFields,", ',estimate,') !== false ? '' : 'hidden';?>
<div class="table-col w-120px <?php echo $hiddenEstimate;?> estimateBox">
<div class="input-group">
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->estimateAB;?></span>
<input type="text" name="estimate" id="estimate" value="<?php echo $task->estimate;?>" class="form-control" autocomplete="off">
</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->task->desc;?></th>
<td colspan='3'>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=task&link=desc');?>
<?php echo html::textarea('desc', htmlSpecialString($task->desc), "rows='10' class='form-control kindeditor'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<?php
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false ? 'hidden' : '';
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false ? 'hidden' : '';
$hiddenDatePlan = (!$hiddenEstStarted or !$hiddenDeadline) ? '' : 'hidden';
?>
<tr class="<?php echo $hiddenDatePlan?> datePlanBox">
<th><?php echo $lang->task->datePlan;?></th>
<td colspan='2'>
<div class='input-group'>
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date $hiddenEstStarted estStartedBox' placeholder='{$lang->task->estStarted}'");?>
<?php $hiddenborder = (!$hiddenEstStarted and !$hiddenDeadline) ? '' : 'hidden';?>
<span class="input-group-addon fix-border <?php echo $hiddenborder?> borderBox">~</span>
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date $hiddenDeadline deadlineBox' placeholder='{$lang->task->deadline}'");?>
</div>
</td>
</tr>
<?php $hiddenMailto = strpos(",$showFields,", ',mailto,') !== false ? '' : 'hidden';?>
<tr class="<?php echo $hiddenMailto?> mailtoBox">
<th><?php echo $lang->story->mailto;?></th>
<td colspan='3'>
<div class="input-group">
<?php echo html::select('mailto[]', $users, str_replace(' ', '', $task->mailto), "class='form-control picker-select' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
<?php if($execution->acl != 'private') echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
</tr>
<?php if(!isonlybody()):?>
<tr id='after-tr'>
<th><?php echo $lang->task->afterSubmit;?></th>
<td colspan='3'><?php echo html::radio('after', $lang->task->afterChoices, !empty($task->id) ? 'toTaskList' : 'continueAdding');?></td>
</tr>
<?php endif;?>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo $gobackLink ? html::a($gobackLink, $lang->goback, '', 'class="btn btn-wide"') : html::backButton();?>
</td>
</tr>
</table>
<div class='modal fade modal-team' id='modalTeam' data-scroll-inside='false'>
<div class='modal-dialog'>
<div class='modal-content with-padding'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'>
<i class="icon icon-close"></i>
</button>
<h4 class='modal-title'><?php echo $lang->task->teamSetting;?></h4>
</div>
<div class='modal-body'>
<table class="table table-form" id='taskTeamEditor'>
<tbody class='sortable'>
<?php include __DIR__ . DS . 'taskteam.html.php';?>
</tbody>
<tfoot>
<tr>
<td colspan='4' class='text-center form-actions'><?php echo html::a('javascript:void(0)', $lang->confirm, '', "id='confirmButton' class='btn btn-primary'");?></td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<table class='hidden' id='testStoryTemplate'>
<tr>
<td><?php echo html::select("testStory[]", array(0 => ''), 0, "class='form-control chosen'");?></td>
<td><?php echo html::select("testPri[]", $lang->task->priList, '', "class='form-control chosen'");?></td>
<td>
<div class='input-group'>
<?php echo html::input("testEstStarted[]", '', "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
<span class='input-group-addon fix-border'>~</span>
<?php echo html::input("testDeadline[]", '', "class='form-control form-date' placeholder='{$lang->task->deadline}'");?>
</div>
</td>
<td><?php echo html::select("testAssignedTo[]", array('' => ''), '', "class='form-control chosen'");?></td>
<td><?php echo html::input("testEstimate[]", '', "class='form-control'");?></td>
<td class='text-center'>
<div class="btn-group">
<button type="button" class="btn btn-sm" tabindex="-1" onclick='addItem(this)'><i class="icon icon-plus"></i></button>
<button type="button" class="btn btn-sm" tabindex="-1" onclick='removeItem(this)'><i class="icon icon-close"></i></button>
</div>
</td>
</tr>
</table>
<?php js::set('stories', $testStories);?>
<?php js::set('storyPinYin', (empty($config->isINT) and class_exists('common')) ? common::convert2Pinyin($testStories) : array());?>
<?php js::set('testStoryIdList', $testStoryIdList);?>
<?php js::set('executionID', $execution->id);?>
<?php js::set('executionType', $execution->type);?>
<?php js::set('newRowCount', 5);?>
<script>
$(function(){parent.$('body.hide-modal-close').removeClass('hide-modal-close');})
</script>
<?php include '../../common/view/footer.html.php';?>
-310
View File
@@ -1,310 +0,0 @@
<?php
/**
* The edit view of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.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 https://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 include '../../common/view/sortable.html.php';?>
<?php js::set('oldStoryID', $task->story);?>
<?php js::set('oldAssignedTo', $task->assignedTo);?>
<?php js::set('oldExecutionID', $task->execution);?>
<?php js::set('oldConsumed', $task->consumed);?>
<?php js::set('taskStatus', $task->status);?>
<?php js::set('currentUser', $app->user->account);?>
<?php js::set('team', $task->members);?>
<?php js::set('members', $members);?>
<?php js::set('page', 'edit');?>
<?php js::set('confirmChangeExecution', $lang->task->confirmChangeExecution);?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php js::set('totalLeftError', sprintf($this->lang->task->error->leftEmptyAB, $this->lang->task->statusList[$task->status]));?>
<?php js::set('estimateNotEmpty', sprintf($lang->error->gt, $lang->task->estimate, '0'))?>
<?php js::set('leftNotEmpty', sprintf($lang->error->gt, $lang->task->left, '0'))?>
<?php js::set('requiredFields', $config->task->edit->requiredFields);?>
<?php
$requiredFields = array();
foreach(explode(',', $config->task->edit->requiredFields) as $field)
{
if($field) $requiredFields[$field] = '';
}
?>
<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="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" placeholder="' . $lang->task->name . '"');?>
</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', htmlSpecialString($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>
<?php $this->printExtendFields($task, 'div', 'position=left');?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->files;?></div>
<div class='detail-content'>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'false', 'object' => $task, 'method' => 'edit'));?>
<?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();?>
<?php echo html::backButton();?>
</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($task->parent <= 0 and $execution->multiple):?>
<tr>
<th class='thWidth'><?php echo $lang->task->execution;?></th>
<td><?php echo html::select('execution', $executions, $task->execution, 'class="form-control chosen" onchange="loadAll(this.value)"');?></td>
</tr>
<?php else:?>
<?php echo html::hidden('execution', $task->execution);?>
<?php endif;?>
<tr>
<th class='thWidth'><?php echo $lang->task->module;?></th>
<td>
<div class='table-row'>
<span class='table-col' id="moduleIdBox"><?php echo html::select('module', $modules, $task->module, 'class="form-control chosen"');?></span>
<span class='table-col text-middle pl-10px' id='showAllModuleBox'>
<div class="checkbox-primary">
<input type="checkbox" id="showAllModule" <?php if($showAllModule) echo 'checked';?>><label for="showAllModule" class="no-margin"><?php echo $lang->all;?></label>
</div>
</span>
</div>
</td>
</tr>
<?php if($execution->lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))):?>
<tr>
<th><?php echo $lang->task->story;?></th>
<td><span id="storyIdBox"><?php echo html::select('story', $stories, $task->story, "class='form-control chosen' data-drop_direction='down' data-max_drop_width='0'");?></span></td>
</tr>
<?php endif;?>
<?php if($task->parent >= 0 and empty($task->team)):?>
<tr>
<th><?php echo $lang->task->parent;?></th>
<td><?php echo html::select('parent', $tasks, $task->parent, "class='form-control chosen'");?></td>
</tr>
<?php endif;?>
<tr class="modeBox">
<th><?php echo $lang->task->mode;?></th>
<td>
<?php
if($task->status == 'wait' and $task->parent == 0)
{
echo html::select('mode', $lang->task->editModeList, $task->mode, "class='form-control chosen'");
}
else
{
if($task->mode == '')
{
echo $lang->task->editModeList['single'];
}
else
{
echo zget($lang->task->editModeList, $task->mode);
}
}
?>
</td>
</tr>
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
<?php $disableAssignedTo = (!empty($task->team) and $task->mode == 'linear') ? "disabled='disabled'" : '';?>
<?php
$taskMembers = array();
if(!empty($task->team))
{
$teamAccounts = $task->members;
foreach($teamAccounts as $teamAccount)
{
if(!isset($members[$teamAccount])) continue;
$taskMembers[$teamAccount] = $members[$teamAccount];
}
}
else
{
$taskMembers = $members;
}
?>
<td>
<div class='input-group' id='assignedToIdBox'>
<?php $hiddenTeam = $task->mode != '' ? '' : 'hidden';?>
<?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?>
<span class="input-group-btn team-group <?php echo $hiddenTeam;?>"><a class="btn br-0" href="#modalTeam" data-toggle="modal"><?php echo $lang->task->team;?></a></span>
</div>
</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[]', $users, $task->mailto, 'class="form-control picker-select" multiple data-drop-direction="bottom"');?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</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='thWidth'><?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->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 $readonly = (!empty($task->team) or $task->parent < 0) ? "readonly" : '';?>
<?php echo html::input('estimate', $task->estimate, "class='form-control' {$readonly}");?>
</td>
</tr>
<tr>
<th><?php echo $lang->task->consumed;?></th>
<td><?php echo '<span id=consumedSpan>' . $task->consumed . '</span> '; common::printIcon('task', 'recordWorkhour', "taskID=$task->id", $task, 'list', '', '', 'record-estimate-toggle btn-link', true);?></td>
</tr>
<tr>
<th><?php echo $lang->task->left;?></th>
<td><?php echo html::input('left', $task->left, "class='form-control' {$readonly}");?></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='lifeThWidth'><?php echo $lang->task->openedBy;?></th>
<td><?php echo zget($users, $task->openedBy);?></td>
</tr>
<tr>
<th><?php echo $lang->task->realStarted;?></th>
<td><?php echo html::input('realStarted', helper::isZeroDate($task->realStarted) ? '' : $task->realStarted, "class='form-control form-datetime'");?></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-datetime"');?></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-datetime"');?></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-datetime"');?></td>
</tr>
</table>
</div>
<?php $this->printExtendFields($task, 'div', 'position=right');?>
</div>
</div>
</div>
<div class="modal fade modal-team" id="modalTeam" data-scroll-inside='false'>
<div class="modal-dialog">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<i class="icon icon-close"></i>
</button>
<h4 class="modal-title"><?php echo $lang->task->team?></h4>
</div>
<div class="modal-content with-padding" id='taskTeamEditor'>
<?php if(strpos('|closed|cancel|pause|', $task->status) !== false):?>
<h2 class='label label-info'>
<?php echo $this->lang->task->error->teamCantOperate;?>
</h2>
<?php endif;?>
<table class='table table-form'>
<tbody class="sortable">
<?php include dirname(__FILE__) . DS . 'taskteam.html.php';?>
</tbody>
<tfoot>
<?php if(strpos('|closed|cancel|pause|', $task->status) === false):?>
<tr><td colspan='3' class='text-center form-actions'><?php echo html::a('javascript:void(0)', $lang->confirm, '', "id='confirmButton' class='btn btn-primary btn-wide'");?></td></tr>
<?php endif;?>
</tfoot>
</table>
</div>
</div>
</div>
</form>
</div>
<?php js::set('executionID', $execution->id);?>
<?php include '../../common/view/footer.html.php';?>
-73
View File
@@ -1,73 +0,0 @@
<?php
/**
* The editEffort view of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package task
* @version $Id: editestimate.html.php 4263 2013-02-24 08:50:46Z zhujinyonging@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('confirmRecord', $lang->task->confirmRecord);?>
<?php js::set('today', helper::today());?>
<div id='mainContent' class='main-content'>
<div class='center-block mw-600px'>
<div class='main-header'>
<h2><?php echo $lang->task->editEffort;?></h2>
</div>
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->task->date;?></th>
<td class='w-p45 required'><?php echo html::input('date', $estimate->date, 'class="form-control form-date"');?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->task->record;?></th>
<td class='required'><?php echo html::input('consumed', $estimate->consumed, 'class="form-control"');?></td>
</tr>
<tr>
<th><?php echo $lang->task->left;?></th>
<?php $readonly = $estimate->isLast ? '' : 'readonly';?>
<?php if(!empty($task->team) and $estimate->left == 0) $readonly = 'readonly';?>
<td><?php echo html::input('left', $estimate->left, "class='form-control' {$readonly}");?></td>
</tr>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('work', $estimate->work, "class=form-control");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</table>
</form>
</div>
</div>
<?php if($estimate->isLast):?>
<script>
$(function()
{
$("#submit").click(function(e, confirmed)
{
if(confirmed) return true;
var $this = $(this);
var $left = $('#left');
var left = $.trim($left.val());
if(!$left.prop('readonly') && left == 0)
{
e.preventDefault();
bootbox.confirm(confirmRecord, function(result)
{
if(result) $this.trigger('click', true);
});
}
});
})
</script>
<?php endif;?>
<?php include '../../common/view/footer.lite.html.php';?>
-13
View File
@@ -1,13 +0,0 @@
<?php
/**
* The export view file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Congzhi Chen<congzhi@cnezsoft.com>
* @package task
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php include '../../file/view/export.html.php';?>
-137
View File
@@ -1,137 +0,0 @@
<?php
/**
* The complete file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jia Fu <fujia@cnezsoft.com>
* @package task
* @version $Id: complete.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('task', $task);?>
<?php js::set('consumedEmpty', $lang->task->error->consumedEmptyAB);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<?php if(!empty($task->members) and (!isset($task->members[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
<div class="alert with-icon">
<i class="icon-exclamation-sign"></i>
<div class="content">
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->finish);?></p>
<?php else:?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->finish);?></p>
<?php endif;?>
</div>
</div>
<?php else:?>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<?php if(!isonlybody()):?>
<small> <?php echo $lang->arrow . $lang->task->finish;?></small>
<?php endif;?>
</div>
</div>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='thWidth'><?php echo !empty($task->team) ? $lang->task->common . $lang->task->consumed : $lang->task->hasConsumed;?></th>
<td class='w-p25-f'><?php echo $task->consumed;?> <?php echo $lang->workingHour;?></td>
<td></td>
</tr>
<?php if(!empty($task->team)):?>
<tr>
<th class='thWidth'><?php echo $lang->task->my . $lang->task->hasConsumed;?></th>
<td class='w-p25-f'><?php echo (float)$task->myConsumed;?> <?php echo $lang->workingHour;?></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->currentConsumed;?></th>
<td>
<div class='input-group'><?php echo html::input('currentConsumed', 0, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div>
</td>
<td>
<div class='table-row'>
<div class='table-col strong w-80px text-right' style='padding-right:10px'><?php echo empty($task->team) ? $lang->task->consumed : $lang->task->myConsumed;?> </div>
<div class='table-col'>
<?php $consumed = empty($task->team) ? $task->consumed : (float)$task->myConsumed;?>
<?php
echo "<span id='totalConsumed'>" . (float)$consumed . "</span> " . $lang->workingHour . html::hidden('consumed', $consumed);
js::set('consumed', $consumed);
?>
</div>
</div>
</td>
</tr>
<tr>
</tr>
<tr class='<?php if($task->mode == 'multi') echo 'hidden'?>'>
<th><?php echo $lang->task->assign;?></th>
<td>
<?php
if(!empty($task->team) and $task->mode == 'linear')
{
echo zget($members, $task->nextBy) . html::hidden('assignedTo', $task->nextBy);
}
else
{
echo html::select('assignedTo', $members, $task->nextBy, "class='form-control chosen'");
}
?>
</td>
</tr>
<tr>
<th><?php echo $lang->task->realStarted;?></th>
<td>
<div class='datepicker-wrapper'>
<?php
$realStarted = substr($task->realStarted, 0, 19);
$readonly = 'readonly';
if(helper::isZeroDate($realStarted))
{
$realStarted = '';
$readonly = '';
}
?>
<?php echo html::input('realStarted', $realStarted, "class='form-control" . ($readonly ? '' : ' form-datetime') . "' $readonly");?>
</div>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->task->finishedDate;?></th>
<td><div class='datepicker-wrapper'><?php echo html::input('finishedDate', helper::now(), "class='form-control form-datetime'");?></div></td><td></td>
</tr>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'done');?></td>
</tr>
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton($lang->task->finish);?>
<?php echo html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide');?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-63
View File
@@ -1,63 +0,0 @@
<?php
/**
* The pause file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package task
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<?php if(!empty($task->members) and (!isset($task->members[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
<div class="alert with-icon">
<i class="icon-exclamation-sign"></i>
<div class="content">
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->pause);?></p>
<?php else:?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->pause);?></p>
<?php endif;?>
</div>
</div>
<?php else:?>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->task->pause;?></small>
<?php endif;?>
</div>
</div>
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'pause');?></td>
</tr>
<?php $this->printExtendFields($task, 'table');?>
<tr>
<th class='w-60px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide');?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-183
View File
@@ -1,183 +0,0 @@
<?php
/**
* The record file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang<wwccss@gmail.com>
* @package task
* @version $Id: record.html.php 935 2013-01-08 07:49:24Z wwccss@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('foldEffort', $lang->task->foldEffort);?>
<?php js::set('unfoldEffort', $lang->task->unfoldEffort);?>
<?php js::set('taskID', $task->id);?>
<?php if(!$this->task->canOperateEffort($task) and empty($myOrders)):?>
<style>#mainContent {min-height: unset;}</style>
<?php endif;?>
<?php $members = $task->members;?>
<?php
$confirmRecord = $lang->task->confirmRecord;
if(!empty($members) && $task->mode == 'linear')
{
$nextAccount = '';
$isCurrent = false;
foreach($task->team as $taskTeam)
{
if($isCurrent)
{
$nextAccount = $taskTeam->account;
break;
}
if($task->assignedTo == $taskTeam->account and $taskTeam->account == $app->user->account and $taskTeam->status != 'done') $isCurrent = true;
}
if($nextAccount) $confirmRecord = sprintf($lang->task->confirmTransfer, zget($users, $nextAccount));
}
?>
<?php js::set('confirmRecord', $confirmRecord);?>
<?php js::set('noticeSaveRecord', $lang->task->noticeSaveRecord);?>
<?php js::set('today', helper::today());?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
</h2>
<ul class='nav nav-default hours'>
<li><span><?php echo $lang->task->estimate;?></span> </li>
<li><span class='estimateTotally'><?php echo $task->estimate . 'h';?></span></li>
<li>,</li>
<li><span><?php echo $lang->task->consumed;?></span> </li>
<li><span class='consumedTotally'><?php echo $task->consumed . 'h';?></span></li>
</ul>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->task->logEfforts;?></small>
<?php endif;?>
</div>
<?php if(!empty($efforts)):?>
<?php if(!empty($task->team) and $task->mode == 'linear'):?>
<?php include __DIR__ . '/lineareffort.html.php';?>
<?php else:?>
<table class='table table-bordered table-fixed table-recorded has-sort-head taskEffort'>
<thead>
<tr class='text-center'>
<?php $vars = "taskID=$task->id&from=$from&orderBy=%s";?>
<th class="w-120px"><?php common::printOrderLink('date', !strpos($orderBy, ',') ? $orderBy : 'date_asc', $vars, $lang->task->date);?></th>
<th class="w-120px text-center"><?php echo $lang->task->recordedBy;?></th>
<th class='text-left'><?php echo $lang->task->work;?></th>
<th class="thWidth text-center"><?php echo $lang->task->consumed;?></th>
<th class="thWidth text-center"><?php echo $lang->task->left;?></th>
<th class='c-actions-2'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $i = 1;?>
<?php foreach($efforts as $effort):?>
<?php $hidden = ($taskEffortFold and $i > 3) ? 'hidden' : ''?>
<tr class="text-center <?php echo $hidden;?>">
<td><?php echo $effort->date;?></td>
<td><?php echo zget($users, $effort->account);?></td>
<td class="text-left" title="<?php echo $effort->work;?>"><?php echo $effort->work;?></td>
<td title="<?php echo $effort->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $effort->consumed . ' ' . $lang->execution->workHourUnit;?></td>
<td title="<?php echo $effort->left . ' ' . $lang->execution->workHour;?>"><?php echo $effort->left . ' ' . $lang->execution->workHourUnit;?></td>
<td align='center' class='c-actions'>
<?php
$canOperateEffort = $this->task->canOperateEffort($task, $effort);
common::printIcon('task', 'editEffort', "effortID=$effort->id", '', 'list', 'edit', '', 'showinonlybody', true, $canOperateEffort ? '' : 'disabled');
common::printIcon('task', 'deleteWorkhour', "effortID=$effort->id", '', 'list', 'trash', 'hiddenwin', 'showinonlybody', false, $canOperateEffort ? '' : 'disabled');
?>
</td>
</tr>
<?php $i ++;?>
<?php endforeach;?>
</tbody>
</table>
<?php if(count($efforts) > 3):?>
<div id='toggleFoldIcon'>
<?php $icon = $taskEffortFold ? 'icon-angle-down' : 'icon-angle-top'?>
<?php $iconText = $taskEffortFold ? $lang->task->unfoldEffort : $lang->task->foldEffort;?>
<span class='icon-border'><i class="icon <?php echo $icon;?>"></i></span>
<span class='text'><?php echo $iconText;?></span>
</div>
<?php endif;?>
<?php endif;?>
<?php endif;?>
<?php if(!$this->task->canOperateEffort($task) and empty($myOrders)):?>
<div class="alert with-icon">
<i class="icon-exclamation-sign"></i>
<div class="content">
<?php if(!isset($task->members[$app->user->account])):?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->logEfforts);?></p>
<?php elseif($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
<?php endif;?>
</div>
</div>
<?php else:?>
<form id="recordForm" class='hidden form-ajax' method='post'>
<?php
$readonly = '';
$left = '';
if(($task->assignedTo != $app->user->account or strpos('closed,cancel,done,pause', $task->status) !== false) and !empty($task->team) and $task->mode == 'linear' and !empty($myOrders))
{
$readonly = ' readonly';
$left = 0;
$reverseOrders = array_reverse($myOrders, true);
foreach($reverseOrders as $order => $count) $reverseOrders[$order] = $order + 1;
}
?>
<table class='table table-form table-fixed table-record'>
<thead>
<tr class='text-center'>
<th class="w-150px required"><?php echo $lang->task->date;?></th>
<?php if($readonly):?>
<th class="w-60px <?php if(count($reverseOrders) == 1) echo "hidden"?>"><?php echo $lang->task->teamOrder;?></th>
<?php endif;?>
<th><?php echo $lang->task->work;?></th>
<th class="w-100px required"><?php echo $lang->task->consumedAB;?></th>
<th class="w-100px <?php if(empty($readonly)) echo 'required'?>"><?php echo $lang->task->leftAB;?></th>
</tr>
</thead>
<tbody>
<?php for($i = 1; $i <= 5; $i++):?>
<tr class="text-center">
<td>
<div class='input-group date-group'>
<?php echo html::input("date[$i]", helper::today(), "class='form-control text-center form-date'");?>
<span class='input-group-addon'><i class='icon icon-calendar'></i></span>
</div>
<?php echo html::hidden("id[$i]", $i);?>
</td>
<?php if($readonly):?>
<td class='<?php if(count($reverseOrders) == 1) echo "hidden"?>'><?php echo html::select("order[$i]", $reverseOrders, '', "class='form-control'")?></td>
<?php endif;?>
<td class="text-left"><?php echo html::textarea("work[$i]", '', "class='form-control' rows=1");?></td>
<td>
<div class='input-group'>
<?php echo html::input("consumed[$i]", '', "class='form-control text-center'");?>
<span class='input-group-addon'>h</span>
</div>
</td>
<td>
<div class='input-group'>
<?php echo html::input("left[$i]", $left, "class='form-control text-center left' {$readonly}");?>
<span class='input-group-addon'>h</span>
</div>
</td>
</tr>
<?php endfor;?>
</tbody>
</table>
<div class='table-footer text-center form-actions'><?php echo html::submitButton() . html::backButton('', '', 'btn btn-wide');?></div>
</form>
<?php endif;?>
</div>
</div>
<?php if(count($efforts) > 3):?>
<style>.taskEffort {margin-bottom: 5px;}</style>
<?php endif;?>
<?php include '../../common/view/footer.lite.html.php';?>
-90
View File
@@ -1,90 +0,0 @@
<?php
/**
* The report view file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author wenjie<wenjie@cnezsoft.com>
* @package execution
* @version $Id: report.html.php 1594 2011-04-10 11:00:00Z wj $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::backButton($lang->goback, '', 'btn');?>
<div class='divider'></div>
<div class='page-title'>
<span class='text'><?php echo $lang->task->report->common;?></span>
</div>
</div>
</div>
<div id="mainContent" class='main-row'>
<div class='side-col col-lg'>
<div class='panel'>
<div class='panel-heading'>
<div class='panel-title'><?php echo $lang->task->report->select;?></div>
</div>
<div class='panel-body'>
<form method='post' id='chartTypesForm' class='no-stash'>
<div class='checkboxes'>
<?php echo html::checkBox('charts', $lang->task->report->charts, $checkedCharts, '', 'block')?>
</div>
<div class='btn-toolbar'>
<?php echo html::selectAll();?>
<?php echo html::submitButton($lang->task->report->create, "", 'btn btn-primary');?>
</div>
</form>
</div>
</div>
</div>
<div class='main-col'>
<div class='cell'>
<div class='btn-toolbar'>
<?php foreach($lang->report->typeList as $type => $typeName):?>
<?php echo html::a("javascript:changeChartType(\"$type\")", ($type == 'default' ? "<i class='icon icon-list-alt muted'></i> " : "<i class='icon icon-chart-{$type} muted'></i> ") . $typeName, '', "class='btn btn-link " . ($type == $chartType ? 'btn-active-line' : '') . "'")?>
<?php endforeach;?>
</div>
<div class='text-muted' style='padding-top:5px'><?php echo str_replace('%tab%', $lang->execution->unclosed . $lang->task->common, $lang->report->notice->help);?></div>
<?php foreach($charts as $chartType => $chartOption):?>
<div class='table-row chart-row'>
<div class='main-col'>
<div class='chart-wrapper text-center'>
<h4><?php echo $lang->task->report->charts[$chartType];?></h4>
<div class='chart-canvas'><canvas id='chart-<?php echo $chartType ?>' width='<?php echo $chartOption->width;?>' height='<?php echo $chartOption->height;?>' data-responsive='true'></canvas></div>
</div>
</div>
<div class='side-col col-xl'>
<div style="overflow:auto;" class='table-wrapper'>
<table class='table table-condensed table-hover table-striped table-bordered table-chart' data-chart='<?php echo $chartOption->type; ?>' data-target='#chart-<?php echo $chartType ?>' data-animation='false'>
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->task->report->$chartType->item;?></th>
<th class='w-60px text-right'><?php echo $lang->task->report->value;?></th>
<th class='w-60px text-right'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<tbody>
<?php foreach($datas[$chartType] as $key => $data):?>
<tr>
<td class='chart-color w-20px'><i class='chart-color-dot'></i></td>
<td class='chart-label text-left'><?php echo $data->name;?></td>
<td class='chart-value text-right'><?php echo $data->value;?></td>
<?php $percent = $data->percent * 100;?>
<?php $percent = sprintf("%.2f", $percent);?>
<td class='text-right'><?php echo $percent . '%';?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<?php endforeach;?>
</div>
</div>
</div>
<?php js::set('executionID', $executionID);?>
<?php js::set('browseType', $browseType);?>
<?php include '../../common/view/footer.html.php';?>
-14
View File
@@ -1,14 +0,0 @@
<?php
/**
* The start file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jia Fu <fujia@cnezsoft.com>
* @package task
* @version $Id: start.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link https://www.zentao.net
*/
?>
<?php $lang->task->start = $lang->task->restart;?>
<?php include 'start.html.php';?>
-121
View File
@@ -1,121 +0,0 @@
<?php
/**
* The start file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jia Fu <fujia@cnezsoft.com>
* @package task
* @version $Id: start.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('confirmFinish', $lang->task->confirmFinish);?>
<?php js::set('noticeTaskStart', $lang->task->noticeTaskStart);?>
<div id='mainContent' class='main-content'>
<?php
/* IF it is multi-task, the suspened can only be restarted by the current user who it is assigned to. */
if(!empty($task->members) and (!isset($task->members[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):
?>
<div class="alert with-icon">
<i class="icon-exclamation-sign"></i>
<div class="content">
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->start);?></p>
<?php else:?>
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->start);?></p>
<?php endif;?>
</div>
</div>
<?php else:?>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->task->start;?></small>
<?php endif;?>
</h2>
</div>
<form method='post' target='hiddenwin' <?php if($app->rawMethod == 'start') echo "onsubmit='return checkLeft();'"?>>
<table class='table table-form'>
<tr class='<?php if($task->mode == 'multi') echo 'hidden'?>'>
<th class='w-90px'><?php echo $lang->task->assignedTo;?></th>
<td class='w-p25-f'>
<?php
if($task->mode == 'linear')
{
echo zget($members, $assignedTo) . html::hidden('assignedTo', $assignedTo);
}
else
{
echo html::select('assignedTo', $members, $assignedTo, "class='form-control chosen'");
}
?>
</td>
<td></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->task->realStarted;?></th>
<td class='w-p25-f'><div class='datepicker-wrapper datepicker-date'><?php echo html::input('realStarted', helper::isZeroDate($task->realStarted) ? helper::now() : $task->realStarted, "class='form-control form-datetime' data-picker-position='bottom-right'");?></div></td>
<td></td>
</tr>
<tr>
<?php
$currentTeam = !empty($task->team) ? $this->task->getTeamByAccount($task->team) : '';
$consumed = !empty($currentTeam) ? (float)$currentTeam->consumed : $task->consumed;
$lblConsumed = $lang->task->consumed;
$readonly = '';
if($app->rawMethod == 'restart' and !empty($currentTeam))
{
$lblConsumed = $lang->task->myConsumed;
$readonly = 'readonly';
}
elseif($app->rawMethod == 'start' and $task->mode == 'linear')
{
$lblConsumed = $lang->task->myConsumed;
}
?>
<th><?php echo $lblConsumed;?></th>
<td>
<div class='input-group'>
<?php echo html::input('consumed', $consumed, "class='form-control' $readonly");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->task->left;?></th>
<td>
<div class='input-group'>
<?php $left = !empty($currentTeam) ? (float)$currentTeam->left : $task->left;?>
<?php echo html::input('left', $left, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span>
</div>
</td>
</tr>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'doing');?></td>
</tr>
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton($lang->task->start);?>
<?php echo html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide');?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
-364
View File
@@ -1,364 +0,0 @@
<?php $oldMaxCount = $this->config->maxCount;?>
<?php $this->config->maxCount = 500;?>
<style>
#taskTeamEditor button > i {color: #5e626d;}
#taskTeamEditor .estimateBox span {background-color: #fff;}
#taskTeamEditor .estimateBox input {background-color: #fff; border-right-width: 0px;}
#taskTeamEditor input, #taskTeamEditor span, #taskTeamEditor .chosen-container > a {border-color: #eee;}
#taskTeamEditor td.sort-handler {padding-bottom: 11px;}
</style>
<?php if($app->rawMethod != 'create'):?>
<style>
#modalTeam .modal-dialog {width: 855px;}
</style>
<?php endif;?>
<?php if($app->rawMethod == 'assignto'):?>
<style>
#taskTeamEditor td.sort-handler {width: 70px !important;}
</style>
<?php endif;?>
<?php $hiddenArrow = (empty($task->mode) or $task->mode == 'linear') ? '' : 'hidden';?>
<?php $i = 1;?>
<?php if(!empty($task->team)):?>
<?php foreach($task->team as $member):?>
<?php
$memberDisabled = false;
$sortDisabled = false;
$memberStatus = $member->status;
if($memberStatus == 'done') $memberDisabled = true;
if($memberStatus != 'wait' and $task->mode == 'linear') $sortDisabled = true;
if($memberStatus == 'done' and $task->mode == 'multi') $sortDisabled = true;
if(strpos('|closed|cancel|pause|', $task->status) !== false and $app->rawMethod != 'activate')
{
$memberStatus = $task->status;
$memberDisabled = true;
$sortDisabled = true;
}
$hourDisabled = $memberDisabled;
if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = false;
?>
<tr class='member member-<?php echo $memberStatus;?>' data-estimate='<?php echo (float)$member->estimate?>' data-consumed='<?php echo (float)$member->consumed?>' data-left='<?php echo (float)$member->left?>'>
<td>
<span class="team-number"><?php echo $i;?></span>
<i class="icon icon-angle-down <?php echo $hiddenArrow;?>"></i>
</td>
<td class='w-250px'>
<?php echo html::select("team[]", $members, $member->account, "class='form-control chosen' data-placeholder='{$lang->task->assignedTo}'" . ($memberDisabled ? ' disabled' : ''))?>
<?php echo html::hidden("teamSource[]", $member->account);?>
<?php if($memberDisabled) echo html::hidden("team[]", $member->account);?>
</td>
<td class='hourBox'>
<?php if($app->rawMethod == 'create'):?>
<div class='input-group estimateBox'>
<?php echo html::input("teamEstimate[]", (float)$member->estimate, "class='form-control text-center' placeholder='{$lang->task->estimateAB}'") ?>
<span class='input-group-addon'><?php echo 'h';?></span>
</div>
<?php else:?>
<div class='input-group'>
<div class="input-control has-icon-right">
<?php echo html::input("teamEstimate[]", (float)$member->estimate, "class='form-control text-center' placeholder='{$lang->task->estimate}'" . ($hourDisabled ? ' readonly' : ''))?>
<label class="input-control-icon-right">h</label>
</div>
<div class="input-control has-icon-right">
<?php echo html::input("teamConsumed[]", (float)$member->consumed, "class='form-control text-center' readonly placeholder='{$lang->task->consumed}'")?>
<label class="input-control-icon-right">h</label>
</div>
<div class="input-control has-icon-right">
<?php echo html::input("teamLeft[]", (float)$member->left, "class='form-control text-center' placeholder='{$lang->task->left}'" . ($hourDisabled ? ' readonly' : ''))?>
<label class="input-control-icon-right">h</label>
</div>
</div>
<?php endif;?>
</td>
<td class='w-100px sort-handler'>
<button type="button" <?php echo $memberDisabled ? 'disabled' : '';?> class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
<button type="button" <?php echo $memberDisabled ? 'disabled' : '';?> class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
<?php if(!empty($task->mode) and $task->mode == 'linear'):?>
<button type="button" <?php echo $sortDisabled ? 'disabled' : '';?> class='btn btn-link btn-sm btn-icon btn-move'><i class='icon-move'></i></button>
<?php endif;?>
</td>
</tr>
<?php $i ++;?>
<?php endforeach;?>
<?php endif;?>
<tr class='template teamTemplate member member-wait'>
<td>
<span class="team-number"><?php echo $i;?></span>
<i class="icon icon-angle-down <?php echo $hiddenArrow;?>"></i>
</td>
<td class='w-240px'>
<?php echo html::select("team[]", $members, '', "class='form-control chosen' data-placeholder='{$lang->task->assignedTo}'")?>
<?php echo html::hidden("teamSource[]", '');?>
</td>
<td class='hourBox'>
<?php if(empty($task->team) or $app->rawMethod == 'create'):?>
<div class='input-group estimateBox'>
<?php echo html::input("teamEstimate[]", '', "class='form-control text-center' placeholder='{$lang->task->estimateAB}'") ?>
<span class='input-group-addon'><?php echo 'h';?></span>
</div>
<?php else:?>
<div class='input-group'>
<div class="input-control has-icon-right">
<?php echo html::input("teamEstimate[]", '', "class='form-control text-center' placeholder='{$lang->task->estimate}'")?>
<label class="input-control-icon-right">h</label>
</div>
<div class="input-control has-icon-right">
<?php echo html::input("teamConsumed[]", 0, "class='form-control text-center' readonly placeholder='{$lang->task->consumed}'")?>
<label class="input-control-icon-right">h</label>
</div>
<div class="input-control has-icon-right">
<?php echo html::input("teamLeft[]", '', "class='form-control text-center' placeholder='{$lang->task->left}'")?>
<label class="input-control-icon-right">h</label>
</div>
</div>
<?php endif;?>
</td>
<td class='w-100px sort-handler'>
<button type="button" class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
<button type="button" class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
<?php if(empty($task->mode) or $task->mode == 'linear'):?>
<button type='button' class='btn btn-link btn-sm btn-icon btn-move'><i class='icon-move'></i></button>
<?php endif;?>
</td>
</tr>
<?php $newRowCount = (!empty($task->team) and count($task->team) < 6) ? 6 - count($task->team) : 1;?>
<?php if(isset($task->status) and $task->status != 'wait' and $task->status != 'doing') $newRowCount = 0;?>
<?php js::set('newRowCount', $newRowCount);?>
<?php if(!empty($task->mode) and $task->mode == 'linear') js::set('sortSelector', 'tr.member-wait');?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php if(isset($task->status)):?>
<?php js::set('taskStatus', $task->status);?>
<?php js::set('totalLeftError', sprintf($this->lang->task->error->leftEmptyAB, $this->lang->task->statusList[$task->status]));?>
<?php if($newRowCount == 0 and $app->rawMethod == 'edit' and $task->mode == 'linear'):?>
<tr>
<td colspan='4'>
<div class='alert alert-info'><?php printf($lang->task->noticeManageTeam, zget($lang->task->statusList, $task->status));?></div>
</td>
</tr>
<?php endif;?>
<?php endif;?>
<script>
$(document).ready(function()
{
<?php if(!empty($task->mode) and $app->rawMethod == 'create'):?>
$('#multipleBox').attr('checked', 'checked');
showTeamMenu();
<?php endif;?>
<?php if(isset($task->mode) and $task->mode == 'multi'):?>
$('tr.teamTemplate').closest('tbody.sortable').sortable('destroy');
<?php else:?>
var options = {
selector: '.icon-move',
dragCssClass: 'drag-row',
reverse: true,
finish: setLineNumber
}
$('#taskTeamEditor tbody.sortable').sortable(options);
<?php endif;?>
/* Init task team manage dialog */
var $taskTeamEditor = $('tr.teamTemplate').closest('table').batchActionForm(
{
idStart: 0,
idEnd: newRowCount - 1,
chosen: true,
datetimepicker: false,
colorPicker: false,
});
var taskTeamEditor = $taskTeamEditor.data('zui.batchActionForm');
var adjustButtons = function()
{
var $deleteBtn = $taskTeamEditor.find('.btn-delete');
if($deleteBtn.length == 1)
{
$deleteBtn.addClass('disabled').attr('disabled', 'disabled');
}
else if(config.currentMethod == 'create')
{
$deleteBtn.removeClass('disabled').removeAttr('disabled');
}
};
var disableMembers = function()
{
var mode = $('[name="mode"]').length > 0 ? $('[name="mode"]').val() : '<?php echo (!empty($task->mode) ? $task->mode : '')?>';
if(mode == 'multi')
{
var members = [];
var $teams = $taskTeamEditor.find('select#team');
for(i = 0; i < $teams.length; i++)
{
var value = $teams.eq(i).val();
if($.inArray(value, members) >= 0)
{
$teams.eq(i).closest('tr').addClass('hidden');
continue;
}
if(value != '') members.push(value);
}
$teams.each(function()
{
var $this = $(this);
var value = $this.val();
$this.find('option:disabled').removeAttr('disabled');
$.each(members, function(i, account)
{
if(account == value) return;
$this.find('option[value=' + account + ']').attr('disabled', 'disabled');
})
$this.trigger("chosen:updated");
});
$taskTeamEditor.find('tr.hidden').remove();
}
}
var checkRemove = function(removeIndex)
{
var $teams = $taskTeamEditor.find('select#team');
var totalLeft = 0;
var memberCount = 0;
for(i = 0; i < $teams.length; i++)
{
var $this = $teams.eq(i);
var value = $this.val();
if(value == '') continue;
var $tr = $this.closest('tr');
if($tr.index() == removeIndex) continue;
memberCount++;
var $teamLeft = $tr.find('[name^=teamLeft]');
if($teamLeft.length > 0)
{
left = parseFloat($teamLeft.val());
if(!isNaN(left)) totalLeft += left;
}
}
if(memberCount < 2)
{
bootbox.alert(teamMemberError);
return false;
}
<?php if($app->rawMethod == 'edit'):?>
if(totalLeft == 0 && (taskStatus == 'doing' || taskStatus == 'pause'))
{
bootbox.alert(totalLeftError);
return false;
}
<?php endif;?>
if($taskTeamEditor.find('td > .btn-delete:enabled').length == 1) return false;
return true;
}
$taskTeamEditor.on('click', '.btn-add', function()
{
var $newRow = taskTeamEditor.createRow(null, $(this).closest('tr'));
$newRow.addClass('highlight');
setTimeout(function()
{
$newRow.removeClass('highlight');
}, 1600);
var taskMode = $('[name="mode"]').val();
if(taskMode == 'multi') $('#taskTeamEditor tr.member .icon-angle-down').addClass('hidden');
disableMembers();
adjustButtons();
setLineNumber();
}).on('click', '.btn-delete', function()
{
if($(this).hasClass('disabledDeleted')) return;
var $row = $(this).closest('tr');
<?php if(!empty($task->team)):?>
if(!checkRemove($row.index())) return;
<?php endif;?>
$taskTeamEditor.find('.btn-delete').addClass('disabledDeleted');
$row.addClass('highlight').fadeOut(700, function()
{
$row.remove();
$taskTeamEditor.find('.btn-delete').removeClass('disabledDeleted');
disableMembers();
adjustButtons();
setLineNumber();
});
});
adjustButtons();
disableMembers();
setLineNumber();
$taskTeamEditor.on('change', 'select#team', function()
{
$(this).closest('tr').find('input[id^=teamEstimate]').closest('.input-group').toggleClass('required', $(this).val() != '')
disableMembers();
var $teamSource = $(this).siblings('[name^=teamSource]');
if($teamSource.val() == '') return;
var $tr = $(this).closest('tr');
var consumed = 0;
var estimate = $tr.attr('data-left');;
if($(this).val() == $teamSource.val())
{
consumed = $tr.attr('data-consumed');
estimate = $tr.attr('data-estimate');
}
$tr.find('[name^=teamConsumed]').val(consumed);
$tr.find('[name^=teamEstimate]').val(estimate);
});
$taskTeamEditor.find('select#team:enabled').each(function()
{
$(this).closest('tr').find('input[id^=teamEstimate]').closest('.input-group').toggleClass('required', $(this).val() != '')
});
$('[name="mode"]').change(function()
{
if($(this).val() == 'multi')
{
disableMembers();
$('#taskTeamEditor tr.member .icon-angle-down').addClass('hidden');
}
else
{
$('#taskTeamEditor tr.member .icon-angle-down').removeClass('hidden');
$taskTeamEditor.find('select#team').each(function()
{
$(this).find('option:disabled').removeAttr('disabled').trigger("chosen:updated");
})
}
if($('#teamMember').val() != '' && page != 'edit') $taskTeamEditor.find('tfoot .btn').click();
})
});
/**
* Set line number.
*
* @access public
* @return void
*/
function setLineNumber()
{
var lineNumber = 1;
$('.team-number').each(function()
{
$(this).text(lineNumber);
lineNumber ++;
});
}
</script>
<?php $this->config->maxCount = $oldMaxCount;?>
-448
View File
@@ -1,448 +0,0 @@
<?php
/**
* The view file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package task
* @version $Id: view.html.php 4808 2013-06-17 05:48:13Z zhujinyonging@gmail.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php $browseLink = $app->session->taskList != false ? $app->session->taskList : $this->createLink('execution', 'browse', "executionID=$task->execution");?>
<?php js::set('sysurl', common::getSysUrl());?>
<?php if(strpos($_SERVER["QUERY_STRING"], 'isNotice=1') === false):?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!isonlybody()):?>
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
<div class="divider"></div>
<?php endif;?>
<div class="page-title">
<span class="label label-id"><?php echo $task->id?></span>
<span class="text" title='<?php echo $task->name;?>' style='color: <?php echo $task->color; ?>'>
<?php if(!empty($task->team)) echo '<span class="label label-badge label-primary no-margin">' . (common::checkNotCN() ? ' ' : '') . $lang->task->modeList[$task->mode] . '</span>';?>
<?php if($task->parent > 0) echo '<span class="label label-badge label-primary no-margin">' . $lang->task->childrenAB . '</span>';?>
<?php if($task->parent > 0) echo isset($task->parentName) ? html::a(inlink('view', "taskID={$task->parent}"), $task->parentName) . ' / ' : '';?><?php echo $task->name;?>
</span>
<?php if($task->deleted):?>
<span class='label label-danger'><?php echo $lang->task->deleted;?></span>
<?php endif;?>
<?php if($task->fromBug != 0):?>
<small><?php echo html::a(helper::createLink('bug', 'view', "bugID=$task->fromBug", '', true), "<i class='icon icon-bug'></i> {$lang->task->fromBug}$lang->hyphen$task->fromBug", '', "class='iframe' data-width='80%'");?></small>
<?php endif;?>
</div>
</div>
<?php if(!isonlybody()):?>
<div class="btn-toolbar pull-right">
<?php
$checkObject = new stdclass();
$checkObject->execution = $task->execution;
$link = $this->createLink('task', 'create', "execution={$task->execution}&storyID={$task->story}&moduleID={$task->module}");
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
?>
</div>
<?php endif;?>
</div>
<?php if($this->app->getViewType() == 'xhtml'):?>
<div id="scrollContent">
<?php endif;?>
<?php endif;?>
<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->task->legendDesc;?></div>
<div class="detail-content article-content">
<?php echo !empty($task->desc) ? $task->desc : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
</div>
</div>
<?php if($execution->lifetime != 'ops'):?>
<?php if($task->fromBug != 0):?>
<div class="detail">
<div class="detail-title"><?php echo $lang->bug->steps;?></div>
<div class="detail-content article-content">
<?php echo !empty($task->bugSteps) ? $task->bugSteps : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
</div>
</div>
<?php elseif($task->story):?>
<div class="detail">
<div class='detail-title'><?php echo $lang->task->storySpec;?></div>
<div class='detail-content article-content'>
<?php echo (!empty($task->storySpec) || !empty($task->storyFiles)) ? $task->storySpec : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
</div>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false', 'object' => $task, 'method' => 'view', 'showDelete' => false));?>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->storyVerify;?></div>
<div class='detail-content article-content'>
<?php echo !empty($task->storyVerify) ? $task->storyVerify : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
</div>
</div>
<?php endif;?>
<?php if(isset($task->cases) and $task->cases):?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->case;?></div>
<div class='detail-content article-content'>
<ul class='list-unstyled'>
<?php foreach($task->cases as $caseID => $case) echo '<li>' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', isonlybody() ? '' : "data-toggle='modal' data-type='iframe' data-width='90%'") . '</li>';?>
</ul>
</div>
</div>
<?php endif;?>
<?php endif;?>
<?php if(!empty($task->children)):?>
<div class='detail'>
<div class='detail-title'><?php echo $this->lang->task->children;?></div>
<div class='detail-content article-content'>
<table class='table table-hover table-fixed' id='childrenTable'>
<thead>
<tr class='text-center'>
<th class='c-id'> <?php echo $lang->task->id;?></th>
<th class='c-lblPri'> <?php echo $lang->task->lblPri;?></th>
<th> <?php echo $lang->task->name;?></th>
<th class='c-deadline'><?php echo $lang->task->deadline;?></th>
<th class='c-assignedTo'> <?php echo $lang->task->assignedTo;?></th>
<th class='c-status'> <?php echo $lang->task->status;?></th>
<th class='visible-lg c-consumedAB'><?php echo $lang->task->consumedAB . $lang->task->lblHour;?></th>
<th class='visible-lg c-leftAB'><?php echo $lang->task->leftAB . $lang->task->lblHour;?></th>
<th class='c-actions'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($task->children as $child):?>
<tr class='text-center'>
<td><?php echo $child->id;?></td>
<td><?php if($child->pri) echo "<span class='label-pri label-pri-" . $child->pri . "'>" . zget($this->lang->task->priList, $child->pri, $child->pri) . "</span>";?></td>
<td class='text-left' title='<?php echo $child->name;?>'><a class="iframe" data-width="90%" href="<?php echo $this->createLink('task', 'view', "taskID=$child->id", '', true); ?>"><?php echo $child->name;?></a></td>
<td><?php echo $child->deadline;?></td>
<td id='assignedTo'><?php $this->task->printAssignedHtml($child, $users);?></td>
<td><?php echo $this->processStatus('task', $child);?></td>
<td class='visible-lg'><?php echo $child->consumed;?></td>
<td class='visible-lg'><?php echo $child->left;?></td>
<td class='c-actions'>
<?php
common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true);
common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true);
common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true);
common::printIcon('task', 'recordWorkhour', "taskID=$child->id", $child, 'list', 'time', '', 'iframe showinonlybody', true);
common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list');
common::printIcon('task', 'activate', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true);
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
<?php endif;?>
<?php
echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true', 'object' => $task, 'method' => 'view', 'showDelete' => false));
$canBeChanged = common::canBeChanged('task', $task);
if($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=task&objectID=$task->id");
?>
</div>
<?php $this->printExtendFields($task, 'div', "position=left&inForm=0&inCell=1");?>
<?php if($this->app->getViewType() != 'xhtml'):?>
<div class="cell"><?php include '../../common/view/action.html.php';?></div>
<?php endif;?>
<div class='main-actions'>
<div class="btn-toolbar">
<?php if(!isonlybody() and $this->app->getViewType() != 'xhtml'):?>
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn'");?>
<?php echo "<div class='divider'></div>";?>
<?php endif;?>
<?php $task->executionList = $execution;?>
<?php echo $this->task->buildOperateMenu($task, 'view');?>
</div>
</div>
</div>
<div class="side-col col-4">
<div class="cell">
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a href='#legendBasic' data-toggle='tab'><?php echo $lang->task->legendBasic;?></a></li>
<li><a href='#legendLife' data-toggle='tab'><?php echo $lang->task->legendLife;?></a></li>
<?php if(!empty($task->team)) :?>
<li><a href='#legendTeam' data-toggle='tab'><?php echo $lang->task->team;?></a></li>
<?php endif;?>
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='legendBasic'>
<table class="table table-data">
<tbody>
<?php if($execution->multiple):?>
<tr>
<th class='w-90px'><?php echo $lang->task->execution;?></th>
<td>
<?php
$method = $this->config->vision == 'lite' ? 'kanban' : 'view';
if($execution->type != 'kanban')
{
common::printLink('execution', $method, "executionID={$task->execution}", $execution->name);
}
else
{
echo $execution->name;
}
?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->module;?></th>
<?php
$moduleTitle = '';
ob_start();
if(empty($modulePath))
{
$moduleTitle .= '/';
echo "/";
}
else
{
if($product)
{
$moduleTitle .= $product->name . '/';
echo $product->name . $lang->arrow;
}
foreach($modulePath as $key => $module)
{
$moduleTitle .= $module->name;
if(!common::printLink('execution', 'task', "executionID=$task->execution&browseType=byModule&param=$module->id", $module->name)) echo $module->name;
if(isset($modulePath[$key + 1]))
{
$moduleTitle .= '/';
echo $lang->arrow;
}
}
}
$printModule = ob_get_contents();
ob_end_clean();
?>
<td title='<?php echo $moduleTitle?>'><?php echo $printModule?></td>
</tr>
<?php if($execution->lifetime != 'ops'):?>
<tr class='nofixed'>
<th><?php echo $lang->task->story;?></th>
<td>
<?php
if(!$task->storyTitle) echo $lang->noData;
$class = isonlybody() ? 'showinonlybody' : 'iframe';
if($task->storyTitle and !common::printLink('execution', 'storyView', "storyID=$task->story", $task->storyTitle, '', "class=$class data-width='80%'", true, true)) echo $task->storyTitle;
if($task->needConfirm)
{
echo "(<span class='warning'>{$lang->story->changed}</span> ";
echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin', "class='btn btn-mini btn-info'");
echo ")";
}
?>
</td>
</tr>
<?php endif;?>
<?php if($task->fromBug):?>
<tr>
<th><?php echo $lang->task->fromBug;?></th>
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$task->fromBug", '', true), "#$task->fromBug " . $fromBug->title, '', "class='iframe' data-width='80%'");?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
<td>
<?php
if(!empty($task->team) and $task->mode == 'multi' and strpos('done,cancel,closed', $task->status) === false)
{
foreach($task->team as $member) echo ' ' . zget($users, $member->account);
}
else
{
echo $task->assignedTo ? $task->assignedToRealName . $lang->at . substr($task->assignedDate, 0, 19) : $lang->noData;
}
?>
</td>
</tr>
<?php if($task->mode):?>
<tr>
<th><?php echo $lang->task->mode;?></th>
<td><?php echo zget($lang->task->modeList, $task->mode);?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->type;?></th>
<td><?php echo zget($this->lang->task->typeList, $task->type, $task->type);?></td>
</tr>
<tr>
<th><?php echo $lang->task->status;?></th>
<td><span class='status-task status-<?php echo $task->status;?>'><span class="label label-dot"></span> <?php echo $this->processStatus('task', $task);?></td>
</tr>
<tr>
<th><?php echo $lang->task->progress;?></th>
<td><?php echo $task->progress . '%';?></td>
</tr>
<tr>
<th><?php echo $lang->task->pri;?></th>
<td><span class='label-pri <?php echo 'label-pri-' . $task->pri;?>' title='<?php echo zget($lang->task->priList, $task->pri);?>'><?php echo $task->pri == '0' ? $lang->noData : zget($lang->task->priList, $task->pri)?></span></td>
</tr>
<tr>
<th><?php echo $lang->task->mailto;?></th>
<td>
<?php
if(empty($task->mailto))
{
echo $lang->noData;
}
else
{
foreach(explode(',', str_replace(' ', '', $task->mailto)) as $account) echo ' ' . zget($users, $account, $account);
}
?>
</td>
</tr>
</tbody>
</table>
</div>
<div class='tab-pane' id='legendLife'>
<table class='table table-data'>
<tr>
<th class='thWidth'><?php echo $lang->task->openedBy;?></th>
<td><?php echo $task->openedBy ? zget($users, $task->openedBy, $task->openedBy) . $lang->at . $task->openedDate : $lang->noData;?></td>
</tr>
<tr>
<th><?php echo $lang->task->finishedBy;?></th>
<td><?php echo ($task->finishedBy) ? zget($users, $task->finishedBy, $task->finishedBy) . $lang->at . $task->finishedDate : $lang->noData;?></td>
</tr>
<tr>
<th><?php echo $lang->task->canceledBy;?></th>
<td><?php echo $task->canceledBy ? zget($users, $task->canceledBy, $task->canceledBy) . $lang->at . $task->canceledDate : $lang->noData;?></td>
</tr>
<tr>
<th><?php echo $lang->task->closedBy;?></th>
<td><?php echo $task->closedBy ? zget($users, $task->closedBy, $task->closedBy) . $lang->at . $task->closedDate : $lang->noData;?></td>
</tr>
<tr>
<th><?php echo $lang->task->closedReason;?></th>
<td><?php echo $task->closedReason ? $lang->task->reasonList[$task->closedReason] : $lang->noData;?></td>
</tr>
<tr>
<th><?php echo $lang->task->lastEdited;?></th>
<td><?php echo $task->lastEditedBy ? zget($users, $task->lastEditedBy, $task->lastEditedBy) . $lang->at . $task->lastEditedDate : $lang->noData;?></td>
</tr>
</table>
</div>
<div class='tab-pane' id='legendTeam'>
<table class='table table-data'>
<thead>
<tr>
<th><?php echo $lang->task->team?></th>
<th class='text-center c-hours'><?php echo $lang->task->estimateAB?></th>
<th class='text-center c-hours'><?php echo $lang->task->consumedAB?></th>
<th class='text-center c-hours'><?php echo $lang->task->leftAB?></th>
<th class='text-center'><?php echo $lang->statusAB;?></th>
</tr>
</thead>
<?php foreach($task->team as $member):?>
<tr class='text-center'>
<td class='text-left'><?php echo zget($users, $member->account);?></td>
<td><?php echo (float)$member->estimate?></td>
<td><?php echo (float)$member->consumed?></td>
<td><?php echo (float)$member->left?></td>
<td class="status-<?php echo $member->status;?>"><?php echo zget($lang->task->statusList, $member->status);?></td>
</tr>
<?php endforeach;?>
</table>
</div>
</div>
</div>
</div>
<div class="cell">
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a href='#legendEffort' data-toggle='tab'><?php echo $lang->task->legendEffort;?></a></li>
<li><a href='#legendMisc' data-toggle='tab'><?php echo $lang->task->legendMisc;?></a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='legendEffort'>
<table class="table table-data">
<tr>
<th class='effortThWidth'><?php echo $lang->task->estimate;?></th>
<td><?php echo $task->estimate . $lang->workingHour;?></td>
</tr>
<tr>
<th><?php echo $lang->task->consumed;?></th>
<td><?php echo round($task->consumed, 2) . $lang->workingHour;?></td>
</tr>
<tr>
<th><?php echo $lang->task->left;?></th>
<td><?php echo $task->left . $lang->workingHour;?></td>
</tr>
<tr>
<th><?php echo $lang->task->estStarted;?></th>
<td><?php echo $task->estStarted;?></td>
</tr>
<tr>
<th><?php echo $lang->task->realStarted;?></th>
<td><?php echo helper::isZeroDate($task->realStarted) ? '' : substr($task->realStarted, 0, 19); ?> </td>
</tr>
<tr>
<th><?php echo $lang->task->deadline;?></th>
<td>
<?php
echo $task->deadline;
if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay);
?>
</td>
</tr>
</table>
</div>
<div class='tab-pane' id='legendMisc'>
<table class="table table-data">
<tr>
<th class='MRThWidth'><?php echo $lang->task->linkMR;?></th>
<td>
<?php
$canViewMR = common::hasPriv('mr', 'view');
foreach($linkMRTitles as $MRID => $linkMRTitle)
{
echo ($canViewMR ? html::a($this->createLink('mr', 'view', "MRID=$MRID"), "#$MRID $linkMRTitle") : "#$MRID $linkMRTitle") . '<br />';
}
?>
</td>
</tr>
<tr>
<th class='MRThWidth'><?php echo $lang->task->linkCommit;?></th>
<td>
<?php
$canViewRevision = common::hasPriv('repo', 'revision');
foreach($linkCommits as $commit)
{
$revision = substr($commit->revision, 0, 10);
$commitTitle = $revision . ' ' . $commit->comment;
echo "<div class='link-commit' title='$commitTitle'>" . ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), "$revision") . ' ' . $commit->comment : $commitTitle) . '<br />';
}
?>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<?php $this->printExtendFields($task, 'div', "position=right&inForm=0&inCell=1");?>
</div>
</div>
<?php if($this->app->getViewType() == 'xhtml'):?>
</div>
<?php endif;?>
<div id="mainActions" class='main-actions'>
<?php common::printPreAndNext($preAndNext);?>
</div>
<script>
</script>
<?php include '../../common/view/syntaxhighlighter.html.php';?>
<?php include '../../common/view/footer.html.php';?>