Django 1.8
[prawokultury.git] / questions / templates / questions / question_list.html
1 {% extends "base.html" %}
2 {% load pagination_tags fnp_prevnext %}
3 {% load pipeline %}
4 {% load chunks %}
5
6 {% block titleextra %}Pierwsza pomoc w prawie autorskim :: {% endblock %}
7 {% block body %}
8 <h1>Pierwsza pomoc w prawie autorskim: zapytaj prawnika</h1>
9
10 <div class="normal">
11 {% chunk 'questions_list_info' %}
12
13 <div id="questions-filter">
14     <h2>Filtruj pytania</h2>
15     Wybierz kategorię tematów:
16     <div id="questions-categories">
17     {% if has_uncategorized_tags %}
18     <a href="#" {% if tag and not tag.category %}class="selected"{% endif %} data-category-id="0">bez kategorii</a>
19     {% endif %}
20     {% for category in tag_categories %}
21             <a href="#" style="font-size: {{category.cloud_size}}em;" {% if tag.category == category %}class="selected"{% endif %} data-category-id="{{category.id}}">{{category}}</a>
22     {% endfor %}
23     </div>
24
25     <div id="questions-subjects">
26     {% for category_id, tag_list in tag_lists.items %}
27         <div class="questions-tags-group" data-category-id="{{category_id}}">
28         Wyświetl tylko na temat:
29         {% for atag in tag_list %}
30             {% if atag == tag %}<strong style="font-size: {{atag.cloud_size}}em;">{{ atag }}</strong>
31             {% else %}<a href="?tag={{ atag.slug }}" style="font-size: {{atag.cloud_size}}em;">{{ atag }}</a>
32             {% endif %}
33         {% endfor %}
34         </div>
35     {% endfor %}
36     </div>
37     <div>
38         {% if tag %}<a href=".">Pokaż wszystkie pytania</a>{% endif %}
39     </div>
40 </div>
41
42 <h2>Odpowiedzi na już zadane pytania
43     {% if tag %}na temat: {{ tag }}{% endif %}
44     ({{ object_list.count }}):</h2>
45
46 {% autopaginate object_list 20 %}
47
48 <ul class='questions'>
49 {% for question in object_list %}
50     <li><a href="{{ question.get_absolute_url }}">{{ question|truncatewords:50 }}</a>
51     </li>
52 {% endfor %}
53 </ul>
54
55 </div>
56
57 {% prevnext %}
58
59
60 {% endblock %}
61
62 {% block extra_css %}
63     {% stylesheet 'questions' %}
64 {% endblock %}
65
66 {% block extra_js %}
67     {% javascript 'questions' %}
68 {% endblock %}