------------------------------------------------------------
revno: 950
committer: Jakub Jankiewicz <[email protected]>
branch nick: aikiframework
timestamp: Thu 2011-12-01 19:25:04 +0100
message:
Fix pagination
modified:
src/libs/widgets.php
--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk
Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'src/libs/widgets.php'
--- src/libs/widgets.php 2011-11-22 21:10:19 +0000
+++ src/libs/widgets.php 2011-12-01 18:25:04 +0000
@@ -482,7 +482,7 @@
$widgetContents = $this->parse_hits($widgetContents);
// insert pagination.
- if ( $pagination && strpos($widgetContents, "[no_pagination]") === false ){
+ if ( $pagination && strpos($widgetContents, "[no_pagination]") === false ) {
if (strpos($widgetContents, "[pagination]")) {
$widgetContents = str_replace(
"[pagination]",
@@ -692,9 +692,9 @@
* @todo the harcoded pagination must die
*/
$pagination .=
- "<div class='pagination'>" .
- "<span class='pagination_move_to_page'>" .
- "__move_to_page__</span><br />";
+ "<div class='pagination'>" .
+ "<span class='pagination_move_to_page'>" .
+ __("move to page") . "</span><br />";
if ($page) {
$previous =
@@ -704,8 +704,8 @@
* @todo more hardcoded pagination, must change!
*/
$pagination .=
- "<span class='pagination_previous'>" .
- "<a href=\"$previous\">__previous__</a></span>";
+ "<span class='pagination_previous'>" .
+ "<a href=\"$previous\">" . __("previous") . "</a></span>";
}
if ($group_pages)
@@ -738,7 +738,7 @@
$widget->link_example);
$pagination .=
"<span class='pagination_active'>" .
- "<a href=\"$next_link\">$i</a></span>";
+ " <a href=\"$next_link\">$i</a> </span>";
}
} // end of for loop
@@ -753,8 +753,8 @@
$next_link = str_replace("[page]", $i,
$widget->link_example);
$pagination .=
- "<span class='pagination_active'>" .
- "<a href=\"$next_link\">$i</a></span>";
+ "<span class='pagination_active'>" .
+ " <a href=\"$next_link\">$i</a> </span>";
}
}
}
@@ -763,27 +763,28 @@
$next = str_replace("[page]", $page + 2,
$widget->link_example);
$pagination .=
- "<span class='pagination_next'>".
- "<a href=\"$next\">__next__</a></span>";
+ "<span class='pagination_next'>".
+ "<a href=\"$next\">" . __("next") . "</a></span>";
}
if($page) {
$first_page = str_replace("[page]", '1',
$widget->link_example);
$pagination .=
- "<span class='pagination_first'>" .
- " <a href=\"$first_page\">__first_page__</a>" .
- "</span>";
+ "<span class='pagination_first'>" .
+ " <a href=\"$first_page\">" . __("first page") . "</a> " .
+ "</span>";
}
if( $page != ($numpages-2) )
{
$last_page = str_replace("[page]",
- $full_numb_of_pages -1, $widget->link_example);
+ $full_numb_of_pages -1,
+ $widget->link_example);
$pagination .=
- "<span class='pagination_last'>" .
- "<a href=\"$last_page\">__last_page__</a>" .
- "</span>";
+ "<span class='pagination_last'>" .
+ "<a href=\"$last_page\">" . __("last page") . "</a>" .
+ "</span>";
}
if (isset($next)) {
@@ -791,8 +792,8 @@
}
if (isset($previous)) {
- $pagination = str_replace("[previous]", $previous, $widgetContents);
- }
+ $pagination = str_replace("[previous]", $previous, $pagination);
+ }
$pagination .= "</div>";
return $pagination;
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp