diff --git a/application/controllers/Cis4.php b/application/controllers/Cis4.php index f82168f83..84aedc5f2 100644 --- a/application/controllers/Cis4.php +++ b/application/controllers/Cis4.php @@ -34,7 +34,10 @@ class Cis4 extends Auth_Controller show_error("name couldn't be loaded for username ".getAuthUID()); } $begruesung = getData($begruesung); + $viewData = array( + 'name' => $begruesung + ); - $this->load->view('CisVue/Dashboard.php',["name"=> $begruesung]); + $this->load->view('CisVue/Dashboard.php',['viewData' => $viewData]); } } \ No newline at end of file diff --git a/application/controllers/CisVue/Dashboard.php b/application/controllers/CisVue/Dashboard.php index 5a0996a96..5cb0d1a9e 100644 --- a/application/controllers/CisVue/Dashboard.php +++ b/application/controllers/CisVue/Dashboard.php @@ -35,7 +35,11 @@ class Dashboard extends Auth_Controller show_error("name couldn't be loaded for username ".getAuthUID()); } $begruesung = getData($begruesung); - $this->load->view('CisVue/Dashboard.php',["name"=> $begruesung]); + $viewData = array( + 'name' => $begruesung + ); + + $this->load->view('CisVue/Dashboard.php', ['viewData' => $viewData]); } } \ No newline at end of file diff --git a/application/libraries/SearchBarLib.php b/application/libraries/SearchBarLib.php index 60f22f51a..573bd7451 100644 --- a/application/libraries/SearchBarLib.php +++ b/application/libraries/SearchBarLib.php @@ -178,6 +178,7 @@ class SearchBarLib protected function buildSearchClause(DB_Model $dbModel, array $columns, $searchstr) { + $searchstr = preg_replace('/[[:punct:]]/', ' ', $searchstr); $document = implode(' || \' \' || ', $columns); $query = '\'' . implode(':* & ', explode(' ', trim($searchstr))) . ':*\''; $reversequery = '\'*:' . implode(' & *:', explode(' ', trim($searchstr))) . '\''; @@ -297,13 +298,15 @@ EOSC; AND (datum_bis IS NULL OR datum_bis >= NOW()) AND b.aktiv = TRUE ) bfLeader ON(bfLeader.oe_kurzbz = o.oe_kurzbz) - WHERE ' . + WHERE + o.aktiv = true + AND (' . $this->buildSearchClause( $dbModel, array('o.oe_kurzbz', 'o.bezeichnung', 'ot.bezeichnung'), $searchstr ) . - ' + ') GROUP BY type, o.oe_kurzbz, o.bezeichnung, ot.bezeichnung, oParent.oe_kurzbz, oParent.bezeichnung, otParent.bezeichnung '); @@ -507,8 +510,17 @@ EOSC; FROM public.tbl_standort LEFT JOIN public.tbl_adresse USING(adresse_id) ) standort USING(standort_id) - WHERE LOWER(ort.ort_kurzbz) like LOWER(\'%'. $searchstr . '%\') ' - + WHERE + ort.aktiv = true + AND + ort.lehre = true + AND (' . + $this->buildSearchClause( + $dbModel, + array('ort.ort_kurzbz', 'ort.bezeichnung'), + $searchstr + ) . + ')' ); // If something has been found diff --git a/application/views/CisVue/Dashboard.php b/application/views/CisVue/Dashboard.php index 4b10d94cc..2f241af87 100644 --- a/application/views/CisVue/Dashboard.php +++ b/application/views/CisVue/Dashboard.php @@ -13,9 +13,7 @@ $this->load->view('templates/CISVUE-Header', $includesArray); ?>
-

Hallo !

