Show More
@@ -160,4 +160,15 b' a {' | |||||
160 | } |
|
160 | } | |
161 | .post blockquote > blockquote { |
|
161 | .post blockquote > blockquote { | |
162 | padding-top: .1em; |
|
162 | padding-top: .1em; | |
163 | } No newline at end of file |
|
163 | } | |
|
164 | ||||
|
165 | .post > .image { | |||
|
166 | float: left; | |||
|
167 | margin-right: 1ex; | |||
|
168 | } | |||
|
169 | .post > .metadata { | |||
|
170 | clear: left; | |||
|
171 | } | |||
|
172 | .post { | |||
|
173 | clear: left; | |||
|
174 | } |
@@ -1,3 +1,4 b'' | |||||
|
1 | from django.core.urlresolvers import reverse | |||
1 | from django.template import RequestContext |
|
2 | from django.template import RequestContext | |
2 | from boards import forms |
|
3 | from boards import forms | |
3 | import boards |
|
4 | import boards | |
@@ -49,7 +50,9 b' def new_post(request, thread_id=boards.m' | |||||
49 | ip = request.META['REMOTE_ADDR'] |
|
50 | ip = request.META['REMOTE_ADDR'] | |
50 |
|
51 | |||
51 | tags = [] |
|
52 | tags = [] | |
52 | if thread_id == boards.models.NO_PARENT: |
|
53 | ||
|
54 | new_thread = thread_id == boards.models.NO_PARENT | |||
|
55 | if new_thread: | |||
53 | tag_strings = data['tags'] |
|
56 | tag_strings = data['tags'] | |
54 |
|
57 | |||
55 | if tag_strings: |
|
58 | if tag_strings: | |
@@ -67,9 +70,14 b' def new_post(request, thread_id=boards.m' | |||||
67 | parent_id=thread_id, image=image, |
|
70 | parent_id=thread_id, image=image, | |
68 | tags=tags) |
|
71 | tags=tags) | |
69 |
|
72 | |||
70 |
thread_to_show = (post.id if thread |
|
73 | thread_to_show = (post.id if new_thread else thread_id) | |
71 | thread_id) |
|
74 | ||
72 | return redirect(thread, post_id=thread_to_show) |
|
75 | if new_thread: | |
|
76 | return redirect(thread, post_id=thread_to_show) | |||
|
77 | else: | |||
|
78 | return redirect(reverse(thread, | |||
|
79 | kwargs={'post_id': thread_to_show}) + '#' | |||
|
80 | + str(post.id)) | |||
73 |
|
81 | |||
74 |
|
82 | |||
75 | def tag(request, tag_name): |
|
83 | def tag(request, tag_name): |
@@ -14,13 +14,13 b'' | |||||
14 | <a name="{{ post.id }}"></a> |
|
14 | <a name="{{ post.id }}"></a> | |
15 | <div class="post"> |
|
15 | <div class="post"> | |
16 | {% if post.image %} |
|
16 | {% if post.image %} | |
17 |
<div class=" |
|
17 | <div class="image"> | |
18 | <a href="{{ post.image.url }}"><img |
|
18 | <a href="{{ post.image.url }}"><img | |
19 | src="{{ post.image.url_200x150 }}" /> |
|
19 | src="{{ post.image.url_200x150 }}" /> | |
20 | </a> |
|
20 | </a> | |
21 | </div> |
|
21 | </div> | |
22 | {% endif %} |
|
22 | {% endif %} | |
23 |
<div class=" |
|
23 | <div class="message"> | |
24 | <span class="title">{{ post.title }}</span> |
|
24 | <span class="title">{{ post.title }}</span> | |
25 | <a class="post_id" href="#{{ post.id }}"> |
|
25 | <a class="post_id" href="#{{ post.id }}"> | |
26 | (#{{ post.id }})</a> |
|
26 | (#{{ post.id }})</a> |
General Comments 0
You need to be logged in to leave comments.
Login now