1 {% extends "documents/base.html" %}
2 {% load book_list i18n %}
7 {% block titleextra %}{{ book.title }}{% endblock %}
12 <div class="card mt-4">
13 <div class="card-header">
14 <h1>{{ book.title }}</h1>
16 <div class="card-body">
18 <div class="col-md-8">
21 {% if editable %}<form method='POST'>{% csrf_token %}{% endif %}
22 {% bootstrap_form form %}
25 <button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
28 {% if editable %}</form>{% endif %}
32 <p><a href="{% url 'documents_book_gallery' book.slug %}">{% trans "Edit gallery" %}</a></p>
35 <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>
40 <div class="col-md-4">
41 {% with cbook=book.catalogue_book %}
44 <a href="{% url 'catalogue_book' cbook.slug %}">{{ cbook }}</a>
52 <div class="card mt-4">
53 <div class="card-header">
54 <h2>{% trans "Chunks" %}</h2>
56 <div class="card-body">
58 <table class='single-book-list table'><tbody>
59 {% for chunk in book %}
60 {% include 'documents/book_list/chunk.html' %}
69 <div class='card mt-4'>
71 <div class="card-header">
72 <h2>{% trans "Publication" %}</h2>
74 <div class="card-body">
76 <div class="col-lg-3">
77 <img class="cover-preview" src="{% url 'cover_preview' book.slug %}" />
78 {% if book.dc_cover_image %}
79 <a href="{{ book.dc_cover_image.get_absolute_url }}">{{ book.dc_cover_image }}</a>
83 <form action="{% url 'cover_quick_import' book.pk %}" method="post">
85 <div class="input-group">
86 <input type="url" name="url" class="form-control" placeholder="URL okładki">
87 <button type="submit" class="btn btn-sm btn-info">Ustaw</button>
93 <form action="{% url 'cover_preview' book.slug %}">
94 <input type="hidden" name="download" value="1">
96 <div class="input-group">
97 <select class="form-control" name='cover_class'>
98 <option value="default">nowa</option>
99 <option value="m-label">nowa + label</option>
100 <option value="legacy">dawna</option>
102 <input class="form-control" name="width" type="number" required value="600" size="3" placeholder="szer.">
103 <input class="form-control" name="height" type="number" size="3" placeholder="wys.">
104 <button type="submit" class="btn btn-sm btn-primary">🡇</button>
108 <div class="col-lg-9">
109 <p>{% trans "Last published" %}:
110 {% if book.last_published %}
111 {{ book.last_published }}
119 <a href="{% url 'documents_book_xml' book.slug %}" rel="nofollow">{% trans "Full XML" %}</a><br/>
120 <a target="_blank" href="{% url 'documents_book_html' book.slug %}" rel="nofollow">{% trans "HTML version" %}</a><br/>
121 <a href="{% url 'documents_book_txt' book.slug %}" rel="nofollow">{% trans "TXT version" %}</a><br/>
122 <a href="{% url 'documents_book_pdf' book.slug %}" rel="nofollow">{% trans "PDF version" %}</a><br/>
123 <a href="{% url 'documents_book_pdf_mobile' book.slug %}" rel="nofollow">{% trans "PDF version for mobiles" %}</a><br/>
124 <a href="{% url 'documents_book_epub' book.slug %}" rel="nofollow">{% trans "EPUB version" %}</a><br/>
125 <a href="{% url 'documents_book_mobi' book.slug %}" rel="nofollow">{% trans "MOBI version" %}</a><br/>
128 {% if user.is_authenticated %}
131 Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
132 mira66 (http://www.flickr.com/photos/21804434@N02/) /
133 CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/)
135 <form method="POST" action="{% url 'documents_publish' book.slug %}">{% csrf_token %}
136 {{ publish_options_form.as_p }}
137 <img src="{{ STATIC_URL }}img/angel-left.png" style="vertical-align: middle" />
138 <button id="publish-button" type="submit">
139 <span>{% trans "Publish" %}</span></button>
140 <img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
144 {% if perms.depot.add_shopbookpublish %}
145 {% depot_shops book as shops %}
146 {% for shop in shops %}
148 <h3 class="mb-3">{{ shop.name }}</h3>
149 {% if not shop.errors %}
150 <form method="post" action="{% url 'depot_shop_publish' shop.shop_id book.pk %}">
152 <button class="btn btn-primary mb-3" type="submit">
153 Opublikuj na {{ shop.name }}
156 {% for info in shop.info %}
157 <div class="alert alert-info">
162 {% for error in shop.errors %}
163 <div class="alert alert-danger">
168 {% for warning in shop.warnings %}
169 <div class="alert alert-warning">
176 {% with last=shop.last %}
178 {{ last.created_at }} →
179 {{ last.started_at }} →
180 {{ last.finished_at }}
181 <span title="{{ last.error }}">
182 ({{ last.get_status_display }})
184 <!-- {{ shop.last.id }} -->
191 <a href="{% url 'cas_ng_login' %}">{% trans "Log in to publish." %}</a>
194 <p>{% trans "This book can't be published yet, because:" %}</p>
195 <ul><li>{{ publishable_error }}</li></ul>
204 <div class="card mt-4">
205 <div class="card-header">
206 <h2>{% trans "Statistics" %}</h2>
208 <div class="card-body">
209 <table class="table">
215 <th>{% trans "characters" %}</th>
216 <th>{% trans "characters (with footnotes)" %}</th>
217 <th>{% trans "words" %}</th>
218 <th>{% trans "words (with footnotes)" %}</th>
219 <th>{% trans "wiersze (+ inne znaki)" %}</th>
220 <th>{% trans "wiersze (+ inne znaki, z przypisami)" %}</th>
224 {% include 'documents/book_stats.html' with book=doc stats=stats depth=0 %}
230 {% endblock content %}