diff --git a/module/program/css/browse.css b/module/program/css/browse.css index e60eb9f6dd..071599a2ce 100644 --- a/module/program/css/browse.css +++ b/module/program/css/browse.css @@ -24,6 +24,15 @@ #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 .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;} .w-240px{width:240px;} diff --git a/module/program/js/browse.js b/module/program/js/browse.js index fa840f3578..15637a62a3 100644 --- a/module/program/js/browse.js +++ b/module/program/js/browse.js @@ -7,7 +7,7 @@ $(function() window.location.reload(); }); - // Auto resize cards size + /* Auto resize cards size */ var minCardWidth = 280; var $cards = $('#cards'); var resizeCards = function() @@ -23,7 +23,22 @@ $(function() resizeCards(); $(window).on('resize', resizeCards); - // Make cards clickable + /* 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) diff --git a/module/program/view/browsebygrid.html.php b/module/program/view/browsebygrid.html.php index 5934b4a48d..bbbe1f6c8e 100644 --- a/module/program/view/browsebygrid.html.php +++ b/module/program/view/browsebygrid.html.php @@ -35,7 +35,26 @@ template === 'cmmi'): ?>

program->ongoingStage; ?>

+ projects as $project) + { + if(!$project->parent) $programProjects[] = $project; + } + ?> +
project->statusList, $program->status);?>
+ +
+
+ +
'> +
name; ?>
+
+ +
+
+
projects ? current($program->projects) : '';?> @@ -58,6 +77,7 @@ +
show('right', 'pagerjs');?>