fixes #9: number of attendees counter
This commit is contained in:
parent
47d34f805a
commit
a6a4deff70
1 changed files with 20 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
<md-card-header class="group-header">
|
||||
<md-layout md-row>
|
||||
<div class="md-title">
|
||||
<md-icon class="group-icon">folder_open</md-icon> Group: {{ group.group }}
|
||||
<md-icon class="group-icon">folder_open</md-icon> Group: {{ group.group }} <span class="counter">{{ counter }}</span>
|
||||
</div>
|
||||
</md-layout>
|
||||
</md-card-header>
|
||||
|
@ -54,6 +54,12 @@ export default {
|
|||
return { newAttendee: '', newGroup: '' }
|
||||
},
|
||||
|
||||
computed: {
|
||||
counter: function() {
|
||||
return (this.group.attendees || []).length;
|
||||
}
|
||||
},
|
||||
|
||||
beforeCreate: function() {
|
||||
this.attendeesUrl = this.$resource('attendees{/id}');
|
||||
},
|
||||
|
@ -127,4 +133,17 @@ export default {
|
|||
.new-group-header i:after {
|
||||
background-color: initial !important;
|
||||
}
|
||||
|
||||
.counter {
|
||||
margin-left: 4px;
|
||||
position: relative;
|
||||
bottom: 12px;
|
||||
background-color: #eee;
|
||||
color: #666;
|
||||
padding: 2px 5px;
|
||||
border-radius: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 200;
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue