Subversion Repositories Sites.tela-botanica.org

Compare Revisions

Ignore whitespace Rev 1015 → Rev 1016

/trunk/papyrus/applettes/syndication/squelettes/images_cel.tpl.html
53,51 → 53,72
}
?>
<div class="actualites1">
<a href="<?=$page['description']?>" class="image-lien" title="<?=sprintf($tpl_url, L)?>" rel="galerie-princ">
<img src="<?=sprintf($tpl_url, M)?>" alt="<?=$titre_page?>"/>
<a href="<?=sprintf($tpl_url, L)?>" class="image-lien"
title="<?=$titre_page?> - Publiée le <?=$page['date']?> - GUID : <?=$guid?>"
rel="galerie-princ">
<img src="<?=sprintf($tpl_url, S)?>" alt="<?=$titre_page?>"/>
</a>
<div style="display: none;">
<div id="cel-obs-<?=$guid?>" class="infos-annexe">
<a href="<?=$page['description']?>">
<span class="image-titre"><?=$titre_page?></span><br />
<span class="image-date">Publiée le <?=$page['date']?></span><br />
Cliquez pour voir le détail
</a>
<strong>
<a class="image-titre" href="<?=$page['description']?>"
onclick="window.open(this.href);return false;"
title="Cliquez pour accéder à la fiche eFlore">
<?=$titre_page?>
</a>
</strong><br />
<span class="image-date">Publiée le <?=$page['date']?></span>
</div>
</div>
</div>
<?php endforeach; ?>
<!-- img id="imgExtra" src="http://www.tela-botanica.org/appli:cel-img:0000<?=$sites[0]['pages'][7]['guid']?>M" / -->
<? $page = $sites[0]['pages'][7]; ?>
<!-- Image Extra en dessous des vignettes -->
<?
$page = $sites[0]['pages'][7];
// Formatage date
$timestamp = strtotime($page['date']);
$page['date'] = strftime('%A %d %B %Y', $timestamp);
$titre_page = preg_replace('/^\d+-\d+&nbsp;:/', '', $page['titre']);
$tpl_url = preg_replace('/[SML]\.jpg$/', '%s.jpg', $page['guid']);
$guid = $page['guid'];
if (preg_match('/appli:cel-img:([0-9]+)[SML]\.jpg$/', $page['guid'], $match)) {
$guid = (int) $match[1];
}
?>
<div class="actualites1">
<a href="<?=$page['description']?>" class="image-lien" title="<?=sprintf($tpl_url, L)?>" rel="galerie-princ">
<a href="<?=sprintf($tpl_url, L)?>" class="image-lien"
title="<?=$titre_page?> - Publiée le <?=$page['date']?> - GUID : <?=$guid?>"
rel="galerie-princ">
<img id="imgExtra" src="<?=sprintf($tpl_url, M)?>" alt="<?=$titre_page?>"/>
</a>
<div style="display: none;">
<div id="cel-obs-img-extra" class="infos-annexe">
<a href="<?=$page['description']?>">
<span class="image-titre"><?=$titre_page?></span><br />
<span class="image-date">Publiée le <?=$page['date']?></span><br />
Cliquez pour voir le détail
</a>
</div>
</div>
</div>
<script type="text/Javascript">
//Remplacer le lien de chaque actualité par un #cel-obs-guid
function formaterTitre(titre, currentArray, currentIndex, currentOpts) {
var motif = /GUID : ([0-9A-Z]+)$/;
motif.exec(titre);
var guid = RegExp.$1;
var info = $('#cel-obs-'+guid).clone().html();
var tpl =
'<div id="cel-legende">'+
(titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
'<\/div>';
return tpl;
}
$(document).ready(function() {
$('.actualites1').each(function () {
var id = $(this).find('.infos-annexe').attr('id');
var lien = $(this).find('.image-lien');
lien.attr('href', '#' + id);
$('#' + id).prepend('<img height="500px" src="' + lien.attr('title') + ' /> <br />');
lien.fancybox({
'titlePosition' : 'inside',
'transitionIn' : 'none',
'transitionOut' : 'none'
});
$('a.image-lien').attr('rel', 'galerie-princ').fancybox({
transitionIn:'elastic',
transitionOut:'elastic',
speedIn :600,
speedOut:200,
overlayShow:true,
titleShow:true,
titlePosition:'inside',
titleFormat:formaterTitre
});
});
</script>