Browse Source

Move more features HTML to chatroom_features.html

JC Brand 8 năm trước cách đây
mục cha
commit
adeac37b5c

+ 2 - 2
src/converse-muc.js

@@ -1972,7 +1972,6 @@
                         tpl_chatroom_sidebar(
                             _.extend(this.chatroomview.model.toJSON(), {
                                 'allow_muc_invitations': _converse.allow_muc_invitations,
-                                'label_features': __('Features'),
                                 'label_occupants': __('Occupants')
                             }))
                     );
@@ -2002,9 +2001,10 @@
                 },
 
                 renderRoomFeatures: function () {
-                    this.$('.features-list').html(
+                    this.$('.chatroom-features').html(
                         tpl_chatroom_features(
                             _.extend(this.chatroomview.model.toJSON(), {
+                                'label_features': __('Features'),
                                 'label_hidden': __('Hidden'),
                                 'label_mam_enabled': __('Message archiving'),
                                 'label_membersonly': __('Members only'),

+ 3 - 0
src/templates/chatroom_features.html

@@ -1,3 +1,5 @@
+<p class="occupants-heading">{{{label_features}}}</p>
+<ul class="features-list">
 {[ if (passwordprotected) { ]}
 <li class="feature" title="{{{ tt_passwordprotected }}}"><span class="icon-lock-2"></span>{{{ label_passwordprotected }}}</li>
 {[ } ]}
@@ -37,3 +39,4 @@
 {[ if (mam_enabled) { ]}
 <li class="feature" title="{{{ tt_mam_enabled }}}"><span class="icon-database"></span>{{{ label_mam_enabled }}}</li>
 {[ } ]}
+</ul>

+ 1 - 4
src/templates/chatroom_sidebar.html

@@ -1,8 +1,5 @@
 <!-- <div class="occupants"> -->
 <p class="occupants-heading">{{{label_occupants}}}</p>
 <ul class="occupant-list"></ul>
-<div class="chatroom-features">
-    <p class="occupants-heading">{{{label_features}}}</p>
-    <ul class="features-list"></ul>
-</div>
+<div class="chatroom-features"></div>
 <!-- </div> -->