Skip to content

Commit

Permalink
[wiki:sfSimpleForumPlugin] Added link to last page for multi-pages to…
Browse files Browse the repository at this point in the history
…pics
  • Loading branch information
francois committed Sep 27, 2007
1 parent 74571cd commit 8a1abf5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,5 +1,6 @@
== Trunk ==

* francois: Added link to last page for multi-pages topics
* francois: Refactored actions class for easier custom templating
* francois: Fixed topic feed
* francois: Added a topic list (for all forums, for one user) and related feeds
Expand Down
8 changes: 8 additions & 0 deletions modules/sfSimpleForum/templates/_topic.php
Expand Up @@ -28,6 +28,14 @@
'sfSimpleForum/topic?id='.$topic->getId().'&stripped_title='.$topic->getStrippedTitle(),
array('class' => $topic->getIsNew() ? 'new' : '')) ?>

<?php $pages = ceil(($topic->getNbPosts()) / sfConfig::get('app_sfSimpleForumPlugin_max_per_page', 10)) ?>
<?php if ($pages > 1): ?>
<?php echo link_to(
'(last page)',
'sfSimpleForum/topic?id='.$topic->getId().'&stripped_title='.$topic->getStrippedTitle().'&page='.$pages
) ?>
<?php endif; ?>

<?php if ($include_forum): ?>
in <?php echo link_to(
$topic->getsfSimpleForumForum()->getName(),
Expand Down

0 comments on commit 8a1abf5

Please sign in to comment.