diff --git a/application/controllers/api/frontend/v1/Ort.php b/application/controllers/api/frontend/v1/Ort.php
index 2bc0f945b..8c4059824 100644
--- a/application/controllers/api/frontend/v1/Ort.php
+++ b/application/controllers/api/frontend/v1/Ort.php
@@ -33,7 +33,8 @@ class Ort extends FHCAPI_Controller
{
// NOTE(chris): additional permission checks will be done in SearchBarLib
parent::__construct([
- 'ContentID' => self::PERM_LOGGED
+ 'ContentID' => self::PERM_LOGGED,
+ 'getOrtKurzbzContent' => self::PERM_LOGGED,
]);
$this->load->model('ressource/Ort_model', 'OrtModel');
@@ -67,5 +68,28 @@ class Ort extends FHCAPI_Controller
$this->terminateWithSuccess($result->content_id ?? NULL);
}
+
+ /**
+ * @param int $version
+ * @param string $sprache
+ * @param boolean $sichtbar
+ *
+ * @return $content
+ */
+ public function getOrtKurzbzContent($version = null, $sprache = null, $sichtbar = true)
+ {
+ $content_id = $this->input->get("content_id",TRUE);
+
+ $this->load->library('CmsLib');
+
+ $content = $this->cmslib->getContent($content_id, $version, $sprache, $sichtbar);
+
+ if (isError($content))
+ $this->terminateWithError(getError($content), self::ERROR_TYPE_GENERAL);
+
+ $content = hasData($content) ? getData($content) : null;
+
+ $this->terminateWithSuccess($content);
+ }
}
diff --git a/public/js/api/ort.js b/public/js/api/ort.js
index 32f114565..c92ac0be0 100644
--- a/public/js/api/ort.js
+++ b/public/js/api/ort.js
@@ -1,5 +1,5 @@
export default {
- getContentID($ort_kurbz) {
+ getContentID($ort_kurbz) {
return this.$fhcApi.get(
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
@@ -7,4 +7,12 @@ export default {
{ ort_kurzbz: $ort_kurbz }
);
},
+ getOrtKuzbzContent($ort_kurzbz_content_id) {
+ return this.$fhcApi.get(
+ FHC_JS_DATA_STORAGE_OBJECT.app_root +
+ FHC_JS_DATA_STORAGE_OBJECT.ci_router +
+ "/api/frontend/v1/Ort/getOrtKurzbzContent",
+ { content_id: $ort_kurzbz_content_id }
+ );
+ },
}
\ No newline at end of file
diff --git a/public/js/components/Cis/Cms/ContentModal.js b/public/js/components/Cis/Cms/ContentModal.js
new file mode 100644
index 000000000..3613648ee
--- /dev/null
+++ b/public/js/components/Cis/Cms/ContentModal.js
@@ -0,0 +1,47 @@
+import BsModal from "../../Bootstrap/Modal";
+
+
+export default {
+
+
+ mixins:[BsModal],
+
+ components:{
+ BsModal,
+ },
+ data(){
+ return{
+ content_id:null,
+ content:null,
+ ort_kurzbz:null,
+ result: false,
+ };
+ },
+ methods:{
+ modalShown: function(){
+
+ }
+ },
+ mounted(){
+ this.modal = this.$refs.modalContainer;
+ document.addEventListener("show.bs.modal", function(){
+ console.log("modal is shown inside the mounted hook")
+ })
+ },
+
+ template:/*html*/`
+