-<h2><?php echo $this->out["groupe"]["nom"]; ?></h2>
-<div class="description">
-<?php echo $this->out["groupe"]["description"] ?>
-</div>
+<article class="groupe">
+ <header>
+ <h1><?php echo $this->out["groupe"]["nom"]; ?></h1>
+ </header>
+
+ <?php if($this->out["groupe"]["description"]) : ?>
+ <div class="description">
+ <?php echo $this->out["groupe"]["description"] ?>
+ </div>
+ <?php endif; ?>
+ <ul class="groupes_sources">
+ <li><a href="<?php echo $this->url("sources/morceau", array("groupe" => $this->out["groupe"]["id"])); ?>">Morceaux</a></li>
+ <li><a href="<?php echo $this->url("sources/piste", array("groupe" => $this->out["groupe"]["id"])); ?>">Sources</a></li>
+ </ul>
-<div class="clear"><!-- --></div>
-<br />
<?php
if
) :
?>
-
-<h3 class="menu_albums">Albums</h3>
+<h2 class="menu_albums">Albums</h2>
<ul class="menu_albums">
<?php foreach($this->out["albums"]["list"] as $id_album => $album) : ?>
<li><a href="<?php echo $this->url("sources/album/view", array("album" => $id_album)) ?>" title="<?php echo str_replace("\"", """, $album["titre"]) ?>">
+ <?php
+
+ $source_image_url = false;
+ $source_thumb = false;
+ $margin_top = 0;
+ if($album["reference"]){
+ if(
+ isset($album["reference"]["image"])
+ && $album["reference"]["image"]
+ ){
+ $source_image_url = $album["reference"]["image"];
+ }
+ }
+ else{
+ if
+ ( isset($album["image_uri"])
+ && $album["image_uri"]
+ && file_exists($album["image_uri"])
+ ){
+ $source_image_url = $album["image_uri"];
+ }
+ }
+ if($source_image_url){
+ $source_thumb = false;
+ if($data->mw_thumbs_activated()){
+ $source_thumb = $data->img_thumb(
+ $source_image_url,
+ 90,
+ 90,
+ $this->path("content")."thumbs",
+ array(255, 255, 255),
+ true
+ );
+ }
+ else{
+ if($img_size = $data->img_size($source_image_url, 90, 90)){
+ $margin_top = floor((90 - $img_size["height"]) / 2);
+ }
+ }
+ if($source_image_url && !$source_thumb && !$img_size) $source_image_url = false;
+ }
+ if($source_image_url) :
+
+ ?>
- <?php
-
- if
- ( $album["image_uri"]
- && file_exists($album["image_uri"])
- && ($img_size = $data->img_size($album["image_uri"], 90, 90)) !== false
- ) :
- $margin_top = floor((90 - $img_size["height"]) / 2);
-
- ?>
- <img src="<?php echo $this->path("web").$album["image_uri"]; ?>"
+ <?php if($source_thumb) : ?>
+ <img src="<?php echo $this->path("content")."thumbs/".$source_thumb["thumb_file"] ?>"
+ width="<?php echo $source_thumb["thumb_width"] ?>"
+ height="<?php echo $source_thumb["thumb_height"] ?>"
+ alt="" />
+ <?php else : ?>
+ <img src="<?php echo $this->path("web").$source_image_url; ?>"
width="<?php echo $img_size["width"] ?>"
height="<?php echo $img_size["height"] ?>"
style="margin-top:<?php echo $margin_top ?>px"
alt="" />
- <?php endif; ?>
- <span><?php echo $album["titre"] ?></span>
+ <?php endif; ?>
+ <?php endif; ?>
+ <span><?php echo $album["titre"] ?></span>
</a></li>
<?php endforeach; ?>
</ul>
<div class="clear"><!-- --></div>
<?php endif; ?>
-<?php if($this->out["groupe"]["contact_form"]) : ?>
-<h3>Contact</h3>
+<?php if(isset($this->out["groupe"]["contact_form"]) && $this->out["groupe"]["contact_form"]) : ?>
+<h2>Contact</h2>
<p>
<a href="<?php echo $this->url("forms/sourceml/contact_author", array("id" => $this->out["groupe"]["id"])) ?>">Envoyer un message à <?php echo $this->out["groupe"]["nom"]; ?></a>.
</p>
<?php endif; ?>
+</article>
\ No newline at end of file