瀏覽代碼

Message abonnement à prix libre

refactoring
Guillaume Bourgeois 5 年之前
父節點
當前提交
6160452188
共有 7 個檔案被更改,包括 50 行新增17 行删除
  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 查看文件

@@ -38,9 +38,11 @@ termes.

namespace backend\controllers;

use common\models\Producer ;

class BackendController extends \common\controllers\CommonController
{
}

?>

+ 1
- 1
backend/controllers/SiteController.php 查看文件

@@ -148,7 +148,7 @@ class SiteController extends BackendController
->all();

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

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

+ 1
- 1
backend/models/CreditForm.php 查看文件

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

+ 12
- 0
backend/views/site/index.php 查看文件

@@ -43,6 +43,18 @@ $this->title = 'Tableau de bord';
?>
<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')): ?>
<div class="alert alert-warning">
Vous devez ajouter <?php if(!$productsCount): ?> des produits<?php endif; ?>

+ 22
- 13
backend/web/css/screen.css 查看文件

@@ -1474,67 +1474,76 @@ body.skin-black .content-wrapper .alert a {
color: white;
}
/* 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 {
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 {
width: 150px;
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 {
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 {
background-color: #BB8757;
border: solid 1px #BB8757;
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 {
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 {
color: #9f6e40;
}
/* line 150, ../sass/_adminlte.scss */
/* line 160, ../sass/_adminlte.scss */
body.skin-black .main-footer a {
color: #BB8757;
}

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

+ 10
- 0
backend/web/sass/_adminlte.scss 查看文件

@@ -120,6 +120,16 @@ body.skin-black {
}
}
.callout {
a {
color: white ;
}
.btn {
color: #333 ;
text-decoration: none ;
}
}
.table {
th {
font-size: 13px ;

+ 1
- 1
common/models/Producer.php 查看文件

@@ -366,7 +366,7 @@ class Producer extends ActiveRecordCommon
*
* @return Producer|boolean
*/
public static function get()
public static function getCurrent()
{
if(self::getId()) {
return self::searchOne() ;

Loading…
取消
儲存