Index: servlets/src/main/resources/org/hippoecm/repository/RepositoryServlet-html2.ftl IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- servlets/src/main/resources/org/hippoecm/repository/RepositoryServlet-html2.ftl (revision ) +++ servlets/src/main/resources/org/hippoecm/repository/RepositoryServlet-html2.ftl (revision ) @@ -0,0 +1,343 @@ + +<#-- + Copyright 2014-2015 Hippo B.V. (http://www.onehippo.com) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +${response.setContentType("text/html;charset=UTF-8")} + + + + + Hippo Repository Browser + + + + + + +
+ <#if jcrSession??> +
${jcrSession.userID}
+ +
+ Log out +
+
+ +
+

Search by ...

+
+ + <#assign searchType = request.getParameter('search-type')!'xpath'/> +
+ + + + + checked="checked"> + + checked="checked"> + + checked="checked"> + + checked="checked"> + +
+ +
+ <#--UUID--> +
+ + +
+ + <#--FREE TEXT--> +
+ +
+ Limit: +
+ + <#--XPATH--> +
+ +
+ Limit: +
+ + <#--SQL--> +
+ +
+ Limit: +
+
+ + + +
+
+
+ + <#if exception??> +
+ ERROR:
${exception}
+
+ + +
+ + <#if currentNode??> +

Referenced node

+ Accessing node:  + + <#assign baseRelPath = "./"> + <#if currentNode.isSame(rootNode)>/root/ + <#else> + <#assign distance = ancestorNodes?size> + <#assign baseRelPath = ""> + <#list 0..distance as d> + <#assign baseRelPath = "../${baseRelPath}"> + + /root/<#t> + <#assign distance = ancestorNodes?size> + <#list ancestorNodes as ancestor> + <#assign ancestorLink = ""> + <#list 1..distance as d> + <#assign ancestorLink = "../${ancestorLink}"> + + ${ancestor.name!html}/<#t> + <#assign distance = distance - 1> + + ${currentNode.name!html}/<#t> + + + + + + + +
+ + <#if queryResult??> +

Query executed

+ +
+ <#if searchType == 'text'> + Text query:  + <#elseif searchType == 'xpath'> + XPath query:  + <#elseif searchType == 'sql'> + SQL query:  + + + ${originalQuery?html} + +
+ + <#assign queryResultNodes = queryResult.nodes> + Number of results found: ${queryResultTotalSize!-1} + +
    + <#list queryResultNodes as node> + <#if node??> +
  1. + ${node.path} + <#-- TODO + writer.println("c"); + writer.println("cms"); + writer.println("r"); + --> + +
  2. + + +
+ +
+ + + + + <#list queryResult.columnNames as columnName> + + + + <#list queryResult.rows as row> + <#if row??> + + + <#assign values = row.values> + <#if values??> + <#list row.values as value> + <#if value?? && value.type != 2> + + <#else> + + + + + + + +
#${columnName}
${row_index + 1}${value.string!}
+ + + <#if repositoryMap??> +

Repository as map

+
+ _name = ${repositoryMap.get("_name")!}
+ _location = ${repositoryMap.get("_location")!}
+ _path = ${repositoryMap.get("_path")!}
+ _index = ${repositoryMap.get("_index")!}
+ _size = ${repositoryMap.get("_size")!}
+ <#list repositoryMap?keys as key> + ${key} = ${repositoryMap.get(key)!} + +
+ + + <#if nodeById??> + + <#if request.getParameter("uuid")??> + +

Get node by UUID

+
+ UUID: ${request.getParameter("uuid")!} +
+
    +
  1. + Found node: ${nodeById.path} + <#-- TODO + writer.println("c"); + writer.println("cms"); + writer.println("r");--> +
  2. +
+ + <#elseif request.getParameter("deref")??> + +

Getting nodes having a reference to

+
+ UUID = ${request.getParameter("uuid")!} + ( ${nodeById.path} ) +
+
+ + + + + + <#list nodeById.references as prop> + + + + + +
Node pathProperty reference name
${prop.parent.path!}${prop.name!}
+ + + + + +
+ + +