diff --git a/.gitignore b/.gitignore index 6fe33307d0..42cc183311 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,7 @@ bundle/mockserver.log .java-version # Maven versions plugin -pom.xml.versionsBackup \ No newline at end of file +pom.xml.versionsBackup + +# Qlty plugin folder +/.qlty/ diff --git a/CHANGELOG.md b/CHANGELOG.md index b683c63603..78546bdb38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com) - ## Unreleased ([details][unreleased changes details]) +- #3480 - Sites Copy Publish URLs ### Fixed - #3479 - Fixed Configurations Model for Redirect Manager after change in "redirect" resource as "sling:Folder" diff --git a/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/CopySitesPublishUrlFeature.java b/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/CopySitesPublishUrlFeature.java new file mode 100644 index 0000000000..a73cbaa338 --- /dev/null +++ b/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/CopySitesPublishUrlFeature.java @@ -0,0 +1,74 @@ +/*- + * #%L + * ACS AEM Commons Bundle + * %% + * Copyright (C) 2013 - 2024 Adobe + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +package com.adobe.acs.commons.wcm.impl; + +import org.apache.sling.featureflags.ExecutionContext; +import org.apache.sling.featureflags.Feature; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.metatype.annotations.AttributeDefinition; +import org.osgi.service.metatype.annotations.Designate; +import org.osgi.service.metatype.annotations.ObjectClassDefinition; + + +/** + * OSGi Feature flag to enable or disable the copy publish URLs dropdown field in the Sites Editor. + */ +@Component(service = Feature.class) +@Designate(ocd = CopySitesPublishUrlFeature.Config.class) +public class CopySitesPublishUrlFeature implements Feature { + static final String FEATURE_FLAG_PID = "com.adobe.acs.commons.wcm.impl.copysitespublishurlfeature.feature.flag"; + + private Config config; + + @ObjectClassDefinition( + name = "ACS AEM Commons - Copy Sites Publish URL Feature Flag", + description = "ACS Commons feature flag enables or disables the copy publish url dropdown field in the Sites Editor." + ) + @interface Config { + @AttributeDefinition( + name = "Enable", + description = "Check to enable the AEM Sites Copy Publish URL feature." + ) + boolean feature_flag_active_status() default false; + } + + @SuppressWarnings("ClassEscapesDefinedScope") + @Activate + protected final void activate(Config config) { + this.config = config; + } + + @Override + public String getName() { + return FEATURE_FLAG_PID; + } + + @Override + public String getDescription() { + return "ACS AEM Commons feature flag enables or disables the copy publish URL dropdown field in the Sites Editor."; + } + + @Override + public boolean isEnabled(ExecutionContext executionContext) { + return config.feature_flag_active_status(); + } +} \ No newline at end of file diff --git a/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/PublishUrlServlet.java b/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/PublishUrlServlet.java new file mode 100644 index 0000000000..9a6c20c945 --- /dev/null +++ b/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/PublishUrlServlet.java @@ -0,0 +1,116 @@ +/*- + * #%L + * ACS AEM Commons Bundle + * %% + * Copyright (C) 2013 - 2024 Adobe + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +package com.adobe.acs.commons.wcm.impl; + +import com.day.cq.commons.Externalizer; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.apache.commons.lang3.StringUtils; +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.SlingHttpServletResponse; +import org.apache.sling.api.resource.ResourceResolver; +import org.apache.sling.api.servlets.HttpConstants; +import org.apache.sling.api.servlets.SlingSafeMethodsServlet; +import org.apache.sling.servlets.annotations.SlingServletResourceTypes; +import org.jetbrains.annotations.NotNull; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.ConfigurationPolicy; +import org.osgi.service.metatype.annotations.AttributeDefinition; +import org.osgi.service.metatype.annotations.AttributeType; +import org.osgi.service.metatype.annotations.Designate; +import org.osgi.service.metatype.annotations.ObjectClassDefinition; + +import javax.servlet.Servlet; +import java.io.IOException; +import java.io.Serializable; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +/** + * This servlet generates a JSON response with the externalized URLs for the given path using configured keys in its + * configuration. They keys need to match the environment keys configured in the Externalizer configuration. The servlet + * uses Externalizer service to generate the externalized URLs via Externalizer.externalLink() method. The response is + * in format {"Author": "Author URL", "Publish": "Publish URL", ...}. + */ +@Component(service = Servlet.class, configurationPolicy = ConfigurationPolicy.REQUIRE) +@SlingServletResourceTypes( + resourceTypes = PublishUrlServlet.RESOURCE_TYPE, + methods = HttpConstants.METHOD_GET, + extensions = PublishUrlServlet.JSON_EXTENSION +) +@Designate(ocd = PublishUrlServlet.PublishUrlServletConfig.class) +public class PublishUrlServlet extends SlingSafeMethodsServlet implements Serializable { + + private static final long serialVersionUID = 1L; + protected static final String RESOURCE_TYPE = "acs-commons/components/utilities/publish-url"; + protected static final String JSON_EXTENSION = "json"; + private static final String PATH = "path"; + private static final String JSON_TYPE = "application/json"; + private String[] externalizerKeys; + + @Activate + protected void activate(final PublishUrlServletConfig config) { + this.externalizerKeys = config.externalizerKeys(); + } + + /** + * Gets the path parameter from the request and generates the externalized URLs for the given path using the + * Externalizer service. Writes the JSON response with the externalized URLs to the response. + * + * @param request SlingHttpServletRequest + * @param response SlingHttpServletResponse + * @throws IOException if response.getWriter() fails + */ + @Override + protected void doGet(SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) throws IOException { + String path = request.getParameter(PATH); + ResourceResolver resolver = request.getResourceResolver(); + Externalizer externalizer = resolver.adaptTo(Externalizer.class); + ObjectMapper mapper = new ObjectMapper(); + ObjectNode jsonResponse = mapper.createObjectNode(); + + if (externalizer != null) { + Arrays.asList(externalizerKeys).forEach(key -> { + String capitalizedKey = StringUtils.capitalize(key); + String externalLink = externalizer.externalLink(resolver, key, request.getScheme(), path); + jsonResponse.put(capitalizedKey, externalLink); + }); + } + + response.setContentType(JSON_TYPE); + response.setCharacterEncoding(StandardCharsets.UTF_8.name()); + response.getWriter().write(jsonResponse.toString()); + } + + @ObjectClassDefinition( + name = "ACS AEM Commons - Publish URL Servlet", + description = "Servlet that accepts a GET request with a resource path in the path parameter, and returns a JSON object of the externalized URLs for the path." + ) + public @interface PublishUrlServletConfig { + @AttributeDefinition( + name = "Externalizer environment keys", + description = "Keys must match the environment keys configured in the AEM Externalizer OSGi configuration.", + type = AttributeType.STRING + ) + String[] externalizerKeys() default {}; + } +} diff --git a/bundle/src/test/java/com/adobe/acs/commons/wcm/impl/CopySitesPublishUrlFeatureTest.java b/bundle/src/test/java/com/adobe/acs/commons/wcm/impl/CopySitesPublishUrlFeatureTest.java new file mode 100644 index 0000000000..5b0a97b07a --- /dev/null +++ b/bundle/src/test/java/com/adobe/acs/commons/wcm/impl/CopySitesPublishUrlFeatureTest.java @@ -0,0 +1,66 @@ +/*- + * #%L + * ACS AEM Commons Bundle + * %% + * Copyright (C) 2024 Adobe + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +package com.adobe.acs.commons.wcm.impl; + +import io.wcm.testing.mock.aem.junit5.AemContextExtension; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.when; + +@ExtendWith({MockitoExtension.class, AemContextExtension.class}) +class CopySitesPublishUrlFeatureTest { + + + @InjectMocks + CopySitesPublishUrlFeature copySitesPublishUrlFeature = new CopySitesPublishUrlFeature(); + @Mock + CopySitesPublishUrlFeature.Config config; + + @BeforeEach + void setUp() { + copySitesPublishUrlFeature.activate(config); + } + + @Test + void testGetName() { + assertEquals("com.adobe.acs.commons.wcm.impl.copysitespublishurlfeature.feature.flag", + copySitesPublishUrlFeature.getName()); + } + + @Test + void testGetDescription() { + assertEquals("ACS AEM Commons feature flag enables or disables the copy publish URL dropdown field in the Sites Editor.", + copySitesPublishUrlFeature.getDescription()); + } + + @Test + void testIsEnabled() { + when(config.feature_flag_active_status()).thenReturn(true); + assertTrue(copySitesPublishUrlFeature.isEnabled(null)); + } + +} \ No newline at end of file diff --git a/bundle/src/test/java/com/adobe/acs/commons/wcm/impl/PublishUrlServletTest.java b/bundle/src/test/java/com/adobe/acs/commons/wcm/impl/PublishUrlServletTest.java new file mode 100644 index 0000000000..561c56f5f8 --- /dev/null +++ b/bundle/src/test/java/com/adobe/acs/commons/wcm/impl/PublishUrlServletTest.java @@ -0,0 +1,81 @@ +/*- + * #%L + * ACS AEM Commons Bundle + * %% + * Copyright (C) 2024 Adobe + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +package com.adobe.acs.commons.wcm.impl; + +import com.day.cq.commons.Externalizer; +import io.wcm.testing.mock.aem.junit5.AemContext; +import io.wcm.testing.mock.aem.junit5.AemContextExtension; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import javax.servlet.Servlet; +import org.apache.commons.io.IOUtils; +import org.apache.sling.api.resource.ResourceResolver; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +@ExtendWith({MockitoExtension.class, AemContextExtension.class}) +class PublishUrlServletTest { + + private final AemContext ctx = new AemContext(); + + @Mock + Externalizer externalizer; + + @Test + void testDoGet() throws IOException { + ctx.registerAdapter(ResourceResolver.class, Externalizer.class, externalizer); + + Map params = new HashMap<>(); + params.put("externalizerKeys", new String[]{"local", "author", "publish", "dispatcher"}); + + Map requestParams = new HashMap<>(); + requestParams.put("path", "/content/we-retail/us/en/experience"); + ctx.request().setParameterMap(requestParams); + + when(externalizer.externalLink(any(ResourceResolver.class), any(String.class), any(String.class), any(String.class))) + .thenReturn("http://localhost:4502/content/we-retail/us/en/experience.html") + .thenReturn("https://aem.author.someorganization.com/content/we-retail/us/en/experience.html") + .thenReturn("https://aem.publish.someorganization.com/content/we-retail/us/en/experience.html") + .thenReturn("https://www.someorganization.com/experience"); + + ctx.registerInjectActivateService(new PublishUrlServlet(), params); + + PublishUrlServlet servlet = (PublishUrlServlet) ctx.getServices(Servlet.class, + "(sling.servlet.resourceTypes=acs-commons/components/utilities/publish-url)")[0]; + + servlet.doGet(ctx.request(), ctx.response()); + + try (InputStream inputStream = getClass().getResourceAsStream("PublishUrlServletResponse.json")) { + assert inputStream != null; + String expectedJson = IOUtils.toString(inputStream, StandardCharsets.UTF_8); + assertEquals(expectedJson, ctx.response().getOutputAsString()); + } + } +} \ No newline at end of file diff --git a/bundle/src/test/resources/com/adobe/acs/commons/wcm/impl/PublishUrlServletResponse.json b/bundle/src/test/resources/com/adobe/acs/commons/wcm/impl/PublishUrlServletResponse.json new file mode 100644 index 0000000000..b058b23077 --- /dev/null +++ b/bundle/src/test/resources/com/adobe/acs/commons/wcm/impl/PublishUrlServletResponse.json @@ -0,0 +1 @@ +{"Local":"http://localhost:4502/content/we-retail/us/en/experience.html","Author":"https://aem.author.someorganization.com/content/we-retail/us/en/experience.html","Publish":"https://aem.publish.someorganization.com/content/we-retail/us/en/experience.html","Dispatcher":"https://www.someorganization.com/experience"} \ No newline at end of file diff --git a/ui.apps/src/main/content/META-INF/vault/filter.xml b/ui.apps/src/main/content/META-INF/vault/filter.xml index 55c9d3cc4c..a587f29c5b 100644 --- a/ui.apps/src/main/content/META-INF/vault/filter.xml +++ b/ui.apps/src/main/content/META-INF/vault/filter.xml @@ -2,7 +2,7 @@ diff --git a/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/css.txt b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/css.txt new file mode 100644 index 0000000000..f3795dee3a --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/css.txt @@ -0,0 +1,3 @@ +#base=. + +sites-copy-publish-url.css \ No newline at end of file diff --git a/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/js.txt b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/js.txt new file mode 100644 index 0000000000..d05cba20c5 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/js.txt @@ -0,0 +1,3 @@ +#base=. + +sites-copy-publish-url.js \ No newline at end of file diff --git a/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/sites-copy-publish-url.css b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/sites-copy-publish-url.css new file mode 100644 index 0000000000..c65056ae1c --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/sites-copy-publish-url.css @@ -0,0 +1,62 @@ +/* + * #%L + * ACS AEM Commons Package + * %% + * Copyright (C) 2024 Adobe + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +#acs-aem-commons__aem-sites-copy-publish-url .coral3-Dialog-wrapper { + width: 1000px !important; + left: 50% !important; + margin-left: -500px !important; +} + +.acs-aem-commons__aem-sites-copy-publish-url__text { + min-width: 30rem; + min-height: 5rem; + padding: 1rem; + font-size: 1.1rem; + line-height: 1.25rem; + border-color: #ccc; + } + +.acs-aem-commons__aem-sites-copy-publish-url__text--failure { + padding: 1rem; + font-size: 1.1rem; + text-align: center; + color: #EA7B6F; + min-width: 30rem; +} + +.acs-aem-commons__aem-sites-copy-publish-url__group { + display: flex; + align-items: center; + margin-bottom: 1rem; +} +.acs-aem-commons__aem-sites-copy-publish-url__group .coral-Form-field { + padding: .6rem; + width: calc(100% - 170px) !important; +} + +.acs-aem-commons__aem-sites-copy-publish-url__group .coral-Form-field, +.acs-aem-commons__aem-sites-copy-publish-url__group .acs-aem-commons__aem-sites-copy-publish-url__copy-cmd { + margin-right: 10px; +} + +.acs-aem-commons__aem-sites-copy-publish-url__group .coral-Form-field, +.acs-aem-commons__aem-sites-copy-publish-url__group .acs-aem-commons__aem-sites-copy-publish-url__copy-cmd { + margin-right: 10px; +} \ No newline at end of file diff --git a/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/sites-copy-publish-url.js b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/sites-copy-publish-url.js new file mode 100644 index 0000000000..6116bfad3b --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/acs-commons/authoring/sites-copy-publishurl/sites-copy-publish-url.js @@ -0,0 +1,103 @@ +/* + * #% + * ACS AEM Commons Package + * %% + * Copyright (C) 2024 Adobe + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +(function(document, $) { + "use strict"; + + var GRANITE_ID = "acs-aem-commons__aem-sites-copy-publish-url"; + + $( document ).one('foundation-toggleable-show', '#' + GRANITE_ID, function(e) { + var modalBody = $(e.target).find('coral-dialog-content'), + failureMessage = Granite.I18n.get('An error occurred determining the page\'s publish URLs.'), + missingConfigMessage = Granite.I18n.get('Missing configs for the Publish URL servlet or Externalizer.'), + publishUrl = Granite.HTTP.externalize('/apps/acs-commons/components/utilities/sites-publish-url.json'), + path = $(e.target).data('assetpath'); + + var result = + Granite.$.ajax({ + type : "GET", + //async : false, + dataType : 'text', + data : { + path : path + }, + url : publishUrl + }); + result.done(function(text) { + var jsonResponse = JSON.parse(text); + var content = ''; + var labelWidth = 0; + var inputWidth = 0; + if (jsonResponse.size === 0) { + modalBody.html('

' + missingConfigMessage + '

'); + return; + } + + Object.keys(jsonResponse).forEach(function(key) { + if (key.length > labelWidth) { + labelWidth = key.length; + } + if (jsonResponse[key].length > inputWidth) { + inputWidth = jsonResponse[key].length; + } + }); + inputWidth = inputWidth > 0 ? inputWidth - 10 : 0; + + Object.keys(jsonResponse).forEach(function(key) { + content += '
' + + '' + + '' + + '' + + '
'; + }); + + // if this is loaded via the Dailog's extra client libs, the CSS is lost so it has to be re-added here. + content += ''; + modalBody.html(content); + + setTimeout(function() { + window.dispatchEvent(new Event('resize')); + }, 50); + + document.querySelectorAll('.acs-aem-commons__aem-sites-copy-publish-url__copy-cmd').forEach(function(button) { + button.addEventListener('click', function() { + var key = this.getAttribute('data-copy-target'); + var inputField = this.previousElementSibling; + inputField.select(); + document.execCommand("copy"); + }); + }); + }); + + result.fail(function() { + modalBody.html('

' + failureMessage + '

'); + }); + }); + + $( document ).one('foundation-contentloaded', function(e) { + if (!document.execCommand && !document.queryCommandSupported) { + $('.acs-aem-commons__aem-sites-copy-publish-url__copy-cmd').hide(); + } + if (!document.queryCommandSupported('copy')) { + $('.acs-aem-commons__aem-sites-copy-publish-url__copy-cmd').hide(); + } + }); + +})(document, Granite.$); diff --git a/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/sites-publish-url/.content.xml b/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/sites-publish-url/.content.xml new file mode 100644 index 0000000000..450e0c0d05 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/sites-publish-url/.content.xml @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/.content.xml new file mode 100644 index 0000000000..333925bb94 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/.content.xml new file mode 100644 index 0000000000..333925bb94 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/.content.xml new file mode 100644 index 0000000000..0aed9288ef --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/.content.xml @@ -0,0 +1,22 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/.content.xml new file mode 100644 index 0000000000..fa54b73927 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/.content.xml @@ -0,0 +1,22 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/.content.xml new file mode 100644 index 0000000000..ca1b5b0f95 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/.content.xml @@ -0,0 +1,22 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/.content.xml new file mode 100644 index 0000000000..ca1b5b0f95 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/.content.xml @@ -0,0 +1,22 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/acs-commons_copy-publish-url-dialog/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/acs-commons_copy-publish-url-dialog/.content.xml new file mode 100644 index 0000000000..34e7d5350c --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/acs-commons_copy-publish-url-dialog/.content.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/items/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/items/.content.xml new file mode 100644 index 0000000000..03441a7f68 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/items/.content.xml @@ -0,0 +1,20 @@ + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/items/acs-commons_copy-publish-url/.content.xml b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/items/acs-commons_copy-publish-url/.content.xml new file mode 100644 index 0000000000..cb1c22571c --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/wcm/core/content/editor/_jcr_content/content/items/content/header/items/headerbar/items/pageinfopopover/items/list/items/acs-commons_copy-publish-url/.content.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + diff --git a/ui.config/src/main/content/jcr_root/apps/acs-commons/config.author/org.apache.sling.jcr.repoinit.RepositoryInitializer-acs-commons-author.config b/ui.config/src/main/content/jcr_root/apps/acs-commons/config.author/org.apache.sling.jcr.repoinit.RepositoryInitializer-acs-commons-author.config index 53258e42bd..4ecaad1997 100644 --- a/ui.config/src/main/content/jcr_root/apps/acs-commons/config.author/org.apache.sling.jcr.repoinit.RepositoryInitializer-acs-commons-author.config +++ b/ui.config/src/main/content/jcr_root/apps/acs-commons/config.author/org.apache.sling.jcr.repoinit.RepositoryInitializer-acs-commons-author.config @@ -74,5 +74,8 @@ set ACL for acs-commons-file-fetch-service allow jcr:read,jcr:versionManagement,rep:write,crx:replicate on /content/dam allow jcr:read on / end + +# Copy Publish URL - AEM Sites Page Editor overlay +create path (nt:unstructured) /apps/wcm(nt:folder)/core(nt:folder)/content(sling:Folder)/editor(cq:Page)/jcr:content/content/items(sling:OrderedFolder)/content(sling:OrderedFolder)/header/items/headerbar/items/pageinfopopover/items/list/items " ] \ No newline at end of file