You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by je...@apache.org on 2018/09/13 01:48:54 UTC

[sling-org-apache-sling-app-cms] branch SLING-7900 updated (9896f76 -> c6efb33)

This is an automated email from the ASF dual-hosted git repository.

jeb pushed a change to branch SLING-7900
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git.


 discard 9896f76  SLING-7900 UI changes
 discard 01dccd4  table updates and modals
 discard 6aebcf2  initial refactoring of content breadcrumbs and content table
 discard 6f83135  initial changes
     add c226c13  Small UI tweaks to fix whitespace at the top of the editor and to make the color bar scroll across all page heights
     add 7c2e4ab  Adding bundles for markdown support
     add 4453962  Fixed to add missing sling icon on login page
     add 8d6723d  Updating to file optimization 0.9.2
     add 5fb4486  Making sweeping changes to de-tangle the implementation from the API
     add 98a8496  Updating to eliminate the api package, remove the provider type annotations from internal classes and add descriptions to the bundle
     add 10fa72e  Missing package update
     add 6dea5f7  Merge branch 'api-improvements'
     add 36cc0ef  Cleaning up some JavaDoc issues in the API
     new df8ec3a  initial changes
     new c56383e  initial refactoring of content breadcrumbs and content table
     new c05d366  table updates and modals
     new c6efb33  SLING-7900 UI changes

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (9896f76)
            \
             N -- N -- N   refs/heads/SLING-7900 (c6efb33)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 api/pom.xml                                        | 101 ++++++
 .../java/org/apache/sling/cms/CMSConstants.java    | 118 +++++++
 .../main/java/org/apache/sling/cms/CMSUtils.java   | 132 ++++++++
 .../main/java/org/apache/sling/cms/Component.java  |  74 +++++
 .../org/apache/sling/cms/ComponentManager.java     |  54 +++
 .../org/apache/sling/cms/EditableResource.java     |  63 ++++
 api/src/main/java/org/apache/sling/cms/Page.java   | 161 +++++++++
 .../java/org/apache/sling/cms/PageManager.java     |  55 ++--
 .../java/org/apache/sling/cms/PageTemplate.java    |  74 +++++
 .../org/apache/sling/cms/PageTemplateManager.java  |  37 +--
 .../main/java/org/apache/sling/cms/References.java |  29 +-
 api/src/main/java/org/apache/sling/cms/Site.java   |  79 +++++
 .../java/org/apache/sling/cms/SiteManager.java     |  56 ++--
 .../java/org/apache/sling/cms}/package-info.java   |   4 +-
 .../sling/cms}/usergenerated/UGCBucketConfig.java  |   8 +-
 .../usergenerated/UserGeneratedContentService.java |  55 ++++
 .../sling/cms}/usergenerated/package-info.java     |   4 +-
 builder/src/main/provisioning/cms.txt              |   9 +-
 core/pom.xml                                       | 364 +++++++++++----------
 .../org/apache/sling/cms/core/CMSConstants.java    | 109 ------
 .../java/org/apache/sling/cms/core/CMSUtils.java   |  91 ------
 .../core/internal/filters/EditIncludeFilter.java   | 185 +++++------
 .../cms/core/internal/filters/LocaleFilter.java    |   4 +-
 .../cms/core/internal/filters/PublishFilter.java   |  54 +--
 .../cms/core/internal/models/ComponentImpl.java    | 178 ++++++++++
 .../core/internal/models/ComponentManagerImpl.java | 111 +++++++
 .../core/internal/models/EditableResourceImpl.java |  85 +++++
 .../sling/cms/core/internal/models/PageImpl.java   | 214 ++++++++++++
 .../models/PageManagerImpl.java}                   |  37 ++-
 .../cms/core/internal/models/PageTemplateImpl.java | 138 ++++++++
 .../internal/models/PageTemplateManagerImpl.java   |  88 +++++
 .../{ => internal}/models/ReferenceOperation.java  |   4 +-
 .../models/ReferencesImpl.java}                    |  32 +-
 .../sling/cms/core/internal/models/SiteImpl.java   | 169 ++++++++++
 .../models/SiteManagerImpl.java}                   |  23 +-
 .../operations/UpdateReferencesPostOperation.java  |   2 +-
 .../rewriter/ReferenceMappingTransformer.java      | 264 +++++++--------
 .../cms/core/models/AbstractContentModel.java      | 124 -------
 .../apache/sling/cms/core/models/BaseField.java    |  46 ---
 .../apache/sling/cms/core/models/Component.java    | 177 ----------
 .../sling/cms/core/models/ComponentManager.java    | 110 -------
 .../sling/cms/core/models/EditableResource.java    |  83 -----
 .../apache/sling/cms/core/models/ErrorHandler.java | 220 +++++++------
 .../apache/sling/cms/core/models/LocaleList.java   |  26 +-
 .../sling/cms/core/models/LocaleResource.java      |  18 +-
 .../org/apache/sling/cms/core/models/Page.java     | 123 -------
 .../apache/sling/cms/core/models/PageTemplate.java | 137 --------
 .../sling/cms/core/models/PageTemplateManager.java |  86 -----
 .../sling/cms/core/models/RedirectAttribute.java   |  72 ----
 .../sling/cms/core/models/SearchResults.java       |  50 +--
 .../org/apache/sling/cms/core/models/Site.java     | 168 ----------
 .../apache/sling/cms/core/models/i18nHelper.java   |  44 +--
 .../apache/sling/cms/core/models/package-info.java |   7 +-
 .../usergenerated/UserGeneratedContentService.java |  53 ---
 .../usergenerated/impl/ApproveUGCOperation.java    | 123 +++----
 .../impl/UserGeneratedContentConfig.java           |   8 +-
 .../impl/UserGeneratedContentServiceImpl.java      | 152 ++++-----
 pom.xml                                            | 322 +++++++++---------
 reference/pom.xml                                  |   1 +
 .../components/general/breadcrumb/breadcrumb.jsp   |   2 +-
 .../general/columncontrol/columncontrol.jsp        |   2 +-
 .../components/general/columncontrol/options.jsp   |   2 +-
 .../reference/components/general/cta/options.jsp   |   2 +-
 .../reference/components/general/iframe/iframe.jsp |   2 +-
 .../components/general/iframe/options.jsp          |   2 +-
 .../reference/components/general/image/options.jsp |   2 +-
 .../reference/components/general/list/init.jsp     |   2 +-
 .../reference/components/general/rss/rss.xml.jsp   |   4 +-
 .../reference/components/general/search/search.jsp |   2 +-
 .../components/general/searchform/searchform.jsp   |   2 +-
 .../components/general/sitemap/sitemap.xml.jsp     |   4 +-
 .../components/general/stylewrapper/options.jsp    |   2 +-
 .../reference/components/general/tags/tags.jsp     |   2 +-
 ui/pom.xml                                         |   1 +
 ui/src/main/frontend/gulpfile.js                   | 166 +++++-----
 ui/src/main/frontend/src/scss/cms.scss             |   3 +-
 ui/src/main/frontend/src/scss/editor.scss          |   2 +-
 .../availablecomponenttypes.jsp                    |   2 +-
 .../sling-cms/components/cms/getform/getform.jsp   |   2 +-
 .../propertieseditor/propertieseditor.jsp          |   2 +-
 .../editor/fields/references/references.jsp        |   2 +-
 .../editor/scripts/pageTemplateOptions.jsp         |   2 +-
 .../components/general/container/container.jsp     |   2 +-
 .../resources/jcr_root/libs/sling-cms/global.jsp   |   2 -
 84 files changed, 3102 insertions(+), 2531 deletions(-)
 create mode 100644 api/pom.xml
 create mode 100644 api/src/main/java/org/apache/sling/cms/CMSConstants.java
 create mode 100644 api/src/main/java/org/apache/sling/cms/CMSUtils.java
 create mode 100644 api/src/main/java/org/apache/sling/cms/Component.java
 create mode 100644 api/src/main/java/org/apache/sling/cms/ComponentManager.java
 create mode 100644 api/src/main/java/org/apache/sling/cms/EditableResource.java
 create mode 100644 api/src/main/java/org/apache/sling/cms/Page.java
 copy core/src/main/java/org/apache/sling/cms/core/models/components/AvailableActions.java => api/src/main/java/org/apache/sling/cms/PageManager.java (69%)
 create mode 100644 api/src/main/java/org/apache/sling/cms/PageTemplate.java
 copy core/src/main/java/org/apache/sling/cms/core/models/References.java => api/src/main/java/org/apache/sling/cms/PageTemplateManager.java (57%)
 copy core/src/main/java/org/apache/sling/cms/core/models/SiteManager.java => api/src/main/java/org/apache/sling/cms/References.java (65%)
 create mode 100644 api/src/main/java/org/apache/sling/cms/Site.java
 copy core/src/main/java/org/apache/sling/cms/core/models/components/AvailableActions.java => api/src/main/java/org/apache/sling/cms/SiteManager.java (68%)
 copy {core/src/main/java/org/apache/sling/cms/core/models => api/src/main/java/org/apache/sling/cms}/package-info.java (91%)
 rename {core/src/main/java/org/apache/sling/cms/core => api/src/main/java/org/apache/sling/cms}/usergenerated/UGCBucketConfig.java (87%)
 create mode 100644 api/src/main/java/org/apache/sling/cms/usergenerated/UserGeneratedContentService.java
 rename {core/src/main/java/org/apache/sling/cms/core => api/src/main/java/org/apache/sling/cms}/usergenerated/package-info.java (89%)
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/CMSConstants.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/CMSUtils.java
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/models/ComponentImpl.java
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/models/ComponentManagerImpl.java
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/models/EditableResourceImpl.java
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/models/PageImpl.java
 rename core/src/main/java/org/apache/sling/cms/core/{models/PageManager.java => internal/models/PageManagerImpl.java} (56%)
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/models/PageTemplateImpl.java
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/models/PageTemplateManagerImpl.java
 rename core/src/main/java/org/apache/sling/cms/core/{ => internal}/models/ReferenceOperation.java (97%)
 rename core/src/main/java/org/apache/sling/cms/core/{models/References.java => internal/models/ReferencesImpl.java} (62%)
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/models/SiteImpl.java
 rename core/src/main/java/org/apache/sling/cms/core/{models/SiteManager.java => internal/models/SiteManagerImpl.java} (67%)
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/AbstractContentModel.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/BaseField.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/Component.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/ComponentManager.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/EditableResource.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/Page.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/PageTemplate.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/PageTemplateManager.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/RedirectAttribute.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/models/Site.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/usergenerated/UserGeneratedContentService.java


[sling-org-apache-sling-app-cms] 04/04: SLING-7900 UI changes

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jeb pushed a commit to branch SLING-7900
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit c6efb3385a18376318c764187d1d439bee2fb709
Author: JE Bailey <ja...@sas.com>
AuthorDate: Wed Sep 12 16:20:36 2018 -0400

    SLING-7900 UI changes
    
    * new 'form' page component used to return the minimalist content for a
    modal
    * Modal dialogs now have submit and cancel buttons at the bottom
    * suffix breadcrumb is updated
    * re structured the left panel to remove inline actions
    * re structuring available actions internally
---
 .../core/models/components/AvailableActions.java   |  21 +++
 .../cms/core/models/components/Breadcrumbs.java    |   9 +-
 .../cms/core/models/components/ContentTable.java   |  11 +-
 .../sling/cms/core/models/components/SiteNav.java  |  26 +++
 ui/src/main/frontend/src/js/cms.js                 |   4 +-
 ui/src/main/resources/jcr_root/content.json        |   6 +-
 .../components/cms/contentnav/contentnav.jsp       |  32 +---
 .../libs/sling-cms/components/pages/base/nav.jsp   |   3 +
 .../libs/sling-cms/components/pages/form.json      |   4 +
 .../libs/sling-cms/components/pages/form/form.jsp  |  20 ++
 .../sling-cms/content/actions/create/folder.json   |  59 ++++++
 .../{site/create.json => actions/create/site.json} |   7 +-
 .../create/sitegroup.json}                         |   2 +-
 .../{file/edit.json => actions/edit/file.json}     |   2 +-
 .../editgroup.json => actions/edit/folder.json}    |  16 +-
 .../{site/create.json => actions/edit/site.json}   |  29 +--
 .../jcr_root/libs/sling-cms/content/file/edit.json |   2 +-
 .../libs/sling-cms/content/file/upload.json        |   7 +-
 .../libs/sling-cms/content/folder/create.json      | 116 ++++++------
 .../libs/sling-cms/content/site/create.json        |   7 +-
 .../libs/sling-cms/content/site/creategroup.json   |   2 +-
 .../libs/sling-cms/content/site/editgroup.json     |  86 ++++-----
 .../libs/sling-cms/content/site/sites.json         |  98 +++++-----
 .../jcr_root/libs/sling-cms/content/start.json     | 208 ++++++++++-----------
 .../libs/sling-cms/content/template/create.json    | 116 ++++++------
 .../sling-cms/content/templates/sitegroup.json     |   5 +
 26 files changed, 491 insertions(+), 407 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/models/components/AvailableActions.java b/core/src/main/java/org/apache/sling/cms/core/models/components/AvailableActions.java
