3 $documents = $source["reference"] ? $source["reference"]["documents"] : $source["documents"];
5 $mw_out = $this->helper("mw_helper_out");
12 foreach($documents as $id_document => $document) :
15 if(($k = strrpos($document["url"], ".")) !== false) $ext = strtolower(substr($document["url"], $k + 1));
18 $audio_type = "audio/ogg";
21 $audio_type = "audio/mp3";
27 <li id="document_<?php echo $source["id"]."_".$id_document ?>">
28 <?php if($audio_type) : ?>
29 <div class="player_controls player" id="player_<?php echo $source["id"]."_".$id_document ?>">
30 <a class="play" href="#"><img src="<?php echo $this->out_url("icons/play.png") ?>" alt="play" /></a>
31 <a class="pause" href="#"><img src="<?php echo $this->out_url("icons/pause.png") ?>" alt="pause" /></a>
32 <a class="stop" href="#"><img src="<?php echo $this->out_url("icons/stop.png") ?>" alt="stop" /></a>
33 <audio id="audio_<?php echo $source["id"]."_".$id_document ?>" preload="none">
34 <source src="<?php echo $document["url"] ?>" type="<?php echo $audio_type ?>">
38 <div class="no_player"><!-- --></div>
40 $ext = explode(".", $document["url"]);
41 if(count($ext) > 1) $ext = $ext[count($ext) - 1];
42 else $ext = $document["url"];
43 if(strlen($ext) > 16) $ext = "(...) ".substr($ext, -16);
45 <a href="<?php echo $document["url"] ?>" title="<?php echo $mw_out->esc_attr($document["nom"]); ?>"><?php echo $ext; ?></a>
51 <div class="clear"><!-- --></div>