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

[sling-org-apache-sling-app-cms] branch master updated (926ffb0 -> a115bc2)

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

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


    from 926ffb0  Fixing SLING-8059 : Fixing the version manager
     new 8101b95  Fixing the optimize page
     new f171863  Some minor tweaks to the text sizing of the search results
     new 323a631  Adding a limited editor for nt:file resources
     new 0c9492a  Improving the spacing on the template editor
     new a115bc2  Navigational improvements

The 5 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:
 ui/src/main/frontend/src/scss/cms.scss             |   2 +-
 .../components/cms/searchresults/searchresults.jsp |  11 ++-
 .../components/cms/staticnav/staticnav.jsp         |  36 ++++++--
 .../cms/templateeditor/config/config.jsp           | 102 +++++++++++----------
 .../cms/templateeditor/templateeditor.jsp          |  30 ++++--
 .../libs/sling-cms/content/file/optimize.json      |   2 +-
 .../libs/sling-cms/content/site/content.json       |  56 +++++++++++
 .../jcr_root/libs/sling-cms/content/start.json     |  15 +++
 .../libs/sling-cms/content/static/content.json     |  56 +++++++++++
 9 files changed, 235 insertions(+), 75 deletions(-)


[sling-org-apache-sling-app-cms] 01/05: Fixing the optimize page

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

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

commit 8101b95c944b43d8e4f1b190f6d7e85212ebcce1
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Oct 30 00:06:35 2018 -0400

    Fixing the optimize page
---
 .../main/resources/jcr_root/libs/sling-cms/content/file/optimize.json   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/optimize.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/optimize.json
index 7363391..117979e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/optimize.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/file/optimize.json
@@ -1,7 +1,7 @@
 {
     "jcr:primaryType": "sling:Page",
     "jcr:content": {
-        "sling:resourceType": "sling-cms/components/pages/modal",
+        "sling:resourceType": "sling-cms/components/pages/base",
         "jcr:title": "Optimize File",
         "jcr:primaryType": "nt:unstructured",
         "container": {


[sling-org-apache-sling-app-cms] 03/05: Adding a limited editor for nt:file resources

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

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

commit 323a631415a866d40110615b8b712eb174720205
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Oct 30 00:08:26 2018 -0400

    Adding a limited editor for nt:file resources
---
 .../libs/sling-cms/content/site/content.json       | 56 ++++++++++++++++++++++
 .../libs/sling-cms/content/static/content.json     | 56 ++++++++++++++++++++++
 2 files changed, 112 insertions(+)

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 6e9ba9b..76bc446 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
@@ -146,6 +146,62 @@
                             }
                         }
                     },
+                    "nt: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/static",
+                                "value": "N/A"
+                            },
+                            "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",
+                                "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"
+                                },
+                                "delete": {
+                                    "jcr:primaryType": "nt:unstructured",
+                                    "modal": true,
+                                    "title": "Delete File",
+                                    "icon": "trash",
+                                    "prefix": "/cms/shared/delete.html"
+                                }
+                            }
+                        }
+                    },
                     "sling:File": {
                         "jcr:primaryType": "nt:unstructured",
                         "columns": {
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 b3a04d5..db53a4b 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
@@ -139,6 +139,62 @@
                             }
                         }
                     },
