diff --git a/com/templates/com/news_admin_list.jinja b/com/templates/com/news_admin_list.jinja index 7db75800..f7800e74 100644 --- a/com/templates/com/news_admin_list.jinja +++ b/com/templates/com/news_admin_list.jinja @@ -7,7 +7,155 @@ {% block content %}
{% trans %}Type{% endtrans %} | +{% trans %}Title{% endtrans %} | +{% trans %}Summary{% endtrans %} | +{% trans %}Club{% endtrans %} | +{% trans %}Author{% endtrans %} | +{% trans %}Moderator{% endtrans %} | +{% trans %}Actions{% endtrans %} | +
{{ news.get_type_display() }} | +{{ news.title }} | +{{ news.summary|markdown }} | +{{ news.club }} | +{{ user_profile_link(news.author) }} | +{{ user_profile_link(news.moderator) }} | +{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Remove{% endtrans %} | +
{% trans %}Type{% endtrans %} | +{% trans %}Title{% endtrans %} | +{% trans %}Summary{% endtrans %} | +{% trans %}Club{% endtrans %} | +{% trans %}Author{% endtrans %} | +{% trans %}Actions{% endtrans %} | +
{{ news.get_type_display() }} | +{{ news.title }} | +{{ news.summary|markdown }} | +{{ news.club }} | +{{ user_profile_link(news.author) }} | +{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Moderate{% endtrans %} | +
{% trans %}Type{% endtrans %} | +{% trans %}Title{% endtrans %} | +{% trans %}Summary{% endtrans %} | +{% trans %}Club{% endtrans %} | +{% trans %}Author{% endtrans %} | +{% trans %}Moderator{% endtrans %} | +{% trans %}Dates{% endtrans %} | +{% trans %}Actions{% endtrans %} | +
{{ news.get_type_display() }} | +{{ news.title }} | +{{ news.summary|markdown }} | +{{ news.club }} | +{{ user_profile_link(news.author) }} | +{{ user_profile_link(news.moderator) }} | +
+
|
+ {% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Remove{% endtrans %} | +
{% trans %}Type{% endtrans %} | +{% trans %}Title{% endtrans %} | +{% trans %}Summary{% endtrans %} | +{% trans %}Club{% endtrans %} | +{% trans %}Author{% endtrans %} | +{% trans %}Dates{% endtrans %} | +{% trans %}Actions{% endtrans %} | +
{{ news.get_type_display() }} | +{{ news.title }} | +{{ news.summary|markdown }} | +{{ news.club }} | +{{ user_profile_link(news.author) }} | +
+
|
+ {% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Moderate{% endtrans %} | +
{{ news.get_type_display() }} | {{ news.title }} | @@ -42,7 +190,7 @@ {% endfor %}
{{ news.get_type_display() }} | +{{ news.title }} | +{{ news.summary|markdown }} | +{{ news.club }} | +{{ user_profile_link(news.author) }} | +{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} | +{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} | +{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Moderate{% endtrans %} | +
{% trans %}Type{% endtrans %} | +{% trans %}Title{% endtrans %} | +{% trans %}Summary{% endtrans %} | +{% trans %}Club{% endtrans %} | +{% trans %}Author{% endtrans %} | +{% trans %}Moderator{% endtrans %} | +{% trans %}Start{% endtrans %} | +{% trans %}End{% endtrans %} | +{% trans %}Actions{% endtrans %} | +
{{ news.get_type_display() }} | +{{ news.title }} | +{{ news.summary|markdown }} | +{{ news.club }} | +{{ user_profile_link(news.author) }} | +{{ user_profile_link(news.moderator) }} | +{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} | +{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} | +{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Remove{% endtrans %} | +
{% trans %}Type{% endtrans %} | +{% trans %}Title{% endtrans %} | +{% trans %}Summary{% endtrans %} | +{% trans %}Club{% endtrans %} | +{% trans %}Author{% endtrans %} | +{% trans %}Start{% endtrans %} | +{% trans %}End{% endtrans %} | +{% trans %}Actions{% endtrans %} | +
{{ news.get_type_display() }} | {{ news.title }} | diff --git a/com/views.py b/com/views.py index fd676a8d..8f675ef5 100644 --- a/com/views.py +++ b/com/views.py @@ -257,7 +257,7 @@ class NewsModerateView(CanEditMixin, SingleObjectMixin): class NewsAdminListView(CanEditMixin, ListView): model = News template_name = 'com/news_admin_list.jinja' - queryset = News.objects.filter(dates__end_date__gte=timezone.now()).distinct().order_by('id') + queryset = News.objects.all() class NewsListView(CanViewMixin, ListView):