Explorar el Código

Urls absolues depuis producer vers frontend

refactoring
keun hace 6 años
padre
commit
4e0619306b
Se han modificado 2 ficheros con 4 adiciones y 5 borrados
  1. +0
    -1
      frontend/views/site/index.php
  2. +4
    -4
      producer/views/layouts/main.php

+ 0
- 1
frontend/views/site/index.php Ver fichero

@@ -14,7 +14,6 @@ use common\helpers\Url ;

/* @var $this yii\web\View */
$this->setTitle('Bienvenue sur la boîte à pain') ;
$this->setSubtitle('Des outils numériques pour les circuits courts') ;
$this->setPageTitle('Plateforme de réservation de pain') ;

?>

+ 4
- 4
producer/views/layouts/main.php Ver fichero

@@ -38,12 +38,12 @@ $producer = $this->context->getProducer() ;
'items' => [
[
'label' => '<span class="glyphicon glyphicon-user"></span> Inscription',
'url' => Yii::$app->urlManagerFrontend->createUrl(['site/signup']),
'url' => Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/signup']),
'visible' => Yii::$app->user->isGuest
],
[
'label' => '<span class="glyphicon glyphicon-log-in"></span> Connexion',
'url' => Yii::$app->urlManagerFrontend->createUrl(['site/login','return_url' => Yii::$app->urlManager->createUrl(['producer/index'])]),
'url' => Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/login','return_url' => Yii::$app->urlManager->createAbsoluteUrl(['producer/index'])]),
'visible' => Yii::$app->user->isGuest
],
[
@@ -53,11 +53,11 @@ $producer = $this->context->getProducer() ;
'items' => [
[
'label' => 'Profil',
'url' => Url::frontend('user/update'),
'url' => Yii::$app->urlManagerFrontend->createAbsoluteUrl(['user/update']),
],
[
'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion',
'url' => Url::frontend('site/logout'),
'url' => Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/logout']),
]
],
'visible' => !Yii::$app->user->isGuest

Cargando…
Cancelar
Guardar