You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ca...@apache.org on 2012/04/05 18:40:20 UTC
svn commit: r1309935 - in
/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF:
jsp/templates/base_layout.jsp tags/rave_css.tag tags/third_party_css.tag
tags/title.tag
Author: carlucci
Date: Thu Apr 5 16:40:19 2012
New Revision: 1309935
URL: http://svn.apache.org/viewvc?rev=1309935&view=rev
Log:
RAVE-552: Refactor base_layout.jsp to allow for better customization
Added:
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_css.tag
- copied, changed from r1309856, rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_css.tag
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/title.tag
- copied, changed from r1309856, rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag
Modified:
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/templates/base_layout.jsp
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/templates/base_layout.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/templates/base_layout.jsp?rev=1309935&r1=1309934&r2=1309935&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/templates/base_layout.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/templates/base_layout.jsp Thu Apr 5 16:40:19 2012
@@ -19,43 +19,15 @@ under the License.
<%@ page language="java" trimDirectiveWhitespaces="true" %>
<%@ page errorPage="/WEB-INF/jsp/views/error.jsp" %>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
-<fmt:setBundle basename="messages"/>
<%-- Expose any attributes defined in the tiles-defs.xml to the request scope for use in other tiles --%>
<tiles:importAttribute scope="request"/>
-<c:set var="profileTitleKey" value="page.profile.title" />
-<c:set var="personProfileTitleKey" value="page.personProfile.title" />
-<%--@elvariable id="page" type="org.apache.rave.portal.model.Page"--%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1"/>
<meta name="viewport" content="width=device-width" />
- <title>
- <%-- determine if this is a user page, and if so, display the page name in the HTML title --%>
- <c:choose>
- <c:when test="${not empty page}">
- <c:out value="${page.name}" escapeXml="true" />
- </c:when>
- <c:when test="${pageTitleKey == profileTitleKey}">
- <fmt:message key="${pageTitleKey}">
- <fmt:param><c:out value="${userProfile.displayName}" /></fmt:param>
- </fmt:message>
- </c:when>
- <c:when test="${pageTitleKey == personProfileTitleKey}">
- <fmt:message key="${pageTitleKey}">
- <fmt:param><c:out value="${userProfile.displayName}" /></fmt:param>
- </fmt:message>
- </c:when>
- <c:otherwise>
- <fmt:message key="${pageTitleKey}"/>
- </c:otherwise>
- </c:choose>
- <c:if test="${not empty portalSettings and not empty portalSettings['titleSuffix']}">
- <c:out value="${portalSettings['titleSuffix'].value}"/>
- </c:if>
- </title>
- <link rel="stylesheet" href="//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/base/jquery-ui.css"/>
- <link rel="stylesheet" href="<c:url value="/css/default.css" />"/>
+ <title><rave:title /></title>
+ <rave:rave_css/>
<rave:custom_css/>
</head>
<body>
@@ -74,4 +46,4 @@ under the License.
<%-- render any script that needs to execute post-src includes --%>
<portal:render-init-script location="${'AFTER_RAVE'}" />
</body>
-</html>
+</html>
\ No newline at end of file
Copied: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_css.tag (from r1309856, rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag)
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_css.tag?p2=rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_css.tag&p1=rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag&r1=1309856&r2=1309935&rev=1309935&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_css.tag Thu Apr 5 16:40:19 2012
@@ -18,31 +18,5 @@
--%>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
-<portal:render-script location="${'BEFORE_LIB'}" />
-<rave:third_party_js />
-<portal:render-script location="${'AFTER_LIB'}" />
-<%-- local rave scripts --%>
-<portal:render-script location="${'BEFORE_RAVE'}" />
-<%-- check to see if the javaScriptDebugMode is on, if so render the individual JS files, otherwise render the minified single file --%>
-<c:choose>
- <c:when test="${not empty portalSettings and not empty portalSettings['javaScriptDebugMode'] and portalSettings['javaScriptDebugMode'].value == '0'}">
- <script src="<spring:url value="/script/rave_all.min.js"/>"></script>
- </c:when>
- <c:otherwise>
- <script src="<spring:url value="/script/rave.js"/>"></script>
- <script src="<spring:url value="/script/rave_api.js"/>"></script>
- <script src="<spring:url value="/script/rave_opensocial.js"/>"></script>
- <script src="<spring:url value="/script/rave_wookie.js"/>"></script>
- <script src="<spring:url value="/script/rave_layout.js"/>"></script>
- <script src="<spring:url value="/script/rave_forms.js"/>"></script>
- <script src="<spring:url value="/script/rave_person_profile.js"/>"></script>
- <script src="<spring:url value="/script/rave_store.js"/>"></script>
- <script src="<spring:url value="/script/rave_admin.js"/>"></script>
- </c:otherwise>
-</c:choose>
-<script src="<spring:url value="/app/messagebundle/rave_client_messages.js"/>"></script>
-<portal:render-script location="${'AFTER_RAVE'}" />
-<%-- common javascript to execute on all pages --%>
-<script>
- rave.setContext("<spring:url value="/app/" />");
-</script>
+<rave:third_party_css />
+<link rel="stylesheet" href="<c:url value="/css/default.css" />"/>
\ No newline at end of file
Added: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_css.tag
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_css.tag?rev=1309935&view=auto
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_css.tag (added)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_css.tag Thu Apr 5 16:40:19 2012
@@ -0,0 +1,25 @@
+<%--
+ 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.
+
+--%>
+<%--
+ This file includes references to all external third party CSS files required by rave
+ Overlay this file in custom extensions of Rave if you host these files internally and don't need
+ to pull them in externally.
+--%>
+<link rel="stylesheet" href="//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/base/jquery-ui.css"/>
Copied: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/title.tag (from r1309856, rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag)
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/title.tag?p2=rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/title.tag&p1=rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag&r1=1309856&r2=1309935&rev=1309935&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/title.tag Thu Apr 5 16:40:19 2012
@@ -18,31 +18,29 @@
--%>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
-<portal:render-script location="${'BEFORE_LIB'}" />
-<rave:third_party_js />
-<portal:render-script location="${'AFTER_LIB'}" />
-<%-- local rave scripts --%>
-<portal:render-script location="${'BEFORE_RAVE'}" />
-<%-- check to see if the javaScriptDebugMode is on, if so render the individual JS files, otherwise render the minified single file --%>
+<fmt:setBundle basename="messages"/>
+<c:set var="profileTitleKey" value="page.profile.title" />
+<c:set var="personProfileTitleKey" value="page.personProfile.title" />
+<%--@elvariable id="page" type="org.apache.rave.portal.model.Page"--%>
+<%-- determine if this is a user page, and if so, display the page name in the HTML title --%>
<c:choose>
- <c:when test="${not empty portalSettings and not empty portalSettings['javaScriptDebugMode'] and portalSettings['javaScriptDebugMode'].value == '0'}">
- <script src="<spring:url value="/script/rave_all.min.js"/>"></script>
+ <c:when test="${not empty page}">
+ <c:out value="${page.name}" escapeXml="true" />
+ </c:when>
+ <c:when test="${pageTitleKey == profileTitleKey}">
+ <fmt:message key="${pageTitleKey}">
+ <fmt:param><c:out value="${userProfile.displayName}" /></fmt:param>
+ </fmt:message>
+ </c:when>
+ <c:when test="${pageTitleKey == personProfileTitleKey}">
+ <fmt:message key="${pageTitleKey}">
+ <fmt:param><c:out value="${userProfile.displayName}" /></fmt:param>
+ </fmt:message>
</c:when>
<c:otherwise>
- <script src="<spring:url value="/script/rave.js"/>"></script>
- <script src="<spring:url value="/script/rave_api.js"/>"></script>
- <script src="<spring:url value="/script/rave_opensocial.js"/>"></script>
- <script src="<spring:url value="/script/rave_wookie.js"/>"></script>
- <script src="<spring:url value="/script/rave_layout.js"/>"></script>
- <script src="<spring:url value="/script/rave_forms.js"/>"></script>
- <script src="<spring:url value="/script/rave_person_profile.js"/>"></script>
- <script src="<spring:url value="/script/rave_store.js"/>"></script>
- <script src="<spring:url value="/script/rave_admin.js"/>"></script>
+ <fmt:message key="${pageTitleKey}"/>
</c:otherwise>
</c:choose>
-<script src="<spring:url value="/app/messagebundle/rave_client_messages.js"/>"></script>
-<portal:render-script location="${'AFTER_RAVE'}" />
-<%-- common javascript to execute on all pages --%>
-<script>
- rave.setContext("<spring:url value="/app/" />");
-</script>
+<c:if test="${not empty portalSettings and not empty portalSettings['titleSuffix']}">
+ <c:out value="${portalSettings['titleSuffix'].value}"/>
+</c:if>
\ No newline at end of file