[Commits] (bcm) enhance the nav bar to show "logged in as <username" and a help link that

commits at osafoundation.org commits at osafoundation.org
Mon Apr 11 15:19:59 PDT 2005


Commit by: bcm
Modified files:
server/core/etc/applicationContext-base.xml 1.3 1.4
server/etc/cosmo.xml 1.2 1.3
server/web/etc/MessageResources.properties 1.3 1.4
server/web/web/WEB-INF/jsp/layout.jsp 1.4 1.5
server/web/web/WEB-INF/jsp/welcome.jsp 1.4 1.5

Log message:
enhance the nav bar to show "logged in as <username" and a help link that
emails the server admin. link the server signature name similarly. the server
admin email address is set in cosmo.xml as the env entry "cosmo/serverAdmin".


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/server/core/etc/applicationContext-base.xml.diff?r1=text&tr1=1.3&r2=text&tr2=1.4
http://cvs.osafoundation.org/index.cgi/server/etc/cosmo.xml.diff?r1=text&tr1=1.2&r2=text&tr2=1.3
http://cvs.osafoundation.org/index.cgi/server/web/etc/MessageResources.properties.diff?r1=text&tr1=1.3&r2=text&tr2=1.4
http://cvs.osafoundation.org/index.cgi/server/web/web/WEB-INF/jsp/layout.jsp.diff?r1=text&tr1=1.4&r2=text&tr2=1.5
http://cvs.osafoundation.org/index.cgi/server/web/web/WEB-INF/jsp/welcome.jsp.diff?r1=text&tr1=1.4&r2=text&tr2=1.5

Index: server/web/etc/MessageResources.properties
diff -u server/web/etc/MessageResources.properties:1.3 server/web/etc/MessageResources.properties:1.4
--- server/web/etc/MessageResources.properties:1.3	Fri Apr  8 13:04:49 2005
+++ server/web/etc/MessageResources.properties	Mon Apr 11 15:19:57 2005
@@ -1,9 +1,11 @@
 
 Layout.Title=Cosmo sharing server
+Layout.Nav.Main.LoggedInAs=Logged in as <strong>{0}</strong>
 Layout.Nav.Main.Welcome=Cosmo
-Layout.Nav.Main.ShareRoot=Share Root
+Layout.Nav.Main.Shares=Shares
 Layout.Nav.Main.Home=Home
 Layout.Nav.Main.LogOut=Log out
+Layout.Nav.Main.Help=Help
 Layout.Nav.Console.Label=Admin console:
 Layout.Nav.Console.Users=Users
 Layout.Footer=Cosmo sharing server v {0}
@@ -47,7 +49,6 @@
 
 Welcome.HeadTitle=Cosmo | Home
 Welcome.WelcomeMsg=Welcome to the Cosmo sharing server installed at <strong>{0}</strong>!
-Welcome.LoggedInAs=You are logged in as <strong>{0}</strong>.
 Welcome.HomeDirectory=Home directory:
 Welcome.YourHomeDirectory=Your home directory is where Chandler places collections shared with other people. You may also use any WebDAV client to browse your home directory and store files.
 

Index: server/web/web/WEB-INF/jsp/welcome.jsp
diff -u server/web/web/WEB-INF/jsp/welcome.jsp:1.4 server/web/web/WEB-INF/jsp/welcome.jsp:1.5
--- server/web/web/WEB-INF/jsp/welcome.jsp:1.4	Fri Apr  8 11:38:20 2005
+++ server/web/web/WEB-INF/jsp/welcome.jsp	Mon Apr 11 15:19:58 2005
@@ -9,9 +9,6 @@
   <fmt:message key="Welcome.WelcomeMsg">
     <fmt:param value="${pageContext.request.serverName}"/>
   </fmt:message>
-  <fmt:message key="Welcome.LoggedInAs">
-    <fmt:param value="${user.username}"/>
-  </fmt:message>
 </p>
 <authz:authorize ifAllGranted="ROLE_USER">
   <p>

Index: server/etc/cosmo.xml
diff -u server/etc/cosmo.xml:1.2 server/etc/cosmo.xml:1.3
--- server/etc/cosmo.xml:1.2	Fri Apr  8 16:53:27 2005
+++ server/etc/cosmo.xml	Mon Apr 11 15:19:57 2005
@@ -4,6 +4,8 @@
          reloadable="@RELOADABLE@">
   <Environment name="cosmo/version" value="@VERSION@"
                type="java.lang.String" override="false"/>
