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><br/>
126 <a href="{% url 'documents_book_mobi' book.slug %}" rel="nofollow">{% trans "MOBI version" %}</a><br/>
129 {% isbn_status book %}
131 {% if user.is_authenticated %}
134 Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
135 mira66 (http://www.flickr.com/photos/21804434@N02/) /
136 CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/)
138 <form method="POST" action="{% url 'documents_publish' book.slug %}">{% csrf_token %}
139 {{ publish_options_form.as_p }}
140 <img src="{{ STATIC_URL }}img/angel-left.png" style="vertical-align: middle" />
141 <button id="publish-button" type="submit">
142 <span>{% trans "Publish" %}</span></button>
143 <img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
147 {% if perms.depot.add_sitebookpublish %}
148 {% depot_sites book as sites %}
149 {% for site in sites %}
151 <h3 class="mb-3">{{ site.name }}</h3>
152 {% if not site.errors %}
153 <form method="post" action="{% url 'depot_site_publish' site.site_id book.pk %}">
155 <button class="btn btn-primary mb-3" type="submit">
156 Opublikuj na {{ site.name }}
159 {% for info in site.info %}
160 <div class="alert alert-info">
165 {% for error in site.errors %}
166 <div class="alert alert-danger">
171 {% for warning in site.warnings %}
172 <div class="alert alert-warning">
179 {% with last=site.last %}
181 {{ last.created_at }} →
182 {{ last.started_at }} →
183 {{ last.finished_at }}
184 <span title="{{ last.error }}">
185 ({{ last.get_status_display }})
187 <!-- {{ site.last.id }} -->
194 <a href="{% url 'cas_ng_login' %}">{% trans "Log in to publish." %}</a>
197 <p>{% trans "This book can't be published yet, because:" %}</p>
198 <ul><li>{{ publishable_error }}</li></ul>
207 <div class="card mt-4">
208 <div class="card-header">
209 <h2>{% trans "Statistics" %}</h2>
211 <div class="card-body">
212 <table class="table">
218 <th>{% trans "characters" %}</th>
219 <th>{% trans "characters (with footnotes)" %}</th>
220 <th>{% trans "words" %}</th>
221 <th>{% trans "words (with footnotes)" %}</th>
222 <th>{% trans "wiersze (+ inne znaki)" %}</th>
223 <th>{% trans "wiersze (+ inne znaki, z przypisami)" %}</th>
227 {% include 'documents/book_stats.html' with book=doc stats=stats depth=0 %}
233 {% endblock content %}