mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
user list tweaks
This commit is contained in:
parent
6651b5c47f
commit
c5c78e8336
3 changed files with 7 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
|||
<td>{{email}}</td>
|
||||
<td>
|
||||
<a href="#">{{posts_count}}</a>
|
||||
<ul class="posts-list">
|
||||
<ul class="posts-list hidden">
|
||||
{{#each posts}}
|
||||
<li><a href="/posts/{{_id}}">{{headline}}</a></li>
|
||||
{{/each}}
|
||||
|
@ -14,5 +14,6 @@
|
|||
</td>
|
||||
<td><a href="#">{{comments_count}}</a></td>
|
||||
<td>{{karma}}</td>
|
||||
<td>{{#if is_admin}}<i class="icon-check"></i>{{/if}}</td>
|
||||
</tr>
|
||||
</template>
|
|
@ -34,4 +34,8 @@ Template.user_item.comments = function(){
|
|||
Template.user_item.comments_count = function(){
|
||||
// Posts.find({'user_id':this._id}).forEach(function(post){console.log(post.headline);});
|
||||
return Comments.find({'user_id':this._id}).count();
|
||||
}
|
||||
|
||||
Template.user_item.is_admin = function(){
|
||||
return isAdmin(this);
|
||||
}
|
|
@ -11,6 +11,7 @@
|
|||
<td>Posts</td>
|
||||
<td>Comments</td>
|
||||
<td>Karma</td>
|
||||
<td>Is Admin?</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
Loading…
Add table
Reference in a new issue