# HG changeset patch # User Gautier Thibault # Date 1271781024 -7200 # Node ID b1bc73ec3bccac263c435fcf7dbae3640e8d78f5 # Parent 77de272658332ca95f03ef52c6312d071dd91372 update search module diff -r 77de27265833 -r b1bc73ec3bcc web/thdProject/apps/frontend/modules/search/actions/components.class.php --- a/web/thdProject/apps/frontend/modules/search/actions/components.class.php Tue Apr 20 17:30:13 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/search/actions/components.class.php Tue Apr 20 18:30:24 2010 +0200 @@ -7,7 +7,31 @@ } public function executeSelectedFilm() { - + // Get image filename + $images = $this->film->getImages(); + $this->imageFilename = null; + + if ($images) { + $image = $images[0]; + $this->imageFilename = $image->getFile(); + } + + // Get Tags + $tags = $this->film->getTagsArray(); + $this->tagList = null; + if ($tags) { + $this->tagList = $tags; + } + + + // Get video filename + $videos = $this->film->getVideos(); + $this->videoFilename = null; + + if ($videos) { + $video = $videos[0]; + $this->videoFilename = $video->getFile(); + } } diff -r 77de27265833 -r b1bc73ec3bcc web/thdProject/apps/frontend/modules/search/actions/viewSearchListAction.class.php --- a/web/thdProject/apps/frontend/modules/search/actions/viewSearchListAction.class.php Tue Apr 20 17:30:13 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/search/actions/viewSearchListAction.class.php Tue Apr 20 18:30:24 2010 +0200 @@ -9,7 +9,7 @@ $this->filter = (string) $request->getParameter('filter', 'all'); $pageNb = (int) $this->getRequestParameter('page_nb', 1); $this->pageIndex = $pageNb -1; - $this->pageNbItems = 10; + $this->pageNbItems = 11; $this->indexNbItems = 2; $this->videoPath = sfConfig::get('app_player_videoPath'); @@ -26,7 +26,9 @@ if(!empty($primaryKeys)) { - $this->searchFilms = Doctrine::getTable('ThdFilm')->findByScoredId($primaryKeys); + + $this->searchFilms = Doctrine::getTable('ThdFilm')->findByScoredId($primaryKeys); + $this->selectedFilm = $this->searchFilms->getFirst(); } else { diff -r 77de27265833 -r b1bc73ec3bcc web/thdProject/apps/frontend/modules/search/templates/_searchList.php --- a/web/thdProject/apps/frontend/modules/search/templates/_searchList.php Tue Apr 20 17:30:13 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/search/templates/_searchList.php Tue Apr 20 18:30:24 2010 +0200 @@ -2,12 +2,15 @@ \ No newline at end of file diff -r 77de27265833 -r b1bc73ec3bcc web/thdProject/apps/frontend/modules/search/templates/_selectedFilm.php --- a/web/thdProject/apps/frontend/modules/search/templates/_selectedFilm.php Tue Apr 20 17:30:13 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/search/templates/_selectedFilm.php Tue Apr 20 18:30:24 2010 +0200 @@ -1,64 +1,106 @@ -
- -
-
- Anna M
De Michel Spinosa -
-
- -
-
- - Tags liés au film : - - -
-
- -
\ No newline at end of file + +
+
+ getTitle(); ?>
De getDirectorsArray(), 'name'); ?> +
+ +
+
    +
  • + Tags liés au film : +
  • + getTagsArray() as $item) { + if($item){ + $tag = $item; + echo '
  • '.$tag.' +
  • '; + + } + } ?> + +
+
+
+
Tagger le film
+ diff -r 77de27265833 -r b1bc73ec3bcc web/thdProject/apps/frontend/modules/search/templates/viewSearchListSuccess.php --- a/web/thdProject/apps/frontend/modules/search/templates/viewSearchListSuccess.php Tue Apr 20 17:30:13 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/search/templates/viewSearchListSuccess.php Tue Apr 20 18:30:24 2010 +0200 @@ -1,4 +1,7 @@ +getRef().'&film_slug='.$selectedFilm->getSlugUrl()); +?>

Résultats pour :

- - 'all', 'filmCount' => '10', 'searchFilms' => $searchFilms, 'pageIndex' => $pageIndex, 'pageNbItems' => $pageNbItems)); ?> + $selectedFilm, 'actionUri' => $tagFilmUri)) ?> + $selectedFilm, 'filter' => 'all', 'filmCount' => '10', 'searchFilms' => $searchFilms, 'pageIndex' => $pageIndex, 'pageNbItems' => $pageNbItems)); ?>