sourceml devient un plugin mtweb
[mw_sourceml] / app / out / default / views / sources / source / metas.php
1 <?php
2
3   $sml_helper_out = $this->helper("mw_helper_sourceml_out");
4
5   $metas =
6   ( $source["reference"] ?
7       array
8       ( "licence_name" => isset($source["reference"]["licence"]["nom"]) ? $source["reference"]["licence"]["nom"] : "",
9         "licence_url" => isset($source["reference"]["licence"]["url"]) ? $source["reference"]["licence"]["url"] : "",
10         "date_creation" => $source["reference"]["date_creation"],
11         "xml_url" => $source["reference"]["xml"]["url"]
12       )
13     : array
14       ( "licence_name" =>
15         ( isset($source["licence"]["id"]) && isset($this->out["licences"]["list"][$source["licence"]["id"]]) ?
16             $this->out["licences"]["list"][$source["licence"]["id"]]["nom"]
17           : ""
18         ),
19         "licence_url" =>
20         ( isset($source["licence"]["id"]) && isset($this->out["licences"]["list"][$source["licence"]["id"]]) ?
21             $this->out["licences"]["list"][$source["licence"]["id"]]["url"]
22           : ""
23         ),
24         "date_creation" => $source["date_creation"],
25         "xml_url" => $data->source_xml_url($source["id"])
26       )
27   );
28
29 ?>
30
31   <div class="licence">
32   <?php if($metas["licence_name"] && $metas["licence_url"]) : ?>
33     <a href="<?php echo $metas["licence_url"] ?>"><?php echo $metas["licence_name"] ?></a>
34     <br />
35   <?php endif; ?>
36     <?php echo $sml_helper_out->aff_date($metas["date_creation"]) ?><br />
37     xml &raquo;
38       <a href="<?php echo $metas["xml_url"] ?>">url</a>
39     | <a id="show_xml_<?php echo $source["id"] ?>" href="<?php echo $this->url("content/sources/xml", array("id" => $source["id"])) ?>">voir</a>
40     <script type="text/javascript">set_show_xml_links(<?php echo $source["id"] ?>)</script>
41   </div>