mirror of
https://github.com/ProjectSynthoria/SynthoriaArchive.git
synced 2025-03-12 15:26:56 +02:00
fix uncommon exception in report system
fix html style issue in admin box on user page
This commit is contained in:
parent
e5fe63156d
commit
658eefe42a
2 changed files with 31 additions and 31 deletions
|
@ -104,21 +104,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-left">
|
<div class="col-md-3 text-left">
|
||||||
{% if not user.is_banned %}
|
{% if not user.is_banned %}
|
||||||
{{ ban_form.ban_user(value="Ban User", class="btn btn-danger") }}
|
{{ ban_form.ban_user(value="Ban User", class="btn btn-danger") }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="button" class="btn btn-danger disabled">Already banned</button>
|
<button type="button" class="btn btn-danger disabled">Already banned</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 text-center">
|
<div class="col-md-3 text-center">
|
||||||
{% if not ipbanned %}
|
{% if not ipbanned %}
|
||||||
{{ ban_form.ban_userip(value="Ban User+IP", class="btn btn-danger") }}
|
{{ ban_form.ban_userip(value="Ban User+IP", class="btn btn-danger") }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="button" class="btn btn-danger disabled">Already IP banned</button>
|
<button type="button" class="btn btn-danger disabled">Already IP banned</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 text-right">
|
<div class="col-md-6 text-right">
|
||||||
{% if g.user.is_superadmin %}
|
{% if g.user.is_superadmin %}
|
||||||
{{ ban_form.nuke(value="\U0001F4A3 Nuke Torrents", class="btn btn-danger") }}
|
{{ ban_form.nuke(value="\U0001F4A3 Nuke Torrents", class="btn btn-danger") }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -76,11 +76,11 @@ def view_reports():
|
||||||
report_id = report_action.report.data
|
report_id = report_action.report.data
|
||||||
torrent = models.Torrent.by_id(torrent_id)
|
torrent = models.Torrent.by_id(torrent_id)
|
||||||
report = models.Report.by_id(report_id)
|
report = models.Report.by_id(report_id)
|
||||||
report_user = models.User.by_id(report.user_id)
|
|
||||||
|
|
||||||
if not torrent or not report or report.status != 0:
|
if not torrent or not report or report.status != 0:
|
||||||
flask.abort(404)
|
flask.abort(404)
|
||||||
else:
|
|
||||||
|
report_user = models.User.by_id(report.user_id)
|
||||||
log = 'Report #{}: {} [#{}]({}), reported by [{}]({})'
|
log = 'Report #{}: {} [#{}]({}), reported by [{}]({})'
|
||||||
if action == 'delete':
|
if action == 'delete':
|
||||||
torrent.deleted = True
|
torrent.deleted = True
|
||||||
|
|
Loading…
Add table
Reference in a new issue