Browse Source

[Site] Intégration Souke

feature/souke
Guillaume Bourgeois 8 months ago
parent
commit
db8ec14415
19 changed files with 696 additions and 535 deletions
  1. +3
    -1
      .bowerrc
  2. +3
    -3
      common/assets/CommonAsset.php
  3. +1
    -1
      common/components/fullcalendar/FullcalendarAsset.php
  4. +12
    -14
      common/views/nav_user_top.php
  5. +50
    -37
      common/web/css/screen.css
  6. +2
    -2
      common/web/js/common.js
  7. +58
    -42
      common/web/sass/_common.scss
  8. +1
    -1
      frontend/assets/AppAsset.php
  9. +2
    -0
      frontend/controllers/SiteController.php
  10. +90
    -90
      frontend/views/layouts/main.php
  11. +0
    -1
      frontend/views/site/about.php
  12. +27
    -26
      frontend/views/site/contact.php
  13. +2
    -2
      frontend/views/site/login.php
  14. +6
    -7
      frontend/views/site/opinion.php
  15. +9
    -10
      frontend/views/site/signup.php
  16. +4
    -4
      frontend/views/user/update.php
  17. +299
    -234
      frontend/web/css/screen.css
  18. +12
    -4
      frontend/web/js/frontend.js
  19. +115
    -56
      frontend/web/sass/screen.scss

+ 3
- 1
.bowerrc View File

@@ -1,3 +1,5 @@
{
"directory" : "vendor/bower"
"directory" : "vendor/bower",
"strict-ssl": false,
"https-proxy": ""
}

+ 3
- 3
common/assets/CommonAsset.php View File

@@ -50,7 +50,7 @@ class CommonAsset extends \common\components\MyAssetBundle
public $css = [];
public $js = [];
public $depends = [
'yii\bootstrap\BootstrapAsset',
'yii\bootstrap5\BootstrapAsset',
'yii\web\YiiAsset',
];
@@ -58,7 +58,7 @@ class CommonAsset extends \common\components\MyAssetBundle
parent::__construct() ;
// css
$this->addAsset('css','bootstrap5/css/bootstrap.min.css') ;
//$this->addAsset('css','bootstrap5/css/bootstrap.min.css') ;
$this->addAsset('css','bootstrap-icons/font/bootstrap-icons.min.css') ;
$this->addAsset('css','js/jquery-ui-1.11.4.custom/jquery-ui.min.css');
$this->addAsset('css','js/jquery-ui-1.11.4.custom/jquery-ui.theme.css');
@@ -67,7 +67,7 @@ class CommonAsset extends \common\components\MyAssetBundle
$this->addAsset('css','css/screen.css') ;
// js
$this->addAsset('js','bootstrap5/js/bootstrap.bundle.min.js') ;
//$this->addAsset('js','bootstrap5/js/bootstrap.bundle.min.js') ;
$this->addAsset('js','js/jquery-ui-1.11.4.custom/jquery-ui.min.js');
$this->addAsset('js','js/promise-polyfill/promise.min.js');
$this->addAsset('js','js/axios/axios.min.js');

+ 1
- 1
common/components/fullcalendar/FullcalendarAsset.php View File

@@ -20,6 +20,6 @@ class FullcalendarAsset extends AssetBundle
public $js = ['jquery-ui.custom.min.js','moment.min.js','fullcalendar.min.js','lang/all.js'];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
'yii\bootstrap5\BootstrapAsset',
];
}

+ 12
- 14
common/views/nav_user_top.php View File

@@ -18,7 +18,7 @@ if ($isUserCurrentGrantedAsProducer && $userCurrent->id_producer) {
}

