Parcourir la source

Intégration Souke

feature/souke
Guillaume Bourgeois il y a 7 mois
Parent
révision
f6d76a36ae
3 fichiers modifiés avec 93 ajouts et 103 suppressions
  1. +28
    -26
      producer/views/layouts/main.php
  2. +64
    -70
      producer/web/css/screen.css
  3. +1
    -7
      producer/web/sass/_layout.scss

+ 28
- 26
producer/views/layouts/main.php Voir le fichier

@@ -55,7 +55,7 @@ $userCurrent = GlobalParam::getCurrentUser();
$producerModule = ProducerModule::getInstance();
$featureModule = FeatureModule::getInstance();
$producerUser = null;
if($userModule->getAuthorizationChecker()->isGrantedAsProducer($userCurrent)) {
if ($userModule->getAuthorizationChecker()->isGrantedAsProducer($userCurrent)) {
$producerUser = $producerModule->findOneProducerById($userCurrent->id_producer);
}
$producer = $this->context->getProducerCurrent();
@@ -74,7 +74,8 @@ if (!Yii::$app->user->isGuest) {
<meta name="base-url" content="<?= \Yii::$app->urlManager->baseUrl; ?>">
<meta name="slug-producer" content="<?= $producer->slug; ?>">
<?= Html::csrfMetaTags() ?>
<link rel="icon" type="image/png" href="<?php echo \Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon-souke-1.png"/>
<link rel="icon" type="image/png"
href="<?php echo \Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon-souke-1.png"/>
<?php $this->head() ?>
<?= $this->render('@common/views/matomo.php') ?>
</head>
@@ -82,12 +83,20 @@ if (!Yii::$app->user->isGuest) {
<?php $this->beginBody() ?>

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

<div class="container">
<div id="left" class="col-md-3">
<div class="fixed">
<div id="main">
<div id="header">
<?php if (strlen($producer->photo)): ?>
<div id="img-big">
<img class="img-photo"
src="<?= \Yii::$app->urlManager->baseUrl; ?>/uploads/<?= $producer->photo; ?>"
alt="Photo <?= Html::encode($producer->name) ?>"/>
</div>
<?php endif; ?>

<?php if (strlen($producer->logo) && Image::isPhotoExist($producer->logo)): ?>
<div id="logo"<?php if (!is_null($producer->background_color_logo) && strlen($producer->background_color_logo)): ?> style="background-color:<?= Html::encode($producer->background_color_logo); ?>"<?php endif; ?>>
<a href="<?= \Yii::$app->urlManager->createUrl(['site/index']) ?>">
@@ -172,7 +181,7 @@ if (!Yii::$app->user->isGuest) {
'active' => $this->getControllerAction() == 'credit/history',
],
[
'label' => '<span class="glyphicon glyphicon-bullhorn"></span> Bulletin d\'information <span class="label label-'.($isUserSubscribedNewsletter ? 'success' : 'danger').'">'.($isUserSubscribedNewsletter ? 'Oui' : 'Non').'</span>',
'label' => '<span class="glyphicon glyphicon-bullhorn"></span> Bulletin d\'information <span class="label label-' . ($isUserSubscribedNewsletter ? 'success' : 'danger') . '">' . ($isUserSubscribedNewsletter ? 'Oui' : 'Non') . '</span>',
'url' => $this->getUrlManagerProducer()->createUrl(['newsletter/index']),
'visible' => !Yii::$app->user->isGuest,
'active' => $this->getControllerAction() == 'newsletter/index',
@@ -187,31 +196,22 @@ if (!Yii::$app->user->isGuest) {
]);
?>
</nav>
</div>
</div>

<div id="main" class="col-md-9">
<?php if (strlen($producer->photo)): ?>
<div id="img-big">
<img class="img-photo" src="<?= \Yii::$app->urlManager->baseUrl; ?>/uploads/<?= $producer->photo; ?>"
alt="Photo <?= Html::encode($producer->name) ?>"/>
</div>
<?php endif; ?>
<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">
<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">
<span class="glyphicon glyphicon-time"></span> Commande avant
<strong><?php echo Html::encode($producer->order_deadline) ?> h</strong></span>,
<span data-toggle="tooltip" data-placement="bottom"
title="Exemple : commande le lundi pour le
<span data-toggle="tooltip" data-placement="bottom"
title="Exemple : commande le lundi pour le
<?php if ($producer->order_delay == 1): ?>mardi<?php elseif ($producer->order_delay == 2): ?>mercredi
<?php elseif ($producer->order_delay == 3): ?>jeudi<?php elseif ($producer->order_delay == 4): ?>vendredi
<?php elseif ($producer->order_delay == 5): ?>samedi<?php elseif ($producer->order_delay == 6): ?>dimanche
<?php elseif ($producer->order_delay == 7): ?>lundi d'après<?php endif; ?>"><strong><?= Html::encode($producer->order_delay) ?> jour<?php if ($producer->order_delay > 1): ?>s<?php endif; ?></strong> à l'avance</span>
<?php endif; ?>
<?php endif; ?>

<?php if (!Yii::$app->user->isGuest): ?>
<span class="favorite">
<?php if (!Yii::$app->user->isGuest): ?>
<span class="favorite">
<?php if ($userProducer && $userProducer->bookmark): ?>
<span class="glyphicon glyphicon-star"></span> <a
href="<?= \Yii::$app->urlManagerProducer->createUrl(['site/bookmarks', 'action' => 'delete']); ?>"
@@ -223,9 +223,10 @@ if (!Yii::$app->user->isGuest) {
title="Ajouter à mes favoris">Favoris</a>
<?php endif; ?>
</span>
<?php endif; ?>
<?php endif; ?>

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

<?php if (strlen($this->getTitle())): ?>
@@ -279,7 +280,8 @@ if (!Yii::$app->user->isGuest) {

<footer id="footer" class="container">
<div class="content">
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>">Opendistrib</a> &bull;
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>">Opendistrib</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>

+ 64
- 70
producer/web/css/screen.css Voir le fichier

@@ -255,20 +255,14 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
}

/* line 177, ../sass/_layout.scss */
#left {
background-color: #FFF8DC;
#header {
text-align: center;
margin-top: 15px;
padding: 0px;
position: relative;
}
/* line 184, ../sass/_layout.scss */
#left .fixed {
position: fixed;
display: none;
}
/* line 190, ../sass/_layout.scss */
#left #logo {
#header #logo {
position: relative;
background-color: white;
width: 110px;
@@ -282,8 +276,8 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
text-align: center;
overflow: hidden;
}
/* line 202, ../sass/_layout.scss */
#left #logo img {
/* line 196, ../sass/_layout.scss */
#header #logo img {
position: absolute;
top: 50%;
left: 50%;
@@ -291,12 +285,12 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
max-width: 90px;
max-height: 90px;
}
/* line 212, ../sass/_layout.scss */
#left h1, #left h2, #left #infos, #left #infos a {
/* line 206, ../sass/_layout.scss */
#header h1, #header h2, #header #infos, #header #infos a {
color: #323232;
}
/* line 216, ../sass/_layout.scss */
#left h1 {
/* line 210, ../sass/_layout.scss */
#header h1 {
text-transform: uppercase;
font-family: "highvoltageregular";
font-size: 25px;
@@ -306,38 +300,38 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
text-align: center;
font-weight: normal;
}
/* line 227, ../sass/_layout.scss */
#left h2 {
/* line 221, ../sass/_layout.scss */
#header h2 {
font-family: "capsuularegular";
font-size: 15px;
font-weight: normal;
text-align: center;
}
/* line 233, ../sass/_layout.scss */
#left h2 .favorite {
/* line 227, ../sass/_layout.scss */
#header h2 .favorite {
padding-left: 0px;
}
/* line 236, ../sass/_layout.scss */
#left h2 .favorite .glyphicon {
/* line 230, ../sass/_layout.scss */
#header h2 .favorite .glyphicon {
font-size: 14px;
}
/* line 241, ../sass/_layout.scss */
#left h2 a {
/* line 235, ../sass/_layout.scss */
#header h2 a {
color: #323232;
}
/* line 247, ../sass/_layout.scss */
#left nav#main-nav {
/* line 241, ../sass/_layout.scss */
#header nav#main-nav {
background-color: white;
border: solid 1px #e0e0e0;
border-bottom: 0px none;
margin-top: 20px;
}
/* line 254, ../sass/_layout.scss */
#left nav#main-nav ul li {
/* line 248, ../sass/_layout.scss */
#header nav#main-nav ul li {
display: block;
}
/* line 257, ../sass/_layout.scss */
#left nav#main-nav ul li a {
/* line 251, ../sass/_layout.scss */
#header nav#main-nav ul li a {
color: #323232;
color: black;
border-bottom: solid 1px #e0e0e0;
@@ -346,46 +340,46 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
display: block;
text-align: left;
}
/* line 266, ../sass/_layout.scss */
#left nav#main-nav ul li a .glyphicon {
/* line 260, ../sass/_layout.scss */
#header nav#main-nav ul li a .glyphicon {
font-size: 15px;
margin-right: 3px;
}
/* line 271, ../sass/_layout.scss */
#left nav#main-nav ul li a span.label {
/* line 265, ../sass/_layout.scss */
#header nav#main-nav ul li a span.label {
padding-bottom: 3px;
font-family: "Arial";
float: right;
}
/* line 279, ../sass/_layout.scss */
#left nav#main-nav ul li.active span.label, #left nav#main-nav ul li a:hover span.label {
/* line 273, ../sass/_layout.scss */
#header nav#main-nav ul li.active span.label, #header nav#main-nav ul li a:hover span.label {
background-color: #e08e0b;
color: white;
}
/* line 285, ../sass/_layout.scss */
#left nav#main-nav ul li a:hover, #left nav#main-nav ul li.active a {
/* line 279, ../sass/_layout.scss */
#header nav#main-nav ul li a:hover, #header nav#main-nav ul li.active a {
background: #F39C12;
color: white;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
}
/* line 294, ../sass/_layout.scss */
#left nav#main-nav ul li#btn-administration a {
/* line 288, ../sass/_layout.scss */
#header nav#main-nav ul li#btn-administration a {
color: #F39C12;
}
/* line 297, ../sass/_layout.scss */
#left nav#main-nav ul li#btn-administration a:hover {
/* line 291, ../sass/_layout.scss */
#header nav#main-nav ul li#btn-administration a:hover {
color: white;
}
/* line 305, ../sass/_layout.scss */
#left nav#main-nav #user {
/* line 299, ../sass/_layout.scss */
#header nav#main-nav #user {
color: #F39C12;
float: right;
padding: 10px;
}

/* line 313, ../sass/_layout.scss */
/* line 307, ../sass/_layout.scss */
#main {
background-color: #FFF8DC;
border: solid 1px #e0e0e0;
@@ -393,13 +387,13 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
padding: 0px;
background-color: white;
}
/* line 320, ../sass/_layout.scss */
/* line 314, ../sass/_layout.scss */
#main #img-big {
height: 130px;
overflow: hidden;
position: relative;
}
/* line 325, ../sass/_layout.scss */
/* line 319, ../sass/_layout.scss */
#main #img-big img.img-photo {
width: 100%;
position: absolute;
@@ -407,7 +401,7 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
left: 50%;
transform: translate(-50%, -50%);
}
/* line 335, ../sass/_layout.scss */
/* line 329, ../sass/_layout.scss */
#main #infos-producer {
padding: 5px 10px;
margin-bottom: 0px;
@@ -417,20 +411,20 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
border-bottom: solid 1px #e0e0e0;
color: gray;
}
/* line 344, ../sass/_layout.scss */
/* line 338, ../sass/_layout.scss */
#main #infos-producer strong {
font-weight: bold;
}
/* line 348, ../sass/_layout.scss */
/* line 342, ../sass/_layout.scss */
#main #infos-producer .favorite {
float: right;
color: gray;
}
/* line 351, ../sass/_layout.scss */
/* line 345, ../sass/_layout.scss */
#main #infos-producer .favorite a {
color: black;
}
/* line 357, ../sass/_layout.scss */
/* line 351, ../sass/_layout.scss */
#main h2#page-title {
padding-left: 15px;
padding-right: 15px;
@@ -445,36 +439,36 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
top: -10px;
text-align: left;
}
/* line 371, ../sass/_layout.scss */
/* line 365, ../sass/_layout.scss */
#main h2#page-title #buttons {
margin-bottom: 15px;
font-family: "Arial";
}
/* line 378, ../sass/_layout.scss */
/* line 372, ../sass/_layout.scss */
#main #content {
padding: 0px 20px 20px 20px;
padding-bottom: 40px;
min-height: 300px;
}
/* line 383, ../sass/_layout.scss */
/* line 377, ../sass/_layout.scss */
#main #content h1, #main #content h2, #main #content h3, #main #content h4, #main #content h5, #main #content h6 {
font-family: "highvoltageregular";
margin-top: 30px;
margin-bottom: 20px;
}
/* line 388, ../sass/_layout.scss */
/* line 382, ../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 393, ../sass/_layout.scss */
/* line 387, ../sass/_layout.scss */
#main #content h1 {
font-size: 30px;
}
/* line 397, ../sass/_layout.scss */
/* line 391, ../sass/_layout.scss */
#main #content h2 {
font-size: 25px;
}
/* line 402, ../sass/_layout.scss */
/* line 396, ../sass/_layout.scss */
#main #content h3 {
font-family: "capsuularegular";
text-transform: uppercase;
@@ -483,29 +477,29 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
margin-bottom: 30px;
margin-top: 45px;
}
/* line 410, ../sass/_layout.scss */
/* line 404, ../sass/_layout.scss */
#main #content h3 span {
padding-top: 14px;
color: #323232;
}
/* line 416, ../sass/_layout.scss */
/* line 410, ../sass/_layout.scss */
#main #content h4 {
font-size: 20px;
}
/* line 420, ../sass/_layout.scss */
/* line 414, ../sass/_layout.scss */
#main #content h5 {
font-size: 18px;
}
/* line 424, ../sass/_layout.scss */
/* line 418, ../sass/_layout.scss */
#main #content h6 {
font-size: 16px;
}
/* line 430, ../sass/_layout.scss */
/* line 424, ../sass/_layout.scss */
#main #content form .form-group .hint-block {
color: gray;
}

/* line 438, ../sass/_layout.scss */
/* line 432, ../sass/_layout.scss */
#footer-producer {
text-align: center;
position: absolute;
@@ -513,28 +507,28 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
left: 0px;
width: 100%;
}
/* line 445, ../sass/_layout.scss */
/* line 439, ../sass/_layout.scss */
#footer-producer a {
color: #F39C12;
}
/* line 447, ../sass/_layout.scss */
/* line 441, ../sass/_layout.scss */
#footer-producer a:active {
text-decoration: underline;
}

/* line 453, ../sass/_layout.scss */
/* line 447, ../sass/_layout.scss */
#footer {
background-color: #FFF8DC;
height: 100px;
float: right;
text-align: center;
}
/* line 459, ../sass/_layout.scss */
/* line 453, ../sass/_layout.scss */
#footer .content {
padding-top: 20px;
color: black;
}
/* line 463, ../sass/_layout.scss */
/* line 457, ../sass/_layout.scss */
#footer .content a {
color: black;
font-family: "capsuularegular";
@@ -542,11 +536,11 @@ ul.pagination li a:hover, ul.pagination li a:focus, ul.pagination li a:active {
padding-left: 10px;
padding-right: 10px;
}
/* line 470, ../sass/_layout.scss */
/* line 464, ../sass/_layout.scss */
#footer .content a:hover {
text-decoration: underline;
}
/* line 477, ../sass/_layout.scss */
/* line 471, ../sass/_layout.scss */
#footer #code-source img {
height: 20px;
}

+ 1
- 7
producer/web/sass/_layout.scss Voir le fichier

@@ -174,18 +174,12 @@ ul.pagination {
}
}

#left {
background-color: $color-back ;
#header {
text-align: center ;
margin-top: 15px ;
padding: 0px ;
position: relative ;
.fixed {
position: fixed ;
display: none ;
}
$width-logo: 110px ;
#logo {
position: relative ;

Chargement…
Annuler
Enregistrer