Skip to content

Commit

Permalink
Issue #61 fix by adding an instruction link (#176)
Browse files Browse the repository at this point in the history
* added instruction link to each alternative download version headings from 2.3

* updated installation link for older versions

updated installation link for older versions and used documentation router to route to the corresponding documentation page

* added route to documentation index

In case of any mismatch (but won't happen)

* fix version mismatch and removed version hacks from documentation
  • Loading branch information
Dulya authored and gmethvin committed Oct 21, 2017
1 parent 752a43d commit 3237fc5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
9 changes: 9 additions & 0 deletions app/assets/css/pages/_download.styl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@
font-size: 0.9em
margin: 10px 0 20px

.previousVersionHeading
float:left

.instructionLink
margin-left: 8px
font-size: 12px
margin-top: 1em
line-height: 58px;

.cli, .ui
margin: 50px auto
.starter, .cli, .ui, .starter-projects, .example-projects, .seed-projects
Expand Down
16 changes: 14 additions & 2 deletions app/views/download.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
}
}

@versionAtLeast(v1: String, v2: String) = @{
import math.Ordering.Implicits._
v1.split('.').toSeq >= v2.split('.').toSeq
}

@main(title, "download") {

<header id="top">
Expand Down Expand Up @@ -105,9 +110,16 @@ <h3 id="older-versions">Previous releases</h3>
<p class="changelogLink"><a href="@routes.Application.changelog()">Changelog</a></p>

<table class="releases">
@releases.previous.groupBy(_.version.slice(0, 3)).toSeq.sortBy(_._1).reverse.map { group =>
@releases.previous.groupBy(_.version.split('.').take(2).mkString(".")).toSeq.sortBy(_._1).reverse.map { group =>
<tbody class="version">
<tr><th colspan="3"><h4>@group._1</h4></th></tr>
<tr>
<th colspan="3">
<h4 class="previousVersionHeading">@group._1</h4>
@if(versionAtLeast(group._1, "1.2")) {
<a href="@controllers.documentation.ReverseRouter.page(None, group._1 + ".x", if(versionAtLeast(group._1, "2.0")) "Installing" else "install")" class="instructionLink"> Setup Instructions</a>
}
</th>
</tr>
@group._2.map { release =>
<tr class="release">
@renderRelease("downloadPreviousLink", release)
Expand Down

0 comments on commit 3237fc5

Please sign in to comment.