2023-01-13 08:23:57 -05:00
|
|
|
{% load helpers %}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% if customfield.type == 'integer' and value is not None %}
|
2022-07-01 14:45:22 -04:00
|
|
|
{{ value }}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'longtext' and value %}
|
2022-07-01 14:45:22 -04:00
|
|
|
{{ value|markdown }}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'boolean' and value == True %}
|
2022-07-01 14:45:22 -04:00
|
|
|
{% checkmark value true="True" %}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'boolean' and value == False %}
|
2022-07-01 14:45:22 -04:00
|
|
|
{% checkmark value false="False" %}
|
2023-01-13 08:23:57 -05:00
|
|
|
{% elif customfield.type == 'date' and value %}
|
|
|
|
{{ value|annotated_date }}
|
2023-02-28 13:33:40 -05:00
|
|
|
{% elif customfield.type == 'datetime' and value %}
|
|
|
|
{{ value|annotated_date }}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'url' and value %}
|
2022-07-01 14:45:22 -04:00
|
|
|
<a href="{{ value }}">{{ value|truncatechars:70 }}</a>
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'json' and value %}
|
2022-07-01 14:45:22 -04:00
|
|
|
<pre>{{ value|json }}</pre>
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'multiselect' and value %}
|
2022-07-01 14:45:22 -04:00
|
|
|
{{ value|join:", " }}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'object' and value %}
|
2022-07-01 14:45:22 -04:00
|
|
|
{{ value|linkify }}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.type == 'multiobject' and value %}
|
2022-07-01 14:45:22 -04:00
|
|
|
{% for object in value %}
|
|
|
|
{{ object|linkify }}{% if not forloop.last %}<br />{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% elif value %}
|
|
|
|
{{ value }}
|
2022-07-26 11:09:51 -04:00
|
|
|
{% elif customfield.required %}
|
2022-07-01 14:45:22 -04:00
|
|
|
<span class="text-warning"><i class="mdi mdi-alert"></i> Not defined</span>
|
|
|
|
{% else %}
|
|
|
|
{{ ''|placeholder }}
|
|
|
|
{% endif %}
|