diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 4632b60d9..5b38a5623 100755 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -32,6 +32,7 @@ namespace App\Console; use function base_path; + use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; diff --git a/app/Helpers/Counter.php b/app/Helpers/Counter.php index c21627593..bc8dd99ae 100755 --- a/app/Helpers/Counter.php +++ b/app/Helpers/Counter.php @@ -34,6 +34,7 @@ use App\Models\CounterPage; use App\Models\CounterVisitor; use Carbon\Carbon; + use function config; use function env; use function hash; @@ -41,6 +42,7 @@ use Illuminate\Support\Facades\Cookie; use Illuminate\Support\Facades\DB; use Jaybizzle\CrawlerDetect\CrawlerDetect; + use function number_format; class Counter diff --git a/app/Http/Controllers/Page/PageController.php b/app/Http/Controllers/Page/PageController.php index bbaa7d08e..ca08f43f4 100644 --- a/app/Http/Controllers/Page/PageController.php +++ b/app/Http/Controllers/Page/PageController.php @@ -122,6 +122,13 @@ public function filterFeeds(Request $request) } $feeds = $feeds->sortByDesc('date')->take(config('setting.jumlah_artikel_desa') ?? 30)->paginate(config('setting.artikel_desa_perhalaman') ?? 10); + + // Tanggal + $tanggal = $request->tanggal; + if ($tanggal != 'Terlama') { + $feeds = $feeds->sortBy('date')->take(config('setting.jumlah_artikel_desa') ?? 30)->paginate(config('setting.artikel_desa_perhalaman') ?? 10); + } + $feeds->all(); $html = view('pages.berita.feeds', [ diff --git a/app/Http/Middleware/CustomForms.php b/app/Http/Middleware/CustomForms.php index d2d42bd90..7930addc0 100755 --- a/app/Http/Middleware/CustomForms.php +++ b/app/Http/Middleware/CustomForms.php @@ -32,10 +32,12 @@ namespace App\Http\Middleware; use function array_diff_key; + use Closure; use Form; use Illuminate\Http\Request; + use function session; use function sprintf; diff --git a/app/Http/Middleware/KDInstalled.php b/app/Http/Middleware/KDInstalled.php index 2baca7537..185a4e2a7 100755 --- a/app/Http/Middleware/KDInstalled.php +++ b/app/Http/Middleware/KDInstalled.php @@ -32,9 +32,11 @@ namespace App\Http\Middleware; use Closure; + use function file_exists; use Illuminate\Http\Request; + use function redirect; use function storage_path; diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 5e8c31e6e..81d60c7b2 100755 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -32,6 +32,7 @@ namespace App\Providers; use function base_path; + use Illuminate\Support\Facades\Broadcast; use Illuminate\Support\ServiceProvider; diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index fc63e1145..bf192f960 100755 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -32,6 +32,7 @@ namespace App\Providers; use function base_path; + use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Route; diff --git a/catatan_rilis.md b/catatan_rilis.md index 34ac486ab..b24a8af0e 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -1,6 +1,6 @@ -#### [v22.07.01] +#### [v22.08.01] -Di rilis v22.07.01, menyediakan Widget Sidebar Foto Camat Rilis ini juga berisi perbaikan lain yang diminta Komunitas OpenDK. +Di rilis v22.08.01, menyediakan Widget Sidebar Foto Camat Rilis ini juga berisi perbaikan lain yang diminta Komunitas OpenDK. Terima kasih pada totoprayogo1916 yang terus berkontribusi. Terima kasih pula pada vickyrolanda yang baru mulai berkontribusi. @@ -8,6 +8,7 @@ Terima kasih pada totoprayogo1916 yang terus berkontribusi. Terima kasih pula pa #### Penambahan Fitur 1. [#142](https://github.com/OpenSID/OpenDK/issues/142) Sediakan Widget Sidebar Foto Camat. +2. [#360](https://github.com/OpenSID/OpenDK/issues/360) Tampilkan berita desa yang berurutan berdasarkan tanggal penerbitan artikel. #### Perbaikan BUG diff --git a/resources/views/pages/berita/desa.blade.php b/resources/views/pages/berita/desa.blade.php index 0dbc2b81c..b45095e0d 100644 --- a/resources/views/pages/berita/desa.blade.php +++ b/resources/views/pages/berita/desa.blade.php @@ -113,24 +113,28 @@
- -
diff --git a/resources/views/pages/berita/feeds.blade.php b/resources/views/pages/berita/feeds.blade.php index c4fb6c224..f6aedcbf4 100644 --- a/resources/views/pages/berita/feeds.blade.php +++ b/resources/views/pages/berita/feeds.blade.php @@ -54,6 +54,9 @@ $( "#list_desa" ).change(function() { $( "#form_filter" ).submit(); }); + $( "#tanggal" ).change(function() { + $( "#form_filter" ).submit(); + }); $(document).on('click', '.pagination a', function(event){ event.preventDefault();