path to videos
authorGautier Thibault <gthibault@universcine.com>
Wed, 14 Apr 2010 20:53:47 +0200
changeset 57 c05892376a6c
parent 56 a0ac75dbce2e
child 58 4e933452d538
path to videos
web/thdProject/apps/frontend/modules/editor/templates/_player.php
web/thdProject/apps/frontend/modules/tag/actions/components.class.php
web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php
web/thdProject/apps/frontend/modules/tag/templates/viewTagListSuccess.php
web/thdProject/lib/helper/ThdHtmlHelper.php
--- a/web/thdProject/apps/frontend/modules/editor/templates/_player.php	Wed Apr 14 19:32:52 2010 +0200
+++ b/web/thdProject/apps/frontend/modules/editor/templates/_player.php	Wed Apr 14 20:53:47 2010 +0200
@@ -2,7 +2,7 @@
     // Charge le player
     flowplayer("player", "<?php echo flash_path('flowplayer-3.1.2.swf') ?>",
                {
-                   clip: {url: "<?php echo video_path($filmVideo['file']); ?>",
+                   clip: {url: "<?php echo film_video_path($filmVideo['file']); ?>",
                           autoPlay: false,
                           autoBuffering: true,
                           onSeek: function() {
--- a/web/thdProject/apps/frontend/modules/tag/actions/components.class.php	Wed Apr 14 19:32:52 2010 +0200
+++ b/web/thdProject/apps/frontend/modules/tag/actions/components.class.php	Wed Apr 14 20:53:47 2010 +0200
@@ -27,17 +27,5 @@
   	return sfView::SUCCESS;
   }
 
-  public function executeSuggestionFilmList() {
-		$this->tag = Array('score' => 3);
-	  $query = Doctrine_Query::create()
-      ->from('ThdFilm F')
-      ->leftJoin('F.images I ')
-      ->leftJoin('F.videos V')
-      //->where("cu.code='{$culture}' AND mo.code='{$module}' AND ms.code='{$section}'")
-      ->orderBy('F.ref ASC')
-      ->limit(0,10);
-    $this->mostTaggedFilms = $query->execute();
-    $this->videoPath = sfConfig::get('app_player_videoPath');
-  }
-  
+ 
 }
\ No newline at end of file
--- a/web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php	Wed Apr 14 19:32:52 2010 +0200
+++ b/web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php	Wed Apr 14 20:53:47 2010 +0200
@@ -1,51 +1,14 @@
 <div id="suggestionFilm-list">
 	<h3 class="head">Les films suivants</h3>
 	<ul>
+	
 	<?php
 	foreach($mostTaggedFilms as $item):
-		$ref = $item->getRef();
-		$slug = $item->getSlugUrl();
-		$title = $item->getTitle();
-
-		// image file
-		$image_file = $item->getImages();
-		// image file
-		$video_file = $item->getVideos();
-
+		$tagFilmUri = url_for('@editor?ref='.$item->getRef().'&film_slug='.$item->getSlugUrl());
 	?>
 	<li>
-		<div id="playerMostTagged-<?php echo $ref; ?>" class="player-item" style="background:transparent url('<?php echo image_path('posters/'.$image_file[0]['file'].'.jpg'); ?>') no-repeat;" href="<?php echo video_path($video_file[0]['file']);?>">
-			<div class="infos">
-		    	<a href="<?php echo url_for('@editor?ref='.$ref.'&film_slug='.$slug); ?>" class="title"><?php echo $title; ?></a> <span class="film-infos">De <?php echo thd_render_flat_list($item->getDirectorsArray(), 'name'); ?></span>
-		    </div>
-		    <img src="<?php echo image_path('buttons/btn_play.png'); ?>"/ id="play"></a>
-		     <div class="tags">
-				<ul class="item-list tag-list">
-				<li><span class="head">
-			    <i>Tags liés au film :</i>
-				</span></li>
-				 <li class="tag-score-<?php echo $tag['score']; ?>">
-				    <a href="">anna</a>
-				  </li><li class="tag-score-5">
-				    <a href="">Jalousie</a>
-				  </li><li class="tag-score-3">
-				    <a href="">erotomanie</a>
-				  </li><li class="tag-score-2">
-				    <a href="">violence</a>
-				  </li>
-				  <li class="tag-score-<?php echo $tag['score']; ?>">
-				    <a href="">anna</a>
-				  </li><li class="tag-score-5">
-				    <a href="">Jalousie</a>
-				  </li><li class="tag-score-3">
-				    <a href="">erotomanie</a>
-				  </li><li class="tag-score-2">
-				    <a href="">violence</a>
-				  </li>
-				</ul>
-		    </div>
-		</div>
-		<div class="tag-action"><a href="<?php echo url_for('@editor?ref='.$ref.'&film_slug='.$slug); ?>" class="link-button">Tagger le film</a></div>
+		<?php include_component('partials', 'filmItem', Array('film' => $item, 'actionUri' => $tagFilmUri)); ?>
+		<div class="tag-action"><a href="<?php echo $tagFilmUri ?>" class="link-button">Tagger le film</a></div>
 	</li>
 	<?php endforeach; ?>
 	</ul>
--- a/web/thdProject/apps/frontend/modules/tag/templates/viewTagListSuccess.php	Wed Apr 14 19:32:52 2010 +0200
+++ b/web/thdProject/apps/frontend/modules/tag/templates/viewTagListSuccess.php	Wed Apr 14 20:53:47 2010 +0200
@@ -1,3 +1,3 @@
 <h3 class="head">Résultats pour : <i><?php echo $tag; ?></i></h3> 
 <?php include_component( "tag", "player" ) ?>	
-<?php include_component( "tag", "suggestionFilmList" ) ?>	
+<?php include_partial('tag/suggestionFilmList', array('filter' => 'all', 'filmCount' => '10', 'mostTaggedFilms' => $mostTaggedFilms, 'pageIndex' => $pageIndex, 'pageNbItems' => $pageNbItems)); ?>	
--- a/web/thdProject/lib/helper/ThdHtmlHelper.php	Wed Apr 14 19:32:52 2010 +0200
+++ b/web/thdProject/lib/helper/ThdHtmlHelper.php	Wed Apr 14 20:53:47 2010 +0200
@@ -102,8 +102,8 @@
 
   // Add forward actions
   if ($pageIndex < ($nbPages-1)) {
-    $itemsHtml[] = '<li class="forward"><a href="'.url_for($routeUri.''.($pageIndex+2)).'">&gt;&gt;</a></li>';
-    $itemsHtml[] = '<li class="forward-last"><a href="'.url_for($routeUri.''.$nbPages).'">&gt;</a></li>';
+    $itemsHtml[] = '<li class="forward"><a href="'.url_for($routeUri.''.($pageIndex+2)).'">&gt;</a></li>';
+    $itemsHtml[] = '<li class="forward-last"><a href="'.url_for($routeUri.''.$nbPages).'">&gt;&gt;</a></li>';
   } else {
     $itemsHtml[] = '<li class="forward disabled"><span>&gt;&gt;</span></li>';
     $itemsHtml[] = '<li class="forward-last disabled"><span>&gt;</span></li>';