adsasd
This commit is contained in:
@@ -50,4 +50,5 @@ require dirname(__DIR__) . '/../structure/layout_start.php';
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
<?php tpl_add_script(app_asset_url('/assets/js/account.js'), 'footer', false, false, '', null, true); ?>
|
||||||
<?php require dirname(__DIR__) . '/../structure/layout_end.php'; ?>
|
<?php require dirname(__DIR__) . '/../structure/layout_end.php'; ?>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ $appBaseUrl = $layoutContext['app_base_url'] ?? '';
|
|||||||
|
|
||||||
$navLinks = $navLinks ?? [
|
$navLinks = $navLinks ?? [
|
||||||
['id' => 'dashboard', 'label' => 'Dashboard', 'href' => $appBaseUrl . '/admin/dashboard.php'],
|
['id' => 'dashboard', 'label' => 'Dashboard', 'href' => $appBaseUrl . '/admin/dashboard.php'],
|
||||||
|
['id' => 'system', 'label' => 'Systemeinstellungen', 'href' => $appBaseUrl . '/admin/system.php'],
|
||||||
['id' => 'settings', 'label' => 'API & Tabellen', 'href' => $appBaseUrl . '/admin/settings.php'],
|
['id' => 'settings', 'label' => 'API & Tabellen', 'href' => $appBaseUrl . '/admin/settings.php'],
|
||||||
['id' => 'users', 'label' => 'Userverwaltung', 'href' => $appBaseUrl . '/admin/users.php'],
|
['id' => 'users', 'label' => 'Userverwaltung', 'href' => $appBaseUrl . '/admin/users.php'],
|
||||||
['id' => 'profile', 'label' => 'Mein Konto', 'href' => $appBaseUrl . '/admin/profile.php'],
|
['id' => 'profile', 'label' => 'Mein Konto', 'href' => $appBaseUrl . '/admin/profile.php'],
|
||||||
@@ -48,6 +49,7 @@ $showNavLinks = !$hasHeaderTabs && !empty($navLinks);
|
|||||||
<div id="userMenuPanel" class="user-menu hidden" role="menu">
|
<div id="userMenuPanel" class="user-menu hidden" role="menu">
|
||||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/profile.php') ?>" class="user-menu-item" data-menu="profile">Profil</a>
|
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/profile.php') ?>" class="user-menu-item" data-menu="profile">Profil</a>
|
||||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/dashboard.php') ?>" class="user-menu-item" data-role="admin">Dashboard</a>
|
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/dashboard.php') ?>" class="user-menu-item" data-role="admin">Dashboard</a>
|
||||||
|
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/system.php') ?>" class="user-menu-item" data-role="admin">Systemverwaltung</a>
|
||||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/settings.php') ?>" class="user-menu-item" data-role="admin">API & Tabellen</a>
|
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/settings.php') ?>" class="user-menu-item" data-role="admin">API & Tabellen</a>
|
||||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/users.php') ?>" class="user-menu-item" data-role="owner">Userverwaltung</a>
|
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/users.php') ?>" class="user-menu-item" data-role="owner">Userverwaltung</a>
|
||||||
<button id="btn-logout" type="button" class="user-menu-item text-red-600">Logout</button>
|
<button id="btn-logout" type="button" class="user-menu-item text-red-600">Logout</button>
|
||||||
|
|||||||
@@ -1094,9 +1094,23 @@ class ApiKernel
|
|||||||
$auth = $this->requireAuth();
|
$auth = $this->requireAuth();
|
||||||
$customerId = (int)($auth['customer_id'] ?? 0);
|
$customerId = (int)($auth['customer_id'] ?? 0);
|
||||||
$defaults = $this->resolveLegacySectionDefaults($kind);
|
$defaults = $this->resolveLegacySectionDefaults($kind);
|
||||||
$section = $defaults['is_template']
|
if ($defaults['is_template']) {
|
||||||
? $this->ensureEmailtemplateSection($customerId)
|
$section = $this->ensureEmailtemplateSection($customerId);
|
||||||
: $this->ensureContentSection($customerId, $defaults['name'], $defaults['slug'], false);
|
} else {
|
||||||
|
$section = $this->fetchContentSectionBySlug($customerId, $defaults['slug']);
|
||||||
|
}
|
||||||
|
if (!$section) {
|
||||||
|
$this->respond([
|
||||||
|
'ok' => true,
|
||||||
|
'kind' => 'content',
|
||||||
|
'items' => [],
|
||||||
|
'data' => [],
|
||||||
|
'count' => 0,
|
||||||
|
'offset' => 0,
|
||||||
|
'limit' => 0,
|
||||||
|
]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
$this->handleContentList($section);
|
$this->handleContentList($section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1105,9 +1119,12 @@ class ApiKernel
|
|||||||
$auth = $this->requireAuth();
|
$auth = $this->requireAuth();
|
||||||
$customerId = (int)($auth['customer_id'] ?? 0);
|
$customerId = (int)($auth['customer_id'] ?? 0);
|
||||||
$defaults = $this->resolveLegacySectionDefaults($kind);
|
$defaults = $this->resolveLegacySectionDefaults($kind);
|
||||||
$section = $defaults['is_template']
|
if ($defaults['is_template']) {
|
||||||
? $this->ensureEmailtemplateSection($customerId)
|
$section = $this->ensureEmailtemplateSection($customerId);
|
||||||
: $this->ensureContentSection($customerId, $defaults['name'], $defaults['slug'], false);
|
} else {
|
||||||
|
$section = $this->fetchContentSectionBySlug($customerId, $defaults['slug']);
|
||||||
|
}
|
||||||
|
if (!$section) $this->fail('section not configured', ['kind' => $kind], 404);
|
||||||
$this->handleContentGet($section);
|
$this->handleContentGet($section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1116,9 +1133,12 @@ class ApiKernel
|
|||||||
$auth = $this->requireAuth();
|
$auth = $this->requireAuth();
|
||||||
$customerId = (int)($auth['customer_id'] ?? 0);
|
$customerId = (int)($auth['customer_id'] ?? 0);
|
||||||
$defaults = $this->resolveLegacySectionDefaults($kind);
|
$defaults = $this->resolveLegacySectionDefaults($kind);
|
||||||
$section = $defaults['is_template']
|
if ($defaults['is_template']) {
|
||||||
? $this->ensureEmailtemplateSection($customerId)
|
$section = $this->ensureEmailtemplateSection($customerId);
|
||||||
: $this->ensureContentSection($customerId, $defaults['name'], $defaults['slug'], false);
|
} else {
|
||||||
|
$section = $this->fetchContentSectionBySlug($customerId, $defaults['slug']);
|
||||||
|
}
|
||||||
|
if (!$section) $this->fail('section not configured', ['kind' => $kind], 404);
|
||||||
$this->handleContentCreate($section);
|
$this->handleContentCreate($section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1127,9 +1147,12 @@ class ApiKernel
|
|||||||
$auth = $this->requireAuth();
|
$auth = $this->requireAuth();
|
||||||
$customerId = (int)($auth['customer_id'] ?? 0);
|
$customerId = (int)($auth['customer_id'] ?? 0);
|
||||||
$defaults = $this->resolveLegacySectionDefaults($kind);
|
$defaults = $this->resolveLegacySectionDefaults($kind);
|
||||||
$section = $defaults['is_template']
|
if ($defaults['is_template']) {
|
||||||
? $this->ensureEmailtemplateSection($customerId)
|
$section = $this->ensureEmailtemplateSection($customerId);
|
||||||
: $this->ensureContentSection($customerId, $defaults['name'], $defaults['slug'], false);
|
} else {
|
||||||
|
$section = $this->fetchContentSectionBySlug($customerId, $defaults['slug']);
|
||||||
|
}
|
||||||
|
if (!$section) $this->fail('section not configured', ['kind' => $kind], 404);
|
||||||
$this->handleContentUpdate($section);
|
$this->handleContentUpdate($section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1138,9 +1161,12 @@ class ApiKernel
|
|||||||
$auth = $this->requireAuth();
|
$auth = $this->requireAuth();
|
||||||
$customerId = (int)($auth['customer_id'] ?? 0);
|
$customerId = (int)($auth['customer_id'] ?? 0);
|
||||||
$defaults = $this->resolveLegacySectionDefaults($kind);
|
$defaults = $this->resolveLegacySectionDefaults($kind);
|
||||||
$section = $defaults['is_template']
|
if ($defaults['is_template']) {
|
||||||
? $this->ensureEmailtemplateSection($customerId)
|
$section = $this->ensureEmailtemplateSection($customerId);
|
||||||
: $this->ensureContentSection($customerId, $defaults['name'], $defaults['slug'], false);
|
} else {
|
||||||
|
$section = $this->fetchContentSectionBySlug($customerId, $defaults['slug']);
|
||||||
|
}
|
||||||
|
if (!$section) $this->fail('section not configured', ['kind' => $kind], 404);
|
||||||
$this->handleContentDelete($section);
|
$this->handleContentDelete($section);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user