local changes from server
[redakcja.git] / apps / catalogue / templates / catalogue / book_detail.html
1 {% extends "catalogue/base.html" %}
2 {% load book_list i18n %}
3
4 {% block inner_content %}
5
6
7 <h1 style="margin-bottom: 1em">{{ book.title }}</h1>
8
9
10 {% if tab == 'plan' %}
11
12     <ul class="nav nav-tabs">
13         <li role="presentation" class="active"><a href="#">{% trans "Schedule" %}</a></li>
14     </ul>
15
16 {% endif %}
17
18 {% comment %}
19
20
21 {% if editable %}<form method='POST'>{% csrf_token %}{% endif %}
22 <table class='editable'><tbody>
23     {{ form.as_table }}
24     {% if editable %}
25         <tr><td></td><td><button type="submit">{% trans "Save" %}</button></td></tr>
26     {% endif %}
27 </tbody></table>
28 {% if editable %}</form>{% endif %}
29
30 {% if editable %}
31     {% if book.gallery %}
32     <p><a href="{% url 'catalogue_book_gallery' book.slug %}">{% trans "Edit gallery" %}</a></p>
33     {% endif %}
34
35     <p><a href="{% url 'catalogue_book_append' book.slug %}">{% trans "Append to other book" %}</a></p>
36 {% endif %}
37
38
39 <div class='section'>
40
41     <h2>{% trans "Edit" %}</h2>
42
43     <table class='single-book-list'><tbody>
44     {% for chunk in book %}
45         {{ chunk.short_html|safe }}
46     {% endfor %}
47     </tbody></table>
48
49 </div>
50
51
52 <div class='section'>
53
54
55 <h2>{% trans "Publication" %}</h2>
56
57 <div class="cover-preview">
58 <img class="cover-preview" src="{% url 'cover_preview' book.slug %}" />
59 {% if book.dc_cover_image %}
60     <a href="{{ book.dc_cover_image.get_absolute_url }}">{{ book.dc_cover_image }}</a>
61 {% endif %}
62 </div>
63
64 <p>{% trans "Last published" %}: 
65     {% if book.last_published %}
66         {{ book.last_published }}
67     {% else %}
68         &mdash;
69     {% endif %}
70 </p>
71
72 {% if publishable %}
73     <p>
74     <a href="{% url 'catalogue_book_xml' book.slug %}" rel="nofollow">{% trans "Full XML" %}</a><br/>
75     <a target="_blank" href="{% url 'catalogue_book_html' book.slug %}" rel="nofollow">{% trans "HTML version" %}</a><br/>
76     <a href="{% url 'catalogue_book_txt' book.slug %}" rel="nofollow">{% trans "TXT version" %}</a><br/>
77     <a href="{% url 'catalogue_book_pdf' book.slug %}" rel="nofollow">{% trans "PDF version" %}</a><br/>
78     <a href="{% url 'catalogue_book_epub' book.slug %}" rel="nofollow">{% trans "EPUB version" %}</a><br/>
79     </p>
80
81     {% if user.is_authenticated %}
82         <!--
83         Angel photos:
84         Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
85         mira66 (http://www.flickr.com/photos/21804434@N02/) /
86         CC BY 2.0 (http://creativecommons.org/licenses/by/2.0/)
87         -->
88         <form method="POST" action="{% url 'catalogue_publish' book.slug %}">{% csrf_token %}
89             <img src="{{ STATIC_URL }}img/angel-left.png" style="vertical-align: middle" />
90             <button id="publish-button" type="submit">
91                 <span>{% trans "Publish" %}</span></button>
92             <img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
93             </form>
94     {% else %}
95         <a href="{% url 'login' %}">{% trans "Log in to publish." %}</a>
96     {% endif %}
97 {% else %}
98     <p>{% trans "This book can't be published yet, because:" %}</p>
99     <ul><li>{{ publishable_error }}</li></ul>
100 {% endif %}
101
102 <div style="clear: both;"></div>
103 </div>
104
105
106 {% endcomment %}
107
108 {% endblock %}