mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Add created_at to approval queue list
This commit is contained in:
parent
14f643592c
commit
af8d8c330d
@ -2,6 +2,7 @@ from . import app
|
||||
from .models import Permission, Package, PackageState, PackageRelease
|
||||
from .utils import abs_url_for, url_set_query
|
||||
from flask_user import current_user
|
||||
from flask_babel import format_timedelta
|
||||
from urllib.parse import urlparse
|
||||
|
||||
@app.context_processor
|
||||
@ -37,3 +38,7 @@ def date(value):
|
||||
@app.template_filter()
|
||||
def datetime(value):
|
||||
return value.strftime("%Y-%m-%d %H:%M") + " UTC"
|
||||
|
||||
@app.template_filter()
|
||||
def timedelta(value):
|
||||
return format_timedelta(value)
|
||||
|
@ -47,6 +47,12 @@
|
||||
<div class="list-group list-group-flush">
|
||||
{% for p in packages %}
|
||||
<a href="{{ p.getDetailsURL() }}" 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>
|
||||
|
||||
{% if "Other" in p.license.name or "Other" in p.media_license.name %}
|
||||
<span class="mr-2 badge badge-info">License</span>
|
||||
{% else %}
|
||||
@ -54,6 +60,8 @@
|
||||
{% endif %}
|
||||
|
||||
{{ p.title }} by {{ p.author.display_name }}
|
||||
|
||||
|
||||
</a>
|
||||
{% else %}
|
||||
<li class="list-group-item"><i>No packages need reviewing.</i></li>
|
||||
@ -63,9 +71,15 @@
|
||||
|
||||
<div class="card mt-5">
|
||||
<h3 class="card-header">WIP Packages</h3>
|
||||
<div class="list-group list-group-flush">
|
||||
<div class="list-group list-group-flush" style="max-height: 300px; overflow: hidden auto;">
|
||||
{% for p in wip_packages %}
|
||||
<a href="{{ p.getDetailsURL() }}" 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>
|
||||
|
||||
{% if p.state == p.state.WIP %}
|
||||
<span class="mr-2 badge badge-warning">WIP</span>
|
||||
{% else %}
|
||||
@ -86,7 +100,7 @@
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<h3 class="card-header">Releases</h3>
|
||||
<ul class="list-group list-group-flush">
|
||||
<ul class="list-group list-group-flush" style="max-height: 500px; overflow: hidden auto;">
|
||||
{% for r in releases %}
|
||||
<li class="list-group-item">
|
||||
{% if r.task_id %}
|
||||
|
Loading…
Reference in New Issue
Block a user