chg: [navigation] Navigation's actions now relies on modal instead of redirecting to the page

pull/93/head
Sami Mokaddem 2021-11-08 15:56:39 +01:00
parent d045f1f4d5
commit f62caa919b
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ use Cake\Utility\Inflector;
use Cake\Utility\Text;
use Cake\View\ViewBuilder;
use Cake\ORM\TableRegistry;
use Cake\Routing\Router;
use Cake\Http\Exception\MethodNotAllowedException;
use Cake\Http\Exception\NotFoundException;

View File

@ -72,8 +72,8 @@ if (!empty($breadcrumb)) {
$actionEntry['url'] = $this->DataFromPath->buildStringFromDataPath($actionEntry['url'], $entity, $actionEntry['url_vars']);
}
$breadcrumbAction .= sprintf(
'<a class="dropdown-item" href="%s"><i class="me-1 %s"></i>%s</a>',
Router::url($actionEntry['url']),
'<a class="dropdown-item" href="#" onclick="%s"><i class="me-1 %s"></i>%s</a>',
sprintf('UI.overlayUntilResolve(this, UI.submissionModalAutoGuess(\'%s\'))', h(Router::url($actionEntry['url']))),
!empty($actionEntry['icon']) ? $this->FontAwesome->getClass(h($actionEntry['icon'])) : '',
h($actionEntry['label'])
);