WikiPageContent.handlebars 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <header>
  2. <h1 class="page-title">{{title}}</h1>
  3. </header>
  4. {{#if locked_for_user}}
  5. <div class="locked-alert alert alert-warning">
  6. {{#if lock_info.context_module.prerequisites}}
  7. {{#if lock_info.unlock_at}}
  8. {{#t 'page_locked_by_modules_until'}}This page will be available on {{lock_info.unlock_at}} if you have completed these modules:{{/t}}
  9. {{else}}
  10. {{#t 'page_locked_by_modules'}}This page will be available once you have completed these modules:{{/t}}
  11. {{/if}}
  12. <ul>
  13. {{#each lock_info.context_module.prerequisites}}{{#ifEqual this.type "context_module"}}
  14. {{#if this.name}}
  15. <li>
  16. {{#ifAll ../../../../modules_path this.id}}
  17. <a href="{{../../../../modules_path}}/{{this.id}}">{{this.name}}</a>
  18. {{else}}
  19. {{this.name}}
  20. {{/ifAll}}
  21. </li>
  22. {{/if}}
  23. {{/ifEqual}}{{/each}}
  24. </ul>
  25. {{else}}
  26. {{#if lock_info.unlock_at}}
  27. {{#t 'page_locked_until'}}This page will be available on {{lock_info.unlock_at}}{{/t}}
  28. {{else}}
  29. {{#t 'page_locked'}}This page is locked{{/t}}
  30. {{/if}}
  31. {{/if}}
  32. </div>
  33. {{else}}
  34. {{convertApiUserContent body}}
  35. {{/if}}