diff --git a/app/template_filters.py b/app/template_filters.py index 6f31ea05..93b72038 100644 --- a/app/template_filters.py +++ b/app/template_filters.py @@ -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) diff --git a/app/templates/todo/list.html b/app/templates/todo/list.html index 0b1b4cec..5c545e98 100644 --- a/app/templates/todo/list.html +++ b/app/templates/todo/list.html @@ -47,6 +47,12 @@
{% for p in packages %} + + + {{ p.created_at | timedelta }} ago + + + {% if "Other" in p.license.name or "Other" in p.media_license.name %} License {% else %} @@ -54,6 +60,8 @@ {% endif %} {{ p.title }} by {{ p.author.display_name }} + + {% else %}
  • No packages need reviewing.
  • @@ -63,9 +71,15 @@

    WIP Packages

    -