Ver código fonte

Urls absolues depuis producer vers frontend

refactoring
keun 6 anos atrás
pai
commit
4e0619306b
2 arquivos alterados com 4 adições e 5 exclusões
  1. +0
    -1
      frontend/views/site/index.php
  2. +4
    -4
      producer/views/layouts/main.php

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

@@ -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 arquivo

@@ -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

Carregando…
Cancelar
Salvar