feat: improve Wagtail admin editor experience for articles
- Add published_date field to ArticlePage with auto-populate from first_published_at on first publish, plus data migration backfill - Surface go_live_at/expire_at scheduling fields in editor panels - Reorganise ArticlePage editor with TabbedInterface (Content, Metadata, Publishing, SEO tabs) - Add Articles PageListingViewSet to admin menu with custom columns (author, category, published date, status) and category/author filters - Add Articles summary dashboard panel showing drafts, scheduled, and recently published articles - Update all front-end queries and RSS feeds to use published_date - Add 10 unit tests and 4 E2E tests for new admin features Closes #39 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
62
templates/blog/panels/articles_summary.html
Normal file
62
templates/blog/panels/articles_summary.html
Normal file
@@ -0,0 +1,62 @@
|
||||
{% load wagtailadmin_tags %}
|
||||
<section class="nice-padding">
|
||||
<h2 class="visuallyhidden">Articles overview</h2>
|
||||
|
||||
{% if drafts %}
|
||||
<div class="w-mb-4">
|
||||
<h3><svg class="icon icon-doc-empty" aria-hidden="true"><use href="#icon-doc-empty"></use></svg> Drafts</h3>
|
||||
<table class="listing">
|
||||
<tbody>
|
||||
{% for page in drafts %}
|
||||
<tr>
|
||||
<td class="title">
|
||||
<a href="{% url 'wagtailadmin_pages:edit' page.pk %}">{{ page.title }}</a>
|
||||
</td>
|
||||
<td>{{ page.latest_revision_created_at|timesince }} ago</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if scheduled %}
|
||||
<div class="w-mb-4">
|
||||
<h3><svg class="icon icon-time" aria-hidden="true"><use href="#icon-time"></use></svg> Scheduled</h3>
|
||||
<table class="listing">
|
||||
<tbody>
|
||||
{% for page in scheduled %}
|
||||
<tr>
|
||||
<td class="title">
|
||||
<a href="{% url 'wagtailadmin_pages:edit' page.pk %}">{{ page.title }}</a>
|
||||
</td>
|
||||
<td>{{ page.go_live_at|date:"N j, Y H:i" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if recent %}
|
||||
<div class="w-mb-4">
|
||||
<h3><svg class="icon icon-doc-full" aria-hidden="true"><use href="#icon-doc-full"></use></svg> Recently published</h3>
|
||||
<table class="listing">
|
||||
<tbody>
|
||||
{% for page in recent %}
|
||||
<tr>
|
||||
<td class="title">
|
||||
<a href="{% url 'wagtailadmin_pages:edit' page.pk %}">{{ page.title }}</a>
|
||||
</td>
|
||||
<td>{{ page.published_date|timesince }} ago</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not drafts and not scheduled and not recent %}
|
||||
<p>No articles yet. <a href="{% url 'articles:choose_parent' %}">Create one</a>.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
Reference in New Issue
Block a user