diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-07-19 09:29:17 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-07-19 09:29:17 +0200 |
commit | 6938a551fa3d0f80d45a9c4e99075150ba365677 (patch) | |
tree | 417b01968d80c4b6a1aeebb2ea5c1754d9b0be92 /server/sonar-web/src/main/js/apps/groups | |
parent | 226c898c0e4284b1cba76b7830652281ce92fe72 (diff) | |
parent | aa2ad15260a5551cd45339211442cd1f572c1501 (diff) | |
download | sonarqube-6938a551fa3d0f80d45a9c4e99075150ba365677.tar.gz sonarqube-6938a551fa3d0f80d45a9c4e99075150ba365677.zip |
Merge remote-tracking branch 'origin/branch-5.6'
Diffstat (limited to 'server/sonar-web/src/main/js/apps/groups')
-rw-r--r-- | server/sonar-web/src/main/js/apps/groups/list-view.js | 10 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/groups/templates/groups-list.hbs | 18 |
2 files changed, 26 insertions, 2 deletions
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 @@ +<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> |