summaryrefslogtreecommitdiff
path: root/src/templates
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2013-11-09 21:21:44 -0800
committerJesse Morgan <jesse@jesterpm.net>2013-11-09 21:21:44 -0800
commit41eeace2b82271c8b5ea569ffe286a8a2f25216f (patch)
tree798e85491ac63454f4756a6fc292aaeed55602ff /src/templates
parent0d90da39f77ac3cfa607a68bc59336bf0bdff240 (diff)
Enforcing the viewing order of videos.
Also made the Outline links more noticeable.
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/templates/training.ftl15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/templates/templates/training.ftl b/src/templates/templates/training.ftl
index c560622..80c5ca4 100644
--- a/src/templates/templates/training.ftl
+++ b/src/templates/templates/training.ftl
@@ -24,7 +24,12 @@
<nav>
<#assign chapters = ["introduction", "seeker", "believer", "disciple", "teacher"]>
<#list chapters as x>
- <a href="${dynamicRoot}/account/training/${x}" <#if x == chapter>class="current"</#if>>${x?capitalize}</a>
+ <#if isChapterAllowed[x]>
+ <a href="${dynamicRoot}/account/training/${x}" <#if x == chapter>class="current"</#if>>${x?capitalize}</a>
+ <#else>
+ <span class="disabled">${x?capitalize}</span>
+ </#if>
+
<#if x_has_next> - </#if>
</#list>
</nav>
@@ -36,14 +41,18 @@
</div>
<div id="videos">
+ <#assign allowed = true>
<#list videos as video>
<article>
- <div class="image <#if video.completed>completed</#if>" id="${video.id}"><a href="#" onclick="playVideo('${video.id}'); return false"><img src="${video.image!staticRoot+"/images/videoimage.jpg"}" alt="${video.title}" /></a></div>
- <h2>${video.title}</h2>
+ <div class="image <#if video.completed>completed</#if> <#if allowed>allowed</#if>" id="${video.id}"><a href="#" onclick="playVideo('${video.id}'); return false"><img src="${video.image!staticRoot+"/images/videoimage.jpg"}" alt="${video.title}" /></a></div>
+ <h2>${video.number}. ${video.title}</h2>
<span class="duration"><@hms seconds=video.length /></span>
<#if (video.pdf!"") != "">
<span class="pdf"><a href="${video.pdf}" target="_blank">Outline</a></span>
</#if>
+ <#if allowed && !video.completed>
+ <#assign allowed = false>
+ </#if>
</article>
</#list>
</div>