##// END OF EJS Templates
Colored border for tag view
neko259 -
r2059:fe99bd34 default
parent child Browse files
Show More
@@ -1,184 +1,184 b''
1 {% extends "boards/paginated.html" %}
1 {% extends "boards/paginated.html" %}
2
2
3 {% load i18n %}
3 {% load i18n %}
4 {% load board %}
4 {% load board %}
5 {% load static %}
5 {% load static %}
6 {% load tz %}
6 {% load tz %}
7
7
8 {% block head %}
8 {% block head %}
9 <meta name="robots" content="noindex">
9 <meta name="robots" content="noindex">
10
10
11 {% if tag %}
11 {% if tag %}
12 <title>{{ tag.get_localized_name }} - {{ site_name }}</title>
12 <title>{{ tag.get_localized_name }} - {{ site_name }}</title>
13 {% else %}
13 {% else %}
14 <title>{{ site_name }}</title>
14 <title>{{ site_name }}</title>
15 {% endif %}
15 {% endif %}
16
16
17 {% if prev_page_link %}
17 {% if prev_page_link %}
18 <link rel="prev" href="{{ prev_page_link|safe }}" />
18 <link rel="prev" href="{{ prev_page_link|safe }}" />
19 {% endif %}
19 {% endif %}
20 {% if next_page_link %}
20 {% if next_page_link %}
21 <link rel="next" href="{{ next_page_link|safe }}" />
21 <link rel="next" href="{{ next_page_link|safe }}" />
22 {% endif %}
22 {% endif %}
23
23
24 {% endblock %}
24 {% endblock %}
25
25
26 {% block content %}
26 {% block content %}
27
27
28 {% get_current_language as LANGUAGE_CODE %}
28 {% get_current_language as LANGUAGE_CODE %}
29 {% get_current_timezone as TIME_ZONE %}
29 {% get_current_timezone as TIME_ZONE %}
30
30
31 {% for banner in banners %}
31 {% for banner in banners %}
32 <div class="post">
32 <div class="post">
33 <div class="title">{{ banner.title }}</div>
33 <div class="title">{{ banner.title }}</div>
34 <div>{{ banner.get_text|safe }}</div>
34 <div>{{ banner.get_text|safe }}</div>
35 <div>{% trans 'Details' %}: <a href="{{ banner.post.get_absolute_url|safe }}">>>{{ banner.post.id }}</a></div>
35 <div>{% trans 'Details' %}: <a href="{{ banner.post.get_absolute_url|safe }}">>>{{ banner.post.id }}</a></div>
36 </div>
36 </div>
37 {% endfor %}
37 {% endfor %}
38
38
39 {% if tag %}
39 {% if tag %}
40 <div class="tag_info" style="border-bottom: solid .5ex #{{ tag.get_color }}">
40 <div class="tag_info" style="border: solid .5ex #{{ tag.get_color }}">
41 {% if random_image_post %}
41 {% if random_image_post %}
42 <div class="tag-image">
42 <div class="tag-image">
43 {% with image=random_image_post.get_first_image %}
43 {% with image=random_image_post.get_first_image %}
44 <a href="{{ random_image_post.get_absolute_url|safe }}"><img
44 <a href="{{ random_image_post.get_absolute_url|safe }}"><img
45 src="{{ image.get_thumb_url|safe }}"
45 src="{{ image.get_thumb_url|safe }}"
46 width="{{ image.get_preview_size.0 }}"
46 width="{{ image.get_preview_size.0 }}"
47 height="{{ image.get_preview_size.1 }}"
47 height="{{ image.get_preview_size.1 }}"
48 alt="{{ random_image_post.id }}"/></a>
48 alt="{{ random_image_post.id }}"/></a>
49 {% endwith %}
49 {% endwith %}
50 </div>
50 </div>
51 {% endif %}
51 {% endif %}
52 <div class="tag-text-data">
52 <div class="tag-text-data">
53 <h2>
53 <h2>
54 /{{ tag.get_view|safe }}/
54 /{{ tag.get_view|safe }}/
55 </h2>
55 </h2>
56 {% if perms.change_tag %}
56 {% if perms.change_tag %}
57 <div class="moderator_info"><a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></div>
57 <div class="moderator_info"><a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></div>
58 {% endif %}
58 {% endif %}
59 <p>
59 <p>
60 <form action="{% url 'tag' tag.get_name %}" method="post" class="post-button-form">
60 <form action="{% url 'tag' tag.get_name %}" method="post" class="post-button-form">
61 {% if is_favorite %}
61 {% if is_favorite %}
62 <button name="method" value="unsubscribe" class="fav">★ {% trans "Remove from favorites" %}</button>
62 <button name="method" value="unsubscribe" class="fav">★ {% trans "Remove from favorites" %}</button>
63 {% else %}
63 {% else %}
64 <button name="method" value="subscribe" class="not_fav">★ {% trans "Add to favorites" %}</button>
64 <button name="method" value="subscribe" class="not_fav">★ {% trans "Add to favorites" %}</button>
65 {% endif %}
65 {% endif %}
66 </form>
66 </form>
67 &bull;
67 &bull;
68 <form action="{% url 'tag' tag.get_name %}" method="post" class="post-button-form">
68 <form action="{% url 'tag' tag.get_name %}" method="post" class="post-button-form">
69 {% if is_hidden %}
69 {% if is_hidden %}
70 <button name="method" value="unhide" class="fav">{% trans "Show" %}</button>
70 <button name="method" value="unhide" class="fav">{% trans "Show" %}</button>
71 {% else %}
71 {% else %}
72 <button name="method" value="hide" class="not_fav">{% trans "Hide" %}</button>
72 <button name="method" value="hide" class="not_fav">{% trans "Hide" %}</button>
73 {% endif %}
73 {% endif %}
74 </form>
74 </form>
75 &bull;
75 &bull;
76 <a href="{% url 'tag_gallery' tag.get_name %}">{% trans 'Gallery' %}</a>
76 <a href="{% url 'tag_gallery' tag.get_name %}">{% trans 'Gallery' %}</a>
77 </p>
77 </p>
78 {% if tag.get_description %}
78 {% if tag.get_description %}
79 <p>{{ tag.get_description|safe }}</p>
79 <p>{{ tag.get_description|safe }}</p>
80 {% endif %}
80 {% endif %}
81 <p>
81 <p>
82 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
82 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
83 {% if active_count %}
83 {% if active_count %}
84 ● {{ active_count }}&ensp;
84 ● {{ active_count }}&ensp;
85 {% endif %}
85 {% endif %}
86 {% if bumplimit_count %}
86 {% if bumplimit_count %}
87 ◍ {{ bumplimit_count }}&ensp;
87 ◍ {{ bumplimit_count }}&ensp;
88 {% endif %}
88 {% endif %}
89 {% if archived_count %}
89 {% if archived_count %}
90 ○ {{ archived_count }}&ensp;
90 ○ {{ archived_count }}&ensp;
91 {% endif %}
91 {% endif %}
92 {% endwith %}
92 {% endwith %}
93 ♥ {{ tag.get_post_count }}
93 ♥ {{ tag.get_post_count }}
94 </p>
94 </p>
95 {% if tag.get_all_parents %}
95 {% if tag.get_all_parents %}
96 <p>
96 <p>
97 {% for parent in tag.get_all_parents %}
97 {% for parent in tag.get_all_parents %}
98 {{ parent.get_view|safe }} &gt;
98 {{ parent.get_view|safe }} &gt;
99 {% endfor %}
99 {% endfor %}
100 {{ tag.get_view|safe }}
100 {{ tag.get_view|safe }}
101 </p>
101 </p>
102 {% endif %}
102 {% endif %}
103 {% if tag.get_children.all %}
103 {% if tag.get_children.all %}
104 <p>
104 <p>
105 {% trans "Subsections: " %}
105 {% trans "Subsections: " %}
106 {% for child in tag.get_children.all %}
106 {% for child in tag.get_children.all %}
107 {{ child.get_view|safe }}{% if not forloop.last%}, {% endif %}
107 {{ child.get_view|safe }}{% if not forloop.last%}, {% endif %}
108 {% endfor %}
108 {% endfor %}
109 </p>
109 </p>
110 {% endif %}
110 {% endif %}
111 </div>
111 </div>
112 </div>
112 </div>
113 {% endif %}
113 {% endif %}
114
114
115 {% if threads %}
115 {% if threads %}
116 {% if prev_page_link %}
116 {% if prev_page_link %}
117 <div class="page_link">
117 <div class="page_link">
118 <a href="{{ prev_page_link }}">&lt;&lt; {% trans "Previous page" %} &lt;&lt;</a>
118 <a href="{{ prev_page_link }}">&lt;&lt; {% trans "Previous page" %} &lt;&lt;</a>
119 </div>
119 </div>
120 {% endif %}
120 {% endif %}
121
121
122 {% for thread in threads %}
122 {% for thread in threads %}
123 <div class="thread">
123 <div class="thread">
124 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
124 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
125 {% if not thread.archived %}
125 {% if not thread.archived %}
126 {% with last_replies=thread.get_last_replies %}
126 {% with last_replies=thread.get_last_replies %}
127 {% if last_replies %}
127 {% if last_replies %}
128 {% with skipped_replies_count=thread.get_skipped_replies_count %}
128 {% with skipped_replies_count=thread.get_skipped_replies_count %}
129 {% if skipped_replies_count %}
129 {% if skipped_replies_count %}
130 <div class="skipped_replies">
130 <div class="skipped_replies">
131 <a href="{% url 'thread' thread.get_opening_post_id %}">
131 <a href="{% url 'thread' thread.get_opening_post_id %}">
132 {% blocktrans count count=skipped_replies_count %}Skipped {{ count }} reply. Open thread to see all replies.{% plural %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
132 {% blocktrans count count=skipped_replies_count %}Skipped {{ count }} reply. Open thread to see all replies.{% plural %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
133 </a>
133 </a>
134 </div>
134 </div>
135 {% endif %}
135 {% endif %}
136 {% endwith %}
136 {% endwith %}
137 <div class="last-replies">
137 <div class="last-replies">
138 {% for post in last_replies %}
138 {% for post in last_replies %}
139 {% post_view post truncated=True %}
139 {% post_view post truncated=True %}
140 {% endfor %}
140 {% endfor %}
141 </div>
141 </div>
142 {% endif %}
142 {% endif %}
143 {% endwith %}
143 {% endwith %}
144 {% endif %}
144 {% endif %}
145 </div>
145 </div>
146 {% endfor %}
146 {% endfor %}
147
147
148 {% if next_page_link %}
148 {% if next_page_link %}
149 <div class="page_link">
149 <div class="page_link">
150 <a href="{{ next_page_link }}">&gt;&gt; {% trans "Next page" %} &gt;&gt;</a>
150 <a href="{{ next_page_link }}">&gt;&gt; {% trans "Next page" %} &gt;&gt;</a>
151 </div>
151 </div>
152 {% endif %}
152 {% endif %}
153 {% else %}
153 {% else %}
154 <div class="post">
154 <div class="post">
155 {% trans 'No threads exist. Create the first one!' %}</div>
155 {% trans 'No threads exist. Create the first one!' %}</div>
156 {% endif %}
156 {% endif %}
157
157
158 {% form_view form=form new_thread=True %}
158 {% form_view form=form new_thread=True %}
159
159
160 <script src="{% static 'js/thread_create.js' %}"></script>
160 <script src="{% static 'js/thread_create.js' %}"></script>
161
161
162 {% endblock %}
162 {% endblock %}
163
163
164 {% block metapanel %}
164 {% block metapanel %}
165
165
166 <span class="metapanel">
166 <span class="metapanel">
167 {% trans "Pages:" %}
167 {% trans "Pages:" %}
168 [
168 [
169 {% with dividers=paginator.get_dividers %}
169 {% with dividers=paginator.get_dividers %}
170 {% for page in paginator.get_divided_range %}
170 {% for page in paginator.get_divided_range %}
171 {% if page in dividers %}
171 {% if page in dividers %}
172 …,
172 …,
173 {% endif %}
173 {% endif %}
174 <a
174 <a
175 {% ifequal page current_page.number %}
175 {% ifequal page current_page.number %}
176 class="current_page"
176 class="current_page"
177 {% endifequal %}
177 {% endifequal %}
178 href="{% page_url paginator page %}">{{ page }}</a>{% if not forloop.last %},{% endif %}
178 href="{% page_url paginator page %}">{{ page }}</a>{% if not forloop.last %},{% endif %}
179 {% endfor %}
179 {% endfor %}
180 {% endwith %}
180 {% endwith %}
181 ]
181 ]
182 </span>
182 </span>
183
183
184 {% endblock %}
184 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now