diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-30 03:53:40 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-30 03:53:40 -0500 |
commit | d15521c79d86cf163b252ab4be7f8dbb1e5f5879 (patch) | |
tree | dca6d9928e4bab4f5d16ccdd2ad7d3cc58c1eadd /app | |
parent | fb1e7eae99b4246ee901075d52fe14a4b760654e (diff) | |
download | gitlab-ce-d15521c79d86cf163b252ab4be7f8dbb1e5f5879.tar.gz |
Do not allow to expand a row if group doesn’t have subgroups
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/groups/components/group_item.vue | 8 | ||||
-rw-r--r-- | app/assets/javascripts/groups/stores/groups_store.js | 1 |
2 files changed, 3 insertions, 6 deletions
diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue index 420f85cdbce..9c20c9d52dc 100644 --- a/app/assets/javascripts/groups/components/group_item.vue +++ b/app/assets/javascripts/groups/components/group_item.vue @@ -14,7 +14,7 @@ export default { }, methods: { toggleSubGroups(e) { - if (e.target.tagName === 'A' || !this.hasSubgroups) { + if (e.target.tagName === 'A' || !this.group.hasSubgroups) { return false; } @@ -39,14 +39,10 @@ export default { return { 'group-row': true, 'is-open': this.group.isOpen, - 'has-subgroups': this.hasSubgroups, + 'has-subgroups': this.group.hasSubgroups, 'no-description': !this.group.description, }; }, - hasSubgroups() { - // TODO: Server should send a flag to indicate group will have subgroups - return true; - }, fullPath() { let fullPath = ''; diff --git a/app/assets/javascripts/groups/stores/groups_store.js b/app/assets/javascripts/groups/stores/groups_store.js index e3530703203..258bda7a2b0 100644 --- a/app/assets/javascripts/groups/stores/groups_store.js +++ b/app/assets/javascripts/groups/stores/groups_store.js @@ -117,6 +117,7 @@ export default class GroupsStore { fullName: rawGroup.full_name, fullPath: rawGroup.full_path, name: rawGroup.name, + hasSubgroups: rawGroup.has_subgroups, canEdit: rawGroup.can_edit, description: rawGroup.description, webUrl: rawGroup.web_url, |