Kaynağa Gözat

[Administration] Utilisateurs admin : lien vers la modification du profil

feature/rotating_product
Guillaume Bourgeois 5 ay önce
ebeveyn
işleme
549e1e567e
3 değiştirilmiş dosya ile 6 ekleme ve 6 silme
  1. +2
    -2
      backend/controllers/UserAdminController.php
  2. +2
    -2
      backend/views/user-admin/email_deliverability.php
  3. +2
    -2
      backend/views/user-admin/index.php

+ 2
- 2
backend/controllers/UserAdminController.php Dosyayı Görüntüle

@@ -111,7 +111,7 @@ class UserAdminController extends BackendController
return $this->redirect('index');
}

public function actionRedirectView(int $idUserProducer)
public function actionRedirectUpdate(int $idUserProducer)
{
$userCurrent = $this->getUserCurrent();
$userProducer = $this->getUserProducerModule()->getRepository()->findOneUserProducerById($idUserProducer);
@@ -119,7 +119,7 @@ class UserAdminController extends BackendController
$user = $userProducer->user;
$producer = $userProducer->producer;
$this->getUserModule()->getBuilder()->switchProducer($userCurrent, $producer);
return $this->redirect(['user/view', 'id' => $user->id]);
return $this->redirect(['user/update', 'id' => $user->id]);
}
else {
$this->addFlash('error', "L'utilisateur n'a pas été trouvé.");

+ 2
- 2
backend/views/user-admin/email_deliverability.php Dosyayı Görüntüle

@@ -106,7 +106,7 @@ $this->addBreadcrumb($this->getTitle());
],
[
'attribute' => 'producers',
'label' => 'Producteurs',
'label' => 'Profils',
'format' => 'raw',
'contentOptions' => ['class' => 'column-hide-on-mobile align-center'],
'value' => function ($user) use ($userProducerModule) {
@@ -114,7 +114,7 @@ $this->addBreadcrumb($this->getTitle());
$userProducersArray = $userProducerModule->getRepository()->findUserProducersByUser($user);

foreach($userProducersArray as $userProducer) {
$html .= '<a href="'.Yii::$app->urlManager->createUrl(['user-admin/redirect-view', 'idUserProducer' => $userProducer->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> '.$userProducer->producer->name.'</a> ';
$html .= '<a href="'.Yii::$app->urlManager->createUrl(['user-admin/redirect-update', 'idUserProducer' => $userProducer->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-user"></span> '.$userProducer->producer->name.'</a> ';
}

return $html;

+ 2
- 2
backend/views/user-admin/index.php Dosyayı Görüntüle

@@ -106,7 +106,7 @@ $this->addBreadcrumb($this->getTitle());
],
[
'attribute' => 'producers',
'label' => 'Producteurs',
'label' => 'Profils',
'format' => 'raw',
'contentOptions' => ['class' => 'column-hide-on-mobile align-center'],
'value' => function ($user) use ($userProducerModule) {
@@ -114,7 +114,7 @@ $this->addBreadcrumb($this->getTitle());
$userProducersArray = $userProducerModule->getRepository()->findUserProducersByUser($user);

foreach($userProducersArray as $userProducer) {
$html .= '<a href="'.Yii::$app->urlManager->createUrl(['user-admin/redirect-view', 'idUserProducer' => $userProducer->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> '.$userProducer->producer->name.'</a> ';
$html .= '<a href="'.Yii::$app->urlManager->createUrl(['user-admin/redirect-update', 'idUserProducer' => $userProducer->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-user"></span> '.$userProducer->producer->name.'</a> ';
}

return $html;

Yükleniyor…
İptal
Kaydet