chg: [dashboard redirects] to individual models now sort by modified by default
- the dashboard shows new entries, it only makes sense to sort the list based on changes - also a small fix to not sanitise the index URLs as this will lead to multiple query parameters not workingperm_community_admin
parent
75f55f5368
commit
1e7a1a5f3e
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Cake\ORM\TableRegistry;
|
use Cake\ORM\TableRegistry;
|
||||||
|
use Cake\Routing\Router;
|
||||||
|
|
||||||
$bookmarks = !empty($loggedUser->user_settings_by_name['ui.bookmarks']['value']) ? json_decode($loggedUser->user_settings_by_name['ui.bookmarks']['value'], true) : [];
|
$bookmarks = !empty($loggedUser->user_settings_by_name['ui.bookmarks']['value']) ? json_decode($loggedUser->user_settings_by_name['ui.bookmarks']['value'], true) : [];
|
||||||
$this->userSettingsTable = TableRegistry::getTableLocator()->get('UserSettings');
|
$this->userSettingsTable = TableRegistry::getTableLocator()->get('UserSettings');
|
||||||
|
@ -49,9 +50,10 @@ $this->userSettingsTable = TableRegistry::getTableLocator()->get('UserSettings')
|
||||||
$modelForDisplay = $exploded[count($exploded) - 1];
|
$modelForDisplay = $exploded[count($exploded) - 1];
|
||||||
$panelTitle = $this->Html->link(
|
$panelTitle = $this->Html->link(
|
||||||
h($modelForDisplay),
|
h($modelForDisplay),
|
||||||
$this->Url->build([
|
Router::url([
|
||||||
'controller' => $modelForDisplay,
|
'controller' => $modelForDisplay,
|
||||||
'action' => 'index',
|
'action' => 'index',
|
||||||
|
'?' => ['sort' => 'modified', 'direction' => 'desc']
|
||||||
]),
|
]),
|
||||||
['class' => 'text-white text-decoration-none fw-light stretched-link']
|
['class' => 'text-white text-decoration-none fw-light stretched-link']
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue