light progress

This commit is contained in:
Jeremy Kauffman 2016-08-29 16:04:51 -04:00
parent 656652e3a6
commit 68b70049c8
3 changed files with 19 additions and 4 deletions

View file

@ -116,9 +116,13 @@ class ContentActions extends Actions
public static function executeRoadmap()
{
$items = array_merge(Github::listRoadmapChangesets(), Asana::listRoadmapTasks());
$githubItems = Github::listRoadmapChangesets();
$githubVersions = array_keys($githubItems);
$items = array_merge($githubItems, Asana::listRoadmapTasks());
return ['content/roadmap', [
'closedGroups' => ['0.1', '0.2'], //should be dynamic
'closedGroups' => array_slice($githubVersions, 0, -1),
'latestVersion' => end($githubVersions),
'items' => $items
]];
}

View file

@ -69,6 +69,7 @@ class Github
$sets[$group][] = array_intersect_key($release, ['prerelease' => null, 'tag_name' => null, 'published_at' => null]) + [
'date' => date('Y-m-d', strtotime($release['created_at'])), //I thought published_at, but GitHub displays created_at and published_at is out of sync sometimes (0.3.2, 0.3.3)
'name' => $release['name'] ?: $release['tag_name'],
'github_url' => $release['url'],
'major_version' => $matches[1],
'minor_version' => $matches[2],
'patch_version' => isset($matches[3]) ? $matches[3] : null,

View file

@ -19,19 +19,29 @@
<div class="text-center"><a href="javascript:;" class="link-primary show-all-releases">Show Earlier Releases</a></div>
<?php foreach($items as $group => $groupItems): ?>
<h2 class="roadmap-group-title" <?php echo in_array($group, $closedGroups) ? 'style="display: none"' : '' ?>">
<span class="roadmap-group-title-label"><?php echo $group ?></span>
<span class="roadmap-group-title-label">
<?php echo $group ?>
<?php if ($group == $latestVersion): ?>
<span class="badge badge-info">current</span>
<?php endif ?>
</span>
</h2>
<div class="roadmap-group <?php echo in_array($group, $closedGroups) ? 'roadmap-group-closed' : '' ?>">
<?php foreach($groupItems as $item): ?>
<div class="roadmap-item roadmap-item-closed">
<a href="javascript:;" class="roadmap-item-header">
<h3 class="roadmap-item-title"><?php echo $item['name'] ?></h3>
<h3 class="roadmap-item-title">
<?php echo $item['name'] ?>
</h3>
</a>
<div class="roadmap-item-date">
<?php echo $item['date'] ?>
</div>
<div class="roadmap-item-content">
<?php echo $item['body'] ?>
<?php if (isset($item['github_url'])): ?>
<?php endif ?>
</div>
</div>
<?php endforeach ?>