fix: use table_header_custom for custom headers in subscription pages

The table_header() macro doesn't support caller() - it takes a columns list.
Using {% call table_header() %} caused a Jinja2 error:
  "macro 'table_header' was invoked with two values for the special caller argument"

Changes:
- Add table_header_custom() macro that supports caller() for custom headers
- Update subscriptions.html, subscription-tiers.html, billing-history.html
- Add TPL-008 architecture rule to detect this pattern
- Renumber TPL-009 (block names) and TPL-010 (Alpine vars)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-25 22:25:33 +01:00
parent e21abd4c32
commit 6bd4b71588
6 changed files with 103 additions and 15 deletions

View File

@@ -48,6 +48,27 @@
{% endmacro %}
{#
Custom Table Header
===================
Renders a table header with custom content via caller().
Use this when you need th_sortable or custom th elements.
Usage:
{% call table_header_custom() %}
{{ th_sortable('name', 'Name', 'sortBy', 'sortOrder') }}
<th class="px-4 py-3">Actions</th>
{% endcall %}
#}
{% macro table_header_custom() %}
<thead>
<tr class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800">
{{ caller() }}
</tr>
</thead>
{% endmacro %}
{#
Sortable Table Header
=====================