+                    "nt: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/static",
+                                "value": "N/A"
+                            },
+                            "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",
+                                "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"
+                                },
+                                "delete": {
+                                    "jcr:primaryType": "nt:unstructured",
+                                    "modal": true,
+                                    "title": "Delete File",
+                                    "icon": "trash",
+                                    "prefix": "/cms/shared/delete.html"
+                                }
+                            }
+                        }
+                    },
                     "sling:OrderedFolder": {
                         "jcr:primaryType": "nt:unstructured",
                         "columns": {


[sling-org-apache-sling-app-cms] 04/05: Improving the spacing on the template editor

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

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

commit 0c9492acbf39139c41b973033f2b5d95b0568dd9
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Oct 30 00:09:17 2018 -0400

    Improving the spacing on the template editor
---
 .../cms/templateeditor/templateeditor.jsp          | 30 ++++++++++++++++------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp
index dc281ed..bdb76b1 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp
@@ -16,16 +16,30 @@
  * specific language governing permissions and limitations
  * under the License.
  */ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
- 
-<a href="/cms/config/edit.html${slingRequest.requestPathInfo.suffixResource.parent.parent.path}">
-	&lt; Site Configuration
-</a>
- <br/>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<nav class="breadcrumb" aria-label="breadcrumbs">
+    <c:set var="siteCfgResource" value="${slingRequest.requestPathInfo.suffixResource.parent.parent}" />
+    <c:set var="cfgResource" value="${siteCfgResource.parent}" />
+    <ul>
+        <li>
+            <a href="/cms/config/list.html${cfgResource.path}">
+                <sling:encode value="${cfgResource.valueMap['jcr:content/jcr:title']}" mode="HTML" default="${cfgResource.name}" />
+            </a>
+        </li>
+        <li>
+            <a href="/cms/config/edit.html${siteCfgResource.path}">
+                <sling:encode value="${siteCfgResource.valueMap['jcr:title']}" mode="HTML" default="${siteCfgResource.name}" />
+            </a>
+        </li>
+        <li class="is-active">
+            <a href="#">
+                <sling:encode value="${resource.valueMap['jcr:title']}" mode="HTML" />
+            </a>
+        </li>
+    </ul>
+</nav>
  <c:set var="cmsEditEnabled" value="true" scope="request" />
 <sling:call script="/libs/sling-cms/components/editor/scripts/init.jsp" />
-
 <sling:include path="${slingRequest.requestPathInfo.suffix}" resourceType="sling-cms/components/cms/templateeditor/config" />
-
 <sling:call script="/libs/sling-cms/components/editor/scripts/finalize.jsp" />
 <c:set var="cmsEditEnabled" value="false" scope="request" />
\ No newline at end of file


[sling-org-apache-sling-app-cms] 02/05: Some minor tweaks to the text sizing of the search results

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

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

commit f17186397dcd5bd9483ddb703cc62c217322be61
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Oct 30 00:07:19 2018 -0400

    Some minor tweaks to the text sizing of the search results
---
 .../sling-cms/components/cms/searchresults/searchresults.jsp  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/searchresults/searchresults.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/searchresults/searchresults.jsp
index 4cfac7f..32aed0f 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/searchresults/searchresults.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/searchresults/searchresults.jsp
@@ -17,6 +17,7 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
+<hr/>
 <div id="search-results">
     <div class="tile is-ancestor">
     <sling:adaptTo adaptable="${slingRequest}" adaptTo="org.apache.sling.cms.core.models.SearchResults" var="results" />
@@ -48,15 +49,15 @@
                             <c:set var="icon" value="sitemap" />
                         </c:otherwise>
                     </c:choose>
-                    <h4>
+                    <h5>
                         <span class="jam jam-${icon}"></span>
                         ${sling:encode(title,'HTML')}
-                    </h4>
-                    <small>
+                    </h5>
+                    <small class="is-size-7">
                         <em>${result.path}</em>
                     </small><br/>
-                    <br />
-                    <a href="#" class="button search-select-button" data-path="${result.path}">Select</a>
+                    <a href="#" class="button search-select-button is-pulled-right" data-path="${result.path}">Select</a>
+                    <br class="clearfix" />
                 </div>
             </div>
         </c:forEach>


[sling-org-apache-sling-app-cms] 05/05: Navigational improvements

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

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

commit a115bc2bac53bbecb94789f085f0744d7313ef54
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Oct 30 00:09:41 2018 -0400

    Navigational improvements
---
 ui/src/main/frontend/src/scss/cms.scss             |   2 +-
 .../components/cms/staticnav/staticnav.jsp         |  36 ++++++--
 .../cms/templateeditor/config/config.jsp           | 102 +++++++++++----------
 .../jcr_root/libs/sling-cms/content/start.json     |  15 +++
 4 files changed, 94 insertions(+), 61 deletions(-)

diff --git a/ui/src/main/frontend/src/scss/cms.scss b/ui/src/main/frontend/src/scss/cms.scss
index beafbd1..0ea87de 100644
--- a/ui/src/main/frontend/src/scss/cms.scss
+++ b/ui/src/main/frontend/src/scss/cms.scss
@@ -165,7 +165,7 @@ table.dataTable thead .sorting_desc:after {
     content: "\e92a"
 }
 
-.table tr.is-selected {
+.table tr.is-selected, .menu .is-selected {
     background-color: lighten($gray, 50%);
     color: $grey-darker;
 }
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp
index 7d6f342..c34fde4 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp
@@ -18,16 +18,32 @@
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
 <div class="menu">
-<a class="menu-label toggle-hidden" data-target="#${fn:replace(properties.title,' ','-')}-nav">${properties.title}</a>
-<c:set var="hidden" value="is-hidden" />
-<c:forEach var="item" items="${sling:listChildren(sling:getRelativeResource(resource,'links'))}">
-    <c:if test="${fn:startsWith(slingRequest.requestURI,item.valueMap.link)}">
-        <c:set var="hidden" value="" />
-    </c:if>
-</c:forEach>
-<ul id="${fn:replace(properties.title,' ','-')}-nav" class="menu-list ${hidden}">
+    <a class="menu-label toggle-hidden" data-target="#${fn:replace(properties.title,' ','-')}-nav">
+        <sling:encode value="${properties.title}" mode="HTML" />
+    </a>
+    <c:set var="hidden" value="is-hidden" />
     <c:forEach var="item" items="${sling:listChildren(sling:getRelativeResource(resource,'links'))}">
-        <li class="${fn:startsWith(slingRequest.requestURI,item.valueMap.link) ? 'active' : ''}"><a href="${item.valueMap.link}">${item.valueMap.text}</a></li>
+        <c:if test="${fn:startsWith(slingRequest.requestURI,item.valueMap.link)}">
+            <c:set var="hidden" value="" />
+        </c:if>
+        <c:forEach var="alternative" items="${item.valueMap.alternatives}">
+            <c:if test="${fn:startsWith(slingRequest.requestURI,alternative)}">
+                <c:set var="hidden" value="" />
+            </c:if>
+        </c:forEach>
     </c:forEach>
-</ul>
+    <ul id="${fn:replace(properties.title,' ','-')}-nav" class="menu-list ${hidden}">
+        <c:forEach var="item" items="${sling:listChildren(sling:getRelativeResource(resource,'links'))}">
+            <c:set var="selected" value="" />
+            <c:if test="${fn:startsWith(slingRequest.requestURI,item.valueMap.link)}">
+                <c:set var="selected" value="is-selected" />
+            </c:if>
+            <c:forEach var="alternative" items="${item.valueMap.alternatives}">
+                <c:if test="${fn:startsWith(slingRequest.requestURI,alternative)}">
+                    <c:set var="selected" value="is-selected" />
+                </c:if>
+            </c:forEach>
+            <li class="${selected}"><a href="${item.valueMap.link}">${item.valueMap.text}</a></li>
+        </c:forEach>
+    </ul>
 </div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/config.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/config.jsp
index dd98bc4..c1d48ef 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/config.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/config.jsp
@@ -17,54 +17,56 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
+<br/>
 <h3><sling:encode value="${properties['jcr:title']}" mode="HTML" /> (${resource.path})</h3>
-<dl>
-	<dt>
-		Allowed Paths
-	</dt>
-	<dd>
-		<ul>
-			<c:forEach var="allowedPath" items="${properties.allowedPaths}">
-				<li>
-					<pre><sling:encode value="${allowedPath}" mode="HTML" /></pre>
-				</li>
-			</c:forEach>
-		</ul>
-	</dd>
-	<dt>
-		Available Component Types
-	</dt>
-	<dd>
-		<ul>
-			<c:forEach var="availableComponentType" items="${properties.availableComponentTypes}">
-				<li>
-					<sling:encode value="${availableComponentType}" mode="HTML" />
-				</li>
-			</c:forEach>
-		</ul>
-	</dd>
-	<dt>
-		Template Content
-	</dt>
-	<dd>
-		<pre><sling:encode value="${properties.template}" mode="HTML" /></pre>
-	</dd>
-	<dt>
-		Configuration Fields
-	</dt>
-	<dd>
-		<c:set var="oldAvailableTypes" value="${availableTypes}" />
-		<c:set var="availableTypes" value="SlingCMS-FieldConfig" scope="request" />
-		<sling:include path="fields" resourceType="sling-cms/components/general/container" />
-		<c:set var="availableTypes" value="${oldAvailableTypes}" scope="request" />
-	</dd>
-	<dt>
-		Component Configurations
-	</dt>
-	<dd>
-		<c:set var="oldAvailableTypes" value="${availableTypes}" />
-		<c:set var="availableTypes" value="SlingCMS-ComponentConfig" scope="request" />
-		<sling:include path="componentConfigurations" resourceType="sling-cms/components/general/container" />
-		<c:set var="availableTypes" value="${oldAvailableTypes}" scope="request" />
-	</dd>
-</dl>
+<br/>
+<div>
+    <h4>Allowed Paths</h4>
+    <ul>
+        <c:forEach var="allowedPath" items="${properties.allowedPaths}">
+            <li>
+                <pre><sling:encode value="${allowedPath}" mode="HTML" /></pre>
+            </li>
+        </c:forEach>
+    </ul>
+</div>
+<hr/>
+<div>
+    <h4>
+        Available Component Types
+    </h4>
+    <ul>
+        <c:forEach var="availableComponentType" items="${properties.availableComponentTypes}">
+            <li>
+                <sling:encode value="${availableComponentType}" mode="HTML" />
+            </li>
+        </c:forEach>
+    </ul>
+</div>
+<hr/>
+<div>
+    <h4>
+        Template Content
+    </h4>
+    <pre><sling:encode value="${properties.template}" mode="HTML" /></pre>
+</div>
+<hr/>
+<div>
+    <h4>
+        Configuration Fields
+    </h4>
+    <c:set var="oldAvailableTypes" value="${availableTypes}" />
+    <c:set var="availableTypes" value="SlingCMS-FieldConfig" scope="request" />
+    <sling:include path="fields" resourceType="sling-cms/components/general/container" />
+    <c:set var="availableTypes" value="${oldAvailableTypes}" scope="request" />
+</div>
+<hr/>
+<div>
+    <h4>
+        Component Configurations
+    </h4>
+    <c:set var="oldAvailableTypes" value="${availableTypes}" />
+    <c:set var="availableTypes" value="SlingCMS-ComponentConfig" scope="request" />
+    <sling:include path="componentConfigurations" resourceType="sling-cms/components/general/container" />
+    <c:set var="availableTypes" value="${oldAvailableTypes}" scope="request" />
+</div>
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 53105a2..cff9afc 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
@@ -27,6 +27,10 @@
                     "jcr:primaryType": "nt:unstructured",
                     "sitenav": {
                         "jcr:primaryType": "nt:unstructured",
+                        "alternatives": [
+                            "/cms/site/content.html/content",
+                            "/cms/file/optimize.html"
+                        ],
                         "link": "/cms/site/sites.html/content",
                         "text": "Sites"
                     },
@@ -42,11 +46,18 @@
                     },
                     "config": {
                         "jcr:primaryType": "nt:unstructured",
+                        "alternatives": [
+                            "/cms/template/edit.html",
+                            "/cms/config/edit.html"
+                        ],
                         "link": "/cms/config/list.html/conf",
                         "text": "Configuration"
                     },
                     "usergenerated": {
                         "jcr:primaryType": "nt:unstructured",
+                        "alternatives": [
+                            "/cms/usergenerated/review.html"
+                        ],
                         "link": "/cms/usergenerated/content.html/etc/usergenerated",
                         "text": "User Generated"
                     }
@@ -70,6 +81,10 @@
                     },
                     "i18n": {
                         "jcr:primaryType": "nt:unstructured",
+                        "alternatives": [
+                            "/cms/i18n/dictionaries.html",
+                            "/cms/i18n/dictionary.html"
+                        ],
                         "link": "/cms/i18n/dictionaries.html/etc/i18n",
                         "text": "Internationalization (i18n)"
                     },