This commit is contained in:
@@ -28,7 +28,9 @@ if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile;
|
||||
<header id='header'>
|
||||
<div id='mainHeader'>
|
||||
<div class='container'>
|
||||
<?php if(($moduleName == 'program' || $isProgram) && isset($lang->programSwapper)) echo $lang->programSwapper;?>
|
||||
<div id='heading'>
|
||||
<?php if(($moduleName == 'program' || $isProgram) && isset($lang->programSwapper)) echo $lang->programSwapper;?>
|
||||
</div>
|
||||
<nav id='navbar'><?php $isProgram ? commonModel::printMainmenu($this->moduleName) : common::printModuleMenu($this->moduleName);?></nav>
|
||||
<div id='toolbar'>
|
||||
<div id="userMenu">
|
||||
|
||||
@@ -34,7 +34,20 @@ class program extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->view->projectList = $this->program->getList($status, $orderBy, $pager);
|
||||
if($programType === 'bygrid')
|
||||
{
|
||||
$projectList = $this->project->getProjectStats($status == 'byproduct' ? 'all' : $status, 0, 0, 30, $orderBy, $pager);
|
||||
foreach($projectList as $projectID => $project)
|
||||
{
|
||||
$project->teamCount = count($this->project->getTeamMembers($projectID));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$projectList = $this->program->getList($status, $orderBy, $pager);
|
||||
}
|
||||
|
||||
$this->view->projectList = $projectList;
|
||||
$this->view->status = $status;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
@@ -1,9 +1,27 @@
|
||||
.panel-title {height:55px; padding:10px;}
|
||||
.main-table.flow-block {height:203px;}
|
||||
.main-table.panel-heading > strong,.main-table.panel-heading > span {margin-bottom:5px}
|
||||
#mainMenu .pull-left .checkbox-primary{display: inline-block; margin-left: 10px;}
|
||||
#mainMenu .pull-left .checkbox-primary {display: inline-block; margin-left: 10px;}
|
||||
#mainMenu .pull-right > .btn-group + .btn {margin-left: 10px;}
|
||||
#mainMenu .pull-right > .btn-group > .btn-icon {background: transparent;}
|
||||
#mainMenu .pull-right > .btn-group > .btn-icon:hover {background: #fff;}
|
||||
|
||||
.footerbar .right-info{position: absolute; bottom: 10px; right: 10px;}
|
||||
.footerbar .left-info{position: absolute; bottom: 15px; left: 20px;}
|
||||
.flow-block {height: 230px;}
|
||||
.panel-body .card-content{overflow-y: scroll; height: 100px;}
|
||||
#cards {margin: 0 10px;}
|
||||
#cards > .col {width: 25%;}
|
||||
#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 40px 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 .project-type-label {padding: 1px 2px; position: relative; top: -2px}
|
||||
#cards .project-name {font-size: 16px; font-weight: normal;}
|
||||
#cards .project-infos {font-size: 12px;}
|
||||
#cards .project-infos > span {display: inline-block; line-height: 12px;}
|
||||
#cards .project-infos > span > .icon {font-size: 12px; display: inline-block; position: relative; top: -1px}
|
||||
#cards .project-infos > span + span {margin-left: 15px;}
|
||||
#cards .project-detail {position: absolute; bottom: 16px; left: 16px; right: 16px; font-size: 12px;}
|
||||
#cards .project-detail > p {margin-bottom: 8px;}
|
||||
#cards .project-detail .progress {height: 4px;}
|
||||
#cards .project-detail .progress-text-left .progress-text {width: 50px; left: -50px;}
|
||||
#cards .pager {margin: 0; float: right;}
|
||||
#cards .pager .btn{border: none}
|
||||
|
||||
@@ -4,6 +4,33 @@ $(function()
|
||||
{
|
||||
var mine = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('mine', mine, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
// 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++;
|
||||
}
|
||||
console.log('bestColsSize', bestColsSize);
|
||||
$cards.children('.col').css('width', (100 / bestColsSize) + '%');
|
||||
};
|
||||
resizeCards();
|
||||
$(window).on('resize', resizeCards);
|
||||
|
||||
// Make cards clickable
|
||||
$cards.on('click', '.panel', function(e)
|
||||
{
|
||||
if(!$(e.target).closest('.panel-actions').length)
|
||||
{
|
||||
window.location.href = $(this).data('url');
|
||||
}
|
||||
})
|
||||
|
||||
$('#programTableList').on('sort.sortable', function(e, data)
|
||||
|
||||
@@ -50,9 +50,13 @@ $lang->program->featureBar['closed'] = '已关闭';
|
||||
|
||||
$lang->program->chooseProgramType = '选择项目管理方式';
|
||||
$lang->program->nextStep = '下一步';
|
||||
$lang->program->hoursUnit = '%s工时';
|
||||
$lang->program->membersUnit = '%s人';
|
||||
$lang->program->lastIteration = '近期迭代';
|
||||
$lang->program->ongoingStage = '进行中的阶段';
|
||||
$lang->program->scrum = 'Scrum';
|
||||
$lang->program->scrumTitle = '敏捷开发全流程项目管理';
|
||||
$lang->program->scrumDesc = '<strong>简介:</strong>小步迭代,快速发布<br><strong>包含功能点:</strong>项目概览、迭代、计划、需求等';
|
||||
$lang->program->cmmi = 'CMMI';
|
||||
$lang->program->cmmi = '瀑布';
|
||||
$lang->program->cmmiTitle = '瀑布式项目管理';
|
||||
$lang->program->cmmiDesc = '<strong>简介:</strong>按阶段规范化管理<br><strong>包含功能点:</strong>估算、计划、阶段、报告';
|
||||
|
||||
@@ -45,41 +45,66 @@
|
||||
<?php else:?>
|
||||
<div class='main-col'>
|
||||
<?php if($programType == 'bygrid'):?>
|
||||
<?php foreach ($projectList as $projectID => $project):?>
|
||||
<div class='col-sm-6 col-md-4' data-id='<?php echo $projectID?>'>
|
||||
<div class='main-table panel flow-block'>
|
||||
<div class='main-table panel-heading'>
|
||||
<strong title='<?php echo $project->name;?>'><?php echo $project->name;?></strong>
|
||||
<span class="label label-primary label-outline"><?php echo zget($templates, $project->parent);?></span>
|
||||
<span class="label label-success label-outline"><?php echo zget($lang->project->statusList, $project->status);?></span>
|
||||
<span class="label label-danger label-outline"><?php echo zget($users,$project->PM);?></span>
|
||||
<span class="label label-warning label-outline"><?php echo $project->budget . ' ' . zget($lang->program->unitList, $project->budgetUnit);?></span>
|
||||
<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', 'activate', "projectid=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "projectID=$project->id"), "<i class='icon-edit'></i> " . $lang->edit, '', "class='btn btn-link'");?></li>
|
||||
<li><?php common::printIcon('program', 'start', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'suspend', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'finish', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'close', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("project", "delete", "projectID=$project->id"), "<i class='icon-trash'></i> " . $lang->delete, 'hiddenwin', "class='btn btn-link'");?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class='main-table panel-body'>
|
||||
<div class='card-content text-muted scrollbar-hover'><?php echo $project->desc;?></div>
|
||||
<div class='footerbar'>
|
||||
<div class='right-info'>
|
||||
<?php common::printLink('programplan', 'browse', "programplan=$project->id", $lang->project->enter, '', "class='btn btn-primary'");?>
|
||||
<div class='row cell' id='cards'>
|
||||
<?php foreach ($projectList as $projectID => $project):?>
|
||||
<div class='col' data-id='<?php echo $projectID?>'>
|
||||
<div class='panel' data-url='<?php echo $this->createLink('project', 'task', "projectID=$project->id");?>'>
|
||||
<div class='panel-heading'>
|
||||
<strong class='project-name' title='<?php echo $project->name;?>'><?php echo $project->name;?></strong>
|
||||
<?php if($project->type === 'cmmi'): ?>
|
||||
<span class='project-type-label label label-warning label-outline'><?php echo $lang->program->cmmi; ?></span>
|
||||
<?php else: ?>
|
||||
<span class='project-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', 'activate', "projectid=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "projectID=$project->id"), "<i class='icon-edit'></i> " . $lang->edit, '', "");?></li>
|
||||
<li><?php common::printIcon('program', 'start', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'suspend', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'finish', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('program', 'close', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("project", "delete", "projectID=$project->id"), "<i class='icon-trash'></i> " . $lang->delete, 'hiddenwin', "");?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='project-infos'>
|
||||
<span><i class='icon icon-group'></i> <?php printf($lang->program->membersUnit, $project->teamCount); ?></span>
|
||||
<span><i class='icon icon-clock'></i> <?php printf($lang->program->hoursUnit, $project->hours->totalEstimate); ?></span>
|
||||
<span><i class='icon icon-cost'></i> <?php echo $project->budget . '' . zget($lang->program->unitList, $project->budgetUnit);?></span>
|
||||
</div>
|
||||
<?php if($project->type === 'cmmi'): ?>
|
||||
<div class='project-detail project-stages'>
|
||||
<p class='text-muted'><?php echo $lang->program->ongoingStage; ?></p>
|
||||
<div class='label label-outline'><?php echo zget($lang->project->statusList, $project->status);?></div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class='project-detail project-iteration'>
|
||||
<p class='text-muted'><?php echo $lang->program->lastIteration; ?></p>
|
||||
<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>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<div class='col-xs-12' id='cardsFooter'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php else:?>
|
||||
<?php $canOrder = (common::hasPriv('project', 'updateOrder') and strpos($orderBy, 'order') !== false)?>
|
||||
<form class='main-table' id='programForm' method='post' data-ride='table'>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 2.0 KiB |
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -13,7 +13,7 @@
|
||||
<glyph unicode="" glyph-name="angle-right" d="M336.443 66.675l217.777 217.777-217.777 217.777 66.666 66.666 284.448-284.448-284.448-284.448z" />
|
||||
<glyph unicode="" glyph-name="angle-top" d="M296.425 110.666l-65.99 65.99 281.565 281.565 281.565-281.565-65.99-65.99-215.572 215.572z" />
|
||||
<glyph unicode="" glyph-name="check" d="M365.825 107.329l482.269 482.269 64.019-64.019-546.287-546.287-253.938 253.938 64.019 64.019z" />
|
||||
<glyph unicode="" glyph-name="ellipsis-v" d="M512 58.219c61.214 0 114.443-53.229 114.443-114.443s-53.229-114.443-114.443-114.443-114.443 53.229-114.443 114.443 53.229 114.443 114.443 114.443zM512 398.887c61.214 0 114.443-53.229 114.443-114.443s-53.229-114.443-114.443-114.443-114.443 53.229-114.443 114.443 53.229 114.443 114.443 114.443zM512 510.669c-61.214 0-114.443 53.229-114.443 114.443s53.229 114.443 114.443 114.443 114.443-53.229 114.443-114.443-53.229-114.443-114.443-114.443z" />
|
||||
<glyph unicode="" glyph-name="ellipsis-v" d="M603.025 648.532c0-51.576-39.443-91.024-91.025-91.024-51.576 0-91.024 39.448-91.024 91.024s39.448 91.024 91.024 91.024c51.576 0.003 91.025-39.443 91.025-91.024zM603.025 284.444c0-51.576-39.443-91.024-91.024-91.024s-91.020 39.448-91.020 91.024c0 51.576 39.448 91.024 91.020 91.024s91.024-39.448 91.024-91.024zM603.025-79.644c0-51.576-39.443-91.024-91.024-91.024s-91.024 39.448-91.024 91.024 39.448 91.024 91.024 91.024c51.576 0 91.024-39.443 91.024-91.024z" />
|
||||
<glyph unicode="" glyph-name="first-page" d="M235.552 551.503h89.714v-534.113h-89.714v534.113zM788.448 79.98l-62.59-62.59-267.059 267.059 267.059 267.059 62.59-62.59-204.464-204.464z" />
|
||||
<glyph unicode="" glyph-name="last-page" d="M698.73 551.503h89.715v-534.115h-89.715v534.115zM235.552 488.909l62.591 62.591 267.059-267.059-267.059-267.059-62.591 62.591 204.465 204.465z" />
|
||||
<glyph unicode="" glyph-name="expand-alt" d="M693.010 297.372v-25.857c0-7.275-5.655-12.929-12.929-12.929h-142.224v-142.224c0-7.275-5.655-12.929-12.929-12.929h-25.857c-7.275 0-12.929 5.655-12.929 12.929v142.224h-142.224c-7.275 0-12.929 5.655-12.929 12.929v25.857c0 7.275 5.655 12.929 12.929 12.929h142.224v142.224c0 7.275 5.655 12.929 12.929 12.929h25.857c7.275 0 12.929-5.655 12.929-12.929v-142.224h142.224c7.275 0 12.929-5.655 12.929-12.929zM744.727 116.362v336.163c0 35.555-29.092 64.646-64.646 64.646h-336.163c-35.555 0-64.646-29.092-64.646-64.646v-336.163c0-35.555 29.092-64.646 64.646-64.646h336.163c35.555 0 64.646 29.092 64.646 64.646zM796.447 452.525v-336.163c0-64.244-52.121-116.366-116.366-116.366h-336.163c-64.244 0-116.366 52.121-116.366 116.366v336.163c0 64.244 52.121 116.366 116.366 116.366h336.163c64.244 0 116.366-52.121 116.366-116.366z" />
|
||||
|
||||
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user