From c26a1dca22fcced7b9cd37ace7a20ae71491fd66 Mon Sep 17 00:00:00 2001 From: winter Date: Wed, 26 Mar 2025 23:45:22 +0000 Subject: add plugin admin page --- templates/admin/overview_page.php | 13 +++++++++++++ templates/admin/plugin_card.php | 30 ++++++++++++++++++++++++++++++ templates/admin/plugin_download_form.php | 16 ++++++++++++++++ templates/admin/plugins_page.php | 18 ++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 templates/admin/overview_page.php create mode 100644 templates/admin/plugin_card.php create mode 100644 templates/admin/plugin_download_form.php create mode 100644 templates/admin/plugins_page.php (limited to 'templates/admin') diff --git a/templates/admin/overview_page.php b/templates/admin/overview_page.php new file mode 100644 index 0000000..d3325ef --- /dev/null +++ b/templates/admin/overview_page.php @@ -0,0 +1,13 @@ + __('admin.pageTitle')], function () { + call_template('navigation/side_links', ['links' => [ + [ + 'icon' => 'settings-outline', + 'label' => __('globalSettings.category.instance'), + 'href' => '/admin/settings/instance' + ], [ + 'icon' => 'extension-outline', + 'label' => __('admin.plugins.pageTitle'), + 'href' => '/admin/plugins' + ] + ]]); +}); \ No newline at end of file diff --git a/templates/admin/plugin_card.php b/templates/admin/plugin_card.php new file mode 100644 index 0000000..4a32e07 --- /dev/null +++ b/templates/admin/plugin_card.php @@ -0,0 +1,30 @@ + + +homepage)): ?> + + + +
+
+
name ?>
+
version)) ?>
+
author)) ?>
+
+
+ +
+ +
+
+ + homepage)): ?> +
+ \ No newline at end of file diff --git a/templates/admin/plugin_download_form.php b/templates/admin/plugin_download_form.php new file mode 100644 index 0000000..2e9b2a8 --- /dev/null +++ b/templates/admin/plugin_download_form.php @@ -0,0 +1,16 @@ +
+
+
+ + +
+
+ +
+
+ + + +
\ No newline at end of file diff --git a/templates/admin/plugins_page.php b/templates/admin/plugins_page.php new file mode 100644 index 0000000..e32536b --- /dev/null +++ b/templates/admin/plugins_page.php @@ -0,0 +1,18 @@ + __('admin.plugins.pageTitle')], function () { ?> + 'info', 'message' => __('admin.plugins.info')]); ?> + +

+ $metadata) { + call_template('admin/plugin_card', ['meta' => $metadata, 'filename' => basename($filename)]); + } + if (count(PluginLoader::$loadedPlugins) == 0) { + call_template('placeholder_text'); + } ?> + +

+ +