show-textbook.underscore 1.44 KB
Newer Older
1
<div class="view-textbook">
2 3

<div class="wrap-textbook">
4
    <header>
5
        <h3 class="textbook-title"><%- name %></h3>
6 7
    </header>

8
<% if(chapters.length > 1) {%>
9
    <p><a href="#" class="chapter-toggle
10
        <% if(showChapters){ print('hide'); } else { print('show'); } %>-chapters">
11
        <span class="ui-toggle-expansion icon fa fa-caret-<% if(showChapters){ print('down'); } else { print('right'); } %>" aria-hidden="true"></span>
12
        <%- chapters.length %> PDF Chapters
13
    </a></p>
14
<% } else if(chapters.length === 1) { %>
15
    <p dir="ltr">
16
        <%- chapters.at(0).get("asset_path") %>
17
    </p>
18
<% } %>
19

20 21 22 23 24

<% if(showChapters) { %>
<ol class="chapters">
  <% chapters.each(function(chapter) { %>
    <li class="chapter">
25 26
        <span class="chapter-name"><%- chapter.get('name') %></span>
        <span class="chapter-asset-path"><%- chapter.get('asset_path') %></span>
27 28 29 30 31 32 33 34
    </li>
  <% }) %>
</ol>
<% } %>

</div>


35
<ul  class="actions textbook-actions">
36
    <li class="action action-view">
37
        <a href="//<%- CMS.URL.LMS_BASE %>/courses/<%- course.id %>/pdfbook/<%- bookindex %>/" class="view"><%- gettext("View Live") %></a>
38
    </li>
39
    <li class="action action-edit">
40
        <button class="edit"><%- gettext("Edit") %></button>
41
    </li>
42
    <li class="action action-delete">
43
        <button class="delete action-icon" title="<%- gettext('Delete') %>"><span class="icon fa fa-trash-o" aria-hidden="true" ></span></button>
44 45 46 47 48
    </li>
</ul>



49
</div>