{% extends "layouts/admin.twig" %} {% block title %}{{ ta.content_editor|default('Content editor') }} - {{ ta.admin_title|default('CodePress Admin') }}{% endblock %} {# Recursively render the content file tree as a nested, collapsible list. #} {% macro tree(nodes, relFile, editableExts, csrfToken) %} {% import _self as macros %} {% endmacro %} {% import _self as tree_macros %} {% block extra_css %} {% endblock %} {% block content %}

{{ ta.content_editor|default('Content editor') }}

{# Fase 5: backup/git integratie in zijbalk header #} {% if gitStatus.available %} {{ ta.backup|default('Backup') }} {% if gitStatus.dirty %}
{% endif %} {% else %}
{{ ta.backup|default('Backup') }} {% endif %} {{ ta.list_view|default('Lijst weergave') }}
{# Fase 5: git status badge bovenaan #} {% if gitStatus.available %}
{{ gitStatus.branch|default('git') }} {% if gitStatus.dirty %} {{ ta.git_dirty|default('niet-committed wijzigingen') }} {% else %} {{ ta.git_clean|default('schone werkmap') }} {% endif %} {% if gitStatus.lastCommit %}{{ ta.git_last_commit|default('laatste commit:') }} {{ gitStatus.lastCommit }}{% endif %}
{% endif %} {# Upload form (collapsed by default) #}
{{ ta.content_upload_help|default('Bestanden worden geüpload naar content/. Toegestaan: afbeeldingen, video, audio, PDF, ZIP, office docs, CSS, SCSS, JS, JSON, HTML, MD.') }}
{# File tree sidebar #}
{{ ta.content_files|default('Content bestanden') }}
{% if files is empty %}
{{ ta.content_no_files|default('Geen bestanden gevonden.') }}
{% else %} {{ tree_macros.tree(files, relFile, editableExts, csrf_token) }} {% endif %}
{# Editor main panel #}
{% if relFile %} {% endif %} {% if isEditable %}
{# Metadata row: filename display, layout selector, plugins #}

{{ fileName }}

{% if fileExt == 'md' %}
{% if availablePlugins is not empty %}
{% for plugin in availablePlugins %} {% endfor %}
{% endif %} {% endif %}
{% if currentAuthorName or currentAuthorEmail or currentCreated %}
{% endif %}
{% else %}
{% if relFile %} {{ ta.content_not_editable|default('Dit bestandstype kan niet in de editor bewerkt worden.') }} {% else %} {{ ta.content_select_file|default('Selecteer een bestand uit de zijbalk om te bewerken.') }} {% endif %}
{% endif %}
{# New file modal #} {# New directory modal #} {% endblock %} {% block extra_js %} {% endblock %}