new file mode 100644
index 0000000..767cb6f
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/models/components/AvailableActions.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.sling.cms.core.models.components;
+
+public class AvailableActions {
+
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
index a856490..c4abe0c 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
@@ -30,12 +30,18 @@ import org.apache.sling.models.annotations.DefaultInjectionStrategy;
 import org.apache.sling.models.annotations.Model;
 import org.apache.sling.models.annotations.Via;
 import org.apache.sling.models.annotations.injectorspecific.Self;
-
+/**
+ * Logic for the Suffix BreadCrumb Component
+ * 
+ * 
+ *
+ */
 @Model(adaptables = SlingHttpServletRequest.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
 public class Breadcrumbs {
 
     @Inject
     @Via("resource")
+    @Default(intValues=1)
     int depth;
 
     @Inject
@@ -43,6 +49,7 @@ public class Breadcrumbs {
 
     @Inject
     @Via("resource")
+    @Default(values="../..")
     String prefix;
 
     @Inject
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/components/ContentTable.java b/core/src/main/java/org/apache/sling/cms/core/models/components/ContentTable.java
index 21ed513..cbd611e 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/components/ContentTable.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/components/ContentTable.java
@@ -27,6 +27,7 @@ import javax.inject.Inject;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.models.annotations.Default;
 import org.apache.sling.models.annotations.DefaultInjectionStrategy;
 import org.apache.sling.models.annotations.Model;
 import org.apache.sling.models.annotations.Via;
@@ -38,6 +39,11 @@ public class ContentTable {
     @Inject
     @Via("resource")
     private List<Resource> columns;
+    
+    @Inject
+    @Via("resource")
+    @Default(values="/")
+    private String defaultPath;
 
     private String[] types;
 
@@ -58,7 +64,10 @@ public class ContentTable {
     public List<ChildResourceData> getChildren() {
         Resource suffix = slingRequest.getRequestPathInfo().getSuffixResource();
         if (suffix == null) {
-            return Collections.emptyList();
+            suffix = slingRequest.getResourceResolver().getResource(defaultPath);
+            if (suffix == null) {
+                return Collections.emptyList();
+            }
         }
         List<ChildResourceData> response = new ArrayList<>();
         suffix.listChildren().forEachRemaining(child -> {
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/components/SiteNav.java b/core/src/main/java/org/apache/sling/cms/core/models/components/SiteNav.java
new file mode 100644
index 0000000..934cf3a
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/models/components/SiteNav.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.sling.cms.core.models.components;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.models.annotations.DefaultInjectionStrategy;
+import org.apache.sling.models.annotations.Model;
+
+@Model(adaptables = SlingHttpServletRequest.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
+public class SiteNav {
+
+}
diff --git a/ui/src/main/frontend/src/js/cms.js b/ui/src/main/frontend/src/js/cms.js
index d53ed3d..72b9474 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -50,9 +50,9 @@ Sling.CMS = {
 				return $modal;
 			},
 			fetchModal: function(title, link, path, complete){
-				var $modal = $('<div class="modal"><div class="modal-background"></div><div class="modal-card is-draggable"><header class="modal-card-head"><p class="modal-card-title">'+title+'</p></header><section class="modal-card-body"></section><footer class="modal-card-foot"><a class="close-modal is-warning button" aria-label="close">Cancel</a></footer></div>');
+				var $modal = $('<div class="modal"><div class="modal-background"></div><div class="modal-card is-draggable"><header class="modal-card-head"><p class="modal-card-title">'+title+'</p></header><section class="modal-card-body"></section><footer class="modal-card-foot"><a class="close-modal is-danger button" aria-label="close">Cancel</a></footer></div>');
 				$('body').append($modal);
-				$modal.find('.modal-card-body').load(link + " " +path,function(){
+				$modal.find('.modal-card-body').load(link,function(){
 					var submitButton = $modal.find('button:submit');
 					var closeButton = $modal.find('.close-modal');
 					submitButton.insertBefore(closeButton);
diff --git a/ui/src/main/resources/jcr_root/content.json b/ui/src/main/resources/jcr_root/content.json
index e064ab5..0f29c12 100644
--- a/ui/src/main/resources/jcr_root/content.json
+++ b/ui/src/main/resources/jcr_root/content.json
@@ -1,3 +1,7 @@
 {
-    "jcr:primaryType": "sling:Folder"
+    "jcr:primaryType": "sling:Folder",
+    "allowedResourceTypes": [
+        "sling:Site",
+        "sling:OrderedFolder"
+    ]
 }
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp
index 17570b7..5fe486d 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp
@@ -17,36 +17,6 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
-<sling:findResources var="content" query="${properties.query}" language="JCR-SQL2" />
 <aside class="menu">
-<a class="menu-label toggle-hidden" data-target="#nav-${fn:replace(properties.title,' ','-')}">${properties.title}</a>
-<ul class="menu-list ${fn:startsWith(slingRequest.requestURI, properties.prefix) ? '' : 'is-hidden'}" id="nav-${fn:replace(properties.title,' ','-')}">
-    <c:forEach var="item" items="${content}">
-        <c:set var="prefixPath" value="${item.path}/" />
-        <li class="${(fn:startsWith(slingRequest.requestPathInfo.suffix, prefixPath) || slingRequest.requestPathInfo.suffix == item.path) ? 'is-active' : ''}">
-            <a href="${properties.itemPrefix}${item.path}" title="View ${item.valueMap['jcr:title']}">
-                <c:choose>
-                    <c:when test="${sling:getRelativeResource(item,'jcr:content') != null}">
-                        <sling:encode value="${sling:getRelativeResource(item,'jcr:content').valueMap['jcr:title']}" mode="HTML" />
-                    </c:when>
-                    <c:when test="${not empty item.valueMap['jcr:title']}">
-                        <sling:encode value="${item.valueMap['jcr:title']}" mode="HTML" />
-                    </c:when>
-                    <c:otherwise>
-                        <sling:encode value="${item.name}" mode="HTML" />
-                    </c:otherwise>
-                </c:choose>
-            </a>
-        </li>
-    </c:forEach>
-    <c:choose>
-        <c:when test="${not empty properties.createTitle}">
-            <c:set var="createTitle" value="${properties.createTitle}" />
-        </c:when>
-        <c:otherwise>
-            <c:set var="createTitle" value="${properties.title}" />
-        </c:otherwise>      
-    </c:choose>
-    <li><a href="${properties.createPath}" class="Fetch-Modal" title="Create a new ${createTitle}"  data-title="Create ${createTitle}" data-path=".Main-Content form"><span class="icon is-small"><i class="jam jam-plus"></i></span> ${createTitle}</a></li>
-</ul>
+<a class="menu-label toggle-hidden" href="${properties.itemPrefix}" data-target="#nav-${fn:replace(properties.title,' ','-')}">${properties.title}</a>
 </aside>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
index 36aefb8..e8ee431 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
@@ -23,6 +23,9 @@
     <img src="/static/clientlibs/sling-cms/img/sling-logo.svg" width="100" alt="Apache Sling"/>
 </a>
 <a href="/cms/start.html" class="navbar-item" title="CMS Home"><span class="icon"><i class="jam jam-home-f"></i></span></a>
+<div class="navbar-item">
+<sling:include path="breadcrumb" resourceType="sling-cms/components/cms/contentbreadcrumb" />
+</div>
 <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
   <span aria-hidden="true"></span>
   <span aria-hidden="true"></span>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/form.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/form.json
new file mode 100644
index 0000000..f815a51
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/form.json
@@ -0,0 +1,4 @@
+{
+    "jcr:primaryType" : "sling:Component",
+    "jcr:title": "CMS - Form Page"
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/form/form.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/form/form.jsp
new file mode 100644
index 0000000..16eedf0
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/form/form.jsp
@@ -0,0 +1,20 @@
+<%-- /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */ --%>
+ <%@include file="/libs/sling-cms/global.jsp"%>
+<sling:include path="container" resourceType="sling-cms/components/general/container" />
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/folder.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/folder.json
new file mode 100644
index 0000000..8c04f36
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/folder.json
@@ -0,0 +1,59 @@
+{
+    "jcr:primaryType": "sling:Page",
+    "jcr:content": {
+        "sling:resourceType": "sling-cms/components/pages/form",
+        "jcr:title": "Create Folder",
+        "jcr:primaryType": "nt:unstructured",
+        "container": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/general/container",
+            "richtext": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/general/richtext",
+                "text": "<h3>Create Folder</h3>"
+            },
+            "slingform": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/editor/slingform",
+                "actionSuffix": "/*",
+                "button": "Create Folder",
+                "successPrepend": "/libs/sling-cms/content/site/content.html",
+                "fields": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "sling:resourceType": "sling-cms/components/general/container",
+                    "title": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/text",
+                        "label": "Title",
+                        "name": "jcr:content/jcr:title",
+                        "required": true
+                    },
+                    "name": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/text",
+                        "label": "Name",
+                        "name": ":name"
+                    },
+                    "nameParam": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": ":nameParam",
+                        "value": "jcr:content/jcr:title"
+                    },
+                    "primaryType": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": "jcr:primaryType",
+                        "value": "sling:OrderedFolder"
+                    },
+                    "contentPrimaryType": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": "jcr:content/jcr:primaryType",
+                        "value": "nt:unstructured"
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/site.json
similarity index 90%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json
copy to ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/site.json
index 5d6c0e9..d2c64c9 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/site.json
@@ -1,17 +1,12 @@
 {
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
+		"sling:resourceType": "sling-cms/components/pages/form",
 		"jcr:title": "Create Site",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
 			"jcr:primaryType": "nt:unstructured",
 			"sling:resourceType": "sling-cms/components/general/container",
-			"richtext": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Create Site</h3>"
-			},
 			"slingform": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/editor/slingform",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/creategroup.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/sitegroup.json
similarity index 97%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/content/site/creategroup.json
copy to ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/sitegroup.json
index 9b434ac..353affa 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/creategroup.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/create/sitegroup.json
@@ -1,7 +1,7 @@
 {
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
+		"sling:resourceType": "sling-cms/components/pages/form",
 		"jcr:title": "Create Folder",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/file.json
similarity index 90%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/content/file/edit.json
copy to ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/file.json
index 6887601..f11fdf7 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/file.json
@@ -1,7 +1,7 @@
 {
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
+		"sling:resourceType": "sling-cms/components/pages/form",
 		"jcr:title": "Edit File",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/folder.json
similarity index 70%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
copy to ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/folder.json
index a508fc6..b2092a5 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/folder.json
@@ -2,7 +2,7 @@
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
 		"sling:resourceType": "sling-cms/components/pages/base",
-		"jcr:title": "Edit Site Group",
+		"jcr:title": "Edit Folder",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
 			"jcr:primaryType": "nt:unstructured",
@@ -10,13 +10,12 @@
 			"richtext": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Edit Site Group</h3>"
+				"text": "<h3>Edit Folder</h3>"
 			},
 			"slingform": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/editor/slingform",
-				"actionSuffix": "/*",
-				"button": "Create Folder",
+				"button": "Edit Folder",
 				"successPrepend":"/libs/sling-cms/content/site/content.html",
 				"fields": {
 					"jcr:primaryType": "nt:unstructured",
@@ -27,15 +26,6 @@
 						"label": "Title",
 						"name": "jcr:content/jcr:title",
 						"required": true
-					},
-					"config": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/path",
-						"basePath": "/conf",
-						"label": "Config",
-						"name": "sling:configRef",
-						"required": false,
-						"type": "config"
 					}
 				}
 			}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/site.json
similarity index 73%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json
copy to ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/site.json
index 5d6c0e9..319e9a5 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/actions/edit/site.json
@@ -2,7 +2,7 @@
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
 		"sling:resourceType": "sling-cms/components/pages/base",
-		"jcr:title": "Create Site",
+		"jcr:title": "Edit Site",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
 			"jcr:primaryType": "nt:unstructured",
@@ -10,14 +10,12 @@
 			"richtext": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Create Site</h3>"
+				"text": "<h3>Edit Site</h3>"
 			},
 			"slingform": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/editor/slingform",
-				"actionSuffix": "/*",
-				"button": "Create Site",
-				"successPrepend": "/libs/sling-cms/content/site/content.html",
+				"button": "Edit Site",
 				"fields": {
 					"jcr:primaryType": "nt:unstructured",
 					"sling:resourceType": "sling-cms/components/general/container",
@@ -28,17 +26,12 @@
 						"name": "jcr:title",
 						"required": true
 					},
-					"name": {
+					"description": {
 						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/text",
-						"label": "Name",
-						"name": ":name"
-					},
-					"nameParam": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": ":nameParam",
-						"value": "jcr:title"
+						"sling:resourceType": "sling-cms/components/editor/fields/textarea",
+						"label": "Description",
+						"name": "jcr:description",
+						"required": false
 					},
 					"url": {
 						"jcr:primaryType": "nt:unstructured",
@@ -63,12 +56,6 @@
 						"name": "sling:configRef",
 						"required": false,
 						"type": "config"
-					},
-					"primaryType": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": "jcr:primaryType",
-						"value": "sling:Site"
 					}
 				}
 			}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/edit.json
index 6887601..f11fdf7 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/edit.json
@@ -1,7 +1,7 @@
 {
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
+		"sling:resourceType": "sling-cms/components/pages/form",
 		"jcr:title": "Edit File",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/upload.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/upload.json
index 1723c34..f8ae93f 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/upload.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/upload.json
@@ -1,17 +1,12 @@
 {
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
+		"sling:resourceType": "sling-cms/components/pages/form",
 		"jcr:title": "Upload File",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
 			"jcr:primaryType": "nt:unstructured",
 			"sling:resourceType": "sling-cms/components/general/container",
-			"richtext": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Upload File</h3>"
-			},
 			"slingform": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/editor/slingform",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json
index 73a0458..8c04f36 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json
@@ -1,59 +1,59 @@
 {
-	"jcr:primaryType": "sling:Page",
-	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
-		"jcr:title": "Create Folder",
-		"jcr:primaryType": "nt:unstructured",
-		"container": {
-			"jcr:primaryType": "nt:unstructured",
-			"sling:resourceType": "sling-cms/components/general/container",
-			"richtext": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Create Folder</h3>"
-			},
-			"slingform": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/editor/slingform",
-				"actionSuffix": "/*",
-				"button": "Create Folder",
-				"successPrepend":"/libs/sling-cms/content/site/content.html",
-				"fields": {
-					"jcr:primaryType": "nt:unstructured",
-					"sling:resourceType": "sling-cms/components/general/container",
-					"title": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/text",
-						"label": "Title",
-						"name": "jcr:content/jcr:title",
-						"required": true
-					},
-					"name": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/text",
-						"label": "Name",
-						"name": ":name"
-					},
-					"nameParam": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": ":nameParam",
-						"value":"jcr:content/jcr:title"
-					},
-					"primaryType": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": "jcr:primaryType",
-						"value": "sling:OrderedFolder"
-					},
-					"contentPrimaryType": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": "jcr:content/jcr:primaryType",
-						"value": "nt:unstructured"
-					}
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
+    "jcr:primaryType": "sling:Page",
+    "jcr:content": {
+        "sling:resourceType": "sling-cms/components/pages/form",
+        "jcr:title": "Create Folder",
+        "jcr:primaryType": "nt:unstructured",
+        "container": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/general/container",
+            "richtext": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/general/richtext",
+                "text": "<h3>Create Folder</h3>"
+            },
+            "slingform": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/editor/slingform",
+                "actionSuffix": "/*",
+                "button": "Create Folder",
+                "successPrepend": "/libs/sling-cms/content/site/content.html",
+                "fields": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "sling:resourceType": "sling-cms/components/general/container",
+                    "title": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/text",
+                        "label": "Title",
+                        "name": "jcr:content/jcr:title",
+                        "required": true
+                    },
+                    "name": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/text",
+                        "label": "Name",
+                        "name": ":name"
+                    },
+                    "nameParam": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": ":nameParam",
+                        "value": "jcr:content/jcr:title"
+                    },
+                    "primaryType": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": "jcr:primaryType",
+                        "value": "sling:OrderedFolder"
+                    },
+                    "contentPrimaryType": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": "jcr:content/jcr:primaryType",
+                        "value": "nt:unstructured"
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json
index 5d6c0e9..d2c64c9 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/create.json
@@ -1,17 +1,12 @@
 {
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
+		"sling:resourceType": "sling-cms/components/pages/form",
 		"jcr:title": "Create Site",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
 			"jcr:primaryType": "nt:unstructured",
 			"sling:resourceType": "sling-cms/components/general/container",
-			"richtext": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Create Site</h3>"
-			},
 			"slingform": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/editor/slingform",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/creategroup.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/creategroup.json
index 9b434ac..353affa 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/creategroup.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/creategroup.json
@@ -1,7 +1,7 @@
 {
 	"jcr:primaryType": "sling:Page",
 	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
+		"sling:resourceType": "sling-cms/components/pages/form",
 		"jcr:title": "Create Folder",
 		"jcr:primaryType": "nt:unstructured",
 		"container": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
index a508fc6..44c9b33 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
@@ -1,44 +1,44 @@
 {
-	"jcr:primaryType": "sling:Page",
-	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
-		"jcr:title": "Edit Site Group",
-		"jcr:primaryType": "nt:unstructured",
-		"container": {
-			"jcr:primaryType": "nt:unstructured",
-			"sling:resourceType": "sling-cms/components/general/container",
-			"richtext": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Edit Site Group</h3>"
-			},
-			"slingform": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/editor/slingform",
-				"actionSuffix": "/*",
-				"button": "Create Folder",
-				"successPrepend":"/libs/sling-cms/content/site/content.html",
-				"fields": {
-					"jcr:primaryType": "nt:unstructured",
-					"sling:resourceType": "sling-cms/components/general/container",
-					"title": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/text",
-						"label": "Title",
-						"name": "jcr:content/jcr:title",
-						"required": true
-					},
-					"config": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/path",
-						"basePath": "/conf",
-						"label": "Config",
-						"name": "sling:configRef",
-						"required": false,
-						"type": "config"
-					}
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
+    "jcr:primaryType": "sling:Page",
+    "jcr:content": {
+        "sling:resourceType": "sling-cms/components/pages/base",
+        "jcr:title": "Edit Site Group",
+        "jcr:primaryType": "nt:unstructured",
+        "container": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/general/container",
+            "richtext": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/general/richtext",
+                "text": "<h3>Edit Site Group</h3>"
+            },
+            "slingform": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/editor/slingform",
+                "actionSuffix": "/*",
+                "button": "Create Folder",
+                "successPrepend": "/libs/sling-cms/content/site/content.html",
+                "fields": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "sling:resourceType": "sling-cms/components/general/container",
+                    "title": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/text",
+                        "label": "Title",
+                        "name": "jcr:content/jcr:title",
+                        "required": true
+                    },
+                    "config": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/path",
+                        "basePath": "/conf",
+                        "label": "Config",
+                        "name": "sling:configRef",
+                        "required": false,
+                        "type": "config"
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
index 275fcc9..9c37266 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
@@ -1,67 +1,71 @@
 {
-	"jcr:primaryType": "sling:Page",
-	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
-		"jcr:title": "Site Content",
-		"jcr:primaryType": "nt:unstructured",
-		"container": {
-			"jcr:primaryType": "nt:unstructured",
-			"sling:resourceType": "sling-cms/components/general/container",
-			"contentactions": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contentactions",
-				"actions": {
-					"page": {
-						"jcr:primaryType": "nt:unstructured",
-						"label": "Site",
-						"icon" : "jam jam-document",
-						"prefix": "/cms/site/create.html"
-					},
-					"folder": {
-						"jcr:primaryType": "nt:unstructured",
-						"label": "Site Group",
-						"icon" : "jam jam-document-f",
-						"prefix": "/cms/site/creategroup.html"
-					}
-				}
-			},
-			"contentbreadcrumb": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
-				"depth": 2,
-				"prefix": "/cms/site/sites.html",
-				"titleProp": "jcr:content/jcr:title"
-			},
-			"contenttable": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contenttable",
-				"columns": {
+    "jcr:primaryType": "sling:Page",
+    "jcr:content": {
+        "sling:resourceType": "sling-cms/components/pages/base",
+        "jcr:title": "Site Content",
+        "jcr:primaryType": "nt:unstructured",
+        "container": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/general/container",
+            "contentactions": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/cms/contentactions",
+                "actions": {
+                    "page": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "label": "Site",
+                        "icon": "jam jam-document",
+                        "prefix": "/cms/actions/create/site.html"
+                    },
+                    "folder": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "label": "Site Group",
+                        "icon": "jam jam-document-f",
+                        "prefix": "/cms/actions/create/sitegroup.html"
+                    }
+                }
+            },
+            "contentbreadcrumb": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
+                "depth": 2,
+                "prefix": "/cms/site/sites.html",
+                "titleProp": "jcr:content/jcr:title"
+            },
+            "contenttable": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/cms/contenttable",
+                "defaultPath": "/content",
+                "columns": {
                     "jcr:primaryType": "nt:unstructured",
-                    "resourceTypes":["sling:Site","sling:OrderedFolder"],
+                    "resourceTypes": [
+                        "sling:Site",
+                        "sling:OrderedFolder"
+                    ],
                     "name": {
                         "jcr:primaryType": "nt:unstructured",
                         "sling:resourceType": "sling-cms/components/cms/columns/name",
                         "link": true,
-                        "jcr:title":"Name",
-                         "prefix": "/cms/site/content.html"
+                        "jcr:title": "Name",
+                        "prefix": "/cms/site/sites.html"
                     },
                     "title": {
                         "jcr:primaryType": "nt:unstructured",
                         "sling:resourceType": "sling-cms/components/cms/columns/text",
                         "property": "jcr:content/jcr:title",
-                        "jcr:title":"Title",
+                        "jcr:title": "Title",
                         "type": "String"
                     },
                     "lastModified": {
                         "jcr:primaryType": "nt:unstructured",
                         "sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
-                        "jcr:title":"Last Modified",
+                        "jcr:title": "Last Modified",
                         "subPath": "jcr:content/"
                     },
                     "actions": {
                         "jcr:primaryType": "nt:unstructured",
                         "sling:resourceType": "sling-cms/components/cms/columns/actions",
-                        "jcr:title":"Actions",
+                        "jcr:title": "Actions",
                         "edit": {
                             "jcr:primaryType": "nt:unstructured",
                             "modal": true,
@@ -84,8 +88,8 @@
                             "modal": true
                         }
                     }
-				}
-			}
-		}
-	}
+                }
+            }
+        }
+    }
 }
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
index 2c061fa..b4ec947 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
@@ -1,110 +1,100 @@
 {
-	"jcr:primaryType": "sling:Page",
-	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
-		"jcr:title": "Start",
-		"jcr:primaryType": "nt:unstructured",
-		"sling:vanityPath": "/cms",
-		"sling:redirect": true,
-		"center": true,
-		"container": {
-			"jcr:primaryType": "nt:unstructured",
-			"sling:resourceType": "sling-cms/components/general/container",
-			"richtext": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h2>Welcome to the Apache Sling CMS!<\/h2><p>This is a full-featured Content Management System built using the Apache Sling Framework! To begin, select Site on the left to add your first website.<\/p>"
-			}
-		},
-		"nav": {
-			"jcr:primaryType": "nt:unstructured",
-			"sling:resourceType": "sling-cms/components/general/container",
-			"sitenav": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contentnav",
-				"createPath": "/cms/site/creategroup.html/content",
-				"createTitle": "Site Group",
-				"prefix": "/cms/site",
-				"itemPrefix": "/cms/site/sites.html",
-				"query": "SELECT * FROM [sling:OrderedFolder] AS s WHERE ISCHILDNODE(s,'/content') ORDER BY NAME()",
-				"title": "Sites"
-			},
-			"staticnav": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contentnav",
-				"createPath": "/cms/folder/create.html/static",
-				"createTitle": "Folder",
-				"prefix": "/cms/static",
-				"itemPrefix": "/cms/static/content.html",
-				"query": "SELECT * FROM [sling:Folder] AS s WHERE ISCHILDNODE(s,'/static') ORDER BY NAME()",
-				"title": "Static Content"
-			},
-			"taxonomynav": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contentnav",
-				"createPath": "/cms/taxonomy/create.html/etc/taxonomy",
-				"prefix": "/cms/taxonomy",
-				"itemPrefix": "/cms/taxonomy/list.html",
-				"query": "SELECT * FROM [sling:Taxonomy] AS s WHERE ISCHILDNODE(s,'/etc/taxonomy') ORDER BY NAME()",
-				"title": "Taxonomy"
-			},
-			"configurationnav": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contentnav",
-				"createPath": "/cms/folder/create.html/conf",
-				"prefix": "/cms/config",
-				"itemPrefix": "/cms/config/list.html",
-				"query": "SELECT * FROM [sling:OrderedFolder] AS s WHERE ISCHILDNODE(s,'/conf') ORDER BY NAME()",
-				"title": "Configuration"
-			},
-			"usergeneratednav": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/contentnav",
-				"createPath": "/cms/folder/create.html/etc/usergenerated",
-				"createFolder": "Bucket",
-				"prefix": "/cms/usergenerated",
-				"itemPrefix": "/cms/usergenerated/content.html",
-				"query": "SELECT * FROM [sling:OrderedFolder] AS s WHERE ISCHILDNODE(s,'/etc/usergenerated') ORDER BY NAME()",
-				"title": "User Generated"
-			},
-			"toolsnav": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/cms/staticnav",
-				"title": "Tools",
-				"links": {
-					"jcr:primaryType": "nt:unstructured",
-					"contentpackages": {
-						"jcr:primaryType": "nt:unstructured",
-						"link": "/bin/packages.html",
-						"text": "Content Packages"
-					},
-					"i18n": {
-						"jcr:primaryType": "nt:unstructured",
-						"link": "/cms/i18n/dictionaries.html/etc/i18n",
-						"text": "Internationalization (i18n)"
-					},
-					"mappings": {
-						"jcr:primaryType": "nt:unstructured",
-						"link": "/cms/mappings/list.html/etc/map",
-						"text": "Mappings"
-					},
-					"nodebrowser": {
-						"jcr:primaryType": "nt:unstructured",
-						"link": "/bin/browser.html",
-						"text": "Node Browser"
-					},
-					"systemconsole": {
-						"jcr:primaryType": "nt:unstructured",
-						"link": "/system/console",
-						"text": "System Console"
-					},
-					"usersgroups": {
-						"jcr:primaryType": "nt:unstructured",
-						"link": "/bin/users.html",
-						"text": "Users &amp; Groups"
-					}
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
+    "jcr:primaryType": "sling:Page",
+    "jcr:content": {
+        "sling:resourceType": "sling-cms/components/pages/base",
+        "jcr:title": "Start",
+        "jcr:primaryType": "nt:unstructured",
+        "sling:vanityPath": "/cms",
+        "sling:redirect": true,
+        "center": true,
+        "container": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/general/container",
+            "richtext": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/general/richtext",
+                "text": "<h2>Welcome to the Apache Sling CMS!<\/h2><p>This is a full-featured Content Management System built using the Apache Sling Framework! To begin, select Site on the left to add your first website.<\/p>"
+            }
+        },
+        "nav": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/general/container",
+            "othernav": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/cms/staticnav",
+                "title": "Manage",
+                "links": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "sitenav": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/site/sites.html/content",
+                        "text": "Sites"
+                    },
+                    "staticnav": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/static/content.html/static",
+                        "text": "Static Content"
+                    },
+                    "taxonomy": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/taxonomy/list.html/etc/taxonomy",
+                        "text": "Taxonomy"
+                    },
+                    "templates": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/taxonomy/list.html/etc/taxonomy",
+                        "text": "Templates"
+                    },
+                    "config": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/config/list.html/conf",
+                        "text": "Configuration"
+                    },
+                    "usergenerated": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/usergenerated/content.html/etc/usergenerated",
+                        "text": "User Generated"
+                    }
+                }
+            },
+            "toolsnav": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/cms/staticnav",
+                "title": "Tools",
+                "links": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "contentpackages": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/bin/packages.html",
+                        "text": "Content Packages"
+                    },
+                    "i18n": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/i18n/dictionaries.html/etc/i18n",
+                        "text": "Internationalization (i18n)"
+                    },
+                    "mappings": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/cms/mappings/list.html/etc/map",
+                        "text": "Mappings"
+                    },
+                    "nodebrowser": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/bin/browser.html",
+                        "text": "Node Browser"
+                    },
+                    "systemconsole": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/system/console",
+                        "text": "System Console"
+                    },
+                    "usersgroups": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "link": "/bin/users.html",
+                        "text": "Users &amp; Groups"
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json
index f5d4a73..9a96b51 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json
@@ -1,59 +1,59 @@
 {
-	"jcr:primaryType": "sling:Page",
-	"jcr:content": {
-		"sling:resourceType": "sling-cms/components/pages/base",
-		"jcr:title": "Create Template",
-		"jcr:primaryType": "nt:unstructured",
-		"container": {
-			"jcr:primaryType": "nt:unstructured",
-			"sling:resourceType": "sling-cms/components/general/container",
-			"richtext": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/general/richtext",
-				"text": "<h3>Create Template</h3>"
-			},
-			"slingform": {
-				"jcr:primaryType": "nt:unstructured",
-				"sling:resourceType": "sling-cms/components/editor/slingform",
-				"actionSuffix": "/templates/",
-				"button": "Create Template",
-				"successPrepend": "/libs/sling-cms/content/site/content.html",
-				"fields": {
-					"jcr:primaryType": "nt:unstructured",
-					"sling:resourceType": "sling-cms/components/general/container",
-					"title": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/text",
-						"label": "Title",
-						"name": "jcr:title",
-						"required": true
-					},
-					"name": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/text",
-						"label": "Name",
-						"name": ":name"
-					},
-					"nameParam": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": ":nameParam",
-						"value": "jcr:title"
-					},
-					"primaryType": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": "jcr:primaryType",
-						"value": "nt:unstructured"
-					},
-					"resourceType": {
-						"jcr:primaryType": "nt:unstructured",
-						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
-						"name": "sling:resourceType",
-						"value": "sling-cms/components/cms/pagetemplate"
-					}
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
+    "jcr:primaryType": "sling:Page",
+    "jcr:content": {
+        "sling:resourceType": "sling-cms/components/pages/base",
+        "jcr:title": "Create Template",
+        "jcr:primaryType": "nt:unstructured",
+        "container": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/general/container",
+            "richtext": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/general/richtext",
+                "text": "<h3>Create Template</h3>"
+            },
+            "slingform": {
+                "jcr:primaryType": "nt:unstructured",
+                "sling:resourceType": "sling-cms/components/editor/slingform",
+                "actionSuffix": "/templates/",
+                "button": "Create Template",
+                "successPrepend": "/libs/sling-cms/content/site/content.html",
+                "fields": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "sling:resourceType": "sling-cms/components/general/container",
+                    "title": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/text",
+                        "label": "Title",
+                        "name": "jcr:title",
+                        "required": true
+                    },
+                    "name": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/text",
+                        "label": "Name",
+                        "name": ":name"
+                    },
+                    "nameParam": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": ":nameParam",
+                        "value": "jcr:title"
+                    },
+                    "primaryType": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": "jcr:primaryType",
+                        "value": "nt:unstructured"
+                    },
+                    "resourceType": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+                        "name": "sling:resourceType",
+                        "value": "sling-cms/components/cms/pagetemplate"
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/templates/sitegroup.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/templates/sitegroup.json
new file mode 100644
index 0000000..8533f67
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/templates/sitegroup.json
@@ -0,0 +1,5 @@
+{
+    "jcr:contentType": "nt:unstructured",
+    "sling:resourceType" : "cms/template"
+    
+}


