1 {% extends "documents/base.html" %}
2 {% load book_list i18n %}
8 {% block titleextra %}{{ book.title }}{% endblock %}
13 <div class="card mt-4">
14 <div class="card-header">
15 <h1>{{ book.title }}</h1>
17 <div class="card-body">
19 <div class="col-md-8">
22 {% if editable %}<form method='POST'>{% csrf_token %}{% endif %}
23 {% bootstrap_form form %}
26 <button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
29 {% if editable %}</form>{% endif %}
33 <p><a href="{% url 'documents_book_gallery' book.slug %}">{% trans "Edit gallery" %}</a></p>
36 <p style="text-align:right"><a class="btn btn-sm btn-danger" href="{% url 'documents_book_append' book.slug %}">{% trans "Append to other book" %}</a></p>
41 <div class="col-md-4">
42 {% with cbook=book.catalogue_book %}
45 <a href="{% url 'catalogue_book' cbook.slug %}">{{ cbook }}</a>
53 <div class="card mt-4">
54 <div class="card-header">
55 <h2>{% trans "Chunks" %}</h2>
57 <div class="card-body">
59 <table class='single-book-list table'><tbody>
60 {% for chunk in book %}
61 {% include 'documents/book_list/chunk.html' %}
70 <div class='card mt-4'>
72 <div class="card-header">
73 <h2>{% trans "Publication" %}</h2>
75 <div class="card-body">
77 <div class="col-lg-3">
78 <img class="cover-preview" src="{% url 'cover_preview' book.slug %}" />
79 {% if book.dc_cover_image %}
80 <a href="{{ book.dc_cover_image.get_absolute_url }}">{{ book.dc_cover_image }}</a>
84 <form action="{% url 'cover_quick_import' book.pk %}" method="post">
86 <div class="input-group">
87 <input type="url" name="url" class="form-control" placeholder="URL okładki">
88 <button type="submit" class="btn btn-sm btn-info">Ustaw</button>
94 <form action="{% url 'cover_preview' book.slug %}">
95 <input type="hidden" name="download" value="1">
97 <div class="input-group">
98 <select class="form-control" name='cover_class'>
99 <option value="default">nowa</option>
100 <option value="m-label">nowa + label</option>
101 <option value="legacy">dawna</option>
103 <input class="form-control" name="width" type="number" required value="600" size="3" placeholder="szer.">
104 <input class="form-control" name="height" type="number" size="3" placeholder="wys.">
105 <button type="submit" class="btn btn-sm btn-primary">🡇</button>
109 <div class="col-lg-9">
110 <p>{% trans "Last published" %}:
111 {% if book.last_published %}
112 {{ book.last_published }}
120 <a href="{% url 'documents_book_xml' book.slug %}" rel="nofollow">{% trans "Full XML" %}</a><br/>
121 <a target="_blank" href="{% url 'documents_book_html' book.slug %}" rel="nofollow">{% trans "HTML version" %}</a><br/>
122 <a href="{% url 'documents_book_txt' book.slug %}" rel="nofollow">{% trans "TXT version" %}</a><br/>
123 <a href="{% url 'documents_book_pdf' book.slug %}" rel="nofollow">{% trans "PDF version" %}</a><br/>
124 <a href="{% url 'documents_book_pdf_mobile' book.slug %}" rel="nofollow">{% trans "PDF version for mobiles" %}</a><br/>
125 <a href="{% url 'documents_book_epub' book.slug %}" rel="nofollow">{% trans "EPUB version" %}</a>
126 <a href="{% url 'documents_book_epubcheck' book.slug %}" rel="nofollow">sprawdź</a><br/>
127 <a href="{% url 'documents_book_mobi' book.slug %}" rel="nofollow">{% trans "MOBI version" %}</a><br/>
130 {% isbn_status book %}
132 {% if user.is_authenticated %}
135 Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
136 mira66 (http://www.flickr.com/photos/21804434@N02/) /
137 CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/)
139 <form method="POST" action="{% url 'documents_publish' book.slug %}">{% csrf_token %}
140 {{ publish_options_form.as_p }}
141 <img src="{{ STATIC_URL }}img/angel-left.png" style="vertical-align: middle" />
142 <button id="publish-button" type="submit">
143 <span>{% trans "Publish" %}</span></button>
144 <img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
148 {% if perms.depot.add_sitebookpublish %}
149 {% depot_sites book as sites %}
150 {% for site in sites %}
152 <h3 class="mb-3">{{ site.name }}</h3>
153 {% if not site.errors %}
154 <form method="post" action="{% url 'depot_site_publish' site.site_id book.pk %}">
156 <button class="btn btn-primary mb-3" type="submit">
157 Opublikuj na {{ site.name }}
160 {% for info in site.info %}
161 <div class="alert alert-info">
166 {% for error in site.errors %}
167 <div class="alert alert-danger">
172 {% for warning in site.warnings %}
173 <div class="alert alert-warning">
180 {% with last=site.last %}
182 {{ last.created_at }} →
183 {{ last.started_at }} →
184 {{ last.finished_at }}
185 <span title="{{ last.error }}">
186 ({{ last.get_status_display }})
188 <!-- {{ site.last.id }} -->
195 <a href="{% url 'cas_ng_login' %}">{% trans "Log in to publish." %}</a>
198 <p>{% trans "This book can't be published yet, because:" %}</p>
199 <ul><li>{{ publishable_error }}</li></ul>
208 <div class="card mt-4">
209 <div class="card-header">
210 <h2>{% trans "Statistics" %}</h2>
212 <div class="card-body">
213 <table class="table">
219 <th>{% trans "characters" %}</th>
220 <th>{% trans "characters (with footnotes)" %}</th>
221 <th>{% trans "words" %}</th>
222 <th>{% trans "words (with footnotes)" %}</th>
223 <th>{% trans "wiersze (+ inne znaki)" %}</th>
224 <th>{% trans "wiersze (+ inne znaki, z przypisami)" %}</th>
228 {% include 'documents/book_stats.html' with book=doc stats=stats depth=0 %}
234 {% endblock content %}