Initial commit

This commit is contained in:
2024-08-27 20:33:44 +02:00
commit 1f1832267d
14794 changed files with 1599592 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{% load wagtailadmin_tags %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if value is None %}
{% icon title=value|stringformat:'s' name="help" classname="default" %}
{% elif value %}
{% icon title=value|stringformat:'s' name="success" classname="default w-text-positive-100" %}
{% else %}
{% icon title=value|stringformat:'s' name="error" classname="default w-text-critical-100" %}
{% endif %}
</td>

View File

@@ -0,0 +1,3 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if value is not None %}{{ value }}{% endif %}
</td>

View File

@@ -0,0 +1,21 @@
{% load wagtailadmin_tags %}
<th {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if is_orderable %}
{% if is_ascending %}
<a href="{{ table.base_url }}{% querystring p=None ordering='-'|add:column.sort_key %}" {% if descending_title_text %}title="{{ descending_title_text }}"{% endif %} class="icon icon-arrow-up-after teal label">
{{ column.label }}
</a>
{% elif is_descending %}
<a href="{{ table.base_url }}{% querystring p=None ordering=column.sort_key %}" {% if ascending_title_text %}title="{{ ascending_title_text }}"{% endif %} class="icon icon-arrow-down-after teal label">
{{ column.label }}
</a>
{% else %}
<a href="{{ table.base_url }}{% querystring p=None ordering=column.sort_key %}" {% if ascending_title_text %}title="{{ ascending_title_text }}"{% endif %} class="icon icon-arrow-down-after label">
{{ column.label }}
</a>
{% endif %}
{% else %}
{{ column.label }}
{% endif %}
{% block after_label %}{% endblock %}
</th>

View File

@@ -0,0 +1,4 @@
{% load i18n wagtailadmin_tags %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if value %}{% human_readable_date value %}{% endif %}
</td>

View File

@@ -0,0 +1 @@
<td><a href="{{ download_url }}" class="nolink" download>{{ value }}</a></td>

View File

@@ -0,0 +1,12 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
<ul>
{% for reference in value %}
<li>
{% if edit_url %}
<a href="{{ edit_url }}#content-path-{{ reference.content_path }}">
{% endif %}
{{ reference.describe_source_field }}{% if edit_url %}</a>{% endif %}{% if describe_on_delete %}: {{ reference.describe_on_delete }}{% endif %}
</li>
{% endfor %}
</ul>
</td>

View File

@@ -0,0 +1,9 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if value %}
<ul>
{% for item in value %}
<li>{{ item }}</li>
{% endfor %}
</ul>
{% endif %}
</td>

View File

@@ -0,0 +1,9 @@
{% load wagtailadmin_tags %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if value %}
{% if column.true_label %}{% status column.true_label classname="w-status--primary" %}{% endif %}
{% else %}
{% if column.false_label %}{% status column.false_label classname="w-status--primary" %}{% endif %}
{% endif %}
</td>

View File

@@ -0,0 +1,4 @@
{% load wagtailadmin_tags %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% status value classname=primary|yesno:"w-status--primary," %}
</td>

View File

@@ -0,0 +1,30 @@
{% load wagtailadmin_tags %}
<table{% include "wagtailadmin/shared/attrs.html" with attrs=table.attrs %}>
{% with caption=table.get_caption %}
{% if caption %}
<caption class="w-sr-only">{{ caption }}</caption>
{% endif %}
{% endwith %}
{% if table.has_column_widths %}
{% for column in table.columns.values %}
<col {% if column.width %}width="{{ column.width }}"{% endif %} />
{% endfor %}
{% endif %}
<thead>
<tr {% if table.header_row_classname %}class="{{ table.header_row_classname }}"{% endif %}>
{% for column in table.columns.values %}
{% component column.header %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in table.rows %}
<tr{% include "wagtailadmin/shared/attrs.html" with attrs=row.attrs %}>
{% for cell in row.values %}
{% component cell %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -0,0 +1,29 @@
{% load wagtailadmin_tags %}
<td class="{% if column.classname %}{{ column.classname }} {% endif %}title">
<div class="title-wrapper">
{% fragment as title %}
{% if title_id %}<span id="{{ title_id }}">{{ value }}</span>
{% else %}{{ value }}
{% endif %}
{% endfragment %}
{% block title %}
{% if link_url %}
<a {% include "wagtailadmin/shared/attrs.html" with attrs=link_attrs %}>{{ title }}</a>
{% elif label_id %}
<label for="{{ label_id }}">{{ title }}</label>
{% else %}
{{ title }}
{% endif %}
{% endblock %}
</div>
{% block extra %}
{% if buttons %}
<ul class="actions">
{% block buttons %}
{% include "wagtailadmin/shared/buttons.html" %}
{% endblock %}
</ul>
{% endif %}
{% endblock %}
</td>

View File

@@ -0,0 +1,5 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if display_name %}
{% include "wagtailadmin/shared/user_avatar.html" with user=value username=display_name %}
{% endif %}
</td>