You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by fl...@apache.org on 2010/11/09 19:49:16 UTC

svn commit: r1033150 [2/2] - in /lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources: ./ COB-INF/ COB-INF/jx/ COB-INF/jx/site/ COB-INF/jx/tab/ COB-INF/jx/tab/ac/ META-INF/ META-INF/cocoon/ META-INF/cocoon/spring/

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/meta.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/meta.jx?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/meta.jx (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/meta.jx Tue Nov  9 18:49:14 2010
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<!-- $Id: meta.jx 641125 2008-03-26 02:57:48Z andreas $ -->
+
+<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
+  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
+  xmlns="http://www.w3.org/1999/xhtml" 
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
+  <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/head.jx"/>
+  
+  <jx:set var="count" value="${usecase.getParameter('numbers').size()}"/>
+  <page:body onload="lenyaInitTabs(${count})">
+    <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/sitetree.jx"/>
+    <jx:import uri="fallback://lenya/modules/usecase/templates/tabs.jx"/>
+    <div id="contentblock1" class="lenya-tab-sitetree">
+      <h1 id="form-meta" style="width: 600px"><i18n:text>Meta Data</i18n:text></h1>
+      
+      <jx:set var="num2namespace" value="${usecase.getParameter('namespaces')}"/>
+      
+      <jx:import uri="fallback://lenya/modules/usecase/templates/messages.jx"/>
+      
+      <jx:set var="count" value="${usecase.getParameter('numbers').size()}"/>
+      <jx:forEach var="num" items="${usecase.getParameter('numbers')}">
+        <div class="lenyaTabTitle" id="lenyaTabTitle${num}" onclick="lenyaToggleTab(${count}, ${num})">
+          <!--<i18n:text>Namespace</i18n:text>:-->
+          <a><i18n:text><jx:out value="${num2namespace.get(num)}"/></i18n:text></a>
+        </div>
+      </jx:forEach>
+      <jx:forEach var="num" items="${usecase.getParameter('numbers')}">
+        <jx:set var="namespace" value="${num2namespace.get(num)}"/>
+        <div class="lenyaTabBody" id="lenyaTabBody${num}">
+          <table class="lenya-table-list-noborder">
+            <jx:forEach var="key" items="${usecase.getParameter('keys')}">
+              <jx:set var="element" value="${key.substring(key.indexOf('.')).substring(1)}"/>
+              <jx:if test="${key.startsWith('ns' + num + '.')}">
+                <tr>
+                  <td class="lenya-entry-caption">
+                    <label for="${key}"><i18n:text><jx:out value="${element}"/></i18n:text>:</label>
+                  </td>
+                  <td>
+                    <jx:set var="wrapper" value="${usecase.getParameter(key)}"/>
+                    <jx:set var="values" value="${wrapper.getValues()}"/>
+                    <jx:set var="id" value="${element + '@' + namespace}"/>
+                    <jx:choose>
+                      <jx:when test="${wrapper.isEditable()}">
+                        <jx:choose>
+                          <jx:when test="${values.size() &gt; 0}">
+                            <input type="hidden" id="oldValue_${id}" value="${values[0]}"/>
+                            <input type="text" id="input_${id}" name="value" class="lenya-form-element" value="${values[0]}"
+                              onchange="javascript:saveMetaData('${namespace}', '${element}');"
+                              onfocus="javascript:document.getElementById('saved_${id}').style.visibility = 'hidden';"/>
+                          </jx:when>
+                          <jx:otherwise>
+                            <input type="hidden" id="oldValue_${id}" value=""/>
+                            <input type="text" id="input_${id}" name="value" class="lenya-form-element" value=""
+                              onchange="javascript:saveMetaData('${namespace}', '${element}');"
+                              onfocus="javascript:document.getElementById('saved_${id}').style.visibility = 'hidden';"/>
+                          </jx:otherwise>
+                        </jx:choose>
+                        <span id="saved_${id}" style="visibility: hidden;"><i18n:text>saved</i18n:text></span>
+                      </jx:when>
+                      <jx:otherwise>
+                        <jx:set var="value" value="${wrapper.getValue()}"/>
+                        <jx:choose>
+                          <jx:when test="${values.size() == 0}"><em style="color: #999999"><i18n:text>value-not-set</i18n:text></em></jx:when>
+                          <jx:otherwise>
+                            <jx:forEach var="value" items="${values}">
+                              ${value}<br/>
+                            </jx:forEach>
+                          </jx:otherwise>
+                        </jx:choose>
+                      </jx:otherwise>
+                    </jx:choose>
+                  </td>
+                </tr>
+              </jx:if>
+            </jx:forEach>
+          </table>
+        </div>
+      </jx:forEach>
+      
+    </div>
+  </page:body>
+</page:page>
\ No newline at end of file

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/overview.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/overview.jx?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/overview.jx (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/overview.jx Tue Nov  9 18:49:14 2010
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<!-- $Id: overview.jx 730804 2009-01-02 18:16:11Z andreas $ -->
+
+<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
+           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
+           xmlns="http://www.w3.org/1999/xhtml" 
+           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
+  <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/head.jx"/>
+  <page:body>
+    <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/sitetree.jx"/>
+    <jx:import uri="fallback://lenya/modules/usecase/templates/tabs.jx"/>
+    <div id="contentblock1" class="lenya-tab-sitetree">
+      <h1><i18n:text>Overview</i18n:text></h1>
+      <jx:choose>
+        <jx:when test="${usecase.getParameter('document') != null}">
+          <jx:set var="document" value="${usecase.getParameter('document')}"/>
+          <table class="lenya-table-noborder">
+            <tr>
+              <td colspan="2">
+                <jx:import uri="fallback://lenya/modules/usecase/templates/messages.jx"/>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Title</i18n:text>:</td>
+              <td>
+                <jx:out value="${usecase.getParameter('title')}"/>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Description</i18n:text>:</td>
+              <td>
+                <jx:out value="${usecase.getParameter('description')}"/>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Workflow State</i18n:text>:</td>
+              <td>
+                <jx:choose>
+                  <jx:when test="${not(empty(usecase.getParameter('state')))}">
+                    <i18n:text><jx:out value="${usecase.getParameter('state')}"/></i18n:text>
+                  </jx:when>
+                  <jx:otherwise><span style="color: #999999;"><i18n:text>[no workflow]</i18n:text></span></jx:otherwise>
+                </jx:choose>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Live</i18n:text>:</td>
+              <td>
+                <i18n:text><jx:out value="${usecase.getParameter('isLive')}"/></i18n:text>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Available Languages</i18n:text>:</td>
+              <td>
+                <jx:forEach var="language" items="${usecase.getParameter('languages')}">
+                  <jx:choose>
+                    <jx:when test="${language.equals(document.getLanguage())}">
+                      <jx:out value="${language}"/>
+                    </jx:when>
+                    <jx:otherwise>
+                      <jx:set var="translation" value="${document.getTranslation(language)}"/>
+                      <a href="${translation.getCanonicalWebappURL()}?lenya.usecase=tab.overview">
+                        <jx:out value="${language}"/></a>
+                    </jx:otherwise>
+                  </jx:choose>
+                </jx:forEach>
+              </td>
+            </tr>
+            <jx:set var="docLanguages" value="${document.getLanguages().size()}"/>
+            <jx:set var="pubLanguages" value="${document.getPublication().getLanguages().size()}"/>
+            <jx:if test="${docLanguages lt pubLanguages}">
+              <tr>
+                <td class="lenya-entry-caption"><i18n:text>missing-languages</i18n:text>:</td>
+                <td>
+                  <jx:forEach var="language" items="${document.getPublication().getLanguages()}">
+                    <jx:if test="${!document.existsTranslation(language)}">
+                      <a href="?lenya.usecase=sitemanagement.createLanguage&amp;lenya.exitUsecase=tab.overview&amp;language=${language}">
+                        <jx:out value="${language}"/></a>
+                    </jx:if>
+                  </jx:forEach>
+                </td>
+              </tr>
+            </jx:if>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Last modified</i18n:text>:</td>
+              <td>
+                <jx:out value="${usecase.getParameter('lastmodified')}"/>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>UUID</i18n:text>:</td>
+              <td>
+                <jx:out value="${document.getUUID()}"/>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Path</i18n:text>:</td>
+              <td>
+                <jx:out value="${document.getPath()}"/>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Resource Type</i18n:text>:</td>
+              <td>
+                <i18n:text>resourceType-<jx:out value="${document.getResourceType().getName()}"/></i18n:text>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Mime Type</i18n:text>:</td>
+              <td>
+                <jx:out value="${document.getMimeType()}"/>
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Document Size</i18n:text>:</td>
+              <td>
+                <jx:out value="${document.getContentLength()}"/> B
+              </td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>Visible in Navigation</i18n:text>:</td>
+              <td>
+                <i18n:text><jx:out value="${usecase.getParameter('visibleInNav')}"/></i18n:text>
+              </td>
+            </tr>
+          </table>
+        </jx:when>
+        <jx:when test="${usecase.getParameter('languageexists').equals('false')}">
+          <i18n:text>This document is not available in this language.</i18n:text><br/><br/>
+          <i18n:text>Available Languages</i18n:text>: <jx:out value="${usecase.getParameter('languages')}"/>
+        </jx:when>
+        <jx:otherwise>
+          <table class="lenya-table-noborder">
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>sitemanagement.numberOfDocuments</i18n:text>:</td>
+              <td>${usecase.getParameter('numberOfDocuments')}</td>
+            </tr>
+            <tr>
+              <td class="lenya-entry-caption"><i18n:text>sitemanagement.numberOfSiteNodes</i18n:text>:</td>
+              <td>${usecase.getParameter('numberOfSiteNodes')}</td>
+            </tr>
+          </table>
+        </jx:otherwise>
+      </jx:choose>
+    </div>
+  </page:body>
+</page:page>
\ No newline at end of file

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/revisions.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/revisions.jx?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/revisions.jx (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/revisions.jx Tue Nov  9 18:49:14 2010
@@ -0,0 +1,142 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<!-- $Id: revisions.jx 774444 2009-05-13 17:31:05Z rfrovarp $ -->
+
+<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
+           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
+           xmlns="http://www.w3.org/1999/xhtml" 
+           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
+
+  <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/head.jx"/>
+
+  <!-- if the usecase cannot be invoked, find the cause: -->
+  <jx:choose>
+    <jx:when test="${usecase.getParameter('canRollback') == 'true'}">
+      <jx:set var="rollbackMessage" value="rollback-ok"/>
+    </jx:when>
+    <jx:otherwise>
+      <jx:choose>
+        <jx:when test="${usecase.getParameter('workflowState') == 'review'}">
+          <jx:set var="rollbackMessage" value="no-rollback-in-review"/>
+        </jx:when>
+        <jx:otherwise>
+          <jx:set var="rollbackMessage" value="no-rollback-no-privileges"/>
+        </jx:otherwise>
+      </jx:choose>
+    </jx:otherwise>
+  </jx:choose>
+
+  <page:head>
+    <script type="text/javascript">
+
+  function showRevision(revision) {
+    window.open(
+        '?lenya.revision=' + revision,
+        'Lenya_ViewRevision',
+        'menubar=no,addressbar=no,toolbar=no,statusbar=no,scrollbars=yes'
+    );
+  }
+
+  function rollback(toRevision) {
+    window.location.href="?lenya.usecase=sitemanagement.rollback"
+        + String.fromCharCode(38)  // an &amp; does not work, since it's not being decoded
+        + "rollbackRevision=" + toRevision;
+  }
+
+    </script>
+  </page:head>
+  <page:body>
+
+    <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/sitetree.jx"/>
+    <jx:import uri="fallback://lenya/modules/usecase/templates/tabs.jx"/>
+
+    <div id="contentblock1" class="lenya-tab-sitetree">
+      <h1><i18n:text>Revisions</i18n:text></h1>
+  
+      <form name="revisions">
+  
+        <table class="lenya-table-list-noborder">
+
+          <tr>
+            <th><i18n:text>No.</i18n:text></th>
+            <th><i18n:text>Time</i18n:text></th>
+            <th><i18n:text>Editor</i18n:text></th>
+            <th><i18n:text>Actions</i18n:text></th>
+          </tr>
+  
+          <jx:set var="count" value="${usecase.getParameter('revisions').size()}"/>
+          <jx:set var="isFirstItem" value="true"/>
+          <jx:forEach var="revision" items="${usecase.getParameter('revisions')}" begin="0">
+            <tr>
+              <td align="right">
+                <input 
+                  type="button" 
+                  i18n:attr="title" 
+                  onclick="showRevision(${revision.getNumber()});"
+                  title="view-revision-in-new-window"
+                  value="${revision.getNumber()}"
+                />
+              </td>
+              <td align="right"><i18n:date-time src-pattern="yyyy-MM-dd HH:mm:ss"><jx:formatDate value="${revision.getTime()}" pattern="yyyy-MM-dd HH:mm:ss"/></i18n:date-time></td>
+              <td>
+                <jx:set var="userId" value="${revision.getUserId()}"/>
+                <a href="${usecase.getSourceURL()}?lenya.usecase=admin.user&amp;userId=${userId}">${userId}</a></td>
+              <td>
+                <input 
+                  type="button" 
+                  i18n:attr="value title" 
+                  onclick="showRevision(${revision.getNumber()});"
+                  title="view-revision-in-new-window"
+                  value="view-revision"
+                />
+                <jx:choose>
+                  <jx:when test="${isFirstItem == 'true'}">
+                    <jx:set var="isFirstItem" value="false"/>
+                    <i18n:text key="is-current-version"/>
+                  </jx:when>
+                  <jx:when test="${usecase.getParameter('canRollback') == 'true'}">
+                    &#160;
+                    <input type="button" i18n:attr="value title" title="${rollbackMessage}" value="rollback" 
+                      onclick="void rollback(${revision.getNumber()});" 
+                    />
+                  </jx:when>
+                  <jx:otherwise>
+                    <input type="button" i18n:attr="value title" title="${rollbackMessage}" disabled="disabled" value="rollback"/>
+                  </jx:otherwise>
+                </jx:choose>
+              </td>
+            </tr>
+          </jx:forEach>
+  
+          <jx:if test="${usecase.getParameter('canRollback') != 'true'}">
+            <tr>
+              <td/>
+              <td colspan="3">
+                <strong><i18n:text key="${rollbackMessage}"/></strong>
+              </td>
+            </tr>
+          </jx:if>
+
+        </table>
+  
+      </form>
+  
+    </div>
+  </page:body>
+</page:page>

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/scheduler.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/scheduler.jx?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/scheduler.jx (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/scheduler.jx Tue Nov  9 18:49:14 2010
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<!-- $Id: scheduler.jx 615291 2008-01-25 18:06:50Z rfrovarp $ -->
+
+<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
+           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
+           xmlns="http://www.w3.org/1999/xhtml" 
+           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
+  <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/head.jx"/>
+  <page:body>
+    <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/sitetree.jx"/>
+    <jx:import uri="fallback://lenya/modules/usecase/templates/tabs.jx"/>
+
+    <jx:set var="url" value="${usecase.getParameter('private.sourceUrl')}"/>
+    <jx:set var="steps" value="${url.split('/')}"/>
+    <jx:set var="currentPublicationId" value="${steps[1]}"/>
+
+    <div id="contentblock1" class="lenya-tab-sitetree">
+      
+      <h1><i18n:text>Scheduler</i18n:text></h1>
+      
+      <jx:choose>
+        <jx:when test="${usecase.getParameter('jobs').size() == 0}">
+          <i18n:text>no-jobs-scheduled</i18n:text>
+        </jx:when>
+        <jx:otherwise>
+          <table class="lenya-table-list-noborder">
+            <tr>
+              <th><i18n:text>Job</i18n:text></th>
+              <th><i18n:text>User</i18n:text></th>
+              <th><i18n:text>Time</i18n:text></th>
+            </tr>
+            <jx:forEach var="job" items="${usecase.getParameter('jobs')}">
+              <!-- see UsecaseSchedulerImpl for job name encoding -->
+              <jx:set var="name" value="${job.getName()}"/>
+              <jx:set var="parts" value="${name.split(':')}"/>
+              <jx:set var="usecaseName" value="${parts[0]}"/>
+              <jx:set var="userId" value="${parts[1]}"/>
+              <jx:set var="pubId" value="${parts[2]}"/>
+              <jx:if test="${pubId == currentPublicationId}">
+                <tr>
+                  <td>
+                    <jx:out value="${usecaseName}"/>
+                  </td>
+                  <td>
+                    <a href="${usecase.getSourceURL()}?lenya.usecase=admin.user&amp;userId=${userId}"><jx:out value="${userId}"/></a>
+                  </td>
+                  <td>
+                    <i18n:date-time src-pattern="yyyy-MM-dd HH:mm:ss Z">
+                      <jx:formatDate pattern="yyyy-MM-dd HH:mm:ss Z" value="${job.getNextTime()}"/>
+                    </i18n:date-time>
+                  </td>
+                </tr>
+              </jx:if>
+            </jx:forEach>
+          </table>
+        </jx:otherwise>
+      </jx:choose>
+      
+    </div>
+  </page:body>
+</page:page>

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/sitetree.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/sitetree.jx?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/sitetree.jx (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/sitetree.jx Tue Nov  9 18:49:14 2010
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<!-- $Id: overview.jx 123960 2005-01-03 12:39:05Z andreas $ -->
+
+<jx:template
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+  xmlns:proxy="http://apache.org/lenya/proxy/1.0"
+  xmlns="http://www.w3.org/1999/xhtml"
+  name="">
+  
+  <jx:set var="url" value="${usecase.getParameter('private.sourceUrl')}"/>
+  <jx:set var="steps" value="${url.split('/')}"/>
+  <jx:set var="area" value="${steps[2]}"/>
+  <jx:set var="publicationId" value="${steps[1]}"/>
+  <jx:set var="factory" value="${usecase.getParameter('private.factory')}"/>
+  <jx:set var="publication" value="${factory.getPublication(publicationId)}"/>
+  
+  <jx:set var="document" value="${usecase.getParameter('document')}"/>
+  <jx:set var="docExists" value="${java.lang.Boolean.valueOf(document.getClass().getName().equals('org.apache.lenya.cms.publication.DocumentImpl'))}"/>
+  
+  <div id="lenya-info-treecanvas">
+    <div class="lenya-tabs">
+      <jx:forEach var="language" items="${publication.getLanguages()}">
+        <jx:choose>
+          <jx:when test="${!docExists.booleanValue() &amp;&amp; url.endsWith('_' + language)}">
+            <a id="${language}" class="lenya-tablink-active"><jx:out value="${language}"/></a>
+          </jx:when>
+          <jx:when test="${!docExists.booleanValue() &amp;&amp; url.endsWith('/') &amp;&amp; language.equals(publication.getDefaultLanguage())}">
+            <a id="${language}" class="lenya-tablink-active"><jx:out value="${language}"/></a>
+          </jx:when>
+          <jx:when test="${document != null &amp;&amp; document.existsTranslation(language)}">
+            <jx:set var="languageVersion" value="${document.getFactory().getLanguageVersion(document, language)}"/>
+            <jx:set var="languageUrl" value="${'/' + publicationId + '/' + area + languageVersion.getCanonicalDocumentURL()}"/>
+            <jx:choose>
+              <jx:when test="${language.equals(document.getLanguage())}">
+                <a id="${language}" class="lenya-tablink-active" href="${languageUrl}?lenya.usecase=${usecase.getName()}"><jx:out value="${language}"/></a>
+              </jx:when>
+              <jx:otherwise>
+                <a id="${language}" class="lenya-tablink" href="${languageUrl}?lenya.usecase=${usecase.getName()}"><jx:out value="${language}"/></a>
+              </jx:otherwise>
+            </jx:choose>
+          </jx:when>
+          <jx:otherwise>
+            <a id="${language}" class="lenya-tablink" title="This language version doesn't exist.">
+              <jx:out value="${language}"/>
+            </a>
+          </jx:otherwise>
+        </jx:choose>
+      </jx:forEach>
+    </div>
+    
+    <div id="lenya-info-tree">
+      <div id="tree">
+        <script type="text/javascript">
+          WEBAPP_BASE_PATH = '<proxy:url href="/"/>';
+          USECASE = '${usecase.getName()}';
+          
+          PUBLICATION_ID = '<jx:out value="${publicationId}"/>';
+          <jx:choose>
+            <jx:when test="${docExists.booleanValue()}">
+              CHOSEN_LANGUAGE = '<jx:out value="${document.getLanguage()}"/>';
+            </jx:when>
+            <jx:otherwise>
+              CHOSEN_LANGUAGE = '<jx:out value="${publication.getDefaultLanguage()}"/>';
+            </jx:otherwise>
+          </jx:choose>
+          DEFAULT_LANGUAGE = '<jx:out value="${publication.getDefaultLanguage()}"/>';
+          IMAGE_PATH = '<proxy:url href="/lenya/images/tree/"/>';
+          
+          
+          <jx:set var="clipboard" value="${request.getSession().getAttribute('org.apache.lenya.cms.site.usecases.Clipboard')}"/>
+          <jx:choose>
+            <jx:when test="${clipboard != null &amp;&amp; clipboard.getMethod() == Packages.org.apache.lenya.cms.site.usecases.Clipboard.METHOD_CUT}">
+              <jx:set var="cutDocument" value="${clipboard.getDocument(publication.getFactory(), publication)}"/>
+              CUT_DOCUMENT_ID = '<jx:out value="${cutDocument.getPath()}"/>';
+            </jx:when>
+            <jx:otherwise>
+              CUT_DOCUMENT_ID = '';
+            </jx:otherwise>
+          </jx:choose>
+          
+          ALL_AREAS = 'authoring,trash,archive';
+          PIPELINE_PATH = 'modules/sitetree/sitetree-fragment.xml';
+          SHOW_LOADING_HINT = true;
+          SHOW_ICONS = true;
+          
+          <jx:set var="pubName" value="${publication.getName()}"/>
+          var pubName = '<i18n:translate><i18n:text>... Publication</i18n:text><i18n:param><jx:out value="${pubName}"/></i18n:param></i18n:translate>';
+          
+          var tree = new NavTree(document, document.getElementById('tree'));
+          
+          tree.init(PUBLICATION_ID, pubName);
+          tree.render();
+          <jx:choose>
+            <jx:when test="${docExists.booleanValue()}">
+              tree.loadInitialTree('<jx:out value="${area}"/>', '<jx:out value="${document.getPath()}"/>');
+            </jx:when>
+            <jx:otherwise>
+              tree.loadInitialTree('<jx:out value="${area}"/>', '');
+            </jx:otherwise>
+          </jx:choose>
+        </script>
+      </div>
+    </div>
+  </div>
+</jx:template>
\ No newline at end of file

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/workflow.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/workflow.jx?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/workflow.jx (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/COB-INF/jx/tab/workflow.jx Tue Nov  9 18:49:14 2010
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<!-- $Id: workflow.jx 738926 2009-01-29 16:50:39Z andreas $ -->
+
+<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
+           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
+           xmlns="http://www.w3.org/1999/xhtml" 
+           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
+  <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/head.jx"/>
+  <page:body>
+    <jx:import uri="fallback://lenya/modules/sitemanagement/usecases/tab/sitetree.jx"/>
+    <jx:import uri="fallback://lenya/modules/usecase/templates/tabs.jx"/>
+    <div id="contentblock1" class="lenya-tab-sitetree">
+      <h1><i18n:text>Workflow</i18n:text></h1>
+      <!--
+      <table class="lenya-table-list-noborder">
+        <tr><th><i18n:text>Name</i18n:text></th><th><i18n:text>Value</i18n:text></th></tr>
+        <jx:forEach var="item" items="${usecase.getParameter('variables')}">
+          <tr>
+            <td>
+              <jx:out value="${item.name}"/>
+            </td>
+            <td>
+              <jx:out value="${item.value}"/>
+            </td>
+          </tr>
+        </jx:forEach>
+      </table>
+      -->
+      <table class="lenya-table-list-noborder">
+      <tr>
+          <th><i18n:text>Date</i18n:text></th>
+          <th><i18n:text>Event</i18n:text></th>
+          <th><i18n:text>State</i18n:text></th>
+          <th><i18n:text>User</i18n:text></th>
+          <th><i18n:text>IP Address</i18n:text></th>
+        </tr>
+        <jx:forEach var="item" items="${usecase.getParameter('versions')}" varStatus="status">
+          <tr>
+            <td><jx:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${item.getDate()}"/></td>
+            <td><i18n:text><jx:out value="${item.event}"/></i18n:text></td>
+            <td><i18n:text><jx:out value="${item.state}"/></i18n:text></td>
+            <td>
+              <span style="white-space: nobreak">
+                <a href="${usecase.getSourceURL()}?lenya.usecase=admin.user&amp;userId=${item.userId}">${item.userId}</a>
+              </span>
+            </td>
+            <td>${item.iPAddress}</td>
+          </tr>
+        </jx:forEach>
+      </table>
+    </div>
+  </page:body>
+</page:page>
\ No newline at end of file

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-blockServlet.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-blockServlet.xml?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-blockServlet.xml (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-blockServlet.xml Tue Nov  9 18:49:14 2010
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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
+  und
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+                           http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+  <bean name="org.apache.lenya.core.sitemanagement.block" class="org.apache.cocoon.sitemap.SitemapServlet">
+    <servlet:context mount-path="/sitemanagement" context-path="blockcontext:/lenya-core-sitemanagement-2.2.0-SNAPSHOT/">
+      <servlet:connections>
+        <entry key="usecase" value-ref="org.apache.lenya.core.usecase.block"/>
+      </servlet:connections>
+    </servlet:context>
+  </bean>
+</beans>

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-registration.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-registration.xml?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-registration.xml (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-registration.xml Tue Nov  9 18:49:14 2010
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+  http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
+  
+  <bean name="org.apache.lenya.cms.module.Module/sitemanagement" class="org.apache.lenya.cms.module.ModuleImpl">
+    <property name="baseUri" value="file://${lenya.home}/org.apache.lenya.core.sitemanagement/target/classes/COB-INF"/>
+  </bean>
+  
+</beans>

Added: lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-usecases.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-usecases.xml?rev=1033150&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-usecases.xml (added)
+++ lenya/trunk/org.apache.lenya.core.sitemanagement/src/main/resources/META-INF/cocoon/spring/lenya-module-sitemanagement-usecases.xml Tue Nov  9 18:49:14 2010
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+  http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
+
+  <bean name="org.apache.lenya.cms.usecase.Usecase/sitemanagement.create" 
+        class="org.apache.lenya.cms.site.usecases.CreateDocument" scope="session" init-method="initialize">
+    <!-- Abstractusecase properties -->
+    <property name="repository" ref="org.apache.lenya.cms.publication.Repository" />
+    <property name="view">
+      <bean class="org.apache.lenya.cms.usecase.UsecaseViewImpl">
+        <property name="guiManager" ref="org.apache.lenya.cms.usecase.gui.GUIManager" />
+        <property name="viewUri" value="fallback://lenya/modules/sitemanagement/jx/site/create.jx" />
+        <property name="createContinuation" value="true" />
+      </bean>
+    </property>
+  </bean>
+  
+</beans>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org