diff --git a/boards/static/css/sw/base_page.css b/boards/static/css/sw/base_page.css --- a/boards/static/css/sw/base_page.css +++ b/boards/static/css/sw/base_page.css @@ -160,4 +160,15 @@ a { } .post blockquote > blockquote { padding-top: .1em; -} \ No newline at end of file +} + +.post > .image { + float: left; + margin-right: 1ex; +} +.post > .metadata { + clear: left; +} +.post { + clear: left; +} diff --git a/boards/views.py b/boards/views.py --- a/boards/views.py +++ b/boards/views.py @@ -1,3 +1,4 @@ +from django.core.urlresolvers import reverse from django.template import RequestContext from boards import forms import boards @@ -49,7 +50,9 @@ def new_post(request, thread_id=boards.m ip = request.META['REMOTE_ADDR'] tags = [] - if thread_id == boards.models.NO_PARENT: + + new_thread = thread_id == boards.models.NO_PARENT + if new_thread: tag_strings = data['tags'] if tag_strings: @@ -67,9 +70,14 @@ def new_post(request, thread_id=boards.m parent_id=thread_id, image=image, tags=tags) - thread_to_show = (post.id if thread_id == boards.models.NO_PARENT else - thread_id) - return redirect(thread, post_id=thread_to_show) + thread_to_show = (post.id if new_thread else thread_id) + + if new_thread: + return redirect(thread, post_id=thread_to_show) + else: + return redirect(reverse(thread, + kwargs={'post_id': thread_to_show}) + '#' + + str(post.id)) def tag(request, tag_name): diff --git a/templates/thread.html b/templates/thread.html --- a/templates/thread.html +++ b/templates/thread.html @@ -14,13 +14,13 @@
{% if post.image %} -
+ {% endif %} -
+
{{ post.title }} (#{{ post.id }})