From d51b16619fb55788eea7e27d10e91876123b556a Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Wed, 30 Oct 2024 16:54:09 +0200 Subject: [PATCH] Cleans up the config platforms page --- app/pages/config.php | 19 ++++--- ...-platform.php => config-platform-edit.php} | 0 app/templates/config-platform.php | 52 +++++++++++++++++++ app/templates/page-sidebar.php | 8 +-- 4 files changed, 68 insertions(+), 11 deletions(-) rename app/templates/{config-edit-platform.php => config-platform-edit.php} (100%) create mode 100644 app/templates/config-platform.php diff --git a/app/pages/config.php b/app/pages/config.php index cf93467..2142cbc 100644 --- a/app/pages/config.php +++ b/app/pages/config.php @@ -110,19 +110,24 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { } else { switch ($item) { - case 'platforms': - $mode = $_REQUEST['mode'] ?? ''; - $raw = ($mode === 'raw'); - $platformConfigjs = $configObject->getPlatformConfigjs($platformDetails[0]['jitsi_url'], $raw); - include '../app/templates/config-list-configjs.php'; + case 'platform': + if (isset($action) && $action === 'edit') { + include '../app/templates/config-platform-edit.php'; + } else { + if ($userObject->hasRight($user_id, 'view config file')) { + include '../app/templates/config-platform.php'; + } else { + include '../app/templates/error-unauthorized.php'; + } + } break; - case 'hosts': + case 'host': $mode = $_REQUEST['mode'] ?? ''; $raw = ($mode === 'raw'); $platformInterfaceConfigjs = $configObject->getPlatformInterfaceConfigjs($platformDetails[0]['jitsi_url'], $raw); include '../app/templates/config-list-interfaceconfigjs.php'; break; - case 'endpoints': + case 'endpoint': $mode = $_REQUEST['mode'] ?? ''; $raw = ($mode === 'raw'); $platformInterfaceConfigjs = $configObject->getPlatformInterfaceConfigjs($platformDetails[0]['jitsi_url'], $raw); diff --git a/app/templates/config-edit-platform.php b/app/templates/config-platform-edit.php similarity index 100% rename from app/templates/config-edit-platform.php rename to app/templates/config-platform-edit.php diff --git a/app/templates/config-platform.php b/app/templates/config-platform.php new file mode 100644 index 0000000..d082d35 --- /dev/null +++ b/app/templates/config-platform.php @@ -0,0 +1,52 @@ + + +
+

Jilo configuration :: Jitsi Meet platforms

+
+

Jitsi platforms configuration  add new

+getAgentDetails($platform_array['id']); +?> + +
+

+ platform id - +   + edit platform + + delete platform + + delete platform + +

+
+ $value) { + if ($key === 'id') continue; +?> +
+
+ : +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ diff --git a/app/templates/page-sidebar.php b/app/templates/page-sidebar.php index c0d141d..3adcbec 100644 --- a/app/templates/page-sidebar.php +++ b/app/templates/page-sidebar.php @@ -1,7 +1,7 @@
-