View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-documentation/hst_docs/trunk/site/src/main/webapp/jsp/components/main/folder_overview.jspx
Revision: 22104
Committed: Fri Mar 12 12:03:24 2010 UTC (9 years, 11 months ago) by rbijlsma
File size: 9353 byte(s)
Log Message:
HSTTWODOCS-199, HSTTWODOCS-274

File Contents

# Content
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright 2009 Hippo
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS"
13 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 -->
17 <jsp:root
18 xmlns="http://www.w3.org/1999/xhtml"
19 xmlns:jsp="http://java.sun.com/JSP/Page"
20 xmlns:c="http://java.sun.com/jsp/jstl/core"
21 xmlns:x="http://java.sun.com/jsp/jstl/xml"
22 xmlns:fn="http://java.sun.com/jsp/jstl/functions"
23 xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
24 xmlns:hst="http://www.hippoecm.org/jsp/hst/core"
25 version='2.0'
26 >
27 <jsp:output omit-xml-declaration="yes"/>
28
29
30 <jsp:directive.page contentType="text/html; charset=UTF-8" language="java"/>
31
32 <c:choose>
33 <c:when test="${! empty folder}">
34
35 <ul id="breadcrumb">
36 <c:if test="${fn:length(folder.ancestors) > 1}">
37 <c:forEach var="ancestor" items="${folder.ancestors}" varStatus="status">
38 <hst:link var="link" hippobean="${ancestor}" />
39 <li><a href="${link}">${ancestor.normalizedName}</a></li>
40 <c:if test="${!status.last}">
41 <li class="divider"> &gt; </li>
42 </c:if>
43 </c:forEach>
44 </c:if>
45 </ul>
46
47 <c:choose>
48 <c:when test="${! empty document }">
49 <jsp:include page="../doctypes/${docType}.jspx"/>
50 </c:when>
51 <c:otherwise>
52 <div id="yui-u">
53
54 <c:choose>
55 <c:when test="${! empty folderinfo and ! empty folderinfo.normalizedTitle }">
56 <h1 id='title'>${folderinfo.normalizedTitle}</h1>
57 <hst:head-contribution keyHint="page.title"><title>${folderinfo.normalizedTitle}</title></hst:head-contribution>
58 </c:when>
59 <c:otherwise>
60 <hst:head-contribution keyHint="page.title"><title>${folder.normalizedName}</title></hst:head-contribution>
61 <h1 id='title'>${folder.normalizedName}</h1>
62 </c:otherwise>
63 </c:choose>
64
65 <c:if test="${not empty docinfo}">
66 <jsp:include page="../../parts/docinfo.jspx"/>
67 </c:if>
68
69 <div class='vspace'>&#160;</div>
70
71 <c:if test="${! empty folderinfo.intro}">
72 <hst:html hippohtml="${folderinfo.intro}"/>
73 </c:if>
74
75 <!--
76 TODO show when in preview mode
77 <div class='vspace'>&#160;</div>
78
79 <span id="nr_items" class="right">${nr_folders} folders, ${nr_documents} documents.</span>
80 -->
81
82 <div class='vspace'>&#160;</div>
83
84 <table class="overview">
85
86 <c:forEach var="child_document" items="${document_list}" varStatus="indexer">
87 <tr>
88 <hst:link var="link" hippobean="${child_document}"/>
89 <td class='counter'></td>
90 <td class="title">
91 <a href="${link}">
92 <c:choose>
93 <c:when test='${! empty child_document.normalizedTitle}'>${child_document.normalizedTitle}</c:when>
94 <c:otherwise>${child_document.normalizedName}</c:otherwise>
95 </c:choose>
96 </a>
97 </td>
98 <td>
99 <c:choose>
100 <c:when test='${! empty child_document.shortDescription}'>
101 <hst:html hippohtml="${child_document.shortDescription}"/>
102 </c:when>
103 <c:when test='${! empty child_document.oldShortDesc}'>
104 ${child_document.oldShortDesc}
105 </c:when>
106 <c:otherwise>-</c:otherwise>
107 </c:choose>
108 </td>
109 </tr>
110 </c:forEach>
111
112 <c:if test='${nr_folders &gt; 0}'>
113 <hr/>
114 </c:if>
115
116 <c:forEach var="sub_folder" items="${folder_list}" varStatus="indexer">
117 <tr>
118 <hst:link var="link" hippobean="${sub_folder}"/>
119 <td class='counter'></td>
120 <td class="title">
121 <a href="${link}">
122 <c:choose>
123 <c:when test='${! empty sub_folder.normalizedTitle}'>${sub_folder.normalizedTitle}</c:when>
124 <c:otherwise>${sub_folder.normalizedName}</c:otherwise>
125 </c:choose>
126 </a>
127 </td>
128 <td>
129 <c:choose>
130 <c:when test='${! empty sub_folder.folderinfo.shortDescription}'>
131 <hst:html hippohtml="${sub_folder.folderinfo.shortDescription}"/>
132 </c:when>
133 <c:when test='${! empty sub_folder.folderinfo.oldShortDesc}'>
134 ${sub_folder.folderinfo.oldShortDesc}
135 </c:when>
136 <c:when test='${! empty sub_folder.folderintro.shortDescription}'>
137 <hst:html hippohtml="${sub_folder.folderintro.shortDescription}"/>
138 </c:when>
139 <c:when test='${! empty sub_folder.folderintro.oldShortDesc}'>
140 ${sub_folder.folderintro.oldShortDesc}
141 </c:when>
142 <c:otherwise>-</c:otherwise>
143 </c:choose>
144 </td>
145 </tr>
146 </c:forEach>
147
148 <c:if test="${!empty folderinfo.extraLinks}" >
149 <c:forEach var="referenced" items="${folderinfo.extraLinks}" varStatus="indexer">
150 <tr>
151 <td class='counter'></td>
152 <td class="title">
153 <c:choose>
154 <c:when test="${! empty referenced.URL}"> <!-- TODO URL or Url -->
155 <c:choose>
156 <c:when test="${! empty referenced.description}">
157 <a class='external' href='${referenced.URL}'>${referenced.description}</a>
158 </c:when>
159 <c:otherwise>
160 <a class='external' href='${referenced.URL}'>External URL</a>
161 </c:otherwise>
162 </c:choose>
163 </c:when>
164 <c:when test="${! empty referenced.documentLink}">
165 <hst:link var="link" hippobean="${referenced.documentLink}"/>
166 <c:choose>
167 <c:when test='${! empty referenced.documentLink.referencedBean.normalizedTitle}'>
168 <a href='${link}'>${referenced.documentLink.referencedBean.normalizedTitle}</a>
169 </c:when>
170 <c:otherwise>
171 <a href='${link}'>${referenced.documentLink.referencedBean.normalizedName}</a>
172 </c:otherwise>
173 </c:choose>
174 </c:when>
175 </c:choose>
176 </td>
177 <td>
178 <c:choose>
179 <c:when test="${! empty referenced.URL}">
180 <a class='external' href='${referenced.URL}'>${referenced.URL}</a>
181 </c:when>
182 <c:when test="${! empty referenced.documentLink}">
183 <hst:link var="link" hippobean="${referenced.documentLink}"/>
184 <c:choose>
185 <c:when test='${not empty referenced.description}'>${referenced.description}</c:when>
186 <c:when test='${not empty referenced.documentLink.referencedBean.shortDescription}'>
187 <hst:html hippohtml="${referenced.documentLink.referencedBean.shortDescription}"/>
188 </c:when>
189 <c:otherwise>-</c:otherwise>
190 </c:choose>
191 </c:when>
192 <c:otherwise>${referenced.description}</c:otherwise>
193 </c:choose>
194 </td>
195 </tr>
196 </c:forEach>
197 </c:if>
198
199 </table>
200 </div>
201 <!-- TODO In java test on containing only spaces and do not use?
202 However, I did that already in the import. That should be enough.
203 -->
204
205 <div class='vspace'>&#160;</div>
206
207 <c:if test="${infoType eq 'FolderInfo'}">
208 <c:if test="${! empty folderinfo.closing}">
209 <hst:html hippohtml="${folderinfo.closing}"/>
210 </c:if>
211 </c:if>
212
213 <!-- TODO call file, but solve name problem. -->
214 <c:if test="${!empty folderinfo.altDocuments}" >
215 <div class='related'>
216 <h1 class='sectiontitle' title='Related documents to read instead of this one.'>Alternative</h1>
217 <ul>
218 <c:forEach var="referenced" items="${folderinfo.altDocuments}" varStatus="indexer">
219 <li>
220 <c:choose>
221 <c:when test="${! empty referenced.URL}"> <!-- TODO URL or Url -->
222 <c:choose>
223 <c:when test='${! empty referenced.description}'>
224 <a class='external' href='${referenced.URL}'>${referenced.description}</a>
225 </c:when>
226 <c:otherwise>
227 <a class='external' href='${referenced.URL}'>Alternative document</a>
228 </c:otherwise>
229 </c:choose>
230 </c:when>
231 <c:when test="${! empty referenced.documentLink}">
232 <hst:link var="link" hippobean="${referenced.documentLink}"/>
233 <c:choose>
234 <c:when test='${not empty referenced.description}'>
235 <a href='${link}'>${referenced.description}</a>
236 </c:when>
237 <c:when test='${not empty referenced.documentLink.referencedBean.shortDescription}'>
238 <a href='${link}'>
239 <hst:html hippohtml="${referenced.documentLink.referencedBean.shortDescription}"/>
240 </a>
241 </c:when>
242 <c:otherwise>
243 <a href='${link}'>Alternative document</a>
244 </c:otherwise>
245 </c:choose>
246 </c:when>
247 <c:otherwise>
248 ${referenced.description}
249 </c:otherwise>
250 </c:choose>
251 </li>
252 </c:forEach>
253 </ul>
254 </div>
255 </c:if>
256
257 </c:otherwise>
258 </c:choose>
259
260 </c:when>
261 <c:otherwise>
262 The error page should have been called.
263 </c:otherwise>
264 </c:choose>
265
266 </jsp:root>
267