Merge branch 'feature-68957/CIS4_Dashboard_Bookmark_Widget_Sort_Tags' into cis40_2026-02_rc

This commit is contained in:
Harald Bamberger
2026-04-23 11:19:17 +02:00
10 changed files with 940 additions and 34 deletions
+2 -1
View File
@@ -95,6 +95,7 @@ require_once('dbupdate_3.4/71645_studvw_messagetab_ladezeit.php');
require_once('dbupdate_3.4/71566_studienordnungsdokument_neuer_organisationseinheitstyp_programm.php');
require_once('dbupdate_3.4/70376_lohnguide.php');
require_once('dbupdate_3.4/76150_perm_other_lv_plan.php');
require_once('dbupdate_3.4/68957_dashboard_bookmark_neue_Spalte_sort.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -468,7 +469,7 @@ $tabellen=array(
"wawi.tbl_rechnungsbetrag" => array("rechnungsbetrag_id","rechnung_id","mwst","betrag","bezeichnung","ext_id"),
"wawi.tbl_aufteilung" => array("aufteilung_id","bestellung_id","oe_kurzbz","anteil","insertamum","insertvon","updateamum","updatevon"),
"wawi.tbl_aufteilung_default" => array("aufteilung_id","kostenstelle_id","oe_kurzbz","anteil","insertamum","insertvon","updateamum","updatevon"),
"dashboard.tbl_bookmark" => array("bookmark_id","uid","url","title","tag","insertamum","insertvon","updateamum","updatevon"),
"dashboard.tbl_bookmark" => array("bookmark_id","uid","url","title","tag","insertamum","insertvon","updateamum","updatevon","sort"),
);
@@ -0,0 +1,57 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
//Add column sort to dashboard.tbl_bookmark
if(!@$db->db_query("SELECT sort FROM dashboard.tbl_bookmark LIMIT 1")) {
$qry = "ALTER TABLE dashboard.tbl_bookmark ADD COLUMN sort integer DEFAULT NULL;
COMMENT ON COLUMN dashboard.tbl_bookmark.sort IS 'Sort Index for Bookmark.';
";
if (!$db->db_query($qry))
echo '<strong>dashboard.tbl_bookmark ' . $db->db_last_error() . '</strong><br>';
else
echo '<br>Spalte sort zu Tabelle dashboard.tbl_bookmark hinzugefügt';
//add preliminary Sort for all bookmarks if NULL
if(@$db->db_query("SELECT sort FROM dashboard.tbl_bookmark LIMIT 1")) {
$qry = "WITH ranked AS (
SELECT
t1.bookmark_id,
(
SELECT COUNT(*)
FROM dashboard.tbl_bookmark t2
WHERE t2.uid = t1.uid
AND t2.bookmark_id <= t1.bookmark_id
) AS rn
FROM dashboard.tbl_bookmark t1
)
UPDATE dashboard.tbl_bookmark t
SET sort = ranked.rn
FROM ranked
WHERE t.bookmark_id = ranked.bookmark_id
AND t.sort IS NULL;";
if (!$db->db_query($qry))
echo '<strong>dashboard.tbl_bookmark ' . $db->db_last_error() . '</strong><br>';
else
echo '<br>Tabelle dashboard.tbl_bookmark: Spalte sort mit vorläufiger Sortierung befüllt';
}
}
//set column tag to type JSONB
if($result = @$db->db_query("SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='dashboard'
AND TABLE_NAME='tbl_bookmark' AND COLUMN_NAME = 'tag'
AND DATA_TYPE='character varying' AND character_maximum_length='255';"))
{
$qry = "
ALTER TABLE dashboard.tbl_bookmark
ALTER COLUMN tag TYPE jsonb
USING tag::jsonb;
";
if (!$db->db_query($qry))
echo '<strong>dashboard.tbl_bookmark ' . $db->db_last_error() . '</strong><br>';
else
echo '<br>Tabelle dashboard.tbl_bookmark: Spalte tag auf Typ JSONB geändert';
}
+201
View File
@@ -35742,6 +35742,207 @@ array(
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'editFilter',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Filter bearbeiten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'edit Filter',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'filterByTags',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nach Tags Filtern',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'filter by Tags',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'sortDownwards',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nach unten verschieben',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'sort downwards',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'sortToTop',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nach oben verschieben',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'sort to top',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'deleteBookmark',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Lesezeichen löschen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'delete Bookmark',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'editBookmark',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Lesezeichen bearbeiten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'edit Bookmark',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'filterUpdated',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Filteraktion erfolgreich durchgeführt',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'filter updated successfully',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'errorInputNecessary',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Eingabe eines Zeichens erforderlich',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'One character must be entered',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'noFilter',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Kein Filter für Lesezeichen ausgewählt',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No bookmark filter entered',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'headerFilterBookmark',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Lesezeichen filtern',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Filter Bookmarks',
'description' => '',
'insertvon' => 'system'
)
)
),
// BOOKMARK PHRASEN END ----------------------------------------------------------------------
array(
'app' => 'core',
'category' => 'global',