* Fix menu order.
This commit is contained in:
@@ -20,6 +20,12 @@
|
||||
#cards .program-detail .progress {height: 4px;}
|
||||
#cards .program-detail .progress-text-left .progress-text {width: 50px; left: -50px;}
|
||||
#cards .panel-heading {cursor: pointer;}
|
||||
#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>
|
||||
<div class='row' id='cards'>
|
||||
<?php foreach ($programs as $programID => $program):?>
|
||||
@@ -57,7 +63,26 @@
|
||||
<?php if($program->template === 'cmmi'): ?>
|
||||
<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) : '';?>
|
||||
@@ -82,3 +107,19 @@
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<script>
|
||||
/* Auto resize stages */
|
||||
$('.block-recentprogram #cards .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);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user