From 970744464dfff4764075f1339cfc5054853c6489 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 18 Jul 2019 16:33:01 +0200 Subject: [PATCH 1/4] Added jqueryui to home.php, now required from AjaxLib.js --- application/views/home.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/views/home.php b/application/views/home.php index d00b98f81..79669dd88 100644 --- a/application/views/home.php +++ b/application/views/home.php @@ -3,6 +3,7 @@ $this->load->view('templates/FHC-Header', array( 'title' => 'FH-Complete', 'jquery' => true, + 'jqueryui' => true, 'bootstrap' => true, 'fontawesome' => true, 'sbadmintemplate' => true, From c6dd9199c82c5551155e93d57c34eb74b3aa9531 Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Fri, 26 Jul 2019 13:40:33 +0200 Subject: [PATCH 2/4] =?UTF-8?q?=C3=9Cbersichtsseite,=20wo=20Contents=20ver?= =?UTF-8?q?wendet=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/content_uebersicht.php | 221 +++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 cms/content_uebersicht.php diff --git a/cms/content_uebersicht.php b/cms/content_uebersicht.php new file mode 100644 index 000000000..2752efecc --- /dev/null +++ b/cms/content_uebersicht.php @@ -0,0 +1,221 @@ +, + * Andreas Oesterreicher and + * Karl Burkhart . + */ +/** + * Zeigt eine Übersichtsliste für alle Content-Einträge an + */ +require_once('../config/cis.config.inc.php'); +require_once('../config/global.config.inc.php'); +require_once('../include/content.class.php'); +require_once('../include/template.class.php'); +require_once('../include/functions.inc.php'); +require_once('../include/phrasen.class.php'); + +$db = new basis_db(); + +echo ' + + + '; + + include('../include/meta/jquery.php'); + include('../include/meta/jquery-tablesorter.php'); + +echo ' + + + +
+

Content-Übersicht

'; + echo '

'; + echo ''; + echo ' + + + + + + + + + + + + '; + echo ''; + +$qry = " +SELECT + content.content_id, + tbl_contentsprache.titel, + content.template_kurzbz, + content.oe_kurzbz, + content.aktiv, + content.insertamum||' von '||content.insertvon AS content_eingefuegt, + content.updateamum||' von '||content.updatevon AS content_aktualisiert, + ( + SELECT ARRAY_TO_STRING(array_agg(verwendung), '
') AS verwendung_in + FROM ( + SELECT + 'Infoscreen ID'||infoscreen_id AS art + FROM campus.tbl_infoscreen_content + WHERE content_id=content.content_id + + UNION + + SELECT + 'Software ID'||software_id AS art + FROM addon.tbl_software + WHERE content_id=content.content_id + + UNION + + SELECT + 'Ort '||ort_kurzbz AS art + FROM public.tbl_ort + WHERE content_id=content.content_id + + UNION + + SELECT + 'Service ID'||service_id AS art + FROM public.tbl_service + WHERE content_id=content.content_id + + UNION + + SELECT + 'Statistik '||statistik_kurzbz AS art + FROM public.tbl_statistik + WHERE content_id=content.content_id + + UNION + + SELECT + 'Gebiet '||tbl_gebiet.bezeichnung||' in Studiengang '||tbl_ablauf.studiengang_kz AS art + FROM testtool.tbl_ablauf_vorgaben + JOIN testtool.tbl_ablauf USING (ablauf_vorgaben_id) + JOIN testtool.tbl_gebiet USING (gebiet_id) + WHERE content_id=content.content_id + + UNION + + SELECT + 'Verlinkung von '||content_id AS art + FROM campus.tbl_contentsprache + WHERE content::text LIKE '%content.php?content_id='||content.content_id||'%' + /*WHERE content::text ~* '[\w\d\s]*content\.php\?content_id=1245[\w\d\s]*'*/ + ) verwendung + ) AS verwendung_in, + tbl_contentsprache.sprache, + tbl_contentsprache.version, + tbl_contentsprache.insertamum||' von '||tbl_contentsprache.insertvon AS contentsprache_eingefuegt, + tbl_contentsprache.updateamum||' von '||tbl_contentsprache.updatevon AS contentsprache_aktualisiert, + tbl_contentsprache.sichtbar +FROM campus.tbl_content content + JOIN campus.tbl_contentsprache USING (content_id) +WHERE version=campus.get_highest_content_version (content.content_id) +AND template_kurzbz NOT IN ('news') +/*ORDER BY content_id ASC, sprache DESC, version DESC +LIMIT 200*/"; + +if($db->db_query($qry)) +{ + while ($row = $db->db_fetch_object()) + { + echo ' + + + + + + + + + + + + + + + '; + } +} +echo '
Content IDTitelArtOEContent-AktivEingefügtAktualisiertVerwendet inSpracheVersionEingefügtAktualisiertVersion sichtbar
'.$row->content_id.''.$row->titel.''.$row->template_kurzbz.''.$row->oe_kurzbz.''.($row->aktiv == 't' ? 'Ja':'Nein').''.$row->content_eingefuegt.''.$row->content_aktualisiert.''.$row->verwendung_in.''.$row->sprache.''.$row->version.''.$row->contentsprache_eingefuegt.''.$row->contentsprache_aktualisiert.''.($row->sichtbar == 't' ? 'Ja':'Nein').'
'; +echo '
+ '; + + +?> \ No newline at end of file From c3a3125e49ad9b1567a690171104c6926eae1a98 Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Fri, 26 Jul 2019 13:41:19 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Suche=20nach=20direkten=20IDs=20vor=C3=BCbe?= =?UTF-8?q?rgehend=20auskommentiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/dms.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dms.class.php b/include/dms.class.php index 98cfbdd9a..01e7e2498 100644 --- a/include/dms.class.php +++ b/include/dms.class.php @@ -746,13 +746,13 @@ class dms extends basis_db JOIN campus.tbl_dms_version USING(dms_id) JOIN campus.tbl_dms_kategorie USING (kategorie_kurzbz)"; // Wenn erstes Zeichen # ist, dieses wegkürzen und checken ob der Rest numerisch ist. Dann nach eindeutiger ID suchen - if (substr($suchstring, 0, 1) == '#') + /*if (substr($suchstring, 0, 1) == '#') { $suchstring = substr($suchstring, 1); if (is_numeric($suchstring)) $qry .= " WHERE tbl_dms.dms_id = ".$this->db_add_param($suchstring, FHC_INTEGER); } - else + else*/ { $qry .= " WHERE lower(name) like lower('%".$this->db_escape($suchstring)."%') OR lower(tbl_dms_version.beschreibung) like lower('%".$this->db_escape($suchstring)."%') From 9faa2e0077c8f62f13ae4524a58b46d4afb176bd Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Fri, 26 Jul 2019 13:42:05 +0200 Subject: [PATCH 4/4] Gruppenverwaltung: Direktsuche nach Gruppen implementiert --- include/gruppe.class.php | 5 +++++ vilesci/lehre/einheit_menu.php | 29 +++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/include/gruppe.class.php b/include/gruppe.class.php index 975d82533..b92be4085 100644 --- a/include/gruppe.class.php +++ b/include/gruppe.class.php @@ -649,6 +649,11 @@ class gruppe extends basis_db */ public function searchGruppen($searchItems, $aktiv = true, $limit = null) { + if (!is_array($searchItems)) + { + $this->errormsg = '$searchItems muss ein Array sein'; + return false; + } $qry = "SELECT * FROM diff --git a/vilesci/lehre/einheit_menu.php b/vilesci/lehre/einheit_menu.php index 86a024830..86cbe7187 100644 --- a/vilesci/lehre/einheit_menu.php +++ b/vilesci/lehre/einheit_menu.php @@ -48,6 +48,15 @@ if ($studiengang_kz != '') $oe_studiengang = ''; } +if (isset($_GET['searchItems'])) +{ + $searchItems = explode(' ', trim($_GET['searchItems'])); +} +else +{ + $searchItems = array(); +} + if (isset($_GET['sem'])) $sem=$_GET['sem']; @@ -167,7 +176,7 @@ else function printDropDown() { - global $rechte, $studiengang_kz; + global $rechte, $studiengang_kz, $searchItems; //Studiengang Drop Down anzeigen $types = new studiengang(); $types->getAllTypes(); @@ -199,7 +208,10 @@ function printDropDown() } } - echo ''; + echo ''; + echo '
oder
'; + echo 'Suche: '; + echo ''; echo ''; } function doSave() @@ -408,13 +420,22 @@ function doEdit($kurzbz,$new=false) function getUebersicht() { - global $studiengang_kz, $semester, $rechte; + global $studiengang_kz, $semester, $rechte, $searchItems; if (!$db = new basis_db()) die('Es konnte keine Verbindung zum Server aufgebaut werden.'); $gruppe=new gruppe(); + // Wenn $searchstring gesetz ist, nach gruppe suchen, sonst gruppe mit $studiengang_kz un $semester laden + if (!empty($searchItems)) + { + $gruppe->searchGruppen($searchItems, null, null); + } + else + { + $gruppe->getgruppe($studiengang_kz,$semester); + } // Array mit allen Einheiten holen - $gruppe->getgruppe($studiengang_kz,$semester); + echo '

Übersicht

'; echo '';