Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
neko259
- Tue, 19 May 2015 17:01:37
Show More
boards/views/thread/gallery.py
0
0
-2
@@
-3,7
+3,6
b' from boards.views.thread import ThreadVi'
3
3
TEMPLATE_GALLERY = 'boards/thread_gallery.html'
4
4
5
5
CONTEXT_POSTS = 'posts'
6
CONTEXT_OP = 'opening_post'
7
6
8
7
9
8
class GalleryThreadView ( ThreadView ):
@@
-16,7
+15,6
b' class GalleryThreadView(ThreadView):'
16
15
17
16
params [ CONTEXT_POSTS ] = thread . get_replies_with_images (
18
17
view_fields_only = True )
19
params [ CONTEXT_OP ] = thread . get_opening_post ()
20
18
21
19
return params
22
20
boards/views/thread/normal.py
0
0
-4
@@
-1,9
+1,7
b''
1
from boards import settings
2
1
from boards.views.thread import ThreadView
3
2
4
3
TEMPLATE_NORMAL = 'boards/thread_normal.html'
5
4
6
CONTEXT_OP = 'opening_post'
7
5
CONTEXT_BUMPLIMIT_PRG = 'bumplimit_progress'
8
6
CONTEXT_POSTS_LEFT = 'posts_left'
9
7
CONTEXT_BUMPABLE = 'bumpable'
@@
-29,6
+27,4
b' class NormalThreadView(ThreadView):'
29
27
params [ CONTEXT_BUMPLIMIT_PRG ] = str (
30
28
float ( left_posts ) / max_posts * 100 )
31
29
32
params [ CONTEXT_OP ] = thread . get_opening_post ()
33
34
30
return params
boards/views/thread/thread.py
0
+6
-4
@@
-22,6
+22,7
b" CONTEXT_WS_HOST = 'ws_host'"
22
22
CONTEXT_WS_PORT = 'ws_port'
23
23
CONTEXT_WS_TIME = 'ws_token_time'
24
24
CONTEXT_MODE = 'mode'
25
CONTEXT_OP = 'opening_post'
25
26
26
27
FORM_TITLE = 'title'
27
28
FORM_TEXT = 'text'
@@
-53,6
+54,7
b' class ThreadView(BaseBoardView, PostMixi'
53
54
params [ CONTEXT_LASTUPDATE ] = str ( thread_to_show . last_edit_time )
54
55
params [ CONTEXT_THREAD ] = thread_to_show
55
56
params [ CONTEXT_MODE ] = self . get_mode ()
57
params [ CONTEXT_OP ] = opening_post
56
58
57
59
if settings . get_bool ( 'External' , 'WebsocketsEnabled' ):
58
60
token_time = format ( timezone . now (), u 'U' )
@@
-118,19
+120,19
b' class ThreadView(BaseBoardView, PostMixi'
118
120
else :
119
121
return post
120
122
121
def get_data ( self , thread ):
123
def get_data ( self , thread ) -> dict :
122
124
"""
123
125
Returns context params for the view.
124
126
"""
125
127
126
pass
128
return dict ()
127
129
128
def get_template ( self ):
130
def get_template ( self ) -> str :
129
131
"""
130
132
Gets template to show the thread mode on.
131
133
"""
132
134
133
135
pass
134
136
135
def get_mode ( self ):
137
def get_mode ( self ) -> str :
136
138
pass
boards/views/thread/tree.py
0
0
-15
@@
-1,27
+1,12
b''
1
from boards import settings
2
1
from boards.views.thread import ThreadView
3
2
4
3
TEMPLATE_TREE = 'boards/thread_tree.html'
5
4
6
CONTEXT_OP = 'opening_post'
7
CONTEXT_BUMPABLE = 'bumpable'
8
9
5
10
6
class TreeThreadView ( ThreadView ):
11
7
12
8
def get_template ( self ):
13
9
return TEMPLATE_TREE
14
10
15
def get_data ( self , thread ):
16
params = dict ()
17
18
bumpable = thread . can_bump ()
19
params [ CONTEXT_BUMPABLE ] = bumpable
20
max_posts = thread . max_posts
21
22
params [ CONTEXT_OP ] = thread . get_opening_post ()
23
24
return params
25
26
11
def get_mode ( self ):
27
12
return 'tree'
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages