From 652477823f1af13f9061d2607a8a1cadb6695cdc Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 19 Mar 2019 14:13:30 +0300 Subject: [PATCH] Admin Panel - Slim Integration - next round of integration --- site/plugins/admin/views/partials/base.html | 185 ++++++++++++++++++ .../admin/views/templates/auth/login.php | 39 ---- .../views/templates/auth/registration.php | 43 ---- .../templates/extends/plugins/index.html | 76 +++++++ .../admin/views/templates/users/login.html | 24 +++ 5 files changed, 285 insertions(+), 82 deletions(-) delete mode 100644 site/plugins/admin/views/templates/auth/login.php delete mode 100644 site/plugins/admin/views/templates/auth/registration.php create mode 100644 site/plugins/admin/views/templates/extends/plugins/index.html create mode 100644 site/plugins/admin/views/templates/users/login.html diff --git a/site/plugins/admin/views/partials/base.html b/site/plugins/admin/views/partials/base.html index 321968cd..1332021f 100644 --- a/site/plugins/admin/views/partials/base.html +++ b/site/plugins/admin/views/partials/base.html @@ -119,5 +119,190 @@ + + {% if registry.settings.locale == 'en_US' %} + {% set locale = 'en' %} + {% else %} + {% set locale = registry.settings.locale %} + {% endif %} + + {% if registry.settings.locale != 'en_US' %} + {% set admin_trumbowyg_build = base_url() ~ '/site/plugins/admin/assets/dist/langs/trumbowyg/langs/' ~ registry.settings.locale ~ '.min.js' %} + {% do assets_add('js', admin_trumbowyg_build, 'admin', 10) %} + {% endif %} + + {% set admin_build = base_url() ~ '/site/plugins/admin/assets/dist/js/admin-build.min.js' %} + + {% do assets_add('js', admin_build, 'admin', 1) %} + + {% for assets_admin in assets_get('js', 'admin') %} + {% for assets_by_priorities in assets_admin %} + + {% endfor %} + {% endfor %} + + + + diff --git a/site/plugins/admin/views/templates/auth/login.php b/site/plugins/admin/views/templates/auth/login.php deleted file mode 100644 index 9214dd09..00000000 --- a/site/plugins/admin/views/templates/auth/login.php +++ /dev/null @@ -1,39 +0,0 @@ -assign('main_panel_class', 'width-full') - ->display(); -Themes::view('admin/views/partials/content-start')->display(); -?> - -
- -
-
-

-
- - -
-
- - -
-
- -
-
-
-
- -display(); -Themes::view('admin/views/partials/footer')->display(); -?> diff --git a/site/plugins/admin/views/templates/auth/registration.php b/site/plugins/admin/views/templates/auth/registration.php deleted file mode 100644 index 5ddade45..00000000 --- a/site/plugins/admin/views/templates/auth/registration.php +++ /dev/null @@ -1,43 +0,0 @@ -assign('main_panel_class', 'width-full') - ->display(); -Themes::view('admin/views/partials/content-start')->display(); -?> - -
- -
-
-

-
- - -
-
- - -
-
- - -
-
- -
-
-
-
- -display(); -Themes::view('admin/views/partials/footer')->display(); -?> diff --git a/site/plugins/admin/views/templates/extends/plugins/index.html b/site/plugins/admin/views/templates/extends/plugins/index.html new file mode 100644 index 00000000..c86c16ae --- /dev/null +++ b/site/plugins/admin/views/templates/extends/plugins/index.html @@ -0,0 +1,76 @@ +{% extends "plugins/admin/views/partials/base.html" %} + +{% block content %} + +
+ + + +
+ + + + + + + + + + + {% for key, plugin in plugins_list %} + + + + + + {% endfor %} + +
{{ tr('admin_name') }}{{ tr('admin_status') }}
{{ plugin.name }} + {{ tr('admin_info') }} + +
+ + + + +
+
+ + + + +{% endblock %} diff --git a/site/plugins/admin/views/templates/users/login.html b/site/plugins/admin/views/templates/users/login.html new file mode 100644 index 00000000..c62620a9 --- /dev/null +++ b/site/plugins/admin/views/templates/users/login.html @@ -0,0 +1,24 @@ +{% extends "plugins/admin/views/partials/base.html" %} + +{% block content %} +
+ + +
+
+

{{ tr('admin_login') }}

+
+ + +
+
+ + +
+
+ +
+
+
+
+{% endblock %}