FIX: don't show delete all posts button in admin when there are no posts

This commit is contained in:
Neil Lalonde 2015-03-17 11:18:39 -04:00
parent 177cbf392d
commit 8fcbea0c2c

View File

@ -384,10 +384,12 @@
<div class='value'>{{post_count}}</div>
<div class='controls'>
{{#if can_delete_all_posts}}
<button class='btn btn-danger' {{action "deleteAllPosts" target="content"}}>
<i class='fa fa-trash-o'></i>
{{i18n 'admin.user.delete_all_posts'}}
</button>
{{#if post_count}}
<button class='btn btn-danger' {{action "deleteAllPosts" target="content"}}>
<i class='fa fa-trash-o'></i>
{{i18n 'admin.user.delete_all_posts'}}
</button>
{{/if}}
{{else}}
{{deleteAllPostsExplanation}}
{{/if}}