feat(wiki): Kategoriebeschreibungen, Kacheldesign und Migration
- Migrationsskript: Teaser/Content getrennt (kc_teaser id=55 → teaser, kc_article id=58 → content), Gemini-Summaries mit thinkingBudget=0, Retry-Logik für 503/429-Fehler - Berechtigungsfehler behoben: AND active=1 aus main_contact_department- Abfrage entfernt (Middleware + Ajax) - Kategoriebeschreibungen: neues description-Feld in knowledgecenter_category_translations, aus kc.tags befüllt - Kacheln: Hauptebene erhält post_wiki-Klasse für einheitliches Design, Beschreibungstext in Grid-Ansicht, in Listenansicht ausgeblendet - Buttons: Beitrag-erstellen nutzt --clr-mandant, alle vier Toolbar- Buttons auf gleiche Höhe normiert (line-height: 1 + SVG 1em) - Platzhalterpfade für Kategorien und Beiträge korrigiert - Zusammenfassung in Beitragsansicht angezeigt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ $redirectURL = isset($_GET['redirectURL']) ? $_GET['redirectURL'] : '?action=Lis
|
||||
<div id="changeCategoryGridView">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="titlebar-actions">
|
||||
<?php if (get_permission_state('r-wiki', $GLOBALS['main_contact']['master_mandant_id'], $GLOBALS['main_contact']['id']) == 1) { ?>
|
||||
<a href="?action=NewPost&InitialCategory=<?= $_GET["detail"] ?>"
|
||||
title="<?= $translation->get("new_wiki_post") ?>" role="button" class="green">Beitrag erstellen +</a>
|
||||
@@ -59,8 +59,8 @@ $redirectURL = isset($_GET['redirectURL']) ? $_GET['redirectURL'] : '?action=Lis
|
||||
<div id="searchResults"></div>
|
||||
|
||||
<?php
|
||||
$placeholderCategory = '/userdata/intranet/mandant/platzhalter_kategorie.png';
|
||||
$placeholderPost = '/userdata/intranet/mandant/platzhalter.jpg';
|
||||
$placeholderCategory = '/userdata/01_Basic/platzhalter_bild_kategorie.jpg';
|
||||
$placeholderPost = '/userdata/01_Basic/platzhalter_bild.jpg';
|
||||
|
||||
if (isset($_GET['detail'])) {
|
||||
// Detailansicht einer Kategorie:
|
||||
@@ -116,11 +116,12 @@ $redirectURL = isset($_GET['redirectURL']) ? $_GET['redirectURL'] : '?action=Lis
|
||||
* entweder kein Datensatz vorliegt (NULL) oder ob der Wert in den erlaubten Werten enthalten ist.
|
||||
*/
|
||||
$sqlSubs = "
|
||||
SELECT
|
||||
c.id,
|
||||
t.title,
|
||||
SELECT
|
||||
c.id,
|
||||
t.title,
|
||||
t.description,
|
||||
t.image
|
||||
FROM
|
||||
FROM
|
||||
knowledgecenter_category_links AS kcl
|
||||
JOIN
|
||||
knowledgecenter_categories_update AS c ON kcl.child_category_id = c.id
|
||||
@@ -161,6 +162,9 @@ $redirectURL = isset($_GET['redirectURL']) ? $_GET['redirectURL'] : '?action=Lis
|
||||
$imgSrc = !empty($sub['image']) ? '/userdata/' . htmlspecialchars($sub['image']) : $placeholderCategory;
|
||||
echo "<img src='" . $imgSrc . "' alt='Subkategorie Bild'>";
|
||||
echo "<div class='card_title'>" . htmlspecialchars($sub['title'] ?: "Keine Übersetzung vorhanden") . "</div>";
|
||||
if (!empty($sub['description'])) {
|
||||
echo "<div class='card_description'>" . htmlspecialchars($sub['description']) . "</div>";
|
||||
}
|
||||
echo "</div>";
|
||||
echo "</a>";
|
||||
}
|
||||
@@ -267,11 +271,12 @@ $redirectURL = isset($_GET['redirectURL']) ? $_GET['redirectURL'] : '?action=Lis
|
||||
// Übersicht aller Top-Level Kategorien (nicht als Unterkategorie verlinkt)
|
||||
// mit LEFT JOIN zur Filterung anhand der User-Berechtigungen.
|
||||
$sql = "
|
||||
SELECT
|
||||
c.id,
|
||||
t.title,
|
||||
SELECT
|
||||
c.id,
|
||||
t.title,
|
||||
t.description,
|
||||
t.image
|
||||
FROM
|
||||
FROM
|
||||
knowledgecenter_categories_update AS c
|
||||
LEFT JOIN
|
||||
knowledgecenter_category_translations AS t ON c.id = t.category_id AND t.language_id = $languageId
|
||||
@@ -305,11 +310,14 @@ $redirectURL = isset($_GET['redirectURL']) ? $_GET['redirectURL'] : '?action=Lis
|
||||
$route = isset($_GET['route']) ? $_GET['route'] : '';
|
||||
$new_route = $route ? $route . ',' . $row['id'] : $row['id'];
|
||||
|
||||
echo "<a href=\"?detail={$row['id']}&route={$new_route}\">";
|
||||
echo "<a class='post_wiki category_post' href=\"?detail={$row['id']}&route={$new_route}\">";
|
||||
echo "<div class='category'>";
|
||||
$imgSrc = !empty($row['image']) ? '/userdata/' . htmlspecialchars($row['image']) : $placeholderCategory;
|
||||
echo "<img src='" . $imgSrc . "' alt='Kategorie Bild'>";
|
||||
echo "<div class='card_title'>" . htmlspecialchars($row['title'] ?: "Keine Übersetzung vorhanden") . "</div>";
|
||||
if (!empty($row['description'])) {
|
||||
echo "<div class='card_description'>" . htmlspecialchars($row['description']) . "</div>";
|
||||
}
|
||||
echo "</div>";
|
||||
echo "</a>";
|
||||
}
|
||||
|
||||
@@ -211,6 +211,15 @@
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!empty($currentVersion['summary'])): ?>
|
||||
<div class="post-aside-section post-summary-section">
|
||||
<h3>Zusammenfassung</h3>
|
||||
<div class="post-summary">
|
||||
<p><?= nl2br(htmlspecialchars($currentVersion['summary'])) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="filesContainer"></div>
|
||||
<div id="contactsContainer"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user