labertasche/templates/manage-comments.html
Domeniko Gentner fdec8f74c8 Projects implementation
* Separated routes into single files for better management
* Added sql for streamlined example data
* Streamlined function names, streamlined template file names
- Removed 2 functions with unnecessary code
* Added javascript for project overview
* New library: tippy.js for tooltips
* Added new configuration options for projects
* Added cookie secure setting to flask
2020-12-16 21:39:01 +01:00

81 lines
4.9 KiB
HTML

{% extends "base.html" %}
{% block main %}
<div style="min-height: 100vh;" class="container bg-deepmatte p-6 brdr-yayellow">
<h1 class="title has-text-white has-text-centered">{{ title }}</h1>
<div class="field">
<form method="GET" action="/dashboard/{{ project }}/manage-{{action}}/">
<div class="control">
<div class="select">
<label for="location">
<select name="location" onchange="this.form.submit();">
<option value="-1">Select the article</option>
{% for each in locations %}
{% if selected is defined %}
{% if selected | string() == each.id_location | string() %}
<option selected="selected" value="{{ each.id_location }}">{{ each.location }}</option>
{% else %}
<option value="{{ each.id_location }}">{{ each.location }}</option>
{% endif %}
{% else %}
<option value="{{ each.id_location }}">{{ each.location }}</option>
{% endif %}
{% endfor %}
</select>
</label>
</div>
</div>
</form>
</div>
<div>
{% if spam_comments is defined %}
{% for comment in spam_comments %}
<article>
<div class="media mb-5 brdr-yayellow my-shadow-subtle bg-compliment">
<figure class="media-left ml-0 mb-0">
<p class="image is-128x128">
<img alt="gravatar portrait" src="https://gravatar.com/avatar/{{comment.gravatar}}?size=128">
</p>
</figure>
<div class="media-content">
<div class="content mr-5 mt-2">
<a title="comment ID" id="comment_{{comment.comments_id}}" href="#comment_{{comment.comments_id}}">#{{comment.comments_id}}</a>
Posted by <span class="fg-yellow">{{comment.email}}</span>
on <small class="fg-yellow">{{comment.created_on}}</small>
spam score: <span title="The higher this is, the less likely it is spam" class="fg-yellow">{{ comment.spam_score }}</span>
<br><br>
<span class="mt-5">
{{comment.content}}
</span>
</div>
<nav class="level is-mobile">
<a title="Delete this comment"
class="level-item"
href="/api/comment-delete/{{ comment.comments_id }}?location={{ selected }}">
<span class="icon is-medium"><i class="mdi mdi-24px mdi-trash-can"></i></span>
</a>
<a title="Delete comment and block mail address"
class="level-item"
href="/api/comment-block-mail/{{ comment.comments_id }}?location={{ selected }}">
<span class="icon is-medium"><i class="mdi mdi-24px mdi-shield-lock"></i></span>
</a>
<a title="Publish this comment, don't allow mail"
class="level-item"
href="/api/comment-allow/{{ comment.comments_id }}?location={{ selected }}">
<span class="icon is-medium"><i class="mdi mdi-24px mdi-check"></i></span>
</a>
<a title="Allow email to bypass spam detection and allow comment"
class="level-item"
href="/api/comment-allow-user/{{ comment.comments_id }}?location={{ selected }}">
<span class="icon is-medium"><i class="mdi mdi-24px mdi-check-all"></i></span>
</a>
</nav>
</div>
</div>
</article>
{% endfor %}
{% endif %}
</div>
</div>
{% endblock %}