[sling-org-apache-sling-app-cms] 02/04: initial refactoring of content breadcrumbs and content table

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jeb pushed a commit to branch SLING-7900
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit c56383e9fa36fb3046e030f1eb324ad4083435d9
Author: JE Bailey <ja...@sas.com>
AuthorDate: Mon Sep 10 16:36:03 2018 -0400

    initial refactoring of content breadcrumbs and content table
---
 .../cms/core/models/components/Breadcrumbs.java    |  94 ++++--
 .../cms/core/models/components/ContentTable.java   | 141 ++++++++
 ui/pom.xml                                         |  14 +
 ui/src/main/frontend/src/js/cms.js                 |  11 +-
 .../sling-cms/components/cms/columns/name/name.jsp |   2 +-
 .../components/cms/columns/publish/publish.jsp     |  10 +-
 .../cms/contentbreadcrumb/contentbreadcrumb.jsp    |  12 +-
 .../components/cms/contenttable/contenttable.jsp   |  37 +--
 .../libs/sling-cms/content/site/content.json       | 364 +++++----------------
 .../libs/sling-cms/content/site/sites.json         | 163 +++------
 .../libs/sling-cms/content/static/content.json     | 176 +++++-----
 .../resources/jcr_root/libs/sling-cms/global.jsp   |   2 +-
 ui/src/main/resources/jcr_root/web-fragment.xml    |   5 -
 13 files changed, 458 insertions(+), 573 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
index 4c7da58..a856490 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
@@ -17,77 +17,123 @@
 package org.apache.sling.cms.core.models.components;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
-import javax.inject.Named;
 
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.models.annotations.Default;
 import org.apache.sling.models.annotations.DefaultInjectionStrategy;
 import org.apache.sling.models.annotations.Model;
+import org.apache.sling.models.annotations.Via;
 import org.apache.sling.models.annotations.injectorspecific.Self;
 
