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

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

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

20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

<% if(showChapters) { %>
<ol class="chapters">
  <% chapters.each(function(chapter) { %>
    <li class="chapter">
        <span class="chapter-name"><%= chapter.get('name') %></span>
        <span class="chapter-asset-path"><%= chapter.get('asset_path') %></span>
    </li>
  <% }) %>
</ol>
<% } %>

</div>


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



49
</div>