diff --git a/admin/theme/default/views/pages/content-edit.twig b/admin/theme/default/views/pages/content-edit.twig
index c81a047..7d4396a 100644
--- a/admin/theme/default/views/pages/content-edit.twig
+++ b/admin/theme/default/views/pages/content-edit.twig
@@ -29,13 +29,33 @@
{% if availablePlugins is not empty %}
-
-
- {% for plugin in availablePlugins %}
-
-
+
+
+ {% for plugin in selectedPlugins %}
+
+
+
+
+
+
+
+
+
+
{% endfor %}
-
+ {% for plugin in availablePlugins if plugin not in selectedPlugins %}
+
+
+
+
+
+
+
+
+
+
+ {% endfor %}
+
{% endif %}
{% endif %}
@@ -119,6 +139,36 @@ document.addEventListener('DOMContentLoaded', function () {
}
window.__onContentChange = markChanged;
+
+ // Plugin order: move list items up/down
+ var pluginList = document.getElementById('plugin-order-list');
+ if (pluginList) {
+ pluginList.addEventListener('click', function (e) {
+ var upBtn = e.target.closest('.plugin-up');
+ var downBtn = e.target.closest('.plugin-down');
+ if (!upBtn && !downBtn) return;
+
+ var item = e.target.closest('li[data-plugin]');
+ if (!item) return;
+
+ if (upBtn && item.previousElementSibling) {
+ pluginList.insertBefore(item, item.previousElementSibling);
+ markChanged();
+ } else if (downBtn && item.nextElementSibling) {
+ pluginList.insertBefore(item, item.nextElementSibling.nextElementSibling);
+ markChanged();
+ }
+ });
+
+ // On form submit, reorder the checkboxes to match the visual order
+ var form = document.getElementById('editor-form');
+ if (form) {
+ form.addEventListener('submit', function () {
+ // The DOM order of the
elements already determines the form submission order
+ // because the checkboxes are inside the