-@Model(adaptables = SlingHttpServletRequest.class,defaultInjectionStrategy=DefaultInjectionStrategy.OPTIONAL)
+@Model(adaptables = SlingHttpServletRequest.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
 public class Breadcrumbs {
 
     @Inject
+    @Via("resource")
     int depth;
 
     @Inject
-    @Named("jcr:title")
-    String title;
+    Resource resource;
 
     @Inject
+    @Via("resource")
     String prefix;
-    
+
     @Inject
-    Resource resource;
-    
+    @Via("resource")
+    @Default(values = "jcr:title")
+    String titleProp;
+
     @Self
     SlingHttpServletRequest servletRequest;
-    
+
     Resource suffixResource;
-    
+
     List<PathData> pathData = new ArrayList<>();
 
     @PostConstruct
     public void postConstruct() {
         suffixResource = servletRequest.getRequestPathInfo().getSuffixResource();
-        pathData.add(new PathData(prefix+resource.getPath(),title));
+        if (suffixResource == null) {
+            return;
+        }
+        boolean first = true;
+        while (suffixResource.getParent() != null) {
+            String suffix = suffixResource.getPath();
+            pathData.add(0, new PathData(prefix + suffix, getTitle(suffixResource),first));
+            if (first) {
+                first = false;
+            }
+            suffixResource = suffixResource.getParent();
+        }
+        while (--depth > 0) {
+            pathData.remove(0);
+        }
+    }
+
+    private String getTitle(Resource resource) {
+        ValueMap map = resource.getValueMap();
+        String title = map.get("jcr:title", String.class);
+        if (title != null) {
+            return title;
+        }
+        title = map.get("jcr:content/jcr:title", String.class);
+        if (title != null) {
+            return title;
+        }
+        return resource.getName();
     }
-    
+
     public String getTitle() {
         return null;
     }
-    
+
     public List<PathData> getPathData() {
         return pathData;
     }
-    
-    public String getString() {
-        return "flounder";
-    }
-    
-    public static class PathData{
-        
+
+    public static class PathData {
+
         private String href;
         private String title;
-        
-        public PathData(String href, String title) {
+        private boolean first;
+
+        public PathData(String href, String title, boolean first) {
             this.href = href;
             this.title = title;
+            this.first= first;
         }
+
         public String getHref() {
-            return href; //prefix + resource path
+            return href; // prefix + resource path
         }
-        //${parent.valueMap['jcr:title'] != null ? parent.valueMap['jcr:title'] : parent.valueMap['jcr:content/jcr:title']}" default="${parent.name}"
+
+        // ${parent.valueMap['jcr:title'] != null ? parent.valueMap['jcr:title'] :
+        // parent.valueMap['jcr:content/jcr:title']}" default="${parent.name}"
         public String getTitle() {
             return title;
         }
         
+        public String getAria() {
+            if (first) {
+                return "aria-current='page'";
+            }
+            return "";
+        }
+        
+        public String getClassAttr() {
+            if (first) {
+                return "class='is-active'";
+            }
+            return "";
+        }
+
     }
 
 }
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/components/ContentTable.java b/core/src/main/java/org/apache/sling/cms/core/models/components/ContentTable.java
new file mode 100644
index 0000000..21ed513
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/models/components/ContentTable.java
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.sling.cms.core.models.components;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.models.annotations.DefaultInjectionStrategy;
+import org.apache.sling.models.annotations.Model;
+import org.apache.sling.models.annotations.Via;
+import org.apache.sling.models.annotations.injectorspecific.Self;
+
+@Model(adaptables = SlingHttpServletRequest.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
+public class ContentTable {
+
+    @Inject
+    @Via("resource")
+    private List<Resource> columns;
+
+    private String[] types;
+
+    @Self
+    SlingHttpServletRequest slingRequest;
+
+    @PostConstruct
+    public void init() {
+        Resource resource = slingRequest.getResource();
+        ValueMap data = resource.getChild("columns").getValueMap();
+        types = data.get("resourceTypes", new String[]{});
+    }
+    
+    public List<ColumnData> getColumnData() {
+        return columns.stream().map(ColumnData::new).filter(ColumnData::isEligible).collect(Collectors.toList());
+    }
+
+    public List<ChildResourceData> getChildren() {
+        Resource suffix = slingRequest.getRequestPathInfo().getSuffixResource();
+        if (suffix == null) {
+            return Collections.emptyList();
+        }
+        List<ChildResourceData> response = new ArrayList<>();
+        suffix.listChildren().forEachRemaining(child -> {
+            for (String type:types) {
+                if (child.getResourceType().equals(type)) {
+                    response.add(new ChildResourceData(child));
+                }
+            }
+        });
+        return response;
+    }
+
+    public class ColumnData {
+
+        private Resource resource;
+
+        private String name;
+
+        public ColumnData(Resource resource) {
+            this.resource = resource;
+            this.name = resource.getName();
+            
+        }
+
+        public String getClassString() {
+            String reply = "";
+            switch (name) {
+            case "actions":
+                reply = "is-hidden";
+                break;
+            case "publish":
+                reply = "has-text-centered";
+                break;
+            }
+            return reply;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public String getTitle() {
+            return resource.getValueMap().get("jcr:title", "foo");
+        }
+
+        public String getFieldResourceType() {
+            return resource.getValueMap().get("sling:resourceType", "foo");
+        }
+        
+        public Resource getResource() {
+            return resource;
+        }
+
+        public boolean isEligible() {
+            return true;
+        }
+    }
+
+    public class ChildResourceData {
+
+        private Resource resource;
+
+        public ChildResourceData(Resource resource) {
+            this.resource = resource;
+        }
+
+        public String getPath() {
+            return resource.getPath();
+        }
+
+        public String getDataType() {
+            return resource.getResourceType();
+        }
+
+        public boolean isEligible() {
+            return true;
+        }
+    }
+
+}
diff --git a/ui/pom.xml b/ui/pom.xml
index 3e372d1..fc43f04 100644
--- a/ui/pom.xml
+++ b/ui/pom.xml
@@ -180,5 +180,19 @@
 	        <version>0.9.1-SNAPSHOT</version>
 	        <scope>provided</scope>
 	    </dependency>
+	    <dependency>
+	        <groupId>org.apache.sling</groupId>
+	        <artifactId>
+	            org.apache.sling.scripting.jsp.taglib
+	        </artifactId>
+	        <version>2.3.0</version>
+	        <scope>provided</scope>
+	    </dependency>
+	    <dependency>
+	        <groupId>org.apache.geronimo.bundles</groupId>
+	        <artifactId>jstl</artifactId>
+	        <scope>provided</scope>
+	    </dependency>
 	</dependencies>
+
 </project>
\ No newline at end of file
diff --git a/ui/src/main/frontend/src/js/cms.js b/ui/src/main/frontend/src/js/cms.js
index 97a9533..7f17092 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -39,7 +39,7 @@ Sling.CMS = {
 		},
 		ui: {
 			confirmMessage: function(title, message, complete){
-				var $modal = $('<div class="modal"><div class="modal-background"></div><div class="modal-card is-draggable"><header class="modal-card-head"><p class="modal-card-title">'+title+'</p><button class="delete" aria-label="close"></button></header><section class="modal-card-body">'+message+'</section><footer class="modal-card-foot"><button type="button" class="close-modal button is-primary">OK</button></footer></div>');
+				var $modal = $('<div class="modal"><div class="modal-background"></div><div class="modal-card is-draggable"><header class="modal-card-head"><p class="modal-card-title">'+title+'</p></header><section class="modal-card-body">'+message+'</section><footer class="modal-card-foot"><button type="button" class="close-modal button is-primary">OK</button></footer></div>');
 				$('body').append($modal);
 				Sling.CMS.decorate($modal);
 				$modal.addClass('is-active');
@@ -50,11 +50,16 @@ Sling.CMS = {
 				return $modal;
 			},
 			fetchModal: function(title, link, path, complete){
-				var $modal = $('<div class="modal"><div class="modal-background"></div><div class="modal-card is-draggable"><header class="modal-card-head"><p class="modal-card-title">'+title+'</p><button class="delete" aria-label="close"></button></header><section class="modal-card-body"></section><footer class="modal-card-foot"></footer></div>');
+				var $modal = $('<div class="modal"><div class="modal-background"></div><div class="modal-card is-draggable"><header class="modal-card-head"><p class="modal-card-title">'+title+'</p></header><section class="modal-card-body"></section><footer class="modal-card-foot"><a class="close-modal is-warning button" aria-label="close">Cancel</a></footer></div>');
 				$('body').append($modal);
 				$modal.find('.modal-card-body').load(link + " " +path,function(){
+					var submitButton = $modal.find('button:submit');
+					$modal.find('.modal-card-foot').append(submitButton);
+					submitButton.on("click",function(){
+						$modal.find('form').submit();
+					})
 					$modal.addClass('is-active');
-					$modal.find('.delete,.close-modal').click(function(){
+					$modal.find('.close-modal').click(function(){
 						$modal.css('display','none').remove();
 						return false;
 					});
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
index 67dfbd9..0245485 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
@@ -21,7 +21,7 @@
 	<c:set var="colValue" value="${resource.name}" />
 	<c:choose>
 		<c:when test="${colConfig.valueMap.link}">
-			<a href="${colConfig.valueMap.prefix}${resource.path}">
+			<a class="button is-outlined" href="${colConfig.valueMap.prefix}${resource.path}">
 				<sling:encode value="${colValue}" mode="HTML" />
 			</a>
 		</c:when>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
index af15eb3..2005d42 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
@@ -17,16 +17,16 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<td data-value="${sling:getRelativeResource(resource,'jcr:content').valueMap.published ? 0 : 1}">
+<td class="has-text-centered" data-value="${sling:getRelativeResource(resource,'jcr:content').valueMap.published ? 0 : 1}">
 	<c:choose>
 		<c:when test="${sling:getRelativeResource(resource,'jcr:content').valueMap.published}">
-			<a class="button is-success is-outlined Fetch-Modal" href="/cms/shared/unpublish.html${resource.path}" title="Content Published" data-title="Unpublish" data-path=".Main-Content form">
-				<i class="jam jam-check"></i>
+			<a class="button is-success is-centered  Fetch-Modal" href="/cms/shared/unpublish.html${resource.path}" title="Click to Unpublish" data-title="Unpublish" data-path=".Main-Content form">
+				<i class="jam jam-download"></i>
 			</a>
 		</c:when>
 		<c:otherwise>
-			<a class="button is-warning is-outlined Fetch-Modal" href="/cms/shared/publish.html${resource.path}" title="Content Not Published" data-title="Publish" data-path=".Main-Content form">
-				<i class="jam jam-close"></i>
+			<a class="button is-warning Fetch-Modal" href="/cms/shared/publish.html${resource.path}" title="Click to Publish" data-title="Publish" data-path=".Main-Content form">
+				<i class="jam jam-upload"></i>
 			</a>
 		</c:otherwise>
 	</c:choose>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
index 9de9e1c..5eb7eaf 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
@@ -18,20 +18,16 @@
  */ --%>
 <%@page import="org.apache.sling.models.factory.ModelFactory"%>
 <%@page import="org.apache.sling.cms.core.models.components.Breadcrumbs"%>
-<%@include file="/libs/sling-cms/global.jsp"%><%
-
-%>
-
-<sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.cms.core.models.components.Breadcrumbs" var="model"/><nav class="breadcrumb" aria-label="breadcrumbs">
+<%@include file="/libs/sling-cms/global.jsp"%>
+<sling:adaptTo adaptable="${slingRequest}" adaptTo="org.apache.sling.cms.core.models.components.Breadcrumbs" var="model"/>
+<nav class="breadcrumb" aria-label="Breadcrumb">
 <ul>
    <c:forEach var="item" items="${model.pathData}">
        <li>
-           <a href="${item.href}">
+           <a href="${item.href}" ${item.aria} ${item.classAttr} >
                <sling:encode value="${item.title}" mode="HTML" />
            </a>
        </li>
    </c:forEach>
-   <li>$WHY?
-   <li>${model.string}</li>
 </ul>
 </nav>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
index f5bad46..288d921 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
@@ -16,40 +16,29 @@
  * specific language governing permissions and limitations
  * under the License.
  */ --%>
+ <%@page import="org.apache.sling.cms.core.models.components.Breadcrumbs"%>
  <%@include file="/libs/sling-cms/global.jsp"%>
+ <sling:adaptTo adaptable="${slingRequest}" adaptTo="org.apache.sling.cms.core.models.components.ContentTable" var="model"/>
+ <div class="container is-fullwidth">
 <table class="table is-fullwidth is-striped">
     <thead>
         <tr>
-            <th>
-                #
-            </th>
-            <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(resource,'columns'))}">
-                <th class="${column.name == 'actions' ? 'is-hidden' : '' }" data-attribute="${column.name}">
-                    <sling:encode value="${column.valueMap.title}" mode="HTML" />
+            <c:forEach var="column" items="${model.columnData}">
+                <th class="${column.classString}" data-attribute="${column.name}">
+                    <sling:encode value="${column.title}" mode="HTML" />
                 </th>
             </c:forEach>
         </tr>
     </thead>
     <tbody>
-        <c:set var="parentPath" value="${slingRequest.requestPathInfo.suffix}${not empty properties.appendSuffix ? properties.appendSuffix : ''}" />
-        <c:set var="count" value="1" />
-        <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver, parentPath))}">
-            <sling:getResource var="typeConfig" base="${resource}" path="types/${child.valueMap['jcr:primaryType']}" />
-            <c:if test="${typeConfig != null && !fn:contains(child.name,':')}">
-                <tr class="sortable__row" data-resource="${child.path}" data-type="${typeConfig.path}">
-                    <td class="Cell-Static" title="# ${status.index + 1}}" data-sort-value="<fmt:formatNumber pattern="0000" value="${count}" />">
-                        ${count}
-                    </td>
-                    <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(typeConfig,'columns'))}">
-                        <c:set var="configPath" value="columns/${column.name}"/>
-                        <c:set var="colConfig" value="${sling:getRelativeResource(typeConfig,configPath)}" scope="request" />
-                        <c:if test="${colConfig != null}">
-                            <sling:include path="${child.path}" resourceType="${colConfig.valueMap['sling:resourceType']}" />
-                        </c:if>
+        <c:forEach var="child" items="${model.children}">
+                <tr class="sortable__row" data-resource="${child.path}" data-type="${child.dataType}">
+                    <c:forEach var="column" items="${model.columnData}">
+                            <c:set var="colConfig" value="${column.resource}" scope="request" />
+                            <sling:include path="${child.path}" resourceType="${column.fieldResourceType}" />
                     </c:forEach>
                 </tr>
-                <c:set var="count" value="${count + 1}" />
-            </c:if>
         </c:forEach> 
     </tbody>
-</table>
\ No newline at end of file
+</table>
+</div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
index 7b1cc8e..9383b5d 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
@@ -39,297 +39,79 @@
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/cms/contenttable",
 				"columns": {
-					"jcr:primaryType": "nt:unstructured",
-					"name": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Name"
-					},
-					"title": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Title"
-					},
-					"published": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Published"
-					},
-					"type": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Type"
-					},
-					"lastModified": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Last Modified"
-					},
-					"actions": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Actions"
-					}
-				},
-				"types": {
-					"jcr:primaryType": "nt:unstructured",
-					"sling:Page": {
-						"jcr:primaryType": "nt:unstructured",
-						"columns": {
-							"jcr:primaryType": "nt:unstructured",
-							"name": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/name",
-								"link": true,
-								"prefix": "/cms/site/content.html"
-							},
-							"title": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/text",
-								"property": "jcr:content/jcr:title",
-								"type": "String"
-							},
-							"publish": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/publish"
-							},
-							"type": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/static",
-								"value": "Page"
-							},
-							"lastModified": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
-								"subPath": "jcr:content/"
-							},
-							"actions": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/actions",
-								"edit": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": false,
-									"title": "Edit Page",
-									"icon": "pencil-f",
-									"prefix": "/cms/page/edit.html"
-								},
-								"properties": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Edit Page Properties",
-									"icon": "cog",
-									"prefix": "/cms/page/siteeditproperties.html"
-								},
-								"movecopy": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Move / Copy Page",
-									"icon": "move-alt",
-									"prefix": "/cms/shared/movecopy.html"
-								},
-								"version": {
-									"jcr:primaryType": "nt:unstructured",
-									"ajaxPath": ".versionmanager",
-									"modal": true,
-									"title": "Manage Versions",
-									"icon": "history",
-									"prefix": "/cms/shared/versions.html"
-								},
-								"delete": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Delete the specified page",
-									"icon": "trash",
-									"prefix": "/cms/shared/delete.html"
-								}
-							}
-						}
-					},
-					"sling:File": {
-						"jcr:primaryType": "nt:unstructured",
-						"columns": {
-							"jcr:primaryType": "nt:unstructured",
-							"name": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/name",
-								"link": false
-							},
-							"title": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/text",
-								"link": false,
-								"type": "Name"
-							},
-							"publish": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/publish"
-							},
-							"type": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/static",
-								"value": "File"
-							},
-							"lastModified": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
-								"subPath": "jcr:content/"
-							},
-							"actions": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/actions",
-								"edit": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Edit File",
-									"icon": "pencil-f",
-									"prefix": "/cms/file/edit.html"
-								},
-								"optimize": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": false,
-									"title": "Optimize File",
-									"icon": "archive",
-									"prefix": "/cms/file/optimize.html"
-								},
-								"download": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": false,
-									"title": "Download file",
-									"icon": "download"
-								},
-								"movecopy": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Move / Copy File",
-									"icon": "move-alt",
-									"prefix": "/cms/shared/movecopy.html"
-								},
-								"version": {
-									"jcr:primaryType": "nt:unstructured",
-									"ajaxPath": ".versionmanager",
-									"modal": true,
-									"title": "Manage Versions",
-									"icon": "history",
-									"prefix": "/cms/shared/versions.html"
-								},
-								"delete": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Delete File",
-									"icon": "trash",
-									"prefix": "/cms/shared/delete.html"
-								}
-							}
-						}
-					},
-					"sling:OrderedFolder": {
-						"jcr:primaryType": "nt:unstructured",
-						"columns": {
-							"jcr:primaryType": "nt:unstructured",
-							"name": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/name",
-								"link": true,
-								"prefix": "/cms/site/content.html"
-							},
-							"title": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/text",
-								"property": "jcr:content/jcr:title",
-								"type": "String"
-							},
-							"publish": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/publish"
-							},
-							"type": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/static",
-								"value": "Folder"
-							},
-							"lastModified": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
-								"subPath": "jcr:content/"
-							},
-							"actions": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/actions",
-								"edit": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Edit Folder",
-									"icon": "pencil-f",
-									"prefix": "/cms/folder/edit.html"
-								},
-								"movecopy": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Move / Copy Folder",
-									"icon": "move-alt",
-									"prefix": "/cms/shared/movecopy.html"
-								},
-								"delete": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Delete Folder",
-									"icon": "trash",
-									"prefix": "/cms/shared/delete.html"
-								}
-							}
-						}
-					},
-					"sling:Folder": {
-						"jcr:primaryType": "nt:unstructured",
-						"columns": {
-							"jcr:primaryType": "nt:unstructured",
-							"name": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/name",
-								"link": true,
-								"prefix": "/cms/site/content.html"
-							},
-							"title": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/text",
-								"property": "jcr:content/jcr:title",
-								"type": "String"
-							},
-							"publish": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/publish"
-							},
-							"type": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/static",
-								"value": "Folder"
-							},
-							"lastModified": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
-								"subPath": "jcr:content/"
-							},
-							"actions": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/actions",
-								"edit": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Edit Folder",
-									"icon": "pencil-f",
-									"prefix": "/cms/folder/edit.html"
-								},
-								"movecopy": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Move / Copy Folder",
-									"icon": "move-alt",
-									"prefix": "/cms/shared/movecopy.html"
-								},
-								"delete": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Delete Folder",
-									"icon": "trash",
-									"prefix": "/cms/shared/delete.html"
-								}
-							}
-						}
-					}
+				    "resourceTypes" : ["sling:Page","sling:File","sling:OrderedFolder","sling:Folder"],
+                    "name": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/name",
+                        "link": true,
+                        "jcr:title":"Name",
+                        "prefix": "/cms/site/content.html"
+                    },
+                    "title": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/text",
+                        "property": "jcr:content/jcr:title",
+                        "jcr:title":"Title",
+                        "type": "String"
+                    },
+                    "publish": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "jcr:title":"Publish",
+                        "sling:resourceType": "sling-cms/components/cms/columns/publish"
+                    },
+                    "type": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/static",
+                        "jcr:title":"Type",
+                        "value": "Page"
+                    },
+                    "lastModified": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
+                        "jcr:title":"Last Modified",
+                        "subPath": "jcr:content/"
+                    },
+                    "actions": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/actions",
+                        "jcr:title":"Actions",
+                        "edit": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": false,
+                            "title": "Edit Page",
+                            "icon": "pencil-f",
+                            "prefix": "/cms/page/edit.html"
+                        },
+                        "properties": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Edit Page Properties",
+                            "icon": "cog",
+                            "prefix": "/cms/page/siteeditproperties.html"
+                        },
+                        "movecopy": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Move / Copy Page",
+                            "icon": "move-alt",
+                            "prefix": "/cms/shared/movecopy.html"
+                        },
+                        "version": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "ajaxPath": ".versionmanager",
+                            "modal": true,
+                            "title": "Manage Versions",
+                            "icon": "history",
+                            "prefix": "/cms/shared/versions.html"
+                        },
+                        "delete": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Delete the specified page",
+                            "icon": "trash",
+                            "prefix": "/cms/shared/delete.html"
+                        }
+                    }
 				}
 			}
 		}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
index 79f34a3..275fcc9 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
@@ -36,121 +36,54 @@
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/cms/contenttable",
 				"columns": {
-					"jcr:primaryType": "nt:unstructured",
-					"name": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Name"
-					},
-					"title": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Title"
-					},
-					"lastModified": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Last Modified"
-					},
-					"actions": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Actions"
-					}
-				},
-				"types": {
-					"jcr:primaryType": "nt:unstructured",
-					"sling:Site":{
-						"jcr:primaryType": "nt:unstructured",
-						"columns": {
-							"jcr:primaryType": "nt:unstructured",
-							"name": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/name",
-								"link": true,
-								"prefix": "/cms/site/content.html"
-							},
-							"title": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/text",
-								"property": "jcr:title",
-								"type": "String"
-							},
-							"lastModified": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified"
-							},
-							"actions": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/actions",
-								"edit": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Edit Site",
-									"icon": "pencil-f",
-									"prefix": "/cms/site/edit.html"
-								},
-								"movecopy": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Move / Copy Site",
-									"icon": "move-alt",
-									"prefix": "/cms/shared/movecopy.html"
-								},
-								"delete": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Delete the specified site",
-									"icon": "trash",
-									"prefix": "/cms/shared/delete.html"
-								}
-							}
-						}
-					},
-					"sling:OrderedFolder":{
-						"jcr:primaryType": "nt:unstructured",
-						"columns": {
-							"jcr:primaryType": "nt:unstructured",
-							"name": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/name",
-								"link": true,
-								"prefix": "/cms/site/sites.html"
-							},
-							"title": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/text",
-								"property": "jcr:content/jcr:title",
-								"type": "String"
-							},
-							"lastModified": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
-								"subPath": "jcr:content/"
-							},
-							"actions": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/actions",
-								"edit": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Edit Site Group",
-									"icon": "pencil-f",
-									"prefix": "/cms/site/editgroup.html"
-								},
-								"movecopy": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Move / Copy Site Group",
-									"icon": "move-alt",
-									"prefix": "/cms/shared/movecopy.html"
-								},
-								"delete": {
-									"jcr:primaryType": "nt:unstructured",
-									"title": "Delete Site Group",
-									"icon": "trash",
-									"prefix": "/cms/shared/delete.html",
-									"modal": true
-								}
-							}
-						}
-					}
+                    "jcr:primaryType": "nt:unstructured",
+                    "resourceTypes":["sling:Site","sling:OrderedFolder"],
+                    "name": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/name",
+                        "link": true,
+                        "jcr:title":"Name",
+                         "prefix": "/cms/site/content.html"
+                    },
+                    "title": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/text",
+                        "property": "jcr:content/jcr:title",
+                        "jcr:title":"Title",
+                        "type": "String"
+                    },
+                    "lastModified": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
+                        "jcr:title":"Last Modified",
+                        "subPath": "jcr:content/"
+                    },
+                    "actions": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/actions",
+                        "jcr:title":"Actions",
+                        "edit": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Edit Site Group",
+                            "icon": "pencil-f",
+                            "prefix": "/cms/site/editgroup.html"
+                        },
+                        "movecopy": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Move / Copy Site Group",
+                            "icon": "move-alt",
+                            "prefix": "/cms/shared/movecopy.html"
+                        },
+                        "delete": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "title": "Delete Site Group",
+                            "icon": "trash",
+                            "prefix": "/cms/shared/delete.html",
+                            "modal": true
+                        }
+                    }
 				}
 			}
 		}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
