diff --git a/public/css/tissue.css b/public/css/tissue.css index e71b920..e7bd5e6 100644 --- a/public/css/tissue.css +++ b/public/css/tissue.css @@ -53,6 +53,13 @@ border-bottom: 1px solid rgba(0, 0, 0, .125); } +.tis-page-selector { + margin-left: -1px; + width: calc(100% + 2px); + border: 1px solid #dee2e6; + border-radius: 0; +} + @media (min-width: 992px) { .tis-sidebar-info { font-size: small; diff --git a/public/js/tissue.js b/public/js/tissue.js index dab7c34..fb200fe 100644 --- a/public/js/tissue.js +++ b/public/js/tissue.js @@ -46,4 +46,10 @@ }); }; + $.fn.pageSelector = function () { + return this.on('change', function () { + location.href = $(this).find(':selected').data('href'); + }); + }; + })(jQuery); \ No newline at end of file diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index ed8851f..97a4acb 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -160,6 +160,7 @@ @endguest $('[data-toggle="tooltip"]').tooltip(); $('.alert').alert(); + $('.tis-page-selector').pageSelector(); @if (session('status')) setTimeout(function () { $('#status').alert('close'); diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php index f661f12..0c5fbb3 100644 --- a/resources/views/vendor/pagination/default.blade.php +++ b/resources/views/vendor/pagination/default.blade.php @@ -42,7 +42,13 @@
  • @endif -
  • {{ $paginator->currentPage() }}
  • +
  • + +
  • @if ($paginator->hasMorePages())