From 8c390078dcf445c9e9045894a6e35f26effeeecb Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Sat, 11 Jan 2025 01:23:31 +0100 Subject: [PATCH] Ausers added --- parameciofast/modules/fastadmin/ausers.py | 13 +++ .../modules/fastadmin/libraries/config.py | 10 ++ .../modules/fastadmin/templates/layout.phtml | 106 ++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 parameciofast/modules/fastadmin/ausers.py create mode 100644 parameciofast/modules/fastadmin/libraries/config.py create mode 100644 parameciofast/modules/fastadmin/templates/layout.phtml diff --git a/parameciofast/modules/fastadmin/ausers.py b/parameciofast/modules/fastadmin/ausers.py new file mode 100644 index 0000000..afcd8dd --- /dev/null +++ b/parameciofast/modules/fastadmin/ausers.py @@ -0,0 +1,13 @@ +from fastapi.responses import HTMLResponse +from parameciofast.modules.fastadmin import admin_app +from parameciofast.modules.fastadmin.libraries.config import modules_admin, modules_admin_icons + +modules_admin.append(['Admin users', 'fastadmin_ausers', 'people-circle']) + +modules_admin_icons.append('') + +@admin_app.get('/ausers', response_class=HTMLResponse) +def fastadmin_ausers(): + + return '' + diff --git a/parameciofast/modules/fastadmin/libraries/config.py b/parameciofast/modules/fastadmin/libraries/config.py new file mode 100644 index 0000000..b362ec3 --- /dev/null +++ b/parameciofast/modules/fastadmin/libraries/config.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +# Every element + +# ['Name of module admin', 'name_function_for_url_for', 'xml-icon'] + +modules_admin=[] + +modules_admin_icons=[] + diff --git a/parameciofast/modules/fastadmin/templates/layout.phtml b/parameciofast/modules/fastadmin/templates/layout.phtml new file mode 100644 index 0000000..dcee1e1 --- /dev/null +++ b/parameciofast/modules/fastadmin/templates/layout.phtml @@ -0,0 +1,106 @@ +<% + +from parameciofast.modules.fastadmin.libraries.config import modules_admin, modules_admin_icons + +%> + + + + + + ${title} + + + <%block name="css"> + + <%block name="header_js"> + + + + + + + + %for module_icon in modules_admin_icons: + + ${module_icon|n} + + %endfor + + +
+
+
+
+

${tlang('Dashboard')}

+
+
+
+
+ +
+ + % for module in modules_admin: + + % endfor +
+ +
+
+ <%block name="content"> +
+
+ ${tlang('Welcome to admin')} +
+
+

${tlang('This is the admin section of your site.')}

+
+
+ +
+
+
+ + + + + + + <%block name="js"> + + +