Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
<?php
|
|
|
|
|
|
// post_cardform_settings.php
|
|
|
|
|
|
|
|
|
|
|
|
// Sicherstellen, dass $postId gesetzt ist – andernfalls neuen Beitrag (0) annehmen
|
|
|
|
|
|
if (!isset($postId)) {
|
|
|
|
|
|
$postId = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Falls $languageId noch nicht definiert ist, Standard (z. B. 1) verwenden
|
|
|
|
|
|
if (!isset($languageId)) {
|
|
|
|
|
|
$languageId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Load current linked form for this post (if any)
|
|
|
|
|
|
$currentFormId = 0;
|
|
|
|
|
|
$res = mysqli_query($GLOBALS['mysql_con'], "
|
|
|
|
|
|
SELECT form_id
|
|
|
|
|
|
FROM knowledgecenter_post_form
|
|
|
|
|
|
WHERE post_id = $postId
|
|
|
|
|
|
LIMIT 1
|
|
|
|
|
|
");
|
|
|
|
|
|
if ($row = mysqli_fetch_assoc($res)) {
|
|
|
|
|
|
$currentFormId = (int)$row['form_id'];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Build <option> list from contactform_header with 'selected' on current form
|
|
|
|
|
|
$formOptions = "";
|
|
|
|
|
|
$query = "SELECT id, description FROM contactform_header ORDER BY id ASC";
|
|
|
|
|
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
|
|
|
|
// Mark the currently linked form as selected
|
|
|
|
|
|
$selected = ($row['id'] == $currentFormId) ? 'selected' : '';
|
|
|
|
|
|
$formOptions .= "<option value='" . $row['id'] . "' $selected>"
|
|
|
|
|
|
. htmlspecialchars($row['description']) . "</option>";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------- Kategorien --------------------
|
|
|
|
|
|
// Erzeuge die Whitelist für alle verfügbaren Kategorien (mit Übersetzung)
|
2026-06-29 08:09:19 +02:00
|
|
|
|
// Betriebsrat sieht nur Kategorien, die für ihn freigegeben sind (direkt oder über Elternkategorie)
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
$categoriesData = [];
|
2026-06-29 08:09:19 +02:00
|
|
|
|
$query = "SELECT c.id, t.title, c.enable_post_color_pickers
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
FROM knowledgecenter_categories_update AS c
|
2026-06-29 08:09:19 +02:00
|
|
|
|
LEFT JOIN knowledgecenter_category_translations AS t
|
|
|
|
|
|
ON c.id = t.category_id
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
WHERE t.language_id = $languageId";
|
|
|
|
|
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
2026-06-29 08:09:19 +02:00
|
|
|
|
$isBrOnly = !is_wiki_redakteur() && is_wiki_betriebsrat();
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
2026-06-29 08:09:19 +02:00
|
|
|
|
if ($isBrOnly && !is_category_betriebsrat_editable((int)$row['id'])) {
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
$categoriesData[] = [
|
|
|
|
|
|
'value' => $row['id'],
|
|
|
|
|
|
'name' => $row['title'],
|
|
|
|
|
|
'enable_post_color_pickers' => (int) ($row['enable_post_color_pickers'] ?? 0)
|
|
|
|
|
|
];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Bereits zugeordnete Kategorien abrufen (falls vorhanden)
|
|
|
|
|
|
$selectedCategories = [];
|
|
|
|
|
|
if ($postId != 0) {
|
|
|
|
|
|
$querySelected = "SELECT c.id, t.title
|
|
|
|
|
|
FROM knowledgecenter_category_post AS pc
|
|
|
|
|
|
JOIN knowledgecenter_categories_update AS c ON pc.category_id = c.id
|
|
|
|
|
|
LEFT JOIN knowledgecenter_category_translations AS t
|
|
|
|
|
|
ON c.id = t.category_id
|
|
|
|
|
|
WHERE pc.post_id = $postId AND t.language_id = $languageId";
|
|
|
|
|
|
$resultSelected = mysqli_query($GLOBALS['mysql_con'], $querySelected);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($resultSelected)) {
|
|
|
|
|
|
$selectedCategories[] = ['value' => $row['id'], 'name' => $row['title']];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------- Mandanten für Post --------------------
|
|
|
|
|
|
$postMandantsData = [];
|
|
|
|
|
|
$query = "SELECT id, description FROM main_mandant";
|
|
|
|
|
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
|
|
|
|
// Hier verwenden wir 'name' als Anzeige-Text, der die description enthält.
|
|
|
|
|
|
$postMandantsData[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
$selectedPostMandants = [];
|
|
|
|
|
|
if ($postId != 0) {
|
|
|
|
|
|
$querySelected = "SELECT m.id, m.description
|
|
|
|
|
|
FROM knowledgecenter_post_mandant AS pm
|
|
|
|
|
|
JOIN main_mandant AS m ON pm.mandant_id = m.id
|
|
|
|
|
|
WHERE pm.post_id = $postId";
|
|
|
|
|
|
$resultSelected = mysqli_query($GLOBALS['mysql_con'], $querySelected);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($resultSelected)) {
|
|
|
|
|
|
$selectedPostMandants[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------- Departments für Post --------------------
|
|
|
|
|
|
$postDepartmentsData = [];
|
|
|
|
|
|
$query = "SELECT id, description FROM main_department";
|
|
|
|
|
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
|
|
|
|
$postDepartmentsData[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
$selectedPostDepartments = [];
|
|
|
|
|
|
if ($postId != 0) {
|
|
|
|
|
|
$querySelected = "SELECT d.id, d.description
|
|
|
|
|
|
FROM knowledgecenter_post_department AS pd
|
|
|
|
|
|
JOIN main_department AS d ON pd.department_id = d.id
|
|
|
|
|
|
WHERE pd.post_id = $postId";
|
|
|
|
|
|
$resultSelected = mysqli_query($GLOBALS['mysql_con'], $querySelected);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($resultSelected)) {
|
|
|
|
|
|
$selectedPostDepartments[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------- Rollen für Post --------------------
|
|
|
|
|
|
$postRolesData = [];
|
|
|
|
|
|
$query = "SELECT id, description FROM main_role";
|
|
|
|
|
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
|
|
|
|
$postRolesData[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
$selectedPostRoles = [];
|
|
|
|
|
|
if ($postId != 0) {
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
$querySelected = "SELECT r.id, r.description
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
FROM knowledgecenter_post_role AS pr
|
|
|
|
|
|
JOIN main_role AS r ON pr.role_id = r.id
|
|
|
|
|
|
WHERE pr.post_id = $postId";
|
|
|
|
|
|
$resultSelected = mysqli_query($GLOBALS['mysql_con'], $querySelected);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($resultSelected)) {
|
|
|
|
|
|
$selectedPostRoles[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
// -------------------- Einrichtungen für Post --------------------
|
|
|
|
|
|
$postEinrichtsData = [];
|
|
|
|
|
|
$query = "SELECT id, description FROM organigramm_einricht ORDER BY description ASC";
|
|
|
|
|
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
|
|
|
|
$postEinrichtsData[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
2026-06-29 10:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
// Verknüpfungskarte für Einrichtungen (Gruppen → Mitglieder)
|
|
|
|
|
|
$postEinrichtLinks = [];
|
|
|
|
|
|
$linkRes = mysqli_query($GLOBALS['mysql_con'], "SELECT einricht_id, linked_einricht_id FROM organigramm_einricht_link");
|
|
|
|
|
|
while ($lr = mysqli_fetch_assoc($linkRes)) {
|
|
|
|
|
|
$postEinrichtLinks[strval($lr['einricht_id'])][] = strval($lr['linked_einricht_id']);
|
|
|
|
|
|
}
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
$selectedPostEinrichts = [];
|
|
|
|
|
|
if ($postId != 0) {
|
|
|
|
|
|
$querySelected = "SELECT e.id, e.description
|
|
|
|
|
|
FROM knowledgecenter_post_einricht AS pe
|
|
|
|
|
|
JOIN organigramm_einricht AS e ON pe.einricht_id = e.id
|
|
|
|
|
|
WHERE pe.post_id = $postId";
|
|
|
|
|
|
$resultSelected = mysqli_query($GLOBALS['mysql_con'], $querySelected);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($resultSelected)) {
|
|
|
|
|
|
$selectedPostEinrichts[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------- Fachbereiche für Post --------------------
|
|
|
|
|
|
$postFachbereicheData = [];
|
|
|
|
|
|
$query = "SELECT id, description FROM organogramm_space ORDER BY description ASC";
|
|
|
|
|
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
|
|
|
|
$postFachbereicheData[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
$selectedPostFachbereiche = [];
|
|
|
|
|
|
if ($postId != 0) {
|
|
|
|
|
|
$querySelected = "SELECT s.id, s.description
|
|
|
|
|
|
FROM knowledgecenter_post_fachbereich AS pfb
|
|
|
|
|
|
JOIN organogramm_space AS s ON pfb.fachbereich_id = s.id
|
|
|
|
|
|
WHERE pfb.post_id = $postId";
|
|
|
|
|
|
$resultSelected = mysqli_query($GLOBALS['mysql_con'], $querySelected);
|
|
|
|
|
|
while ($row = mysqli_fetch_assoc($resultSelected)) {
|
|
|
|
|
|
$selectedPostFachbereiche[] = ['value' => $row['id'], 'name' => $row['description']];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
$postBackgroundColor = '#FFFFFF';
|
|
|
|
|
|
if (!empty($post['background_color'])) {
|
|
|
|
|
|
$postBackgroundColor = $post['background_color'];
|
|
|
|
|
|
} elseif (!empty($currentVersion['background_color'])) {
|
|
|
|
|
|
$postBackgroundColor = $currentVersion['background_color'];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$postTextColor = '#000000';
|
|
|
|
|
|
if (!empty($post['text_color'])) {
|
|
|
|
|
|
$postTextColor = $post['text_color'];
|
|
|
|
|
|
} elseif (!empty($currentVersion['text_color'])) {
|
|
|
|
|
|
$postTextColor = $currentVersion['text_color'];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
<button id="message" style="opacity:0; position: absolute;"></button>
|
|
|
|
|
|
<div class="titlebar_small">
|
|
|
|
|
|
<h2><?=$translation->get("settings")?></h2>
|
2026-06-29 08:09:19 +02:00
|
|
|
|
<?php if ($canEditPost ?? false) { ?>
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
<span id="saveAllBtn" class="post-action-btn-small green"><?= $saveIcon ?></span>
|
|
|
|
|
|
<?php } ?>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
<div class="settings">
|
|
|
|
|
|
<form id="postSettingsForm">
|
|
|
|
|
|
<input type="hidden" id="post_id" name="post_id" value="<?php echo $postId; ?>" />
|
|
|
|
|
|
|
|
|
|
|
|
<h3><?=$translation->get("categories")?>
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<input type="text" id="categoryTags" name="categories" placeholder="Kategorie hinzufügen…" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="postColorPickersSection" class="post-color-grid" style="display:none;">
|
|
|
|
|
|
<div class="post-color-item">
|
|
|
|
|
|
<label for="postBackgroundColor"><?= $translation->get("post_background_color") ?></label>
|
|
|
|
|
|
<input type="color" id="postBackgroundColor" name="background_color"
|
|
|
|
|
|
value="<?= htmlspecialchars($postBackgroundColor, ENT_QUOTES, 'UTF-8') ?>">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="post-color-item">
|
|
|
|
|
|
<label for="postTextColor"><?= $translation->get("post_text_color") ?></label>
|
|
|
|
|
|
<input type="color" id="postTextColor" name="text_color"
|
|
|
|
|
|
value="<?= htmlspecialchars($postTextColor, ENT_QUOTES, 'UTF-8') ?>">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3><?=$translation->get("Geschäftsstellen")?>
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<input type="text" id="postMandantTags" name="postMandants" placeholder="<?=$translation->get("Geschäftsstellen")?>…" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h3><?=$translation->get("departments")?>
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<input type="text" id="postDepartmentTags" name="postDepartments" placeholder="<?=$translation->get("departments")?>…" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h3><?=$translation->get("roles")?>
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<input type="text" id="postRoleTags" name="postRoles" placeholder="<?=$translation->get("roles")?>…" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
<h3>Einrichtungen</h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<input type="text" id="postEinrichtTags" name="postEinrichts" placeholder="Einrichtung hinzufügen…" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Fachbereiche</h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<input type="text" id="postFachbereichTags" name="postFachbereiche" placeholder="Fachbereich hinzufügen…" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
<h3>Formular auswählen</h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<select name="postFormSelect" id="postFormSelect">
|
|
|
|
|
|
<option value="">Bitte wählen…</option>
|
|
|
|
|
|
<?php echo $formOptions; ?>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<hgroup>
|
|
|
|
|
|
<h3><?=$translation->get("pdf_inline_preview")?></h3>
|
|
|
|
|
|
<small><?=$translation->get("pdf_inline_preview_explanation")?></small>
|
|
|
|
|
|
</hgroup>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
|
|
|
|
|
|
<label>
|
|
|
|
|
|
<input type="checkbox" id="pdfInlineCheckbox" name="pdf_inline" value="1"
|
|
|
|
|
|
<?php echo (!empty($post['preview_inline']) && $post['preview_inline'] == 1) ? 'checked' : ''; ?>>
|
|
|
|
|
|
<?=$translation->get("pdf_inline_preview_label")?>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<h3><?=$translation->get("delete_post")?></h3>
|
|
|
|
|
|
<div class="settings_container">
|
|
|
|
|
|
<div id="deletePostBtn" class="post-action-btn-text red">
|
|
|
|
|
|
<?=$translation->get("delete_post")?>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
// Übergabe der Whitelist-Daten aus PHP
|
|
|
|
|
|
var categoriesData = <?php echo json_encode($categoriesData); ?>;
|
|
|
|
|
|
var postMandantsData = <?php echo json_encode($postMandantsData); ?>;
|
|
|
|
|
|
var postDepartmentsData = <?php echo json_encode($postDepartmentsData); ?>;
|
|
|
|
|
|
var postRolesData = <?php echo json_encode($postRolesData); ?>;
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
var postEinrichtsData = <?php echo json_encode($postEinrichtsData); ?>;
|
|
|
|
|
|
var postFachbereicheData = <?php echo json_encode($postFachbereicheData); ?>;
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
var selectedCategories = <?php echo json_encode($selectedCategories); ?>;
|
|
|
|
|
|
var selectedPostMandants = <?php echo json_encode($selectedPostMandants); ?>;
|
|
|
|
|
|
var selectedPostDepartments = <?php echo json_encode($selectedPostDepartments); ?>;
|
|
|
|
|
|
var selectedPostRoles = <?php echo json_encode($selectedPostRoles); ?>;
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
var selectedPostEinrichts = <?php echo json_encode($selectedPostEinrichts); ?>;
|
|
|
|
|
|
var selectedPostFachbereiche = <?php echo json_encode($selectedPostFachbereiche); ?>;
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
var categoryEnableColorMap = {};
|
|
|
|
|
|
categoriesData.forEach(function (cat) {
|
|
|
|
|
|
categoryEnableColorMap[String(cat.value)] = parseInt(cat.enable_post_color_pickers || 0, 10) === 1;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function updatePostColorPickerVisibility() {
|
|
|
|
|
|
var selectedValues = tagifyCategories.value.map(function (tag) {
|
|
|
|
|
|
return String(tag.value);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var hasEnabledCategory = selectedValues.some(function (catId) {
|
|
|
|
|
|
return categoryEnableColorMap[catId] === true;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (hasEnabledCategory) {
|
|
|
|
|
|
$("#postColorPickersSection").css("display", "grid");
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$("#postColorPickersSection").hide();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Kategorien
|
|
|
|
|
|
var tagifyCategories = new Tagify(document.getElementById('categoryTags'), {
|
|
|
|
|
|
whitelist: categoriesData,
|
|
|
|
|
|
tagTextProp: 'name',
|
|
|
|
|
|
enforceWhitelist: true,
|
|
|
|
|
|
dropdown: {
|
|
|
|
|
|
enabled: 0,
|
|
|
|
|
|
maxItems: Infinity,
|
|
|
|
|
|
searchKeys: ["name"]
|
|
|
|
|
|
},
|
|
|
|
|
|
templates: {
|
|
|
|
|
|
dropdownItem: function (tagData) {
|
|
|
|
|
|
return `<div ${this.getAttributes(tagData)} class="tagify__dropdown__item">
|
|
|
|
|
|
<span>${tagData.name}</span>
|
|
|
|
|
|
</div>`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if (selectedCategories.length) {
|
|
|
|
|
|
tagifyCategories.addTags(selectedCategories);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tagifyCategories.on('add', updatePostColorPickerVisibility);
|
|
|
|
|
|
tagifyCategories.on('remove', updatePostColorPickerVisibility);
|
|
|
|
|
|
updatePostColorPickerVisibility();
|
|
|
|
|
|
|
|
|
|
|
|
// Mandanten für Post
|
|
|
|
|
|
var tagifyPostMandants = new Tagify(document.getElementById('postMandantTags'), {
|
|
|
|
|
|
whitelist: postMandantsData,
|
|
|
|
|
|
tagTextProp: 'name',
|
|
|
|
|
|
enforceWhitelist: true,
|
|
|
|
|
|
dropdown: { enabled: 0, maxItems: Infinity, searchKeys: ["name"] },
|
|
|
|
|
|
templates: {
|
|
|
|
|
|
dropdownItem: function (tagData) {
|
|
|
|
|
|
return `<div ${this.getAttributes(tagData)} class="tagify__dropdown__item">
|
|
|
|
|
|
<span>${tagData.name}</span>
|
|
|
|
|
|
</div>`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if (selectedPostMandants.length) {
|
|
|
|
|
|
tagifyPostMandants.addTags(selectedPostMandants);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Departments für Post
|
|
|
|
|
|
var tagifyPostDepartments = new Tagify(document.getElementById('postDepartmentTags'), {
|
|
|
|
|
|
whitelist: postDepartmentsData,
|
|
|
|
|
|
tagTextProp: 'name',
|
|
|
|
|
|
enforceWhitelist: true,
|
|
|
|
|
|
dropdown: { enabled: 0, maxItems: Infinity, searchKeys: ["name"] },
|
|
|
|
|
|
templates: {
|
|
|
|
|
|
dropdownItem: function (tagData) {
|
|
|
|
|
|
return `<div ${this.getAttributes(tagData)} class="tagify__dropdown__item">
|
|
|
|
|
|
<span>${tagData.name}</span>
|
|
|
|
|
|
</div>`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if (selectedPostDepartments.length) {
|
|
|
|
|
|
tagifyPostDepartments.addTags(selectedPostDepartments);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Rollen für Post
|
|
|
|
|
|
var tagifyPostRoles = new Tagify(document.getElementById('postRoleTags'), {
|
|
|
|
|
|
whitelist: postRolesData,
|
|
|
|
|
|
tagTextProp: 'name',
|
|
|
|
|
|
enforceWhitelist: true,
|
|
|
|
|
|
dropdown: { enabled: 0, maxItems: Infinity, searchKeys: ["name"] },
|
|
|
|
|
|
templates: {
|
|
|
|
|
|
dropdownItem: function (tagData) {
|
|
|
|
|
|
return `<div ${this.getAttributes(tagData)} class="tagify__dropdown__item">
|
|
|
|
|
|
<span>${tagData.name}</span>
|
|
|
|
|
|
</div>`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if (selectedPostRoles.length) {
|
|
|
|
|
|
tagifyPostRoles.addTags(selectedPostRoles);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
// Einrichtungen für Post
|
|
|
|
|
|
var tagifyPostEinrichts = new Tagify(document.getElementById('postEinrichtTags'), {
|
|
|
|
|
|
whitelist: postEinrichtsData,
|
|
|
|
|
|
tagTextProp: 'name',
|
|
|
|
|
|
enforceWhitelist: true,
|
|
|
|
|
|
dropdown: { enabled: 0, maxItems: Infinity, searchKeys: ["name"] },
|
|
|
|
|
|
templates: {
|
|
|
|
|
|
dropdownItem: function (tagData) {
|
|
|
|
|
|
return `<div ${this.getAttributes(tagData)} class="tagify__dropdown__item">
|
|
|
|
|
|
<span>${tagData.name}</span>
|
|
|
|
|
|
</div>`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if (selectedPostEinrichts.length) {
|
|
|
|
|
|
tagifyPostEinrichts.addTags(selectedPostEinrichts);
|
|
|
|
|
|
}
|
2026-06-29 10:07:25 +02:00
|
|
|
|
var postEinrichtLinks = <?= json_encode($postEinrichtLinks) ?>;
|
|
|
|
|
|
tagifyPostEinrichts.on('add', function(e) {
|
|
|
|
|
|
var addedId = String(e.detail.data.value);
|
|
|
|
|
|
(postEinrichtLinks[addedId] || []).forEach(function(lid) {
|
|
|
|
|
|
var exists = tagifyPostEinrichts.value.some(function(t) { return String(t.value) === lid; });
|
|
|
|
|
|
if (!exists) {
|
|
|
|
|
|
var item = postEinrichtsData.find(function(d) { return String(d.value) === lid; });
|
|
|
|
|
|
if (item) tagifyPostEinrichts.addTags([item]);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
|
|
|
|
|
|
// Fachbereiche für Post
|
|
|
|
|
|
var tagifyPostFachbereiche = new Tagify(document.getElementById('postFachbereichTags'), {
|
|
|
|
|
|
whitelist: postFachbereicheData,
|
|
|
|
|
|
tagTextProp: 'name',
|
|
|
|
|
|
enforceWhitelist: true,
|
|
|
|
|
|
dropdown: { enabled: 0, maxItems: Infinity, searchKeys: ["name"] },
|
|
|
|
|
|
templates: {
|
|
|
|
|
|
dropdownItem: function (tagData) {
|
|
|
|
|
|
return `<div ${this.getAttributes(tagData)} class="tagify__dropdown__item">
|
|
|
|
|
|
<span>${tagData.name}</span>
|
|
|
|
|
|
</div>`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if (selectedPostFachbereiche.length) {
|
|
|
|
|
|
tagifyPostFachbereiche.addTags(selectedPostFachbereiche);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 08:09:19 +02:00
|
|
|
|
<?php if ($canEditPost ?? false) { ?>
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
$("#saveAllBtn").on("click", function () {
|
|
|
|
|
|
// Während des Speicherns blurren
|
|
|
|
|
|
$("#tab-settings").addClass("blurred");
|
|
|
|
|
|
|
|
|
|
|
|
var postId = $("#post_id").val();
|
|
|
|
|
|
var pdfInline = $("#pdfInlineCheckbox").prop("checked") ? 1 : 0;
|
|
|
|
|
|
var selectedCat = tagifyCategories.value.map(tag => tag.value);
|
|
|
|
|
|
var selectedMandants = tagifyPostMandants.value.map(tag => tag.value);
|
|
|
|
|
|
var selectedDepartments = tagifyPostDepartments.value.map(tag => tag.value);
|
|
|
|
|
|
var selectedRoles = tagifyPostRoles.value.map(tag => tag.value);
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
var selectedEinrichts = tagifyPostEinrichts.value.map(tag => tag.value);
|
|
|
|
|
|
var selectedFachbereiche = tagifyPostFachbereiche.value.map(tag => tag.value);
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
var selectedFormId = $("#postFormSelect").val();
|
|
|
|
|
|
var postBackgroundColor = $("#postBackgroundColor").val();
|
|
|
|
|
|
var postTextColor = $("#postTextColor").val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.when(
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_categories",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
categories: JSON.stringify(selectedCat)
|
|
|
|
|
|
}, "json"),
|
|
|
|
|
|
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_mandants",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
mandants: JSON.stringify(selectedMandants)
|
|
|
|
|
|
}, "json"),
|
|
|
|
|
|
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_form",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
form_id: selectedFormId
|
|
|
|
|
|
}, "json"),
|
|
|
|
|
|
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_departments",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
departments: JSON.stringify(selectedDepartments)
|
|
|
|
|
|
}, "json"),
|
|
|
|
|
|
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_roles",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
roles: JSON.stringify(selectedRoles)
|
|
|
|
|
|
}, "json"),
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_einrichts",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
einrichts: JSON.stringify(selectedEinrichts)
|
|
|
|
|
|
}, "json"),
|
|
|
|
|
|
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_fachbereiche",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
fachbereiche: JSON.stringify(selectedFachbereiche)
|
|
|
|
|
|
}, "json"),
|
|
|
|
|
|
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_pdf_inline",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
pdf_inline: pdfInline
|
|
|
|
|
|
}, "json"),
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "update_post_colors",
|
|
|
|
|
|
post_id: postId,
|
|
|
|
|
|
background_color: postBackgroundColor,
|
|
|
|
|
|
text_color: postTextColor
|
|
|
|
|
|
}, "json")
|
2026-06-22 11:30:05 +02:00
|
|
|
|
).done(function (categoriesResponse, mandantsResponse, formResponse, departmentsResponse, rolesResponse, einrichtsResponse, fachbereicheResponse, pdfInlineResponse, postColorsResponse) {
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
var catSuccess = categoriesResponse[0].success;
|
|
|
|
|
|
var mandantsSuccess = mandantsResponse[0].success;
|
|
|
|
|
|
var formSuccess = formResponse[0].success;
|
|
|
|
|
|
var departmentsSuccess = departmentsResponse[0].success;
|
|
|
|
|
|
var rolesSuccess = rolesResponse[0].success;
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
var einrichtsSuccess = einrichtsResponse[0].success;
|
|
|
|
|
|
var fachbereicheSuccess = fachbereicheResponse[0].success;
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
var pdfInlineSuccess = pdfInlineResponse[0].success;
|
|
|
|
|
|
var postColorsSuccess = postColorsResponse[0].success;
|
|
|
|
|
|
|
2026-06-22 11:30:05 +02:00
|
|
|
|
if (catSuccess && mandantsSuccess && formSuccess && departmentsSuccess && rolesSuccess && einrichtsSuccess && fachbereicheSuccess && pdfInlineSuccess && postColorsSuccess) {
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
showMessage("Alle Daten erfolgreich gespeichert!", true);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var errorMsg = "Fehler beim Speichern:";
|
|
|
|
|
|
if (!catSuccess) errorMsg += " Kategorien";
|
|
|
|
|
|
if (!mandantsSuccess) errorMsg += " Mandanten";
|
|
|
|
|
|
if (!formSuccess) errorMsg += " Formular";
|
|
|
|
|
|
if (!departmentsSuccess) errorMsg += " Departments";
|
|
|
|
|
|
if (!rolesSuccess) errorMsg += " Rollen";
|
Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
(categories_posts_listform, category_posts_widget, post_announcement_listform,
post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
extend target-rule normalization and upsert builder, extend AssignmentResolverService
scope loading and matchesAnyRule to include einricht/fachbereich matching
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
|
|
|
|
if (!einrichtsSuccess) errorMsg += " Einrichtungen";
|
|
|
|
|
|
if (!fachbereicheSuccess) errorMsg += " Fachbereiche";
|
Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:
Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)
Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00
|
|
|
|
if (!pdfInlineSuccess) errorMsg += " PDF Inline Vorschau";
|
|
|
|
|
|
if (!postColorsSuccess) errorMsg += " Farben";
|
|
|
|
|
|
showMessage(errorMsg, false);
|
|
|
|
|
|
}
|
|
|
|
|
|
}).fail(function () {
|
|
|
|
|
|
showMessage("Es ist ein Fehler beim Speichern aufgetreten!", false);
|
|
|
|
|
|
}).always(function () {
|
|
|
|
|
|
$("#tab-settings").removeClass("blurred");
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
// Post löschen
|
|
|
|
|
|
$("#deletePostBtn").on("click", function() {
|
|
|
|
|
|
if (!confirm("<?= addslashes($translation->get("delete_post_confirm")) ?>")) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Ajax-Aufruf an Deinen neuen Case
|
|
|
|
|
|
$.post("/module/knowledgecenter_update/Ajax/Ajax.php", {
|
|
|
|
|
|
action: "delete_post",
|
|
|
|
|
|
post_id: <?=$postId?>
|
|
|
|
|
|
}, function(response) {
|
|
|
|
|
|
if (response.success) {
|
|
|
|
|
|
// Weiterleitung nach dem Löschen, z.B. zurück zur Übersicht
|
|
|
|
|
|
window.location.href = "?action=Category";
|
|
|
|
|
|
} else {
|
|
|
|
|
|
showMessage("Fehler beim Löschen: " + (response.error || "Unbekannter Fehler"), false);
|
|
|
|
|
|
}
|
|
|
|
|
|
}, "json").fail(function() {
|
|
|
|
|
|
showMessage("Serverfehler beim Löschen.", false);
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|