Skip to content
Snippets Groups Projects
Commit 059ab95d authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Merge branch 'master' of github.com:RocketChat/Rocket.Chat

parents 1e45c552 2686e2e1
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,12 @@ Template.privateGroups.helpers
rooms: ->
return ChatSubscription.find { t: { $in: ['p']}, f: { $ne: true }, open: true }, { sort: 't': 1, 'name': 1 }
total: ->
return ChatSubscription.find({ t: { $in: ['p']}, f: { $ne: true } }).count()
totalOpen: ->
return ChatSubscription.find({ t: { $in: ['p']}, f: { $ne: true }, open: true }).count()
isActive: ->
return 'active' if ChatSubscription.findOne({ t: { $in: ['p']}, f: { $ne: true }, open: true, rid: Session.get('openedRoom') }, { fields: { _id: 1 } })?
......
......@@ -10,5 +10,7 @@
<p class="empty">{{_ "No_groups_yet" }}</p>
{{/each}}
</ul>
<a href="" class="more more-groups">{{_ "More_groups"}} ..</a>
{{#if $gt total totalOpen}}
<a href="" class="more more-groups">{{_ "More_groups"}} ..</a>
{{/if}}
</template>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment