Browse Source

Merge branch 'develop'

master
Guillaume Bourgeois 6 months ago
parent
commit
a79a991295
57 changed files with 1102 additions and 524 deletions
  1. +6
    -0
      backend/controllers/ProductController.php
  2. +0
    -2
      backend/controllers/SubscriptionController.php
  3. +2
    -1
      backend/controllers/UserController.php
  4. +1
    -1
      backend/views/document/_form.php
  5. +3
    -4
      backend/views/layouts/header.php
  6. +20
    -0
      backend/views/product/_form.php
  7. +13
    -10
      backend/views/subscription/_form.php
  8. +2
    -8
      backend/views/subscription/index.php
  9. +51
    -2
      backend/views/user/view.php
  10. +122
    -114
      backend/web/css/screen.css
  11. +6
    -0
      backend/web/sass/_adminlte.scss
  12. +2
    -1
      backend/web/sass/product/_form.scss
  13. +5
    -0
      common/config/main.php
  14. +2
    -2
      common/config/params.php
  15. +18
    -3
      common/forms/ContactForm.php
  16. +2
    -7
      common/forms/LoginForm.php
  17. +21
    -0
      common/helpers/Environment.php
  18. +1
    -1
      common/mail/contact-html.php
  19. +14
    -6
      common/mail/orderConfirm-html.php
  20. +30
    -0
      common/versions/24.5.E.php
  21. +4
    -0
      common/views/nav_user_top.php
  22. +95
    -72
      common/web/css/screen.css
  23. +22
    -0
      common/web/sass/_common.scss
  24. +26
    -0
      console/migrations/m240521_081937_add_column_product_is_available_for_subscriptions.php
  25. +1
    -0
      domain/Feature/Feature/Feature.php
  26. +5
    -1
      domain/Feature/Feature/FeatureChecker.php
  27. +2
    -1
      domain/Feature/Feature/FeatureDefinition.php
  28. +5
    -0
      domain/PointSale/PointSale/PointSaleSolver.php
  29. +23
    -8
      domain/Producer/Producer/ProducerSeoGenerator.php
  30. +2
    -1
      domain/Product/Product/Product.php
  31. +2
    -0
      domain/Product/Product/ProductBuilder.php
  32. +17
    -0
      domain/Subscription/Subscription/Event/ProductObserver.php
  33. +58
    -0
      domain/Subscription/Subscription/SubscriptionManager.php
  34. +6
    -0
      domain/Subscription/Subscription/SubscriptionModule.php
  35. +22
    -2
      domain/Subscription/Subscription/SubscriptionRepository.php
  36. +1
    -1
      domain/Subscription/Subscription/SubscriptionSearch.php
  37. +32
    -0
      domain/Subscription/Subscription/SubscriptionSolver.php
  38. +7
    -3
      domain/User/User/UserRepository.php
  39. +1
    -1
      domain/_/ProducerContextTrait.php
  40. +3
    -4
      frontend/forms/PasswordResetRequestForm.php
  41. +3
    -0
      frontend/views/layouts/main.php
  42. +1
    -1
      frontend/views/site/contact.php
  43. +4
    -1
      frontend/views/site/login.php
  44. +6
    -0
      frontend/views/site/producer.php
  45. +8
    -2
      frontend/views/site/service.php
  46. +3
    -0
      frontend/views/site/signup.php
  47. +1
    -1
      frontend/views/site/signup_confirm.php
  48. +195
    -182
      frontend/web/css/screen.css
  49. +12
    -0
      frontend/web/sass/screen.scss
  50. +5
    -2
      producer/controllers/OrderController.php
  51. +31
    -1
      producer/controllers/SiteController.php
  52. +15
    -5
      producer/views/layouts/main.php
  53. +2
    -2
      producer/views/site/points-sale.php
  54. +87
    -0
      producer/views/site/support.php
  55. +1
    -1
      producer/views/subscription/_form.php
  56. +56
    -54
      producer/web/css/screen.css
  57. +17
    -16
      producer/web/sass/_layout.scss

+ 6
- 0
backend/controllers/ProductController.php View File

@@ -156,6 +156,7 @@ class ProductController extends BackendController
{
$productModule = $this->getProductModule();
$distributionModule = $this-> getDistributionModule();
$subscriptionModule = $this->getSubscriptionModule();

$request = Yii::$app->request;
$model = $this->findModel($id);
@@ -194,6 +195,11 @@ class ProductController extends BackendController
}
}

$subscriptionsWithProductArray = $subscriptionModule->getRepository()->findSubscriptionsWithProduct($model);
if(!$model->is_available_for_subscriptions && count($subscriptionsWithProductArray)) {
$this->addFlash('warning', 'Attention, le produit est encore présent dans les abonnements suivants : '.$subscriptionModule->getSolver()->getSubscriptionsListAsHtml($subscriptionsWithProductArray));
}

return $this->render('update/update', [
'model' => $model,
'action' => 'update',

+ 0
- 2
backend/controllers/SubscriptionController.php View File

@@ -155,7 +155,6 @@ class SubscriptionController extends BackendController
$productSubscriptionModule = $this->getProductSubscriptionModule();
$productModule = $this->getProductModule();
$distributionModule = $this-> getDistributionModule();
$orderModule = $this->getOrderModule();

$model = new SubscriptionForm;
$model->isAdmin = true;
@@ -239,7 +238,6 @@ class SubscriptionController extends BackendController
public function actionDelete(int $id)
{
$subscriptionModule = $this->getSubscriptionModule();
$orderModule = $this->getOrderModule();

$subscription = $subscriptionModule->getRepository()->findOneSubscriptionById($id);


+ 2
- 1
backend/controllers/UserController.php View File

@@ -193,7 +193,8 @@ class UserController extends BackendController

return $this->render('view', [
'model' => $model,
'pointSaleBillingArray' => $pointSaleModule->findByBillingUser($model)
'pointSaleBillingArray' => $pointSaleModule->findByBillingUser($model),
'subscriptionsArray' => $this->getSubscriptionModule()->getRepository()->findSubscriptionsByUser($model)
]);
}


+ 1
- 1
backend/views/document/_form.php View File

@@ -216,7 +216,7 @@ $documentClass = $documentModule->getClass($model);
<?php endif; ?>
</div>
</div>
<div v-if="document.status == 'draft' || !document.is_sent" class="info-box">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="fa fa-flash"></i></span>
<div class="info-box-content">


+ 3
- 4
backend/views/layouts/header.php View File

@@ -43,6 +43,7 @@ use domain\Distribution\Distribution\Distribution;
use domain\Producer\Producer\Producer;
use domain\Producer\Producer\ProducerModule;
use domain\User\User\UserModule;
use common\helpers\Environment;
use yii\helpers\Html;

$userModule = UserModule::getInstance();
@@ -53,10 +54,8 @@ $userCurrent = GlobalParam::getCurrentUser();
?>

<header class="main-header">
<?=
Html::a('<span class="logo-mini"><img src="' . Yii::$app->urlManagerBackend->getBaseUrl() . '/img/logo-souke.svg" /></span><span class="logo-lg"><img src="' . Yii::$app->urlManagerBackend->getBaseUrl() . '/img/logo-souke.svg" /></span>', Yii::$app->homeUrl, ['class' => 'logo'])
?>

<?php $beta = Environment::badgeBeta(); ?>
<?= Html::a('<span class="logo-mini"><img src="' . Yii::$app->urlManagerBackend->getBaseUrl() . '/img/logo-souke.svg" /></span><span class="logo-lg"><img src="' . Yii::$app->urlManagerBackend->getBaseUrl() . '/img/logo-souke.svg" />'.$beta.'</span>'.$beta, Yii::$app->homeUrl, ['class' => 'logo']) ?>

<?php /*Html::a(
'Opendistrib',

+ 20
- 0
backend/views/product/_form.php View File

@@ -190,6 +190,26 @@ $taxRateModule = $this->getTaxRateModule();
</div>
</div>

<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-repeat"></i>
Abonnements
</h3>
</div>
<div class="panel-body">
<?= $form->field($model, 'is_available_for_subscriptions')->widget(Toggle::class,
[
'options' => [
'data-id' => $model->id,
'data-on' => 'Oui',
'data-off' => 'Non',
],
]
); ?>
</div>
</div>

<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">

+ 13
- 10
backend/views/subscription/_form.php View File

@@ -135,24 +135,27 @@ $pointSaleModule = $this->getPointSaleModule();
}
?>
<table class="table table-bordered table-condensed table-hover" id="products">
<tr v-for="product in products">
<td>{{ product.name }}</td>
<tr v-for="product in products" v-if="product.is_available_for_subscriptions == 1 || (product.is_available_for_subscriptions == 0 && product.quantity > 0)">
<td>
{{ product.name }}
<template v-if="product.is_available_for_subscriptions == 0">
<br /><span class="label label-warning">Indisponible pour les abonnements</span>
</template>
</td>
<td>
<input type="hidden" :value="product.step" :name="'product_step_'+product.step" />
<input type="hidden" :value="product.price" :name="'product_price_'+product.price" />
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-default" type="button" @click="changeQuantityProductSubscription(false, product)"><span class="glyphicon glyphicon-minus"></span></button>
</span>
<span class="input-group-btn">
<button class="btn btn-default" type="button" @click="changeQuantityProductSubscription(false, product)"><span class="glyphicon glyphicon-minus"></span></button>
</span>
<input v-model="product.quantity" :name="'SubscriptionForm[products][product_'+product.id+']'" class="form-control input-quantity" />
<div class="input-group-addon">
<span>
{{ product.wording_unit }}
</span>
<span>{{ product.wording_unit }}</span>
</div>
<span class="input-group-btn">
<button class="btn btn-default" type="button" @click="changeQuantityProductSubscription(true, product)"><span class="glyphicon glyphicon-plus"></span></button>
</span>
<button class="btn btn-default" type="button" @click="changeQuantityProductSubscription(true, product)"><span class="glyphicon glyphicon-plus"></span></button>
</span>
</div>
</td>
</tr>

+ 2
- 8
backend/views/subscription/index.php View File

@@ -160,14 +160,8 @@ $subscriptionsArray = Subscription::searchAll() ;
'headerOptions' => ['class' => 'column-hide-on-mobile'],
'filterOptions' => ['class' => 'column-hide-on-mobile'],
'contentOptions' => ['class' => 'column-hide-on-mobile'],
'value' => function($model) {
if($model->week_frequency == 1) {
return 'Toutes les semaines' ;
}
else {
return 'Toutes les '.$model->week_frequency.' semaines' ;
}
'value' => function($model) use ($subscriptionModule) {
return $subscriptionModule->getSolver()->getWeekFrequencyAsString($model);
}
],
[

+ 51
- 2
backend/views/user/view.php View File

@@ -39,6 +39,7 @@ termes.
use common\helpers\GlobalParam;
use common\helpers\Price;
use domain\Order\Order\OrderModule;
use domain\Subscription\Subscription\SubscriptionModule;
use domain\User\User\UserModule;
use domain\User\UserProducer\UserProducerModule;
use yii\helpers\Html;
@@ -48,8 +49,10 @@ $userCurrent = GlobalParam::getCurrentUser();
$orderModule = OrderModule::getInstance();
$userModule = UserModule::getInstance();
$userProducerModule = UserProducerModule::getInstance();
$subscriptionModule = SubscriptionModule::getInstance();
$userProducer = $userProducerModule->findOneUserProducer($model);
$username = Html::encode($userModule->getSolver()->getUsername($model));
$producer = GlobalParam::getCurrentProducer();
$this->setTitle($username.' (#'.$model->id.')') ;
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ;
$this->addBreadcrumb(['label' => $username]) ;
@@ -141,7 +144,9 @@ $this->addBreadcrumb('Récapitulatif') ;
<strong>Points de vente</strong>
<span class="pull-right">
<?php foreach($model->userPointSale as $userPointSale): ?>
<span class="label label-default"><?= $userPointSale->pointSale->name; ?></span>
<?php if($userPointSale->pointSale->id_producer == $producer->id): ?>
<span class="label label-default"><?= $userPointSale->pointSale->name; ?></span>
<?php endif; ?>
<?php endforeach; ?>
</span>
</li>
@@ -298,7 +303,6 @@ $this->addBreadcrumb('Récapitulatif') ;
</h3>
</div>
<div class="panel-body">

<?php $countOrders = $orderModule->getRepository()->countOrdersByUser($model); ?>
<?php if($countOrders): ?>
<ul class="list-group list-group-unbordered">
@@ -323,6 +327,51 @@ $this->addBreadcrumb('Récapitulatif') ;
</div>
</div>

<?php $hasSubscription = $subscriptionsArray && count($subscriptionsArray); ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="glyphicon glyphicon-repeat"></i>
Abonnements
<?php if($hasSubscription): ?>
<a class="btn btn-default btn-xs" href="<?= Yii::$app->urlManager->createUrl(['subscription/index','SubscriptionSearch[id_user]' => $model->id]) ?>">
<span class="glyphicon glyphicon-eye-open"></span>
Voir
</a>
<?php else: ?>
<a class="btn btn-default btn-xs" href="<?= Yii::$app->urlManager->createUrl(['subscription/create']) ?>">
<span class="glyphicon glyphicon-plus"></span>
Créer
</a>
<?php endif; ?>
</h3>
</div>
<div class="panel-body">
<?php if($hasSubscription): ?>
<ul class="list-group list-group-unbordered">
<?php foreach($subscriptionsArray as $subscription): ?>
<li class="list-group-item">
<span class="pull-right">
<?= $subscriptionModule->getSolver()->getProductsListAsHtml($subscription) ?>
</span>

<strong><?= $subscriptionModule->getSolver()->getDaysAsHtml($subscription) ?></strong>
(<?= strtolower($subscriptionModule->getSolver()->getWeekFrequencyAsString($subscription)) ?>)<br />
<?= Html::encode($subscription->pointSale->name); ?><br />
<?= $subscriptionModule->getSolver()->getPeriodAsHtml($subscription) ?>

<div class="clr"></div>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="alert alert-info">
Aucun abonnement
</div>
<?php endif; ?>
</div>
</div>

<?php if(isset($pointSaleBillingArray) && $pointSaleBillingArray && count($pointSaleBillingArray) > 0): ?>
<div class="panel panel-default">
<div class="panel-heading">

+ 122
- 114
backend/web/css/screen.css View File

@@ -1541,50 +1541,56 @@ a.btn.btn-primary .glyphicon-triangle-bottom, button.btn.btn-primary .glyphicon-
text-align: center;
}

/* line 5, ../sass/_adminlte.scss */
/* line 4, ../sass/_adminlte.scss */
body.skin-black .badge-environment-beta {
top: 7px;
font-size: 11px;
padding: 0px 7px;
}
/* line 11, ../sass/_adminlte.scss */
body.skin-black .ui-tooltip {
white-space: pre-wrap;
}
/* line 10, ../sass/_adminlte.scss */
/* line 16, ../sass/_adminlte.scss */
body.skin-black .user-without-account {
color: gray;
font-style: italic;
}
/* line 16, ../sass/_adminlte.scss */
/* line 22, ../sass/_adminlte.scss */
body.skin-black .main-header .logo {
background-color: white;
font-family: 'highvoltageregular';
font-size: 23px;
position: relative;
}
/* line 22, ../sass/_adminlte.scss */
/* line 28, ../sass/_adminlte.scss */
body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus {
background-color: white;
text-decoration: none;
}
/* line 27, ../sass/_adminlte.scss */
/* line 33, ../sass/_adminlte.scss */
body.skin-black .main-header .logo img {
position: relative;
max-width: 300px;
max-height: 300px;
height: auto;
}
/* line 35, ../sass/_adminlte.scss */
/* line 41, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-lg img {
width: 90px;
top: -2px;
}
/* line 41, ../sass/_adminlte.scss */
/* line 47, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-mini img {
width: 50px;
}
/* line 46, ../sass/_adminlte.scss */
/* line 52, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar {
display: block;
background-color: white;
padding: 0px;
}
/* line 51, ../sass/_adminlte.scss */
/* line 57, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel {
position: relative;
float: left;
@@ -1592,11 +1598,11 @@ body.skin-black .main-header .navbar .producer-panel {
padding-left: 50px;
margin-left: 7px;
}
/* line 58, ../sass/_adminlte.scss */
/* line 64, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel.without-logo {
padding-left: 10px;
}
/* line 62, ../sass/_adminlte.scss */
/* line 68, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo {
position: absolute;
top: 5px;
@@ -1611,7 +1617,7 @@ body.skin-black .main-header .navbar .producer-panel .logo {
text-align: center;
overflow: hidden;
}
/* line 74, ../sass/_adminlte.scss */
/* line 80, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
position: absolute;
top: 50%;
@@ -1620,131 +1626,131 @@ body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
max-width: 35px;
max-height: 35px;
}
/* line 84, ../sass/_adminlte.scss */
/* line 90, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title {
position: relative;
top: 2px;
text-transform: uppercase;
}
/* line 89, ../sass/_adminlte.scss */
/* line 95, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a {
color: #333;
}
/* line 92, ../sass/_adminlte.scss */
/* line 98, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a:hover {
text-decoration: underline;
}
/* line 97, ../sass/_adminlte.scss */
/* line 103, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title .producer-id {
color: gray;
font-size: 13px;
}
/* line 104, ../sass/_adminlte.scss */
/* line 110, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .sidebar-toggle {
color: #333;
}
/* line 108, ../sass/_adminlte.scss */
/* line 114, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support {
float: left;
padding: 15px 15px;
border-right: solid 1px #e0e0e0;
color: #333;
}
/* line 114, ../sass/_adminlte.scss */
/* line 120, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support:hover {
text-decoration: none;
color: #F39C12;
}
/* line 120, ../sass/_adminlte.scss */
/* line 126, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .nav {
display: block;
}
/* line 124, ../sass/_adminlte.scss */
/* line 130, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a,
body.skin-black .main-header .navbar .navbar-right > li > a {
border-left: solid 1px #e0e0e0;
color: #333;
}
/* line 130, ../sass/_adminlte.scss */
/* line 136, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus,
body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus,
body.skin-black .main-header .navbar .nav > .active > a {
color: #F39C12;
}
/* line 136, ../sass/_adminlte.scss */
/* line 142, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .dropdown-menu {
-moz-box-shadow: 0px 0px 4px gray;
-webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray;
}
/* line 141, ../sass/_adminlte.scss */
/* line 147, ../sass/_adminlte.scss */
body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle {
border-right: solid 1px #e0e0e0;
}
/* line 145, ../sass/_adminlte.scss */
/* line 151, ../sass/_adminlte.scss */
body.skin-black .main-header .link-control-sidebar {
display: none;
}
/* line 150, ../sass/_adminlte.scss */
/* line 156, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu {
max-height: 300px;
}
/* line 153, ../sass/_adminlte.scss */
/* line 159, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a {
padding-top: 4px;
padding-bottom: 4px;
}
/* line 157, ../sass/_adminlte.scss */
/* line 163, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 {
margin-bottom: 2px;
}
/* line 160, ../sass/_adminlte.scss */
/* line 166, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 small {
float: right;
}
/* line 165, ../sass/_adminlte.scss */
/* line 171, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a p {
margin-left: 10px;
}
/* line 176, ../sass/_adminlte.scss */
/* line 182, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu {
width: 400px;
}
/* line 180, ../sass/_adminlte.scss */
/* line 186, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer {
margin: 10px;
width: 94%;
}
/* line 185, ../sass/_adminlte.scss */
/* line 191, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results {
display: none;
}
/* line 188, ../sass/_adminlte.scss */
/* line 194, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert {
margin-bottom: 0px;
margin-left: 10px;
margin-right: 10px;
padding: 15px 15px 10px 15px;
}
/* line 196, ../sass/_adminlte.scss */
/* line 202, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .label {
position: relative;
top: -2px;
left: 0px;
}
/* line 202, ../sass/_adminlte.scss */
/* line 208, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline {
color: #F39C12;
}
/* line 206, ../sass/_adminlte.scss */
/* line 212, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .offline {
display: none;
}
/* line 210, ../sass/_adminlte.scss */
/* line 216, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu a {
color: #333;
}
/* line 214, ../sass/_adminlte.scss */
/* line 220, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .producer-id {
position: relative;
top: 4px;
@@ -1752,100 +1758,100 @@ body.skin-black .main-header .navbar .nav li.producer-menu .producer-id {
font-size: 12px;
float: right;
}
/* line 225, ../sass/_adminlte.scss */
/* line 231, ../sass/_adminlte.scss */
body.skin-black .sidebar .sidebar-menu > li.header {
color: #899397;
}
/* line 229, ../sass/_adminlte.scss */
/* line 235, ../sass/_adminlte.scss */
body.skin-black .sidebar .label {
padding-top: 5px;
position: relative;
top: -3px;
}
/* line 236, ../sass/_adminlte.scss */
/* line 242, ../sass/_adminlte.scss */
body.skin-black .sidebar-menu > li.active > a {
border-color: #F39C12;
}
/* line 241, ../sass/_adminlte.scss */
/* line 247, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel {
text-align: center;
}
/* line 244, ../sass/_adminlte.scss */
/* line 250, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .image {
margin-bottom: 3px;
}
/* line 248, ../sass/_adminlte.scss */
/* line 254, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .title {
font-weight: bold;
color: white;
}
/* line 255, ../sass/_adminlte.scss */
/* line 261, ../sass/_adminlte.scss */
body.skin-black .content-wrapper {
background-color: #f5f5f5;
}
/* line 258, ../sass/_adminlte.scss */
/* line 264, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header {
background-color: #F5F5F5;
padding-bottom: 15px;
border-bottom: solid 1px #e0e0e0;
border-top: solid 1px #e0e0e0;
}
/* line 264, ../sass/_adminlte.scss */
/* line 270, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header .btn {
padding: 3px 6px;
font-size: 10px;
font-family: Arial;
text-transform: uppercase;
}
/* line 271, ../sass/_adminlte.scss */
/* line 277, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header h1 {
font-family: 'myriadpro-light';
font-size: 20px;
}
/* line 277, ../sass/_adminlte.scss */
/* line 283, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px;
}
/* line 281, ../sass/_adminlte.scss */
/* line 287, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px;
}
/* line 285, ../sass/_adminlte.scss */
/* line 291, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a {
color: #e08e0b;
}
/* line 288, ../sass/_adminlte.scss */
/* line 294, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a.disable {
pointer-events: none;
cursor: default;
}
/* line 294, ../sass/_adminlte.scss */
/* line 300, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label {
padding-top: 4px;
padding-bottom: 1px;
}
/* line 299, ../sass/_adminlte.scss */
/* line 305, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn {
color: white;
}
/* line 303, ../sass/_adminlte.scss */
/* line 309, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default {
color: #333;
background-color: white;
}
/* line 308, ../sass/_adminlte.scss */
/* line 314, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12;
color: white;
border-color: #F39C12;
}
/* line 315, ../sass/_adminlte.scss */
/* line 321, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px;
background-color: #e0e0e0;
color: #444;
}
/* line 322, ../sass/_adminlte.scss */
/* line 328, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd;
@@ -1853,20 +1859,20 @@ body.skin-black .content-wrapper .tab-content {
padding: 30px 15px 15px 15px;
background-color: white;
}
/* line 330, ../sass/_adminlte.scss */
/* line 336, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert {
position: relative;
}
/* line 333, ../sass/_adminlte.scss */
/* line 339, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a {
color: white;
}
/* line 336, ../sass/_adminlte.scss */
/* line 342, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn {
color: #333;
text-decoration: none;
}
/* line 341, ../sass/_adminlte.scss */
/* line 347, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close {
font-size: 30px;
position: absolute;
@@ -1876,83 +1882,83 @@ body.skin-black .content-wrapper .alert .close {
color: white;
opacity: 0.6;
}
/* line 350, ../sass/_adminlte.scss */
/* line 356, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover {
opacity: 1;
}
/* line 355, ../sass/_adminlte.scss */
/* line 361, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert.alert-dark {
background-color: #ece4d8;
color: black;
}
/* line 362, ../sass/_adminlte.scss */
/* line 368, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 {
font-size: 28px;
font-family: 'Source Sans Pro',sans-serif;
}
/* line 367, ../sass/_adminlte.scss */
/* line 373, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .icon {
top: -2px;
}
/* line 371, ../sass/_adminlte.scss */
/* line 377, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer {
color: white;
padding-top: 6px;
padding-bottom: 2px;
}
/* line 380, ../sass/_adminlte.scss */
/* line 386, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px;
}
/* line 383, ../sass/_adminlte.scss */
/* line 389, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a {
color: white;
}
/* line 386, ../sass/_adminlte.scss */
/* line 392, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn {
color: #333;
text-decoration: none;
}
/* line 393, ../sass/_adminlte.scss */
/* line 399, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th {
font-size: 13px;
}
/* line 396, ../sass/_adminlte.scss */
/* line 402, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 172px;
text-align: right;
}
/* line 400, ../sass/_adminlte.scss */
/* line 406, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px;
}
/* line 404, ../sass/_adminlte.scss */
/* line 410, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td {
border: 1px solid #ddd;
}
/* line 413, ../sass/_adminlte.scss */
/* line 419, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
/* line 419, ../sass/_adminlte.scss */
/* line 425, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus {
background-color: #F39C12;
border: solid 1px #F39C12;
color: white;
}
/* line 425, ../sass/_adminlte.scss */
/* line 431, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12;
}
/* line 427, ../sass/_adminlte.scss */
/* line 433, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a;
}
/* line 432, ../sass/_adminlte.scss */
/* line 438, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu {
margin-bottom: 25px;
}
/* line 436, ../sass/_adminlte.scss */
/* line 442, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions {
position: fixed;
bottom: 0;
@@ -1966,71 +1972,71 @@ body.skin-black .content-wrapper .form-actions {
z-index: 10;
border-top: solid 1px #e0e0e0;
}
/* line 449, ../sass/_adminlte.scss */
/* line 455, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px;
}
/* line 454, ../sass/_adminlte.scss */
/* line 460, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons {
margin-top: 25px;
text-align: right;
}
/* line 461, ../sass/_adminlte.scss */
/* line 467, ../sass/_adminlte.scss */
body.skin-black .main-footer a {
color: #F39C12;
}
/* line 466, ../sass/_adminlte.scss */
/* line 472, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize {
float: right;
margin-bottom: 8px;
}
/* line 471, ../sass/_adminlte.scss */
/* line 477, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar {
bottom: 64px;
}

/* line 476, ../sass/_adminlte.scss */
/* line 482, ../sass/_adminlte.scss */
body.login-page {
background: none;
background-color: white;
}
/* line 480, ../sass/_adminlte.scss */
/* line 486, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo {
text-align: center;
font-family: 'worksans_bold';
}
/* line 484, ../sass/_adminlte.scss */
/* line 490, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img {
width: 150px;
}
/* line 490, ../sass/_adminlte.scss */
/* line 496, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body,
body.login-page .login-box .login-box-body input#loginform-email,
body.login-page .login-box .login-box-body input#loginform-password,
body.login-page .login-box .login-box-body .btn-primary {
font-size: 14px;
}
/* line 497, ../sass/_adminlte.scss */
/* line 503, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12;
border-color: #F39C12;
padding: 5px 10px;
margin-bottom: 15px;
}
/* line 503, ../sass/_adminlte.scss */
/* line 509, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a;
border-color: #F39C12;
}
/* line 509, ../sass/_adminlte.scss */
/* line 515, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a {
color: #F39C12;
}
/* line 511, ../sass/_adminlte.scss */
/* line 517, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover {
color: #f4a62a;
}
/* line 516, ../sass/_adminlte.scss */
/* line 522, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .checkbox label input {
position: relative;
top: 0px;
@@ -2162,22 +2168,24 @@ body.login-page .login-box .login-box-body .checkbox label input {
}
}

/* line 6, ../sass/product/_form.scss */
/* line 7, ../sass/product/_form.scss */
.product-create .field-product-status label,
.product-update .field-product-status label {
.product-create .field-product-is_available_for_subscriptions label,
.product-update .field-product-status label,
.product-update .field-product-is_available_for_subscriptions label {
display: block;
}
/* line 12, ../sass/product/_form.scss */
/* line 13, ../sass/product/_form.scss */
.product-create #product-active label,
.product-update #product-active label {
margin-right: 15px;
}
/* line 18, ../sass/product/_form.scss */
/* line 19, ../sass/product/_form.scss */
.product-create .field-product-photofile label,
.product-update .field-product-photofile label {
display: none;
}
/* line 24, ../sass/product/_form.scss */
/* line 25, ../sass/product/_form.scss */
.product-create #maximum-quantities label, .product-create #maximum-quantities .form-control,
.product-update #maximum-quantities label,
.product-update #maximum-quantities .form-control {
@@ -2185,79 +2193,79 @@ body.login-page .login-box .login-box-body .checkbox label input {
height: 35px;
margin-bottom: 5px;
}
/* line 29, ../sass/product/_form.scss */
/* line 30, ../sass/product/_form.scss */
.product-create #maximum-quantities label,
.product-update #maximum-quantities label {
float: left;
line-height: 35px;
}
/* line 33, ../sass/product/_form.scss */
/* line 34, ../sass/product/_form.scss */
.product-create #maximum-quantities .form-control,
.product-update #maximum-quantities .form-control {
float: right;
}
/* line 38, ../sass/product/_form.scss */
/* line 39, ../sass/product/_form.scss */
.product-create #days-production,
.product-update #days-production {
padding-left: 3px;
}
/* line 41, ../sass/product/_form.scss */
/* line 42, ../sass/product/_form.scss */
.product-create #days-production .form-group,
.product-update #days-production .form-group {
margin-bottom: 7px;
}
/* line 45, ../sass/product/_form.scss */
/* line 46, ../sass/product/_form.scss */
.product-create #days-production label,
.product-update #days-production label {
font-weight: normal;
}
/* line 48, ../sass/product/_form.scss */
/* line 49, ../sass/product/_form.scss */
.product-create #days-production label input,
.product-update #days-production label input {
position: relative;
top: 1px;
left: -3px;
}
/* line 55, ../sass/product/_form.scss */
/* line 56, ../sass/product/_form.scss */
.product-create #days-production .checkbox,
.product-update #days-production .checkbox {
margin-top: 0px;
}
/* line 59, ../sass/product/_form.scss */
/* line 60, ../sass/product/_form.scss */
.product-create #days-production .field-product-sunday,
.product-update #days-production .field-product-sunday {
margin-bottom: 0px;
}
/* line 62, ../sass/product/_form.scss */
/* line 63, ../sass/product/_form.scss */
.product-create #days-production .field-product-sunday .checkbox,
.product-update #days-production .field-product-sunday .checkbox {
margin-bottom: 0px;
}
/* line 69, ../sass/product/_form.scss */
/* line 70, ../sass/product/_form.scss */
.product-create #availability-points-sale #label-availability-points-sale,
.product-update #availability-points-sale #label-availability-points-sale {
display: block;
margin-bottom: 6px;
}
/* line 73, ../sass/product/_form.scss */
/* line 74, ../sass/product/_form.scss */
.product-create #availability-points-sale #label-availability-points-sale span,
.product-update #availability-points-sale #label-availability-points-sale span {
border-bottom: dotted 1px black;
}
/* line 79, ../sass/product/_form.scss */
/* line 80, ../sass/product/_form.scss */
.product-create #availability-points-sale .field-product-available_on_points_sale label.control-label,
.product-update #availability-points-sale .field-product-available_on_points_sale label.control-label {
margin-bottom: 0px;
position: relative;
top: 3px;
}
/* line 86, ../sass/product/_form.scss */
/* line 87, ../sass/product/_form.scss */
.product-create #availability-points-sale #product-pointssale,
.product-update #availability-points-sale #product-pointssale {
max-height: 300px;
overflow-y: scroll;
}
/* line 90, ../sass/product/_form.scss */
/* line 91, ../sass/product/_form.scss */
.product-create #availability-points-sale #product-pointssale label,
.product-update #availability-points-sale #product-pointssale label {
display: block;

+ 6
- 0
backend/web/sass/_adminlte.scss View File

@@ -1,6 +1,12 @@

body.skin-black {

.badge-environment-beta {
top: 7px;
font-size: 11px;
padding: 0px 7px;
}

// Gestion des retours à la ligne (à cause de la difficulté à gérer du HTMl dans les tooltip)
.ui-tooltip {
white-space: pre-wrap;

+ 2
- 1
backend/web/sass/product/_form.scss View File

@@ -2,7 +2,8 @@
.product-create,
.product-update {

.field-product-status {
.field-product-status,
.field-product-is_available_for_subscriptions {
label {
display: block;
}

+ 5
- 0
common/config/main.php View File

@@ -43,6 +43,7 @@ use domain\Distribution\Distribution\Distribution;
use domain\Document\DeliveryNote\DeliveryNote;
use domain\Order\Order\Order;
use domain\Payment\Payment;
use domain\Product\Product\Product;
use domain\Ticket\Ticket\Ticket;
use domain\Ticket\TicketMessage\TicketMessage;
use domain\User\User\User;
@@ -211,6 +212,10 @@ return [
// DeliveryNote : validation automatique des bons de livraison
domain\Document\DeliveryNote\Event\DeliveryNoteObserver::class
],
Product::class => [
// Abonnements : suppression des produits dans les abonnements configurés comme non disponibles pour les abonnements
domain\Subscription\Subscription\Event\ProductObserver::class
],
Ticket::class => [
// Envoi email nouveau ticket à l'administrateur
\domain\Ticket\Ticket\Event\TicketObserver::class,

+ 2
- 2
common/config/params.php View File

@@ -37,14 +37,14 @@
*/

return [
'version' => '24.5.D',
'version' => '24.5.E',
'maintenanceMode' => false,
'siteName' => 'Souke',
'tinyMcePlugins' => 'preview searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link lists wordcount help',
'adminEmail' => 'contact@souke.fr',
'supportEmail' => 'contact@souke.fr',
'newsletterProducerDescription' => "Pour recevoir les emails de prise de commande et d'information",
'newsletterSoukeDescription' => "Pour suivre l'actualité de la plateforme",
'newsletterSoukeDescription' => "Pour suivre l'actualité du logiciel",
'user.passwordResetTokenExpire' => 3600,
'producer' => false,
'orderStatus' => [

+ 18
- 3
common/forms/ContactForm.php View File

@@ -98,7 +98,22 @@ class ContactForm extends Model
'contact',
[
'content' => $this->body,
'name' => $this->name
'name' => $this->name,
'email' => $this->email
],
$this->email
);
}

public function sendEmailShopSupport(Producer $producer)
{
return Yii::$app->mailerService->sendAdmin(
'Support > '.$producer->name.' : ' . $this->subject,
'contact',
[
'content' => $this->body,
'name' => $this->name,
'email' => $this->email
],
$this->email
);
@@ -111,10 +126,10 @@ class ContactForm extends Model
'contact',
[
'content' => $this->body,
'name' => $this->name
'name' => $this->name,
'email' => $this->email
],
$this->email
);
}

}

+ 2
- 7
common/forms/LoginForm.php View File

@@ -40,6 +40,7 @@ namespace common\forms;

use domain\Producer\Producer\Producer;
use domain\User\User\User;
use domain\User\User\UserRepository;
use Yii;
use yii\base\Model;

@@ -122,13 +123,7 @@ class LoginForm extends Model
public function getUser(): ?User
{
if ($this->_user === false) {
$this->_user = User::searchOne(
['email' => $this->email],
[
'conditions' => 'type LIKE :type_individual OR type LIKE :type_legal_person',
'params' => [':type_individual' => User::TYPE_INDIVIDUAL, ':type_legal_person' => User::TYPE_LEGAL_PERSON]
]
);
$this->_user = UserRepository::getInstance()->findOneUserByEmail($this->email);
}

return $this->_user;

+ 21
- 0
common/helpers/Environment.php View File

@@ -0,0 +1,21 @@
<?php

namespace common\helpers;

class Environment
{
public static function isBetaEnvironment(): bool
{
return YII_ENV == 'dev';
}

public static function badgeBeta(): string
{
return self::isBetaEnvironment() ? '<span class="badge-environment-beta">BETA</span>' : '';
}

public static function metaRobotsNoIndexBeta(): string
{
return self::isBetaEnvironment() ? '<meta name="robots" content="noindex">' : '';
}
}

+ 1
- 1
common/mail/contact-html.php View File

@@ -40,6 +40,6 @@ use yii\helpers\Html;

?>

<p>Message de <strong><?= Html::encode($name) ?></strong> :</p>
<p>Message de <strong><?= Html::encode($name) ?></strong> (<?= Html::encode($email) ?>) :</p>

<?= nl2br(Html::encode($content)); ?>

+ 14
- 6
common/mail/orderConfirm-html.php View File

@@ -38,13 +38,14 @@ termes.

use domain\Order\Order\Order;
use domain\Order\Order\OrderModule;
use domain\Producer\Producer\ProducerModule;
use domain\PointSale\PointSale\PointSaleModule;use domain\Producer\Producer\ProducerModule;
use domain\User\User\UserModule;
use yii\helpers\Html;

$producerModule = ProducerModule::getInstance();
$orderModule = OrderModule::getInstance();
$userModule = UserModule::getInstance();
$pointSaleModule = PointSaleModule::getInstance();

?>

@@ -60,23 +61,30 @@ $userModule = UserModule::getInstance();
<?php if($order->pointSale->is_bread_box && $order->pointSale->bread_box_code): ?>
(Code : <strong><?= $order->pointSale->bread_box_code; ?></strong>)
<?php endif; ?>
<?php if(strlen($pointSale->locality) > 0): ?> situé à <?= Html::encode($pointSale->locality) ?><?php endif ?>.</p>
<?php if(strlen($pointSale->locality) > 0): ?> situé à <?= Html::encode($pointSale->locality) ?><?php endif ?>.
</p>

<?php if($order->user && !$userModule->getSolver()->isTypeGuest($order->user)): ?>
<p>Retrouvez à tout moment votre commande dans l'espace de votre producteur via l'onglet <a href="<?= Yii::$app->urlManager->createAbsoluteUrl('order/history') ?>">Mes commandes</a>.</p>
<?php $infosPointSale = $pointSaleModule->getSolver()->getStrInfosByDistribution($pointSale, $distribution); ?>
<?php if(strlen($infosPointSale)): ?>
<strong>Informations pratiques</strong><br />
<?= $infosPointSale ?>
<?php endif; ?>

<?php $payment_infos = $producerModule->getConfig('option_payment_info') ; ?>
<?php if($payment_infos && strlen($payment_infos) > 0): ?>
<p><strong>Informations de paiement :</strong><br />
<p><strong>Paiement</strong><br />
<?= nl2br(Html::encode($payment_infos)); ?></p>
<?php endif; ?>

<?php $order_infos = $producerModule->getConfig('order_infos') ; ?>
<?php if($order_infos && strlen($order_infos) > 0): ?>
<p><strong>Informations générales :</strong><br />
<p><strong>Informations générales</strong><br />
<?= nl2br(Html::encode($order_infos)); ?></p>
<?php endif; ?>

<?php if($order->user && !$userModule->getSolver()->isTypeGuest($order->user)): ?>
<p>Retrouvez à tout moment votre commande dans l'espace de votre producteur via l'onglet <a href="<?= Yii::$app->urlManager->createAbsoluteUrl('order/history') ?>">Mes commandes</a>.</p>
<?php endif; ?>

À bientôt,<br />
<?= Html::encode($producer->name); ?>

+ 30
- 0
common/versions/24.5.E.php View File

@@ -0,0 +1,30 @@
<?php

require_once dirname(__FILE__).'/_macros.php';

version(
'27/05/2024',
[
[
"[Boutique] Support pour les clients : ajout d'un bouton 'Besoin d'aide ?' sur toutes les pages",
"Produits : gestion de la disponibilité pour les abonnements",
"[Administration] Utilisateurs > récapitulatif : ajout abonnements",
"Email confirmation de commande : ajout informations du point de vente (horaires etc.)",
],
[
"[Administration] Documents : possibilité de regénérer un document même s'il a déjà été envoyé",
"[Site] Mot de passe oublié : correctif envoi impossible de l'email avec lien de réinitialisation sur certaines adresses",
"[Boutique] Correctif commande avec quantité produit à 0",
]
],
[
[
"[Site & boutique] Environnement beta : ajout meta robots noindex + badge indiquant qu'on est dans un environnement beta"
],
[
]
],
$userCurrent
);

?>

+ 4
- 0
common/views/nav_user_top.php View File

@@ -4,6 +4,7 @@ use common\helpers\GlobalParam;
use domain\Producer\Producer\Producer;
use domain\Producer\Producer\ProducerModule;
use domain\User\User\UserModule;
use common\helpers\Environment;
use yii\bootstrap5\Nav;
use yii\helpers\Html;

@@ -19,6 +20,9 @@ if ($isUserCurrentGrantedAsProducer && $userCurrent->id_producer) {

?>
<div class="container container-nav-user-top">
<?php if($context == 'producer'): ?>
<?= Environment::badgeBeta(); ?>
<?php endif; ?>
<div class="nav-user-top">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">

+ 95
- 72
common/web/css/screen.css View File

@@ -139,7 +139,24 @@ termes.
font-weight: normal;
font-style: normal;
}
/* line 3, ../sass/_common.scss */
/* Environnement beta */
/* line 4, ../sass/_common.scss */
.badge-environment-beta {
position: relative;
display: inline-block;
font-size: 13px;
line-height: 20px;
font-family: 'worksans_semibold';
font-weight: normal;
padding: 1px 10px;
border-radius: 10px;
color: white;
background-color: black;
text-align: center;
vertical-align: baseline;
}

/* line 19, ../sass/_common.scss */
#main {
/* Boutons */
/* Alertes */
@@ -147,7 +164,7 @@ termes.
/* Tables */
/* Formulaires */
}
/* line 5, ../sass/_common.scss */
/* line 21, ../sass/_common.scss */
#main .btn-primary,
#main .btn-secondary {
-moz-border-radius: 0px;
@@ -155,36 +172,36 @@ termes.
border-radius: 0px;
font-family: 'worksans_semibold';
}
/* line 10, ../sass/_common.scss */
/* line 26, ../sass/_common.scss */
#main .btn-primary .bi,
#main .btn-secondary .bi {
margin-right: 5px;
}
/* line 15, ../sass/_common.scss */
/* line 31, ../sass/_common.scss */
#main .btn-primary {
background-color: #ee6f42;
border: 0px none;
color: white;
}
/* line 20, ../sass/_common.scss */
/* line 36, ../sass/_common.scss */
#main .btn-primary:hover, #main .btn-primary:active, #main .btn-primary:focus {
filter: brightness(90%);
border: 0px none;
color: white;
}
/* line 27, ../sass/_common.scss */
/* line 43, ../sass/_common.scss */
#main .btn-secondary {
color: black;
background-color: #f4efe8;
border: solid 1px #f4efe8;
}
/* line 32, ../sass/_common.scss */
/* line 48, ../sass/_common.scss */
#main .btn-secondary:hover, #main .btn-secondary.active {
background-color: #ece4d8;
border: solid 1px #ece4d8;
color: black;
}
/* line 40, ../sass/_common.scss */
/* line 56, ../sass/_common.scss */
#main .alert {
border: 0px none;
-moz-border-radius: 0px !important;
@@ -194,99 +211,99 @@ termes.
padding: 20px;
margin-bottom: 20px;
}
/* line 47, ../sass/_common.scss */
/* line 63, ../sass/_common.scss */
#main .alert.alert-success {
background-color: #e4e9ad !important;
}
/* line 51, ../sass/_common.scss */
/* line 67, ../sass/_common.scss */
#main .alert.alert-info {
background-color: #97bfc4 !important;
}
/* line 55, ../sass/_common.scss */
/* line 71, ../sass/_common.scss */
#main .alert.alert-warning {
background-color: #ecd58e !important;
}
/* line 59, ../sass/_common.scss */
/* line 75, ../sass/_common.scss */
#main .alert.alert-danger {
background-color: #edbaa4 !important;
}
/* line 63, ../sass/_common.scss */
/* line 79, ../sass/_common.scss */
#main .alert.alert-dark {
background-color: #ece4d8 !important;
}
/* line 67, ../sass/_common.scss */
/* line 83, ../sass/_common.scss */
#main .alert a {
color: black;
}
/* line 71, ../sass/_common.scss */
/* line 87, ../sass/_common.scss */
#main .alert p:last-child {
margin-bottom: 0px;
}
/* line 77, ../sass/_common.scss */
/* line 93, ../sass/_common.scss */
#main .card {
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
}
/* line 87, ../sass/_common.scss */
/* line 103, ../sass/_common.scss */
#main .table thead tr th {
font-family: 'worksans_semibold';
}
/* line 97, ../sass/_common.scss */
/* line 113, ../sass/_common.scss */
#main .table.table-striped {
border: 0px none;
}
/* line 100, ../sass/_common.scss */
/* line 116, ../sass/_common.scss */
#main .table.table-striped.table-striped > tbody > tr:nth-of-type(2n) > *,
#main .table.table-striped thead tr th {
background-color: #ece4d8;
}
/* line 105, ../sass/_common.scss */
/* line 121, ../sass/_common.scss */
#main .table.table-striped.table-striped > tbody > tr:nth-of-type(2n+1) > * {
background-color: #f8f7f3;
}
/* line 109, ../sass/_common.scss */
/* line 125, ../sass/_common.scss */
#main .table.table-striped thead tr th,
#main .table.table-striped tbody tr td {
-moz-box-shadow: -20px 0 20px -20px rgba(0, 0, 0, 0.2) inset;
-webkit-box-shadow: -20px 0 20px -20px rgba(0, 0, 0, 0.2) inset;
box-shadow: -20px 0 20px -20px rgba(0, 0, 0, 0.2) inset;
}
/* line 113, ../sass/_common.scss */
/* line 129, ../sass/_common.scss */
#main .table.table-striped thead tr th:last-child,
#main .table.table-striped tbody tr td:last-child {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
/* line 119, ../sass/_common.scss */
/* line 135, ../sass/_common.scss */
#main .table.table-striped thead tr {
border: 0px none;
}
/* line 121, ../sass/_common.scss */
/* line 137, ../sass/_common.scss */
#main .table.table-striped thead tr th {
border: 0px none;
padding: 10px 20px;
}
/* line 129, ../sass/_common.scss */
/* line 145, ../sass/_common.scss */
#main .table.table-striped tbody tr {
border: 0px none;
}
/* line 131, ../sass/_common.scss */
/* line 147, ../sass/_common.scss */
#main .table.table-striped tbody tr td {
border: 0px none;
padding: 20px;
}
/* line 139, ../sass/_common.scss */
/* line 155, ../sass/_common.scss */
#main .table .btn-secondary {
display: inline-block;
margin-bottom: 5px;
}
/* line 147, ../sass/_common.scss */
/* line 163, ../sass/_common.scss */
#main form .control-label {
font-family: 'worksans_medium';
}
/* line 151, ../sass/_common.scss */
/* line 167, ../sass/_common.scss */
#main form input[type="text"],
#main form input[type="email"],
#main form input[type="password"],
@@ -300,66 +317,72 @@ termes.
border-radius: 0px;
border: solid 1px #b7ab9b;
}
/* line 161, ../sass/_common.scss */
/* line 177, ../sass/_common.scss */
#main form .form-control {
-moz-appearance: auto;
-webkit-appearance: auto;
}
/* line 165, ../sass/_common.scss */
/* line 181, ../sass/_common.scss */
#main form .form-control:hover {
border: solid 1px gray;
}
/* line 169, ../sass/_common.scss */
/* line 185, ../sass/_common.scss */
#main form .form-control:focus {
-moz-box-shadow: 0px 0px 0px 1px #ee6f42;
-webkit-box-shadow: 0px 0px 0px 1px #ee6f42;
box-shadow: 0px 0px 0px 1px #ee6f42;
border: solid 1px #ee6f42;
}
/* line 175, ../sass/_common.scss */
/* line 191, ../sass/_common.scss */
#main form .has-error .control-label {
color: black;
}
/* line 179, ../sass/_common.scss */
/* line 195, ../sass/_common.scss */
#main form .has-error .form-control:focus, #main form .has-error .form-control {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
border-color: #a94442;
}
/* line 184, ../sass/_common.scss */
/* line 200, ../sass/_common.scss */
#main form .has-error .help-block-error {
color: #a94442;
}
/* line 189, ../sass/_common.scss */
/* line 205, ../sass/_common.scss */
#main form .form-buttons {
text-align: right;
}

/* Divers */
/* line 196, ../sass/_common.scss */
/* line 212, ../sass/_common.scss */
.float-left {
float: left;
}

/* line 200, ../sass/_common.scss */
/* line 216, ../sass/_common.scss */
.float-right {
float: right;
}

/* line 204, ../sass/_common.scss */
/* line 220, ../sass/_common.scss */
.clr {
clear: both;
}

/* Navigation utilisateur en haut du site */
/* line 209, ../sass/_common.scss */
/* line 225, ../sass/_common.scss */
.container-nav-user-top {
position: relative;
z-index: 999;
background-color: white;
}
/* line 214, ../sass/_common.scss */
/* line 230, ../sass/_common.scss */
.container-nav-user-top .badge-environment-beta {
position: absolute;
top: 8px;
left: 15px;
}
/* line 236, ../sass/_common.scss */
.container-nav-user-top .nav-user-top {
position: absolute;
top: 0px;
@@ -367,7 +390,7 @@ termes.
background-color: white;
z-index: 100;
}
/* line 221, ../sass/_common.scss */
/* line 243, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar {
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
@@ -377,16 +400,16 @@ termes.
margin: 0px;
min-height: 0px;
}
/* line 228, ../sass/_common.scss */
/* line 250, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul {
position: relative;
left: -10px;
}
/* line 232, ../sass/_common.scss */
/* line 254, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li {
padding-left: 5px;
}
/* line 235, ../sass/_common.scss */
/* line 257, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li a.nav-link {
padding-left: 10px;
padding-right: 10px;
@@ -396,12 +419,12 @@ termes.
color: black;
font-size: 16px;
}
/* line 244, ../sass/_common.scss */
/* line 266, ../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 249, ../sass/_common.scss */
/* line 271, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li a.nav-link .bi {
color: #ee6f42;
font-size: 16px;
@@ -409,48 +432,48 @@ termes.
position: relative;
top: 1px;
}
/* line 259, ../sass/_common.scss */
/* line 281, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li .dropdown-menu a {
padding: 2px 20px;
}
/* line 262, ../sass/_common.scss */
/* line 284, ../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 271, ../sass/_common.scss */
/* line 293, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .dropdown-menu {
z-index: 9999;
}
/* line 273, ../sass/_common.scss */
/* line 295, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .dropdown-menu .divider.dropdown-header {
padding: 0px;
}

@media screen and (max-width: 991px) {
/* line 284, ../sass/_common.scss */
/* line 306, ../sass/_common.scss */
.container-nav-user-top .nav-user-top {
position: relative;
}
/* line 288, ../sass/_common.scss */
/* line 310, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul {
width: 100%;
display: block;
margin-right: 0px;
text-align: center;
}
/* line 294, ../sass/_common.scss */
/* line 316, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li {
display: inline-block;
}
/* line 298, ../sass/_common.scss */
/* line 320, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li.nav-item-producers .dropdown-menu {
right: -95px;
}
/* line 305, ../sass/_common.scss */
/* line 327, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar .link-text {
display: none;
}
/* line 309, ../sass/_common.scss */
/* line 331, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar .dropdown-menu {
position: absolute;
right: 5%;
@@ -461,32 +484,32 @@ termes.
-webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray;
}
/* line 318, ../sass/_common.scss */
/* line 340, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar .dropdown-menu li a {
padding-left: 15px;
}
}
/* Block de date */
/* line 331, ../sass/_common.scss */
/* line 353, ../sass/_common.scss */
.block-date {
margin: 0px auto;
padding-top: 0px;
text-align: center;
}
/* line 336, ../sass/_common.scss */
/* line 358, ../sass/_common.scss */
.block-date .day {
text-transform: capitalize;
line-height: 15px;
font-size: 15px;
text-transform: uppercase;
}
/* line 343, ../sass/_common.scss */
/* line 365, ../sass/_common.scss */
.block-date .num {
font-size: 30px;
line-height: 35px;
font-weight: bold;
}
/* line 349, ../sass/_common.scss */
/* line 371, ../sass/_common.scss */
.block-date .month {
text-transform: uppercase;
line-height: 15px;
@@ -495,52 +518,52 @@ termes.
}

/* Page d'erreur */
/* line 359, ../sass/_common.scss */
/* line 381, ../sass/_common.scss */
#main #content .site-error .col-lg-6 {
margin: 0px auto;
float: none;
}
/* line 369, ../sass/_common.scss */
/* line 391, ../sass/_common.scss */
#main #content .site-error .panel h2 {
text-transform: none;
font-size: 25px;
margin-top: 0px;
margin-bottom: 20px;
}
/* line 376, ../sass/_common.scss */
/* line 398, ../sass/_common.scss */
#main #content .site-error .panel p:last-child {
margin-bottom: 0px;
padding-bottom: 0px;
}
/* line 382, ../sass/_common.scss */
/* line 404, ../sass/_common.scss */
#main #content .site-error .alert {
padding-bottom: 5px;
}
/* line 385, ../sass/_common.scss */
/* line 407, ../sass/_common.scss */
#main #content .site-error .alert h3 {
margin-top: 5px;
margin-bottom: 18px;
}
/* line 390, ../sass/_common.scss */
/* line 412, ../sass/_common.scss */
#main #content .site-error .alert p {
margin-bottom: 15px;
}
/* line 394, ../sass/_common.scss */
/* line 416, ../sass/_common.scss */
#main #content .site-error .alert .btn {
text-decoration: none;
}
/* line 399, ../sass/_common.scss */
/* line 421, ../sass/_common.scss */
#main #content .site-error p.error-message {
font-weight: bold;
}

/* Paiement */
/* line 405, ../sass/_common.scss */
/* line 427, ../sass/_common.scss */
.payment-detail-remaining-surplus {
font-size: 13px;
color: gray;
}
/* line 409, ../sass/_common.scss */
/* line 431, ../sass/_common.scss */
.payment-detail-remaining-surplus strong {
font-weight: bold;
}

+ 22
- 0
common/web/sass/_common.scss View File

@@ -1,5 +1,21 @@
@import "compass";

/* Environnement beta */
.badge-environment-beta {
position: relative;
display: inline-block;
font-size: 13px;
line-height: 20px;
font-family: 'worksans_semibold';
font-weight: normal;
padding: 1px 10px;
border-radius: 10px;
color: white;
background-color: black;
text-align: center;
vertical-align: baseline;
}

#main {
/* Boutons */
.btn-primary,
@@ -211,6 +227,12 @@
z-index: 999;
background-color: white;

.badge-environment-beta {
position: absolute;
top: 8px;
left: 15px;
}

.nav-user-top {
position: absolute;
top: 0px;

+ 26
- 0
console/migrations/m240521_081937_add_column_product_is_available_for_subscriptions.php View File

@@ -0,0 +1,26 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

/**
* Class m240521_081937_add_column_product_is_available_for_subscriptions
*/
class m240521_081937_add_column_product_is_available_for_subscriptions extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('product', 'is_available_for_subscriptions', Schema::TYPE_BOOLEAN.' DEFAULT 1');
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('product', 'is_available_for_subscriptions');
}
}

+ 1
- 0
domain/Feature/Feature/Feature.php View File

@@ -49,6 +49,7 @@ class Feature extends ActiveRecordCommon
const ALIAS_ONLINE_PAYMENT = 'online_payment';
const ALIAS_EXPORT_SHOPPING_CART_LABELS_ADVANCED = 'export_shopping_cart_labels_advanced';
const ALIAS_SETTINGS = 'settings';
const ALIAS_SHOP_SUPPORT = 'shop_support';

/**
* @inheritdoc

+ 5
- 1
domain/Feature/Feature/FeatureChecker.php View File

@@ -28,7 +28,11 @@ class FeatureChecker extends AbstractChecker
return false;
}

$featureProducer = $this->featureProducerRepository->findOneFeatureProducer($feature);
$featureProducer = null;
if($this->getProducerContext(false)) {
$featureProducer = $this->featureProducerRepository->findOneFeatureProducer($feature);
}

if(!$featureProducer || is_null($featureProducer->status)) {
if($feature->is_paid_feature || $feature->only_for_selected_producers) {
return false;

+ 2
- 1
domain/Feature/Feature/FeatureDefinition.php View File

@@ -18,7 +18,8 @@ class FeatureDefinition extends AbstractDefinition
Feature::ALIAS_PRODUCT_PRICE_IMPORT => 'Produits : import prix',
Feature::ALIAS_ONLINE_PAYMENT => 'Paiement en ligne',
Feature::ALIAS_EXPORT_SHOPPING_CART_LABELS_ADVANCED => "Génération d'étiquettes avec un format spécifique",
Feature::ALIAS_SETTINGS => 'Système de paramètres'
Feature::ALIAS_SETTINGS => 'Système de paramètres',
Feature::ALIAS_SHOP_SUPPORT => 'Support boutique'
];
}
}

+ 5
- 0
domain/PointSale/PointSale/PointSaleSolver.php View File

@@ -105,6 +105,11 @@ class PointSaleSolver extends AbstractService implements SolverInterface
return $str;
}

public function getStrInfosByDistribution(PointSale $pointSale, Distribution $distribution): string
{
return $this->getStrInfos($pointSale, strtolower(date('l', strtotime($distribution->date))));
}

public function getLocalityWithAddressTooltip(PointSale $pointSale): string
{
$html = '<span class="locality">';

+ 23
- 8
domain/Producer/Producer/ProducerSeoGenerator.php View File

@@ -18,12 +18,22 @@ class ProducerSeoGenerator extends AbstractGenerator
$this->pointSaleRepository = $this->loadService(PointSaleRepository::class);
}

public function generateMetaDescriptionHome()
public function limitMetaDescriptionLength(string $metaDescription): string
{
$length = 160;
if(strlen($metaDescription) > $length) {
return substr(strip_tags($metaDescription), 0, $length) . ' ...';
}

return $metaDescription;
}

public function generateMetaDescriptionHome(): string
{
$producer = $this->getProducerContext();

if($producer->description) {
$metaDescription = substr(strip_tags($producer->description), 0, 200);
return $this->limitMetaDescriptionLength($producer->description);
}
else {
$metaDescription = "Bienvenue sur la boutique du producteur ".Html::encode($producer->name);
@@ -32,7 +42,7 @@ class ProducerSeoGenerator extends AbstractGenerator
return $metaDescription;
}

public function generateMetaDescriptionProducts()
public function generateMetaDescriptionProducts(): string
{
$metaDescription = '';
$productsArray = $this->productRepository->findProducts();
@@ -45,10 +55,10 @@ class ProducerSeoGenerator extends AbstractGenerator
$metaDescription = substr($metaDescription, 0, strlen($metaDescription) - 2);
}

return $metaDescription;
return $this->limitMetaDescriptionLength($metaDescription);
}

public function generateMetaDescriptionPointsSale()
public function generateMetaDescriptionPointsSale(): string
{
$metaDescription = '';
$pointsSaleArray = $this->pointSaleRepository->findPointSales();
@@ -61,19 +71,24 @@ class ProducerSeoGenerator extends AbstractGenerator
$metaDescription = substr($metaDescription, 0, strlen($metaDescription) - 2);
}

return $metaDescription;
return $this->limitMetaDescriptionLength($metaDescription);
}

public function generateMetaDescriptionOrder()
public function generateMetaDescriptionOrder(): string
{
$producer = $this->getProducerContext();
return "Passez commande chez ".Html::encode($producer->name)." à la date et au lieu de votre choix.";
}

public function generateMetaDescriptionContact()
public function generateMetaDescriptionContact(): string
{
$producer = $this->getProducerContext();
return 'Contactez ce producteur en utilisant le formulaire de contact. '
.Html::encode($producer->name.', '.$producer->address.' '.$producer->postcode.' '.$producer->city);
}

public function generateMetaDescriptionSupport()
{
return 'Vous rencontrez un problème ? Contactez le développeur du logiciel en utilisant ce formulaire de contact pour poser vos questions ou faire remonter un bug.';
}
}

+ 2
- 1
domain/Product/Product/Product.php View File

@@ -123,7 +123,7 @@ class Product extends ActiveRecordCommon implements StatusInterface
return [
[['name', 'id_producer'], 'required'],
[['order', 'id_producer', 'id_tax_rate', 'id_product_category', 'status'], 'integer'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'unavailable', 'apply_distributions', 'available_on_points_sale'], 'boolean'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'unavailable', 'apply_distributions', 'available_on_points_sale', 'is_available_for_subscriptions'], 'boolean'],
[['price', 'weight', 'step', 'quantity_max', 'quantity_max_monday', 'quantity_max_tuesday', 'quantity_max_wednesday', 'quantity_max_thursday', 'quantity_max_friday', 'quantity_max_saturday', 'quantity_max_sunday'], 'number'],
[['photoFile'], 'file', 'extensions' => 'png, jpg, jpeg', 'mimeTypes' => 'image/png, image/jpeg'],
[['name', 'reference', 'description', 'photo', 'unit'], 'string', 'max' => 255],
@@ -176,6 +176,7 @@ class Product extends ActiveRecordCommon implements StatusInterface
'id_product_category' => 'Catégorie',
'available_on_points_sale' => 'Par défaut',
'status' => 'Actif',
'is_available_for_subscriptions' => 'Disponible pour les abonnements'
];
}


+ 2
- 0
domain/Product/Product/ProductBuilder.php View File

@@ -10,6 +10,8 @@ class ProductBuilder extends AbstractBuilder
{
$product = new Product();

$product->is_available_for_subscriptions = true;

return $product;
}


+ 17
- 0
domain/Subscription/Subscription/Event/ProductObserver.php View File

@@ -0,0 +1,17 @@
<?php

namespace domain\Subscription\Subscription\Event;

use domain\Subscription\Subscription\SubscriptionModule;
use justcoded\yii2\eventlistener\observers\ActiveRecordObserver;

class ProductObserver extends ActiveRecordObserver
{
public function updated(\yii\db\AfterSaveEvent $event)
{
$product = $event->sender;

// Désactivation du produit dans les abonnements s'il est configuré comme indisponible pour les abonnements
SubscriptionModule::getInstance()->getManager()->deleteProductInSubscriptionsIfUnavailableForSubscriptions($product);
}
}

+ 58
- 0
domain/Subscription/Subscription/SubscriptionManager.php View File

@@ -0,0 +1,58 @@
<?php

namespace domain\Subscription\Subscription;

use domain\_\AbstractManager;
use domain\Product\Product\Product;
use domain\Subscription\ProductSubscription\ProductSubscription;

class SubscriptionManager extends AbstractManager
{
protected SubscriptionRepository $subscriptionRepository;
protected SubscriptionSolver $subscriptionSolver;

public function loadDependencies(): void
{
$this->subscriptionRepository = $this->loadService(SubscriptionRepository::class);
$this->subscriptionSolver = $this->loadService(SubscriptionSolver::class);
}

public function deleteProductInSubscriptionsIfUnavailableForSubscriptions(Product $product): void
{
$subscriptionsWithProductDeletedArray = [];
if(!$product->is_available_for_subscriptions) {
$subscriptionsArray = $this->subscriptionRepository->findSubscriptions();

foreach($subscriptionsArray as $subscription) {
if($this->deleteProductUnavailableInSubscriptions($subscription, $product)) {
$subscriptionsWithProductDeletedArray[] = $subscription;
}
}
}

if(count($subscriptionsWithProductDeletedArray)) {
\Yii::$app->session->addFlash('warning', 'Le produit a été supprimé des abonnements suivants : '.$this->subscriptionSolver->getSubscriptionsListAsHtml($subscriptionsWithProductDeletedArray));
}
}

public function deleteProductUnavailableInSubscriptions(Subscription $subscription, Product $product): bool
{
if(!$product->is_available_for_subscriptions
&& $this->subscriptionSolver->containProduct($subscription, $product)) {

foreach($subscription->productSubscription as $productSubscription) {
if($productSubscription->id_product == $product->id) {

// Si le produit n'est pas le seul dans l'abonnement
if(count($subscription->productSubscription) > 1) {
$productSubscription->delete();
}
}
}

return true;
}

return false;
}
}

+ 6
- 0
domain/Subscription/Subscription/SubscriptionModule.php View File

@@ -13,6 +13,7 @@ class SubscriptionModule extends AbstractModule
SubscriptionSolver::class,
SubscriptionRepository::class,
SubscriptionBuilder::class,
SubscriptionManager::class,
OrderManager::class,
];
}
@@ -37,6 +38,11 @@ class SubscriptionModule extends AbstractModule
return SubscriptionBuilder::getInstance();
}

public function getManager(): SubscriptionManager
{
return SubscriptionManager::getInstance();
}

public function getOrderManager(): OrderManager
{
return OrderManager::getInstance();

+ 22
- 2
domain/Subscription/Subscription/SubscriptionRepository.php View File

@@ -2,6 +2,7 @@

namespace domain\Subscription\Subscription;

use domain\Product\Product\Product;
use domain\User\User\User;
use domain\_\AbstractRepository;

@@ -58,11 +59,16 @@ class SubscriptionRepository extends AbstractRepository
return $subscriptionReturnArray;
}

public function countSubscriptionsByUser(User $user)
public function findSubscriptionsByUser(User $user)
{
return $this->createDefaultQuery()
->filterByUser($user)
->count();
->find();
}

public function countSubscriptionsByUser(User $user)
{
return count($this->findSubscriptionsByUser($user));
}

public function findSubscriptionsLatestAdded()
@@ -71,4 +77,18 @@ class SubscriptionRepository extends AbstractRepository
->filterByCreatedOrUpdatedByUserDuringPastWeek()
->find();
}

public function findSubscriptionsWithProduct(Product $product)
{
$subscriptionsArray = $this->createDefaultQuery()->find();
$subscriptionsWithProductArray = [];

foreach($subscriptionsArray as $subscription) {
if($this->subscriptionSolver->containProduct($subscription, $product)) {
$subscriptionsWithProductArray[] = $subscription;
}
}

return $subscriptionsWithProductArray;
}
}

+ 1
- 1
domain/Subscription/Subscription/SubscriptionSearch.php View File

@@ -49,7 +49,7 @@ class SubscriptionSearch extends Subscription
public function rules()
{
return [
[['id_point_sale', 'week_frequency'], 'integer'],
[['id_user', 'id_point_sale', 'week_frequency'], 'integer'],
[['auto_payment'], 'boolean'],
[['date_begin', 'username','product_name', 'day'], 'safe'],
];

+ 32
- 0
domain/Subscription/Subscription/SubscriptionSolver.php View File

@@ -148,4 +148,36 @@ class SubscriptionSolver extends AbstractService implements SolverInterface
return '<span class="glyphicon glyphicon-warning-sign"></span> Aucun jour' ;
}
}

public function getWeekFrequencyAsString(Subscription $subscription): string
{
if($subscription->week_frequency == 1) {
return 'Toutes les semaines' ;
}
else {
return 'Toutes les '.$subscription->week_frequency.' semaines' ;
}
}

public function containProduct(Subscription $subscription, Product $product): bool
{
foreach($subscription->productSubscription as $productSubscription) {
if($productSubscription->id_product == $product->id) {
return true;
}
}

return false;
}

public function getSubscriptionsListAsHtml(array $subscriptionsArray): string
{
$subscriptionSolver = $this;
return implode(
', ',
array_map(function($subscription) use ($subscriptionSolver) {
return Html::a($subscriptionSolver->getUsername($subscription), ['subscription/update', 'id' => $subscription->id]);
}, $subscriptionsArray)
);
}
}

+ 7
- 3
domain/User/User/UserRepository.php View File

@@ -213,9 +213,13 @@ class UserRepository extends AbstractRepository
*/
public function findOneUserByEmail(string $email): ?User
{
return $this->createDefaultQuery()
->filterByEmail($email)
->findOne();
return User::searchOne(
['email' => $email],
[
'conditions' => 'type LIKE :type_individual OR type LIKE :type_legal_person',
'params' => [':type_individual' => User::TYPE_INDIVIDUAL, ':type_legal_person' => User::TYPE_LEGAL_PERSON]
]
);
}

public function findOneUserByUsername(string $username): ?User

+ 1
- 1
domain/_/ProducerContextTrait.php View File

@@ -7,7 +7,7 @@ use yii\base\ErrorException;

trait ProducerContextTrait
{
protected ?Producer $producerContext;
protected ?Producer $producerContext = null;

public function setProducerContext(Producer $producer = null): self
{

+ 3
- 4
frontend/forms/PasswordResetRequestForm.php View File

@@ -40,6 +40,7 @@ namespace frontend\forms;

use domain\User\User\User;
use domain\User\User\UserModule;
use domain\User\User\UserRepository;
use yii\base\Model;

/**
@@ -70,12 +71,10 @@ class PasswordResetRequestForm extends Model
*
* @return boolean whether the email was send
*/
public function sendEmail()
public function sendEmail()
{
$userModule = UserModule::getInstance();
$user = User::findOne([
'email' => $this->email,
]);
$user = $userModule->getRepository()->findOneUserByEmail($this->email);

if ($user) {
if (!$userModule->isPasswordResetTokenValid($user->password_reset_token)) {

+ 3
- 0
frontend/views/layouts/main.php View File

@@ -39,6 +39,7 @@
use common\helpers\GlobalParam;
use domain\Setting\SettingModule;
use domain\User\User\UserModule;
use common\helpers\Environment;
use yii\bootstrap5\Nav;
use yii\helpers\Html;

@@ -63,6 +64,7 @@ $adminSettingBag = $settingModule->getAdminSettingBag();
<meta name="baseurl" content="<?= Yii::$app->urlManagerFrontend->baseUrl; ?>">
<meta name="baseurl-absolute"
content="<?= Yii::$app->urlManagerFrontend->getHostInfo() . Yii::$app->urlManagerBackend->baseUrl; ?>">
<?= Environment::metaRobotsNoIndexBeta(); ?>
<?= Html::csrfMetaTags() ?>
<link rel="icon" type="image/png" href="<?= $this->getUrlManager()->getBaseUrl(); ?>/img/favicon-souke-1.png">
<!--[if IE]><link rel="shortcut icon" type="image/x-icon" href="<?= \Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon.ico"><![endif]-->
@@ -89,6 +91,7 @@ $adminSettingBag = $settingModule->getAdminSettingBag();
<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"/>
<?= Environment::badgeBeta();; ?>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>

+ 1
- 1
frontend/views/site/contact.php View File

@@ -76,7 +76,7 @@ $this->params['breadcrumbs'][] = $this->title;
</div>
<div class="col-md-4">
<div class="alert alert-dark">
Ce formulaire de contact vous permet de joindre le développeur de la plateforme Souke.
Ce formulaire de contact vous permet de joindre le développeur du logiciel Souke.
Si vous souhaitez joindre un producteur, merci de le faire directement depuis sa boutique.
</div>
</div>

+ 4
- 1
frontend/views/site/login.php View File

@@ -53,11 +53,14 @@ $this->params['breadcrumbs'][] = $this->title;
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'rememberMe')->checkbox() ?>
<p>
Si vous avez oublié votre mot de passe, vous pouvez le <?= Html::a('réinitialiser', ['site/request-password-reset']) ?>.
<?= Html::a('Mot de passe oublié ?', ['site/request-password-reset']) ?>
</p>
<div class="form-group form-buttons">
<?= Html::submitButton('<i class="bi bi-box-arrow-in-right"></i> Connexion', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
</div>
<p class="need-help-login-signup">
Besoin d'aide ? <a href="<?= Yii::$app->urlManager->createUrl(['site/contact']) ?>">Contactez-nous</a>
</p>
<?php ActiveForm::end(); ?>
</div>
</div>

+ 6
- 0
frontend/views/site/producer.php View File

@@ -89,6 +89,9 @@ $this->setMeta('description', 'Connectez-vous pour passer commande auprès du pr
<div class="form-group form-buttons">
<?= Html::submitButton('<i class="bi bi-box-arrow-in-right"></i> Connexion', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
</div>
<p class="need-help-login-signup">
Besoin d'aide ? <a href="<?= Yii::$app->urlManager->createUrl(['site/contact']) ?>">Contactez-nous</a>
</p>
<?php ActiveForm::end(); ?>
</div>
</div>
@@ -130,6 +133,9 @@ $this->setMeta('description', 'Connectez-vous pour passer commande auprès du pr
<div class="form-group form-buttons" id="boutons-inscrire">
<?= Html::submitButton("<i class=\"bi bi-person-plus\"></i> S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
</div>
<p class="need-help-login-signup">
Besoin d'aide ? <a href="<?= Yii::$app->urlManager->createUrl(['site/contact']) ?>">Contactez-nous</a>
</p>
<?php ActiveForm::end(); ?>
</div>
</div>

+ 8
- 2
frontend/views/site/service.php View File

@@ -35,9 +35,11 @@
* termes.
*/

use domain\Feature\Feature\Feature;
use yii\helpers\Html;

$producerModule = $this->getProducerModule();
$featureModule = $this->getFeatureModule();

$this->setTitle('Fonctionnalités, services & tarifs');
$this->setMeta('description', "Découvrez les fonctionnalités du logiciel, les services proposés et les tarifs pour l’hébergement de votre circuit court sur Souke.");
@@ -122,8 +124,12 @@ $this->setMeta('description', "Découvrez les fonctionnalités du logiciel, les
<div class="panel-body">
<h3>Support</h3>
<p>Je suis disponible pour répondre rapidement à toutes vos questions par email
ou par
téléphone.</p>
ou par téléphone.
<?php if($featureModule->getChecker()->isEnabled(Feature::ALIAS_SHOP_SUPPORT)): ?>
<br />J'assure également le support pour vos clients s'ils
rencontrent un problème dans l'utilisation du logiciel.
<?php endif; ?>
</p>
</div>
</div>
<div class="panel panel-default">

+ 3
- 0
frontend/views/site/signup.php View File

@@ -119,6 +119,9 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="form-group form-buttons" id="buttons-signup">
<?= Html::submitButton("<i class=\"bi bi-person-plus\"></i> S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
</div>
<p class="need-help-login-signup">
Besoin d'aide ? <a href="<?= Yii::$app->urlManager->createUrl(['site/contact']) ?>">Contactez-nous</a>
</p>
<?php ActiveForm::end(); ?>
<?php endif; ?>
</div>

+ 1
- 1
frontend/views/site/signup_confirm.php View File

@@ -40,7 +40,7 @@ use domain\User\User\UserModule;

$this->setTitle('Inscription confirmée') ;
$this->setIcon('check');
$this->setMeta('description', 'Inscrivez-vous afin de profiter des fonctionnalités de la plateforme.');
$this->setMeta('description', 'Inscrivez-vous afin de profiter des fonctionnalités du logiciel.');
$this->params['breadcrumbs'][] = $this->title;

$userModule = UserModule::getInstance();

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


+ 12
- 0
frontend/web/sass/screen.scss View File

@@ -295,6 +295,11 @@ section#header-title {
color: $color-primary;
}
}

.badge-environment-beta {
top: 28px;
left: 10px;
}
}

nav {
@@ -1117,6 +1122,13 @@ $max-width-form: 500px;
@include border-radius(5px) ;
}

.need-help-login-signup {
margin-top: 30px;
margin-bottom: 0px;
padding-bottom: 0px !important;
text-align: center;
}

.site-login {
.col-lg-5 {
margin: 0px auto;

+ 5
- 2
producer/controllers/OrderController.php View File

@@ -444,7 +444,10 @@ class OrderController extends ProducerBaseController
]);
$productOrder->unit = $product->unit;
$productOrder->step = $product->step;
$productOrder->save();

if($quantity) {
$productOrder->save();
}
}
}

@@ -862,7 +865,7 @@ class OrderController extends ProducerBaseController
'id_point_sale' => $pointSale['id']
]);

$pointSale['infos'] = $pointSaleModule->getStrInfos($pointSaleObject, strtolower(date('l', strtotime($distribution->date))));
$pointSale['infos'] = $pointSaleModule->getSolver()->getStrInfosByDistribution($pointSaleObject, $distribution);
}

$pointSale['position'] = $position;

+ 31
- 1
producer/controllers/SiteController.php View File

@@ -47,7 +47,6 @@ use yii\helpers\Html;

class SiteController extends ProducerBaseController
{

/**
* @inheritdoc
*/
@@ -221,6 +220,37 @@ class SiteController extends ProducerBaseController
]);
}

public function actionSupport()
{
$featureModule = $this->getFeatureModule();
if($featureModule->getChecker()->isDisabled(Feature::ALIAS_SHOP_SUPPORT)) {
return $this->redirect(['site/index']);
}

$model = new ContactForm();
$producer = $this->getProducerCurrent();

if ($model->load(\Yii::$app->request->post()) && $model->validate()) {
$isSent = false;
if ($model->sendEmailShopSupport($producer)) {
$isSent = true;
}

if ($isSent) {
$this->setFlash('success', 'Votre message a bien été envoyé.');
} else {
$this->setFlash('error', 'Il y a eu une erreur lors de l\'envoi de votre message.');
}

$model = new ContactForm();
}

return $this->render('support', [
'model' => $model,
'producer' => $this->getProducerCurrent()
]);
}

/**
* Ajoute ou supprime un producteur des favoris de l'utilisateur.
* Redirige vers la page d'accueil du producteur.

+ 15
- 5
producer/views/layouts/main.php View File

@@ -36,6 +36,7 @@
* termes.
*/

use common\helpers\Environment;
use common\helpers\GlobalParam;
use common\helpers\Image;
use domain\Feature\Feature\Feature;
@@ -85,6 +86,7 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ;
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="base-url" content="<?= \Yii::$app->urlManager->baseUrl; ?>">
<meta name="slug-producer" content="<?= $producer->slug; ?>">
<?= Environment::metaRobotsNoIndexBeta(); ?>
<?= Html::csrfMetaTags() ?>
<link rel="icon" type="image/png"
href="<?php echo \Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon-souke-1.png"/>
@@ -287,7 +289,7 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ;
],
[
'url' => $this->getUrlManagerProducer()->createUrl(['site/points-sale']),
'label' => 'Points de vente <span class="label label-default">'.$pointSaleModule->getRepository()->countPointSalesPublic().'</span>',
'label' => $producerModule->getSolver()->getPointSaleWording($producer).' <span class="label label-default">'.$pointSaleModule->getRepository()->countPointSalesPublic().'</span>',
'active' => $this->getControllerAction() == 'site/points-sale',
],
];
@@ -302,10 +304,8 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ;
}

?>

</nav>


<div id="infos-producer">
<?php if (!$this->getProducerModule()->hasSpecificDelays($producer) && $producer->order_deadline && $producer->order_delay): ?>
<span data-toggle="tooltip" data-placement="bottom" title="Heure limite de commande">
@@ -390,9 +390,19 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ;

<footer id="footer" class="container">
<div class="content">
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>">Souke</a> &bull;
<!--<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>">Souke</a> &bull;
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/mentions']); ?>">Mentions légales</a> &bull;
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']); ?>">CGS</a>
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']); ?>">CGS</a>-->

<?php if($featureModule->getChecker()->isEnabled(Feature::ALIAS_SHOP_SUPPORT)): ?>
<div id="button-shop-support">
<a href="<?= Yii::$app->urlManager->createUrl(['site/support']) ?>" class="btn btn-sm btn-secondary">
<i class="bi bi-life-preserver"></i>
Besoin d'aide ?
</a>
</div>
<?php endif; ?>

</div>
</footer>
<script type="text/javascript" src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Intl.~locale.fr"></script>

+ 2
- 2
producer/views/site/points-sale.php View File

@@ -54,8 +54,8 @@ $pointSaleModule = PointSaleModule::getInstance();

$producer = $this->context->getProducerCurrent();

$this->setTitle('Points de vente');
$this->setPageTitle('Points de vente');
$this->setTitle($producerModule->getSolver()->getPointSaleWording($producer));
$this->setPageTitle($producerModule->getSolver()->getPointSaleWording($producer));
$this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDescriptionPointsSale());

?>

+ 87
- 0
producer/views/site/support.php View File

@@ -0,0 +1,87 @@
<?php

/**
Copyright Souke (2018)

contact@souke.fr

Ce logiciel est un programme informatique servant à aider les producteurs
à distribuer leur production en circuits courts.

Ce logiciel est régi par la licence CeCILL soumise au droit français et
respectant les principes de diffusion des logiciels libres. Vous pouvez
utiliser, modifier et/ou redistribuer ce programme sous les conditions
de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
sur le site "http://www.cecill.info".

En contrepartie de l'accessibilité au code source et des droits de copie,
de modification et de redistribution accordés par cette licence, il n'est
offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
seule une responsabilité restreinte pèse sur l'auteur du programme, le
titulaire des droits patrimoniaux et les concédants successifs.

A cet égard l'attention de l'utilisateur est attirée sur les risques
associés au chargement, à l'utilisation, à la modification et/ou au
développement et à la reproduction du logiciel par l'utilisateur étant
donné sa spécificité de logiciel libre, qui peut le rendre complexe à
manipuler et qui le réserve donc à des développeurs et des professionnels
avertis possédant des connaissances informatiques approfondies. Les
utilisateurs sont donc invités à charger et tester l'adéquation du
logiciel à leurs besoins dans des conditions permettant d'assurer la
sécurité de leurs systèmes et ou de leurs données et, plus généralement,
à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.

Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

use domain\Producer\Producer\ProducerModule;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;

$producerModule = ProducerModule::getInstance();

$this->setTitle('Support technique');
$this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDescriptionSupport());

?>
<div class="site-support">
<div class="row">
<div class="col-lg-6">
<?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]) ?>
<?php echo $form->field($model, 'verifyCode')->widget(yii\captcha\Captcha::className(), [
'template' => '<div class="row"><div class="col-md-12">{image}</div><div class="col-md-12">{input}</div></div>',
]); ?>
<?= $form->field($model, 'isTest')->hiddenInput() ?>
<div class="form-group form-buttons">
<?= Html::submitButton('<i class="bi bi-send"></i> Envoyer', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<div class="col-lg-6">
<br />
<div class="card">
<div class="card-body">
<h5 class="card-title">
<i class="bi bi-life-preserver"></i>
Vous rencontrez un problème ?
</h5>
<div class="card-text">
<p>Si vous avez une question ou un problème dans l'utilisation du logiciel, n'hésitez
pas à contacter le développeur en utilisant le formulaire ci-contre. Une réponse vous
sera apportée au plus vite.</p>

<p>Si vous souhaitez contacter votre producteur, merci de privilégier le
<a href="<?= Yii::$app->urlManager->createUrl(['site/contact']) ?>">formulaire de contact</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>

+ 1
- 1
producer/views/subscription/_form.php View File

@@ -224,7 +224,7 @@ $orderModule = OrderModule::getInstance();
</tr>
</thead>
<tbody>
<tr v-for="product in products" v-if="checkProductAvailable(product)">
<tr v-for="product in products" v-if="checkProductAvailable(product) && (product.is_available_for_subscriptions == 1 || (product.is_available_for_subscriptions == 0 && product.quantity > 0))">
<td>
<div class="name">{{ product.name }} <span v-if="product.weight">({{ product.weight }}g)</span></div>
<div class="description">{{ product.description }}</div>

+ 56
- 54
producer/web/css/screen.css View File

@@ -260,10 +260,11 @@ ul.pagination li.prev a, ul.pagination li.next a {
}
/* line 224, ../sass/_layout.scss */
#header nav#main-nav {
position: relative;
background-color: #ece4d8;
margin-top: 0px;
}
/* line 230, ../sass/_layout.scss */
/* line 231, ../sass/_layout.scss */
#header nav#main-nav ul li a {
display: inline-block;
padding: 8px 12px;
@@ -274,11 +275,11 @@ ul.pagination li.prev a, ul.pagination li.next a {
-webkit-box-shadow: -20px 0px 20px 0px #ece4d8 inset;
box-shadow: -20px 0px 20px 0px #ece4d8 inset;
}
/* line 238, ../sass/_layout.scss */
/* line 239, ../sass/_layout.scss */
#header nav#main-nav ul li a .bi {
margin-right: 3px;
}
/* line 242, ../sass/_layout.scss */
/* line 243, ../sass/_layout.scss */
#header nav#main-nav ul li a span.label {
display: inline-block;
position: relative;
@@ -296,11 +297,11 @@ ul.pagination li.prev a, ul.pagination li.next a {
text-transform: uppercase;
border: solid 1px transparent;
}
/* line 258, ../sass/_layout.scss */
/* line 259, ../sass/_layout.scss */
#header nav#main-nav ul li a .hide-desktop {
display: none;
}
/* line 263, ../sass/_layout.scss */
/* line 264, ../sass/_layout.scss */
#header nav#main-nav ul li a.active,
#header nav#main-nav ul li a:hover {
color: white;
@@ -308,16 +309,16 @@ ul.pagination li.prev a, ul.pagination li.next a {
-webkit-box-shadow: none;
box-shadow: none;
}
/* line 268, ../sass/_layout.scss */
/* line 269, ../sass/_layout.scss */
#header nav#main-nav ul li a.active span.label-success,
#header nav#main-nav ul li a:hover span.label-success {
border: solid 1px white !important;
}
/* line 274, ../sass/_layout.scss */
/* line 275, ../sass/_layout.scss */
#header nav#main-nav ul.submenu {
background-color: white;
}
/* line 278, ../sass/_layout.scss */
/* line 279, ../sass/_layout.scss */
#header nav#main-nav ul.submenu li a {
background-color: white;
font-size: 0.9em;
@@ -326,34 +327,34 @@ ul.pagination li.prev a, ul.pagination li.next a {
box-shadow: none;
border-bottom: solid 2px #f4efe8;
}
/* line 284, ../sass/_layout.scss */
/* line 285, ../sass/_layout.scss */
#header nav#main-nav ul.submenu li a span.label {
background-color: white;
border: solid 1px #b7ab9b;
color: #b7ab9b;
}
/* line 291, ../sass/_layout.scss */
/* line 292, ../sass/_layout.scss */
#header nav#main-nav ul.submenu li a.active,
#header nav#main-nav ul.submenu li a:hover {
color: black;
background-color: white;
border-bottom: solid 2px #b7ab9b !important;
}
/* line 301, ../sass/_layout.scss */
/* line 302, ../sass/_layout.scss */
#header nav#main-nav #user {
color: #ee6f42;
float: right;
padding: 10px;
}

/* line 309, ../sass/_layout.scss */
/* line 310, ../sass/_layout.scss */
#main {
padding: 0px;
padding-top: 38px;
margin-bottom: 30px;
margin-bottom: 15px;
background-color: white;
}
/* line 315, ../sass/_layout.scss */
/* line 316, ../sass/_layout.scss */
#main #banner {
height: 180px;
overflow: hidden;
@@ -361,7 +362,7 @@ ul.pagination li.prev a, ul.pagination li.next a {
background-size: cover;
background-position: center;
}
/* line 323, ../sass/_layout.scss */
/* line 324, ../sass/_layout.scss */
#main #infos-producer {
display: none;
padding: 5px 10px;
@@ -371,118 +372,119 @@ ul.pagination li.prev a, ul.pagination li.next a {
border-bottom: solid 1px #e0e0e0;
color: gray;
}
/* line 332, ../sass/_layout.scss */
/* line 333, ../sass/_layout.scss */
#main #infos-producer strong {
font-weight: bold;
}
/* line 336, ../sass/_layout.scss */
/* line 337, ../sass/_layout.scss */
#main #infos-producer .favorite {
float: right;
color: gray;
}
/* line 339, ../sass/_layout.scss */
/* line 340, ../sass/_layout.scss */
#main #infos-producer .favorite a {
color: black;
}
/* line 345, ../sass/_layout.scss */
/* line 346, ../sass/_layout.scss */
#main h2#page-title {
margin-top: 0px;
font-family: "worksans_bold";
font-size: 30px;
line-height: 40px;
}
/* line 356, ../sass/_layout.scss */
/* line 357, ../sass/_layout.scss */
#main #content {
position: relative;
padding: 40px;
min-height: 300px;
}
/* line 360, ../sass/_layout.scss */
/* line 362, ../sass/_layout.scss */
#main #content h1, #main #content h2, #main #content h3, #main #content h4, #main #content h5, #main #content h6 {
font-family: "worksans_bold";
margin-bottom: 20px;
color: black;
}
/* line 365, ../sass/_layout.scss */
/* line 367, ../sass/_layout.scss */
#main #content h1.first, #main #content h2.first, #main #content h3.first, #main #content h4.first, #main #content h5.first, #main #content h6.first {
margin-top: 0px;
}
/* line 370, ../sass/_layout.scss */
/* line 372, ../sass/_layout.scss */
#main #content h1 {
font-size: 30px;
}
/* line 374, ../sass/_layout.scss */
/* line 376, ../sass/_layout.scss */
#main #content h2 {
font-size: 25px;
}
/* line 378, ../sass/_layout.scss */
/* line 380, ../sass/_layout.scss */
#main #content h3 {
font-size: 1.4em;
text-align: left;
margin-bottom: 30px;
}
/* line 383, ../sass/_layout.scss */
/* line 385, ../sass/_layout.scss */
#main #content h3 span {
padding-top: 14px;
color: black;
}
/* line 389, ../sass/_layout.scss */
/* line 391, ../sass/_layout.scss */
#main #content h4 {
font-size: 20px;
}
/* line 393, ../sass/_layout.scss */
/* line 395, ../sass/_layout.scss */
#main #content h5 {
font-size: 18px;
}
/* line 397, ../sass/_layout.scss */
/* line 399, ../sass/_layout.scss */
#main #content h6 {
font-size: 16px;
}
/* line 403, ../sass/_layout.scss */
/* line 405, ../sass/_layout.scss */
#main #content form .form-group .hint-block {
color: gray;
}

/* line 411, ../sass/_layout.scss */
/* line 413, ../sass/_layout.scss */
#footer-producer {
margin-bottom: 30px;
text-align: center;
width: 100%;
}
/* line 416, ../sass/_layout.scss */
/* line 418, ../sass/_layout.scss */
#footer-producer a {
color: #ee6f42;
}
/* line 418, ../sass/_layout.scss */
/* line 420, ../sass/_layout.scss */
#footer-producer a:active {
text-decoration: underline;
}

/* line 424, ../sass/_layout.scss */
/* line 426, ../sass/_layout.scss */
#footer {
display: none;
height: 100px;
float: right;
text-align: center;
text-align: right;
margin-bottom: 50px;
}
/* line 430, ../sass/_layout.scss */
#footer .content {
padding-top: 20px;
color: black;
}
/* line 434, ../sass/_layout.scss */
#footer .content a {
/*a {
color: black ;
font-size: 18px ;
padding-left: 10px ;
padding-right: 10px ;

&:hover {
text-decoration: underline ;
}
}*/
}
/* line 433, ../sass/_layout.scss */
#footer .content #button-shop-support a {
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
border: solid 1px #b7ab9b;
color: black;
font-size: 18px;
padding-left: 10px;
padding-right: 10px;
}
/* line 440, ../sass/_layout.scss */
#footer .content a:hover {
text-decoration: underline;
}
/* line 447, ../sass/_layout.scss */
#footer #code-source img {
height: 20px;
background-color: white;
}

/**

+ 17
- 16
producer/web/sass/_layout.scss View File

@@ -222,6 +222,7 @@ ul.pagination {
}

nav#main-nav {
position: relative;
background-color: $color-gray ;
margin-top: 0px;
@@ -309,7 +310,7 @@ ul.pagination {
#main {
padding: 0px ;
padding-top: 38px;
margin-bottom: 30px;
margin-bottom: 15px;
background-color: white ;
#banner {
@@ -354,9 +355,10 @@ ul.pagination {
}
#content {
position: relative;
padding: 40px;
min-height: 300px ;
h1, h2, h3, h4, h5, h6 {
font-family: 'worksans_bold' ;
margin-bottom: 20px ;
@@ -422,16 +424,21 @@ ul.pagination {
}

#footer {
display: none;
height: 100px ;
float: right ;
text-align: center ;
text-align: right;
margin-bottom: 50px;
.content {
padding-top: 20px ;
color: black ;

a {
#button-shop-support {
a {
@include border-radius(15px);
border: solid 1px $color-gray-dark;
color: black;
background-color: white;
}
}

/*a {
color: black ;
font-size: 18px ;
padding-left: 10px ;
@@ -440,12 +447,6 @@ ul.pagination {
&:hover {
text-decoration: underline ;
}
}
}

#code-source {
img {
height: 20px ;
}
}*/
}
}

Loading…
Cancel
Save