index d7ede68..71a2c04 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
@@ -34,109 +34,93 @@
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/cms/contenttable",
 				"columns": {
+                     "resourceTypes":["sling:File","sling:OrderedFolder","sling:Folder","nt:file"],
 					"jcr:primaryType": "nt:unstructured",
-					"name": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Name"
-					},
-					"title": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Title"
-					},
-					"published": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Published"
-					},
-					"type": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Type"
-					},
-					"lastModified": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Last Modified"
-					},
-					"actions": {
-						"jcr:primaryType": "nt:unstructured",
-						"title": "Actions"
-					}
+                    "name": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/name",
+                        "jcr:title":"Name",
+                        "prefix": "/cms/static/content.html",
+                        "link": true
+                    },
+                    "title": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/text",
+                        "link": false,
+                        "jcr:title":"Title",
+                        "type": "Name"
+                    },
+                    "publish": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "jcr:title":"Publish",
+                        "sling:resourceType": "sling-cms/components/cms/columns/publish"
+                    },
+                    "type": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/static",
+                        "jcr:title":"Type",
+                        "value": "Folder"
+                    },
+                    "lastModified": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
+                        "jcr:title":"Last Modified",
+                        "subPath": "jcr:content/"
+                    },
+                    "actions": {
+                        "jcr:primaryType": "nt:unstructured",
+                        "sling:resourceType": "sling-cms/components/cms/columns/actions",
+                        "jcr:title":"Actions",
+                        "edit": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Edit File",
+                            "icon": "pencil-f",
+                            "prefix": "/cms/file/edit.html"
+                        },
+                        "optimize": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": false,
+                            "title": "Optimize File",
+                            "icon": "archive",
+                            "prefix": "/cms/file/optimize.html"
+                        },
+                        "download": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": false,
+                            "title": "Download file",
+                            "icon": "download"
+                        },
+                        "movecopy": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Move / Copy File",
+                            "icon": "move-alt",
+                            "prefix": "/cms/shared/movecopy.html"
+                        },
+                        "version": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "ajaxPath": ".versionmanager",
+                            "modal": true,
+                            "title": "Manage Versions",
+                            "icon": "history",
+                            "prefix": "/cms/shared/versions.html"
+                        },
+                        "delete": {
+                            "jcr:primaryType": "nt:unstructured",
+                            "modal": true,
+                            "title": "Delete File",
+                            "icon": "trash",
+                            "prefix": "/cms/shared/delete.html"
+                        }
+                    }
 				},
 				"types": {
 					"jcr:primaryType": "nt:unstructured",
 					"sling:File":{
 						"jcr:primaryType": "nt:unstructured",
 						"columns": {
-							"jcr:primaryType": "nt:unstructured",
-							"name": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/name",
-								"link": false
-							},
-							"title": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/text",
-								"link": false,
-								"type": "Name"
-							},
-							"publish": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/publish"
-							},
-							"type": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/static",
-								"value": "File"
-							},
-							"lastModified": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
-								"subPath": "jcr:content/"
-							},
-							"actions": {
-								"jcr:primaryType": "nt:unstructured",
-								"sling:resourceType": "sling-cms/components/cms/columns/actions",
-								"edit": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Edit File",
-									"icon": "pencil-f",
-									"prefix": "/cms/file/edit.html"
-								},
-								"optimize": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": false,
-									"title": "Optimize File",
-									"icon": "archive",
-									"prefix": "/cms/file/optimize.html"
-								},
-								"download": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": false,
-									"title": "Download file",
-									"icon": "download"
-								},
-								"movecopy": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Move / Copy File",
-									"icon": "move-alt",
-									"prefix": "/cms/shared/movecopy.html"
-								},
-								"version": {
-									"jcr:primaryType": "nt:unstructured",
-									"ajaxPath": ".versionmanager",
-									"modal": true,
-									"title": "Manage Versions",
-									"icon": "history",
-									"prefix": "/cms/shared/versions.html"
-								},
-								"delete": {
-									"jcr:primaryType": "nt:unstructured",
-									"modal": true,
-									"title": "Delete File",
-									"icon": "trash",
-									"prefix": "/cms/shared/delete.html"
-								}
-							}
+
 						}
 					},
 					"sling:OrderedFolder":{
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/global.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/global.jsp
index 8b34fcc..5dc580e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/global.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/global.jsp
@@ -20,4 +20,4 @@
 %><%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%
 %><%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%
 %><%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><%
-%><sling:defineObjects /><sling:adaptTo var="properties" adaptable="${resource}" adaptTo="org.apache.sling.api.resource.ValueMap" />
\ No newline at end of file
+%><sling:defineObjects /><sling:adaptTo var="properties" adaptable="${resource}" adaptTo="org.apache.sling.api.resource.ValueMap" />
diff --git a/ui/src/main/resources/jcr_root/web-fragment.xml b/ui/src/main/resources/jcr_root/web-fragment.xml
deleted file mode 100644
index 78ede58..0000000
--- a/ui/src/main/resources/jcr_root/web-fragment.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<web-fragment id="WebFragment_ID" version="3.0"
-    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
-    <name>ui</name>
-</web-fragment>
\ No newline at end of file


[sling-org-apache-sling-app-cms] 01/04: initial changes

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jeb pushed a commit to branch SLING-7900
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit df8ec3aa0f2491b65dadadde20f920ddba2a0751
Author: JE Bailey <ja...@sas.com>
AuthorDate: Fri Sep 7 13:25:13 2018 -0400

    initial changes
---
 .../cms/core/models/components/Breadcrumbs.java    | 93 ++++++++++++++++++++++
 ui/pom.xml                                         | 12 +++
 .../cms/contentbreadcrumb/contentbreadcrumb.jsp    | 40 ++++------
 ui/src/main/resources/jcr_root/web-fragment.xml    |  5 ++
 4 files changed, 126 insertions(+), 24 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
new file mode 100644
index 0000000..4c7da58
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.sling.cms.core.models.components;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.models.annotations.DefaultInjectionStrategy;
+import org.apache.sling.models.annotations.Model;
+import org.apache.sling.models.annotations.injectorspecific.Self;
+
+@Model(adaptables = SlingHttpServletRequest.class,defaultInjectionStrategy=DefaultInjectionStrategy.OPTIONAL)
+public class Breadcrumbs {
+
+    @Inject
+    int depth;
+
+    @Inject
+    @Named("jcr:title")
+    String title;
+
+    @Inject
+    String prefix;
+    
+    @Inject
+    Resource resource;
+    
+    @Self
+    SlingHttpServletRequest servletRequest;
+    
+    Resource suffixResource;
+    
+    List<PathData> pathData = new ArrayList<>();
+
+    @PostConstruct
+    public void postConstruct() {
+        suffixResource = servletRequest.getRequestPathInfo().getSuffixResource();
+        pathData.add(new PathData(prefix+resource.getPath(),title));
+    }
+    
+    public String getTitle() {
+        return null;
+    }
+    
+    public List<PathData> getPathData() {
+        return pathData;
+    }
+    
+    public String getString() {
+        return "flounder";
+    }
+    
+    public static class PathData{
+        
+        private String href;
+        private String title;
+        
+        public PathData(String href, String title) {
+            this.href = href;
+            this.title = title;
+        }
+        public String getHref() {
+            return href; //prefix + resource path
+        }
+        //${parent.valueMap['jcr:title'] != null ? parent.valueMap['jcr:title'] : parent.valueMap['jcr:content/jcr:title']}" default="${parent.name}"
+        public String getTitle() {
+            return title;
+        }
+        
+    }
+
+}
diff --git a/ui/pom.xml b/ui/pom.xml
index 68052c8..3e372d1 100644
--- a/ui/pom.xml
+++ b/ui/pom.xml
@@ -169,4 +169,16 @@
 			</build>
 		</profile>
 	</profiles>
+	<dependencies>
+	    <dependency>
+	        <groupId>org.apache.sling</groupId>
+	        <artifactId>org.apache.sling.models.api</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>org.apache.sling</groupId>
+	        <artifactId>org.apache.sling.cms.core</artifactId>
+	        <version>0.9.1-SNAPSHOT</version>
+	        <scope>provided</scope>
+	    </dependency>
+	</dependencies>
 </project>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
index 18212b7..9de9e1c 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
@@ -16,30 +16,22 @@
  * specific language governing permissions and limitations
  * under the License.
  */ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<sling:getParent resource="${slingRequest.requestPathInfo.suffixResource}" var="root" level="${resource.valueMap.depth}" />
-<nav class="breadcrumb" aria-label="breadcrumbs">
+<%@page import="org.apache.sling.models.factory.ModelFactory"%>
+<%@page import="org.apache.sling.cms.core.models.components.Breadcrumbs"%>
+<%@include file="/libs/sling-cms/global.jsp"%><%
+
+%>
+
+<sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.cms.core.models.components.Breadcrumbs" var="model"/><nav class="breadcrumb" aria-label="breadcrumbs">
 <ul>
-    <li>
-        <a href="${resource.valueMap.prefix}${root.path}">
-            <sling:encode value="${root.valueMap['jcr:title'] != null ? root.valueMap['jcr:title'] : root.valueMap['jcr:content/jcr:title']}" default="${root.name}" mode="HTML" />
-        </a>
-    </li>
-    <c:if test="${site.path != slingRequest.requestPathInfo.suffix && site.path != slingRequest.requestPathInfo.suffixResource.parent.path}">
-        <c:forEach var="parent" items="${sling:getParents(slingRequest.requestPathInfo.suffixResource,(resource.valueMap.depth + 1))}">
-            <li>
-                <a href="${resource.valueMap.prefix}${parent.path}">
-                    <sling:encode value="${parent.valueMap['jcr:title'] != null ? parent.valueMap['jcr:title'] : parent.valueMap['jcr:content/jcr:title']}" default="${parent.name}" mode="HTML" />
-                </a>
-            </li>
-        </c:forEach>
-    </c:if>
-    <c:if test="${root.path != slingRequest.requestPathInfo.suffix}">
-        <li class="is-active">
-            <a href="#">
-            <sling:encode value="${slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] != null ? slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] : slingRequest.requestPathInfo.suffixResource.valueMap['jcr:content/jcr:title']}" default="${slingRequest.requestPathInfo.suffixResource.name}" mode="HTML" />
-            </a>
-        </li>
-    </c:if>
+   <c:forEach var="item" items="${model.pathData}">
+       <li>
+           <a href="${item.href}">
+               <sling:encode value="${item.title}" mode="HTML" />
+           </a>
+       </li>
+   </c:forEach>
+   <li>$WHY?
+   <li>${model.string}</li>
 </ul>
 </nav>
diff --git a/ui/src/main/resources/jcr_root/web-fragment.xml b/ui/src/main/resources/jcr_root/web-fragment.xml
new file mode 100644
index 0000000..78ede58
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/web-fragment.xml
@@ -0,0 +1,5 @@
+<web-fragment id="WebFragment_ID" version="3.0"
+    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
+    <name>ui</name>
+</web-fragment>
\ No newline at end of file


[sling-org-apache-sling-app-cms] 03/04: table updates and modals

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jeb pushed a commit to branch SLING-7900
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit c05d366a37c9303199cdb54b970a0997bef11366
Author: JE Bailey <ja...@sas.com>
AuthorDate: Tue Sep 11 16:01:47 2018 -0400

    table updates and modals
---
 ui/src/main/frontend/src/js/cms.js                 |  5 +-
 .../sling-cms/components/cms/columns/name/name.jsp | 25 +++----
 .../components/cms/columns/publish/publish.jsp     |  2 +-
 .../components/cms/contentbreadcrumb/edit.json     | 31 ++++++++
 .../components/cms/contenttable/contenttable.jsp   | 33 ++++----
 .../components/editor/fields/file/field.jsp        | 87 ++++++++++------------
 .../components/editor/fields/repeating/field.jsp   | 12 +--
 7 files changed, 108 insertions(+), 87 deletions(-)

diff --git a/ui/src/main/frontend/src/js/cms.js b/ui/src/main/frontend/src/js/cms.js
index 7f17092..d53ed3d 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -54,12 +54,13 @@ Sling.CMS = {
 				$('body').append($modal);
 				$modal.find('.modal-card-body').load(link + " " +path,function(){
 					var submitButton = $modal.find('button:submit');
-					$modal.find('.modal-card-foot').append(submitButton);
+					var closeButton = $modal.find('.close-modal');
+					submitButton.insertBefore(closeButton);
 					submitButton.on("click",function(){
 						$modal.find('form').submit();
 					})
 					$modal.addClass('is-active');
-					$modal.find('.close-modal').click(function(){
+					closeButton.click(function(){
 						$modal.css('display','none').remove();
 						return false;
 					});
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
index 0245485..5455d56 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
@@ -17,16 +17,15 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<td>
-	<c:set var="colValue" value="${resource.name}" />
-	<c:choose>
-		<c:when test="${colConfig.valueMap.link}">
-			<a class="button is-outlined" href="${colConfig.valueMap.prefix}${resource.path}">
-				<sling:encode value="${colValue}" mode="HTML" />
-			</a>
-		</c:when>
-		<c:otherwise>
-			<sling:encode value="${colValue}" mode="HTML" />
-		</c:otherwise>
-	</c:choose>
-</td>
\ No newline at end of file
+<td><c:set var="colValue" value="${resource.name}" /> <c:choose>
+        <c:when test="${colConfig.valueMap.link}">
+            <a class="has-text-primary"
+                href="${colConfig.valueMap.prefix}${resource.path}">
+                <span class="icon"><i class="jam jam-link"></i></span>&nbsp;
+                <sling:encode value="${colValue}" mode="HTML" />
+            </a>
+        </c:when>
+        <c:otherwise>
+            <sling:encode value="${colValue}" mode="HTML" />
+        </c:otherwise>
+    </c:choose></td>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
index 2005d42..ee55ded 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
@@ -25,7 +25,7 @@
 			</a>
 		</c:when>
 		<c:otherwise>
-			<a class="button is-warning Fetch-Modal" href="/cms/shared/publish.html${resource.path}" title="Click to Publish" data-title="Publish" data-path=".Main-Content form">
+			<a class="button is-danger Fetch-Modal" href="/cms/shared/publish.html${resource.path}" title="Click to Publish" data-title="Publish" data-path=".Main-Content form">
 				<i class="jam jam-upload"></i>
 			</a>
 		</c:otherwise>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/edit.json
new file mode 100644
index 0000000..e5f0709
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/edit.json
@@ -0,0 +1,31 @@
+ {
+	"jcr:primaryType": "nt:unstructured",
+	"sling:resourceType": "sling-cms/components/editor/slingform",
+	"title": "Suffix BreadCrumb",
+	"button": "Save Suffix Breadcrumb",
+	"fields": {
+		"jcr:primaryType": "nt:unstructured",
+		"sling:resourceType": "sling-cms/components/general/container",
+		"level": {
+			"jcr:primaryType": "nt:unstructured",
+			"sling:resourceType": "sling-cms/components/editor/fields/text",
+			"label": "Depth",
+			"name": "depth",
+			"required": true,
+			"type": "number"
+		},
+		"levelTypeHint": {
+			"jcr:primaryType": "nt:unstructured",
+			"sling:resourceType": "sling-cms/components/editor/fields/hidden",
+			"name": "level@TypeHint",
+			"value": "Long"
+		},
+		"prefix": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/text",
+            "label": "Prefix",
+            "name": "prefix",
+            "required": true
+        }
+	}
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
index 288d921..80819b1 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
@@ -16,29 +16,30 @@
  * specific language governing permissions and limitations
  * under the License.
  */ --%>
- <%@page import="org.apache.sling.cms.core.models.components.Breadcrumbs"%>
- <%@include file="/libs/sling-cms/global.jsp"%>
- <sling:adaptTo adaptable="${slingRequest}" adaptTo="org.apache.sling.cms.core.models.components.ContentTable" var="model"/>
- <div class="container is-fullwidth">
+<%@page import="org.apache.sling.cms.core.models.components.Breadcrumbs"%>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<sling:adaptTo adaptable="${slingRequest}"
+    adaptTo="org.apache.sling.cms.core.models.components.ContentTable"
+    var="model" />
 <table class="table is-fullwidth is-striped">
     <thead>
         <tr>
             <c:forEach var="column" items="${model.columnData}">
-                <th class="${column.classString}" data-attribute="${column.name}">
-                    <sling:encode value="${column.title}" mode="HTML" />
-                </th>
+                <th class="${column.classString}"
+                    data-attribute="${column.name}"><sling:encode
+                        value="${column.title}" mode="HTML" /></th>
             </c:forEach>
         </tr>
     </thead>
     <tbody>
         <c:forEach var="child" items="${model.children}">
-                <tr class="sortable__row" data-resource="${child.path}" data-type="${child.dataType}">
-                    <c:forEach var="column" items="${model.columnData}">
-                            <c:set var="colConfig" value="${column.resource}" scope="request" />
-                            <sling:include path="${child.path}" resourceType="${column.fieldResourceType}" />
-                    </c:forEach>
-                </tr>
-        </c:forEach> 
+            <tr class="sortable__row" data-resource="${child.path}"
+                data-type="${child.dataType}">
+                <c:forEach var="column" items="${model.columnData}">
+                    <c:set var="colConfig" value="${column.resource}" scope="request" />
+                    <sling:include path="${child.path}" resourceType="${column.fieldResourceType}" />
+                </c:forEach>
+            </tr>
+        </c:forEach>
     </tbody>
-</table>
-</div>
\ No newline at end of file
+</table>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/file/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/file/field.jsp
index 9817976..7b0748c 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/file/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/file/field.jsp
@@ -16,59 +16,48 @@
  * specific language governing permissions and limitations
  * under the License.
  */ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
+<%@include file="/libs/sling-cms/global.jsp"%>
 <c:choose>
-	<c:when test="${properties.accepts}">
-		<c:set var="accepts" value="${properties.accepts}" />
-	</c:when>
-	<c:otherwise>
-		<c:set var="accepts" value="image/*,audio/*,video/*,application/json,text/css,application/pdf" />
-	</c:otherwise>
+    <c:when test="${properties.accepts}">
+        <c:set var="accepts" value="${properties.accepts}" />
+    </c:when>
+    <c:otherwise>
+        <c:set var="accepts"
+            value="image/*,audio/*,video/*,application/json,text/css,application/pdf" />
+    </c:otherwise>
 </c:choose>
 <div class="repeating">
- 	<fieldset disabled="disabled" class="repeating__template is-hidden">
- 		<div class="repeating__item Grid">
+    <fieldset disabled="disabled" class="repeating__template is-hidden">
+        <div class="repeating__item Grid">
             <div class="file has-name is-fullwidth">
-                <label class="file-label">
-                   <input type="file" class="file-input" name="${properties.name}" ${required} accept="${accepts}" />
-                   <span class="file-cta">
-                      <span class="file-icon">
-                        <i class="jam jam-upload"></i>
-                      </span>
-                      <span class="file-label">
-                        Browse
-                      </span>
-                   </span>
-                   <span class="file-name">
-                        No File Selected
-                    </span>
-                    <span class='control'>
-                        <span class="button repeating__remove button">-</span>
-                    </span>
+                <label class="file-label"> <input type="file"
+                    class="file-input" name="${properties.name}"
+                    ${required} accept="${accepts}" /> <span
+                    class="file-cta"> <span class="file-icon">
+                            <i class="jam jam-upload"></i>
+                    </span> <span class="file-label"> Browse </span>
+                </span> <span class="file-name"> No File Selected </span> <span
+                    class='control'> <span
+                        class="button repeating__remove button">-</span>
+                </span>
                 </label>
             </div>
-	 	</div>
- 	</fieldset>
- 	<div class="repeating__container">
-	 	<div class="repeating__item Grid">
- 			<div class="file has-name is-fullwidth">
- 			    <label class="file-label">
-	 			   <input type="file" class="file-input" name="${properties.name}" ${required} accept="${accepts}" />
-	 			   <span class="file-cta">
-				      <span class="file-icon">
-				        <i class="jam jam-upload"></i>
-				      </span>
-				      <span class="file-label">
-				        Browse
-				      </span>
-                   </span>
-				   <span class="file-name">
-                        No File Selected
-                    </span>
-	                    <span class="button repeating__remove button">-</span>
-	 			</label>
-	 		</div>
-	 	</div>
-	</div>
-	<button class="repeating__add button">+</button>
+        </div>
+    </fieldset>
+    <div class="repeating__container">
+        <div class="repeating__item Grid">
+            <div class="file has-name is-fullwidth">
+                <label class="file-label"> <input type="file"
+                    class="file-input" name="${properties.name}"
+                    ${required} accept="${accepts}" /> <span
+                    class="file-cta"> <span class="file-icon">
+                            <i class="jam jam-upload"></i>
+                    </span> <span class="file-label"> Browse </span>
+                </span> <span class="file-name"> No File Selected </span> <span
+                    class="button repeating__remove button">-</span>
+                </label>
+            </div>
+        </div>
+    </div>
+    <a class="repeating__add button">+</a>
 </div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp
index fec99b8..bd50290 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp
@@ -24,9 +24,9 @@
 	 			<input type="${properties.type}" value="" class="input" name="${properties.name}" ${required} ${disabled} />
 	 		</div>
 	 		<div class="control">
-		 		<button class="repeating__remove button">
+		 		<a class="repeating__remove button">
 		 			<span class="jam jam-minus"></span>
-		 		</button>
+		 		</a>
 		 	</div>
 	 	</div>
  	</fieldset>
@@ -37,14 +37,14 @@
 		 			<input type="${properties.type}" value="${value}" class="input" name="${properties.name}" ${required} ${disabled} />
 		 		</div>
 		 		<div class="control">
-			 		<button class="repeating__remove button">
+			 		<a class="repeating__remove button">
 		 				<span class="jam jam-minus"></span>
-			 		</button>
+			 		</a>
 			 	</div>
 		 	</div>
 	 	</c:forEach>
  	</div>
- 	<button class="repeating__add button">
+ 	<a class="repeating__add button">
 		 <span class="jam jam-plus"></span>
- 	</button>
+ 	</a>
  </div>
\ No newline at end of file