* Rename project file.

This commit is contained in:
Yagami
2021-03-04 13:03:54 +08:00
parent e24eab6174
commit b7339a5b6b
12 changed files with 1456 additions and 0 deletions
+88
View File
@@ -0,0 +1,88 @@
<?php
/**
* The prjbatchedit view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Shujie Tian <tianshujie@easycorp.ltd>
* @package project
* @version $Id: prjbatchedit.html.php 4769 2021-02-020 11:13:21Z $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('linkedProjectsTip', $lang->project->linkedProjectsTip);?>
<?php js::set('changeProgram', $lang->project->changeProgram);?>
<?php $requiredFields = $config->project->PRJEdit->requiredFields;?>
<div id="mainContent" class="main-content">
<div class="main-header">
<h2><?php echo $lang->project->PRJBatchEdit;?></h2>
</div>
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchEditForm">
<table class="table table-form">
<thead>
<tr>
<th class='w-40px'><?php echo $lang->idAB;?></th>
<th class='w-200px'><?php echo $lang->project->PGMParent;?></th>
<th class='c-name required'><?php echo $lang->project->PRJName;?></th>
<th class="w-150px <?php echo strpos($requiredFields, 'PM') !== false ? 'required' : '';?>"> <?php echo $lang->project->PRJPM;?></th>
<th class='w-120px required'><?php echo $lang->project->begin;?></th>
<th class='w-120px required'><?php echo $lang->project->end;?></th>
<th class='w-250px'><?php echo $lang->project->acl;?></th>
</tr>
</thead>
<tbody>
<?php foreach($projects as $projectID => $project):?>
<?php $aclList = $project->parent ? $lang->project->PGMPRJAcls : $lang->project->PRJAcls;?>
<tr>
<td><?php echo sprintf('%03d', $projectID) . html::hidden("projectIdList[$projectID]", $projectID);?></td>
<td><?php echo html::select("parents[$projectID]", $projectList, $project->parent, "class='form-control chosen' data-id='$projectID' data-name='{$project->name}' data-parent='{$project->parent}'");?></td>
<td title='<?php echo $project->name;?>'><?php echo html::input("names[$projectID]", $project->name, "class='form-control'");?></td>
<td><?php echo html::select("PMs[$projectID]", $PMUsers, $project->PM, "class='form-control chosen'");?></td>
<td>
<?php echo html::input("begins[$projectID]", $project->begin, "class='form-control form-date' onchange='computeWorkDays(this.id);' placeholder='" . $lang->project->begin . "'");?>
</td>
<td>
<?php
$disabledEnd = $project->end == LONG_TIME ? 'disabled' : '';
$end = $project->end == LONG_TIME ? $lang->project->PRJLongTime : $project->end;
echo html::input("ends[$projectID]", $end, "class='form-control form-date' $disabledEnd onchange='computeWorkDays(this.id);' placeholder='" . $lang->project->end . "'");
echo html::hidden("dayses[$projectID]", $project->days);
?>
</td>
<td><?php echo nl2br(html::radio("acls[$projectID]", $aclList, $project->acl));?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan="4" class="text-center form-actions">
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="modal fade" id="promptBox">
<div class="modal-dialog mw-600px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
<table class='table table-form' id='promptTable'>
<thead>
<tr>
<th class='text-left'><?php echo $lang->project->multiLinkedProductsTip;?></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+122
View File
@@ -0,0 +1,122 @@
<?php
/**
* The prjbrowse view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: prjbrowse.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php
js::set('orderBy', $orderBy);
js::set('projectID', $projectID);
js::set('browseType', $browseType);
?>
<div id="mainMenu" class="clearfix">
<?php if($this->config->systemMode == 'new'):?>
<div id="sidebarHeader">
<div class="title">
<?php echo empty($project) ? $lang->project->project : $project->name;?>
<?php if($projectID) echo html::a(inLink('PRJBrowse', 'projectID=0'), "<i class='icon icon-sm icon-close'></i>", '', 'class="text-muted"');?>
</div>
</div>
<?php endif;?>
<div class="btn-toolBar pull-left">
<?php foreach($lang->project->featureBar as $key => $label):?>
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
<?php $label = "<span class='text'>$label</span>";?>
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<?php echo html::a(inlink('PRJBrowse', "projectID=$projectID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
<?php endforeach;?>
<?php echo html::checkbox('PRJMine', array('1' => $lang->project->mine), '', $this->cookie->PRJMine ? 'checked=checked' : '');?>
</div>
<div class="btn-toolbar pull-right">
<?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('project', 'createGuide', "projectID=$projectID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'create', 'mode=scrum', '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-primary"');?>
<?php else:?>
<?php common::printLink('execution', 'create', '', '<i class="icon icon-plus"></i>' . $lang->execution->create, '', 'class="btn btn-primary"');?>
<?php endif;?>
</div>
</div>
<div id='mainContent' class="main-row fade">
<?php if($this->config->systemMode == 'new'):?>
<div id="sidebar" class="side-col">
<div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
<div class="cell">
<?php echo $PRJTree;?>
<div class="text-center">
<?php common::printLink('project', 'PRJProgramTitle', '', $lang->project->moduleSetting, '', "class='btn btn-info btn-wide iframe'", true, true);?>
</div>
</div>
</div>
<?php endif;?>
<div class="main-col">
<?php if(empty($projectStats)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->project->noPRJ;?></span>
<?php if($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'createGuide', "projectID=$projectID", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
<?php else:?>
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-info btn-wide"');?>
<?php endif;?>
</p>
</div>
<?php else:?>
<form class='main-table' id='PRJForm' method='post' data-ride="table">
<div class="table-header fixed-right">
<nav class="btn-toolbar pull-right"></nav>
</div>
<?php
$vars = "projectID=$projectID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";
$setting = $this->datatable->getSetting('project');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = $this->config->systemMode == 'new' ? common::hasPriv('project', 'PRJBatchEdit') : common::hasPriv('project', 'batchEdit');?>
<thead>
<tr>
<?php
foreach($setting as $value)
{
if($value->id == 'PRJStatus' and $browseType !== 'all') $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
</tr>
</thead>
<tbody class="sortable" id='projectTableList'>
<?php foreach($projectStats as $project):?>
<?php $project->from = 'PRJ';?>
<tr data-id="<?php echo $project->id;?>">
<?php foreach($setting as $value) $this->project->printCell($value, $project, $users, $projectID);?>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class="table-actions btn-toolbar">
<?php
if($canBatchEdit)
{
$actionLink = $this->config->systemMode == 'new' ? $this->createLink('project', 'PRJBatchEdit', 'from=prjbrowse') : $this->createLink('project', 'batchEdit');
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+205
View File
@@ -0,0 +1,205 @@
<?php
/**
* The prjcreate view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: prjcreate.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('model', $model);?>
<?php js::set('projectID', $projectID);?>
<?php js::set('copyProjectID', $copyProjectID);?>
<?php js::set('from', $from);?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('longTime', $lang->project->PRJLongTime);?>
<?php $requiredFields = $config->project->PRJCreate->requiredFields;?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->project->PRJCreate . ' - ' . zget($lang->project->modelList, $model, '');?></h2>
<div class="pull-right btn-toolbar">
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->project->PRJCopy;?></button>
</div>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->PGMParent;?></th>
<td><?php echo html::select('parent', $projectList, $projectID, "class='form-control chosen' onchange='setParentProgram(this.value)'");?></td>
<td>
<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->project->PGMTips;?>"></icon>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJName;?></th>
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJPM;?></th>
<td><?php echo html::select('PM', $pmUsers, '', "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->project->PGMParentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
<?php else:?>
<span class='input-group-addon'></span>
<?php echo html::select('budgetUnit', $budgetUnitList, $config->project->defaultCurrency, "class='form-control'");?>
<?php endif;?>
</div>
</td>
<td>
<div class='checkbox-primary'>
<input type='checkbox' id='future' name='future' value='1' />
<label for='future'><?php echo $lang->project->future;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', date('Y-m-d'), "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
<?php echo html::input('end', '', "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->end . "' required");?>
</div>
</td>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
</tr>
<?php if($model == 'scrum'):?>
<tr>
<th><?php echo $lang->project->days;?></th>
<td>
<div class='input-group'>
<?php echo html::input('days', '', "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
</div>
</td><td></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
<div class='row'>
<?php $i = 0;?>
<?php foreach($products as $product):?>
<div class="col-sm-4" style="margin-bottom: 10px; padding-right: 6px;">
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
<div class="input-group<?php if($hasBranch) echo ' has-branch';?>">
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "'");?>
<span class='input-group-addon fix-border'></span>
<?php if($hasBranch) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?>
</div>
</div>
<?php $i++;?>
<?php endforeach;?>
<div class='col-sm-4 <?php if($projectID) echo 'required';?>' style="padding-right: 6px;">
<div class='input-group'>
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
<span class='input-group-addon'><?php echo html::checkBox('newProduct', $lang->project->addProduct, '', "onchange=addNewProduct(this);");?></span>
</div>
</div>
</div>
</td>
</tr>
<tr class='hidden'>
<th><?php echo $lang->product->name;?></th>
<td><?php echo html::input('productName', '', "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->linkPlan;?></th>
<td colspan="3" id="plansBox">
<div class='row'>
<?php if($copyProjectID):?>
<?php $i = 0;?>
<?php foreach($products as $product):?>
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
<div class="col-sm-4" id="plan<?php echo $i;?>"><?php echo html::select("plans[" . $product->id . "]", $plans, '', "class='form-control chosen'");?></div>
<?php $i++;?>
<?php endforeach;?>
<?php else:?>
<div class="col-sm-4" id="plan0" style="padding-right: 6px;"><?php echo html::select("plans[]", '', '', "class='form-control chosen'");?></div>
<?php endif;?>
</div>
</td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<th><?php echo $lang->project->PRJDesc;?></th>
<td colspan='3'>
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $lang->project->PRJAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr class="hidden" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, '', 'class="form-control chosen" multiple');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->auth;?></th>
<td colspan='3'><?php echo html::radio('auth', $lang->project->PRJAuthList, $auth, '', 'block');?></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php
echo html::hidden('model', $model);
echo html::submitButton();
echo html::backButton();
?>
</td>
</tr>
</table>
</form>
</div>
</div>
<div class='modal fade modal-scroll-inside' id='copyProjectModal'>
<div class='modal-dialog mw-900px'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'><i class="icon icon-close"></i></button>
<h4 class='modal-title' id='myModalLabel'>
<?php echo $lang->project->copyTitle;?>
<?php echo html::input('projectName', '', "class='form-control' placeholder={$lang->project->searchByName}");?>
</h4>
</div>
<div class='modal-body'>
<?php if(empty($copyProjects)):?>
<div class='alert with-icon'>
<i class='icon-exclamation-sign'></i>
<div class='content'><?php echo $lang->project->copyNoProject;?></div>
</div>
<?php else:?>
<div id='copyProjects' class='row'>
<?php foreach ($copyProjects as $id => $name):?>
<?php $active = ($copyProjectID == $id) ? ' active' : '';?>
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='<?php echo $id;?>' class='nobr <?php echo $active;?>'><?php echo html::icon($lang->icons['project'], 'text-muted') . ' ' . $name;?></a></div>
<?php endforeach;?>
</div>
<?php endif;?>
</div>
</div>
</div>
<div id='PRJAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PRJAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='PGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PGMPRJAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<?php include '../../common/view/footer.html.php';?>
+197
View File
@@ -0,0 +1,197 @@
<?php
/**
* The prjedit view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('oldParent', $project->parent);?>
<?php js::set('projectID', $project->id);?>
<?php js::set('longTime', $lang->project->PRJLongTime);?>
<?php js::set('from', $from);?>
<?php js::set('unmodifiableProducts', $unmodifiableProducts)?>
<?php js::set('tip', $lang->project->notAllowRemoveProducts);?>
<?php js::set('linkedProjectsTip', $lang->project->linkedProjectsTip);?>
<?php $aclList = $project->parent ? $lang->project->PGMPRJAclList : $lang->project->PRJAclList;?>
<?php $requiredFields = $config->project->PRJEdit->requiredFields;?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->project->PRJEdit;?></h2>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->PGMParent;?></th>
<td><?php echo html::select('parent', $projectList, $project->parent, "class='form-control chosen'");?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJName;?></th>
<td class="col-main"><?php echo html::input('name', $project->name, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJPM;?></th>
<td><?php echo html::select('PM', $PMUsers, $project->PM, "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->project->PGMParentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', $project->budget != 0 ? $project->budget : '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($project->budget == 0 ? 'disabled ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
<?php else:?>
<span class='input-group-addon'></span>
<?php echo html::select('budgetUnit', $budgetUnitList, $project->budgetUnit, "class='form-control'");?>
<?php endif;?>
</div>
</td>
<td>
<div class='checkbox-primary'>
<input type='checkbox' id='future' name='future' value='1' <?php if($project->budget == 0) echo 'checked';?> />
<label for='future'><?php echo $lang->project->future;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', $project->begin, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
<?php
$disabledEnd = $project->end == LONG_TIME ? 'disabled' : '';
$end = $project->end == LONG_TIME ? $lang->project->PRJLongTime : $project->end;
echo html::input('end', $end, "class='form-control form-date' onchange='computeWorkDays();' $disabledEnd placeholder='" . $lang->project->end . "' required");
?>
</div>
</td>
<?php $deltaValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;?>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
</tr>
<?php if($project->model == 'scrum'):?>
<tr>
<th><?php echo $lang->project->days;?></th>
<td>
<div class='input-group'>
<?php echo html::input('days', $project->days, "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
</div>
</td>
<td></td>
<td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
<div class='row'>
<?php $i = 0;?>
<?php foreach($linkedProducts as $product):?>
<div class='col-sm-4' style="padding-right: 6px;">
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
<div class="input-group<?php if($hasBranch) echo ' has-branch';?>">
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' data-placeholder={$lang->project->errorNoProducts} onchange='loadBranches(this)' data-last='" . $product->id . "'");?>
<span class='input-group-addon fix-border'></span>
<?php if($hasBranch) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?>
</div>
</div>
<?php if(in_array($product->id, $unmodifiableProducts)) echo html::hidden("products[$i]", $product->id);?>
<?php $i++;?>
<?php endforeach;?>
<div class='col-sm-4 <?php if($projectID) echo 'required';?>' style="padding-right: 6px;">
<div class='input-group'>
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
<span class='input-group-addon fix-border'></span>
</div>
</div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->linkPlan;?></th>
<td id="plansBox" colspan="3">
<div class='row'>
<?php $i = 0;?>
<?php foreach($linkedProducts as $product):?>
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
<div class="col-sm-4" id="plan<?php echo $i;?>" style="padding-right: 6px;"><?php echo html::select("plans[" . $product->id . "]", $plans, $product->plan, "class='form-control chosen'");?></div>
<?php $i++;?>
<?php endforeach;?>
<div class="col-sm-4" id="planDefault" style="padding-right: 6px;"><?php echo html::select("plans[0]", array(), 0, "class='form-control chosen'");?></div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->PRJDesc;?></th>
<td colspan='3'>
<?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr class="<?php if($project->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $project->whitelist, 'class="form-control chosen" multiple');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->auth;?></th>
<td colspan='3'><?php echo html::radio('auth', $lang->project->PRJAuthList, $project->auth, '', 'block');?></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php
echo html::hidden('model', $project->model);
echo html::submitButton();
echo html::backButton();
?>
</td>
</tr>
</table>
</form>
</div>
</div>
<div id='PRJAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PRJAclList, $project->acl == 'project' ? 'private' : 'open', "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='PGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PGMPRJAclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div class="modal fade" id="promptBox">
<div class="modal-dialog mw-600px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php printf($lang->project->changeProgram, $project->name);?></h4>
</div>
<div class="modal-body">
<table class='table table-form' id='promptTable'>
<thead>
<tr>
<th class='text-left'><?php echo $lang->project->multiLinkedProductsTip;?></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+70
View File
@@ -0,0 +1,70 @@
<?php
/**
* The prigroup view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: prigroup.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('confirmDelete', $lang->group->confirmDelete);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php echo html::backButton($lang->goback, '', 'btn-secondary');?>
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->group->browse;?></span></span>
</div>
<div class='btn-toolbar pull-right'>
<?php if(common::hasPriv('project', 'PRJCreateGroup')) echo html::a($this->createLink('project', 'PRJCreateGroup', "projectID=$projectID&projectID=$projectID", '', true), '<i class="icon-plus"></i> ' . $lang->group->create, '', 'class="btn btn-primary iframe" data-width="550"');?>
</div>
</div>
<div id='mainContent' class='main-table'>
<table class='table tablesorter' id='groupList'>
<thead>
<tr>
<th class='w-id text-center'><?php echo $lang->group->id;?></th>
<th class='w-130px'><?php echo $lang->group->name;?></th>
<th class='w-300px'><?php echo $lang->group->desc;?></th>
<th><?php echo $lang->group->users;?></th>
<th class='c-actions-6 text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($groups as $group):?>
<?php $users = implode(',', $groupUsers[$group->id]);?>
<tr>
<td class='text-center'><?php echo $group->id;?></td>
<td><?php echo $group->name;?></td>
<td title='<?php echo $group->desc?>'><?php echo $group->desc;?></td>
<td title='<?php echo $users;?>'><?php echo $users;?></td>
<td class='c-actions'>
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
<?php $disabled = $group->role == 'limited' ? 'disabled' : '';?>
<?php common::printIcon('project', 'PRJManageView', "groupID=$group->id&projectID=$projectID&projectID=$projectID", $group, 'list', 'eye', '', $disabled);?>
<?php common::printIcon('project', 'PRJManagePriv', "type=byGroup&param=$group->id", $group, 'list', 'lock');?>
<?php $lang->group->managemember = $lang->group->manageMember;?>
<?php common::printIcon('project', 'PRJManageGroupMember', "groupID=$group->id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='90%'");?>
<?php common::printIcon('project', 'PRJEditGroup', "groupID=$group->id", $group, 'list', 'edit', '', 'iframe', 'yes', "data-width='550'");?>
<?php common::printIcon('project', 'PRJCopyGroup', "groupID=$group->id", $group, 'list', 'copy', '', "iframe $disabled", 'yes', "data-width='550'");?>
<?php
if(common::hasPriv('group', 'delete') and $group->role != 'limited')
{
$deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->group->delete}' class='btn'");
}
else
{
echo "<button class='btn disabled'><i class='icon icon-trash disabled' title='{$lang->group->delete}'></i></button>";
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
+115
View File
@@ -0,0 +1,115 @@
<?php include '../../common/view/header.html.php';?>
<?php js::set('projectID', $project->id);?>
<?php js::set('roles', $roles);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'>
<?php echo html::a($this->createLink('project', 'prjmanagemembers', "projectID={$project->id}"), "<span class='text'> {$lang->project->manageMembers}</span>");?>
</span>
<div class='input-group space w-200px'>
<span class='input-group-addon'><?php echo $lang->project->selectDept?></span>
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDeptTitle}'");?>
</div>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class='main-form form-ajax' method='post' id='teamForm'>
<table class='table table-form'>
<thead>
<tr class='text-center'>
<th><?php echo $lang->team->account;?></th>
<th><?php echo $lang->team->role;?></th>
<th class='w-100px'><?php echo $lang->team->days;?></th>
<th class='w-100px'><?php echo $lang->team->hours;?></th>
<th class='w-110px'><?php echo $lang->team->limited;?></th>
<th class="w-90px"> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $i = 0; $memberCount = 0;?>
<?php foreach($currentMembers as $member):?>
<?php if(!isset($users[$member->account])) continue;?>
<?php unset($users[$member->account]);?>
<tr>
<td><input type='text' name='realnames[]' id='account<?php echo $i;?>' value='<?php echo $member->realname;?>' readonly class='form-control' /></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' value='<?php echo $member->role;?>' class='form-control' /></td>
<td><input type='text' name='days[] ' id='days<?php echo $i;?>' value='<?php echo $member->days;?>' class='form-control' /></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo $i;?>' value='<?php echo $member->hours;?>' class='form-control' />
<input type='hidden' name='accounts[]' value='<?php echo $member->account;?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, $member->limited);?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php foreach($deptUsers as $deptAccount => $userName):?>
<?php if(!isset($users[$deptAccount])) continue;?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, $deptAccount, "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' class='form-control' value='<?php echo $roles[$deptAccount]?>'/></td>
<td><input type='text' name='days[]' id='days<?php echo $i;?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo $i;?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php unset($users[$deptAccount]);?>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php for($j = 0; $j < 5; $j ++):?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, '', "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endfor;?>
</tbody>
<tfoot>
<tr>
<td colspan='6' class='text-center form-actions'>
<?php echo html::submitButton() . html::backButton();?>
</td>
</tr>
</tfoot>
</table>
<?php js::set('i', $i);?>
</form>
</div>
<div>
<?php $i = '%i%';?>
<table class='hidden'>
<tr id='addItem' class='hidden'>
<td><?php echo html::select("accounts[]", $users, '', "class='form-control' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
+187
View File
@@ -0,0 +1,187 @@
<?php
/**
* The manage privilege view of group module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package group
* @version $Id: managepriv.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<style>
.table-bymodule select.form-control {height:250px}
.group-item {display:block; width:220px; float:left; font-size: 14px}
.group-item .checkbox-inline label{padding-left:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.table.table-form tbody > tr:last-child td {border-top: 1px solid #ddd}
@-moz-document url-prefix(){.table.table-form tbody > tr:last-child td, .table.table-form tbody > tr:last-child th {border-bottom: 1px solid #ddd}}
#mainMenu #groupName{line-height:33px; float: left}
.checkbox-right{padding-left:0px !important;}
td.menus {border-right: 0;padding-right: 0;width: 220px !important;}
td.menus + td {border-left: 0;}
.menus .checkbox-primary {float: left; width: 220px;}
.menus .checkbox-primary:first-child {float: left; width: auto;}
.menus a {margin-left: 10px;}
</style>
<?php if($group->role == 'limited'):?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<a href='javascript:;' class='btn btn-link btn-active-text'><span class='text'><?php echo $group->name;?></span></a>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class="load-indicator main-form form-ajax" id="managePrivForm" method="post" target='hiddenwin'>
<table class='table table-hover table-striped table-bordered'>
<thead>
<tr class='text-center'>
<th><?php echo $lang->group->module;?></th>
<th><?php echo $lang->group->method;?></th>
</tr>
</thead>
<tr class='<?php echo cycle('even, bg-gray');?>'>
<th class='text-right thWidth'><?php echo $lang->my->common;?></th>
<td id='my' class='pv-10px'>
<div class='checkbox-primary'>
<input type='checkbox' name='actions[my][]' value='limited' <?php if(isset($groupPrivs['my']['limited'])) echo "checked";?> />
<label class='priv' id="my-limited"><?php echo $lang->my->limited;?></label>
</div>
</td>
</tr>
<tr>
<th class='text-right'></th>
<td class='form-actions'>
<?php echo html::submitButton('', "onclick='setNoChecked()'");?>
<?php echo html::backButton();?>
<?php echo html::hidden('noChecked'); // Save the value of no checked.?>
</td>
</tr>
</table>
</form>
</div>
<?php else:?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span id='groupName'><i class='icon-lock'></i> <?php echo $group->name;?> <i class="icon icon-chevron-right"></i></span>
<?php $params = "type=byGroup&param=$groupID";?>
<?php echo html::a(inlink('pgmmanagepriv', $params), "<span class='text'>{$lang->group->all}</span>", '', "class='btn btn-link btn-active-text'")?>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class="load-indicator main-form form-ajax" id="managePrivForm" method="post" target='hiddenwin'>
<table class='table table-hover table-striped table-bordered' id='privList'>
<thead>
<tr class='text-center'>
<th class='thWidth'><?php echo $lang->group->module;?></th>
<th colspan='2'><?php echo $lang->group->method;?></th>
</tr>
</thead>
<?php foreach($lang->resource as $moduleName => $moduleActions):?>
<?php if(!count((array)$moduleActions)) continue;?>
<?php if(!$this->group->checkMenuModule($menu, $moduleName)) continue;?>
<?php
/* Check method in select version. */
if($version)
{
$hasMethod = false;
foreach($moduleActions as $action => $actionLabel)
{
if(strpos($changelogs, ",$moduleName-$actionLabel,") !== false)
{
$hasMethod = true;
break;
}
}
if(!$hasMethod) continue;
}
?>
<tr class='<?php echo cycle('even, bg-gray');?>'>
<th class='text-middle text-right thWidth'>
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
<input type='checkbox' id='allChecker<?php echo $moduleName;?>'>
<label class='text-right' for='allChecker<?php echo $moduleName;?>'><?php echo $lang->$moduleName->common;?></label>
</div>
</th>
<?php if(isset($lang->$moduleName->menus)):?>
<td class='menus'>
<?php echo html::checkbox("actions[$moduleName]", array('browse' => $lang->$moduleName->browse), isset($groupPrivs[$moduleName]) ? $groupPrivs[$moduleName] : '');?>
<a href='javascript:;'><i class='icon icon-plus'></i></a>
<?php echo html::checkbox("actions[$moduleName]", $lang->$moduleName->menus, isset($groupPrivs[$moduleName]) ? $groupPrivs[$moduleName] : '');?>
</td>
<?php endif;?>
<td id='<?php echo $moduleName;?>' class='pv-10px' colspan='<?php echo !empty($lang->$moduleName->menus) ? 1 : 2?>'>
<?php $i = 1;?>
<?php foreach($moduleActions as $action => $actionLabel):?>
<?php if(!empty($lang->$moduleName->menus) and $action == 'browse') continue;;?>
<?php if(!empty($version) and strpos($changelogs, ",$moduleName-$actionLabel,") === false) continue;?>
<div class='group-item'>
<?php echo html::checkbox("actions[{$moduleName}]", array($action => $lang->$moduleName->$actionLabel), isset($groupPrivs[$moduleName][$action]) ? $action : '', '', 'inline');?>
</div>
<?php endforeach;?>
</td>
</tr>
<?php endforeach;?>
<tr>
<th class='text-right'>
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
<input type='checkbox' id='allChecker'>
<label class='text-right' for='allChecker'><?php echo $lang->selectAll;?></label>
</div>
</th>
<td class='form-actions' colspan='2'>
<?php echo html::submitButton('', "onclick='setNoChecked()'", 'btn btn-wide btn-primary');?>
<?php echo html::backButton();?>
<?php echo html::hidden('noChecked'); // Save the value of no checked.?>
</td>
</tr>
</table>
</form>
</div>
<?php endif;?>
<?php js::set('groupID', $groupID);?>
<?php js::set('menu', $menu);?>
<script>
$(document).ready(function()
{
/**
* 隐藏列表标签。
* Hide tabs except the browse list tab.
*/
$('.menus input[name^=actions]:not(input[value=browse])').parent('.checkbox-primary').hide();
/**
* 切换列表标签的显示。
* Toggle display of tabs except the browse list tab.
*/
$('.menus .icon-plus').click(function()
{
$(this).toggleClass('icon-minus', 'icon-plus');
$('.menus input[name^=actions]:not(input[value=browse])').parent('.checkbox-primary').toggle();
})
/**
* 勾选浏览列表标签时,自动勾选下面的所有标签。
* Check all tabs when the Browse list tab is selected.
*/
$('.menus input[value=browse]').change(function()
{
$(this).parents('.menus').find('[name^=actions]').prop('checked', $(this).prop('checked'));
});
/**
* 勾选浏览列表标签下面的任意一个标签时,自动勾选浏览列表标签。
* Check the browse list tab when any one of the tabs is selected.
*/
$('.menus input[name^=actions]:not(input[value=browse])').click(function()
{
var $parent = $(this).parents('.menus');
$parent.find('input[value=browse]').prop('checked', $parent.find('input[name^=actions]:not(input[value=browse]):checked').length > 0);
})
});
</script>
<?php include '../../common/view/footer.html.php'; ?>
@@ -0,0 +1,69 @@
<?php
/**
* The manage prjmanageproducts view of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->project->manageProducts;?></span></span>
</div>
</div>
<div id='mainContent'>
<div class='cell'>
<form class='main-form form-ajax' method='post' id='productsBox' enctype='multipart/form-data'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->project->linkedProducts;?></div>
<div class='detail-content row'>
<?php foreach($allProducts as $productID => $productName):?>
<?php if(isset($linkedProducts[$productID])):?>
<?php $isDisabled = in_array($productID, $unmodifiableProducts) ? "disabled='disabled'" : '';?>
<?php $title = in_array($productID, $unmodifiableProducts) ? $lang->project->notAllowRemoveProducts : $productName;?>
<?php $checked = 'checked';?>
<div class='col-sm-4'>
<div class='product <?php echo $checked . (isset($branchGroups[$productID]) ? ' has-branch' : '')?>'>
<div class="checkbox-primary" title='<?php echo $title;?>'>
<?php echo "<input type='checkbox' name='products[$productID]' value='$productID' $checked id='products{$productID}' $isDisabled>";?>
<label class='text-ellipsis checkbox-inline' for='<?php echo 'products' . $productID;?>' title='<?php echo $productName;?>'><?php echo $productName;?></label>
</div>
<?php if(isset($branchGroups[$productID])) echo html::select("branch[$productID]", $branchGroups[$productID], $linkedProducts[$productID]->branch, "class='form-control chosen'");?>
</div>
</div>
<?php if(!empty($isDisabled)) echo html::hidden("products[$productID]", $productID);?>
<?php unset($allProducts[$productID]);?>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->project->unlinkedProducts;?></div>
<div class='detail-content row'>
<?php foreach($allProducts as $productID => $productName):?>
<div class='col-sm-4'>
<div class='product<?php echo isset($branchGroups[$productID]) ? ' has-branch' : ''?>'>
<div class="checkbox-primary" title='<?php echo $productName;?>'>
<?php echo "<input type='checkbox' name='products[$productID]' value='$productID' id='products{$productID}'>";?>
<label class='text-ellipsis checkbox-inline' for='<?php echo 'products' . $productID;?>'><?php echo $productName;?></label>
</div>
<?php if(isset($branchGroups[$productID])) echo html::select("branch[$productID]", $branchGroups[$productID], '', "class='form-control chosen'");?>
</div>
</div>
<?php endforeach;?>
</div>
</div>
<div class="detail text-center form-actions">
<?php echo html::hidden("post", 'post');?>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</div>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+86
View File
@@ -0,0 +1,86 @@
<?php
/**
* The manage view by project view of group module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package group
* @version $Id: managepriv.html.php 1517 2011-03-07 10:02:57Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2 title='<?php echo $group->name;?>'>
<span id='groupName'><i class='icon-lock'></i> <?php echo $group->name;?></span>
<small> <?php echo $lang->arrow . $lang->group->manageView;?></small>
</h2>
</div>
<form class="load-indicator main-form form-ajax" id="manageViewForm" method="post" target='hiddenwin'>
<table class='table table-form'>
<!--tr>
<th class='text-bottom thWidth'><?php echo $lang->group->viewList;?></th>
<td class='text-bottom'>
<?php foreach($lang->menu as $menuKey => $menu):?>
<?php if(!is_string($menu)) continue;?>
<?php list($moduleName, $module) = explode('|', $menu);?>
<?php if($module == 'my') continue;?>
<?php $moduleName = strip_tags($moduleName);?>
<div class='group-item'>
<div class='checkbox-primary'>
<input type='checkbox' id='<?php echo $menuKey?>' name='actions[views][<?php echo strtolower($menuKey);?>]' value='<?php echo $menuKey;?>' <?php if(isset($group->acl['views'][$menuKey]) or empty($group->acl['views'])) echo "checked";?> />
<label class='priv' for='<?php echo $menuKey?>'>
<?php echo $moduleName;?>
</label>
</div>
</div>
<?php endforeach;?>
<div class='group-item'>
<div class='checkbox-primary'>
<input type="checkbox" id='allchecker' name="allchecker" onclick="selectAll(this)" <?php if(empty($group->acl['views'])) echo "checked";?> />
<label class='priv' for='allchecker'>
<?php echo $lang->selectAll?>
</label>
</div>
</div>
</td>
</tr-->
<tr id='productBox'>
<th class='text-right'><?php echo $lang->group->productList?></th>
<td>
<?php if($products):?>
<div class='input-group'>
<?php echo html::select("actions[products][]", $products, isset($group->acl['products']) ? join(',', $group->acl['products']) : '', "class='form-control chosen' multiple")?>
<span class='input-group-addon strong'><?php echo $lang->group->noticeVisit?></span>
</div>
<?php else:?>
<?php echo $lang->group->noneProduct;?>
<?php endif;?>
</td>
</tr>
<tr id='projectBox'>
<th class='text-right'><?php echo $lang->group->projectList?></th>
<td>
<?php if($projects):?>
<div class='input-group'>
<?php echo html::select("actions[projects][]", $projects, isset($group->acl['projects']) ? join(',', $group->acl['projects']) : '', "class='form-control chosen' multiple")?>
<span class='input-group-addon strong'><?php echo $lang->group->noticeVisit?></span>
</div>
<?php else:?>
<?php echo $lang->group->noneProject;?>
<?php endif;?>
</td>
</tr>
<tr>
<td colspan='2' class='form-actions text-center'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
<?php echo html::hidden('foo'); // Just a hidden var, to make sure $_POST is not empty.?>
</td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+32
View File
@@ -0,0 +1,32 @@
<?php
/**
* The prjprojecttitle view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: prjprojecttitle.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div class="modal-header">
<h4 class="modal-title"><i class="icon-cog"></i><?php echo $lang->project->PRJModuleSetting;?></h4>
</div>
<div class="modal-body" style="max-height: 564px; overflow: visible;">
<form class="form-condensed" method="post" target="hiddenwin">
<table class="table table-form">
<tbody>
<tr>
<td class="w-180px"><?php echo $lang->project->PRJModuleOpen;?></td>
<td><?php echo html::radio('PRJProgramTitle', $lang->project->PRJProgramTitle, $status);?></td>
</tr>
<tr>
<td colspan="2" class="text-center"><?php echo html::submitButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+50
View File
@@ -0,0 +1,50 @@
<?php
/**
* The prjstart view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: prjstart.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://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='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->project->start;?></small>
<?php endif;?>
</h2>
</div>
<form class='load-indicator main-form' method='post' target='hiddenwin'>
<table class='table table-form'>
<tbody>
<tr>
<th class='w-100px'><?php echo $lang->project->realBegan;?></th>
<td><?php echo html::input('realBegan', helper::today(), "class='form-control form-date'");?></td>
<td></td>
</tr>
<tr>
<th class='w-40px'><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton($lang->project->start);?>
</td>
</tr>
</tbody>
</table>
</form>
<hr class='small' />
<div class='main'>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+235
View File
@@ -0,0 +1,235 @@
<?php
/**
* The view method view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version $Id: view.html.php 4594 2013-03-13 06:16:02Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class="main-row">
<div class="col-8 main-col">
<div class="row">
<div class="col-sm-6">
<div class="panel block-dynamic" style="height: 280px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->latestDynamic;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('project', 'dynamic', "projectID=$project->id&type=all", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body scrollbar-hover">
<ul class="timeline timeline-tag-left no-margin">
<?php foreach($dynamics as $action):?>
<li <?php if($action->major) echo "class='active'";?>>
<div class='text-ellipsis'>
<span class="timeline-tag"><?php echo $action->date;?></span>
<span class="timeline-text"><?php echo zget($users, $action->actor) . ' ' . "<span class='label-action'>{$action->actionLabel}</span>" . $action->objectLabel . ' ' . html::a($action->objectLink, $action->objectName, '', "title='$action->objectName'");?></span>
</div>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel block-team" style="height: 280px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->relatedMember;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('project', 'PRJManageMembers', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body">
<div class="row row-grid">
<?php $i = 9; $j = 0;?>
<?php if($project->PM):?>
<?php $i--;?>
<?php unset($teamMembers[$project->PM]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->PM);?> <span class="text-muted">(<?php echo $lang->project->PRJPM;?>)</span></div>
<?php endif;?>
<?php if($project->PO):?>
<?php $i--;?>
<?php unset($teamMembers[$project->PO]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->PO);?> <span class="text-muted">(<?php echo $lang->project->PO;?>)</span></div>
<?php endif;?>
<?php if($project->QD):?>
<?php $i--;?>
<?php unset($teamMembers[$project->QD]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->QD);?> <span class="text-muted">(<?php echo $lang->project->QD;?>)</span></div>
<?php endif;?>
<?php if($project->RD):?>
<?php $i--;?>
<?php unset($teamMembers[$project->RD]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->RD);?> <span class="text-muted">(<?php echo $lang->project->RD;?>)</span></div>
<?php endif;?>
<?php foreach($teamMembers as $teamMember):?>
<?php if($j > $i) break;?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $teamMember->account);?></div>
<?php $j++;?>
<?php endforeach;?>
<div class="col-xs-6">
<?php common::printLink('project', 'PRJManageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> &nbsp;" . $lang->project->manageMembers, '', "class='text-muted'");?>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<?php $blockHistory = true;?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=project&objectID=$project->id");?>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<div class='main-actions'>
<div class="btn-toolbar">
<?php
$params = "project=$project->id";
common::printBack(inlink('prjbrowse'));
if(!$project->deleted)
{
echo "<div class='divider'></div>";
common::printIcon('project', 'PRJStart', "projectID=$project->id", $project, 'button', 'play', '', 'iframe', true, '', $lang->project->start);
common::printIcon('project', 'PRJActivate', "projectID=$project->id", $project, 'button', 'magic', '', 'iframe', true, '', $lang->project->activate);
common::printIcon('project', 'PRJSuspend', "projectID=$project->id", $project, 'button', 'pause', '', 'iframe', true, '', $lang->project->suspend);
common::printIcon('project', 'PRJClose', "projectID=$project->id", $project, 'button', 'off', '', 'iframe', true, '', $lang->close);
echo $this->buildOperateMenu($project, 'view');
echo "<div class='divider'></div>";
common::printIcon('project', 'PRJEdit', $params, $project, 'button', 'edit', '', '', '', '', $lang->edit);
common::printIcon('project', 'PRJDelete', $params, $project, 'button', 'trash', 'hiddenwin', '', '', '', $lang->delete);
}
?>
</div>
</div>
</div>
<div class="col-4 side-col">
<div class="row">
<div class="col-sm-12">
<div class="cell">
<div class="detail">
<h2 class="detail-title"><span class="label-id"><?php echo $project->id;?></span> <span class="label label-light label-outline"><?php echo $project->code;?></span> <?php echo $project->name;?></h2>
<div class="detail-content article-content">
<p><span class="text-limit" data-limit-size="40"><?php echo $project->desc;?></span><a class="text-primary text-limit-toggle small" data-text-expand="<?php echo $lang->expand;?>" data-text-collapse="<?php echo $lang->collapse;?>"></a></p>
<p>
<?php if($project->deleted):?>
<span class='label label-danger label-outline'><?php echo $lang->project->deleted;?></span>
<?php endif; ?>
<span class="label label-primary label-outline"><?php echo zget($lang->project->PRJLifeTimeList, $project->lifetime);?></span>
<?php if(isset($project->delay)):?>
<span class="label label-danger label-outline"><?php echo $lang->project->delayed;?></span>
<?php else:?>
<span class="label label-success label-outline"><?php echo $this->processStatus('project', $project);?></span>
<?php endif;?>
</p>
</div>
</div>
<div class="detail">
<div class="detail-title">
<strong><?php echo $lang->project->manageProducts;?></strong>
<?php common::printLink('project', 'manageproducts', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "class='btn btn-link pull-right muted'");?>
</div>
<div class="detail-content">
<div class="row row-grid">
<?php foreach($products as $productID => $product):?>
<?php $branchName = isset($branchGroups[$productID][$product->branch]) ? '/' . $branchGroups[$productID][$product->branch] : '';?>
<div class="col-xs-6">
<?php echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$product->branch"), "<i class='icon icon-cube text-muted'></i> " . $product->name . $branchName);?>
</div>
<?php endforeach;?>
</div>
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->linkPlan;?></strong></div>
<div class="detail-content">
<div class="row row-grid">
<?php foreach($products as $productID => $product):?>
<?php if(isset($planGroups[$productID][$product->plan])):?>
<div class="col-xs-12"><?php echo html::a($this->createLink('productplan', 'view', "planID={$product->plan}"), $product->name . '/' . $planGroups[$productID][$product->plan]);?></div>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
</div>
<div class='detail'>
<div class='detail-title'><strong><?php echo $lang->project->lblStats;?></strong></div>
<div class="detail-content">
<table class='table table-data data-stats'>
<tbody>
<tr class='statsTr'><td class='w-100px'></td><td></td><td></td><td></td></tr>
<tr>
<td colspan="4">
<?php $progress = ($workhour->totalConsumed + $workhour->totalLeft) ? floor($workhour->totalConsumed / ($workhour->totalConsumed + $workhour->totalLeft) * 1000) / 1000 * 100 : 0;?>
<?php echo $lang->project->progress;?> <em><?php echo $progress . $lang->percent;?></em> &nbsp;
<div class="progress inline-block">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $progress . $lang->percent;?>"></div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->begin;?></th>
<td><?php echo $project->begin;?></td>
<th><?php echo $lang->project->totalEstimate;?></th>
<td><em><?php echo (float)$workhour->totalEstimate . $lang->project->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->end;?></th>
<td><?php echo $project->end;?></td>
<th><?php echo $lang->project->totalConsumed;?></th>
<td><em><?php echo (float)$workhour->totalConsumed . $lang->project->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->totalDays;?></th>
<td><?php echo $project->days;?></td>
<th><?php echo $lang->project->totalLeft;?></th>
<td><em><?php echo (float)$workhour->totalLeft . $lang->project->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->totalHours;?></th>
<td><em><?php echo (float)$workhour->totalHours . $lang->project->workHour;?></em></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->basicInfo;?></strong></div>
<div class="detail-content">
<table class="table table-data data-basic">
<tbody>
<tr>
<th><?php echo $lang->story->common;?></th>
<td><em><?php echo $statData->storyCount;?></em></td>
<th><?php echo $lang->task->common;?></th>
<td><em><?php echo $statData->taskCount;?></em></td>
<th><?php echo $lang->bug->common;?></th>
<td><em><?php echo $statData->bugCount;?></em></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->acl;?></strong></div>
<div class="detail-content">
<p><?php echo $lang->project->PGMPRJAclList[$project->acl];?></p>
</div>
</div>
<?php $this->printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?>
</div>
</div>
</div>
</div>
</div>
<div id="mainActions" class='main-actions'>
<nav class="container"></nav>
<?php include '../../common/view/footer.html.php';?>