/
annuaire_alphabetique.tpl.html
100 lines (89 loc) · 2.72 KB
/
annuaire_alphabetique.tpl.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
90
91
92
93
94
95
96
97
98
99
100
<?php if( count($fiches)>0 ) : ?>
<div id="lettres_init" class="text-center">
<!-- Alphabet cliquable pour aller sur les ancres des différentes lettres -->
<a href="#lettre_a"> a </a>
<a href="#lettre_b"> b </a>
<a href="#lettre_c"> c </a>
<a href="#lettre_d"> d </a>
<a href="#lettre_e"> e </a>
<a href="#lettre_f"> f </a>
<a href="#lettre_g"> g </a>
<a href="#lettre_h"> h </a>
<a href="#lettre_i"> i </a>
<a href="#lettre_j"> j </a>
<a href="#lettre_k"> k </a>
<a href="#lettre_l"> l </a>
<a href="#lettre_m"> m </a>
<a href="#lettre_n"> n </a>
<a href="#lettre_o"> o </a>
<a href="#lettre_p"> p </a>
<a href="#lettre_q"> q </a>
<a href="#lettre_r"> r </a>
<a href="#lettre_s"> s </a>
<a href="#lettre_t"> t </a>
<a href="#lettre_u"> u </a>
<a href="#lettre_v"> v </a>
<a href="#lettre_w"> w </a>
<a href="#lettre_x"> x </a>
<a href="#lettre_y"> y </a>
<a href="#lettre_z"> z </a>
</div>
<p class="wrapper_nombre_membres">
<span class="nombre_membres"><?php echo count($fiches); ?> membres</span>
</p>
<div class="annuaire-fiches-container">
<?php foreach($fiches as $fiche): // Les fiches sont déjà triées par ordre alphabetique ?>
<?php
$fiche['bf_titre'] = trim($fiche['bf_titre']);
$firstChar = strtolower(removeAccents($fiche['bf_titre'])[0]);
// si on change de lettre dans le parcours alphabétique, on rajoute une ancre avec le titre de la lettre
if (empty($curChar) || $firstChar != $curChar) : ?>
<div class="clearfix"></div>
<div class='letter-title' id='lettre_<?php echo $firstChar; ?>'>
<span><?php echo $firstChar; ?></span>
</div>
<?php $curChar = $firstChar; // on met dans une variable curChar le caractère en cours d'utilsation ?>
<?php endif; ?>
<a class="nom bazar-entry modalbox" <?php echo $fiche['html_data']?>
href="<?php echo $fiche['url']
// add /iframe only for external YesWiki entries
.(
(isset($fiche['external-data']))
? '/iframe" data-iframe="1" title="'.htmlentities(strip_tags($fiche['bf_titre'])).'"' // title used by iframe
: '"'
); ?>>
<?php echo $fiche['bf_titre']; ?>
</a>
<?php endforeach; ?>
</div>
<div class="clearfix"></div>
<style>
.nom {
display:block;
}
@media (min-width: 700px) {
.nom {
float: left;
width: 49%;
margin-right: 1%;
}
}
.wrapper_nombre_membres {
background: none repeat scroll 0 0 #fafafa;
margin-top: 4px;
text-align: center;
font-style:italic;
}
#lettres_init a {
text-transform:uppercase;
display: inline-block;
margin: 0 8px;
}
.letter-title {
font-weight: bold;
margin-top: 2rem;
text-transform: uppercase;
}
</style>
<?php endif; ?>
<?php echo $pager_links;?>