* Modify the logic of project editing.

This commit is contained in:
tianshujie98
2021-02-20 15:57:10 +08:00
parent 8203c0df12
commit 8212de6cc3
25 changed files with 363 additions and 133 deletions
+1 -1
View File
@@ -94,7 +94,7 @@
</ul>
</div>
<?php endif;?>
<?php common::printIcon('program', 'PRJEdit', "projectID=$program->id&programID=$program->parent&from=pgmbrowse", $program, 'list', 'edit', '', '', '', "data-group='program'", '', $program->id);?>
<?php common::printIcon('program', 'PRJEdit', "projectID=$program->id&from=pgmbrowse", $program, 'list', 'edit', '', '', '', "data-group='program'", '', $program->id);?>
<?php common::printIcon('program', 'PRJManageMembers', "projectID=$program->id", $program, 'list', 'group', '', '', '', 'data-group="program"', '', $program->id);?>
<?php common::printIcon('program', 'PRJGroup', "projectID=$program->id", $program, 'list', 'lock', '', '', '', 'data-group="program"', '', $program->id);?>
<?php if(common::hasPriv('program', 'PRJManageProducts') || common::hasPriv('program', 'PRJWhitelist') || common::hasPriv('program', 'PRJDelete')):?>
+15 -1
View File
@@ -45,13 +45,14 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = common::hasPriv('program', 'PRJBatchEdit');?>
<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);
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
</tr>
@@ -66,6 +67,19 @@ js::set('browseType', $browseType);
</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->createLink('program', 'PRJBatchEdit', "from=pgmproject&programID=$programID");
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
+14
View File
@@ -0,0 +1,14 @@
<?php
/**
* The prjbatchedit view file of program 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 program
* @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 include '../../common/view/footer.html.php';?>
+16 -2
View File
@@ -55,7 +55,7 @@ js::set('browseType', $browseType);
</p>
</div>
<?php else:?>
<form class='main-table' id='PRJForm' method='post'>
<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>
@@ -64,13 +64,14 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = common::hasPriv('program', 'PRJBatchEdit');?>
<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);
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
</tr>
@@ -85,6 +86,19 @@ js::set('browseType', $browseType);
</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->createLink('program', 'PRJBatchEdit', 'from=prjbrowse');
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
+19 -2
View File
@@ -17,11 +17,11 @@
<?php js::set('errorSameProducts', $lang->program->errorSameProducts);?>
<?php js::set('oldParent', $project->parent);?>
<?php js::set('projectID', $project->id);?>
<?php js::set('PGMChangeTips', $lang->program->PGMChangeTips);?>
<?php js::set('longTime', $lang->program->PRJLongTime);?>
<?php js::set('from', $from);?>
<?php js::set('notRemoveProducts', $notRemoveProducts)?>
<?php js::set('tip', $lang->program->notAllowRemoveProducts);?>
<?php js::set('linkedProjectsTip', $lang->program->linkedProjectsTip);?>
<?php $aclList = $project->parent ? $lang->program->PGMPRJAclList : $lang->program->PRJAclList;?>
<?php $requiredFields = $config->program->PRJEdit->requiredFields;?>
<div id='mainContent' class='main-content'>
@@ -33,7 +33,7 @@
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->program->PGMParent;?></th>
<td><?php echo html::select('parent', $programList, $programID != $project->parent ? $programID : $project->parent, "class='form-control chosen' onchange='setParentProgram(this.value)'");?></td>
<td><?php echo html::select('parent', $programList, $project->parent, "class='form-control chosen'");?></td>
<td></td>
<td></td>
</tr>
@@ -174,4 +174,21 @@
<div id='PGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->program->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 echo $project->name . ' > ' . $lang->program->changeProgram;?></h4>
</div>
<div class="modal-body">
<table class='table table-form' id='promptTable'>
<tr>
<th class='text-left'><?php echo $lang->program->multiLinkedProductsTip;?></th>
</tr>
</table>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -103,7 +103,7 @@
echo $this->buildOperateMenu($project, 'view');
echo "<div class='divider'></div>";
common::printIcon('program', 'PRJEdit', $params . "&programID=$project->parent", $project, 'button', 'edit', '', '', '', '', $lang->edit);
common::printIcon('program', 'PRJEdit', $params, $project, 'button', 'edit', '', '', '', '', $lang->edit);
common::printIcon('program', 'PRJDelete', $params, $project, 'button', 'trash', 'hiddenwin', '', '', '', $lang->delete);
}
?>