diff --git a/src/main/java/de/mikromedia/webpages/WebpagePlugin.java b/src/main/java/de/mikromedia/webpages/WebpagePlugin.java index ccb82b8..584b146 100644 --- a/src/main/java/de/mikromedia/webpages/WebpagePlugin.java +++ b/src/main/java/de/mikromedia/webpages/WebpagePlugin.java @@ -231,7 +231,7 @@ public Viewable getWebpage(@PathParam("pageWebAlias") String webAlias) { dmx.fireEvent(CUSTOM_ROOT_RESOURCE_REQUESTED, context(), website, pageAlias, uriInfo); return getWebsiteTemplate(website, pageAlias); } - // 3) if no website frontpage exist for that prefix, we continue with our standard website for page preparation + // 3) if no website (frontpage) exist for that prefix, we continue with our standard website for page preparation website = getStandardWebsite(); dmx.fireEvent(WEBPAGE_REQUESTED, context(), pageAlias, STANDARD_WEBSITE_PREFIX); log.info("Preparing STANDARD FRONTPAGE view data in dmx-webpages plugin..."); @@ -239,10 +239,12 @@ public Viewable getWebpage(@PathParam("pageWebAlias") String webAlias) { // 4) check for existing pageAlias and fetch and return that webpage Webpage webpage = getWebsitesWebpage(website, pageAlias); if (webpage != null) { - log.info("Preparing WEBPAGE view data \""+webpage.getTitle().toString()+"\" ..."); - prepareGenericViewData(SIMPLE_PAGE_TEMPLATE_NAME, STANDARD_WEBSITE_PREFIX, pageAlias); + Topic htmlTemplate = webpage.getHTMLTemplate(); + String templateFilename = getTemplateFileName(htmlTemplate); + log.info("Preparing WEBPAGE view data \""+webpage.getTitle().toString()+"\" for template=\"" + templateFilename + "\""); + prepareGenericViewData(templateFilename, STANDARD_WEBSITE_PREFIX, pageAlias); preparePageViewData(webpage); - return getWebpageTemplate(webpage); + return getWebpageTemplate(webpage, templateFilename); } log.fine("=> /" + pageAlias + " webpage for standard website not found."); // 5) Check for redirects related to "standard" webpage @@ -267,19 +269,20 @@ public Viewable getWebpage(@PathParam("pageWebAlias") String webAlias) { public Viewable getWebsitePage(@PathParam("site") String sitePrefix, @PathParam("pageWebAlias") String webAlias) { String pageAlias = webAlias.trim(); String location = "/" + sitePrefix + "/" + webAlias; - // 1) Fetch some website topic + // 1) Query for website topic Topic usersWebsite = getWebsiteByPrefix(sitePrefix); - if (usersWebsite != null) { - prepareGenericViewData(SIMPLE_PAGE_TEMPLATE_NAME, sitePrefix, pageAlias); - prepareWebsiteViewData(usersWebsite, location); - } - // 2) check related webpages + // 2) Check related webpages Webpage webpage = getWebsitesWebpage(usersWebsite, pageAlias); - if (webpage != null) { + if (webpage != null && usersWebsite != null) { + Topic htmlTemplate = webpage.getHTMLTemplate(); + String templateFilename = getTemplateFileName(htmlTemplate); + prepareGenericViewData(templateFilename, sitePrefix, pageAlias); + prepareWebsiteViewData(usersWebsite, pageAlias); + log.info("Preparing WEBPAGE view data \""+webpage.getTitle().toString()+"\" for template=\"" + templateFilename + + "\", website=\"" + sitePrefix +"\""); dmx.fireEvent(WEBPAGE_REQUESTED, context(), pageAlias, sitePrefix); - log.info("Preparing WEBPAGE view data \""+webpage.getTitle().toString()+"\" ..."); preparePageViewData(webpage); - return getWebpageTemplate(webpage); + return getWebpageTemplate(webpage, templateFilename); } log.info("=> /" + pageAlias + " webpage for \"" +sitePrefix+ "\"s website not found."); // 3) check if it is a users redirect @@ -817,14 +820,14 @@ private Viewable getCustomRootResourcePage(String pageAlias) { return null; } - private Viewable getWebpageTemplate(Webpage page) { + private Viewable getWebpageTemplate(Webpage page, String templateName) { try { // while logged in users can (potentially) browse a drafted webpage if (isNotAllowedToAccessDraft(page)) { log.fine("401 => /" + page.getWebAlias() + " is a DRAFT (yet unpublished)"); return view("401"); } else { - return view(SIMPLE_PAGE_TEMPLATE_NAME); + return view(templateName); } } catch (RuntimeException re) { throw new RuntimeException("Page Template for Webpage Topic (ID: " @@ -1004,6 +1007,11 @@ public int compare(Section s1, Section s2) { return all; } + private String getTemplateFileName(Topic templateName) { + if (templateName == null) return SIMPLE_PAGE_TEMPLATE_NAME; + return templateName.getUri().substring("de.mikromedia.template_".length()); + } + @Override public void overrideFrontpageTemplate(String fileName) { this.frontPageTemplateName = fileName; diff --git a/src/main/java/de/mikromedia/webpages/WebpageService.java b/src/main/java/de/mikromedia/webpages/WebpageService.java index ed970dd..0164a39 100644 --- a/src/main/java/de/mikromedia/webpages/WebpageService.java +++ b/src/main/java/de/mikromedia/webpages/WebpageService.java @@ -33,6 +33,7 @@ public interface WebpageService { public static final String CUSTOM_SCRIPT_PATH = "de.mikromedia.javascript_path"; public static final String WEBPAGE_ALIAS = "de.mikromedia.page.web_alias"; public static final String WEBPAGE_IS_DRAFT = "de.mikromedia.page.is_draft"; + public static final String WEBPAGE_TEMPLATE = "de.mikromedia.page.template"; // ### TODO: Switch to related "Person" topics for authorship public static final String AUTHOR_NAME = "de.mikromedia.page.author_name"; diff --git a/src/main/java/de/mikromedia/webpages/migrations/Migration19.java b/src/main/java/de/mikromedia/webpages/migrations/Migration19.java index 2048e22..217136b 100644 --- a/src/main/java/de/mikromedia/webpages/migrations/Migration19.java +++ b/src/main/java/de/mikromedia/webpages/migrations/Migration19.java @@ -24,9 +24,8 @@ public void run () { Topic webpagesWorkspace = dmx.getPrivilegedAccess().getWorkspace(WebpagePlugin.WEBPAGES_WS_URI); TopicType site = dmx.getTopicType("de.mikromedia.site"); - DMXType assocDef = site.addCompDef(mf.newCompDefModel(site.getUri(), "de.mikromedia.site.footer_fragment_name", "dmx.core.one")); - workspacesService.assignTypeToWorkspace(dmx.getTopicType("de.mikromedia.site.footer_fragment_name"), webpagesWorkspace.getId()); - workspacesService.assignTypeToWorkspace(assocDef, webpagesWorkspace.getId()); + site.addCompDef(mf.newCompDefModel(site.getUri(), "de.mikromedia.site.footer_fragment_name", "dmx.core.one")); + workspacesService.assignTypeToWorkspace(site, webpagesWorkspace.getId()); } diff --git a/src/main/java/de/mikromedia/webpages/migrations/Migration21.java b/src/main/java/de/mikromedia/webpages/migrations/Migration21.java deleted file mode 100644 index 37dd0f6..0000000 --- a/src/main/java/de/mikromedia/webpages/migrations/Migration21.java +++ /dev/null @@ -1,27 +0,0 @@ -package de.mikromedia.webpages.migrations; - - -import systems.dmx.accesscontrol.AccessControlService; -import systems.dmx.core.service.Inject; -import systems.dmx.core.service.Migration; -import systems.dmx.workspaces.WorkspacesService; - -/** - * Remove unsupported Section Layouts. - */ -public class Migration21 extends Migration { - - @Inject WorkspacesService workspacesService; - @Inject AccessControlService accessControlService; - - @Override - public void run () { - - // Todo: Remove Un-Maintained Section Layouts - // - Contact Form - // - Map Widget - // - Embed - - } - -} diff --git a/src/main/java/de/mikromedia/webpages/migrations/Migration22.java b/src/main/java/de/mikromedia/webpages/migrations/Migration22.java new file mode 100644 index 0000000..4888c4d --- /dev/null +++ b/src/main/java/de/mikromedia/webpages/migrations/Migration22.java @@ -0,0 +1,39 @@ +package de.mikromedia.webpages.migrations; + + +import de.mikromedia.webpages.WebpagePlugin; +import systems.dmx.accesscontrol.AccessControlService; +import static systems.dmx.core.Constants.ONE; +import systems.dmx.core.Topic; +import systems.dmx.core.TopicType; +import systems.dmx.core.service.Inject; +import systems.dmx.core.service.Migration; +import systems.dmx.workspaces.WorkspacesService; + +public class Migration22 extends Migration { + + @Inject WorkspacesService workspaces; + @Inject AccessControlService accessControlService; + + @Override + public void run () { + + // Assign new default pages + Topic webpagesWs = workspaces.getWorkspace(WebpagePlugin.WEBPAGES_WS_URI); + Topic bookmarksPage = dmx.getTopicByUri("de.mikromedia.bookmarks.page"); + Topic contactsPage = dmx.getTopicByUri("de.mikromedia.contacts.page"); + Topic notesPage = dmx.getTopicByUri("de.mikromedia.notes.page"); + Topic promutCss = dmx.getTopicByUri("de.mikromedia.iass_promut_style"); + workspaces.assignToWorkspace(bookmarksPage, webpagesWs.getId()); + workspaces.assignToWorkspace(contactsPage, webpagesWs.getId()); + workspaces.assignToWorkspace(notesPage, webpagesWs.getId()); + workspaces.assignToWorkspace(promutCss, webpagesWs.getId()); + // Add "Page Template" value to "Webpage" + TopicType webpage = dmx.getTopicType("de.mikromedia.page"); + TopicType pageTemplate = dmx.getTopicType("de.mikromedia.page.template"); + webpage.addCompDef(mf.newCompDefModel(webpage.getUri(), pageTemplate.getUri(), ONE)); + workspaces.assignTypeToWorkspace(webpage, webpagesWs.getId()); + + } + +} diff --git a/src/main/java/de/mikromedia/webpages/migrations/Migration23.java b/src/main/java/de/mikromedia/webpages/migrations/Migration23.java new file mode 100644 index 0000000..8929e8b --- /dev/null +++ b/src/main/java/de/mikromedia/webpages/migrations/Migration23.java @@ -0,0 +1,58 @@ +package de.mikromedia.webpages.migrations; + + +import systems.dmx.accesscontrol.AccessControlService; +import systems.dmx.core.CompDef; +import systems.dmx.core.Topic; +import systems.dmx.core.TopicType; +import systems.dmx.core.ViewConfig; +import systems.dmx.core.service.Inject; +import systems.dmx.core.service.Migration; +import systems.dmx.workspaces.WorkspacesService; + +public class Migration23 extends Migration { + + @Inject WorkspacesService workspaces; + @Inject AccessControlService accessControlService; + + @Override + public void run () { + + // Migrate default "page" template into all existing "Webpage" topics + // Activate "Select" Widgets for new Child Topic Types + TopicType websote = dmx.getTopicType("de.mikromedia.site"); + CompDef footerFragment = websote.getCompDef("de.mikromedia.site.footer_fragment_name"); + ViewConfig cdefAttachment = footerFragment.getViewConfig(); + cdefAttachment.setConfigValueRef("dmx.webclient.view_config", "dmx.webclient.widget", "dmx.webclient.select"); + TopicType webpage = dmx.getTopicType("de.mikromedia.page"); + CompDef pageTemplate = webpage.getCompDef("de.mikromedia.page.template"); + ViewConfig styleConfig = pageTemplate.getViewConfig(); + styleConfig.setConfigValueRef("dmx.webclient.view_config", "dmx.webclient.widget", "dmx.webclient.select"); + webpage.removeCompDef("de.mikromedia.page.author_name"); + // Removing "Author Name" from "Webpage" topic + TopicType authorName = dmx.getTopicType("de.mikromedia.page.author_name"); + authorName.delete(); + // Remove Un-Maintained Section Layouts + Topic mapWidget = dmx.getTopicByUri("de.mikromedia.layout.map_widget"); + mapWidget.delete(); + Topic embed = dmx.getTopicByUri("de.mikromedia.layout.embed"); + embed.delete(); + // Authors/Contributors + // User Profile + // Rename Topics + // de.mikromedia.footer.footer-new + // de.mikromedia.footer.qpq-footer + // de.mikromedia.footer.dmx-footer + // de.mikromedia.footer.footer-links + // de.mikromedia.layout.native_embed + // de.mikromedia.layout.single_tile + // de.mikromedia.layout.quote_section + // de.mikromedia.layout.two_tiles + // de.mikromedia.layout.tiles_ten_six + // de.mikromedia.layout.n_tiles + // de.mikromedia.layout.2_and_n_tiles + // de.mikromedia.standard_site + + } + +} diff --git a/src/main/java/de/mikromedia/webpages/migrations/Migration5.java b/src/main/java/de/mikromedia/webpages/migrations/Migration5.java index efd0079..9d10ed5 100644 --- a/src/main/java/de/mikromedia/webpages/migrations/Migration5.java +++ b/src/main/java/de/mikromedia/webpages/migrations/Migration5.java @@ -28,8 +28,8 @@ public void run () { workspacesService.assignTypeToWorkspace(sitePrefix, webpagesWorkspace.getId()); // 2) Add website prefix to "Website" type TopicType siteType = dmx.getTopicType("de.mikromedia.site"); - // register site.prefix as identityAttr=True - siteType.addCompDef(mf.newCompDefModel(null, true, false, siteType.getUri(), sitePrefix.getUri(), "dmx.core.one")); + // Fixme: ### If webclient is capable of providing identityAttributes register site.prefix as identityAttr=True + siteType.addCompDef(mf.newCompDefModel(null, false, false, siteType.getUri(), sitePrefix.getUri(), "dmx.core.one")); // 3) Fetch all website topcis and copy username (former prefix) into new site prefix child List websites = dmx.getTopicsByType("de.mikromedia.site"); for (Topic website : websites) { diff --git a/src/main/java/de/mikromedia/webpages/model/Section.java b/src/main/java/de/mikromedia/webpages/model/Section.java index 3ada4d0..8c5b8ff 100644 --- a/src/main/java/de/mikromedia/webpages/model/Section.java +++ b/src/main/java/de/mikromedia/webpages/model/Section.java @@ -192,6 +192,13 @@ public String getRelatedTopicFilePath() { return null; } + public String getRelatedTopicFileHTML() { + if (this.relatedTopic != null && this.relatedTopic.getTypeUri().equals("dmx.files.file")) { + return this.relatedTopic.getChildTopics().getString("dmx.files.file_content", null); + } + return null; + } + public String getRelatedTopicFileSize() { if (this.relatedTopic != null && this.relatedTopic.getTypeUri().equals("dmx.files.file")) { return humanReadableByteCount(this.relatedTopic.getChildTopics().getLong("dmx.files.size", 0), true); diff --git a/src/main/java/de/mikromedia/webpages/model/Webpage.java b/src/main/java/de/mikromedia/webpages/model/Webpage.java index 745b37b..aef42ea 100644 --- a/src/main/java/de/mikromedia/webpages/model/Webpage.java +++ b/src/main/java/de/mikromedia/webpages/model/Webpage.java @@ -11,6 +11,7 @@ import static de.mikromedia.webpages.WebpageService.WEBPAGE_CONTENT; import static de.mikromedia.webpages.WebpageService.WEBPAGE_CSS; import static de.mikromedia.webpages.WebpageService.WEBPAGE_IS_DRAFT; +import static de.mikromedia.webpages.WebpageService.WEBPAGE_TEMPLATE; import java.util.Date; import java.util.Iterator; import java.util.List; @@ -55,6 +56,10 @@ public String getDescription() { return page.getChildTopics().getString(WEBPAGE_ABOUT, null); } + public Topic getHTMLTemplate() { + return page.getChildTopics().getTopicOrNull(WEBPAGE_TEMPLATE); + } + public String getMainHTML() { return page.getChildTopics().getString(WEBPAGE_CONTENT, null); } @@ -102,7 +107,7 @@ public boolean isDraft() { return isDraft; } - public String getAuthorNames() { + /** public String getAuthorNames() { String nameOfAuthors = ""; List authorNames = page.getChildTopics().getTopicsOrNull(AUTHOR_NAME); if (authorNames != null) { @@ -116,7 +121,7 @@ public String getAuthorNames() { } } return nameOfAuthors; - } + } **/ public JSONObject toJSON() { try { @@ -126,7 +131,6 @@ public JSONObject toJSON() { .put("main", getMainHTML()) .put("modified", getModificationDate()) .put("created", getCreationDate()) - .put("author_names", getAuthorNames()) .put("web_alias", getWebAlias()); /** * .put("web_description", webDescription) * @@ -139,7 +143,7 @@ public JSONObject toJSON() { private boolean isWebpageTopic() { if (this.page == null) return false; - return (this.page.getTypeUri().equals("de.mikromedia.page")); + return (this.page.getTypeUri().equals(WEBPAGE)); } } diff --git a/src/main/resources/migrations/migration1.json b/src/main/resources/migrations/migration1.json index 1f4ac68..1c57caa 100644 --- a/src/main/resources/migrations/migration1.json +++ b/src/main/resources/migrations/migration1.json @@ -1,4 +1,3 @@ -page [ { "topic_types": [ @@ -331,7 +330,8 @@ page "compDefs": [ { "childTypeUri": "de.mikromedia.site.name", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "isIdentityAttribute": true }, { "childTypeUri": "de.mikromedia.site.caption", @@ -339,7 +339,17 @@ page }, { "childTypeUri": "de.mikromedia.site.stylesheet", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select", + "dmx.webclient.clearable": true, + "dmx.webclient.customizable": true + } + } + ] }, { "childTypeUri": "de.mikromedia.site.about_html", @@ -409,7 +419,16 @@ page { "childTypeUri": "de.mikromedia.redirect.status_code", "childCardinalityUri": "dmx.core.one", - "isIdentityAttribute": true + "isIdentityAttribute": true, + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select", + "dmx.webclient.clearable": true + } + } + ] } ], "viewConfigTopics": [ diff --git a/src/main/resources/migrations/migration20.json b/src/main/resources/migrations/migration20.json index c8164d3..f89df6a 100644 --- a/src/main/resources/migrations/migration20.json +++ b/src/main/resources/migrations/migration20.json @@ -1,39 +1,39 @@ { + "topic_types": [ + { + "value": "HTML Template", + "uri": "de.mikromedia.page.template", + "dataTypeUri": "dmx.core.text", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.add_to_create_menu": false + } + } + ] + } + ], "topics": [ { - "typeUri": "de.mikromedia.page", - "uri" : "de.mikromedia.bookmarks.page", - "children": { - "de.mikromedia.page.headline" : "Bookmarks", - "de.mikromedia.page.web_alias": "bookmarks", - "de.mikromedia.page.is_draft": false, - "de.mikromedia.javascript_path": ["/de.mikromedia.webpages/static/js/bookmarks.js"] - } + "typeUri": "de.mikromedia.site.stylesheet", + "uri" : "de.mikromedia.iass_promut_style", + "value": "/de.mikromedia.webpages/static/css/promut.css" }, { - "typeUri": "de.mikromedia.page", - "uri" : "de.mikromedia.contacts.page", - "children": { - "de.mikromedia.page.headline" : "Contacts", - "de.mikromedia.page.web_alias": "contacts", - "de.mikromedia.page.is_draft": false, - "de.mikromedia.javascript_path": ["/de.mikromedia.webpages/static/js/contacts.js"] - } + "typeUri": "de.mikromedia.page.template", + "uri" : "de.mikromedia.template_page", + "value": "Page" }, { - "typeUri": "de.mikromedia.page", - "uri" : "de.mikromedia.notes.page", - "children": { - "de.mikromedia.page.headline" : "Notes", - "de.mikromedia.page.web_alias": "notes", - "de.mikromedia.page.is_draft": false, - "de.mikromedia.javascript_path": ["/de.mikromedia.webpages/static/js/notes.js"] - } + "typeUri": "de.mikromedia.page.template", + "uri" : "de.mikromedia.template_collection", + "value": "Collection" }, { - "typeUri": "de.mikromedia.site.stylesheet", - "uri" : "de.mikromedia.iass_promut_style", - "value": "/de.mikromedia.webpages/static/css/promut.css" + "typeUri": "de.mikromedia.page.template", + "uri" : "de.mikromedia.template_post", + "value": "Post" } ] } diff --git a/src/main/resources/migrations/migration21.json b/src/main/resources/migrations/migration21.json new file mode 100644 index 0000000..b9fb40b --- /dev/null +++ b/src/main/resources/migrations/migration21.json @@ -0,0 +1,37 @@ +{ + "topics": [ + { + "typeUri": "de.mikromedia.page", + "uri" : "de.mikromedia.bookmarks.page", + "children": { + "de.mikromedia.page.headline" : "Bookmarks", + "de.mikromedia.page.web_alias": "bookmarks", + "de.mikromedia.page.template": "ref_uri:de.mikromedia.template_collection", + "de.mikromedia.page.is_draft": false, + "de.mikromedia.javascript_path": ["/de.mikromedia.webpages/static/js/bookmarks.js"] + } + }, + { + "typeUri": "de.mikromedia.page", + "uri" : "de.mikromedia.contacts.page", + "children": { + "de.mikromedia.page.headline" : "Contacts", + "de.mikromedia.page.web_alias": "contacts", + "de.mikromedia.page.template": "ref_uri:de.mikromedia.template_collection", + "de.mikromedia.page.is_draft": false, + "de.mikromedia.javascript_path": ["/de.mikromedia.webpages/static/js/contacts.js"] + } + }, + { + "typeUri": "de.mikromedia.page", + "uri" : "de.mikromedia.notes.page", + "children": { + "de.mikromedia.page.headline" : "Notes", + "de.mikromedia.page.web_alias": "notes", + "de.mikromedia.page.template": "ref_uri:de.mikromedia.template_collection", + "de.mikromedia.page.is_draft": false, + "de.mikromedia.javascript_path": ["/de.mikromedia.webpages/static/js/notes.js"] + } + } + ] +} diff --git a/src/main/resources/migrations/migration6.json b/src/main/resources/migrations/migration6.json index 51ada7a..d2575b0 100644 --- a/src/main/resources/migrations/migration6.json +++ b/src/main/resources/migrations/migration6.json @@ -158,16 +158,46 @@ { "childTypeUri": "dmx.webclient.color", "customAssocTypeUri": "de.mikromedia.background.color", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select", + "dmx.webclient.clearable": true, + "dmx.webclient.customizable": true + } + } + ] }, { "childTypeUri": "dmx.webclient.color", "customAssocTypeUri": "de.mikromedia.font.color", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select", + "dmx.webclient.clearable": true, + "dmx.webclient.customizable": true + } + } + ] }, { "childTypeUri": "de.mikromedia.header.js", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select", + "dmx.webclient.clearable": true, + "dmx.webclient.customizable": true + } + } + ] } ], "viewConfigTopics": [ @@ -199,11 +229,27 @@ "compDefs": [ { "childTypeUri": "de.mikromedia.image.size_style", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select" + } + } + ] }, { "childTypeUri": "de.mikromedia.image.attachment_style", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select" + } + } + ] } ], "viewConfigTopics": [ @@ -222,11 +268,27 @@ "compDefs": [ { "childTypeUri": "de.mikromedia.image.size_style", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select" + } + } + ] }, { "childTypeUri": "de.mikromedia.image.attachment_style", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select" + } + } + ] } ], "viewConfigTopics": [ diff --git a/src/main/resources/migrations/migration8.json b/src/main/resources/migrations/migration8.json index 5ffc3b7..ce00381 100644 --- a/src/main/resources/migrations/migration8.json +++ b/src/main/resources/migrations/migration8.json @@ -171,12 +171,32 @@ { "childTypeUri": "dmx.webclient.color", "customAssocTypeUri": "de.mikromedia.background.color", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select", + "dmx.webclient.clearable": true, + "dmx.webclient.customizable": true + } + } + ] }, { "childTypeUri": "dmx.webclient.color", "customAssocTypeUri": "de.mikromedia.font.color", - "childCardinalityUri": "dmx.core.one" + "childCardinalityUri": "dmx.core.one", + "viewConfigTopics": [ + { + "typeUri": "dmx.webclient.view_config", + "children": { + "dmx.webclient.widget": "ref_uri:dmx.webclient.select", + "dmx.webclient.clearable": true, + "dmx.webclient.customizable": true + } + } + ] } ], "viewConfigTopics": [ diff --git a/src/main/resources/plugin.properties b/src/main/resources/plugin.properties index bea99b7..e37c5f4 100644 --- a/src/main/resources/plugin.properties +++ b/src/main/resources/plugin.properties @@ -1,2 +1,2 @@ dmx.plugin.dependencies=systems.dmx.workspaces,systems.dmx.accesscontrol,systems.dmx.files,systems.dmx.bookmarks -dmx.plugin.model_version=20 +dmx.plugin.model_version=23 diff --git a/src/main/resources/views/collection.html b/src/main/resources/views/collection.html new file mode 100644 index 0000000..ca12f44 --- /dev/null +++ b/src/main/resources/views/collection.html @@ -0,0 +1,101 @@ + + + + Webpage + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + +
+ + +
+ +
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ + + + + +
+ +
+ +
+ +
+ + + + + + +
+ +
+ + + diff --git a/src/main/resources/views/fragments/sections.html b/src/main/resources/views/fragments/sections.html index 02b25d6..45c7ce1 100644 --- a/src/main/resources/views/fragments/sections.html +++ b/src/main/resources/views/fragments/sections.html @@ -383,9 +383,12 @@

- + +
+

diff --git a/src/main/resources/views/frontpage.html b/src/main/resources/views/frontpage.html index eb7775e..f2ee5e9 100644 --- a/src/main/resources/views/frontpage.html +++ b/src/main/resources/views/frontpage.html @@ -72,7 +72,7 @@

- +
diff --git a/src/main/resources/views/post.html b/src/main/resources/views/post.html new file mode 100644 index 0000000..4088279 --- /dev/null +++ b/src/main/resources/views/post.html @@ -0,0 +1,101 @@ + + + + Webpage + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + +
+ + +
+ +
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ + + + + +
+ +
+ +
+ +
+ + + + + + +
+ +
+ + +