[sword-cvs] swordweb/tiles header.jsp,1.22,1.23
sword@www.crosswire.org
sword@www.crosswire.org
Tue, 11 Nov 2003 15:40:32 -0700
Update of /usr/local/cvsroot/swordweb/tiles
In directory www:/tmp/cvs-serv23260/tiles
Modified Files:
header.jsp
Log Message:
Added dynamic tab list and hide/show options
Index: header.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/tiles/header.jsp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- header.jsp 11 Nov 2003 20:12:44 -0000 1.22
+++ header.jsp 11 Nov 2003 22:40:30 -0000 1.23
@@ -1,16 +1,4 @@
-<%
- String u = request.getRequestURI();
- String homeID = u.endsWith("index.jsp") ? "id=\"current\"" : "";
- String passageID = u.endsWith("passagestudy.jsp") ? "id=\"current\"" : "";
- String parallelID = u.endsWith("parallelstudy.jsp") ? "id=\"current\"" : "";
- String searchID = u.endsWith("powersearch.jsp") || u.endsWith("wordsearchresults.jsp") ? "id=\"current\"" : "";
- String devotionalID = u.endsWith("dailydevotion.jsp") ? "id=\"current\"" : "";
- String libraryID = u.endsWith("fulllibrary.jsp") ? "id=\"current\"" : "";
- String preferencesID = u.endsWith("preferences.jsp") ? "id=\"current\"" : "";
- String aboutID = u.endsWith("about.jsp") ? "id=\"current\"" : "";
- String helpID = u.endsWith("help.jsp") ? "id=\"current\"" : "";
-%>
-
+<%@ include file="../init.jsp" %>
<div id="contentTray0">
<div id="contentTray1">
@@ -21,16 +9,16 @@
</div>
<div id="navlist">
<ul>
- <li><a <%= homeID %> href="index.jsp" title="Home">Home</a></li>
- <li><a <%= passageID %> href="passagestudy.jsp" title="Passage Study">Passage Study</a></li>
- <li><a <%= parallelID %> href="parallelstudy.jsp" title="Parallel Translations">Parallel</a></li>
- <li><a <%= searchID %> href="powersearch.jsp" title="Power Search">Search</a></li>
- <li><a <%= devotionalID %> href="dailydevotion.jsp" title="Daily Devotionals">Devotionals</a></li>
- <li><a <%= libraryID %> href="fulllibrary.jsp" title="Full Library">Library</a></li>
- <li><a <%= preferencesID %> href="preferences.jsp" title="Preferences">Preferences</a></li>
- <li><a <%= aboutID %> href="about.jsp" title="About">About</a></li>
-<!--
- <li><a <%= helpID %> href="help.jsp" title="Help">Help</a></li>
--->
+<%
+ for (int i = 0; i < tabNames.size(); i++) {
+ String u = (String)request.getRequestURI();
+ String n = (String)tabNames.get(i);
+ String l = (String)tabLinks.get(i);
+ boolean show = !("false".equals((String)showTabs.get(i)));
+ if ((show) || ("preferences.jsp".equals(l))) {
+%>
+ <li><a <%= (u.endsWith(l))?"id=\"current\"":"" %> href="<%= l %>" title="<%= n %>"><%= n %></a></li>
+<% }
+ } %>
</ul>
</div>