miniatures pour les groupes
[mw_sourceml] / app / out / default / views / sources / groupe / list.php
1 <h1>Groupes</h1>
2
3 <?php if($this->out["groupes"]["list"]) : ?>
4
5 <?php $items = "groupes"; $legend = "groupes"; require $this->out_file("views/navig.php"); ?>
6
7 <ul class="groupes">
8   
9 <?php foreach($this->out["groupes"]["list"] as $id_groupe => $groupe) : ?>
10   <li>
11     <h4>
12       <a href="<?php echo $this->url("sources/groupe/view", array("id" => $id_groupe)) ?>">
13         <?php
14         
15           $source_image_url = false;
16           $source_thumb = false;
17           $margin_top = 0;
18           if(
19                 isset($groupe["image_uri"])
20             &&  $groupe["image_uri"]
21             &&  file_exists($groupe["image_uri"])
22           ){
23             $source_image_url = $groupe["image_uri"];
24             if($data->mw_thumbs_activated()){
25               $source_thumb = $data->img_thumb(
26                 $source_image_url,
27                 120,
28                 100,
29                 $this->path("content")."thumbs",
30                 array(255, 255, 255)
31               );
32             }
33             else{
34               if($img_size = $data->img_size($source_image_url, 120, 100)){
35                 $margin_top = floor((100 - $img_size["height"]) / 2);
36               }
37             }
38             if($source_image_url && !$source_thumb && !$img_size) $source_image_url = false;
39           }
40           if($source_image_url) :
41         
42         ?>
43
44         <?php if($source_thumb) : ?>
45         <img src="<?php echo $this->path("content")."thumbs/".$source_thumb["thumb_file"] ?>"
46              width="<?php echo $source_thumb["thumb_width"] ?>"
47              height="<?php echo $source_thumb["thumb_height"] ?>"
48              alt="" />
49         <?php else : ?>
50         <img src="<?php echo $this->path("web").$source_image_url; ?>"
51              width="<?php echo $img_size["width"] ?>"
52              height="<?php echo $img_size["height"] ?>"
53              style="margin-top:<?php echo $margin_top ?>px"
54              alt="" />
55         <?php endif; ?>
56
57         <?php endif; ?>
58         <span><?php echo $groupe["nom"] ?></span>
59         <br class="clear" />
60       </a>
61     </h4>
62   </li>
63 <?php endforeach; ?>
64 </ul>
65 <div class="clear"><!-- --></div>
66 <?php $items = "groupes"; $legend = "groupes"; require $this->out_file("views/navig.php"); ?>
67
68 <?php endif; ?>