File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
src/Mouf/Html/Widgets/EvoluGrid Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 584584 }
585585 }
586586
587- $this . append ( pager ) ;
587+ if ( descriptor . paginationTop ) {
588+ $this . prepend ( pager ) ;
589+ }
590+ else {
591+ $this . append ( pager ) ;
592+ }
588593
589594 // Finally, let's enable buttons again:
590595 if ( descriptor . filterFormSubmitButton ) {
Original file line number Diff line number Diff line change @@ -153,6 +153,13 @@ class EvoluGrid implements HtmlElementInterface{
153153 */
154154 private $ countTarget ;
155155
156+ /**
157+ * If is the pagination to the top of the evolugrid
158+ *
159+ * @var bool
160+ */
161+ private $ paginationTop = false ;
162+
156163 /**
157164 * URL that will be called in Ajax and return the data to display.
158165 *
@@ -480,12 +487,35 @@ public function toHtml() {
480487 descriptor.onResultShown = ' .$ this ->onResultShown .';
481488 ' ;
482489 }
490+ if ($ this ->paginationTop !== null ) {
491+ echo '
492+ descriptor.paginationTop = ' .$ this ->paginationTop .';
493+ ' ;
494+ }
483495 echo '
484496 $("# ' .$ id .'").evolugrid(descriptor);
485497 });
486498 })(jQuery);
487499 </script>
488500 ' ;
489501 }
502+
503+ /**
504+ * return bool
505+ */
506+ public function getPaginationTop ()
507+ {
508+ return $ this ->paginationTop ;
509+ }
510+
511+ /**
512+ * If is the pagination is displayed to the top of the evolugrid
513+ * @param bool $paginationTop
514+ */
515+ public function setPaginationTop ($ paginationTop )
516+ {
517+ $ this ->paginationTop = $ paginationTop ;
518+ return $ this ;
519+ }
490520
491521}
You can’t perform that action at this time.
0 commit comments