allow mods to delete topics
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
<input type="hidden" name="is_locked" value="<%= not is_locked %>">
|
||||
<input class="warn" type="submit" id="lock" value="<%= is_locked and "Unlock topic" or "Lock topic" %>">
|
||||
</form>
|
||||
<button type="button" class="critical" id="topic-delete-dialog-open">Delete</button>
|
||||
<% end %>
|
||||
</div>
|
||||
</nav>
|
||||
@ -70,3 +71,15 @@
|
||||
<nav id="bottomnav">
|
||||
<% render("views.common.pagination", {page_count = pages, current_page = page}) %>
|
||||
</nav>
|
||||
<dialog id="delete-dialog">
|
||||
<div class=delete-dialog-inner>
|
||||
Are you sure you want to delete this topic?
|
||||
<span>
|
||||
<button id=topic-delete-dialog-close>Cancel</button>
|
||||
<button class="critical" form=topic-delete-form>Delete</button>
|
||||
<form id="topic-delete-form" method="post" action="<%= url_for("topic_delete", {slug = topic.slug}) %>"></form>
|
||||
</span>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<script src="/static/js/topic.js"></script>
|
||||
|
@ -6,6 +6,10 @@
|
||||
<% end %>
|
||||
</nav>
|
||||
|
||||
<% if infobox then %>
|
||||
<% render("views.common.infobox", infobox) %>
|
||||
<% end %>
|
||||
|
||||
<% if #topic_list == 0 then %>
|
||||
<p>There are no topics.</p>
|
||||
<% else %>
|
||||
|
Reference in New Issue
Block a user