integration jaudio-player
[mw_sourceml] / app / out / default / views / sources / source / header.php
1 <?php
2
3   if($source["reference"]){
4     $groupes = array();
5     foreach($source["reference"]["groupes"] as $groupe){
6       $groupes[] = array(
7         "nom" => $groupe["nom"],
8         "url" => $source["reference"] ? $source["reference"]["from"] : $source["url"]
9       );
10     }
11   }
12   else{
13     $groupes = $data->get_editor_groupes($source["reference"] ? $source["reference"]["groupes"] : $source["groupes"]);
14     foreach($groupes as $k => $groupe) $groupes[$k]["url"] = $this->url("sources/groupe/view", array("id" => $groupe["id"]));
15   }
16
17 ?>
18 <header>
19
20   <?php if($groupes) : ?>
21   <ul class="authors">
22     <?php foreach($groupes as $groupe) : ?>
23     <li><a class="auteur" href="<?php echo $groupe["url"] ?>"><?php echo $groupe["nom"] ?></a></li>
24     <?php endforeach; ?>
25   </ul>
26   <?php endif; ?>
27   <?php if(!isset($display_name) || $display_name) : ?>
28   <?php
29
30     $source_image_url = false;
31     if($source["reference"]){
32       if(
33            isset($source["reference"]["image"])
34         && $source["reference"]["image"]
35       ){
36         $source_image_url = $source["reference"]["image"];
37       }
38     }
39     else{
40       if
41       (    isset($source["image_uri"])
42         && $source["image_uri"]
43         && file_exists($source["image_uri"])
44       ){
45         $source_image_url = $source["image_uri"];
46       }
47     }
48     if($source_image_url){
49       $source_thumb = false;
50       if($data->mw_thumbs_activated()){
51         $source_thumb = $data->img_thumb(
52           $source_image_url,
53           100,
54           100,
55           $this->path("content")."thumbs",
56           array(255, 255, 255)
57         );
58       }
59     }
60
61   ?>
62   <?php if($source_image_url) : ?>
63   <p class="logo_source">
64     <a href="<?php echo $source["reference"] ? $source["reference"]["from"] : $source["url"] ?>">
65       <?php if($source_thumb) : ?>
66       <img src="<?php echo $this->path("content")."thumbs/".$source_thumb["thumb_file"] ?>"
67            width="<?php echo $source_thumb["thumb_width"] ?>"
68            height="<?php echo $source_thumb["thumb_height"] ?>"
69            alt="" />
70       <?php else : ?>
71       <img src="<?php echo $source_image_url ?>" style="width: 100px; height: auto" alt="" />
72       <?php endif; ?>
73     </a>
74   </p>
75   <?php endif; ?>
76   <h1<?php if($source_image_url): ?> class="with_image"<?php endif; ?>>
77     <?php if($source["reference"]) : ?>
78     <span>r&eacute;f&eacute;rence &raquo; <a href="<?php echo $source["reference"]["from"] ?>"><strong><?php echo $source["reference"]["titre"] ?></strong></a></span>
79     <?php else : ?>
80     <a href="<?php echo $source["url"] ?>"><?php echo $source["titre"] ?></a>
81     <?php endif; ?>
82     <?php if($source["derivations"]) : ?>
83     <br />
84     <span class="small">
85       d&eacute;rive de &raquo;
86       <?php $n = 0; foreach($source["derivations"] as $derivation) : ?>
87       <?php echo $n ? ", " : "" ?><a href="<?php echo $derivation["from"] ?>"><strong><?php echo $derivation["titre"] ?></strong></a>
88       <?php $n++; endforeach; ?>
89     </span>
90     <?php endif; ?>
91   </h1>
92   <?php endif; ?>
93
94   <br class="clear" />
95
96 </header>