Show More
@@ -1,162 +1,164 b'' | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load markup %} |
|
4 | {% load markup %} | |
5 |
|
5 | |||
6 | {% block head %} |
|
6 | {% block head %} | |
7 | {% if tag %} |
|
7 | {% if tag %} | |
8 | <title>Neboard - {{ tag }}</title> |
|
8 | <title>Neboard - {{ tag }}</title> | |
9 | {% else %} |
|
9 | {% else %} | |
10 | <title>Neboard</title> |
|
10 | <title>Neboard</title> | |
11 | {% endif %} |
|
11 | {% endif %} | |
12 | {% endblock %} |
|
12 | {% endblock %} | |
13 |
|
13 | |||
14 | {% block content %} |
|
14 | {% block content %} | |
15 |
|
15 | |||
16 | {% if tag %} |
|
16 | {% if tag %} | |
17 | <div class="tag_info"> |
|
17 | <div class="tag_info"> | |
18 | <h2>{% trans 'Tag: ' %}{{ tag }}</h2> |
|
18 | <h2>{% trans 'Tag: ' %}{{ tag }}</h2> | |
19 | </div> |
|
19 | </div> | |
20 | {% endif %} |
|
20 | {% endif %} | |
21 |
|
21 | |||
22 | {% if threads %} |
|
22 | {% if threads %} | |
23 | {% for thread in threads %} |
|
23 | {% for thread in threads %} | |
24 | <div class="thread"> |
|
24 | <div class="thread"> | |
25 | {% if thread.can_bump %} |
|
25 | {% if thread.can_bump %} | |
26 | <div class="post"> |
|
26 | <div class="post"> | |
27 | {% else %} |
|
27 | {% else %} | |
28 | <div class="post dead_post"> |
|
28 | <div class="post dead_post"> | |
29 | {% endif %} |
|
29 | {% endif %} | |
30 | {% if thread.image %} |
|
30 | {% if thread.image %} | |
31 | <div class="image"> |
|
31 | <div class="image"> | |
32 | <a class="fancy" |
|
32 | <a class="fancy" | |
33 |
|
|
33 | href="{{ thread.image.url }}"><img | |
34 |
|
|
34 | src="{{ thread.image.url_200x150 }}" | |
|
35 | alt="{% trans 'Post image' %}" /> | |||
35 | </a> |
|
36 | </a> | |
36 | </div> |
|
37 | </div> | |
37 | {% endif %} |
|
38 | {% endif %} | |
38 | <div class="message"> |
|
39 | <div class="message"> | |
39 | <div class="post-info"> |
|
40 | <div class="post-info"> | |
40 | <span class="title">{{ thread.title }}</span> |
|
41 | <span class="title">{{ thread.title }}</span> | |
41 | <a class="post_id" href="{% url 'thread' thread.id %}"> |
|
42 | <a class="post_id" href="{% url 'thread' thread.id %}"> | |
42 | (#{{ thread.id }})</a> |
|
43 | (#{{ thread.id }})</a> | |
43 | [{{ thread.pub_time }}] |
|
44 | [{{ thread.pub_time }}] | |
44 | [<a class="link" href="{% url 'thread' thread.id %}#form" |
|
45 | [<a class="link" href="{% url 'thread' thread.id %}#form" | |
45 | >{% trans "Reply" %}</a>] |
|
46 | >{% trans "Reply" %}</a>] | |
46 | </div> |
|
47 | </div> | |
47 | {% autoescape off %} |
|
48 | {% autoescape off %} | |
48 | {{ thread.text.rendered|truncatewords_html:50 }} |
|
49 | {{ thread.text.rendered|truncatewords_html:50 }} | |
49 | {% endautoescape %} |
|
50 | {% endautoescape %} | |
50 | </div> |
|
51 | </div> | |
51 | <div class="metadata"> |
|
52 | <div class="metadata"> | |
52 | {{ thread.get_reply_count }} {% trans 'replies' %}, |
|
53 | {{ thread.get_reply_count }} {% trans 'replies' %}, | |
53 | {{ thread.get_images_count }} {% trans 'images' %}. |
|
54 | {{ thread.get_images_count }} {% trans 'images' %}. | |
54 | {% if thread.tags.all %} |
|
55 | {% if thread.tags.all %} | |
55 | <span class="tags">{% trans 'Tags' %}: |
|
56 | <span class="tags">{% trans 'Tags' %}: | |
56 | {% for tag in thread.tags.all %} |
|
57 | {% for tag in thread.tags.all %} | |
57 | <a class="tag" href=" |
|
58 | <a class="tag" href=" | |
58 | {% url 'tag' tag_name=tag.name %}"> |
|
59 | {% url 'tag' tag_name=tag.name %}"> | |
59 | {{ tag.name }}</a> |
|
60 | {{ tag.name }}</a> | |
60 | {% endfor %} |
|
61 | {% endfor %} | |
61 | </span> |
|
62 | </span> | |
62 | {% endif %} |
|
63 | {% endif %} | |
63 | </div> |
|
64 | </div> | |
64 | </div> |
|
65 | </div> | |
65 | {% if thread.get_last_replies %} |
|
66 | {% if thread.get_last_replies %} | |
66 | <div class="last-replies"> |
|
67 | <div class="last-replies"> | |
67 | {% for post in thread.get_last_replies %} |
|
68 | {% for post in thread.get_last_replies %} | |
68 | {% if thread.can_bump %} |
|
69 | {% if thread.can_bump %} | |
69 | <div class="post"> |
|
70 | <div class="post"> | |
70 | {% else %} |
|
71 | {% else %} | |
71 | <div class="post dead_post"> |
|
72 | <div class="post dead_post"> | |
72 | {% endif %} |
|
73 | {% endif %} | |
73 | {% if post.image %} |
|
74 | {% if post.image %} | |
74 | <div class="image"> |
|
75 | <div class="image"> | |
75 | <a class="fancy" |
|
76 | <a class="fancy" | |
76 |
|
|
77 | href="{{ post.image.url }}"><img | |
77 |
|
|
78 | src=" {{ post.image.url_200x150 }}" | |
|
79 | alt="{% trans 'Post image' %}" /> | |||
78 | </a> |
|
80 | </a> | |
79 | </div> |
|
81 | </div> | |
80 | {% endif %} |
|
82 | {% endif %} | |
81 | <div class="message"> |
|
83 | <div class="message"> | |
82 | <div class="post-info"> |
|
84 | <div class="post-info"> | |
83 | <span class="title">{{ post.title }}</span> |
|
85 | <span class="title">{{ post.title }}</span> | |
84 | <a class="post_id" href=" |
|
86 | <a class="post_id" href=" | |
85 | {% url 'thread' thread.id %}#{{ post.id }}"> |
|
87 | {% url 'thread' thread.id %}#{{ post.id }}"> | |
86 | (#{{ post.id }})</a> |
|
88 | (#{{ post.id }})</a> | |
87 | [{{ post.pub_time }}] |
|
89 | [{{ post.pub_time }}] | |
88 | </div> |
|
90 | </div> | |
89 | {% autoescape off %} |
|
91 | {% autoescape off %} | |
90 | {{ post.text.rendered|truncatewords_html:50 }} |
|
92 | {{ post.text.rendered|truncatewords_html:50 }} | |
91 | {% endautoescape %} |
|
93 | {% endautoescape %} | |
92 | </div> |
|
94 | </div> | |
93 | </div> |
|
95 | </div> | |
94 | {% endfor %} |
|
96 | {% endfor %} | |
95 | </div> |
|
97 | </div> | |
96 | {% endif %} |
|
98 | {% endif %} | |
97 | </div> |
|
99 | </div> | |
98 | {% endfor %} |
|
100 | {% endfor %} | |
99 | {% else %} |
|
101 | {% else %} | |
100 | No threads found. |
|
102 | No threads found. | |
101 | <hr /> |
|
103 | <hr /> | |
102 | {% endif %} |
|
104 | {% endif %} | |
103 |
|
105 | |||
104 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
106 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
105 | <div class="post-form-w"> |
|
107 | <div class="post-form-w"> | |
106 |
|
108 | |||
107 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
109 | <div class="form-title">{% trans "Create new thread" %}</div> | |
108 | <div class="post-form"> |
|
110 | <div class="post-form"> | |
109 | <div class="form-row"> |
|
111 | <div class="form-row"> | |
110 | <div class="form-label">{% trans 'Title' %}</div> |
|
112 | <div class="form-label">{% trans 'Title' %}</div> | |
111 | <div class="form-input">{{ form.title }}</div> |
|
113 | <div class="form-input">{{ form.title }}</div> | |
112 | <div class="form-errors">{{ form.title.errors }}</div> |
|
114 | <div class="form-errors">{{ form.title.errors }}</div> | |
113 | </div> |
|
115 | </div> | |
114 | <div class="form-row"> |
|
116 | <div class="form-row"> | |
115 | <div class="form-label">{% trans 'Text' %}</div> |
|
117 | <div class="form-label">{% trans 'Text' %}</div> | |
116 | <div class="form-input">{{ form.text }}</div> |
|
118 | <div class="form-input">{{ form.text }}</div> | |
117 | <div class="form-errors">{{ form.text.errors }}</div> |
|
119 | <div class="form-errors">{{ form.text.errors }}</div> | |
118 | </div> |
|
120 | </div> | |
119 | <div class="form-row"> |
|
121 | <div class="form-row"> | |
120 | <div class="form-label">{% trans 'Image' %}</div> |
|
122 | <div class="form-label">{% trans 'Image' %}</div> | |
121 | <div class="form-input">{{ form.image }}</div> |
|
123 | <div class="form-input">{{ form.image }}</div> | |
122 | <div class="form-errors">{{ form.image.errors }}</div> |
|
124 | <div class="form-errors">{{ form.image.errors }}</div> | |
123 | </div> |
|
125 | </div> | |
124 | <div class="form-row"> |
|
126 | <div class="form-row"> | |
125 | <div class="form-label">{% trans 'Tags' %}</div> |
|
127 | <div class="form-label">{% trans 'Tags' %}</div> | |
126 | <div class="form-input">{{ form.tags }}</div> |
|
128 | <div class="form-input">{{ form.tags }}</div> | |
127 | <div class="form-errors">{{ form.tags.errors }}</div> |
|
129 | <div class="form-errors">{{ form.tags.errors }}</div> | |
128 | </div> |
|
130 | </div> | |
129 | <div class="form-row"> |
|
131 | <div class="form-row"> | |
130 | {{ form.captcha }} |
|
132 | {{ form.captcha }} | |
131 | </div> |
|
133 | </div> | |
132 | </div> |
|
134 | </div> | |
133 | <div class="form-submit"> |
|
135 | <div class="form-submit"> | |
134 | <input type="submit" value="{% trans "Post" %}"/></div> |
|
136 | <input type="submit" value="{% trans "Post" %}"/></div> | |
135 | <div>Tags must be delimited by spaces. Text or image is required |
|
137 | <div>Tags must be delimited by spaces. Text or image is required | |
136 | </div> |
|
138 | </div> | |
137 | <div>Use <a |
|
139 | <div>Use <a | |
138 | href="http://daringfireball.net/projects/markdown/basics"> |
|
140 | href="http://daringfireball.net/projects/markdown/basics"> | |
139 | markdown</a> syntax for posting.</div> |
|
141 | markdown</a> syntax for posting.</div> | |
140 | </div> |
|
142 | </div> | |
141 | </form> |
|
143 | </form> | |
142 |
|
144 | |||
143 | {% endblock %} |
|
145 | {% endblock %} | |
144 |
|
146 | |||
145 | {% block metapanel %} |
|
147 | {% block metapanel %} | |
146 |
|
148 | |||
147 | <span class="metapanel"> |
|
149 | <span class="metapanel"> | |
148 | <b><a href="https://bitbucket.org/neko259/neboard/">Neboard</a> |
|
150 | <b><a href="https://bitbucket.org/neko259/neboard/">Neboard</a> | |
149 | 2013-05 (dev)</b> |
|
151 | 2013-05 (dev)</b> | |
150 | {% trans "Pages:" %} |
|
152 | {% trans "Pages:" %} | |
151 | {% for page in pages %} |
|
153 | {% for page in pages %} | |
152 | [<a href=" |
|
154 | [<a href=" | |
153 | {% if tag %} |
|
155 | {% if tag %} | |
154 | {% url "tag" tag_name=tag page=page %} |
|
156 | {% url "tag" tag_name=tag page=page %} | |
155 | {% else %} |
|
157 | {% else %} | |
156 | {% url "index" page=page %} |
|
158 | {% url "index" page=page %} | |
157 | {% endif %} |
|
159 | {% endif %} | |
158 | ">{{ page }}</a>] |
|
160 | ">{{ page }}</a>] | |
159 | {% endfor %} |
|
161 | {% endfor %} | |
160 | </span> |
|
162 | </span> | |
161 |
|
163 | |||
162 | {% endblock %} |
|
164 | {% endblock %} |
@@ -1,109 +1,110 b'' | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load markup %} |
|
4 | {% load markup %} | |
5 |
|
5 | |||
6 | {% block head %} |
|
6 | {% block head %} | |
7 | <title>Neboard - {{ posts.0.title }}</title> |
|
7 | <title>Neboard - {{ posts.0.title }}</title> | |
8 | {% endblock %} |
|
8 | {% endblock %} | |
9 |
|
9 | |||
10 | {% block content %} |
|
10 | {% block content %} | |
11 | <script src="{{ STATIC_URL }}js/thread.js"></script> |
|
11 | <script src="{{ STATIC_URL }}js/thread.js"></script> | |
12 |
|
12 | |||
13 | {% if posts %} |
|
13 | {% if posts %} | |
14 | <div id="posts"> |
|
14 | <div id="posts"> | |
15 | {% for post in posts %} |
|
15 | {% for post in posts %} | |
16 | {% if posts.0.can_bump %} |
|
16 | {% if posts.0.can_bump %} | |
17 | <div class="post" id="{{ post.id }}"> |
|
17 | <div class="post" id="{{ post.id }}"> | |
18 | {% else %} |
|
18 | {% else %} | |
19 | <div class="post dead_post" id="{{ post.id }}"> |
|
19 | <div class="post dead_post" id="{{ post.id }}"> | |
20 | {% endif %} |
|
20 | {% endif %} | |
21 | {% if post.image %} |
|
21 | {% if post.image %} | |
22 | <div class="image"> |
|
22 | <div class="image"> | |
23 | <a |
|
23 | <a | |
24 | class="fancy" |
|
24 | class="fancy" | |
25 | href="{{ post.image.url }}"><img |
|
25 | href="{{ post.image.url }}"><img | |
26 |
src="{{ post.image.url_200x150 }}" |
|
26 | src="{{ post.image.url_200x150 }}" | |
|
27 | alt="{% trans 'Post image' %}" /> | |||
27 | </a> |
|
28 | </a> | |
28 | </div> |
|
29 | </div> | |
29 | {% endif %} |
|
30 | {% endif %} | |
30 | <div class="message"> |
|
31 | <div class="message"> | |
31 | <div class="post-info"> |
|
32 | <div class="post-info"> | |
32 | <span class="title">{{ post.title }}</span> |
|
33 | <span class="title">{{ post.title }}</span> | |
33 | <a class="post_id" href="#{{ post.id }}"> |
|
34 | <a class="post_id" href="#{{ post.id }}"> | |
34 | (#{{ post.id }})</a> |
|
35 | (#{{ post.id }})</a> | |
35 | [{{ post.pub_time }}] |
|
36 | [{{ post.pub_time }}] | |
36 | {% if post.is_get %} |
|
37 | {% if post.is_get %} | |
37 | <span class="get"> |
|
38 | <span class="get"> | |
38 | {% trans "Get!" %} |
|
39 | {% trans "Get!" %} | |
39 | </span> |
|
40 | </span> | |
40 | {% endif %} |
|
41 | {% endif %} | |
41 | </div> |
|
42 | </div> | |
42 | {% autoescape off %} |
|
43 | {% autoescape off %} | |
43 | {{ post.text.rendered }} |
|
44 | {{ post.text.rendered }} | |
44 | {% endautoescape %} |
|
45 | {% endautoescape %} | |
45 | </div> |
|
46 | </div> | |
46 | {% if post.tags.all %} |
|
47 | {% if post.tags.all %} | |
47 | <div class="metadata"> |
|
48 | <div class="metadata"> | |
48 | <span class="tags">{% trans 'Tags' %}: |
|
49 | <span class="tags">{% trans 'Tags' %}: | |
49 | {% for tag in post.tags.all %} |
|
50 | {% for tag in post.tags.all %} | |
50 | <a class="tag" href="{% url 'tag' tag.name %}"> |
|
51 | <a class="tag" href="{% url 'tag' tag.name %}"> | |
51 | {{ tag.name }}</a> |
|
52 | {{ tag.name }}</a> | |
52 | {% endfor %} |
|
53 | {% endfor %} | |
53 | </span> |
|
54 | </span> | |
54 | </div> |
|
55 | </div> | |
55 | {% endif %} |
|
56 | {% endif %} | |
56 | </div> |
|
57 | </div> | |
57 | {% endfor %} |
|
58 | {% endfor %} | |
58 | </div> |
|
59 | </div> | |
59 | {% else %} |
|
60 | {% else %} | |
60 | No thread found. |
|
61 | No thread found. | |
61 | <hr /> |
|
62 | <hr /> | |
62 | {% endif %} |
|
63 | {% endif %} | |
63 |
|
64 | |||
64 | <form id="form" enctype="multipart/form-data" method="post" |
|
65 | <form id="form" enctype="multipart/form-data" method="post" | |
65 | >{% csrf_token %} |
|
66 | >{% csrf_token %} | |
66 | <div class="post-form-w"> |
|
67 | <div class="post-form-w"> | |
67 | <div class="form-title">{% trans "Reply to thread" %}</div> |
|
68 | <div class="form-title">{% trans "Reply to thread" %}</div> | |
68 | <div class="post-form"> |
|
69 | <div class="post-form"> | |
69 | <div class="form-row"> |
|
70 | <div class="form-row"> | |
70 | <div class="form-label">{% trans 'Title' %}</div> |
|
71 | <div class="form-label">{% trans 'Title' %}</div> | |
71 | <div class="form-input">{{ form.title }}</div> |
|
72 | <div class="form-input">{{ form.title }}</div> | |
72 | <div class="form-errors">{{ form.title.errors }}</div> |
|
73 | <div class="form-errors">{{ form.title.errors }}</div> | |
73 | </div> |
|
74 | </div> | |
74 | <div class="form-row"> |
|
75 | <div class="form-row"> | |
75 | <div class="form-label">{% trans 'Text' %}</div> |
|
76 | <div class="form-label">{% trans 'Text' %}</div> | |
76 | <div class="form-input">{{ form.text }}</div> |
|
77 | <div class="form-input">{{ form.text }}</div> | |
77 | <div class="form-errors">{{ form.text.errors }}</div> |
|
78 | <div class="form-errors">{{ form.text.errors }}</div> | |
78 | </div> |
|
79 | </div> | |
79 | <div class="form-row"> |
|
80 | <div class="form-row"> | |
80 | <div class="form-label">{% trans 'Image' %}</div> |
|
81 | <div class="form-label">{% trans 'Image' %}</div> | |
81 | <div class="form-input">{{ form.image }}</div> |
|
82 | <div class="form-input">{{ form.image }}</div> | |
82 | <div class="form-errors">{{ form.image.errors }}</div> |
|
83 | <div class="form-errors">{{ form.image.errors }}</div> | |
83 | </div> |
|
84 | </div> | |
84 | <div class="form-row"> |
|
85 | <div class="form-row"> | |
85 | {{ form.captcha }} |
|
86 | {{ form.captcha }} | |
86 | </div> |
|
87 | </div> | |
87 | </div> |
|
88 | </div> | |
88 |
|
89 | |||
89 | <div class="form-submit"><input type="submit" |
|
90 | <div class="form-submit"><input type="submit" | |
90 | value="{% trans "Post" %}"/></div> |
|
91 | value="{% trans "Post" %}"/></div> | |
91 | <div>Use <a |
|
92 | <div>Use <a | |
92 | href="http://daringfireball.net/projects/markdown/basics"> |
|
93 | href="http://daringfireball.net/projects/markdown/basics"> | |
93 | markdown</a> syntax for posting.</div> |
|
94 | markdown</a> syntax for posting.</div> | |
94 | <div>Example: *<i>italic</i>*, **<b>bold</b>**</div> |
|
95 | <div>Example: *<i>italic</i>*, **<b>bold</b>**</div> | |
95 | <div>Insert quotes with ">"</div> |
|
96 | <div>Insert quotes with ">"</div> | |
96 | </div> |
|
97 | </div> | |
97 | </form> |
|
98 | </form> | |
98 |
|
99 | |||
99 | {% endblock %} |
|
100 | {% endblock %} | |
100 |
|
101 | |||
101 | {% block metapanel %} |
|
102 | {% block metapanel %} | |
102 |
|
103 | |||
103 | <span class="metapanel"> |
|
104 | <span class="metapanel"> | |
104 | {{ posts.0.get_reply_count }} {% trans 'replies' %}, |
|
105 | {{ posts.0.get_reply_count }} {% trans 'replies' %}, | |
105 | {{ posts.0.get_images_count }} {% trans 'images' %}. |
|
106 | {{ posts.0.get_images_count }} {% trans 'images' %}. | |
106 | {% trans 'Last update: ' %}{{ posts.0.last_edit_time }} |
|
107 | {% trans 'Last update: ' %}{{ posts.0.last_edit_time }} | |
107 | </span> |
|
108 | </span> | |
108 |
|
109 | |||
109 | {% endblock %} No newline at end of file |
|
110 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now