From aa2ad15260a5551cd45339211442cd1f572c1501 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 18 Jul 2016 17:38:55 +0200 Subject: [PATCH] SONAR-7894 Document the "Anyone" group on the "Groups" page (#1108) --- .../src/main/js/apps/groups/list-view.js | 10 ++++++++-- .../js/apps/groups/templates/groups-list.hbs | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 server/sonar-web/src/main/js/apps/groups/templates/groups-list.hbs diff --git a/server/sonar-web/src/main/js/apps/groups/list-view.js b/server/sonar-web/src/main/js/apps/groups/list-view.js index 20280b7c7c4..cca2de036ae 100644 --- a/server/sonar-web/src/main/js/apps/groups/list-view.js +++ b/server/sonar-web/src/main/js/apps/groups/list-view.js @@ -19,10 +19,12 @@ */ 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', @@ -35,6 +37,10 @@ export default Marionette.CollectionView.extend({ hideLoading () { this.$el.removeClass('new-loading'); + + const query = this.collection.q || ''; + const shouldHideAnyone = !'anyone'.includes(query.toLowerCase()); + this.$('.js-anyone').toggleClass('hidden', shouldHideAnyone); } }); diff --git a/server/sonar-web/src/main/js/apps/groups/templates/groups-list.hbs b/server/sonar-web/src/main/js/apps/groups/templates/groups-list.hbs new file mode 100644 index 00000000000..71820036560 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/groups/templates/groups-list.hbs @@ -0,0 +1,18 @@ +
+
+
+ Anyone +
+ +
+ +
+ +
+ {{t 'user_groups.anyone.description'}} +
+ +
+ + +
-- 2.39.5