?>
<div class="container">
<div class="container container-nav-user-top">
<div class="nav-user-top">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
@@ -33,9 +33,9 @@ if ($isUserCurrentGrantedAsProducer && $userCurrent->id_producer) {

$itemsProducersArray = [];
if (count($producersArray)) {
$itemsProducersArray[] = [
/*$itemsProducersArray[] = [
'label' => 'Mes favoris',
];
];*/
foreach ($producersArray as $producerItem) {
$itemsProducersArray[] = [
'label' => Html::encode($producerItem->name),
@@ -48,12 +48,10 @@ if ($isUserCurrentGrantedAsProducer && $userCurrent->id_producer) {
];
}

$itemsProducersArray[] = '<hr class="dropdown-divider">';

$itemsProducersArray[] = [
'options' => ['class' => 'divider'],
'label' => ''
];
$itemsProducersArray[] = [
'label' => '<span class="glyphicon glyphicon-search"></span> Rechercher un producteur',
'label' => '<i class="bi bi-search"></i> Rechercher un producteur',
'url' => $this->getUrlManagerFrontend()->createAbsoluteUrl(['site/producers'])
];

@@ -64,19 +62,19 @@ if ($isUserCurrentGrantedAsProducer && $userCurrent->id_producer) {
'linkOptions' => ['class' => 'btn btn-default navbar-btn']
];*/
$itemAdministration = [
'label' => '<span class="glyphicon glyphicon-cog"></span> <span class="link-text">Administration</span>',
'label' => '<i class="bi bi-gear"></i> <span class="link-text">Administration</span>',
'url' => $this->getUrlManagerBackend()->createAbsoluteUrl(['dashboard/index']),
'visible' => $isUserCurrentGrantedAsProducer,
'linkOptions' => ['class' => '']
];
$itemProducerSpace = [
'label' => '<span class="glyphicon glyphicon-eye-open"></span> <span class="link-text">Mon espace producteur</span>',
'label' => '<i class="bi bi-shop"></i> <span class="link-text">Ma boutique</span>',
'url' => $this->getUrlManagerProducer()->createAbsoluteUrl(['site/index', 'slug_producer' => $producer ? $producer->slug : '']),
'visible' => $isUserCurrentGrantedAsProducer,
'linkOptions' => ['class' => '']
];
$itemProducers = [
'label' => '<span class="glyphicon glyphicon-star"></span> <span class="link-text">Mes producteurs</span>',
'label' => '<i class="bi bi-bookmarks"></i> <span class="link-text">Producteurs</span>',
'url' => '#',
'items' => $itemsProducersArray,
'linkOptions' => ['class' => ''],
@@ -94,16 +92,16 @@ if ($isUserCurrentGrantedAsProducer && $userCurrent->id_producer) {
}

$itemsUserArray[] = [
'label' => '<span class="glyphicon glyphicon-user"></span> Mon profil',
'label' => '<i class="bi bi-person"></i> Mon profil',
'url' => $this->getUrlManagerFrontend()->createAbsoluteUrl(['user/update']),
];
$itemsUserArray[] = [
'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion',
'label' => '<i class="bi bi-box-arrow-left"></i> Déconnexion',
'url' => $this->getUrlManagerFrontend()->createAbsoluteUrl(['site/logout']),
];

$itemUser = [
'label' => '<span class="glyphicon glyphicon-user"></span> <span class="link-text">' .
'label' => '<i class="bi bi-person"></i> <span class="link-text">' .
((!Yii::$app->user->isGuest) ? Html::encode(Yii::$app->user->identity->name . ' ' . strtoupper(substr(Yii::$app->user->identity->lastname, 0, 1)) . '.') : '') .
'</span>',
'options' => ['id' => 'label1'],

+ 50
- 37
common/web/css/screen.css View File

@@ -151,12 +151,19 @@ termes.

/* Navigation utilisateur en haut du site */
/* line 12, ../sass/_common.scss */
.nav-user-top {
float: right;
.container-nav-user-top {
position: relative;
}
/* line 15, ../sass/_common.scss */
.container-nav-user-top .nav-user-top {
position: absolute;
top: 0px;
right: 0px;
background-color: white;
z-index: 100;
}
/* line 16, ../sass/_common.scss */
.nav-user-top .navbar {
/* line 22, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar {
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
@@ -165,56 +172,62 @@ termes.
margin: 0px;
min-height: 0px;
}
/* line 23, ../sass/_common.scss */
.nav-user-top .navbar ul {
/* line 29, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul {
position: relative;
left: -10px;
}
/* line 27, ../sass/_common.scss */
.nav-user-top .navbar ul li {
/* line 33, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li {
padding-left: 5px;
}
/* line 30, ../sass/_common.scss */
.nav-user-top .navbar ul li a.nav-link {
/* line 36, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li a.nav-link {
padding-left: 10px;
padding-right: 10px;
padding-top: 7px;
padding-bottom: 7px;
font-family: 'worksans_semibold';
color: black;
font-size: 16px;
}
/* line 38, ../sass/_common.scss */
.nav-user-top .navbar ul li a.nav-link:hover, .nav-user-top .navbar ul li a.nav-link:focus, .nav-user-top .navbar ul li a.nav-link.active {
/* line 45, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li a.nav-link:hover, .container-nav-user-top .nav-user-top .navbar ul li a.nav-link:focus, .container-nav-user-top .nav-user-top .navbar ul li a.nav-link.active {
background: none;
color: #ee6f42;
}
/* line 42, ../sass/_common.scss */
.nav-user-top .navbar ul li a.nav-link .bi {
/* line 50, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li a.nav-link .bi {
color: #ee6f42;
font-size: 18px;
font-size: 16px;
margin-right: 2px;
position: relative;
top: 2px;
top: 1px;
}
/* line 51, ../sass/_common.scss */
.nav-user-top .navbar ul li ul li a {
/* line 60, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li .dropdown-menu a {
padding: 2px 20px;
}
/* line 59, ../sass/_common.scss */
.nav-user-top .dropdown-menu .divider.dropdown-header {
/* line 63, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li .dropdown-menu a:hover, .container-nav-user-top .nav-user-top .navbar ul li .dropdown-menu a:focus {
background-color: #ece4d8;
}
/* line 73, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .dropdown-menu .divider.dropdown-header {
padding: 0px;
}

@media screen and (max-width: 768px) {
/* line 68, ../sass/_common.scss */
/* line 84, ../sass/_common.scss */
.nav-user-top .navbar ul {
float: right;
margin-right: 0px;
}
/* line 73, ../sass/_common.scss */
/* line 89, ../sass/_common.scss */
.nav-user-top .navbar .link-text {
display: none;
}
/* line 77, ../sass/_common.scss */
/* line 93, ../sass/_common.scss */
.nav-user-top .navbar .dropdown-menu {
position: absolute;
right: 5%;
@@ -225,32 +238,32 @@ termes.
-webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray;
}
/* line 86, ../sass/_common.scss */
/* line 102, ../sass/_common.scss */
.nav-user-top .navbar .dropdown-menu li a {
padding-left: 15px;
}
}
/* Block de date */
/* line 96, ../sass/_common.scss */
/* line 112, ../sass/_common.scss */
.block-date {
margin: 0px auto;
padding-top: 0px;
text-align: center;
}
/* line 101, ../sass/_common.scss */
/* line 117, ../sass/_common.scss */
.block-date .day {
text-transform: capitalize;
line-height: 15px;
font-size: 13px;
text-transform: uppercase;
}
/* line 108, ../sass/_common.scss */
/* line 124, ../sass/_common.scss */
.block-date .num {
font-size: 30px;
line-height: 35px;
font-weight: bold;
}
/* line 114, ../sass/_common.scss */
/* line 130, ../sass/_common.scss */
.block-date .month {
text-transform: uppercase;
line-height: 15px;
@@ -259,46 +272,46 @@ termes.
}

/* Page d'erreur */
/* line 124, ../sass/_common.scss */
/* line 140, ../sass/_common.scss */
#main #content .site-error .col-lg-6 {
margin: 0px auto;
float: none;
}
/* line 130, ../sass/_common.scss */
/* line 146, ../sass/_common.scss */
#main #content .site-error .panel .panel-body {
padding-bottom: 0px;
}
/* line 134, ../sass/_common.scss */
/* line 150, ../sass/_common.scss */
#main #content .site-error .panel h2 {
text-transform: none;
font-size: 25px;
margin-top: 0px;
margin-bottom: 0px;
}
/* line 142, ../sass/_common.scss */
/* line 158, ../sass/_common.scss */
#main #content .site-error .alert {
padding-bottom: 5px;
}
/* line 145, ../sass/_common.scss */
/* line 161, ../sass/_common.scss */
#main #content .site-error .alert h2 {
margin-top: 5px;
}
/* line 149, ../sass/_common.scss */
/* line 165, ../sass/_common.scss */
#main #content .site-error .alert p {
margin-bottom: 15px;
}
/* line 153, ../sass/_common.scss */
/* line 169, ../sass/_common.scss */
#main #content .site-error .alert .btn {
text-decoration: none;
}

/* Paiement */
/* line 164, ../sass/_common.scss */
/* line 180, ../sass/_common.scss */
.payment-detail-remaining-surplus {
font-size: 13px;
color: gray;
}
/* line 168, ../sass/_common.scss */
/* line 184, ../sass/_common.scss */
.payment-detail-remaining-surplus strong {
font-weight: bold;
}

+ 2
- 2
common/web/js/common.js View File

@@ -5,11 +5,11 @@ $(document).ready(function() {

function opendistrib_dropdown_tooltip() {
if($('.dropdown-toggle').length) {
$('.dropdown-toggle').dropdown() ;
//$('.dropdown-toggle').dropdown() ;
}

if($('[data-toggle="tooltip"]').length) {
$('[data-toggle="tooltip"]').tooltip() ;
//$('[data-toggle="tooltip"]').tooltip() ;
}
}


+ 58
- 42
common/web/sass/_common.scss View File

@@ -9,57 +9,73 @@
}

/* Navigation utilisateur en haut du site */
.nav-user-top {
float: right;
background-color: white;

.navbar {
@include border-radius(0px);
border: 0px none;
padding: 0px;
margin: 0px;
min-height: 0px;

ul {
position: relative;
left: -10px;

li {
padding-left: 5px;

a.nav-link {
padding-left: 10px;
padding-right: 10px;
padding-top: 7px;
padding-bottom: 7px;
font-family: 'worksans_semibold';
color: black;

&:hover, &:focus, &.active {
background: none;
}
.container-nav-user-top {
position: relative;

.nav-user-top {
position: absolute;
top: 0px;
right: 0px;
background-color: white;
z-index: 100;

.navbar {
@include border-radius(0px);
border: 0px none;
padding: 0px;
margin: 0px;
min-height: 0px;

ul {
position: relative;
left: -10px;

.bi {
color: $color-primary;
font-size: 18px;
margin-right: 2px;
position: relative;
top: 2px;
li {
padding-left: 5px;

a.nav-link {
padding-left: 10px;
padding-right: 10px;
padding-top: 7px;
padding-bottom: 7px;
font-family: 'worksans_semibold';
color: black;
font-size: 16px;

&:hover, &:focus, &.active {
background: none;
color: $color-primary;
}

.bi {
color: $color-primary;
font-size: 16px;
margin-right: 2px;
position: relative;
top: 1px;
}
}
}

ul li a {
padding: 2px 20px;
.dropdown-menu {
a {
padding: 2px 20px;

&:hover, &:focus {
background-color: $color-gray;
}
}
}
}
}
}
}

.dropdown-menu {
.divider.dropdown-header {
padding: 0px;
.dropdown-menu {
.divider.dropdown-header {
padding: 0px;
}
}
}

}

@media screen and (max-width: 768px) {

+ 1
- 1
frontend/assets/AppAsset.php View File

@@ -52,7 +52,7 @@ class AppAsset extends \common\components\MyAssetBundle
public $css = [];
public $js = [];
public $depends = [
'yii\bootstrap\BootstrapPluginAsset',
'yii\bootstrap5\BootstrapPluginAsset',
];
public function __construct() {

+ 2
- 0
frontend/controllers/SiteController.php View File

@@ -310,6 +310,7 @@ class SiteController extends FrontendController
if ($model->load(Yii::$app->request->post()) && $model->validate()) {
$model->sendEmailAdmin();
$messageSent = true;
$model = new ContactForm();
}

return $this->render('contact', [
@@ -539,6 +540,7 @@ class SiteController extends FrontendController
$this->getOpinionModule()->getManager()
->sendOpinionEmailAdmin($opinionFormModel, $this->getUserCurrent());
$opinionSent = true;
$opinionFormModel = new OpinionForm();
}

return $this->render('opinion', [

+ 90
- 90
frontend/views/layouts/main.php View File

@@ -78,102 +78,102 @@ $adminSettingBag = $settingModule->getAdminSettingBag();
</head>
<body class="<?php if ($isHome): echo 'home'; endif; ?><?php if (!Yii::$app->user->isGuest): ?> connected<?php endif; ?>">
<?php $this->beginBody() ?>

<?= $this->render('@common/views/nav_user_top', [
'context' => 'frontend'
]); ?>

<header id="header">

<nav class="navbar navbar-expand-lg">
<div id="the-header" class="container">
<div class="navbar-header">
<a id="link-home" class="" href="<?= $this->getUrlManager()->createUrl('site/index'); ?>">
<img src="<?= $this->getUrlManager()->baseUrl ?>/img/souke.png" alt="Souke" />
</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w0-collapse"><span
class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="w0-collapse" class="collapse navbar-collapse">
<?php
echo Nav::widget([
'encodeLabels' => false,
'options' => ['class' => 'nav nav-pills navbar-nav navbar-right'],
'items' => [
[
'label' => 'Je passe commande',
'url' => $this->getUrlManager()->createUrl(['site/index']),
'active' => $this->getControllerAction() == 'site/index',
'options' => ['id' => 'li-home']
],
[
'label' => 'Je suis producteur',
'url' => $this->getUrlManager()->createUrl(['site/producers']),
'active' => $this->getControllerAction() == 'site/producers',
'options' => ['id' => 'li-producteurs']
],
[
'label' => 'À propos',
'url' => $this->getUrlManager()->createUrl(['site/about']),
'active' => $this->getControllerAction() == 'site/about',
'options' => ['id' => 'li-about']
],
[
'label' => 'Contact',
'url' => $this->getUrlManager()->createUrl(['site/contact']),
'active' => $this->getControllerAction() == 'site/contact',
'options' => ['id' => 'li-contact']
],
]
]);
?>
</div>
</div>
</nav>
</header>

<div id="main">
<section id="header-title">
<div id="wrapper">
<?= $this->render('@common/views/nav_user_top', [
'context' => 'frontend'
]); ?>
<header id="header">
<div class="container">
<h1>
<!--<span class="glyphicon glyphicon-<?= $this->getIcon(); ?>"></span>-->
<?= $this->getTitle(); ?>
</h1>
<nav class="navbar navbar-expand-lg">
<div id="the-header">
<div class="navbar-header">
<a id="link-home" class="" href="<?= $this->getUrlManager()->createUrl('site/index'); ?>">
<img src="<?= $this->getUrlManager()->baseUrl ?>/img/souke.png" alt="Souke"/>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div id="w0-collapse" class="collapse navbar-collapse">
<?php
echo Nav::widget([
'encodeLabels' => false,
'options' => ['class' => 'nav nav-pills navbar-nav navbar-right'],
'items' => [
[
'label' => 'Je passe commande',
'url' => $this->getUrlManager()->createUrl(['site/index']),
'active' => $this->getControllerAction() == 'site/index',
'options' => ['id' => 'li-home']
],
[
'label' => 'Je suis producteur',
'url' => $this->getUrlManager()->createUrl(['site/producers']),
'active' => $this->getControllerAction() == 'site/producers',
'options' => ['id' => 'li-producteurs']
],
[
'label' => 'À propos',
'url' => $this->getUrlManager()->createUrl(['site/about']),
'active' => $this->getControllerAction() == 'site/about',
'options' => ['id' => 'li-about']
],
[
'label' => 'Contact',
'url' => $this->getUrlManager()->createUrl(['site/contact']),
'active' => $this->getControllerAction() == 'site/contact',
'options' => ['id' => 'li-contact']
],
]
]);
?>
</div>
</div>
</nav>
</div>
</section>
</header>

<section class="container" id="content">
<?php if (Yii::$app->session->hasFlash('error')): ?>
<div class="alert alert-danger" role="alert">
<?= \Yii::$app->session->getFlash('error') ?>
<div id="main">
<section id="header-title">
<div class="container">
<h1>
<!--<span class="glyphicon glyphicon-<?= $this->getIcon(); ?>"></span>-->
<?= $this->getTitle(); ?>
</h1>
</div>
<?php endif; ?>
<?php if (Yii::$app->session->hasFlash('success')): ?>
<div class="alert alert-success" role="alert">
<?= \Yii::$app->session->getFlash('success') ?>
</div>
<?php endif; ?>
</section>

<?= $content ?>
</section>
</div>
<footer id="footer">
<div class="container">
<a href="<?php echo $this->getUrlManager()->createUrl('site/service'); ?>">Fonctionnalités, services & tarifs</a> <span class="bull">&bull;</span>
<a href="<?php echo $this->getUrlManager()->createUrl('site/opinion'); ?>">Avis & suggestions</a> <span class="bull">&bull;</span>
<?php if($adminSettingBag->get('forumFlarumUrl')): ?>
<!--<a href="<?php echo $adminSettingBag->get('forumFlarumUrl'); ?>">Forum</a> <span class="bull">&bull;</span>-->
<?php endif; ?>
<a href="<?php echo $this->getUrlManager()->createUrl('site/mentions'); ?>">Mentions légales</a> <span class="bull">&bull;</span>
<a href="<?php echo $this->getUrlManager()->createUrl('site/cgv'); ?>">Conditions générales de service</a>
<!--<a href="<?php echo $this->getUrlManager()->createUrl('site/source-code'); ?>">Code source</a>-->
</div>
</footer>
<section class="container" id="content">
<?php if (Yii::$app->session->hasFlash('error')): ?>
<div class="alert alert-danger" role="alert">
<?= \Yii::$app->session->getFlash('error') ?>
</div>
<?php endif; ?>
<?php if (Yii::$app->session->hasFlash('success')): ?>
<div class="alert alert-success" role="alert">
<?= \Yii::$app->session->getFlash('success') ?>
</div>
<?php endif; ?>

<?= $content ?>
</section>
</div>
<footer id="footer">
<div class="container">
<a href="<?php echo $this->getUrlManager()->createUrl('site/service'); ?>">Fonctionnalités, services &
tarifs</a> <span class="bull">&bull;</span>
<a href="<?php echo $this->getUrlManager()->createUrl('site/opinion'); ?>">Avis & suggestions</a> <span
class="bull">&bull;</span>
<?php if ($adminSettingBag->get('forumFlarumUrl')): ?>
<!--<a href="<?php echo $adminSettingBag->get('forumFlarumUrl'); ?>">Forum</a> <span class="bull">&bull;</span>-->
<?php endif; ?>
<a href="<?php echo $this->getUrlManager()->createUrl('site/mentions'); ?>">Mentions légales</a> <span
class="bull">&bull;</span>
<a href="<?php echo $this->getUrlManager()->createUrl('site/cgv'); ?>">Conditions générales de service</a>
<!--<a href="<?php echo $this->getUrlManager()->createUrl('site/source-code'); ?>">Code source</a>-->
</div>
</footer>
</div>
<?php $this->endBody() ?>
</body>
</html>

+ 0
- 1
frontend/views/site/about.php View File

@@ -132,5 +132,4 @@ $this->setIcon('info-sign');
<?= $aboutFewNumbers; ?>
</div>
</div>
</div>
</div>

+ 27
- 26
frontend/views/site/contact.php View File

@@ -49,37 +49,38 @@ $this->setMeta('description', 'Pour toute demande d\'information, nous vous prop
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-contact">

<?php if($messageSent): ?>
<div class="alert alert-success text-center">
Merci pour votre message, je vous réponds dès que possible.
<div class="alert alert-success">
Merci pour votre message, nous vous répondrons dès que possible.
</div>
<?php else: ?>
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-8">
<?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'subject') ?>
<?= $form->field($model, 'body')->textArea(['rows' => 6]) ?>
<?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
]) ?>
<?= $form->field($model, 'isTest')->hiddenInput() ?>
<div class="form-group submit">
<?= Html::submitButton('Envoyer', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
</div>
<?php ActiveForm::end(); ?>
<?php endif; ?>

<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-8">
<?php $form = ActiveForm::begin(['id' => 'contact-form', 'enableClientValidation'=> false]); ?>
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'subject') ?>
<?= $form->field($model, 'body')->textArea(['rows' => 6]) ?>
<?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
]) ?>
<?= $form->field($model, 'isTest')->hiddenInput() ?>
<div class="form-group submit">
<?= Html::submitButton('<i class="bi bi-send-fill"></i> Envoyer', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
</div>
<div class="col-md-4">
<div class="alert alert-warning">
Ce formulaire de contact vous permet de joindre le développeur de la plateforme Opendistrib.
Si vous souhaitez joindre un producteur, merci de le faire directement depuis son espace producteur.
</div>
<?php ActiveForm::end(); ?>
</div>
<div class="col-md-4">
<div class="alert alert-warning">
Ce formulaire de contact vous permet de joindre le développeur de la plateforme Souke.
Si vous souhaitez joindre un producteur, merci de le faire directement depuis sa boutique.
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>

+ 2
- 2
frontend/views/site/login.php View File

@@ -49,7 +49,7 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="row">
<div class="col-lg-5">
<p>Pas encore de compte ? <a class="" href="<?php echo \Yii::$app->urlManager->createUrl('site/signup') ; ?>">Je m'inscris</a></p>
<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
<?php $form = ActiveForm::begin(['id' => 'login-form', 'enableClientValidation'=> false]); ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'rememberMe')->checkbox() ?>
@@ -57,7 +57,7 @@ $this->params['breadcrumbs'][] = $this->title;
Si vous avez oublié votre mot de passe, vous pouvez le <?= Html::a('réinitialiser', ['site/request-password-reset']) ?>.
</p>
<div class="form-group form-buttons">
<?= Html::submitButton('Connexion', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
<?= Html::submitButton('<i class="bi bi-box-arrow-in-right"></i> Connexion', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

+ 6
- 7
frontend/views/site/opinion.php View File

@@ -53,12 +53,12 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="row">
<div class="col-lg-6">
<?php if($opinionSent): ?>
<div class="alert alert-success text-center">
Merci pour votre participation, je vous fais un retour dès que possible.
<div class="alert alert-success">
Merci pour votre participation, nous vous ferons un retour dès que possible.
</div>
<?php else: ?>
<div class="alert alert-warning">
Vous pouvez utiliser ce formulaire pour m'envoyer toutes vos remarques et suggestions d'amélioration.
Vous pouvez utiliser ce formulaire pour envoyer toutes vos remarques et suggestions d'amélioration.
</div>
<div class="panel panel-default">
<div class="panel-body">
@@ -69,9 +69,9 @@ $this->params['breadcrumbs'][] = $this->title;
<?php endif; ?>
<?= $form->field($model, 'message')->textArea(['rows' => 6]) ?>
<?php if (Yii::$app->user->isGuest): ?>
<?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
]) ?>
<?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
]) ?>
<?php endif; ?>
<?= $form->field($model, 'isTest')->hiddenInput() ?>
<div class="form-group submit">
@@ -83,5 +83,4 @@ $this->params['breadcrumbs'][] = $this->title;
<?php endif; ?>
</div>
</div>

</div>

+ 9
- 10
frontend/views/site/signup.php View File

@@ -58,21 +58,20 @@ $this->params['breadcrumbs'][] = $this->title;
les identifiants indiqués sur la page de <?= Html::a('connexion', \Yii::$app->urlManager->createUrl(['site/login'])); ?> pour vous identifier.
</div>
<?php else: ?>
<?php $form = ActiveForm::begin(['id' => 'form-signup','enableClientValidation'=> false]); ?>
<?php $form = ActiveForm::begin(['id' => 'form-signup', 'enableClientValidation'=> false]); ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'lastname') ?>
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'phone') ?>

<div id="user-producer" class="btn-group" data-toggle="buttons">
<label class="btn btn-default <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>active<?php endif; ?>">
<input type="radio" name="SignupForm[option_user_producer]" value="user" id="option-user" autocomplete="off" <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>checked<?php endif; ?>> Je suis client
</label>
<div id="user-producer" class="btn-group" role="group" aria-label="Basic radio toggle button group">
<input id="option-user" class="btn-check" type="radio" name="SignupForm[option_user_producer]" value="user" id="option-user" autocomplete="off" <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>checked<?php endif; ?>>
<label for="option-user" class="btn btn-secondary label-user <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>active<?php endif; ?>">Je suis client</label>
<?php if($this->getProducerModule()->getManager()->isProducerSignupOpen()): ?>
<label class="btn btn-default <?php if($model->option_user_producer == 'producer'): ?>active<?php endif; ?>">
<input type="radio" name="SignupForm[option_user_producer]" value="producer" id="option-producer" autocomplete="off" <?php if($model->option_user_producer == 'producer'): ?>checked<?php endif; ?>> Je suis producteur
</label>
<input id="option-producer" class="btn-check" type="radio" name="SignupForm[option_user_producer]" value="producer" id="option-producer" autocomplete="off" <?php if($model->option_user_producer == 'producer'): ?>checked<?php endif; ?>>
<label for="option-producer" class="btn btn-secondary label-producer <?php if($model->option_user_producer == 'producer'): ?>active<?php endif; ?>">Je suis producteur</label>
<?php endif; ?>
</div>

@@ -86,7 +85,7 @@ $this->params['breadcrumbs'][] = $this->title;
'prompt' => '--',
])
->label('TVA à appliquer par défaut'); ?>
<?= $form->field($model, 'cgv')->checkbox()->label('J\'accepte les <button type="button" class="btn btn-xs btn-default btn-modal-cgv" data-toggle="modal" data-target="#modal-cgv">conditions générales de service</button> et les <button type="button" class="btn btn-xs btn-default btn-modal-prices" data-toggle="modal" data-target="#modal-prices">conditions tarifaires</button>.') ?>
<?= $form->field($model, 'cgv')->checkbox()->label('J\'accepte les <button type="button" class="btn btn-sm btn-secondary btn-modal-cgv" data-toggle="modal" data-target="#modal-cgv">conditions générales de service</button> et les <button type="button" class="btn btn-sm btn-secondary btn-modal-prices" data-toggle="modal" data-target="#modal-prices">conditions tarifaires</button>') ?>
</div>
<div id="fields-user">
<?= $form->field($model, 'id_producer')
@@ -108,7 +107,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?= $form->field($model, 'is_test')->hiddenInput() ?>

<div class="form-group form-buttons" id="buttons-signup">
<?= Html::submitButton("S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
<?= Html::submitButton("<i class=\"bi bi-person-plus\"></i> S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
</div>
<?php ActiveForm::end(); ?>
<?php endif; ?>

+ 4
- 4
frontend/views/user/update.php View File

@@ -37,7 +37,7 @@ termes.
*/

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\bootstrap\ActiveForm;

$this->setTitle('Mon profil') ;
$this->setIcon('user');
@@ -53,7 +53,7 @@ $this->setIcon('user');
'enableClientScript' => false
]); ?>

<h2>Informations</h2>
<h2 class="first-title">Informations</h2>
<?= $form->field($model, 'lastname')->textInput() ?>
<?= $form->field($model, 'name')->textInput() ?>
<?= $form->field($model, 'phone')->textInput() ?>
@@ -69,8 +69,8 @@ $this->setIcon('user');

<div class="clr"></div>

<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Modifier', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'name' => 'user-profile-button']) ?>
<div class="form-group form-buttons">
<?= Html::submitButton('<i class="bi bi-pencil"></i> Modifier', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'name' => 'user-profile-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

+ 299
- 234
frontend/web/css/screen.css
File diff suppressed because it is too large
View File


+ 12
- 4
frontend/web/js/frontend.js View File

@@ -135,11 +135,16 @@ var aboutProducersTestimonialsCarousel = {
$block = app.getBlock();

// init carousel
$block.carousel();
//$block.carousel();
new bootstrap.Carousel("#carousel-producers-testimonials");

// event on slide : init height
app.eventSlide();
$block.on('slid.bs.carousel', function () { app.eventSlide();});
//$block.on('slid.bs.carousel', function () { app.eventSlide();});
carousel = document.getElementById('carousel-producers-testimonials');
carousel.addEventListener('slide.bs.carousel', function() {
app.eventSlide();
});
},
eventSlide: function() {
var heightCurrentItem = this.getBlock('.item.active .carousel-caption-inner').height() + 50;
@@ -287,12 +292,15 @@ function opendistrib_signup() {
}

function opendistrib_signup_fields_producer() {
$('#user-producer label').removeClass('active');
if ($('#option-producer').prop('checked')) {
$('#fields-producer').fadeIn();
$('#fields-producer').show();
$('#fields-user').hide();
$('#user-producer label.label-producer').addClass('active');
} else {
$('#fields-producer').hide();
$('#fields-user').fadeIn();
$('#fields-user').show();
$('#user-producer label.label-user').addClass('active');
}
}


+ 115
- 56
frontend/web/sass/screen.scss View File

@@ -46,10 +46,15 @@ $color-background: #f4efe8;
$color-gray: #ece4d8;
$color-text: black;

html {
html, body {
height: 100%;
}

#wrapper {
min-height: 100%;
position: relative;
}

body {
position: relative;
color: black !important;
@@ -57,7 +62,7 @@ body {
background-color: $color-background !important;
background-repeat: no-repeat;
background-position: center -100px;
background-size: 85% auto !important;
background-size: 90% auto !important;
font-family: 'worksans_regular', "Helvetica Neue", Helvetica, Arial, sans-serif !important;
margin: 0;
padding: 0;
@@ -81,8 +86,8 @@ strong {

#main {
background-color: transparent;
padding-bottom: 50px;
min-height: 800px;
padding-bottom: 65px;
min-height: 500px;

a {
color: $color-text;
@@ -135,13 +140,49 @@ strong {
}


.form-control:focus {
@include box-shadow(none) ;
border: solid 1px $color-primary;
#wrapper form {

.control-label {
font-family: 'worksans_medium';
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
@include box-shadow(none);
@include border-radius(0px);
border: solid 1px #e0e0e0;
}

.form-control:hover {
border: solid 1px gray;
}

.form-control:focus {
@include box-shadow(0px 0px 0px 1px $color-primary) ;
border: solid 1px $color-primary;
}

.has-error {
.control-label {
color: black;
}

.form-control:focus, .form-control {
@include box-shadow(none);
border-color: #a94442;
}

.help-block-error {
color: #a94442;
}
}
}

.form-buttons {
text-align: center
text-align: right;
}

p {
@@ -163,8 +204,11 @@ ul {
clear: both;
}

.btn {
background-image: none;
#wrapper {
.btn {
background-image: none;
@include border-radius(0px);
}
}

#main .alert {
@@ -192,8 +236,8 @@ ul {
}

section#header-title {
padding-top: 30px;
padding-bottom: 40px;
padding-top: 35px;
padding-bottom: 35px;
background-color: white;

h1 {
@@ -277,7 +321,7 @@ section#header-title {

#link-home {
position: absolute;
top: -30px;
top: 10px;
left: 0px;
padding-top: 0px;
padding-bottom: 0px;
@@ -309,6 +353,7 @@ section#header-title {
}

nav {
height: 90px;
position: relative;
top: 3px;
padding-top: 0px;
@@ -322,60 +367,63 @@ section#header-title {
background-color: white;
}

ul {
float: right;
padding: 0px;
margin: 0px;
margin-top: 10px;
.collapse {
position: absolute;
bottom: 3px;
right: 0px;

li {
ul {
padding: 0px;
display: block;
margin: 0px;
margin-top: 10px;

a {
li {
padding: 0px;
display: block;
text-decoration: none;
background-color: transparent;
padding: 7px 0px 4px 0px;
margin: 0px;
margin-left: 20px;
font-family: 'worksans_light';
text-transform: uppercase;
color: black;
font-size: 18px;
@include box-shadow(none) ;
@include border-radius(0px);
border-bottom: solid 4px transparent;

&:hover, &.active {
border-bottom: solid 4px $color-secondary;

a {
display: block;
text-decoration: none;
background-color: transparent;
padding: 7px 0px 4px 0px;
margin: 0px;
margin-left: 25px;
font-family: 'worksans_light';
text-transform: uppercase;
color: black;
font-size: 18px;
@include box-shadow(none) ;
@include border-radius(0px);
border-bottom: solid 4px transparent;

&:hover, &.active {
border-bottom: solid 4px $color-secondary;
}
}
}

&#li-home a {
&#li-home a {

}
}

&.active {
a {
background-color: $color-primary;
color: white;
&.active {
a {
background-color: $color-primary;
color: white;
}
}
}


ul {
li {
a {
padding: 10px 10px;
ul {
li {
a {
padding: 10px 10px;
}
}
}
}

}
}
}


}

#link-logout {
@@ -403,9 +451,7 @@ section#header-title {

#content {
position: relative;
padding: 20px 0px;
padding-top: 35px;
padding-bottom: 60px;
padding: 40px 0px;

h1#title-site, h1 {
font-family: "highvoltageregular";
@@ -494,7 +540,7 @@ section#header-title {

.panel-body {
background-color: white;
padding: 30px 50px;
padding: 50px;

p {
padding-bottom: 10px;
@@ -503,6 +549,10 @@ section#header-title {
h2 {
font-size: 30px;
color: $color-secondary;

&.first-title {
margin-top: 0px;
}
}
}

@@ -1406,7 +1456,16 @@ nav#menu-producer {
}

.form-group.submit {
text-align: center;
text-align: right;
}

.alert-warning {
margin-top: 22px;
border: 0px none;
background-color: $color-gray !important;
color: black;
@include border-radius(0px !important);
padding: 20px;
}
}


Loading…
Cancel
Save