Show More
@@ -289,4 +289,7 b' class Thread(models.Model):' | |||||
289 | return self.get_replies()[0] |
|
289 | return self.get_replies()[0] | |
290 |
|
290 | |||
291 | def __unicode__(self): |
|
291 | def __unicode__(self): | |
292 | return str(self.get_replies()[0].id) No newline at end of file |
|
292 | return str(self.get_replies()[0].id) | |
|
293 | ||||
|
294 | def get_pub_time(self): | |||
|
295 | return self.get_opening_post().pub_time No newline at end of file |
@@ -15,7 +15,7 b' class AllThreadsFeed(Feed):' | |||||
15 | description_template = 'boards/rss/post.html' |
|
15 | description_template = 'boards/rss/post.html' | |
16 |
|
16 | |||
17 | def items(self): |
|
17 | def items(self): | |
18 |
return Post.objects.get_threads( |
|
18 | return Post.objects.get_threads() # TODO Order this by OP's pub time | |
19 |
|
19 | |||
20 | def item_title(self, item): |
|
20 | def item_title(self, item): | |
21 | return item.get_opening_post().title |
|
21 | return item.get_opening_post().title | |
@@ -33,8 +33,7 b' class TagThreadsFeed(Feed):' | |||||
33 | description_template = 'boards/rss/post.html' |
|
33 | description_template = 'boards/rss/post.html' | |
34 |
|
34 | |||
35 | def items(self, obj): |
|
35 | def items(self, obj): | |
36 |
return Post.objects.get_threads(tag=obj |
|
36 | return Post.objects.get_threads(tag=obj) # TODO Order this by OP's pub time | |
37 | order_by='-pub_time') |
|
|||
38 |
|
37 | |||
39 | def get_object(self, request, tag_name): |
|
38 | def get_object(self, request, tag_name): | |
40 | return get_object_or_404(Tag, name=tag_name) |
|
39 | return get_object_or_404(Tag, name=tag_name) | |
@@ -46,7 +45,7 b' class TagThreadsFeed(Feed):' | |||||
46 | return reverse('thread', args={item.get_opening_post().id}) |
|
45 | return reverse('thread', args={item.get_opening_post().id}) | |
47 |
|
46 | |||
48 | def item_pubdate(self, item): |
|
47 | def item_pubdate(self, item): | |
49 | return item.pub_time |
|
48 | return item.get_pub_time() | |
50 |
|
49 | |||
51 | def title(self, obj): |
|
50 | def title(self, obj): | |
52 | return obj.name |
|
51 | return obj.name | |
@@ -67,8 +66,8 b' class ThreadPostsFeed(Feed):' | |||||
67 | return item.title |
|
66 | return item.title | |
68 |
|
67 | |||
69 | def item_link(self, item): |
|
68 | def item_link(self, item): | |
70 |
if item. |
|
69 | if not item.is_opening(): | |
71 | return reverse('thread', args={item.thread.get_opening_post() |
|
70 | return reverse('thread', args={item.thread_new.get_opening_post() | |
72 | .id}) + "#" + str(item.id) |
|
71 | .id}) + "#" + str(item.id) | |
73 | else: |
|
72 | else: | |
74 | return reverse('thread', args={item.id}) |
|
73 | return reverse('thread', args={item.id}) |
@@ -6,7 +6,7 b'' | |||||
6 | {% load board %} |
|
6 | {% load board %} | |
7 |
|
7 | |||
8 | {% block head %} |
|
8 | {% block head %} | |
9 |
<title>Neboard - {{ |
|
9 | <title>Neboard - {{ thread.get_replies.0.get_title }}</title> | |
10 | {% endblock %} |
|
10 | {% endblock %} | |
11 |
|
11 | |||
12 | {% block content %} |
|
12 | {% block content %} | |
@@ -15,7 +15,7 b'' | |||||
15 | <script src="{% static 'js/thread_update.js' %}"></script> |
|
15 | <script src="{% static 'js/thread_update.js' %}"></script> | |
16 | <script src="{% static 'js/thread.js' %}"></script> |
|
16 | <script src="{% static 'js/thread.js' %}"></script> | |
17 |
|
17 | |||
18 | {% cache 600 thread_view thread.last_edit_time moderator LANGUAGE_CODE %} |
|
18 | {% cache 600 thread_view thread.id thread.last_edit_time moderator LANGUAGE_CODE %} | |
19 | {% if bumpable %} |
|
19 | {% if bumpable %} | |
20 | <div class="bar-bg"> |
|
20 | <div class="bar-bg"> | |
21 | <div class="bar-value" style="width:{{ bumplimit_progress }}%"> |
|
21 | <div class="bar-value" style="width:{{ bumplimit_progress }}%"> |
General Comments 0
You need to be logged in to leave comments.
Login now