diff --git a/templates/AdminPages/_attachments.html.twig b/templates/AdminPages/_attachments.html.twig
index 46736b5d..6c774ef7 100644
--- a/templates/AdminPages/_attachments.html.twig
+++ b/templates/AdminPages/_attachments.html.twig
@@ -11,43 +11,51 @@
{% for attachment in form.attachments %}
-
- {{ form_widget(attachment) }}
- |
-
- {{ delete_btn }}
+ |
+
+ {{ form_widget(attachment) }}
+
+
+ {{ delete_btn }}
- {% set attach = attachment.vars.value %}
+ {% set attach = attachment.vars.value %}
- {% if attachment_helper.fileExisting(attach) %}
- {% if not attach.external %}
-
-
+ {% if attachment_helper.fileExisting(attach) %}
+ {% if not attach.external %}
+
+
{{ attach.filename }}
-
-
+
+
{{ attachment_helper.humanFileSize(attach) }}
-
- {% else %}
-
-
+
+ {% else %}
+
+
{% trans %}attachment.external{% endtrans %}
-
- {% endif %}
- {% else %}
-
-
+
+ {% endif %}
+ {% if attach.picture %}
+
+
+
+ {% else %}
+ {% trans %}attachment.view{% endtrans %}
+ {% endif %}
+ {% else %}
+
+
{% trans %}attachment.file_not_found{% endtrans %}
-
- {% endif %}
-
+
+ {% endif %}
+
|
{% endfor %}
@@ -77,12 +85,12 @@
//Increase the index
newForm = newForm.replace(/__name__/g, index);
- newForm = '' + newForm + ' | ';
- $newFormRow = $('
').html(newForm);
+ newForm = '' + newForm + '
';
+ $newFormRow = $('
').html("" + newForm + " | ");
//Add delete button
- $btn = '' + '{{ delete_btn|e('js') }}' + ' | ';
- $newFormRow.append($btn);
+ $btn = '' + '{{ delete_btn|e('js') }}' + '
';
+ $('td' ,$newFormRow).append($btn);
$holder.append($newFormRow);