38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
<header>
|
|
<h3 class="textbook-title"><%= name %></h3>
|
|
</header>
|
|
|
|
<% if(chapters.length > 1) {%>
|
|
<p><a href="#" class="chapter-toggle
|
|
<% if(showChapters){ print('hide'); } else { print('show'); } %>-chapters">
|
|
<i class="icon-chevron-<% if(showChapters){ print('down'); } else { print('right'); } %>"></i>
|
|
<%= chapters.length %> PDF Chapters
|
|
</a></p>
|
|
<% } else if(chapters.length === 1) { %>
|
|
<%= chapters.at(0).get("asset_path") %>
|
|
<% } %>
|
|
|
|
<ul class="actions textbook-actions">
|
|
<li>
|
|
<a href="#" class="view"><%= gettext("view in course") %></a>
|
|
</li>
|
|
<li>
|
|
<button class="edit"><%= gettext("Edit") %></button>
|
|
</li>
|
|
<li>
|
|
<button class="delete"><%= gettext("Delete") %></button>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<% if(showChapters) { %>
|
|
<ol class="chapters">
|
|
<% chapters.each(function(chapter) { %>
|
|
<li><span class="chapter-name"><%= chapter.get('name') %></span>
|
|
<span class="chapter-asset-path"><%= chapter.get('asset_path') %></span>
|
|
</li>
|
|
<% }) %>
|
|
</ol>
|
|
<% } %>
|