Show More
@@ -1,97 +1,96 b'' | |||||
1 | {% load staticfiles %} |
|
1 | {% load staticfiles %} | |
2 | {% load i18n %} |
|
2 | {% load i18n %} | |
3 | {% load l10n %} |
|
3 | {% load l10n %} | |
4 | {% load static from staticfiles %} |
|
4 | {% load static from staticfiles %} | |
5 |
|
5 | |||
6 | <!DOCTYPE html> |
|
6 | <!DOCTYPE html> | |
7 | <html> |
|
7 | <html> | |
8 | <head> |
|
8 | <head> | |
9 | <link rel="stylesheet" type="text/css" href="{% static 'css/base.css' %}" media="all"/> |
|
9 | <link rel="stylesheet" type="text/css" href="{% static 'css/base.css' %}" media="all"/> | |
10 | <link rel="stylesheet" type="text/css" href="{% static 'css/3party/highlight.css' %}" media="all"/> |
|
10 | <link rel="stylesheet" type="text/css" href="{% static 'css/3party/highlight.css' %}" media="all"/> | |
11 | <link rel="stylesheet" type="text/css" href="{% static 'css/3party/jquery-ui.min.css' %}" media="all"/> |
|
11 | <link rel="stylesheet" type="text/css" href="{% static 'css/3party/jquery-ui.min.css' %}" media="all"/> | |
12 | <link rel="stylesheet" type="text/css" href="{% static 'css/3party/jquery.contextMenu.min.css' %}" media="all"/> |
|
12 | <link rel="stylesheet" type="text/css" href="{% static 'css/3party/jquery.contextMenu.min.css' %}" media="all"/> | |
13 | <link rel="stylesheet" type="text/css" href="{% static theme_css %}" media="all"/> |
|
13 | <link rel="stylesheet" type="text/css" href="{% static theme_css %}" media="all"/> | |
14 |
|
14 | |||
15 | {% if rss_url %} |
|
15 | {% if rss_url %} | |
16 | <link rel="alternate" type="application/rss+xml" href="{{ rss_url }}" title="{% trans 'Feed' %}"/> |
|
16 | <link rel="alternate" type="application/rss+xml" href="{{ rss_url }}" title="{% trans 'Feed' %}"/> | |
17 | {% endif %} |
|
17 | {% endif %} | |
18 |
|
18 | |||
19 | <link rel="icon" type="image/png" |
|
19 | <link rel="icon" type="image/png" | |
20 | href="{% static 'favicon.png' %}"> |
|
20 | href="{% static 'favicon.png' %}"> | |
21 |
|
21 | |||
22 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
|
22 | <meta name="viewport" content="width=device-width, initial-scale=1"/> | |
23 | <meta charset="utf-8"/> |
|
23 | <meta charset="utf-8"/> | |
24 |
|
24 | |||
25 | {% block head %}{% endblock %} |
|
25 | {% block head %}{% endblock %} | |
26 | </head> |
|
26 | </head> | |
27 | <body data-image-viewer="{{ image_viewer }}" |
|
27 | <body data-image-viewer="{{ image_viewer }}" | |
28 | data-pow-difficulty="{{ pow_difficulty }}" |
|
28 | data-pow-difficulty="{{ pow_difficulty }}" | |
29 | data-update-script="{% static 'js/updates.js' %}"> |
|
29 | data-update-script="{% static 'js/updates.js' %}"> | |
30 | <script src="{% static 'js/jquery-2.2.0.min.js' %}"></script> |
|
30 | <script src="{% static 'js/jquery-2.2.0.min.js' %}"></script> | |
31 |
|
31 | |||
32 | <header class="navigation_panel"> |
|
32 | <header class="navigation_panel"> | |
33 | <a class="link" href="{% url 'landing' %}">{{ site_name }}</a> |
|
33 | <a class="link" href="{% url 'landing' %}">{{ site_name }}</a> | |
34 | <a href="{% url 'index' %}" title="{% trans "All threads" %}">~~~</a>, |
|
34 | <a href="{% url 'index' %}" title="{% trans "All threads" %}">~~~</a>, | |
35 | {% if tags_str %} |
|
35 | {% if tags_str %} | |
36 | <form action="{% url 'index' %}" method="post" class="post-button-form">{% csrf_token %} |
|
36 | <form action="{% url 'index' %}" method="post" class="post-button-form">{% csrf_token %} | |
37 | {% if only_favorites %} |
|
37 | {% if only_favorites %} | |
38 | <button name="method" value="toggle_fav" class="fav">★</button>, |
|
38 | <button name="method" value="toggle_fav" class="fav">★</button>, | |
39 | {% else %} |
|
39 | {% else %} | |
40 | <button name="method" value="toggle_fav" class="not_fav">★</button>, |
|
40 | <button name="method" value="toggle_fav" class="not_fav">★</button>, | |
41 | {% endif %} |
|
41 | {% endif %} | |
42 | </form> |
|
42 | </form> | |
43 | {{ tags_str|safe }}, |
|
43 | {{ tags_str|safe }}, | |
44 | {% endif %} |
|
44 | {% endif %} | |
45 | <a href="{% url 'tags' %}" title="{% trans 'Tag management' %}">{% trans "tags" %}</a>, |
|
|||
46 | <a href="{% url 'search' %}" title="{% trans 'Search' %}">{% trans 'search' %}</a>, |
|
45 | <a href="{% url 'search' %}" title="{% trans 'Search' %}">{% trans 'search' %}</a>, | |
47 | <a href="{% url 'feed' %}" title="{% trans 'Feed' %}">{% trans 'feed' %}</a>, |
|
46 | <a href="{% url 'feed' %}" title="{% trans 'Feed' %}">{% trans 'feed' %}</a>, | |
48 | <a href="{% url 'random' %}" title="{% trans 'Random images' %}">{% trans 'images' %}</a>{% if has_fav_threads %}, |
|
47 | <a href="{% url 'random' %}" title="{% trans 'Random images' %}">{% trans 'images' %}</a>{% if has_fav_threads %}, | |
49 |
|
48 | |||
50 | <a href="{% url 'feed' %}?favorites" id="fav-panel-btn">{% trans 'favorites' %} <span id="new-fav-post-count" {% if not new_post_count %}style="display: none" {% endif %}>{{ new_post_count }}</span></a> |
|
49 | <a href="{% url 'feed' %}?favorites" id="fav-panel-btn">{% trans 'favorites' %} <span id="new-fav-post-count" {% if not new_post_count %}style="display: none" {% endif %}>{{ new_post_count }}</span></a> | |
51 | {% endif %} |
|
50 | {% endif %} | |
52 |
|
51 | |||
53 | {% if usernames %} |
|
52 | {% if usernames %} | |
54 | <a class="right-link link" href="{% url 'notifications' %}" title="{% trans 'Notifications' %}"> |
|
53 | <a class="right-link link" href="{% url 'notifications' %}" title="{% trans 'Notifications' %}"> | |
55 | {% trans 'Notifications' %} |
|
54 | {% trans 'Notifications' %} | |
56 | {% ifnotequal new_notifications_count 0 %} |
|
55 | {% ifnotequal new_notifications_count 0 %} | |
57 | (<b>{{ new_notifications_count }}</b>) |
|
56 | (<b>{{ new_notifications_count }}</b>) | |
58 | {% endifnotequal %} |
|
57 | {% endifnotequal %} | |
59 | </a> |
|
58 | </a> | |
60 | {% endif %} |
|
59 | {% endif %} | |
61 |
|
60 | |||
62 | <a class="right-link link" href="{% url 'settings' %}">{% trans 'Settings' %}</a> |
|
61 | <a class="right-link link" href="{% url 'settings' %}">{% trans 'Settings' %}</a> | |
63 | </header> |
|
62 | </header> | |
64 |
|
63 | |||
65 | <div id="fav-panel"><div class="post">{% trans "Loading..." %}</div></div> |
|
64 | <div id="fav-panel"><div class="post">{% trans "Loading..." %}</div></div> | |
66 |
|
65 | |||
67 | <script src="{% static 'js/3party/jquery-ui.min.js' %}"></script> |
|
66 | <script src="{% static 'js/3party/jquery-ui.min.js' %}"></script> | |
68 | <script src="{% static 'js/3party/jquery.contextMenu.min.js' %}"></script> |
|
67 | <script src="{% static 'js/3party/jquery.contextMenu.min.js' %}"></script> | |
69 |
|
68 | |||
70 | {% block content %}{% endblock %} |
|
69 | {% block content %}{% endblock %} | |
71 |
|
70 | |||
72 | <script src="{% static 'js/jquery.mousewheel.js' %}"></script> |
|
71 | <script src="{% static 'js/jquery.mousewheel.js' %}"></script> | |
73 | <script src="{% static 'js/3party/highlight.min.js' %}"></script> |
|
72 | <script src="{% static 'js/3party/highlight.min.js' %}"></script> | |
74 |
|
73 | |||
75 | <script src="{% url 'js_info_dict' %}"></script> |
|
74 | <script src="{% url 'js_info_dict' %}"></script> | |
76 |
|
75 | |||
77 | <script src="{% static 'js/popup.js' %}"></script> |
|
76 | <script src="{% static 'js/popup.js' %}"></script> | |
78 | <script src="{% static 'js/image.js' %}"></script> |
|
77 | <script src="{% static 'js/image.js' %}"></script> | |
79 | <script src="{% static 'js/refpopup.js' %}"></script> |
|
78 | <script src="{% static 'js/refpopup.js' %}"></script> | |
80 | <script src="{% static 'js/main.js' %}"></script> |
|
79 | <script src="{% static 'js/main.js' %}"></script> | |
81 |
|
80 | |||
82 | <footer class="navigation_panel"> |
|
81 | <footer class="navigation_panel"> | |
83 | <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b> |
|
82 | <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b> | |
84 | {% block metapanel %}{% endblock %} |
|
83 | {% block metapanel %}{% endblock %} | |
85 | {% if rss_url %} |
|
84 | {% if rss_url %} | |
86 | [<a href="{{ rss_url }}">RSS</a>] |
|
85 | [<a href="{{ rss_url }}">RSS</a>] | |
87 | {% endif %} |
|
86 | {% endif %} | |
88 | [<a href="{% url 'admin:index' %}">{% trans 'Admin' %}</a>] |
|
87 | [<a href="{% url 'admin:index' %}">{% trans 'Admin' %}</a>] | |
89 | [<a href="{% url 'index' %}?order=pub">{% trans 'New threads' %}</a>] |
|
88 | [<a href="{% url 'index' %}?order=pub">{% trans 'New threads' %}</a>] | |
90 | {% with ppd=posts_per_day|floatformat:2 %} |
|
89 | {% with ppd=posts_per_day|floatformat:2 %} | |
91 | {% blocktrans %}Speed: {{ ppd }} posts per day{% endblocktrans %} |
|
90 | {% blocktrans %}Speed: {{ ppd }} posts per day{% endblocktrans %} | |
92 | {% endwith %} |
|
91 | {% endwith %} | |
93 | <a class="link" href="#top" id="up">{% trans 'Up' %}</a> |
|
92 | <a class="link" href="#top" id="up">{% trans 'Up' %}</a> | |
94 | </footer> |
|
93 | </footer> | |
95 |
|
94 | |||
96 | </body> |
|
95 | </body> | |
97 | </html> |
|
96 | </html> |
@@ -1,17 +1,19 b'' | |||||
1 | from django.shortcuts import render |
|
1 | from django.shortcuts import render | |
2 |
|
2 | |||
3 | from boards.views.base import BaseBoardView |
|
3 | from boards.views.base import BaseBoardView | |
4 | from boards.models.tag import Tag |
|
4 | from boards.models.tag import Tag | |
5 |
|
5 | |||
6 |
|
6 | |||
7 | PARAM_TAGS = 'all_tags' |
|
7 | PARAM_TAGS = 'all_tags' | |
8 |
|
8 | |||
9 |
|
9 | |||
|
10 | # TODO This view is deprecated and should be removed in the future cause the tag | |||
|
11 | # list is quite large and slow | |||
10 | class AllTagsView(BaseBoardView): |
|
12 | class AllTagsView(BaseBoardView): | |
11 |
|
13 | |||
12 | def get(self, request): |
|
14 | def get(self, request): | |
13 | params = dict() |
|
15 | params = dict() | |
14 |
|
16 | |||
15 | params[PARAM_TAGS] = Tag.objects.get_not_empty_tags() |
|
17 | params[PARAM_TAGS] = Tag.objects.get_not_empty_tags() | |
16 |
|
18 | |||
17 | return render(request, 'boards/tags.html', params) |
|
19 | return render(request, 'boards/tags.html', params) |
General Comments 0
You need to be logged in to leave comments.
Login now