File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
framework/core/js/src/forum/components Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,29 @@ export default class IndexPage<CustomAttrs extends IIndexPageAttrs = IIndexPageA
63
63
view ( ) {
64
64
return (
65
65
< PageStructure className = "IndexPage" hero = { this . hero . bind ( this ) } sidebar = { this . sidebar . bind ( this ) } >
66
- < div className = "IndexPage-toolbar" >
67
- < ul className = "IndexPage-toolbar-view" > { listItems ( this . viewItems ( ) . toArray ( ) ) } </ ul >
68
- < ul className = "IndexPage-toolbar-action" > { listItems ( this . actionItems ( ) . toArray ( ) ) } </ ul >
69
- </ div >
70
- < DiscussionList state = { app . discussions } />
66
+ { this . contentItems ( ) . toArray ( ) }
71
67
</ PageStructure >
72
68
) ;
73
69
}
74
70
71
+ contentItems ( ) : ItemList < Mithril . Children > {
72
+ const items = new ItemList < Mithril . Children > ( ) ;
73
+
74
+ items . add ( 'toolbar' , < div className = "IndexPage-toolbar" > { this . toolbarItems ( ) . toArray ( ) } </ div > , 100 ) ;
75
+ items . add ( 'discussionList' , < DiscussionList state = { app . discussions } /> , 90 ) ;
76
+
77
+ return items ;
78
+ }
79
+
80
+ toolbarItems ( ) : ItemList < Mithril . Children > {
81
+ const items = new ItemList < Mithril . Children > ( ) ;
82
+
83
+ items . add ( 'view' , < ul className = "IndexPage-toolbar-view" > { listItems ( this . viewItems ( ) . toArray ( ) ) } </ ul > , 100 ) ;
84
+ items . add ( 'action' , < ul className = "IndexPage-toolbar-action" > { listItems ( this . actionItems ( ) . toArray ( ) ) } </ ul > , 90 ) ;
85
+
86
+ return items ;
87
+ }
88
+
75
89
setTitle ( ) {
76
90
app . setTitle ( extractText ( app . translator . trans ( 'core.forum.index.meta_title_text' ) ) ) ;
77
91
app . setTitleCount ( 0 ) ;
You can’t perform that action at this time.
0 commit comments