Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CreNum
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Elan Littératures et Arts Numériques
CreNum
Commits
3e79605f
Commit
3e79605f
authored
1 month ago
by
Anne Garcia-Fernandez
Browse files
Options
Downloads
Patches
Plain Diff
Improve presentation : customisation and translate to french
parent
99507a29
No related branches found
No related tags found
1 merge request
!99
Merge Search functionnality to Master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
data/xslt/tei2search_template.xsl
+40
-34
40 additions, 34 deletions
data/xslt/tei2search_template.xsl
with
40 additions
and
34 deletions
data/xslt/tei2search_template.xsl
+
40
−
34
View file @
3e79605f
...
...
@@ -27,7 +27,7 @@
</xsl:variable>
<xsl:template
match=
"/"
>
<xsl:variable
name=
"all_witness_id"
select=
"
distinct-values(//@wit/tokenize(., ' '))"
/>
<xsl:variable
name=
"all_witness_id"
select=
"distinct-values(//@wit/tokenize(., ' '))"
/>
<xsl:text>
{% extends "base.html.j2" %}
</xsl:text>
<xsl:value-of
select=
"$br"
/>
<xsl:text>
{% block css %}
</xsl:text>
...
...
@@ -40,61 +40,67 @@
<xsl:value-of
select=
"$br"
/>
<xsl:text>
{% block body %}
</xsl:text>
<xsl:value-of
select=
"$br"
/>
<h1>
Chercher dans un vers...
</h1>
<div
id=
"app"
>
<div
class=
"App"
>
<div
class=
"Loader"
>
loading
...
</div>
<div
class=
"Loader"
>
chargement des données
...
</div>
<div
class=
"SearchBox"
>
<div
class=
"Search"
>
<input
type=
"text"
/>
<button
class=
"clear"
>
×
</button>
<button
class=
"clear"
>
×
</button>
</div>
<ul
class=
"SuggestionList"
></ul
>
<ul
class=
"SuggestionList"
/
>
<details
class=
"AdvancedOptions"
open=
""
>
<summary>
Advanced option
s
</summary>
<summary>
Options avancée
s
</summary>
<form
class=
"options"
>
<div>
<b>
Search in fields:
</b>
<label><input
type=
"checkbox"
name=
"fields"
value=
"lem"
checked=
""
/>
Lemme
</label>
<b>
Chercher dans les manuscrits
:
</b>
<label>
<b><input
type=
"checkbox"
name=
"fields"
value=
"lem"
checked=
""
/>
BnFfr 2817
</b>
</label>
<xsl:for-each
select=
"$all_witness_id"
>
<xsl:variable
name=
"wit"
select=
"replace(.,'#','')"
/>
<label><input
type=
"checkbox"
name=
"fields"
value=
"{$wit}"
checked=
""
/>
<xsl:value-of
select=
"$wit"
/></label></xsl:for-each>
<xsl:variable
name=
"wit"
select=
"replace(., '#', '')"
/>
<label><input
type=
"checkbox"
name=
"fields"
value=
"{$wit}"
checked=
""
/>
<xsl:value-of
select=
"$wit"
/></label>
<xsl:text>
</xsl:text>
</xsl:for-each>
</div>
<div>
<b>
Search options:
</b>
<label><input
type=
"checkbox"
name=
"prefix"
value=
"true"
checked=
""
/>
Prefix (considérer la recherche
comme un "début de mot" ; 'qui' renvoit 'qui',
'quidem', etc.)
</label>
<label><input
type=
"checkbox"
name=
"fuzzy"
value=
"true"
checked=
""
/>
Fuzzy (autoriser les recherches
approximatives)
</label>
<b>
Élargir la recherche
:
</b>
<br/>
<label><input
type=
"checkbox"
name=
"prefix"
value=
"true"
checked=
""
/>
Rechercher les mots qui commencent par... (par exemple
<code>
qui
</code>
renverra
<code>
qui
</code>
,
<code>
quidem
</code>
, etc.)
</label>
<br/>
<label><input
type=
"checkbox"
name=
"fuzzy"
value=
"true"
checked=
""
/>
Autoriser les résultats approximatifs
</label>
</div>
<div>
<b>
Combine terms with:
</b>
<label><input
type=
"radio"
name=
"combineWith"
value=
"OR"
checked=
""
/>
OR (chercher au moins un des
termes)
</label>
<label><input
type=
"radio"
name=
"combineWith"
value=
"AND"
/>
AND (chercher tous les
termes)
</label>
<b>
Rechercher
</b>
<label><input
type=
"radio"
name=
"combineWith"
value=
"OR"
checked=
""
/>
au moins un des termes (
<code>
roy
</code>
ou
<code>
ost
</code>
)
</label>
<label><input
type=
"radio"
name=
"combineWith"
value=
"AND"
/>
tous les
termes (
<code>
roy
</code>
et
<code>
ost
</code>
)
</label>
</div>
</form>
</details>
</div>
<p
class=
"Explanation"
>
Ceci est un premier jet de recherche, utilisant
la bibliothèque javascript
<a
href=
"https://github.com/lucaong/minisearch"
>
MiniSearch
</a></p>
<ul
class=
"resultsList"
></ul>
<div
class=
"m-4"
>
<p
class=
"Explanation"
>
Votre recherche n'a donné aucun résultat. Vous pouvez
élargir votre recherche en cherchant
<i>
les mots commençant par
</i>
et/ou en
autorisant les
<i>
résultats approximatifs
</i>
.
</p>
</div>
<ul
class=
"resultsList"
/>
</div>
</div>
<script
src=
"https://cdn.jsdelivr.net/npm/minisearch@7.1.0/dist/umd/index.min.js"
/>
<script
src=
"/static/js/auto_app_minisearch.js"
></script
>
<script
src=
"/static/js/app_minisearch.js"
></script
>
<script
src=
"/static/js/auto_app_minisearch.js"
/
>
<script
src=
"/static/js/app_minisearch.js"
/
>
<xsl:value-of
select=
"$br"
/>
<xsl:text>
{% endblock %}
</xsl:text>
</xsl:template>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment