From 43bcf835ebe883d3ba2e9bf23b7ca3d2bb215e9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 4 Jun 2013 19:04:50 +0200 Subject: [PATCH] =?utf8?q?M=C3=B6glichkeit=20die=20Paginating=20Links=20au?= =?utf8?q?f=20ein=20DOM=20Element=20zu=20senden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Template/Plugin/L.pm | 3 ++- templates/webpages/common/paginate.html | 24 +++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 3e157a366..ff507d107 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -468,7 +468,7 @@ sub sortable_table_header { } sub paginate_controls { - my ($self) = @_; + my ($self, %params) = _hashify(1, @_); my $controller = $self->{CONTEXT}->stash->get('SELF'); my $paginate_spec = $controller->get_paginate_spec; @@ -483,6 +483,7 @@ sub paginate_controls { return $controller->get_callback(%url_params); }, + %params, ); return SL::Presenter->get->render('common/paginate', %template_params); diff --git a/templates/webpages/common/paginate.html b/templates/webpages/common/paginate.html index c833904b8..28cd8ca2a 100644 --- a/templates/webpages/common/paginate.html +++ b/templates/webpages/common/paginate.html @@ -8,11 +8,29 @@ [%- END %] [%- IF pages.max > 1 %]
-[%- IF pages.page > 1 %]« [% 'prev' | $T8 %] [% ELSE %]« [% END %] +[%- IF pages.page > 1 %]« [% 'prev' | $T8 %] [% ELSE %]« [% END %] [%- FOR p = pages.common %] [%- NEXT UNLESS p.visible %] - [%- IF p.active %][% p.page %] [% ELSE %][% p.page %] [%- END %] + [%- IF p.active %][% p.page %] [% ELSE %][% p.page %] [%- END %] [%- END %] -[%- IF pages.page < pages.max %][% 'next' | $T8 %] »[% ELSE %]»[%- END %] +[%- IF pages.page < pages.max %][% 'next' | $T8 %] »[% ELSE %]»[%- END %]
[%- END %] +[%- IF target %] + +[%- END %] -- 2.20.1