{% extends "freeform/_layouts/main" %} {% hook "freeform.prepareCpTemplate" %} {% set selectedSubnavItem = "notifications" %} {% block actionButton %} {% if currentUser.can("freeform-notificationsManage") %}
{{ "New Email Template"|t('freeform') }}
{% endif %} {% endblock %} {% set title = "Email Notifications"|t('freeform') %} {% set content %}

{{ "Database Entry Templates"|t('freeform') }}

{% if notifications|length %} {# Database based templates #} {% for notification in notifications if not notification.fileBasedTemplate %} {% endfor %}
{{ "Name"|t('freeform') }} {{ "Handle"|t('freeform') }} {{ "Description"|t('freeform') }}
{% if currentUser.can("freeform-notificationsManage") %} {{ notification.name }} {% else %} {{ notification.name }} {% endif %} {{ notification.handle }} {{ notification.description }} {% if currentUser.can("freeform-notificationsManage") %} {% endif %}
{% endif %} {% set hasFileTemplates = false %} {% for notification in notifications if notification.fileBasedTemplate %} {% set hasFileTemplates = true %} {% endfor %} {% if hasFileTemplates %}

{{ "Template Files"|t('freeform') }} ({{ settings.emailTemplateDirectory }})

{# File based templates #} {% for notification in notifications if notification.fileBasedTemplate %} {% endfor %}
{{ "Name"|t('freeform') }} {{ "Handle"|t('freeform') }} {{ "Description"|t('freeform') }} {{ "File Name"|t('freeform') }}
{{ notification.name }} {{ notification.handle }} {{ notification.description }} {{ notification.id }}
{% endif %} {% endset %} {% js %} var adminTable = new Craft.AdminTable({ tableSelector: '#emailnotifications', noObjectsSelector: '#nonotifications', newObjectBtnSelector: '#newnotificationcontainer', deleteAction: 'freeform/notifications/delete', confirmDeleteMessage: '{{ "Are you sure you want to delete this notification?"|t('freeform') }}' }); {% endjs %}