##// END OF EJS Templates
Removed previous "image optimization"/ It can be only used when getting models, not fields.
neko259 -
r166:7c153362 default
parent child Browse files
Show More
@@ -1,182 +1,182 b''
1 1 {% extends "boards/base.html" %}
2 2
3 3 {% load i18n %}
4 4 {% load markup %}
5 5
6 6 {% block head %}
7 7 {% if tag %}
8 8 <title>Neboard - {{ tag }}</title>
9 9 {% else %}
10 10 <title>Neboard</title>
11 11 {% endif %}
12 12 {% endblock %}
13 13
14 14 {% block content %}
15 15
16 16 {% if tag %}
17 17 <div class="tag_info">
18 18 <h2>{% trans 'Tag: ' %}{{ tag }}</h2>
19 19 </div>
20 20 {% endif %}
21 21
22 22 {% if threads %}
23 23 {% for thread in threads %}
24 24 <div class="thread">
25 25 {% if thread.bumpable %}
26 26 <div class="post" id="{{ thread.thread.id }}">
27 27 {% else %}
28 28 <div class="post dead_post" id="{{ thread.thread.id }}">
29 29 {% endif %}
30 {% if thread.thread.image.exists %}
30 {% if thread.thread.image %}
31 31 <div class="image">
32 32 <a class="fancy"
33 33 href="{{ thread.thread.image.url }}"><img
34 34 src="{{ thread.thread.image.url_200x150 }}"
35 35 alt="{% trans 'Post image' %}"
36 36 data-width="{{ thread.thread.image_width }}"
37 37 data-height="{{ thread.thread.image_height }}" />
38 38 </a>
39 39 </div>
40 40 {% endif %}
41 41 <div class="message">
42 42 <div class="post-info">
43 43 <span class="title">{{ thread.thread.title }}</span>
44 44 <a class="post_id" href="{% url 'thread' thread.thread.id %}"
45 45 >(#{{ thread.thread.id }})</a>
46 46 [{{ thread.thread.pub_time }}]
47 47 [<a class="link" href="{% url 'thread' thread.thread.id %}#form"
48 48 >{% trans "Reply" %}</a>]
49 49
50 50 {% if user.is_moderator %}
51 51 <span class="moderator_info">
52 52 [<a href="{% url 'delete' post_id=thread.thread.id %}?next={{ request.path }}"
53 53 >{% trans 'Delete' %}</a>]
54 54 ({{ thread.thread.poster_ip }})
55 55 [<a href="{% url 'ban' post_id=thread.thread.id %}?next={{ request.path }}"
56 56 >{% trans 'Ban IP' %}</a>]
57 57 </span>
58 58 {% endif %}
59 59 </div>
60 60 {% autoescape off %}
61 61 {{ thread.thread.text.rendered|truncatewords_html:50 }}
62 62 {% endautoescape %}
63 63 </div>
64 64 <div class="metadata">
65 65 {{ thread.thread.get_reply_count }} {% trans 'replies' %},
66 66 {{ thread.thread.get_images_count }} {% trans 'images' %}.
67 67 {% if thread.tags.exists %}
68 68 <span class="tags">{% trans 'Tags' %}:
69 69 {% for tag in thread.thread.tags.all %}
70 70 <a class="tag" href="
71 71 {% url 'tag' tag_name=tag.name %}">
72 72 {{ tag.name }}</a>
73 73 {% endfor %}
74 74 </span>
75 75 {% endif %}
76 76 </div>
77 77 </div>
78 78 {% if thread.thread.get_last_replies.exists %}
79 79 <div class="last-replies">
80 80 {% for post in thread.thread.get_last_replies %}
81 81 {% if thread.bumpable %}
82 82 <div class="post" id="{{ post.id }}">
83 83 {% else %}
84 84 <div class="post dead_post" id="{{ post.id }}">
85 85 {% endif %}
86 {% if post.image.exists %}
86 {% if post.image %}
87 87 <div class="image">
88 88 <a class="fancy"
89 89 href="{{ post.image.url }}"><img
90 90 src=" {{ post.image.url_200x150 }}"
91 91 alt="{% trans 'Post image' %}"
92 92 data-width="{{ post.image_width }}"
93 93 data-height="{{ post.image_height }}"/>
94 94 </a>
95 95 </div>
96 96 {% endif %}
97 97 <div class="message">
98 98 <div class="post-info">
99 99 <span class="title">{{ post.title }}</span>
100 100 <a class="post_id" href="
101 101 {% url 'thread' thread.thread.id %}#{{ post.id }}">
102 102 (#{{ post.id }})</a>
103 103 [{{ post.pub_time }}]
104 104 </div>
105 105 {% autoescape off %}
106 106 {{ post.text.rendered|truncatewords_html:50 }}
107 107 {% endautoescape %}
108 108 </div>
109 109 </div>
110 110 {% endfor %}
111 111 </div>
112 112 {% endif %}
113 113 </div>
114 114 {% endfor %}
115 115 {% else %}
116 116 <div class="post">
117 117 {% trans 'No threads exist. Create the first one!' %}</div>
118 118 {% endif %}
119 119
120 120 <form enctype="multipart/form-data" method="post">{% csrf_token %}
121 121 <div class="post-form-w">
122 122
123 123 <div class="form-title">{% trans "Create new thread" %}</div>
124 124 <div class="post-form">
125 125 <div class="form-row">
126 126 <div class="form-label">{% trans 'Title' %}</div>
127 127 <div class="form-input">{{ form.title }}</div>
128 128 <div class="form-errors">{{ form.title.errors }}</div>
129 129 </div>
130 130 <div class="form-row">
131 131 <div class="form-label">{% trans 'Text' %}</div>
132 132 <div class="form-input">{{ form.text }}</div>
133 133 <div class="form-errors">{{ form.text.errors }}</div>
134 134 </div>
135 135 <div class="form-row">
136 136 <div class="form-label">{% trans 'Image' %}</div>
137 137 <div class="form-input">{{ form.image }}</div>
138 138 <div class="form-errors">{{ form.image.errors }}</div>
139 139 </div>
140 140 <div class="form-row">
141 141 <div class="form-label">{% trans 'Tags' %}</div>
142 142 <div class="form-input">{{ form.tags }}</div>
143 143 <div class="form-errors">{{ form.tags.errors }}</div>
144 144 </div>
145 145 <div class="form-row">
146 146 {{ form.captcha }}
147 147 <div class="form-errors">{{ form.captcha.errors }}</div>
148 148 </div>
149 149 <div class="form-row">
150 150 <div class="form-errors">{{ form.other.errors }}</div>
151 151 </div>
152 152 </div>
153 153 <div class="form-submit">
154 154 <input type="submit" value="{% trans "Post" %}"/></div>
155 155 <div>
156 156 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
157 157 </div>
158 158 <div><a href="{% url "staticpage" name="help" %}">
159 159 {% trans 'Text syntax' %}</a></div>
160 160 </div>
161 161 </form>
162 162
163 163 {% endblock %}
164 164
165 165 {% block metapanel %}
166 166
167 167 <span class="metapanel">
168 168 <b><a href="{% url "authors" %}">Neboard</a> 1.1</b>
169 169 {% trans "Pages:" %}
170 170 {% for page in pages %}
171 171 [<a href="
172 172 {% if tag %}
173 173 {% url "tag" tag_name=tag page=page %}
174 174 {% else %}
175 175 {% url "index" page=page %}
176 176 {% endif %}
177 177 ">{{ page }}</a>]
178 178 {% endfor %}
179 179 [<a href="rss/">RSS</a>]
180 180 </span>
181 181
182 182 {% endblock %}
@@ -1,118 +1,118 b''
1 1 {% extends "boards/base.html" %}
2 2
3 3 {% load i18n %}
4 4 {% load markup %}
5 5
6 6 {% block head %}
7 7 <title>Neboard - {{ posts.0.get_title }}</title>
8 8 <script src="{{ STATIC_URL }}js/thread.js"></script>
9 9 {% endblock %}
10 10
11 11 {% block content %}
12 12
13 {% if posts.exists %}
13 {% if posts %}
14 14 <div id="posts">
15 15 {% for post in posts %}
16 16 {% if bumpable %}
17 17 <div class="post" id="{{ post.id }}">
18 18 {% else %}
19 19 <div class="post dead_post" id="{{ post.id }}">
20 20 {% endif %}
21 {% if post.image.exists %}
21 {% if post.image %}
22 22 <div class="image">
23 23 <a
24 24 class="fancy"
25 25 href="{{ post.image.url }}"><img
26 26 src="{{ post.image.url_200x150 }}"
27 27 alt="{% trans 'Post image' %}"v
28 28 data-width="{{ post.image_width }}"
29 29 data-height="{{ post.image_height }}"/>
30 30 </a>
31 31 </div>
32 32 {% endif %}
33 33 <div class="message">
34 34 <div class="post-info">
35 35 <span class="title">{{ post.title }}</span>
36 36 <a class="post_id" href="#{{ post.id }}">
37 37 (#{{ post.id }})</a>
38 38 [{{ post.pub_time }}]
39 39 [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}')
40 40 ; return false;">&gt;&gt;</a>]
41 41
42 42 {% if user.is_moderator %}
43 43 <span class="moderator_info">
44 44 [<a href="{% url 'delete' post_id=post.id %}"
45 45 >{% trans 'Delete' %}</a>]
46 46 ({{ post.poster_ip }})
47 47 [<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}"
48 48 >{% trans 'Ban IP' %}</a>]
49 49 </span>
50 50 {% endif %}
51 51 </div>
52 52 {% autoescape off %}
53 53 {{ post.text.rendered }}
54 54 {% endautoescape %}
55 55 </div>
56 56 {% if post.id == posts.0.id %}
57 57 <div class="metadata">
58 58 <span class="tags">{% trans 'Tags' %}:
59 59 {% for tag in post.tags.all %}
60 60 <a class="tag" href="{% url 'tag' tag.name %}">
61 61 {{ tag.name }}</a>
62 62 {% endfor %}
63 63 </span>
64 64 </div>
65 65 {% endif %}
66 66 </div>
67 67 {% endfor %}
68 68 </div>
69 69 {% endif %}
70 70
71 71 <form id="form" enctype="multipart/form-data" method="post"
72 72 >{% csrf_token %}
73 73 <div class="post-form-w">
74 74 <div class="form-title">{% trans "Reply to thread" %} #{{ posts.0.id }}</div>
75 75 <div class="post-form">
76 76 <div class="form-row">
77 77 <div class="form-label">{% trans 'Title' %}</div>
78 78 <div class="form-input">{{ form.title }}</div>
79 79 <div class="form-errors">{{ form.title.errors }}</div>
80 80 </div>
81 81 <div class="form-row">
82 82 <div class="form-label">{% trans 'Text' %}</div>
83 83 <div class="form-input">{{ form.text }}</div>
84 84 <div class="form-errors">{{ form.text.errors }}</div>
85 85 </div>
86 86 <div class="form-row">
87 87 <div class="form-label">{% trans 'Image' %}</div>
88 88 <div class="form-input">{{ form.image }}</div>
89 89 <div class="form-errors">{{ form.image.errors }}</div>
90 90 </div>
91 91 <div class="form-row">
92 92 {{ form.captcha }}
93 93 <div class="form-errors">{{ form.captcha.errors }}</div>
94 94 </div>
95 95 <div class="form-row">
96 96 <div class="form-errors">{{ form.other.errors }}</div>
97 97 </div>
98 98 </div>
99 99
100 100 <div class="form-submit"><input type="submit"
101 101 value="{% trans "Post" %}"/></div>
102 102 <div><a href="{% url "staticpage" name="help" %}">
103 103 {% trans 'Text syntax' %}</a></div>
104 104 </div>
105 105 </form>
106 106
107 107 {% endblock %}
108 108
109 109 {% block metapanel %}
110 110
111 111 <span class="metapanel">
112 112 {{ posts.0.get_reply_count }} {% trans 'replies' %},
113 113 {{ posts.0.get_images_count }} {% trans 'images' %}.
114 114 {% trans 'Last update: ' %}{{ posts.0.last_edit_time }}
115 115 [<a href="rss/">RSS</a>]
116 116 </span>
117 117
118 118 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now