forked from chapitreneuf/nova
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros_search.html
89 lines (83 loc) · 2.26 KB
/
macros_search.html
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
<CONTENT VERSION="1.0" LANG="fr" CHARSET="utf-8"/>
/**
* Initialisation de la page
*/
<DEFMACRO NAME="SEARCH_INIT">
<!--[ Dépendances ]-->
<USE MACROFILE="macros_publication.html" />
<!--[ Globales ]-->
<LET VAR="titre_page" GLOBAL="1">
[@RECHERCHE] “[#QUERY|htmlspecialchars|stripslashes]” – [#OPTIONS.METADONNEESSITE.TITRESITE]
</LET>
<LET VAR="resultats_par_page" GLOBAL="1">15</LET>
</DEFMACRO>
/**
* Macro principale appelée par le template.
*/
<DEFMACRO NAME="SEARCH_MAIN">
<FUNC NAME="BASE_SECTION_HEADER" TITLE="[@RECHERCHE] “[#QUERY|htmlspecialchars|stripslashes]”" />
<FUNC NAME="NAV_SEARCH_FORM" AUTOFOCUS="1" />
<MACRO NAME="SEARCH_RESULTS" />
</DEFMACRO>
/**
* Résultats de recherche de Lodel.
*/
<DEFMACRO NAME="SEARCH_RESULTS">
<LOOP NAME="search" SPLIT="[%RESULTATS_PAR_PAGE]">
<ALTERNATIVE>
<p>[@AUCUN_RESULTAT]</p>
</ALTERNATIVE>
<BEFORE>
<section id="search-results" class="search-results">
<ul class="toc__contents toc__contents--search-results">
</BEFORE>
<DO>
<LOOP NAME="search_lodelsearch_type"
TABLE="entities, types"
SELECT="entities.id, class, type"
WHERE="entities.id = '[#ID]' AND entities.idtype = types.id">
<IF COND="[#CLASS] EQ 'textes'">
<LOOP NAME="search_lodelsearch_item"
TABLE="#_TP_[#CLASS]"
WHERE="identity = '[#ID]'">
<li class="toc__li toc__li--class-[#CLASS]" lang="[#LANGUE]">
<FUNC NAME="PUBLICATION_LI_TEXTE" />
<IF COND="[#TEXTE]">
<p class="toc__description">[#TEXTE|textebrut|cuttext(300, true)]<p>
</IF>
</li>
</LOOP>
</IF>
</LOOP>
</DO>
<AFTER>
</ul>
<MACRO NAME="SEARCH_LODELSEARCH_PREV_NEXT" />
</section>
</AFTER>
</LOOP>
</DEFMACRO>
/**
* Boutons vers les résultats précédent/suivant.
*/
<DEFMACRO NAME="SEARCH_LODELSEARCH_PREV_NEXT">
<LOOP NAME="page_scale">
<BEFORE>
<!--[ Prev ]-->
<div class="search-prev col-6">
<IF COND="[#PREVIOUSURL]">
<a class="btn btn-default" href="[#PREVIOUSURL]">[@PRECEDENT]</a>
</IF>
</div>
</BEFORE>
<DO> </DO>
<AFTER>
<!--[ Next ]-->
<div class="search-next col-6">
<IF COND="[#NEXTURL]">
<a class="btn btn-default" href="[#NEXTURL]">[@SUIVANT]</a>
</IF>
</div>
</AFTER>
</LOOP>
</DEFMACRO>