{% load jalali_tags %} {% if show_list %}
{% for item in fields %} {% if item.separator %}
{{ item.separator }}
{% else %}

{{ item.label }}:

{% if item.input_type == "select" and item.options %} {% for val, label, selected in item.options %} {% if selected %} {{ label }} {% endif %} {% endfor %} {% elif item.input_type == "file" %} مشاهده فایل {% elif item.input_type == "textarea" %}
{{ item.value }}
{% elif item.input_type == "date" %}

{{ item.value|to_jalali:'%Y/%m/%d'|default:'' }}

{% elif item.input_type == "datetime" %}

{{ item.value|to_jalali:'%Y/%m/%d %H:%m:%S'|default:'' }}

{% elif item.input_type == "time" %}

{{ item.value|to_jalali:'%H:%m:%S'|default:'' }}

{% else %} {% if item.value and item.value|slice:":4" == "http" %} {{ item.value }} {% else %}

{{ item.value|default:"" }}

{% endif %} {% endif %} {% if instance and instance.errors and item.field_name in instance.errors %}

{{ instance.errors }}

{% endif %}
{% endif %} {% endfor %}
{% else %}
{% csrf_token %}
{% for item in fields %} {% if item.separator %}
{{ item.separator }}
{% elif item.input_type == "hidden" %} {% else %}
{% if item.readonly and item.disabled %}

{{ item.value|default:'' }}

{% elif item.input_type == "select" and item.options %} {% elif item.input_type == "autocomplete" and item.options %}
{% elif item.input_type == "multiselect" and item.options %} {% elif item.input_type == "file" %} {% if item.readonly %} {% if item.value %} مشاهده {% endif %} {% else %} {% endif %} {% elif item.input_type == "textarea" %} {% elif item.input_type == "date" %} {% elif item.input_type == "datetime" %} {% elif item.input_type == "time" %} {% elif item.input_type == "color" %} {% else %} {% endif %} {% if instance and instance.errors and item.field_name in instance.errors %}

{{ instance.errors }}

{% endif %} {% if item.readonly and item.disabled %}

({{ item.placeholder }})

{% else %}

{{ item.placeholder }}

{% endif %}
{% endif %} {% endfor %}
{% if show_update %} {% endif %}
{% if show_duplicate %}
{% csrf_token %}
{% endif %} {% if not trashed and show_add_to_trash %}
{% csrf_token %}
{% endif %} {% if trashed %}
{% csrf_token %}
{% csrf_token %}
{% endif %} {% endif %}