2017-05-06 00:15:04 -04:00
|
|
|
<script>
|
2017-05-08 16:22:26 -04:00
|
|
|
import eventHub from '../event_hub';
|
|
|
|
|
2017-05-06 00:15:04 -04:00
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
group: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
2017-05-08 16:22:26 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggleSubGroups() {
|
2017-05-11 13:10:54 -04:00
|
|
|
if (!this.group.hasSubgroups) {
|
2017-05-09 19:10:19 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-05-08 16:22:26 -04:00
|
|
|
eventHub.$emit('toggleSubGroups', this.group);
|
|
|
|
},
|
|
|
|
},
|
2017-05-06 00:15:04 -04:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2017-05-09 19:10:19 -04:00
|
|
|
<li @click="toggleSubGroups" class="list-group-item">
|
2017-05-11 13:10:54 -04:00
|
|
|
<span v-show="group.hasSubgroups">
|
2017-05-09 19:10:19 -04:00
|
|
|
<i
|
|
|
|
v-show="group.isOpen"
|
|
|
|
class="fa fa-caret-down"
|
|
|
|
aria-hidden="true" />
|
|
|
|
<i
|
|
|
|
v-show="!group.isOpen"
|
|
|
|
class="fa fa-caret-right"
|
|
|
|
aria-hidden="true"/>
|
|
|
|
</span>
|
|
|
|
|
2017-05-11 13:10:54 -04:00
|
|
|
<p><a :href="group.webUrl">{{group.fullName}}</a></p>
|
2017-05-09 19:10:19 -04:00
|
|
|
<p>{{group.description}}</p>
|
|
|
|
|
|
|
|
<group-folder v-if="group.subGroups && group.isOpen" :groups="group.subGroups" />
|
|
|
|
</li>
|
2017-05-06 00:15:04 -04:00
|
|
|
</template>
|