-
- +
load->view('templates/CISVUE-Footer', $includesArray); ?> diff --git a/public/css/Cis4/Cis.css b/public/css/Cis4/Cis.css index 380951b21..2f495cc41 100644 --- a/public/css/Cis4/Cis.css +++ b/public/css/Cis4/Cis.css @@ -473,4 +473,45 @@ html { transition-property: background,color; transition-duration: 0.3s,0.2s; transition-timing-function: ease-out,ease-out; +} +@media screen and ( max-width: 767px ) { + #nav-search { + position: static; + } + + #nav-search .searchbar_results { + top: 100%; + width: 98vw !important; + left: 1vw !important; + right: 1vw !important; + } +} + +@media screen and ( max-width: 576px ) { + .searchbar_icon img { + max-width: 65px !important; + } + + .searchbar_icon i { + font-size: 3em !important; + } + + .searchbar_grid { + grid-template-columns: [icon] 75px [data] auto; + } + + .searchbar_table, + .searchbar_tablerow, + .searchbar_tablecell { + display: block; + } + + .searchbar_tablecell.searchbar_label { + font-weight: bold; + } + + .searchbar_tablecell.searchbar_value { + padding-left: 2.5rem; + overflow-wrap: anywhere; + } } \ No newline at end of file diff --git a/public/css/Studentenverwaltung.css b/public/css/Studentenverwaltung.css index efa4dbb1a..f179c3667 100644 --- a/public/css/Studentenverwaltung.css +++ b/public/css/Studentenverwaltung.css @@ -1,5 +1,5 @@ @import './Fhc.css'; -@import './components/searchbar.css'; +@import './components/searchbar/searchbar.css'; @import './components/verticalsplit.css'; @import './components/FilterComponent.css'; @import './components/Tabs.css'; diff --git a/public/css/components/calendar.css b/public/css/components/calendar.css index d7053d5e2..26d616616 100644 --- a/public/css/components/calendar.css +++ b/public/css/components/calendar.css @@ -134,7 +134,7 @@ .fhc-calendar-lg .fhc-calendar-month-page-day .events, .fhc-calendar-md .fhc-calendar-month-page-day .events { display: block; - overflow: scroll; + overflow: auto; font-size: 0.7em; } .fhc-calendar-lg .fhc-calendar-month-page-day .events span, diff --git a/public/css/components/searchbar/searchbar.css b/public/css/components/searchbar/searchbar.css index 5b718a90e..a4476e7c5 100644 --- a/public/css/components/searchbar/searchbar.css +++ b/public/css/components/searchbar/searchbar.css @@ -21,14 +21,18 @@ z-index: 9998; background-color: #fff; border: 1px solid lightgrey; - padding: 1rem; - overflow-y: auto; + padding: .5rem; top: 100%; width: 100%; left: 0; right: 0; } +.searchbar_results_scroller { + overflow-y: auto; + overscroll-behavior: none; +} + .searchbar_result { border-bottom: 1px solid lightgrey; margin-bottom: 1rem; @@ -104,4 +108,4 @@ -webkit-user-select: none; /* Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE/Edge */ - } \ No newline at end of file + } diff --git a/public/js/apps/Cis.js b/public/js/apps/Cis.js index fbb83ab57..92c1b9ec7 100644 --- a/public/js/apps/Cis.js +++ b/public/js/apps/Cis.js @@ -15,6 +15,7 @@ const app = Vue.createApp({ return { searchbaroptions: { cssclass: "", + calcheightonly: true, types: [ "mitarbeiter", "raum", @@ -75,9 +76,16 @@ const app = Vue.createApp({ }, organisationunit: { defaultaction: { - type: "function", + type: "link", + renderif: function(data) { + if(data.mailgroup) { + return true; + } + return false; + }, action: function(data) { - alert('organisationunit defaultaction ' + JSON.stringify(data)); + const link = 'mailto:' + data.mailgroup; + return link; } }, childactions: [] diff --git a/public/js/components/Calendar/Header.js b/public/js/components/Calendar/Header.js index 8cb047919..a62d68f5c 100644 --- a/public/js/components/Calendar/Header.js +++ b/public/js/components/Calendar/Header.js @@ -48,7 +48,7 @@ export default { template: /*html*/`
-
+
diff --git a/public/js/components/Dashboard/Dashboard.js b/public/js/components/Dashboard/Dashboard.js index 8bf1b9051..d96b20e16 100644 --- a/public/js/components/Dashboard/Dashboard.js +++ b/public/js/components/Dashboard/Dashboard.js @@ -9,11 +9,21 @@ export default { }, props: [ "dashboard", + "viewDataString" ], - data: () => ({ - sections: [], - widgets: null - }), + data() { + return { + sections: [], + widgets: null, + viewData: JSON.parse(this.viewDataString), + editMode: false + } + }, + provide() { + return { + editMode: Vue.computed(()=>this.editMode), + } + }, computed: { apiurl() { return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/dashboard'; @@ -142,6 +152,10 @@ export default { }, template: `
+

+ {{ $p.t('global/personalGreeting', [ viewData?.name ]) }} + +

` diff --git a/public/js/components/Dashboard/Item.js b/public/js/components/Dashboard/Item.js index deb55ed2b..8546490e0 100644 --- a/public/js/components/Dashboard/Item.js +++ b/public/js/components/Dashboard/Item.js @@ -43,6 +43,10 @@ export default { }, }, methods: { + getWidgetC4Link(widget) { + return (FHC_JS_DATA_STORAGE_OBJECT.app_root + + FHC_JS_DATA_STORAGE_OBJECT.ci_router + widget.setup.cis4link) + }, handleShowBsModal() { this.$emit('configOpened') }, @@ -113,19 +117,22 @@ export default {
-
- - {{ widget.setup.name }} +
+ + {{ widget.setup.name }} + + + - + -
+
-
- +
+
diff --git a/public/js/components/Dashboard/Section.js b/public/js/components/Dashboard/Section.js index 3fbc40af6..d4ecf9244 100644 --- a/public/js/components/Dashboard/Section.js +++ b/public/js/components/Dashboard/Section.js @@ -12,12 +12,15 @@ export default { adminMode: { type: Boolean, default: false + }, + editMode: { + type: Boolean, + default: false } }, props: [ "name", - "widgets", - "seperator" + "widgets" ], emits: [ "widgetAdd", @@ -29,10 +32,19 @@ export default { configOpened: false, gridWidth: 1, gridHeight: null, - editMode: this.adminMode + } + }, + provide() { + return { + editModeIsActive: Vue.computed(() => + this.editModeIsActive + ), } }, computed: { + editModeIsActive() { + return (this.editMode || this.adminMode) && !this.configOpened + }, getSectionStyle() { return 'margin-bottom: 8px;'; }, @@ -181,13 +193,8 @@ export default { }); }, template: ` -
-

- {{$p.t('ui/section' + name)}} - -

- +