- <div class="col-lg-9">
-<p>{% trans "Last published" %}:
- {% if book.last_published %}
- {{ book.last_published }}
- {% else %}
- —
- {% endif %}
-</p>
-
-{% if publishable %}
- <p>
- <a href="{% url 'documents_book_xml' book.slug %}" rel="nofollow">{% trans "Full XML" %}</a><br/>
- <a target="_blank" href="{% url 'documents_book_html' book.slug %}" rel="nofollow">{% trans "HTML version" %}</a><br/>
- <a href="{% url 'documents_book_txt' book.slug %}" rel="nofollow">{% trans "TXT version" %}</a><br/>
- <a href="{% url 'documents_book_pdf' book.slug %}" rel="nofollow">{% trans "PDF version" %}</a><br/>
- <a href="{% url 'documents_book_pdf_mobile' book.slug %}" rel="nofollow">{% trans "PDF version for mobiles" %}</a><br/>
- <a href="{% url 'documents_book_epub' book.slug %}" rel="nofollow">{% trans "EPUB version" %}</a><br/>
- <a href="{% url 'documents_book_mobi' book.slug %}" rel="nofollow">{% trans "MOBI version" %}</a><br/>
- </p>
-
- {% if user.is_authenticated %}
- <!--
- Angel photos:
- Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
- mira66 (http://www.flickr.com/photos/21804434@N02/) /
- CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/)
- -->
- <form method="POST" action="{% url 'documents_publish' book.slug %}">{% csrf_token %}
- {{ publish_options_form.as_p }}
- <img src="{{ STATIC_URL }}img/angel-left.png" style="vertical-align: middle" />
- <button id="publish-button" type="submit">
- <span>{% trans "Publish" %}</span></button>
- <img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
- </form>
-
- {% if perms.depot.add_legimibookpublish %}
- <hr>
- {% with thema_main=doc.book_info.thema_main thema=doc.book_info.thema %}
- {% if thema_main or thema %}
- <form method="post" action="{% url 'depot_legimi_publish' book.pk %}">
- {% csrf_token %}
- <button class="btn btn-primary" type="submit">
- Opublikuj na Legimi<br><small>w kategorii:
- {% if thema_main %}
- <tt>{{ thema_main }}</tt>
+ <div class="card-body">
+ <div class="row">
+ <div class="col-lg-3">
+ <img class="cover-preview" src="{% url 'cover_preview' book.slug %}" />
+ {% if book.dc_cover_image %}
+ <a href="{{ book.dc_cover_image.get_absolute_url }}">{{ book.dc_cover_image }}</a>
+ {% endif %}
+ <br><br>
+
+ <form action="{% url 'cover_quick_import' book.pk %}" method="post">
+ {% csrf_token %}
+ <div class="input-group">
+ <input type="url" name="url" class="form-control" placeholder="URL okładki">
+ <button type="submit" class="btn btn-sm btn-info">Ustaw</button>
+ </div>
+ </form>
+
+
+ <br><br>
+ <form action="{% url 'cover_preview' book.slug %}">
+ <input type="hidden" name="download" value="1">
+ Pobierz okładkę:
+ <div class="input-group">
+ <select class="form-control" name='cover_class'>
+ <option value="default">nowa</option>
+ <option value="m-label">nowa + label</option>
+ <option value="legacy">dawna</option>
+ </select><br>
+ <input class="form-control" name="width" type="number" required value="600" size="3" placeholder="szer.">
+ <input class="form-control" name="height" type="number" size="3" placeholder="wys.">
+ <button type="submit" class="btn btn-sm btn-primary">🡇</button>
+ </div>
+ </form>
+ </div>
+ <div class="col-lg-9">
+ <p>{% trans "Last published" %}:
+ {% if book.last_published %}
+ {{ book.last_published }}
+ {% else %}
+ —
+ {% endif %}
+ </p>
+
+ {% if publishable %}
+ <p>
+ <a href="{% url 'documents_book_xml' book.slug %}" rel="nofollow">{% trans "Full XML" %}</a><br/>
+ <a target="_blank" href="{% url 'documents_book_html' book.slug %}" rel="nofollow">{% trans "HTML version" %}</a><br/>
+ <a href="{% url 'documents_book_txt' book.slug %}" rel="nofollow">{% trans "TXT version" %}</a><br/>
+ <a href="{% url 'documents_book_pdf' book.slug %}" rel="nofollow">{% trans "PDF version" %}</a><br/>
+ <a href="{% url 'documents_book_pdf_mobile' book.slug %}" rel="nofollow">{% trans "PDF version for mobiles" %}</a><br/>
+ <a href="{% url 'documents_book_epub' book.slug %}" rel="nofollow">{% trans "EPUB version" %}</a><br/>
+ <a href="{% url 'documents_book_mobi' book.slug %}" rel="nofollow">{% trans "MOBI version" %}</a><br/>
+ </p>
+
+ {% if user.is_authenticated %}
+ <!--
+ Angel photos:
+ Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
+ mira66 (http://www.flickr.com/photos/21804434@N02/) /
+ CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/)
+ -->
+ <form method="POST" action="{% url 'documents_publish' book.slug %}">{% csrf_token %}
+ {{ publish_options_form.as_p }}
+ <img src="{{ STATIC_URL }}img/angel-left.png" style="vertical-align: middle" />
+ <button id="publish-button" type="submit">
+ <span>{% trans "Publish" %}</span></button>
+ <img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
+ </form>
+
+
+ {% if perms.depot.add_shopbookpublish %}
+ {% depot_shops book as shops %}
+ {% for shop in shops %}
+ <hr>
+ <h3 class="mb-3">{{ shop.name }}</h3>
+ {% if not shop.errors %}
+ <form method="post" action="{% url 'depot_shop_publish' shop.shop_id book.pk %}">
+ {% csrf_token %}
+ <button class="btn btn-primary mb-3" type="submit">
+ Opublikuj na {{ shop.name }}
+ </button>
+ </form>
+ {% for info in shop.info %}
+ <div class="alert alert-info">
+ {{ info }}
+ </div>
+ {% endfor %}
+ {% else %}
+ {% for error in shop.errors %}
+ <div class="alert alert-danger">
+ {{ error }}
+ </div>
+ {% endfor %}