some chunk management automation
[redakcja.git] / apps / wiki / templates / wiki / book_detail.html
1 {% extends "wiki/base.html" %}
2 {% load i18n %}
3
4 {% block leftcolumn %}
5
6 <a href="{% url wiki_book_edit book.slug %}">{% trans "edit" %}</a>
7     <h1>{{ book.title }}</h1>
8
9 <table>
10     {% for c in chunks %}
11         <tr class="chunk-{{ c.grade }}">
12         <td><a target="_blank" href="{{ c.chunk.get_absolute_url }}">{{ c.chunk.comment }}</a></td>
13         <td>{% for fix in c.fix %}
14
15                 {% ifequal fix "wl" %}<span class="fix"
16                     title="{% trans "add basic document structure" %}"
17                     >&lt;/&gt;</span>{% endifequal %}
18
19                 {% ifequal fix "bad-master" %}<span class="fix"
20                     title='{% trans "change master tag to" %} "{{ first_master }}"'
21                     >master</span>{% endifequal %}
22
23                 {% ifequal fix "trim-begin" %}<span class="fix"
24                     title="{% trans "add begin trimming tag" %}"
25                     >&#x2701;</span>{% endifequal %}
26
27                 {% ifequal fix "trim-end" %}<span class="fix"
28                     title="{% trans "add end trimming tag" %}"
29                     >&#x2703;</span>{% endifequal %}
30
31             {% endfor %}
32
33             {% ifequal c.grade "plain" %}
34                 <span class="fix-info">{% trans "unstructured text" %}</span>
35             {% endifequal %}
36
37             {% ifequal c.grade "xml" %}
38                 <span class="fix-info">{% trans "unknown XML" %}</span>
39             {% endifequal %}
40
41             {% ifequal c.grade "wl-broken" %}
42                 <span class="fix-info">{% trans "broken document" %}</span>
43             {% endifequal %}
44
45         </td>
46         <td><a href="{% url wiki_chunk_edit book.slug c.chunk.slug%}">[{% trans "edit" %}]</a></td>
47         <td>{% if c.chunk.publishable %}P{% endif %}</td>
48         <td><a href="{% url wiki_chunk_add book.slug c.chunk.slug %}">[+]</a></td>
49         </tr>
50     {% endfor %}
51     {% if need_fixing %}
52         <tr><td></td><td>
53             <form method="POST" action="">
54                 {% if choose_master %}
55                     {{ form.master }}
56                 {% endif %}
57                 <button type="submit">{% trans "Apply fixes" %}</button>
58             </form>
59         </td></tr>
60     {% endif %}
61 </table>
62
63 <p><a href="{% url wiki_book_append book.slug %}">{% trans "Append to other book" %}</a></p>
64
65 {% if book.publishable %}
66     <p>
67     <a href="{% url wiki_book_xml book.slug %}">{% trans "Full XML" %}</a><br/>
68     <a target="_blank" href="{% url wiki_book_html book.slug %}">{% trans "HTML version" %}</a><br/>
69     <a href="{% url wiki_book_txt book.slug %}">{% trans "TXT version" %}</a><br/>
70     {% comment %}
71     <a href="{% url wiki_book_epub book.slug %}">{% trans "EPUB version" %}</a><br/>
72     <a href="{% url wiki_book_pdf book.slug %}">{% trans "PDF version" %}</a><br/>
73     {% endcomment %}
74     </p>
75
76     <p style='width:200px; height: 75px; border: 1px dotted gray; border-corners: 4px;'></p>
77 {% else %}
78     {% trans "This book cannot be published yet" %}
79 {% endif %}
80
81 {% endblock leftcolumn %}
82
83 {% block rightcolumn %}
84
85
86 {% endblock rightcolumn %}