fix(admin): DE/EN chips in article list link to live article, not edit

Live chips now open the article in a new tab. Draft/scheduled chips are
non-clickable spans (informational only). The Edit button is the sole
path to the edit page, removing the redundant double-link.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-28 21:52:23 +01:00
parent 34065fa2ac
commit 81ec8733c7

View File

@@ -6,15 +6,19 @@
<td> <td>
{% for v in g.variants %} {% for v in g.variants %}
<div class="variant-row"> <div class="variant-row">
<a href="{{ url_for('admin.article_edit', article_id=v.id) }}" {% if v.display_status == 'live' %}
<a href="/{{ v.language or 'en' }}{{ v.url_path }}" target="_blank"
class="lang-chip lang-chip-{{ v.display_status }}" class="lang-chip lang-chip-{{ v.display_status }}"
title="Edit {{ v.language|upper }} variant"> title="View live {{ v.language|upper }} article">
<span class="dot"></span>{{ v.language | upper }} <span class="dot"></span>{{ v.language | upper }}
{% if v.noindex %}<span class="noindex-tag">noindex</span>{% endif %} {% if v.noindex %}<span class="noindex-tag">noindex</span>{% endif %}
</a> </a>
{% if v.display_status == 'live' %} {% else %}
<a href="/{{ v.language or 'en' }}{{ v.url_path }}" target="_blank" <span class="lang-chip lang-chip-{{ v.display_status }}"
class="btn-outline btn-sm view-lang-btn" title="View live article">View ↗</a> title="{{ v.display_status | capitalize }}">
<span class="dot"></span>{{ v.language | upper }}
{% if v.noindex %}<span class="noindex-tag">noindex</span>{% endif %}
</span>
{% endif %} {% endif %}
<a href="{{ url_for('admin.article_edit', article_id=v.id) }}" <a href="{{ url_for('admin.article_edit', article_id=v.id) }}"
class="btn-outline btn-sm view-lang-btn">Edit</a> class="btn-outline btn-sm view-lang-btn">Edit</a>