##// END OF EJS Templates
Added tree mode for the thread
Added tree mode for the thread

File last commit:

r1180:e46298a6 default
r1180:e46298a6 default
Show More
tree.py
27 lines | 569 B | text/x-python | PythonLexer
from boards import settings
from boards.views.thread import ThreadView
TEMPLATE_TREE = 'boards/thread_tree.html'
CONTEXT_OP = 'opening_post'
CONTEXT_BUMPABLE = 'bumpable'
class TreeThreadView(ThreadView):
def get_template(self):
return TEMPLATE_TREE
def get_data(self, thread):
params = dict()
bumpable = thread.can_bump()
params[CONTEXT_BUMPABLE] = bumpable
max_posts = thread.max_posts
params[CONTEXT_OP] = thread.get_opening_post()
return params
def get_mode(self):
return 'tree'