diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2013-11-09 21:21:44 -0800 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2013-11-09 21:21:44 -0800 | 
| commit | 4100cf8af9a638a38c4e42cd7d9f3c0da7af3782 (patch) | |
| tree | 8fb39a8d80422e276f88d430dd751a8708ad3bf6 /src/templates | |
| parent | d94643c217b6b93eb6c539c60b00fe0cf68272b7 (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.ftl | 15 | 
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>  | 
