parent
b3d8399e2f
commit
e64327e624
@ -0,0 +1,12 @@ |
||||
Template.listChannelsFlex.helpers |
||||
channel: -> |
||||
return Template.instance().channelsList?.get() |
||||
|
||||
Template.listChannelsFlex.onRendered -> |
||||
instance = this |
||||
instance.channelsList = new ReactiveVar [] |
||||
|
||||
Meteor.call 'channelsList', (err, result) -> |
||||
if result |
||||
instance.channelsList.set result.channels |
||||
|
@ -0,0 +1,13 @@ |
||||
<template name="listChannelsFlex"> |
||||
<header> |
||||
<h4>{{_ "chatRooms.Channels"}}</h4> |
||||
</header> |
||||
<div class="content"> |
||||
|
||||
<ul> |
||||
{{#each channel}} |
||||
<li><a href="{{pathFor "room"}}">{{name}}</a></li> |
||||
{{/each}} |
||||
</ul> |
||||
</div> |
||||
</template> |
@ -0,0 +1,3 @@ |
||||
Meteor.methods |
||||
channelsList: -> |
||||
return ChatSubscription.find({ uid: Meteor.userId(), t: 'c' }).fetch() |
Loading…
Reference in new issue