Přesměrování po přihlášení/odhlášení.
parent
5c4e87af7c
commit
d5f795816b
|
|
@ -59,7 +59,7 @@
|
||||||
<a class='nav-link' n:href=":Sign:out">Odhlásit</a>
|
<a class='nav-link' n:href=":Sign:out">Odhlásit</a>
|
||||||
{else}
|
{else}
|
||||||
<a class='nav-link' n:href=':Home:'>Home</a>
|
<a class='nav-link' n:href=':Home:'>Home</a>
|
||||||
<a class='nav-link' n:href=':Sign:in'>Přihlásit</a>
|
<a class='nav-link' n:href=":Sign:in, backlink: (isset($navrat) ? $navrat : '')">Přihlásit</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ final class HomePresenter extends Nette\Application\UI\Presenter
|
||||||
|
|
||||||
public function beforeRender(): void
|
public function beforeRender(): void
|
||||||
{
|
{
|
||||||
|
if (!$this->getUser()->isLoggedIn()) {
|
||||||
|
$this->template->navrat = $this->storeRequest();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderDefault(int $obvod = null): void
|
public function renderDefault(int $obvod = null): void
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,13 @@ final class MapaPresenter extends Nette\Application\UI\Presenter
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function beforeRender(): void
|
||||||
|
{
|
||||||
|
if (!$this->getUser()->isLoggedIn()) {
|
||||||
|
$this->template->navrat = $this->storeRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function actionDefault(?int $obvod = null, ?string $filtr = null): void
|
public function actionDefault(?int $obvod = null, ?string $filtr = null): void
|
||||||
{
|
{
|
||||||
if (!$this->getUser()->isLoggedIn() && $filtr !== null && $filtr !== 'obvody') {
|
if (!$this->getUser()->isLoggedIn() && $filtr !== null && $filtr !== 'obvody') {
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,5 @@
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css" />
|
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css" />
|
||||||
<script src="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster.js"></script>
|
<script src="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster.js"></script>
|
||||||
<script type="application/json" id="stari-data">{$stariJson|noescape}</script>
|
<script type="application/json" id="stari-data">{$stariJson|noescape}</script>
|
||||||
<script src="{$basePath}/js/stari.js?v=10"></script>
|
<script src="{$basePath}/js/stari.js?v=12"></script>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ final class SignPresenter extends Nette\Application\UI\Presenter
|
||||||
|
|
||||||
public function renderIn(): void
|
public function renderIn(): void
|
||||||
{
|
{
|
||||||
|
$this->template->navrat = $this->backlink;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -76,6 +77,6 @@ final class SignPresenter extends Nette\Application\UI\Presenter
|
||||||
{
|
{
|
||||||
$this->getUser()->logout();
|
$this->getUser()->logout();
|
||||||
$this->flashMessage('Odhlášení bylo úspěšné.');
|
$this->flashMessage('Odhlášení bylo úspěšné.');
|
||||||
$this->redirect('Sign:in');
|
$this->redirect(':Home:');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
var SEDA = '#9e9e9e';
|
var SEDA = '#9e9e9e';
|
||||||
var SEDA_HRANICE = '#616161';
|
var SEDA_HRANICE = '#616161';
|
||||||
var MODRA = '#2652a8';
|
var MODRA = '#2652a8';
|
||||||
var MODRA_PLOCHA = '#5c8fd6';
|
var MODRA_PLOCHA = '#c5ddf6';
|
||||||
|
|
||||||
function mix(a, b, t) {
|
function mix(a, b, t) {
|
||||||
return [
|
return [
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
color: '#1d4f91',
|
color: '#1d4f91',
|
||||||
weight: 2,
|
weight: 2,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
fillOpacity: 0.4,
|
fillOpacity: 0.28,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (rezim === 'nedokoncene') {
|
if (rezim === 'nedokoncene') {
|
||||||
|
|
@ -542,6 +542,9 @@
|
||||||
mouseout: function (e) {
|
mouseout: function (e) {
|
||||||
geojson.resetStyle(e.target);
|
geojson.resetStyle(e.target);
|
||||||
},
|
},
|
||||||
|
click: function (e) {
|
||||||
|
map.fitBounds(e.target.getBounds(), { padding: [24, 24] });
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue