Ajout de la classe GaleriePhoto.
This commit is contained in:
parent
d6641477ba
commit
b2f6a1f46b
|
@ -4,6 +4,7 @@
|
|||
require_once("types/galerie.php");
|
||||
require_once("types/galerie-periode.php");
|
||||
require_once("types/galerie-evenement.php");
|
||||
require_once("types/galerie-photo.php");
|
||||
|
||||
$p = Page::_new("/modele/galerie");
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
require_once("controleur/page.php");
|
||||
|
||||
class GaleriePhoto extends Page {
|
||||
public function vue($nom_vue = "normal") {
|
||||
if ($nom_vue == "miniature") {
|
||||
return '<img src="' . $this->get_prop("image_mini") . '"/>';
|
||||
}
|
||||
|
||||
if ($nom_vue == "edition") {
|
||||
return '<a href="' . $this->url('nouveau') . '">Changer la photo</a>';
|
||||
}
|
||||
|
||||
return '<img src="' . $this->get_prop("image") . '"/>';
|
||||
}
|
||||
}
|
||||
|
||||
Page::ajouterType("GaleriePhoto", "GaleriePhoto");
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user