*/
import Marionette from 'backbone.marionette';
import ListItemView from './list-item-view';
+import Template from './templates/groups-list.hbs';
-export default Marionette.CollectionView.extend({
- tagName: 'ul',
+export default Marionette.CompositeView.extend({
childView: ListItemView,
+ childViewContainer: '.js-list',
+ template: Template,
collectionEvents: {
'request': 'showLoading',
hideLoading () {
this.$el.removeClass('new-loading');
+
+ const query = this.collection.q || '';
+ const shouldHideAnyone = !'anyone'.includes(query.toLowerCase());
+ this.$('.js-anyone').toggleClass('hidden', shouldHideAnyone);
}
});
--- /dev/null
+<div>
+ <div class="panel panel-vertical js-anyone">
+ <div class="display-inline-block text-top width-20">
+ <strong class="js-group-name">Anyone</strong>
+ </div>
+
+ <div class="display-inline-block text-top big-spacer-left width-25">
+
+ </div>
+
+ <div class="display-inline-block text-top big-spacer-left width-40">
+ <span class="js-group-description">{{t 'user_groups.anyone.description'}}</span>
+ </div>
+
+ </div>
+
+ <ul class="js-list"></ul>
+</div>