2021-01-29 20:38:14 +01:00
|
|
|
{% extends "todo/todo_base.html" %}
|
2018-03-21 20:24:45 +01:00
|
|
|
|
|
|
|
{% block title %}
|
2021-01-29 20:38:14 +01:00
|
|
|
{{ _("Editor Work Queue") }}
|
2018-03-21 20:24:45 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-01-08 00:27:00 +01:00
|
|
|
<h2 class="mb-4">{{ _("Approval Queue") }}</h2>
|
2020-12-04 00:36:24 +01:00
|
|
|
{% if canApproveScn and screenshots %}
|
|
|
|
<div class="card my-4">
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3 class="card-header">{{ _("Screenshots") }}
|
2021-01-29 20:38:14 +01:00
|
|
|
<form class="float-right" method="post" action="{{ url_for('todo.view_editor') }}">
|
2020-12-04 00:36:24 +01:00
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="hidden" name="action" value="screenshots_approve_all" />
|
2022-01-08 00:27:00 +01:00
|
|
|
<input class="btn btn-sm btn-primary" type="submit" value="{{ _('Approve All') }}" />
|
2020-12-04 00:36:24 +01:00
|
|
|
</form>
|
|
|
|
</h3>
|
|
|
|
<ul class="card-body d-flex p-0 flex-row flex-wrap justify-content-start align-content-start p-4">
|
|
|
|
{% for s in screenshots %}
|
2021-07-28 02:53:33 +02:00
|
|
|
<li class="packagetile flex-fill"><a href="{{ s.getEditURL() }}"
|
2021-01-30 15:57:38 +01:00
|
|
|
style="background-image: url({{ s.getThumbnailURL(3) }});">
|
2020-12-04 00:36:24 +01:00
|
|
|
<div class="packagegridscrub"></div>
|
|
|
|
<div class="packagegridinfo">
|
|
|
|
<h3>
|
|
|
|
{{ s.title }}
|
|
|
|
<br />
|
|
|
|
<small>{{ s.package.title }} by {{ s.package.author.display_name }}</small>
|
|
|
|
</h3>
|
|
|
|
<p></p>
|
|
|
|
</div>
|
|
|
|
</a></li>
|
|
|
|
{% else %}
|
2022-01-20 02:18:10 +01:00
|
|
|
<li><i>{{ _("No screenshots need approval.") }}</i></li>
|
2020-12-04 00:36:24 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% for i in range(4) %}
|
|
|
|
<li class="packagetile flex-fill"></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-06-02 20:41:13 +02:00
|
|
|
|
2019-03-29 21:32:13 +01:00
|
|
|
<div class="row">
|
2020-09-16 18:51:03 +02:00
|
|
|
{% if canApproveNew and (packages or wip_packages) %}
|
2019-03-29 21:32:13 +01:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="card">
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3 class="card-header">{{ _("Packages") }}</h3>
|
2019-03-29 21:32:13 +01:00
|
|
|
<div class="list-group list-group-flush">
|
|
|
|
{% for p in packages %}
|
2021-07-24 05:30:14 +02:00
|
|
|
<a href="{{ p.getURL("packages.view") }}" class="list-group-item list-group-item-action">
|
2020-12-04 04:59:02 +01:00
|
|
|
<span class="float-right" title="Created {{ p.created_at | datetime }}">
|
|
|
|
<small>
|
|
|
|
{{ p.created_at | timedelta }} ago
|
|
|
|
</small>
|
|
|
|
</span>
|
|
|
|
|
2020-09-16 18:51:03 +02:00
|
|
|
{% if "Other" in p.license.name or "Other" in p.media_license.name %}
|
|
|
|
<span class="mr-2 badge badge-info">License</span>
|
|
|
|
{% else %}
|
2019-03-30 16:41:38 +01:00
|
|
|
<span class="mr-2 badge badge-success">Ready</span>
|
|
|
|
{% endif %}
|
|
|
|
|
2019-03-29 21:32:13 +01:00
|
|
|
{{ p.title }} by {{ p.author.display_name }}
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2022-01-20 02:18:10 +01:00
|
|
|
<li class="list-group-item"><i>{{ _("No packages need approval.") }}</i></li>
|
2019-03-29 21:32:13 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-03-21 20:24:45 +01:00
|
|
|
|
2019-03-29 21:32:13 +01:00
|
|
|
{% if canApproveRel and releases %}
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="card">
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3 class="card-header">{{ _("Releases") }}</h3>
|
2020-12-04 04:59:02 +01:00
|
|
|
<ul class="list-group list-group-flush" style="max-height: 500px; overflow: hidden auto;">
|
2019-03-29 21:32:13 +01:00
|
|
|
{% for r in releases %}
|
|
|
|
<li class="list-group-item">
|
2019-11-15 00:38:55 +01:00
|
|
|
{% if r.task_id %}
|
2022-01-08 00:27:00 +01:00
|
|
|
<span class="mr-2 badge badge-warning">{{ _("Importing") }}</span>
|
2019-11-15 00:38:55 +01:00
|
|
|
{% endif %}
|
2019-03-29 21:32:13 +01:00
|
|
|
<a href="{{ r.getEditURL() }}">{{ r.title }}</a>
|
|
|
|
on
|
2021-07-24 05:30:14 +02:00
|
|
|
<a href="{{ r.package.getURL("packages.view") }}">
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("%(title)s by %(display_name)s",
|
|
|
|
title=r.package.title, display_name=r.package.author.display_name) }}
|
2019-03-29 21:32:13 +01:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
2022-01-20 02:18:10 +01:00
|
|
|
<li class="list-group-item"><i>{{ _("No releases need approval.") }}</i></li>
|
2019-03-29 21:32:13 +01:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2018-05-25 20:06:05 +02:00
|
|
|
|
2018-06-02 20:41:13 +02:00
|
|
|
{% if not (packages or screenshots or releases) %}
|
|
|
|
<p>
|
2022-01-08 00:27:00 +01:00
|
|
|
<i>{{ _("All done!") }}</i>
|
2018-06-02 20:41:13 +02:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|
2021-08-12 19:57:25 +02:00
|
|
|
{% if license_needed %}
|
2022-01-08 00:27:00 +01:00
|
|
|
<h2 class="mt-5">{{ _("License Needed") }}</h2>
|
2021-08-12 19:57:25 +02:00
|
|
|
<div class="card">
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3 class="card-header">{{ _("License Needed") }}</h3>
|
2021-08-12 19:57:25 +02:00
|
|
|
<div class="list-group list-group-flush">
|
|
|
|
{% for p in license_needed %}
|
|
|
|
<a href="{{ p.getURL("packages.view") }}" class="list-group-item list-group-item-action">
|
|
|
|
<span class="float-right" title="Created {{ p.created_at | datetime }}">
|
|
|
|
<small>
|
|
|
|
{{ p.created_at | timedelta }} ago
|
|
|
|
</small>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="mr-2 badge badge-{{ p.state.color }}">{{ p.state.value }}</span>
|
|
|
|
|
|
|
|
{{ p.title }} by {{ p.author.display_name }}
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-02-13 10:53:12 +01:00
|
|
|
{% if total_to_tag != 0 %}
|
|
|
|
<h2 class="mt-5">{{ _("Tag Packages") }}</h2>
|
2020-07-15 01:21:20 +02:00
|
|
|
|
2022-02-13 10:53:12 +01:00
|
|
|
<p>
|
|
|
|
{{ _("%(total_to_tag)d / %(total_packages)d packages don't have any tags.",
|
|
|
|
total_to_tag=total_to_tag, total_packages=total_packages) }}
|
|
|
|
</p>
|
2020-07-15 01:21:20 +02:00
|
|
|
|
2022-02-13 10:53:12 +01:00
|
|
|
<div class="progress my-4">
|
|
|
|
{% set perc = 100 * (total_packages - total_to_tag) / total_packages %}
|
|
|
|
<div class="progress-bar bg-success" role="progressbar"
|
|
|
|
style="width: {{ perc }}%" aria-valuenow="{{ perc }}" aria-valuemin="0" aria-valuemax="100"></div>
|
|
|
|
</div>
|
2020-07-15 01:21:20 +02:00
|
|
|
|
2022-02-13 10:53:12 +01:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('todo.tags') }}">{{ _("View Tags") }}</a>
|
|
|
|
{% endif %}
|
2020-07-15 01:21:20 +02:00
|
|
|
|
2020-08-18 18:28:42 +02:00
|
|
|
{% if unfulfilled_meta_packages %}
|
|
|
|
<h2 class="mt-5">
|
|
|
|
<span class="fas fa-exclamation-triangle pr-2" style="color: orange;"></span>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ unfulfilled_meta_packages }}
|
|
|
|
{{ _("Unfulfilled Dependencies") }}
|
2020-08-18 18:28:42 +02:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<p>
|
2022-09-01 23:45:53 +02:00
|
|
|
{{ _("Mod names that have hard dependers, but no packages providing them.") }}
|
2020-08-18 18:28:42 +02:00
|
|
|
</p>
|
|
|
|
|
2022-09-01 23:45:53 +02:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('todo.modnames') }}">
|
2022-01-14 19:25:28 +01:00
|
|
|
{{ _("View") }}
|
|
|
|
</a>
|
2020-08-18 18:28:42 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
<h2 class="mt-5">{{ _("WIP") }}</h2>
|
2021-01-29 20:38:14 +01:00
|
|
|
|
|
|
|
{% if canApproveNew and (packages or wip_packages) %}
|
|
|
|
<div class="card">
|
|
|
|
<h3 class="card-header">WIP Packages</h3>
|
|
|
|
<div class="list-group list-group-flush" style="max-height: 300px; overflow: hidden auto;">
|
|
|
|
{% for p in wip_packages %}
|
2021-07-24 05:30:14 +02:00
|
|
|
<a href="{{ p.getURL("packages.view") }}" class="list-group-item list-group-item-action">
|
2021-01-29 20:38:14 +01:00
|
|
|
<span class="float-right" title="Created {{ p.created_at | datetime }}">
|
|
|
|
<small>
|
|
|
|
{{ p.created_at | timedelta }} ago
|
|
|
|
</small>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
{% if p.state == p.state.WIP %}
|
2022-01-08 00:27:00 +01:00
|
|
|
<span class="mr-2 badge badge-warning">{{ _("WIP") }}</span>
|
2021-01-29 20:38:14 +01:00
|
|
|
{% else %}
|
|
|
|
<span class="mr-2 badge badge-danger">{{ p.state.value }}</span>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ p.title }} by {{ p.author.display_name }}
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2022-01-20 02:18:10 +01:00
|
|
|
<li class="list-group-item"><i>{{ _("No packages need approval.") }}</i></li>
|
2021-01-29 20:38:14 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-02-14 02:19:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
<div class="mt-5"></div>
|
|
|
|
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) %}
|
|
|
|
<a class="btn btn-secondary float-right" href="{{ url_for('admin.audit') }}">
|
|
|
|
{{ _("View All") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
<h2>{{ _("Recent Actions") }}</h2>
|
|
|
|
|
|
|
|
{% from "macros/audit_log.html" import render_audit_log %}
|
|
|
|
{{ render_audit_log(audit_log, current_user) }}
|
|
|
|
|
2018-03-21 20:24:45 +01:00
|
|
|
{% endblock %}
|