Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 19f0d0c58b220e227b02cde89b53a1f6e4752b4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<%--
 Copyright (c) 2000, 2010 IBM Corporation and others.

 This program and the accompanying materials 
 are made available under the terms of the Eclipse Public License 2.0
 which accompanies this distribution, and is available at
 https://www.eclipse.org/legal/epl-2.0/

 SPDX-License-Identifier: EPL-2.0
 
 Contributors:
     IBM Corporation - initial API and implementation
--%>
<%@ include file="header.jsp"%>
<% 
	TocData data = new TocData(application,request, response);
	WebappPreferences prefs = data.getPrefs();
%>

<html lang="<%=ServletResources.getString("locale", request)%>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title><%=ServletResources.getString("Content", request)%></title>

<base target="ContentViewFrame">
</head>


<body dir="<%=direction%>" bgcolor="<%=prefs.getBasicViewBackground()%>">
<table border="0" cellpadding="0" cellspacing="0">
<%
	for (int toc=0; toc<data.getTocCount(); toc++) {
		boolean isSelected =data.getSelectedToc() != -1 &&
					   data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc));
		//if(!data.isEnabled(toc) && !isSelected){
			// do not show
		//	continue;
		//}
		String icon = isSelected ?
						prefs.getImagesDirectory()+"/toc_open.svg" :
						prefs.getImagesDirectory()+"/toc_closed.svg";
		String alt = isSelected ?
						ServletResources.getString("bookOpen", request) :
						ServletResources.getString("bookClosed", request) ;
%>
	<tr>
		<td align='<%=isRTL?"right":"left"%>' nowrap>
<%
		if(isSelected){
%>
			<b><img src="<%=icon%>" alt="<%=alt%>" title="<%=alt%>"><a href="<%=data.getTocDescriptionTopic(toc)%>" target="ContentViewFrame">&nbsp;<%=data.getTocLabel(toc)%></a></b>
<%
		}else{
%>
			<b><img src="<%=icon%>" alt="<%=alt%>" title="<%=alt%>"><a href="<%="tocView.jsp?toc="+data.getTocHref(toc)%>" target='_self'>&nbsp;<%=data.getTocLabel(toc)%></a></b>
<%
		}
%>
		</td>
	</tr>
<%
		// Only generate the selected toc
		if (isSelected) {
%>		
	<tr>
		<td align='<%=isRTL?"right":"left"%>' nowrap>
			<ul>
<%
			data.generateBasicToc(toc, out);
%>		
			</ul>
		</td>
	</tr>
<%
		}
	}
%>		
</table>
</body>
</html>

Back to the top