* Delete unused file and add new file.
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
<?php js::set('programID', $programID);?>
|
||||
<?php js::set('module', $module);?>
|
||||
<?php js::set('method', $method);?>
|
||||
<?php js::set('extra', $extra);?>
|
||||
<?php
|
||||
$iCharges = 0;
|
||||
$others = 0;
|
||||
$dones = 0;
|
||||
$programNames = array();
|
||||
$myProgramsHtml = '';
|
||||
$normalProgramsHtml = '';
|
||||
$closedProgramsHtml = '';
|
||||
foreach($programs as $program)
|
||||
{
|
||||
if($program->status != 'done' and $program->status != 'closed' and $program->PM == $this->app->user->account) $iCharges++;
|
||||
if($program->status != 'done' and $program->status != 'closed' and !($program->PM == $this->app->user->account)) $others++;
|
||||
if($program->status == 'done' or $program->status == 'closed') $dones++;
|
||||
$programNames[] = $program->name;
|
||||
}
|
||||
$programsPinYin = common::convert2Pinyin($programNames);
|
||||
|
||||
foreach($programs as $program)
|
||||
{
|
||||
$link = $this->createLink('program', 'index', "programID=$program->id", '', '', $program->id);
|
||||
if($program->status != 'done' and $program->status != 'closed' and $program->PM == $this->app->user->account)
|
||||
{
|
||||
$myProgramsHtml .= html::a($link, "<i class='icon icon-folder-outline'></i> " . $program->name, '', "class='text-important' title='{$program->name}' data-id={$program->id} data-key='" . zget($programsPinYin, $program->name, '') . "'");
|
||||
}
|
||||
else if($program->status != 'done' and $program->status != 'closed' and !($program->PM == $this->app->user->account))
|
||||
{
|
||||
$normalProgramsHtml .= html::a($link, "<i class='icon icon-folder-outline'></i> " . $program->name, '', "title='{$program->name}' data-id={$program->id} data-key='" . zget($programsPinYin, $program->name, '') . "'");
|
||||
}
|
||||
else if($program->status == 'done' or $program->status == 'closed') $closedProgramsHtml .= html::a($link, "<i class='icon icon-folder-outline'></i> " . $program->name, '', "title='{$program->name}' data-id={$program->id} data-key='" . zget($programsPinYin, $program->name, '') . "'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
if(!empty($myProgramsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->project->mine}</div>";
|
||||
echo $myProgramsHtml;
|
||||
if(!empty($myProgramsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->project->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProgramsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<div class='pull-left'>
|
||||
<?php echo html::a(helper::createLink('program', 'browse', 'status=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
</div>
|
||||
<div class='pull-right'>
|
||||
<span class='text-muted muted'> | </span>
|
||||
<a class='toggle-right-col not-list-item'><?php echo $lang->project->doneProjects?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-col col-right">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
echo $closedProgramsHtml;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,163 +0,0 @@
|
||||
<div class='row cell' id='cards'>
|
||||
<?php foreach ($programs as $programID => $program):?>
|
||||
<div class='col' data-id='<?php echo $programID?>'>
|
||||
<div class='panel' data-url='<?php echo $this->createLink('program', 'index', "programID=$program->id", '', '', $program->id);?>'>
|
||||
<div class='panel-heading'>
|
||||
<strong class='program-name' title='<?php echo $program->name;?>'><?php echo $program->name;?></strong>
|
||||
<?php if($program->template === 'waterfall'): ?>
|
||||
<span class='program-type-label label label-warning label-outline'><?php echo $lang->program->waterfall; ?></span>
|
||||
<?php else: ?>
|
||||
<span class='program-type-label label label-info label-outline'><?php echo $lang->program->scrum; ?></span>
|
||||
<?php endif; ?>
|
||||
<nav class='panel-actions nav nav-default'>
|
||||
<li class='dropdown'>
|
||||
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<li><?php common::printIcon('program', 'group', "programID=$program->id", $program, 'button', 'group');?></li>
|
||||
<li><?php common::printIcon('program', 'manageMembers', "programID=$program->id", $program, 'button', 'persons');?></li>
|
||||
<li><?php common::printicon('program', 'activate', "programid=$program->id", $program, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "programID=$program->id"), "<i class='icon-edit'></i> " . $lang->edit, '', "");?></li>
|
||||
<li><?php common::printIcon('program', 'start', "programID=$program->id", $program, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'suspend', "programID=$program->id", $program, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'close', "programID=$program->id", $program, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("program", "delete", "programID=$program->id"), "<i class='icon-trash'></i> " . $lang->delete, 'hiddenwin', "");?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='program-infos'>
|
||||
<span><i class='icon icon-group'></i> <?php printf($lang->program->membersUnit, $program->teamCount); ?></span>
|
||||
<span><i class='icon icon-clock'></i> <?php printf($lang->program->hoursUnit, $program->estimate); ?></span>
|
||||
<span><i class='icon icon-cost'></i> <?php echo $program->budget . '' . zget($lang->program->unitList, $program->budgetUnit);?></span>
|
||||
</div>
|
||||
<?php if($program->template === 'waterfall'): ?>
|
||||
<div class='program-detail program-stages'>
|
||||
<p class='text-muted'><?php echo $lang->program->ongoingStage; ?></p>
|
||||
<?php
|
||||
$programProjects = array();
|
||||
foreach($program->projects as $project)
|
||||
{
|
||||
if(!$project->parent) $programProjects[] = $project;
|
||||
}
|
||||
?>
|
||||
<?php if(empty($programProjects)): ?>
|
||||
<div class='label label-outline'><?php echo zget($lang->project->statusList, $program->status);?></div>
|
||||
<?php else: ?>
|
||||
<div class='program-stages-container scrollbar-hover'>
|
||||
<div class='program-stages-row'>
|
||||
<?php foreach ($programProjects as $project): ?>
|
||||
<div class='program-stage-item is-<?php echo $project->status;?><?php if($project->status !== 'wait') echo ' is-going'; ?>'>
|
||||
<div><?php echo $project->name; ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php $project = $program->projects ? current($program->projects) : '';?>
|
||||
<div class='program-detail program-iteration'>
|
||||
<p class='text-muted'><?php echo $lang->program->lastIteration; ?></p>
|
||||
<?php if($project):?>
|
||||
<div class='row'>
|
||||
<div class='col-xs-5'><?php echo $project->name; ?></div>
|
||||
<div class='col-xs-7'>
|
||||
<div class="progress progress-text-left">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $project->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->hours->progress;?>%">
|
||||
<span class="progress-text"><?php echo $project->hours->progress;?>%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;?>
|
||||
<div class='col-xs-12' id='cardsFooter'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
#mainMenu {padding-left: 10px; padding-right: 10px;}
|
||||
|
||||
#cards {margin: 0 10px;}
|
||||
#cards > .col {width: 20%;}
|
||||
#cards .panel {margin: 10px 0; border: 1px solid #DCDCDC; border-radius: 2px; box-shadow: none; height: 146px; cursor: pointer;}
|
||||
#cards .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);}
|
||||
#cards .panel-heading {padding: 12px 24px 10px 16px;}
|
||||
#cards .panel-body {padding: 0 16px 16px;}
|
||||
#cards .panel-actions {padding: 7px 0;}
|
||||
#cards .panel-actions .dropdown-menu > li > a {padding-left: 5px; text-align: left;}
|
||||
#cards .panel-actions .dropdown-menu > li > a > i {opacity: .5; display: inline-block; margin-right: 4px; width: 18px; text-align: center;}
|
||||
#cards .panel-actions .dropdown-menu > li > a:hover > i {opacity: 1;}
|
||||
#cards .program-type-label {padding: 1px 2px;}
|
||||
#cards .program-name {font-size: 16px; font-weight: normal; display: inline-block; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;}
|
||||
#cards .program-infos {font-size: 12px;}
|
||||
#cards .program-infos > span {display: inline-block; line-height: 12px;}
|
||||
#cards .program-infos > span > .icon {font-size: 12px; display: inline-block; position: relative; top: -1px}
|
||||
#cards .program-infos > span + span {margin-left: 15px;}
|
||||
#cards .program-detail {position: absolute; bottom: 16px; left: 16px; right: 16px; font-size: 12px;}
|
||||
#cards .program-detail > p {margin-bottom: 8px;}
|
||||
#cards .program-detail .progress {height: 4px;}
|
||||
#cards .program-detail .progress-text-left .progress-text {width: 50px; left: -50px;}
|
||||
#cards .pager {margin: 0; float: right;}
|
||||
#cards .pager .btn {border: none}
|
||||
#cards .program-stages-container {margin: 0 -16px -16px -16px; padding: 0 4px; height: 46px; overflow-x: auto; position: relative;}
|
||||
#cards .program-stages:after {content: ' '; width: 30px; display: block; right: -16px; top: 16px; bottom: -6px; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); position: absolute;}
|
||||
#cards .program-stages-row {position: relative; height: 30px; z-index: 0;}
|
||||
#cards .program-stage-item {white-space: nowrap; position: absolute; top: 0; min-width: 48px; padding-top: 13px; color: #838A9D;}
|
||||
#cards .program-stage-item > div {white-space: nowrap; overflow: visible; text-align: center; text-overflow: ellipsis;}
|
||||
#cards .program-stage-item:before {content: ' '; display: block; width: 8px; height: 8px; border-radius: 50%; background: #D1D1D1; position: absolute; left: 50%; margin-left: -4px; top: 0; z-index: 1;}
|
||||
#cards .program-stage-item + .program-stage-item:after {content: ' '; display: block; left: -50%; right: 50%; height: 2px; background-color: #D1D1D1; top: 3px; position: absolute; z-index: 0;}
|
||||
#cards .program-stage-item.is-going {color: #333;}
|
||||
#cards .program-stage-item.is-going::before {background-color: #0C64EB;}
|
||||
</style>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
/* Auto resize cards size */
|
||||
var minCardWidth = 280;
|
||||
var $cards = $('#cards');
|
||||
var resizeCards = function()
|
||||
{
|
||||
var cardsWidth = $cards.width();
|
||||
var bestColsSize = 1;
|
||||
while((cardsWidth / (bestColsSize + 1)) > minCardWidth)
|
||||
{
|
||||
bestColsSize++;
|
||||
}
|
||||
$cards.children('.col').css('width', (100 / bestColsSize) + '%');
|
||||
};
|
||||
resizeCards();
|
||||
$(window).on('resize', resizeCards);
|
||||
|
||||
/* Auto resize stages */
|
||||
$cards.find('.program-stages-container').each(function()
|
||||
{
|
||||
var $container = $(this);
|
||||
var $row = $container.children();
|
||||
var totalWidth = 0;
|
||||
$row.children().each(function()
|
||||
{
|
||||
var $item = $(this);
|
||||
$item.css('left', totalWidth);
|
||||
totalWidth += $item.width();
|
||||
});
|
||||
$row.css('minWidth', totalWidth);
|
||||
});
|
||||
|
||||
/* Make cards clickable */
|
||||
$cards.on('click', '.panel', function(e)
|
||||
{
|
||||
if(!$(e.target).closest('.panel-actions').length)
|
||||
{
|
||||
window.location.href = $(this).data('url');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -1,126 +0,0 @@
|
||||
<?php $canOrder = (common::hasPriv('program', 'updateOrder') and strpos($orderBy, 'order') !== false)?>
|
||||
<form class='main-table' id='programForm' method='post' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false'>
|
||||
<table class='table has-sort-head table-fixed table-nested' id='programList'>
|
||||
<?php $vars = "status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id w-80px'>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-100px'><?php common::printOrderLink('code', $orderBy, $vars, $lang->program->PGMCode);?></th>
|
||||
<th class='table-nest-title'><?php common::printOrderLink('name', $orderBy, $vars, $lang->program->PGMName);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->program->PGMStatus);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->program->begin);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->program->end);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->program->PGMBudget);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->program->PGMPM);?></th>
|
||||
<th class='text-center w-240px'><?php echo $lang->actions;?></th>
|
||||
<?php if($canOrder):?>
|
||||
<th class='w-60px sort-default'><?php common::printOrderLink('order', $orderBy, $vars, $lang->project->orderAB);?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='programTableList'>
|
||||
<?php foreach($programs as $program):?>
|
||||
<?php
|
||||
$trClass = '';
|
||||
$trAttrs = "data-id='$program->id' data-order='$program->order' data-parent='$program->parent'";
|
||||
if($program->type == 'program')
|
||||
{
|
||||
$trAttrs .= " data-nested='true'";
|
||||
if($program->parent == '0') $trClass .= ' is-top-level table-nest-child-hide';
|
||||
else $trClass .= ' is-top-level table-nest-hide';
|
||||
}
|
||||
|
||||
if($program->parent)
|
||||
{
|
||||
if($program->type != 'program') $trClass .= ' is-nest-child';
|
||||
$trClass .= ' table-nest-hide';
|
||||
$trAttrs .= " data-nest-parent='$program->parent' data-nest-path='$program->path'";
|
||||
}
|
||||
elseif($program->type != 'program')
|
||||
{
|
||||
$trClass .= ' no-nest';
|
||||
}
|
||||
$trAttrs .= " class='$trClass'";
|
||||
?>
|
||||
<tr <?php echo $trAttrs;?>>
|
||||
<td class='c-id'>
|
||||
<?php printf('%03d', $program->id);?>
|
||||
</td>
|
||||
<td class='text-left'><?php echo $program->code;?></td>
|
||||
<td class='text-left pgm-title table-nest-title' title='<?php echo $program->name?>'>
|
||||
<span class="table-nest-icon icon<?php if($program->isCat) echo ' table-nest-toggle' ?>"></span>
|
||||
<?php echo $program->type == 'program' ? $program->name : html::a($this->createLink('program', 'index', "programID=$program->id", '', '', $program->id), $program->name);?>
|
||||
</td>
|
||||
<td class='c-status'><span class="status-program status-<?php echo $program->status?>"><?php echo zget($lang->project->statusList, $program->status, '');?></span></td>
|
||||
<td class='text-center'><?php echo $program->begin;?></td>
|
||||
<td class='text-center'><?php echo $program->end == '0000-00-00' ? '' : $program->end;?></td>
|
||||
<td class='text-left'><?php echo $program->budget . ' ' . zget($lang->program->unitList, $program->budgetUnit);?></td>
|
||||
<td><?php echo zget($users, $program->PM);?></td>
|
||||
<td class='text-center c-actions'>
|
||||
<?php common::printIcon('program', 'group', "programID=$program->id", $program, 'list', 'group');?>
|
||||
<?php common::printIcon('program', 'manageMembers', "programID=$program->id", $program, 'list', 'persons');?>
|
||||
<?php common::printIcon('program', 'start', "programID=$program->id", $program, 'list', '', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'activate', "programID=$program->id", $program, 'list', '', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'suspend', "programID=$program->id", $program, 'list', '', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'close', "programID=$program->id", $program, 'list', '', '', 'iframe', true);?>
|
||||
<?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
|
||||
<?php common::printIcon('program', 'create', "template=&programID=$program->id", '', 'list', 'treemap-alt', '', '', '', '', $this->lang->program->PGMChildren);?>
|
||||
<?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("program", "delete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
|
||||
</td>
|
||||
<?php if($canOrder):?>
|
||||
<td class='sort-handler text-center'><i class="icon icon-move"></i></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
<style>
|
||||
.w-240px {width:240px;}
|
||||
#programTableList.sortable-sorting > tr {opacity: 0.7}
|
||||
#programTableList.sortable-sorting > tr.drag-row {opacity: 1;}
|
||||
#programTableList > tr.drop-not-allowed {opacity: 0.1!important}
|
||||
</style>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
var $list = $('#programTableList');
|
||||
$list.addClass('sortable').sortable(
|
||||
{
|
||||
reverse: orderBy === 'order_desc',
|
||||
selector: 'tr',
|
||||
dragCssClass: 'drag-row',
|
||||
trigger: $list.find('.sort-handler').length ? '.sort-handler' : null,
|
||||
canMoveHere: function($ele, $target)
|
||||
{
|
||||
return $ele.data('parent') === $target.data('parent');
|
||||
},
|
||||
start: function(e)
|
||||
{
|
||||
e.targets.filter('[data-parent!="' + e.element.attr('data-parent') + '"]').addClass('drop-not-allowed');
|
||||
},
|
||||
finish: function(e)
|
||||
{
|
||||
var orders = {};
|
||||
e.list.each(function()
|
||||
{
|
||||
orders[$(this.item).data('id')] = this.order;
|
||||
});
|
||||
$.post(createLink('project', 'updateOrder'), {'projects' : orders, 'orderBy' : orderBy});
|
||||
|
||||
var $thead = $list.closest('table').children('thead');
|
||||
$thead.find('.headerSortDown, .headerSortUp').removeClass('headerSortDown headerSortUp').addClass('header');
|
||||
$thead.find('th.sort-default .header').removeClass('header').addClass('headerSortDown');
|
||||
|
||||
e.element.addClass('drop-success');
|
||||
setTimeout(function(){e.element.removeClass('drop-success');}, 800);
|
||||
$list.children('.drop-not-allowed').removeClass('drop-not-allowed');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -1,100 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of program 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 program
|
||||
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('weekend', $config->project->weekend);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->program->PGMEdit;?></h2>
|
||||
</div>
|
||||
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->program->PGMParent;?></th>
|
||||
<td class="col-main"><?php echo html::select('parent', $parents, $program->parent, "class='form-control chosen'");?></td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->program->PGMName;?></th>
|
||||
<td class="col-main"><?php echo html::input('name', $program->name, "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMCode;?></th>
|
||||
<td><?php echo html::input('code', $program->code, "class='form-control' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMPM;?></th>
|
||||
<td><?php echo html::select('PM', $pmUsers, $program->PM, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMBudget;?></th>
|
||||
<td><?php echo html::input('budget', $program->budget, "class='form-control'");?></td>
|
||||
<td style='float:left'><?php echo html::select('budgetUnit', $lang->program->unitList, $program->budgetUnit, "class='form-control'");?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $program->begin, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->program->begin . "' required");?>
|
||||
<span class='input-group-addon'><?php echo $lang->program->to;?></span>
|
||||
<?php echo html::input('end', $program->end == '0000-00-00' ? '' : $program->end, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->program->end . "' required");?>
|
||||
<span class='input-group-addon hidden' id='longTimeBox'>
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name="longTime" value="1" id="longTime" <?php if($program->end == '0000-00-00') echo "checked";?>>
|
||||
<label for="longTime"><?php echo $lang->program->longTime;?></label>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan='2'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->realBegan;?></th>
|
||||
<td><?php echo html::input('realBegan', $program->realBegan, "class='form-control form-date'");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->teamname;?></th>
|
||||
<td><?php echo html::input('team', $program->team, "class='form-control'");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMDesc;?></th>
|
||||
<td colspan='3'>
|
||||
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=program&link=desc');?>
|
||||
<?php echo html::textarea('desc', $program->desc, "rows='6' class='form-control kindeditor' hidefocus='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->auth;?></th>
|
||||
<td colspan='3'><?php echo html::radio('privway', $lang->program->PGMAuthList, $program->auth, '', 'block');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->program->PGMAclList, $program->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
</tr>
|
||||
<tr id='whitelistBox' <?php if($program->acl != 'custom') echo "class='hidden'";?>>
|
||||
<th><?php echo $lang->project->whitelist;?></th>
|
||||
<td colspan='3'><?php echo html::checkbox('whitelist', $groups, $program->whitelist, '', '', 'inline');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo html::hidden('products[]') . html::hidden('plans[]');?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -32,7 +32,7 @@
|
||||
else $trClass .= ' is-top-level table-nest-hide';
|
||||
}
|
||||
|
||||
if($program->parent)
|
||||
if($program->parent and isset($programs[$program->parent]))
|
||||
{
|
||||
if($program->type != 'program') $trClass .= ' is-nest-child';
|
||||
$trClass .= ' table-nest-hide';
|
||||
@@ -64,25 +64,25 @@
|
||||
<td><?php echo zget($users, $program->PM);?></td>
|
||||
<td class='text-center c-actions'>
|
||||
<?php if($program->type == 'program'):?>
|
||||
<?php common::printIcon('program', 'pgmgroup', "programID=$program->id", $program, 'list', 'group');?>
|
||||
<?php common::printIcon('program', 'pgmmanageMembers', "programID=$program->id", $program, 'list', 'persons');?>
|
||||
<?php common::printIcon('program', 'prjstart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'pgmactivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'prjsuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'pgmclose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
|
||||
<?php if(common::hasPriv('program', 'pgmedit')) echo html::a($this->createLink("program", "pgmedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
|
||||
<?php common::printIcon('program', 'pgmcreate', "programID=$program->id", '', 'list', 'treemap-alt', '', '', '', '', $this->lang->program->PGMChildren);?>
|
||||
<?php if(common::hasPriv('program', 'pgmdelete')) echo html::a($this->createLink("program", "pgmdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
|
||||
<?php common::printIcon('program', 'PGMGroup', "programID=$program->id", $program, 'list', 'group');?>
|
||||
<?php common::printIcon('program', 'PGMManageMembers', "programID=$program->id", $program, 'list', 'persons');?>
|
||||
<?php common::printIcon('program', 'PRJStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'PGMActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'PGMClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
|
||||
<?php if(common::hasPriv('program', 'PGMEdit')) echo html::a($this->createLink("program", "pgmedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
|
||||
<?php common::printIcon('program', 'PGMCreate', "programID=$program->id", '', 'list', 'treemap-alt', '', '', '', '', $this->lang->program->PGMChildren);?>
|
||||
<?php if(common::hasPriv('program', 'PGMDelete')) echo html::a($this->createLink("program", "pgmdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
|
||||
<?php else:?>
|
||||
<?php common::printIcon('program', 'prjgroup', "programID=$program->id", $program, 'list', 'group');?>
|
||||
<?php common::printIcon('program', 'prjmanageMembers', "programID=$program->id", $program, 'list', 'persons');?>
|
||||
<?php common::printIcon('program', 'prjstart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'prjactivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'prjsuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'prjclose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
|
||||
<?php if(common::hasPriv('program', 'prjedit')) echo html::a($this->createLink("program", "prjedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
|
||||
<?php common::printIcon('program', 'prjcreate', "programID=$program->id", '', 'list', 'treemap-alt', '', 'disabled', '', '', $this->lang->program->PGMChildren);?>
|
||||
<?php if(common::hasPriv('program', 'prjdelete')) echo html::a($this->createLink("program", "prjdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
|
||||
<?php common::printIcon('program', 'PRJGroup', "programID=$program->id", $program, 'list', 'group');?>
|
||||
<?php common::printIcon('program', 'PRJManageMembers', "programID=$program->id", $program, 'list', 'persons');?>
|
||||
<?php common::printIcon('program', 'PRJStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'PRJActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true);?>
|
||||
<?php common::printIcon('program', 'PRJClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
|
||||
<?php if(common::hasPriv('program','PRJEdit')) echo html::a($this->createLink("program", "prjedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
|
||||
<?php common::printIcon('program', 'PRJCreate', "programID=$program->id", '', 'list', 'treemap-alt', '', 'disabled', '', '', $this->lang->program->PGMChildren);?>
|
||||
<?php if(common::hasPriv('program','PRJDelete')) echo html::a($this->createLink("program", "prjdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<?php if($canOrder):?>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<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('program', 'createGroup')) echo html::a($this->createLink('program', 'createGroup', "program=$programID", '', true), '<i class="icon-plus"></i> ' . $lang->group->create, '', 'class="btn btn-primary iframe" data-width="550"');?>
|
||||
<?php if(common::hasPriv('program', 'pgmcreategroup')) echo html::a($this->createLink('program', 'pgmcreategroup', "program=$programID", '', 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'>
|
||||
@@ -43,12 +43,12 @@
|
||||
<td class='c-actions'>
|
||||
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
|
||||
<?php $disabled = $group->role == 'limited' ? 'disabled' : '';?>
|
||||
<?php common::printIcon('program', 'manageView', "groupID=$group->id", $group, 'list', 'eye', '', $disabled);?>
|
||||
<?php common::printIcon('program', 'managePriv', "type=byGroup¶m=$group->id", $group, 'list', 'lock');?>
|
||||
<?php common::printIcon('program', 'pgmmanageview', "groupID=$group->id", $group, 'list', 'eye', '', $disabled);?>
|
||||
<?php common::printIcon('program', 'pgmmanagepriv', "type=byGroup¶m=$group->id", $group, 'list', 'lock');?>
|
||||
<?php $lang->group->managemember = $lang->group->manageMember;?>
|
||||
<?php common::printIcon('program', 'manageGroupMember', "groupID=$group->id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='90%'");?>
|
||||
<?php common::printIcon('program', 'editGroup', "groupID=$group->id", $group, 'list', 'edit', '', 'iframe', 'yes', "data-width='550'");?>
|
||||
<?php common::printIcon('program', 'copyGroup', "groupID=$group->id", $group, 'list', 'copy', '', "iframe $disabled", 'yes', "data-width='550'");?>
|
||||
<?php common::printIcon('program', 'pgmmanagegroupmember', "groupID=$group->id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='90%'");?>
|
||||
<?php common::printIcon('program', 'pgmeditgroup', "groupID=$group->id", $group, 'list', 'edit', '', 'iframe', 'yes', "data-width='550'");?>
|
||||
<?php common::printIcon('program', 'pgmcopygroup', "groupID=$group->id", $group, 'list', 'copy', '', "iframe $disabled", 'yes', "data-width='550'");?>
|
||||
<?php
|
||||
if(common::hasPriv('group', 'delete') and $group->role != 'limited')
|
||||
{
|
||||
109
module/program/view/pgmmanagemembers.html.php
Normal file
109
module/program/view/pgmmanagemembers.html.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?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', 'managemembers', "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' method='post' id='teamForm' target='hiddenwin'>
|
||||
<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
module/program/view/pgmmanagepriv.html.php
Normal file
187
module/program/view/pgmmanagepriv.html.php
Normal 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¶m=$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'; ?>
|
||||
@@ -41,7 +41,7 @@
|
||||
<?php if($project->model == 'waterfall'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJCategory;?></th>
|
||||
<td><?php echo html::select('category', $lang->program->PRJCategoryList, $project->category, "class='form-control'");?></td><td></td><td></td>
|
||||
<td><?php echo html::select('product', $lang->program->PRJCategoryList, $project->product, "class='form-control'");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user