<div class="view-textbook"> <div class="wrap-textbook"> <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="ui-toggle-expansion icon-caret-<% if(showChapters){ print('down'); } else { print('right'); } %>"></i> <%= chapters.length %> PDF Chapters </a></p> <% } else if(chapters.length === 1) { %> <p dir="ltr"> <%= chapters.at(0).get("asset_path") %> </p> <% } %> <% 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> <ul class="actions textbook-actions"> <li class="action action-view"> <a href="//<%= CMS.URL.LMS_BASE %>/courses/<%= course.org %>/<%= course.num %>/<%= course.url_name %>/pdfbook/<%= bookindex %>/" class="view"><%= gettext("View Live") %></a> </li> <li class="action action-edit"> <button class="edit"><%= gettext("Edit") %></button> </li> <li class="action action-delete"> <button class="delete action-icon"><i class="icon-trash"></i><span><%= gettext("Delete") %></span></button> </li> </ul> </div>