]> source.dussan.org Git - archiva.git/commitdiff
correctly acknowledge September 19
authorBrett Porter <brett@apache.org>
Thu, 9 Dec 2010 12:51:06 +0000 (12:51 +0000)
committerBrett Porter <brett@apache.org>
Thu, 9 Dec 2010 12:51:06 +0000 (12:51 +0000)
Image is derived from http://commons.wikimedia.org/wiki/File:Piratey,_vector_version.svg, which is in the public domain

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@1043948 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-configuration/pom.xml
archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/maven-base.css
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep-logo.png [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep.png [new file with mode: 0644]

index ccb52842c4c7c28f24536aa5fee99cc03d658bbc..f4ef54f0c92b11dad5b977b349991e2e5a9a94ca 100644 (file)
@@ -95,7 +95,7 @@
           </execution>
         </executions>
         <configuration>
-          <version>1.2.0</version>
+          <version>1.3.0</version>
           <models>
             <model>src/main/mdo/configuration.mdo</model>
           </models>
index 0187601c2f297e9be95857368d5ab6c0fcdd04e1..b10ac2ed3bbe1c660f76210bf0f4a00411c7c6cc 100644 (file)
           <type>boolean</type>
           <defaultValue>true</defaultValue>
         </field>
+        <field>
+          <name>disableEasterEggs</name>
+          <version>1.3.0+</version>
+          <type>boolean</type>
+          <defaultValue>false</defaultValue>
+        </field>
       </fields>
     </class>
 
index 9eb2864ce9b4e1f2f12728bd07f8fa3bc3dedc79..23fae758a7d8ff3b4c73fd70f3c95f5c2e08a6ce 100644 (file)
     </c:when>
     <c:otherwise>
       <my:currentWWUrl action="index" namespace="/">
+        <c:if test="${is19Sep}">
+        <img src="<c:url value='/images/19Sep-logo.png' />"/>
+        </c:if>
+        <c:if test="${!is19Sep}">
         <img src="<c:url value='/images/archiva.png' />"/>
+        </c:if>
       </my:currentWWUrl>
     </c:otherwise>
   </c:choose>
index a2c3fb137896b43c9d829467bf57d75777871f4a..89195fae61b8d23eddcb7b88fce776068b7aae22 100644 (file)
   <decorator:head />
 </head>
 
-<body onload="<decorator:getProperty property="body.onload" />" class="composite">
+<%
+  int inceptionYear = 2005;
+  Calendar cal = Calendar.getInstance();
+  int currentYear = cal.get( Calendar.YEAR );
+  String copyrightRange = String.valueOf( inceptionYear );
+  if ( inceptionYear != currentYear )
+  {
+    copyrightRange = copyrightRange + "-" + String.valueOf( currentYear );
+  }
+
+  if ( cal.get( Calendar.MONTH ) == Calendar.SEPTEMBER && cal.get( Calendar.DAY_OF_MONTH ) == 19 )
+  {
+      request.setAttribute( "is19Sep", "true" );
+  }
+%>
+
+<s:if test="%{#application['uiOptions'].disableEasterEggs}">
+  <c:remove var="is19Sep" scope="request" />
+</s:if>
+
+<body onload="<decorator:getProperty property="body.onload" />" class="composite"
+      <c:if test="${is19Sep}">
+        style="background: url('<c:url value="/images/19Sep.png"/>') no-repeat bottom right"
+      </c:if>
+>
 <div id="breadcrumbs">
   <div class="xright">
     <%@ include file="/WEB-INF/jsp/redback/include/securityLinks.jsp" %>
   <hr/>
 </div>
 
-<%
-  int inceptionYear = 2005;
-  int currentYear = Calendar.getInstance().get( Calendar.YEAR );
-  String copyrightRange = String.valueOf( inceptionYear );
-  if ( inceptionYear != currentYear )
-  {
-    copyrightRange = copyrightRange + "-" + String.valueOf( currentYear );
-  }
-%>
 <div id="footer">
   <div class="xleft">
-    <a target="_blank" href="http://archiva.apache.org/">Apache Archiva <%= ArchivaVersion.getVersion()%></a>
+    <a target="_blank" href="http://archiva.apache.org/">Apache Ar<c:if test="${is19Sep}">rr</c:if>chiva <%= ArchivaVersion.getVersion()%></a>
   </div>
   <div class="xright">
     Copyright &#169; <%= copyrightRange%> <a target="_blank" href="http://www.apache.org/">The Apache Software Foundation</a>
index 1679beef2472e8c10cb726ea03990d5a603d3063..6fcafd40068854152596b64e59ba34a0078c00c4 100644 (file)
@@ -93,6 +93,7 @@ div.clear hr {
 #bodyColumn {
     margin-right: 1.5em;
     margin-left: 197px;
+    min-height: 575px
 }
 
 #legend {
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep-logo.png b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep-logo.png
new file mode 100644 (file)
index 0000000..cbaf680
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep-logo.png differ
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep.png b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep.png
new file mode 100644 (file)
index 0000000..e311868
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/19Sep.png differ