+  <Environment name="cosmo/serverAdmin" value="root at localhost"
+               type="java.lang.String" override="false"/>
   <Resource name="jcr/repositoryFactory"
             type="org.apache.jackrabbit.core.jndi.BindableRepository"/>
   <ResourceParams name="jcr/repositoryFactory">

Index: server/web/web/WEB-INF/jsp/layout.jsp
diff -u server/web/web/WEB-INF/jsp/layout.jsp:1.4 server/web/web/WEB-INF/jsp/layout.jsp:1.5
--- server/web/web/WEB-INF/jsp/layout.jsp:1.4	Fri Apr  8 16:53:31 2005
+++ server/web/web/WEB-INF/jsp/layout.jsp	Mon Apr 11 15:19:58 2005
@@ -27,17 +27,21 @@
   <body class="bodystyle">
     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       <tr>
-        <td align="left" valign="middle">
+        <td align="left" valign="top">
           <div class="lg">
               <c:choose><c:when test="${fn:endsWith(body, '/welcome.jsp') || fn:endsWith(body, '/login.jsp')}"><b><fmt:message key="Layout.Title"/></b></c:when><c:otherwise><html:link page="/"><b><fmt:message key="Layout.Title"/></b></html:link></c:otherwise></c:choose>
           </div>
         </td>
         <c:if test="${showNav}">
-          <td align="right" valign="middle">
+          <td align="right" valign="top">
             <!-- main navbar -->
             <div class="md">
+              <fmt:message key="Layout.Nav.Main.LoggedInAs">
+                <fmt:param value="${user.username}"/>
+              </fmt:message>
+              |
               <authz:authorize ifAllGranted="ROLE_ROOT">
-                <html:link page="/home/"><fmt:message key="Layout.Nav.Main.ShareRoot"/></html:link>
+                <html:link page="/home/"><fmt:message key="Layout.Nav.Main.Shares"/></html:link>
               |
               </authz:authorize>
               <authz:authorize ifAllGranted="ROLE_USER">
@@ -47,6 +51,10 @@
               <html:link page="/logout">
                 <fmt:message key="Layout.Nav.Main.LogOut"/>
               </html:link>
+              |
+              <a href="mailto:${applicationScope.cosmoServerAdmin}">
+                <fmt:message key="Layout.Nav.Main.Help"/>
+              </a>
             </div>
             <!-- end main navbar -->
           </td>
@@ -79,9 +87,11 @@
               border="0" styleId="footerSpacer"/>
     <hr noshade="noshade"/>
     <div class="footer">
-      <fmt:message key="Layout.Footer">
-        <fmt:param value="${applicationScope.cosmoVersion}"/>
-      </fmt:message>
+      <a href="mailto:${applicationScope.cosmoServerAdmin}">
+        <fmt:message key="Layout.Footer">
+          <fmt:param value="${applicationScope.cosmoVersion}"/>
+        </fmt:message>
+      </a>
       <jsp:useBean id="now" class="java.util.Date"/>
       &nbsp;&nbsp;&nbsp;
       <fmt:formatDate value="${now}" type="both"/>

Index: server/core/etc/applicationContext-base.xml
diff -u server/core/etc/applicationContext-base.xml:1.3 server/core/etc/applicationContext-base.xml:1.4
--- server/core/etc/applicationContext-base.xml:1.3	Fri Apr  8 16:53:16 2005
+++ server/core/etc/applicationContext-base.xml	Mon Apr 11 15:19:57 2005
@@ -17,6 +17,16 @@
     </property>
   </bean>
 
+  <bean id="cosmoServerAdmin"
+        class="org.springframework.jndi.JndiObjectFactoryBean">
+    <property name="jndiName">
+      <value>cosmo/serverAdmin</value>
+    </property>
+    <property name="resourceRef">
+      <value>true</value>
+    </property>
+  </bean>
+
   <bean
      class="org.springframework.web.context.support.ServletContextAttributeExporter">
     <property name="attributes">
@@ -24,6 +34,9 @@
         <entry key="cosmoVersion">
           <ref local="cosmoVersion"/>
         </entry>
+        <entry key="cosmoServerAdmin">
+          <ref local="cosmoServerAdmin"/>
+        </entry>
       </map>
     </property>
   </bean>



More information about the Commits mailing list