FIX: don't show delete all posts button in admin when there are no posts
This commit is contained in:
parent
177cbf392d
commit
8fcbea0c2c
|
@ -384,10 +384,12 @@
|
||||||
<div class='value'>{{post_count}}</div>
|
<div class='value'>{{post_count}}</div>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
{{#if can_delete_all_posts}}
|
{{#if can_delete_all_posts}}
|
||||||
|
{{#if post_count}}
|
||||||
<button class='btn btn-danger' {{action "deleteAllPosts" target="content"}}>
|
<button class='btn btn-danger' {{action "deleteAllPosts" target="content"}}>
|
||||||
<i class='fa fa-trash-o'></i>
|
<i class='fa fa-trash-o'></i>
|
||||||
{{i18n 'admin.user.delete_all_posts'}}
|
{{i18n 'admin.user.delete_all_posts'}}
|
||||||
</button>
|
</button>
|
||||||
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{deleteAllPostsExplanation}}
|
{{deleteAllPostsExplanation}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Reference in New Issue