/upstream/templates/covers/book_cover_single_edition.tmpl
Type: /type/template
body: value: $def with(book, size="M")

$ title = book.title
$ author_names = ", ".join(a.get("name", "Name missing") for a in book.get_authors()) or book.get('by_statement','')

$ cover_url = book.get_cover_url(size)

$ cover_lg = book.get_cover_url("L")

$if size == "M":
    <div class="coverMagic">
        <div class="SRPCover bookCover" style="display: $cond(cover_url, 'block', 'none');">
            <a href="$cover_lg" class="coverLook" title="View a larger book cover"><img src="$cover_url" class="cover" alt="Cover of: $title $_('by') $author_names"/></a>
        </div>
        <div class="SRPCoverBlank" style="display: $cond(not cover_url, 'block', 'none');">
            <div class="innerBorder">
                <div class="BookTitle">$:macros.TruncateString(title, 70)
                    <div class="Author">$:macros.TruncateString(author_names, 30)</div>
                </div>
            </div>
        </div>
    </div>
$else:
    <img src="$(cover_url or '/images/icons/avatar_book-sm.png')" height="58" alt="We need a book cover for: $title"/>

<div class="hidden">
    <div class="coverFloat" id="seeImage">
        <div class="coverFloatHead">
            <a class="floaterShut" href="javascript:;" onclick="\$.fn.colorbox.close();"><span class="shift">$_("Close")</span></a>
        </div>
        <a href="javascript:;" onclick="\$.fn.colorbox.close();"><img src="$cover_lg" class="cover" alt="$title $_('by') $author_names"/></a>
    </div>
</div>
title: For single edition on a work page