# HG changeset patch # User clebeaupin # Date 1272458209 -7200 # Node ID 4ddb2636237b89aefd9e2e5635dd630540b3f71b # Parent 315aef7270fcfef4364c0290edd3221728021e1c Add my tags, Fix js on IE, List segments on player diff -r 315aef7270fc -r 4ddb2636237b web/thdProject/apps/frontend/config/routing.yml --- a/web/thdProject/apps/frontend/config/routing.yml Wed Apr 28 14:00:37 2010 +0200 +++ b/web/thdProject/apps/frontend/config/routing.yml Wed Apr 28 14:36:49 2010 +0200 @@ -3,6 +3,10 @@ url: / param: { module: homepage, action: index } +######## +# ACCOUNT +######## + loginUser: url: /connexion param: { module: account, action: loginUser} @@ -14,6 +18,10 @@ openidLogin: url: /open-id/connexion param: { module: account, action: openidLogin} + +viewMyTagList: + url: /mes-tags + param: { module: account, action: viewMyTagList} ######## #SEGMENT EDITOR @@ -28,8 +36,8 @@ param: { module: editor, action: editVideoSegment } segmentListJson: - url: /editeur/:film_slug/list-segment - param: { module: editor, action: segmentListJson} + url: /editeur/:film_slug/segments + param: { module: editor, action: viewVideoSegmentList } requirements: {ref: \d+} diff -r 315aef7270fc -r 4ddb2636237b web/thdProject/apps/frontend/modules/account/actions/viewMyTagListAction.class.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/account/actions/viewMyTagListAction.class.php Wed Apr 28 14:36:49 2010 +0200 @@ -0,0 +1,28 @@ +getRequestParameter('page_nb', 1); + $this->pageIndex = $pageNb -1; + $this->pageNbItems = 10; + $this->routeUri = '@viewMyTagList'; + + // Initialize query + $query = Doctrine_Query::create() + ->from('ThdFilm F') + ->leftJoin('F.videos V') + ->leftJoin('V.segments S') + ->leftJoin('S.ThdUser U') + ->where("U.uniqueid = '{$this->getUser()->getUid()}'") + ->orderBy('S.creation_date DESC'); + $this->itemCount = $query->count(); + $this->pageCount = (int) ceil($this->itemCount/$this->pageNbItems); + $this->films = $query->offset($this->pageIndex*$this->pageNbItems)->limit($this->pageNbItems)->execute(); + + if ($this->pageIndex*$this->pageNbItems > $this->itemCount) { + $this->forward404(); + } + } +} \ No newline at end of file diff -r 315aef7270fc -r 4ddb2636237b web/thdProject/apps/frontend/modules/account/config/view.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/account/config/view.yml Wed Apr 28 14:36:49 2010 +0200 @@ -0,0 +1,4 @@ +viewMyTagListSuccess: + components: + sideBar: [ homepage, sideBar ] + diff -r 315aef7270fc -r 4ddb2636237b web/thdProject/apps/frontend/modules/account/templates/loginUserForm.php --- a/web/thdProject/apps/frontend/modules/account/templates/loginUserForm.php Wed Apr 28 14:00:37 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/account/templates/loginUserForm.php Wed Apr 28 14:36:49 2010 +0200 @@ -1,5 +1,5 @@