{% extends 'base.html' %} {% block body %} {% embed 'view-edit.html' %} {% block createnew %}
{# CUSTOM ID #} {# TITLE #}

{% if Entity.entityData.custom_id %} {{ Entity.entityData.custom_id }} {% endif %} {{ Entity.entityData.title }}

{% include 'create-new.html' %}
{% endblock %} {% block createmodal %} {% include 'show-view-edit.html' %} {% endblock %} {% endembed %} {# show message if it was recently modified #} {% set lastchangeDiff = 'now'|date('U') - Entity.entityData.modified_at|date('U') %} {% if (lastchangeDiff < 600) and not Entity.entityData.lastchangeby is null and Entity.entityData.lastchangeby != Entity.Users.userData.userid %} {{ 'Warning: this entry was modified %s seconds ago by %s.'|trans|format(lastchangeDiff, lastModifierFullname)|msg('warning', false) }} {% endif %} {# Exclusive edit mode notification #}
{% if Entity.ExclusiveEditMode.isActive %} {% set writeLockNotice = 'You opened this entry in exclusive edit mode at %s and it will stay active until %s, unless deactivated manually in view mode.'|trans|format( Entity.ExclusiveEditMode.dataArr.locked_at, Entity.ExclusiveEditMode.dataArr.locked_until, )|msg('warning', false) %} {{ writeLockNotice|raw }} {% endif %}
{% include('view-edit-toolbar.html') %} {% include('remove-exclusive-edit-mode-modal.html') %}
{# DATE and RATING #}
{% if Entity.entityType.value != 'experiments_templates' %}
{# the input expects date in YYYY-MM-DD format, and it will be displayed according to the browser's locale #}
{% endif %} {# RATING #}
{% for i in range(5, 1) %} {% endfor %}
{# ID + CUSTOM ID #}
{# CATEGORY / STATUS #} {% include('catstat-edit.html') %} {# TAGS #} {% include('edit-tags.html') %} {# PERMISSIONS #}
{% if Entity.entityData.canread_target %}
{{ 'Permissions for the template'|trans }}
{% endif %} {% include('edit-permissions.html') %} {# templates also have a read/write target #} {% if Entity.entityData.canread_target %} {# TARGET PERMISSIONS #}
{{ 'Permissions for the derived experiment'|trans }}
{# CANREAD #} {% set rw = 'canread_target' %} {% set can = Entity.entityData.canread_target|canToHuman %} {% include('view-permissions.html') %}
{# CANWRITE #} {% set rw = 'canwrite_target' %} {% set can = Entity.entityData.canwrite_target|canToHuman %} {% include('view-permissions.html') %}

{% endif %} {# BODY #}

{{ 'Main text'|trans }}

{# Display main text switch #}
{# << this div is important around the textarea to fix an issue on mobile editor. See #3107 #} {# tinymce or markdown? #} {% if Entity.entityData.content_type == '2' %} {% else %} {# do not display body if set in metadata, done via css to avoid delayed disappearance after JS is executed #} {% if App.Config.configArr.debug -%} {%- endif %} {% endif %}
{# LAST SAVED #}
{{ 'Last saved:'|trans }}
{# SWITCH EDITOR #}

{# EXTRA FIELDS #}

{{ 'Extra fields'|trans }}

{# this div is filled in JS by Metadata.class.ts edit() #}

{% include 'steps-links-edit.html' %} {% include 'uploads.html' %} {% include 'json-editor.html' %}
{# DOODLE #} {# id for the i is needed by the annotate-image action #}
{% endblock body %}