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