diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js
index 914b35106..2ba999007 100644
--- a/public/js/components/Cis/Cms/Content.js
+++ b/public/js/components/Cis/Cms/Content.js
@@ -53,7 +53,7 @@ export default {
},
template: /*html*/ `
-
+
No content is available to display
`,
};
diff --git a/public/js/components/Cis/Cms/ContentModal.js b/public/js/components/Cis/Cms/ContentModal.js
index b1b46530f..87aaf98f9 100644
--- a/public/js/components/Cis/Cms/ContentModal.js
+++ b/public/js/components/Cis/Cms/ContentModal.js
@@ -12,7 +12,7 @@ export default {
RaumContent,
},
props:{
- contentID:{
+ content_id:{
type: Number
},
ort_kurzbz:{
@@ -34,8 +34,8 @@ export default {
// this method is always called when the modal is shown
modalShown: function(){
- if(this.contentID){
- this.$fhcApi.factory.cms.content(this.contentID).then(res =>{
+ if(this.content_id){
+ this.$fhcApi.factory.cms.content(this.content_id).then(res =>{
this.content = res.data.content;
this.type = res.data.type;
@@ -55,7 +55,7 @@ export default {
Raum Informationen
-
+
Der Content für diesen Raum konnte nicht geladen werden
diff --git a/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js b/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js
index 948fca79f..0ca826616 100644
--- a/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js
+++ b/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js
@@ -5,6 +5,9 @@ export default {
type:String,
required:true,
},
+ content_id:{
+ type:Number,
+ }
},
mounted(){
// replaces the tablesorter with the tabulator
@@ -21,6 +24,34 @@ export default {
}
})
}
+
+ // tries to wrap the Raum titel with a link tag that redirects to the Reservierungen of that Raum
+ let title = document.getElementsByTagName("h1");
+ title = title.length ? title[0] : null;
+ if (title)
+ {
+ let room_name = title.innerText;
+ let room_name_reg_exp = new RegExp("\\w*\\s([a-zA-Z][0-9\\.]+)$");
+ let room_name_reg_exp_result = room_name.match(room_name_reg_exp);
+ if(room_name_reg_exp_result)
+ {
+ room_name = room_name_reg_exp_result[0];
+ room_name = room_name.replace(" ","_");
+ let link_element = document.createElement("a");
+ link_element.href = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/CisVue/Cms/getRoomInformation/" + room_name;
+ link_element.appendChild(title.cloneNode(true));
+ title.replaceWith(link_element);
+ }
+ else
+ {
+ console.error(`the regular expression did not match the room name: ${room_name}`);
+ }
+
+ }
+ else
+ {
+ console.error(`was not able to get the title of the raum_contentmittitel by searching for the first h1 element`);
+ }
},
template: /*html*/ `
diff --git a/public/js/components/DashboardWidget/Stundenplan.js b/public/js/components/DashboardWidget/Stundenplan.js
index 8f046fdca..7cba441be 100644
--- a/public/js/components/DashboardWidget/Stundenplan.js
+++ b/public/js/components/DashboardWidget/Stundenplan.js
@@ -188,7 +188,7 @@ export default {
template: /*html*/`
-
+