# HG changeset patch # User ymh # Date 1272641470 -7200 # Node ID a9dd18698c15f2070984eeac4327511235196703 # Parent 6c31428e26ab724f2b8331424c4f32745c29716b various corrections on screens. use predefined partials diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/backend/modules/film/actions/actions.class.php --- a/web/thdProject/apps/backend/modules/film/actions/actions.class.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/backend/modules/film/actions/actions.class.php Fri Apr 30 17:31:10 2010 +0200 @@ -68,8 +68,11 @@ "photo" ); + public function executeListGenerate(sfWebRequest $request) { + $WORD_LIST = array_flip($this->WORD_LIST); + // get all films $videos = Doctrine_Query::create() ->select("v.*") @@ -84,7 +87,7 @@ for($i=0;$i<10;$i++) { $nbtags = rand(3,5); - $tags = array_rand($this->WORD_LIST, $nbtags); + $tags = array_rand($WORD_LIST, $nbtags); $start = rand(0,3599); $end = rand($start,3600); $video->addSegment($start, $end, $tags, $userUid); diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/config/routing.yml --- a/web/thdProject/apps/frontend/config/routing.yml Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/config/routing.yml Fri Apr 30 17:31:10 2010 +0200 @@ -78,9 +78,9 @@ ######### searchReflex: - url: /reflex/:film_uniqueid/:tag/:direction/:distance - param: { module: reflex, action: index, tag: all, direction: more, distance: 5 } - requirements: { direction: more|less, distance: \d+ } + url: /reflex/:film_uniqueid/:distance/:tag + param: { module: reflex, action: index, tag: all, distance: 5 } +# requirements: { distance: '[+-]?\d+' } ########## # STATIC diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/partials/templates/_filmItem.php --- a/web/thdProject/apps/frontend/modules/partials/templates/_filmItem.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/partials/templates/_filmItem.php Fri Apr 30 17:31:10 2010 +0200 @@ -19,7 +19,7 @@ -
  • +
  • diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/reflex/actions/actions.class.php --- a/web/thdProject/apps/frontend/modules/reflex/actions/actions.class.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/reflex/actions/actions.class.php Fri Apr 30 17:31:10 2010 +0200 @@ -17,15 +17,13 @@ */ public function executeIndex(sfWebRequest $request) { - ///reflex/:film_uniqueid/:tag/:direction // Parse request parameters $format = $request->getRequestFormat(); $this->film_uniqueid = (string) $request->getParameter('film_uniqueid'); $this->tag = (string) $request->getParameter('tag'); - $this->direction = (string) $request->getParameter('direction'); $this->distance = (int)$request->getParameter('distance'); - $this->distance = $this->distance * ($this->direction=='more'?1.0:-1.0) / 100.0; + $this->distance = $this->distance / 100.0; $client = SonyengineClient::getInstance(); $results = $client->engineFind($this->film_uniqueid,$this->tag,$this->distance,true); @@ -82,7 +80,7 @@ $taggedfilms = array(); foreach($this->mostTaggedFilms as $film) { - if($this->film == null || $this->film.id != $film.id) { + if($this->film == null || $this->film->id != $film->id) { $taggedfilms[] = $film; } } diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/reflex/actions/components.class.php --- a/web/thdProject/apps/frontend/modules/reflex/actions/components.class.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/reflex/actions/components.class.php Fri Apr 30 17:31:10 2010 +0200 @@ -6,6 +6,7 @@ public function executeTagNavigator() { return sfView::SUCCESS; + } public function executePlayer() { diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/reflex/config/view.yml --- a/web/thdProject/apps/frontend/modules/reflex/config/view.yml Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/reflex/config/view.yml Fri Apr 30 17:31:10 2010 +0200 @@ -4,4 +4,5 @@ javascripts: [ /js/flowplayer/flowplayer-3.1.0.min.js, /js/flowplayer/uc.flowplayer.config.js] - \ No newline at end of file + components: + \ No newline at end of file diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/reflex/templates/indexSuccess.php --- a/web/thdProject/apps/frontend/modules/reflex/templates/indexSuccess.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/reflex/templates/indexSuccess.php Fri Apr 30 17:31:10 2010 +0200 @@ -5,6 +5,6 @@

    Résultats de la recherche reflexonomique

    $film, "tag"=>$tag)); ?> -

    Pas de résultats de la recherche reflexonomique pour le tag

    +

    Pas de résultats de la recherche reflexonomique pour le tag

    'all', 'filmCount' => '10', 'mostTaggedFilms' => $mostTaggedFilms, 'pageIndex' => $pageIndex, 'pageNbItems' => $pageNbItems, "tag"=>$tag)); ?> diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/search/templates/_selectedFilm.php --- a/web/thdProject/apps/frontend/modules/search/templates/_selectedFilm.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/search/templates/_selectedFilm.php Fri Apr 30 17:31:10 2010 +0200 @@ -1,106 +1,1 @@ - -
    -
    - getTitle(); ?>
    De getDirectorsArray(), 'name'); ?> -
    - -
    -
      -
    • - Tags liés au film : -
    • - getTagsArray() as $item) { - if($item){ - $tag = $item; - echo '
    • '.$tag.' -
    • '; - - } - } ?> - -
    -
    -
    -
    Tagger le film
    - + $film, 'size' => 'big')); ?> diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/tag/actions/components.class.php --- a/web/thdProject/apps/frontend/modules/tag/actions/components.class.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/tag/actions/components.class.php Fri Apr 30 17:31:10 2010 +0200 @@ -4,11 +4,7 @@ { public function executeTagNavigator() { - - if($this->film) - return sfView::SUCCESS; - else - return sfView::NONE; + return sfView::SUCCESS; } public function executePlayer() { diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/tag/actions/viewTagListAction.class.php --- a/web/thdProject/apps/frontend/modules/tag/actions/viewTagListAction.class.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/tag/actions/viewTagListAction.class.php Fri Apr 30 17:31:10 2010 +0200 @@ -6,7 +6,7 @@ // Parse request parameters $format = $request->getRequestFormat(); - $this->tag = (string) $request->getParameter('tag'); + $this->tag = (string) utf8_encode($request->getParameter('tag')); $pageNb = (int) $this->getRequestParameter('page_nb', 1); $this->pageIndex = $pageNb -1; $this->pageNbItems = 10; diff -r 6c31428e26ab -r a9dd18698c15 web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php --- a/web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php Fri Apr 30 12:13:18 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php Fri Apr 30 17:31:10 2010 +0200 @@ -1,5 +1,5 @@
    -

    Autre films associés au tag

    +

    Autre films associés au tag

    - -

    Pas de tags associés