[ticket/418] Correctly assign pagination in compact news and announcements
The repsonsiveness of those two blocks has also been improved. B3P-418
This commit is contained in:
@@ -350,7 +350,7 @@ class announcements extends module_base
|
||||
'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false,
|
||||
));
|
||||
|
||||
$this->pagination->generate_template_pagination($view_topic_url, 'announcements.center_row.pagination', 'ap_' . $module_id, $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true);
|
||||
$this->pagination->generate_template_pagination($view_topic_url, 'announcements.center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true);
|
||||
|
||||
if(!empty($fetch_news[$i]['attachments']))
|
||||
{
|
||||
|
||||
@@ -309,8 +309,6 @@ class news extends module_base
|
||||
// Grab icons
|
||||
$icons = $this->cache->obtain_icons();
|
||||
|
||||
$this->pagination->generate_template_pagination($view_topic_url, 'pagination', 'np_' . $module_id, $fetch_news[$i]['topic_replies'], $this->config['board3_number_of_news_' . $module_id], $start);
|
||||
|
||||
$this->template->assign_block_vars('news.news_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $this->config['allow_attachments']) ? $this->user->img('icon_topic_attach', $this->user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'FORUM_NAME' => ($forum_id) ? $fetch_news[$i]['forum_name'] : '',
|
||||
@@ -348,6 +346,9 @@ class news extends module_base
|
||||
'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false,
|
||||
));
|
||||
|
||||
// Assign pagination
|
||||
$this->pagination->generate_template_pagination($view_topic_url, 'news.news_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1);
|
||||
|
||||
if(!empty($fetch_news[$i]['attachments']))
|
||||
{
|
||||
foreach ($fetch_news[$i]['attachments'] as $attachment)
|
||||
|
||||
@@ -32,7 +32,20 @@
|
||||
<!-- IF announcements.center_row.S_POLL --><strong>{L_VIEW_TOPIC_POLL}</strong><!-- ENDIF -->
|
||||
<a href="{announcements.center_row.U_VIEW_COMMENTS}" title="{announcements.center_row.TITLE}" class="topictitle">{announcements.center_row.TITLE}</a>
|
||||
<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> • <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> • <!-- ENDIF -->
|
||||
<!-- IF announcements.center_row.PAGINATION --><strong class="pagination"><span>{announcements.center_row.PAGINATION}</span></strong><!-- ENDIF -->
|
||||
<!-- IF announcements.center_row.pagination -->
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<!-- BEGIN pagination -->
|
||||
<!-- IF announcements.center_row.pagination.S_IS_PREV -->
|
||||
<!-- ELSEIF announcements.center_row.pagination.S_IS_CURRENT --><li><a href="{announcements.center_row.pagination.PAGE_URL}">{announcements.center_row.pagination.PAGE_NUMBER}</a></li>
|
||||
<!-- ELSEIF announcements.center_row.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
|
||||
<!-- ELSEIF announcements.center_row.pagination.S_IS_NEXT -->
|
||||
<!-- ELSE --><li><a href="{announcements.center_row.pagination.PAGE_URL}">{announcements.center_row.pagination.PAGE_NUMBER}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- END pagination -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<br />{L_POSTED} {L_POST_BY_AUTHOR} {announcements.center_row.POSTER_FULL} » {announcements.center_row.TIME}
|
||||
<!-- IF announcements.center_row.FORUM_NAME -->
|
||||
<br />{L_FORUM}{L_COLON} <a href="{announcements.center_row.U_VIEWFORUM}" class="portal-forumtitle">{announcements.center_row.FORUM_NAME}</a>
|
||||
|
||||
@@ -30,16 +30,17 @@
|
||||
<div class="list-inner">
|
||||
<!-- IF news.news_row.ATTACH_ICON_IMG -->{news.news_row.ATTACH_ICON_IMG} <!-- ENDIF -->
|
||||
<a href="{news.news_row.U_VIEW_COMMENTS}" title="{news.news_row.TITLE}" class="topictitle">{news.news_row.TITLE}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> • <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> • <!-- ENDIF -->
|
||||
<!-- IF news.news_row.PAGINATION -->
|
||||
<!-- IF news.news_row.pagination -->
|
||||
<div class="pagination">
|
||||
<ul><!-- BEGIN pagination -->
|
||||
<ul>
|
||||
<!-- BEGIN pagination -->
|
||||
<!-- IF news.news_row.pagination.S_IS_PREV -->
|
||||
<!-- ELSEIF news.news_row.pagination.S_IS_CURRENT --><li class="active"><span>{news.news_row.pagination.PAGE_NUMBER}</span></li>
|
||||
<!-- ELSEIF news.news_row.pagination.S_IS_CURRENT --><li><a href="{news.news_row.pagination.PAGE_URL}">{news.news_row.pagination.PAGE_NUMBER}</a></li>
|
||||
<!-- ELSEIF news.news_row.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
|
||||
<!-- ELSEIF news.news_row.pagination.S_IS_NEXT -->
|
||||
<!-- ELSE --><li><a href="{news.news_row.pagination.PAGE_URL}">{news.news_row.pagination.PAGE_NUMBER}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- END pagination --->
|
||||
<!-- END pagination -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
dt#a { width: 125% !important; }
|
||||
.responsive-portal-announcements dt { width: 125% !important; }
|
||||
.responsive-portal-announcements dt { width: 130% !important; }
|
||||
dd.responsive-portal-news { display: none !important; }
|
||||
|
||||
.responsive-portal-news dd.posts, .responsive-portal-news dd.views {
|
||||
@@ -32,6 +32,7 @@
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
.responsive-portal-news dt { width: 100% !important; }
|
||||
.responsive-portal-announcements dt { width: 100% !important; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
|
||||
|
||||
Reference in New Issue
Block a user