add: purge/restore post api
This commit is contained in:
parent
81307752c2
commit
dd4f8b6d58
6 changed files with 102 additions and 4 deletions
|
@ -382,6 +382,7 @@ and show_community and community.id != config.town_square or question %}
|
|||
>
|
||||
</a>
|
||||
|
||||
{% if not post.is_deleted %}
|
||||
<button
|
||||
class="red"
|
||||
onclick="trigger('me::remove_post', ['{{ post.id }}'])"
|
||||
|
@ -389,7 +390,23 @@ and show_community and community.id != config.town_square or question %}
|
|||
{{ icon "trash" }}
|
||||
<span>{{ text "general:action.delete" }}</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %} {% if is_helper and post.is_deleted %}
|
||||
<button
|
||||
class="red"
|
||||
onclick="trigger('me::purge_post', ['{{ post.id }}'])"
|
||||
>
|
||||
{{ icon "trash-2" }}
|
||||
<span>{{ text "general:action.purge" }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="green"
|
||||
onclick="trigger('me::restore_post', ['{{ post.id }}'])"
|
||||
>
|
||||
{{ icon "undo" }}
|
||||
<span>{{ text "general:action.restore" }}</span>
|
||||
</button>
|
||||
{% endif %} {% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue