[Isocial-svn] SF.net SVN: isocial: [221]
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <fsn...@us...> - 2008-05-25 11:58:22
|
Revision: 221 http://isocial.svn.sourceforge.net/isocial/?rev=221&view=rev Author: fsnobody Date: 2008-05-25 04:58:30 -0700 (Sun, 25 May 2008) Log Message: ----------- paginator photo v1 Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/views/photoapp/album/view.tpl Added Paths: ----------- public/images/uploaded/ Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-25 10:46:46 UTC (rev 220) +++ app/controllers/photoapp/album_controller.php 2008-05-25 11:58:30 UTC (rev 221) @@ -22,7 +22,19 @@ if (!empty($this->params['id']) && $this->PhotoappAlbum->find($this->params['id'])) { $this->album = $this->PhotoappAlbum->find($this->params['id']); } - $this->photos = $this->PhotoappPhoto->find('all', array('conditions' => array("album_id =" . $this->params['id']))); + //$this->photos = $this->PhotoappPhoto->find('all', array('conditions' => array("album_id =" . $this->params['id']))); + + + + $_filter_pagination = array('items_per_page' => 15, 'count_conditions' => "album_id =" . $this->params['id'] ); + + $this->photo_pages = $this->pagination_helper->getPaginator($this->PhotoappPhoto, $_filter_pagination);// paginator + + $_filter = array('conditions' => "album_id =" . $this->params['id']); + $options = array_merge($_filter, $this->pagination_helper->getFindOptions($this->PhotoappPhoto)); + + $this->photos = $this->PhotoappPhoto->find('all', $options); + return; } Modified: app/views/photoapp/album/view.tpl =================================================================== --- app/views/photoapp/album/view.tpl 2008-05-25 10:46:46 UTC (rev 220) +++ app/views/photoapp/album/view.tpl 2008-05-25 11:58:30 UTC (rev 221) @@ -30,6 +30,13 @@ {end} + {?photo_pages.links} + <div class="clearfix"></div> + <span><?php echo translate('Showing page %page of %number_of_pages',array('%page'=>$photo_pages->getCurrentPage(),'%number_of_pages'=>$photo_pages->pages))?></span> + <div>{photo_pages.links?}</div> + + {end} + </div> <div class="clearfix"></div> <? }?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |