1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-30 09:18:09 +02:00

Fixed: pagination won't show up, if forum topic has e.g 21 posts and the posts/page limit is set to 20.

This commit is contained in:
Lóna Lore 2015-12-18 09:25:12 +01:00
parent 146e74d1fe
commit d93d27a0c2
3 changed files with 24 additions and 12 deletions

View File

@ -42,9 +42,9 @@ $NEXTPREV_TEMPLATE['default_separator'] = ' ';
/* ****************** Default when Bootstrap is enabled ************** */
$NEXTPREV_TEMPLATE['bootstrap_start'] = "<!-- Start of Next/Prev -->\n<div class='pagination'>\n<ul class='pagination'>";
$NEXTPREV_TEMPLATE['bootstrap_end'] = "</ul></div><!-- End of Next/Prev -->";
$NEXTPREV_TEMPLATE['bootstrap_nav_caption'] = '';
$NEXTPREV_TEMPLATE['bootstrap_start'] = "<!-- Start of Next/Prev -->\n<nav>\n<ul class='pagination'>";
$NEXTPREV_TEMPLATE['bootstrap_end'] = "</ul></nav><!-- End of Next/Prev -->";
$NEXTPREV_TEMPLATE['bootstrap_nav_caption'] = '';
$NEXTPREV_TEMPLATE['bootstrap_nav_first'] = '<li><a class="first hidden-xs" href="{url}" title="{url_label}">{label}</a></li>';
$NEXTPREV_TEMPLATE['bootstrap_nav_prev'] = '<li><a class="prev" href="{url}" title="{url_label}">{label}</a></li>';

View File

@ -734,7 +734,7 @@ class e107ForumThread
exit;
}
$totalPosts = $this->threadInfo['thread_total_replies']; // + 1; // add 1 for the original post . ie. not a reply.
$totalPosts = $this->threadInfo['thread_total_replies'] + 1; // add +1 for the original post. ie. not a reply.
$this->pages = ceil(($totalPosts) / $this->perPage);
$this->noInc = false;
}

View File

@ -386,15 +386,27 @@ $FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
";
$FORUM_VIEWTOPIC_TEMPLATE['end'] = "</ul>
<div class='row row-fluid clearfix'>
<div class='col-xs-12'><hr /></div>
<div class='col-md-3 span3 pull-left'>{GOTOPAGES}</div>
<div class='col-xs-12 col-md-6 text-center span6 center'>{QUICKREPLY}</div>
<div class='col-xs-12 col-md-3 span3 pull-right right '>{BUTTONSX}</div>
<div class='col-xs-12'>
<hr />
</div>
<div class='row'>
<div class='col-xs-12 col-md-4'></div>
<div class='col-xs-12 col-md-4 text-center'>
{GOTOPAGES}
</div>
{THREADSTATUS}
";
<div class='col-xs-12 col-md-4'>
<div class='pull-right'>
{BUTTONSX}
</div>
</div>
</div>
<div class='row'>
<div class='col-xs-12 col-md-6 col-md-offset-3'>
{QUICKREPLY}
</div>
</div>
{THREADSTATUS}
";