From aacf885c561d4373dbbe87cb76789b0066cecd91 Mon Sep 17 00:00:00 2001 From: engineerTrooper Date: Tue, 8 Dec 2020 16:38:01 +0100 Subject: [PATCH] VENOM-2: changed code to V-Utils via VTepl -> result: minified code, added classes and flexbox, fixed data display at v-table --- tpl/admin/jsTemplates/pagesList.tpl | 26 ++--- tpl/admin/jsTemplates/roleEdit.tpl | 79 +++++++------- tpl/admin/jsTemplates/rolesList.tpl | 6 +- tpl/admin/jsTemplates/userEdit.tpl | 153 ++++++++++++---------------- tpl/admin/jsTemplates/usersList.tpl | 4 +- 5 files changed, 124 insertions(+), 144 deletions(-) diff --git a/tpl/admin/jsTemplates/pagesList.tpl b/tpl/admin/jsTemplates/pagesList.tpl index 465d1b2..29509ad 100644 --- a/tpl/admin/jsTemplates/pagesList.tpl +++ b/tpl/admin/jsTemplates/pagesList.tpl @@ -2,21 +2,21 @@

Pages

-
-

Add new Page

- {include(includes/input;label=New Page Name;name=newPageName;error=New Page Name is required;type=text)} - {include(includes/btn;type=primary;content=Add)} -
-
-

All Pages

- {foreach(pages as page,key)} -
- +
+

Add new Page

+ {include(includes/input;label=New Page Name;name=newPageName;error=New Page Name is required;type=text)} + {include(includes/btn;type=primary;content=Add)} +
+
+

All Pages

+ {foreach(pages as page,key)} +
+ {include(includes/svg;icon=$page.icon)} - ${page.name} + ${page.name} +
+ {/for}
- {/for} -
diff --git a/tpl/admin/jsTemplates/roleEdit.tpl b/tpl/admin/jsTemplates/roleEdit.tpl index 1bcf8af..70faaa6 100644 --- a/tpl/admin/jsTemplates/roleEdit.tpl +++ b/tpl/admin/jsTemplates/roleEdit.tpl @@ -7,50 +7,53 @@ {include(includes/svg;class=back-arrow;icon=vt-arrow-back)} -
+

Role Status

{include(includes/switch;id=${switch.id};name=permissionEditMetaData;desc=If enabled role is active.)}
-
+

Role Name

- + {include(includes/input;class=input-group;label=Change Name;name=roleName;error=Role Name is required;default=Admin)}
- +

Privileges

- -
-

Module

-
Meta-Data
-
Pages
-
Roles
-
SEO-URL
-
Users
-
VENOM-Status
-
-
-

Edit

- {include(includes/switch;id=${switch.id};name=permissionEditMetaData)} - {include(includes/switch;id=${switch.id};name=permissionEditPages)} - {include(includes/switch;id=${switch.id};name=permissionEditRoles)} - {include(includes/switch;id=${switch.id};name=permissionEditSeoUrl)} - {include(includes/switch;id=${switch.id};name=permissionEditUsers)} - {include(includes/switch;id=${switch.id};name=permissionEditVenomStatus)} -
-
-

View

- {include(includes/switch;id=${switch.id};name=permissionViewMetaData)} - {include(includes/switch;id=${switch.id};name=permissionViewPages)} - {include(includes/switch;id=${switch.id};name=permissionViewRoles)} - {include(includes/switch;id=${switch.id};name=permissionViewSeoUrl)} - {include(includes/switch;id=${switch.id};name=permissionViewUsers)} - {include(includes/switch;id=${switch.id};name=permissionViewVenomStatus)} -
-
+ + + Module + Edit + View + + + Meta-Data + {include(includes/switch;id=${switch.id};name=permissionEditMetaData)} + {include(includes/switch;id=${switch.id};name=permissionViewMetaData)} + + + Pages + {include(includes/switch;id=${switch.id};name=permissionEditPages)} + {include(includes/switch;id=${switch.id};name=permissionViewPages)} + + + Roles + {include(includes/switch;id=${switch.id};name=permissionEditRoles)} + {include(includes/switch;id=${switch.id};name=permissionViewRoles)} + + + SEO-URL + {include(includes/switch;id=${switch.id};name=permissionEditSeoUrl)} + {include(includes/switch;id=${switch.id};name=permissionViewSeoUrl)} + + + Users + {include(includes/switch;id=${switch.id};name=permissionEditUsers)} + {include(includes/switch;id=${switch.id};name=permissionViewUsers)} + + + VENOM-Status + {include(includes/switch;id=${switch.id};name=permissionEditVenomStatus)} + {include(includes/switch;id=${switch.id};name=permissionViewVenomStatus)} + +
diff --git a/tpl/admin/jsTemplates/rolesList.tpl b/tpl/admin/jsTemplates/rolesList.tpl index 4ded38c..b0d7c18 100644 --- a/tpl/admin/jsTemplates/rolesList.tpl +++ b/tpl/admin/jsTemplates/rolesList.tpl @@ -3,18 +3,18 @@

Roles

-
+

Overview

{foreach(roles as role,key)}
- + {include(includes/svg;icon=$role.icon)} ${role.name}
{/for}
-
+

Add new Role

{include(includes/input;label=New Role Name;name=newRoleName;error=New Role Name is required;type=text)} {include(includes/btn;type=primary;content=Add)} diff --git a/tpl/admin/jsTemplates/userEdit.tpl b/tpl/admin/jsTemplates/userEdit.tpl index 9fd2ce0..d4ad447 100644 --- a/tpl/admin/jsTemplates/userEdit.tpl +++ b/tpl/admin/jsTemplates/userEdit.tpl @@ -1,96 +1,73 @@
-

User: engineertrooper

+

User: engineertrooper

-
+
{include(includes/svg;class=back-arrow;icon=vt-arrow-back)} -
-
- EngineerTrooper - -
-
- Dominic Seela - -
-
- kontakt@engineertrooper.com - -
-
- - -
-
- - -
- -

Privileges

- -
-

Module

-
Meta-Data
-
Pages
-
Roles
-
SEO-URL
-
Users
-
VENOM-Status
-
-
-

Edit

- {include(includes/switch;id=${switch.id};name=permissionEditMetaData)} - {include(includes/switch;id=${switch.id};name=permissionEditPages)} - {include(includes/switch;id=${switch.id};name=permissionEditRoles)} - {include(includes/switch;id=${switch.id};name=permissionEditSeoUrl)} - {include(includes/switch;id=${switch.id};name=permissionEditUsers)} - {include(includes/switch;id=${switch.id};name=permissionEditVenomStatus)} -
-
-

View

- {include(includes/switch;id=${switch.id};name=permissionViewMetaData)} - {include(includes/switch;id=${switch.id};name=permissionViewPages)} - {include(includes/switch;id=${switch.id};name=permissionViewRoles)} - {include(includes/switch;id=${switch.id};name=permissionViewSeoUrl)} - {include(includes/switch;id=${switch.id};name=permissionViewUsers)} - {include(includes/switch;id=${switch.id};name=permissionViewVenomStatus)} -
-
-
-
-
- {include(includes/btn;type=valid;content=Save)} - {include(includes/btn;type=primary;content=Reset)} - {include(includes/btn;type=warn;content=Delete Role)}
-
+

User Data

+
+ {include(includes/input;class=input-group;label=Username;name=newUserName;error=New User Name is required;default=EngineerTrooper)} +
+
+ {include(includes/input;class=input-group;label=Author Name;name=newAuthorName;error=New Author Name is required;default=Dominic Seela)} +
+
+ {include(includes/input;class=input-group;label=E-Mail;name=newEMailAddress;error=E-Mail Address is required;default=kontakt@engineertrooper.com)} +
+
+ {include(includes/input;class=input-group;label=Password;name=newPassword;type=password;error=Password is required)} +
+
+ {include(includes/input;class=input-group;label=Password (Repeat);name=newPasswordRepeat;type=password;error=Password (Repeat) is required)} +
+ +

Privileges

+ + + Module + Edit + View + + + Meta-Data + {include(includes/switch;id=${switch.id};name=permissionEditMetaData)} + {include(includes/switch;id=${switch.id};name=permissionViewMetaData)} + + + Pages + {include(includes/switch;id=${switch.id};name=permissionEditPages)} + {include(includes/switch;id=${switch.id};name=permissionViewPages)} + + + Roles + {include(includes/switch;id=${switch.id};name=permissionEditRoles)} + {include(includes/switch;id=${switch.id};name=permissionViewRoles)} + + + SEO-URL + {include(includes/switch;id=${switch.id};name=permissionEditSeoUrl)} + {include(includes/switch;id=${switch.id};name=permissionViewSeoUrl)} + + + Users + {include(includes/switch;id=${switch.id};name=permissionEditUsers)} + {include(includes/switch;id=${switch.id};name=permissionViewUsers)} + + + VENOM-Status + {include(includes/switch;id=${switch.id};name=permissionEditVenomStatus)} + {include(includes/switch;id=${switch.id};name=permissionViewVenomStatus)} + + +
+
+
+ {include(includes/btn;type=valid;content=Save)} + {include(includes/btn;type=primary;content=Reset)} + {include(includes/btn;type=warn;content=Delete User)} +
+
\ No newline at end of file diff --git a/tpl/admin/jsTemplates/usersList.tpl b/tpl/admin/jsTemplates/usersList.tpl index 5a19e04..785aceb 100644 --- a/tpl/admin/jsTemplates/usersList.tpl +++ b/tpl/admin/jsTemplates/usersList.tpl @@ -5,7 +5,7 @@
-
+

Overview

{foreach(users as user,key)}
@@ -16,7 +16,7 @@
{/for}
-
+

Add new User

{include(includes/input;label=New User Name;name=newUserName;error=New User Name is required;type=text)} {include(includes/btn;type=primary;content=Add)}