-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch
358 lines (351 loc) · 16.2 KB
/
search
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<%@ page buffer="8kb" autoFlush="true" %>
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="zm" uri="com.zimbra.zm" %>
<%@ taglib prefix="app" uri="com.zimbra.htmlclient" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="com.zimbra.i18n" %>
<link rel="stylesheet" href="/css/style-topin-html1.css" />
<div class="top-wrapper">
<div class="top-row">
<a href="https://itcommunications.sk/?page_id=32" class="backtoservices">Späť na moje služby</a>
</div>
</div>
<app:handleError>
<zm:getMailbox var="mailbox"/>
<c:choose>
<c:when test="${not empty mailbox.prefs.locale}">
<fmt:setLocale value='${mailbox.prefs.locale}' scope='request' />
</c:when>
<c:otherwise>
<fmt:setLocale value='${pageContext.request.locale}' scope='request' />
</c:otherwise>
</c:choose>
<fmt:setBundle basename="/messages/ZhMsg" scope='request' />
<c:set var="action" value="${empty param.paction ? param.action : param.paction}" scope="request"/>
<jsp:useBean id="expanded" scope="session" class="java.util.HashMap" />
<%-- Compose, temp draft cleanup--%>
<c:if test="${param.action ne 'compose' and not empty sessionScope.temp_draftid}">
<zm:deleteMessage var="result" id="${sessionScope.temp_draftid}"/>
<c:remove var="temp_draftid" scope="session"/>
</c:if>
<%-- Deep linking --%>
<c:if test="${not empty param.app}">
<c:choose>
<c:when test="${param.app eq 'calendar' and (mailbox.features.calendar or mailbox.features.calendarUpsell)}">
<c:redirect url="/h/calendar" />
</c:when>
<c:when test="${param.app eq 'mail' and not empty param.id and zm:isMailEnabled(mailbox)}">
<c:redirect url="/h/search?st=message&id=${param.id}&action=view" />
</c:when>
<c:when test="${param.app eq 'mail' and zm:isMailEnabled(mailbox)}">
<c:redirect url="/h/search" />
</c:when>
<c:when test="${param.app eq 'voice' and mailbox.features.voice and not empty param.id}">
<c:catch var="ex">
<c:if test="${not empty param.phone}">
<zm:computeSearchContext var="voicesearch" usecache="true" types="voicemail" query="phone:${param.phone}"/>
<c:set var="matches" value="${false}"/>
<c:forEach items="${voicesearch.searchResult.hits}" var="hit" varStatus="status">
<c:if test="${hit.voiceMailItemHit.id eq param.id}">
<c:set var="matches" value="${true}"/>
<c:redirect url="/h/search?st=voicemail&action=listen&phone=${param.phone}&voiceId=${hit.voiceMailItemHit.serialize}"/>
</c:if>
</c:forEach>
<c:if test="${empty voicesearch.searchResult.hits or matches eq false}">
<c:redirect url="/h/search?st=voicemail&sq=phone:${param.phone}"/>
</c:if>
</c:if>
<c:if test="${empty param.phone}">
<c:set var="firstPhoneAcc" value="${zm:getFirstPhoneAccount(pageContext)}"/>
<c:redirect url="/h/search?st=voicemail&action=listen&phone=${firstPhoneAcc.phone.name}&voiceId=${param.id}"/>
</c:if>
</c:catch>
<c:if test="${!empty ex}">
<c:redirect url="/h/search?st=voicemail" />
</c:if>
</c:when>
<c:when test="${param.app eq 'voice' and mailbox.features.voice}">
<c:redirect url="/h/search?st=voicemail" />
</c:when>
<c:when test="${param.app eq 'options' and mailbox.features.options}">
<c:redirect url="/h/options?selected=${param.section}" />
</c:when>
<c:when test="${param.app eq 'contacts' and mailbox.features.contacts}">
<c:redirect url="/h/search?st=contact" />
</c:when>
<c:when test="${param.app eq 'gal' and mailbox.features.gal}">
<c:redirect url="/h/search?st=gal" />
</c:when>
<c:when test="${param.app eq 'tasks' and mailbox.features.tasks}">
<c:redirect url="/h/search?st=task" />
</c:when>
<c:when test="${param.app eq 'briefcases' and mailbox.features.briefcases}">
<c:redirect url="/h/search?st=briefcase" />
</c:when>
</c:choose>
</c:if>
<c:if test="${not empty param.view}">
<c:choose>
<c:when test="${param.view eq 'compose'}">
<c:redirect url="/h/search?action=compose">
<c:param name="subject" value="${param.subject}" />
<c:param name="to" value="${param.to}" />
<c:param name="body" value="${param.body}" />
</c:redirect>
</c:when>
<c:otherwise>
<c:if test="${not empty sessionScope.toAddresses}">
<c:remove var="toAddresses" scope="session"/>
</c:if>
</c:otherwise>
</c:choose>
<c:if test="${(param.view eq 'day') or (param.view eq 'workWeek') or (param.view eq 'week') or (param.view eq 'month')}">
<c:redirect url="/h/calendar" >
<c:param name="view" value="${param.view}" />
<c:param name="date" value="${param.date}" />
</c:redirect>
</c:if>
<c:if test="${(param.view eq 'msg') and (not empty param.id)}">
<c:redirect url="/h/search">
<c:param name="st" value='message'/>
<c:param name="action" value='view'/>
<c:param name="id" value='${param.id}'/>
</c:redirect>
</c:if>
</c:if>
<%-- end --%>
<c:if test="${not empty param.expand}">
<c:set target="${sessionScope.expanded}" property="${param.expand}" value="expand"/>
</c:if>
<c:if test="${not empty param.collapse}">
<c:set target="${sessionScope.expanded}" property="${param.collapse}" value="collapse"/>
</c:if>
<c:if test="${param.init eq 'true'}">
<c:if test="${mailbox.features.portalEnabled}">
<c:redirect url="home?mesg=welcome"/>
</c:if>
</c:if>
<%-- switch based on context search types --%>
<c:set var="noComposeView" scope="session" value="${false}"/>
<c:choose>
<c:when test="${param.action eq 'compose'}">
<app:composeCheck/>
</c:when>
<c:when test="${not empty param.doConvListViewAction}">
<app:convListViewAction/>
</c:when>
<c:when test="${not empty param.doMessageAction}">
<app:messageAction/>
</c:when>
<c:when test="${param.action eq 'newtask' or param.action eq 'edittask' or param.action eq 'viewtask' }">
<app:editTaskCheck/>
</c:when>
<c:when test="${not empty param.doTaskAction}">
<app:taskAction/>
</c:when>
<c:when test="${param.action eq 'newbrief'}">
<app:newBriefCheck/>
</c:when>
<c:when test="${not empty param.doBriefcaseAction}">
<app:briefcaseListViewAction/>
</c:when>
<c:when test="${not empty param.doNotebookAction}">
<app:notebookListViewAction/>
</c:when>
<c:when test="${not empty param.doContactListViewAction or param.action eq 'newcontact' or param.action eq 'newcontactgroup'}">
<app:contactListViewAction/>
</c:when>
<c:when test="${not empty param.doVoiceMailListViewAction}">
<app:voiceMailListViewAction/>
</c:when>
<c:when test="${not empty param.doVoiceMailViewAction}">
<app:voiceMailViewAction/>
</c:when>
</c:choose>
<c:if test="${param.st eq 'web'}">
<fmt:message var="searchURL" key="searchURL" />
<fmt:message var="searchParam" key="searchFieldName" />
<c:redirect url="${searchURL}">
<c:param name="${searchParam}" value="${param.sq}"/>
</c:redirect>
</c:if>
<c:if test="${param.st eq 'calendar'}">
<c:redirect url="/h/calendar" />
</c:if>
<c:if test="${param.st eq 'home'}">
<c:redirect url="/h/home" />
</c:if>
<c:if test="${param.st eq 'appointment'}">
<c:redirect url="/h/calendar">
<c:param name="sq" value="${param.sq}"/>
</c:redirect>
</c:if>
<c:if test="${not zm:isMailEnabled(mailbox)}">
<c:if test="${param.st eq 'message' or param.st eq 'conversation' or empty param.st}">
<c:redirect url="/h/calendar"/>
</c:if>
</c:if>
<%-- Include Shared Folder Search --%>
<c:set var="sfId" value=""/>
<c:if test="${not empty param.incShared}">
<zm:forEachFolder var="folder" skiproot="${true}" skipsystem="${true}" expanded="${sessionScope.expanded}" skiptrash="${true}">
<c:if test="${folder.isMountPoint}">
<c:if test="${param.st eq 'task' and folder.isTaskView}">
<c:if test="${not empty sfId}">
<c:set var="sfId" value="${sfId} OR"/>
</c:if>
<c:set var="sfId" value="${sfId} inid:${folder.id}"/>
</c:if>
<c:if test="${param.st eq 'contact' and folder.isContactView}">
<c:if test="${not empty sfId}">
<c:set var="sfId" value="${sfId} OR"/>
</c:if>
<c:set var="sfId" value="${sfId} inid:${folder.id}"/>
</c:if>
<c:if test="${(param.st eq 'message' or param.st eq 'conversation') and folder.isMailView}">
<c:if test="${not empty sfId}">
<c:set var="sfId" value="${sfId} OR"/>
</c:if>
<c:set var="sfId" value="${sfId} inid:${folder.id}"/>
</c:if>
</c:if>
</zm:forEachFolder>
</c:if>
<c:if test="${not empty sfId}">
<c:set var="sharedSq" value="${param.sq} (${sfId} OR is:local)"/>
</c:if>
<%-- End - Include Shared Folder Search --%>
<zm:computeSearchContext var="context" usecache="true" query="${not empty param.incShared ? sharedSq : ''}"/>
</app:handleError>
<c:if test="${param.mesg eq 'welcome'}">
<c:set var="refreshSkin" value="${true}" scope="request"/>
<c:remove var="skin" scope="session"/>
<app:status style="info" html="true">
<fmt:setBundle basename="/messages/ZhMsg" scope='request' force="true"/>
<fmt:message key="htmlWelcomeMesg"/>
</app:status>
</c:if>
<c:choose>
<c:when test="${zm:boolean(param.actionMessageMovedTrash)}" >
<app:status>
<fmt:message key="actionMessageDeleted"/>
</app:status>
</c:when>
<c:when test="${zm:boolean(param.actionMessageMoved)}" >
<app:status>
<fmt:message key="actionSingleMessageMoved">
<fmt:param value="${param.movedFolderName}"/>
</fmt:message>
</app:status>
</c:when>
</c:choose>
<%-- switch based on context search types --%>
<c:choose>
<%--In case of send and cancel, noComposeView is set to true--%>
<c:when test="${param.action eq 'compose' and noComposeView eq false}">
<%-- do nothing --%>
</c:when>
<c:when test="${context.isConversationSearch and action eq 'view'}">
<app:convView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and action eq 'view2'}">
<app:convView2 context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'right' and action eq 'paneView'}">
<app:convColumnView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'right' and action eq 'paneView2'}">
<app:convColumnView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'bottom' and action eq 'rowView'}">
<app:convRowView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'bottom' and action eq 'rowView2'}">
<app:convRowView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'off' and action eq 'paneView'}">
<app:convView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'off' and action eq 'paneView2'}">
<app:convView2 context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'off' and action eq 'offView'}">
<app:convListView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'off' and action eq 'offView2'}">
<app:convListView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'right'}">
<app:convColumnView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'bottom'}">
<app:convRowView context="${context}"/>
</c:when>
<c:when test="${context.isConversationSearch and mailbox.prefs.readingPaneLocation eq 'off'}">
<app:convListView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isMessageSearch) and action eq 'view'}">
<app:messageView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isMessageSearch) and mailbox.prefs.readingPaneLocation eq 'right' and action eq 'paneView'}">
<app:messageColumnView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isMessageSearch) and mailbox.prefs.readingPaneLocation eq 'bottom' and action eq 'rowView'}">
<app:messageRowView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isMessageSearch) and mailbox.prefs.readingPaneLocation eq 'off' and action eq 'view'}">
<app:messageView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isMessageSearch) and mailbox.prefs.readingPaneLocation eq 'right'}">
<app:messageColumnView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isMessageSearch) and mailbox.prefs.readingPaneLocation eq 'bottom'}">
<app:messageRowView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isMessageSearch)}">
<app:messageListView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isContactSearch) and action eq 'view'}">
<app:contactView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isContactSearch) or context.isGALSearch}">
<app:contactListView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isTaskSearch)}">
<app:taskListView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isVoiceMailSearch) and action eq 'listen'}">
<app:voiceMailView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isVoiceMailSearch)}">
<app:voiceMailListView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isCallSearch)}">
<app:callListView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isBriefcaseSearch) and (param.view eq 'dv' or empty param.view)}">
<app:briefcaseListView context="${context}"/>
</c:when>
<c:when test="${zm:boolean(context.isBriefcaseSearch) and param.view eq 'ev'}">
<app:briefcaseExplorerView context="${context}"/>
</c:when>
<%--bug:56196
<c:when test="${context.isWikiSearch}">
<c:choose>
<c:when test="${context.isTagSearch}">
<app:notebookListView context="${context}"/>
</c:when>
<c:otherwise>
<app:notebookRestView context="${context}"/>
</c:otherwise>
</c:choose>
</c:when>
--%>
<c:otherwise>
<fmt:message key="error" var="title"/>
<app:view mailbox="${mailbox}" title="${title}" selected="${not mailbox.features.mail ? 'calendar' : 'mail'}" context="${context}" folders="true" tags="true" searches="true" ads="" keys="true">
<fmt:message key="ztaglib.TAG_EXCEPTION"/>
</app:view>
</c:otherwise>
</c:choose>