searchResults.jsp 4.84 KB
Newer Older
1
2
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://textgrid.info/rep/utils" prefix="utils" %>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
3
4
5

<header class="tgrep header">

Ubbo Veentjer's avatar
Ubbo Veentjer committed
6
7
8
  <div class="tgrep header_info">
    ${i18n['displaying-results']} <span class="tgrep header_count -current">${pager.start + 1}&#8211;${pager.end}</span> ${i18n['of']}
    <span class="tgrep header_count -total">${pager.hits}</span>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
9

Ubbo Veentjer's avatar
Ubbo Veentjer committed
10
11
12
13
14
15
16
    <div class="tg dropdown" role="group">
      <a class="tg dropdown_toggle -settings">${i18n['change-result-display']}</a>
      <ul class="tg dropdown_menu">
        <li class="tg dropdown_item">
          <span class="tg dropdown_heading">${i18n['sort-by']}</span>
          <ul class="tg dropdown_submenu">
            <li class="tg dropdown_item ${order eq 'relevance' ? '-current' : ''}">
17
              <a href="?query=${query}${filterQueryString}&start=${start}&limit=${limit}&mode=${mode}&order=relevance">${i18n['relevance']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
18
19
            </li>
            <li class="tg dropdown_item ${order eq 'asc:title' ? '-current' : ''}">
20
              <a href="?query=${query}${filterQueryString}&start=${start}&limit=${limit}&mode=${mode}&order=asc:title">${i18n['title-ascending']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
21
22
            </li>
            <li class="tg dropdown_item ${order eq 'desc:title' ? '-current' : ''}">
23
              <a href="?query=${query}${filterQueryString}&start=${start}&limit=${limit}&mode=${mode}&mode=${mode}&order=desc:title">${i18n['title-descending']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
24
25
            </li>
            <li class="tg dropdown_item ${order eq 'asc:format' ? '-current' : ''}">
26
              <a href="?query=${query}${filterQueryString}&start=${start}&limit=${limit}&mode=${mode}&order=asc:format">${i18n['format-ascending']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
27
28
            </li>
            <li class="tg dropdown_item ${order eq 'desc:format' ? '-current' : ''}">
29
              <a href="?query=${query}${filterQueryString}&start=${start}&limit=${limit}&mode=${mode}&order=desc:format">${i18n['format-descending']}</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
30
31
32
33
34
35
36
            </li>
          </ul>
        </li>
        <li class="tg dropdown_item">
          <span class="tg dropdown_heading">${i18n['results-per-page']}</span>
          <ul class="tg dropdown_submenu">
            <li class="tg dropdown_item  ${limit eq '10' ? '-current' : ''}">
37
              <a href="?query=${query}${filterQueryString}&order=${order}&start=${start}&mode=${mode}&limit=10">10</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
38
39
            </li>
            <li class="tg dropdown_item ${limit eq '20' ? '-current' : ''}">
40
              <a href="?query=${query}${filterQueryString}&order=${order}&start=${start}&mode=${mode}&limit=20">20</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
41
42
            </li>
            <li class="tg dropdown_item ${limit eq '50' ? '-current' : ''}">
43
              <a href="?query=${query}${filterQueryString}&order=${order}&start=${start}&mode=${mode}&limit=50">50</a>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
44
45
46
47
48
49
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
50

Ubbo Veentjer's avatar
Ubbo Veentjer committed
51
52
53
54
55
  <div class="tgrep header_actions">
    <c:if test="${mode ne 'gallery'}">
      <button class="tgrep header_button -expand-all">${i18n['expand-all']}</button>
      <button class="tgrep header_button -collapse-all">${i18n['collapse-all']}</button>
    </c:if>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
56

Ubbo Veentjer's avatar
Ubbo Veentjer committed
57
58
59
    <div class="tg dropdown" role="group">
      <a class="tg dropdown_toggle -download">${i18n['download-all']}</a>
      <ul class="tg dropdown_menu">
60
        <li class="tg dropdown_item"><a class="tg dropdown_link" href="${config.aggregatorUrl}/zip/query?query=${utils:urlencode(realQueryString)}${filterQueryString}${aggregatorSandboxParam}" data-type="zip">ZIP</a></li>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
61
        <li class="tg dropdown_item"><a class="tg dropdown_link" href="${config.aggregatorUrl}/zip/query?query=${utils:urlencode(realQueryString)}${filterQueryString}${aggregatorSandboxParam}&transform=text&meta=false&only=text/xml&dirnames=" data-type="zip">${i18n['download-text-only-zip']}</a></li>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
62
<!-- other exports do not work yet
63
64
        <li class="tg dropdown_item"><a class="tg dropdown_link" href="${config.aggregatorUrl}/epub/query?query=${query}${filterQueryString}" data-type="ebook">E-Book</a></li>
        <li class="tg dropdown_item"><a class="tg dropdown_link" href="${config.aggregatorUrl}/teicorpus/query?query=${query}${filterQueryString}" data-type="tei-corpus">TEI-Corpus</a></li>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
65
-->
Ubbo Veentjer's avatar
Ubbo Veentjer committed
66
67
68
      </ul>
    </div>
  </div>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
69
70
71
72
</header>

<div class="tgrep results">

Ubbo Veentjer's avatar
Ubbo Veentjer committed
73
  <c:choose>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
74

Ubbo Veentjer's avatar
Ubbo Veentjer committed
75
76
77
78
79
80
    <c:when test="${mode eq 'gallery'}">
      <ol start="${pager.start + 1}" class="tgrep results_gallery">
        <c:forEach items="${results}" var="result">
          <%@ include file="singleGalleryResult.jsp" %>
        </c:forEach>
      </ol>
81
      <div class="clearboth"></div>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
82
    </c:when>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
83

Ubbo Veentjer's avatar
Ubbo Veentjer committed
84
85
86
87
88
89
90
    <c:otherwise>
      <ol start="${pager.start + 1}" class="tgrep results_list">
        <c:forEach items="${results}" var="result">
          <%@ include file="singleListResult.jsp" %>
        </c:forEach>
      </ol>
    </c:otherwise>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
91

Ubbo Veentjer's avatar
Ubbo Veentjer committed
92
  </c:choose>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
93
94
95
96

</div>

<footer class="tgrep footer">
Ubbo Veentjer's avatar
Ubbo Veentjer committed
97
  <%@ include file="pager.jsp" %>
Ubbo Veentjer's avatar
Ubbo Veentjer committed
98
</footer>