mostly implement topics app
This commit is contained in:
@ -7,6 +7,12 @@
|
||||
<span>{{topic['description']}}</span>
|
||||
<div>
|
||||
{% if active_user and active_user.is_mod() %}
|
||||
<a class="linkbutton" href="{{url_for("topics.edit", slug=topic['slug'])}}">Edit topic</a>
|
||||
<form class="modform" method="post" action="{{url_for("topics.edit", slug=topic['slug']) }}">
|
||||
<input type="hidden" name="is_locked" value="{{ (not topic.is_locked) | int }}">
|
||||
<input class="warn" type="submit" id="lock" value="{{"Unlock topic" if topic['is_locked'] else "Lock topic"}}">
|
||||
</form>
|
||||
<button type="button" class="critical" id="topic-delete-dialog-open">Delete</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
@ -52,4 +58,17 @@
|
||||
<nav id="bottomnav">
|
||||
{{ pager(current_page = current_page, page_count = page_count) }}
|
||||
</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("topics.delete", slug = topic.slug) }}"></form>
|
||||
</span>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<script src="/static/js/topic.js"></script>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user