feat(gpx-manager): list unpublished trips too, newest-first
Owner-only page, so drop the .published() filter and order by header.date_start desc so the current/next trip is on top. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
This commit is contained in:
@@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% set trips_page = grav.pages.find('/trips') %}
|
{% set trips_page = grav.pages.find('/trips') %}
|
||||||
{% set trips = trips_page ? trips_page.children.published() : [] %}
|
{# Owner-only page (admin login), so show unpublished trips too — no .published()
|
||||||
|
filter — and order newest first by trip start date so the current/next trip is
|
||||||
|
at the top. #}
|
||||||
|
{% set trips = trips_page ? trips_page.children.order('header.date_start', 'desc') : [] %}
|
||||||
|
|
||||||
<div class="gpx-manager">
|
<div class="gpx-manager">
|
||||||
<h1 class="gpx-manager__title">GPX Files</h1>
|
<h1 class="gpx-manager__title">GPX Files</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user