Browse Source

Message abonnement à prix libre

refactoring
Guillaume Bourgeois 5 years ago
parent
commit
6160452188
7 changed files with 50 additions and 17 deletions
  1. +3
    -1
      backend/controllers/BackendController.php
  2. +1
    -1
      backend/controllers/SiteController.php
  3. +1
    -1
      backend/models/CreditForm.php
  4. +12
    -0
      backend/views/site/index.php
  5. +22
    -13
      backend/web/css/screen.css
  6. +10
    -0
      backend/web/sass/_adminlte.scss
  7. +1
    -1
      common/models/Producer.php

+ 3
- 1
backend/controllers/BackendController.php View File



namespace backend\controllers; namespace backend\controllers;


use common\models\Producer ;

class BackendController extends \common\controllers\CommonController class BackendController extends \common\controllers\CommonController
{ {
} }


?> ?>

+ 1
- 1
backend/controllers/SiteController.php View File

->all(); ->all();


// paramètres // paramètres
$producer = Producer::get();
$producer = Producer::getCurrent();


$productsCount = Product::searchCount() ; $productsCount = Product::searchCount() ;
$pointsSaleCount = PointSale::searchCount() ; $pointsSaleCount = PointSale::searchCount() ;

+ 1
- 1
backend/models/CreditForm.php View File

// on prévient l'utilisateur que son compte vient d'être crédité // on prévient l'utilisateur que son compte vient d'être crédité
if($this->send_mail) { if($this->send_mail) {
$user = User::findOne($this->id_user) ; $user = User::findOne($this->id_user) ;
$producer = Producer::get() ;
$producer = Producer::getCurrent() ;
$userProducer = UserProducer::searchOne([ $userProducer = UserProducer::searchOne([
'id_user' => $this->id_user 'id_user' => $this->id_user
]); ]);

+ 12
- 0
backend/views/site/index.php View File

?> ?>
<div class="site-index"> <div class="site-index">


<?php if(!$producer->getFreePrice()): ?>
<div class="callout callout-info">
<h4>Abonnement à prix libre</h4>
<p><i>La boîte à pain</i> fonctionne avec système d'abonnement à prix libre pour en
assurer la plus grande diffusion possible. Ceci correspond également à l'unique source de revenus
nécessaire à la maintenance et au développement de la plateforme.<br />
Si cet outil est important dans votre activité, nous vous encourageons à nous soutenir en vous abonnant.
</p>
<p><?= Html::a('&gt; Définir le montant de mon abonnement', ['producer/billing'], ['class' => 'btn btn-default']); ?></p>
</div>
<?php endif; ?>
<?php if(Yii::$app->request->get('error_products_points_sale')): ?> <?php if(Yii::$app->request->get('error_products_points_sale')): ?>
<div class="alert alert-warning"> <div class="alert alert-warning">
Vous devez ajouter <?php if(!$productsCount): ?> des produits<?php endif; ?> Vous devez ajouter <?php if(!$productsCount): ?> des produits<?php endif; ?>

+ 22
- 13
backend/web/css/screen.css View File

color: white; color: white;
} }
/* line 124, ../sass/_adminlte.scss */ /* line 124, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a {
color: white;
}
/* line 127, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn {
color: #333;
text-decoration: none;
}
/* line 134, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th { body.skin-black .content-wrapper .table th {
font-size: 13px; font-size: 13px;
} }
/* line 127, ../sass/_adminlte.scss */
/* line 137, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions { body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 150px; width: 150px;
text-align: right; text-align: right;
} }
/* line 131, ../sass/_adminlte.scss */
/* line 141, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small { body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px; font-size: 12px;
} }
/* line 136, ../sass/_adminlte.scss */
/* line 146, ../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 { 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: #BB8757; background-color: #BB8757;
border: solid 1px #BB8757; border: solid 1px #BB8757;
color: white; color: white;
} }
/* line 141, ../sass/_adminlte.scss */
/* line 151, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span { body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #BB8757; color: #BB8757;
} }
/* line 143, ../sass/_adminlte.scss */
/* line 153, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover { body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #9f6e40; color: #9f6e40;
} }
/* line 150, ../sass/_adminlte.scss */
/* line 160, ../sass/_adminlte.scss */
body.skin-black .main-footer a { body.skin-black .main-footer a {
color: #BB8757; color: #BB8757;
} }


/* line 156, ../sass/_adminlte.scss */
/* line 166, ../sass/_adminlte.scss */
body.login-page { body.login-page {
background: none; background: none;
background-color: #F8F1DD; background-color: #F8F1DD;
} }
/* line 160, ../sass/_adminlte.scss */
/* line 170, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo { body.login-page .login-box .login-logo {
text-align: center; text-align: center;
font-family: "comfortaalight"; font-family: "comfortaalight";
} }
/* line 163, ../sass/_adminlte.scss */
/* line 173, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img { body.login-page .login-box .login-logo img {
width: 50px; width: 50px;
} }
/* line 168, ../sass/_adminlte.scss */
/* line 178, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
background-color: #BB8757; background-color: #BB8757;
border-color: #BB8757; border-color: #BB8757;
padding: 5px 10px; padding: 5px 10px;
} }
/* line 173, ../sass/_adminlte.scss */
/* line 183, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active { body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #c29469; background-color: #c29469;
border-color: #BB8757; border-color: #BB8757;
} }
/* line 179, ../sass/_adminlte.scss */
/* line 189, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a { body.login-page .login-box .login-box-body a {
color: #BB8757; color: #BB8757;
} }
/* line 181, ../sass/_adminlte.scss */
/* line 191, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover { body.login-page .login-box .login-box-body a:hover {
color: #c29469; color: #c29469;
} }

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

} }
} }
.callout {
a {
color: white ;
}
.btn {
color: #333 ;
text-decoration: none ;
}
}
.table { .table {
th { th {
font-size: 13px ; font-size: 13px ;

+ 1
- 1
common/models/Producer.php View File

* *
* @return Producer|boolean * @return Producer|boolean
*/ */
public static function get()
public static function getCurrent()
{ {
if(self::getId()) { if(self::getId()) {
return self::searchOne() ; return self::searchOne() ;

Loading…
Cancel
Save