Ajout de la classe GaleriePhoto.

This commit is contained in:
Georges Dupéron 2010-06-29 05:49:07 +02:00
parent d6641477ba
commit b2f6a1f46b
2 changed files with 22 additions and 0 deletions

View File

@ -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");

View File

@ -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");
?>