diff --git a/packages/@mapomodule/uikit/components/Detail/Detail.vue b/packages/@mapomodule/uikit/components/Detail/Detail.vue
index c3325757..e0c3f8ec 100644
--- a/packages/@mapomodule/uikit/components/Detail/Detail.vue
+++ b/packages/@mapomodule/uikit/components/Detail/Detail.vue
@@ -116,6 +116,14 @@
>{{ $t("mapo.delete") }}
+
+
+
+
+
@@ -281,6 +289,11 @@ export default {
return ["auto", "force", "disable"].indexOf(value) !== -1;
},
},
+ // The name of the field that contains the url of the page preview. [optional]
+ previewField: {
+ type: String,
+ required: false,
+ },
// This forces the detail page to be readonly.
readonly: Boolean
},
@@ -491,6 +504,9 @@ export default {
hasDiff() {
return !!(this.modelDiff && Object.keys(this.modelDiff).length > 0);
},
+ previewUrl() {
+ return this.previewField ? this.model[this.previewField] : null;
+ },
},
async mounted() {
if (this.identifier && this.identifier !== "new") {
diff --git a/packages/@mapomodule/uikit/components/PagePreview.vue b/packages/@mapomodule/uikit/components/PagePreview.vue
new file mode 100644
index 00000000..ac925ad2
--- /dev/null
+++ b/packages/@mapomodule/uikit/components/PagePreview.vue
@@ -0,0 +1,58 @@
+
+
+
+
+ {{ $t("mapo.showPreview") }}
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/@mapomodule/uikit/translations/en-US.js b/packages/@mapomodule/uikit/translations/en-US.js
index 89485f51..28659fc4 100644
--- a/packages/@mapomodule/uikit/translations/en-US.js
+++ b/packages/@mapomodule/uikit/translations/en-US.js
@@ -40,6 +40,7 @@ export default {
altTag: "Alt Tag",
titleTag: "Title Tag",
linkedModels: "Linked Models",
+ showPreview: "Show preview",
searchLocation: "Search location",
latitude: "Latitude",
longitude: "Longitude",
diff --git a/packages/@mapomodule/uikit/translations/it-IT.js b/packages/@mapomodule/uikit/translations/it-IT.js
index 9d172664..5a7c60c1 100644
--- a/packages/@mapomodule/uikit/translations/it-IT.js
+++ b/packages/@mapomodule/uikit/translations/it-IT.js
@@ -41,6 +41,7 @@ export default {
altTag: "Alt Tag",
titleTag: "Title Tag",
linkedModels: "Modelli collegati",
+ showPreview: "Mostra anteprima",
searchLocation: "Cerca luogo",
latitude: "Latitudine",
longitude: "Longitudine",