浏览代码

Refactoring/traduction vues backend/views/site

refactoring
父节点
当前提交
ec8308b144
共有 2 个文件被更改,包括 52 次插入68 次删除
  1. +51
    -67
      backend/views/site/index.php
  2. +1
    -1
      backend/views/site/login.php

+ 51
- 67
backend/views/site/index.php 查看文件

@@ -39,10 +39,11 @@ termes.
use yii\helpers\Html ;

$this->title = 'Tableau de bord';

?>
<div class="site-index">
<?php if(Yii::$app->request->get('erreur_produits_points_vente')): ?>
<?php if(Yii::$app->request->get('error_products_points_sale')): ?>
<div class="alert alert-danger">Vous devez saisir vos produits et vos points de vente
avant d'initialiser vos jours de production.</div>
<?php endif; ?>
@@ -54,12 +55,12 @@ $this->title = 'Tableau de bord';
<div class="panel-heading">
<h3 class="panel-title">
Commandes
<?= Html::a('Voir', ['commande/index'], ['class' => 'btn btn-default btn-xs']) ; ?>
<?= Html::a('Voir', ['order/index'], ['class' => 'btn btn-default btn-xs']) ; ?>
</h3>
</div>
<div class="panel-body">
<?php if(count($productions)): ?>
<p>Prochaines productions : </p>
<?php if(count($distributionsArray)): ?>
<p>Prochaines distributions : </p>
<table class="table table-bordered table-condensed">
<thead>
<tr>
@@ -69,13 +70,13 @@ $this->title = 'Tableau de bord';
</tr>
</thead>
<tbody>
<?php foreach($productions as $p): ?>
<?php foreach($distributionsArray as $distribution): ?>
<tr>
<td><?= date('d/m/Y',strtotime($p['date'])); ?></td>
<td><?= count($p->commande); ?></td>
<td><?= date('d/m/Y',strtotime($distribution['date'])); ?></td>
<td><?= count($distribution->order); ?></td>
<td>
<?= Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ['commande/index','date' => $p['date']], ['class' => 'btn btn-default btn-xs']) ; ?>
<?php if(count($p->commande)): ?><?= Html::a('<span class="glyphicon glyphicon-download-alt"></span>', ['commande/report','date' => $p['date'],'global' => 1], ['class' => 'btn btn-default btn-xs']) ; ?><?php endif; ?>
<?= Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ['order/index','date' => $distribution['date']], ['class' => 'btn btn-default btn-xs']) ; ?>
<?php if(count($distribution->order)): ?><?= Html::a('<span class="glyphicon glyphicon-download-alt"></span>', ['order/report','date' => $distribution['date'],'global' => 1], ['class' => 'btn btn-default btn-xs']) ; ?><?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
@@ -93,13 +94,13 @@ $this->title = 'Tableau de bord';
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<?= $nb_clients; ?> client<?php if($nb_clients > 1): ?>s<?php endif; ?>
<?= $nbUsers; ?> client<?php if($nbUsers > 1): ?>s<?php endif; ?>
<?= Html::a('Ajouter',['user/create'],['class' => 'btn btn-success btn-xs margin-left']) ; ?>
<?= Html::a('Liste', ['user/index'], ['class' => 'btn btn-default btn-xs']) ; ?>
</h3>
</div>
<div class="panel-body">
<?php if($nb_clients): ?>
<?php if($nbUsers): ?>
<p>Dernières inscriptions :</p>
<table class="table table-bordered table-condensed">
<thead>
@@ -110,11 +111,11 @@ $this->title = 'Tableau de bord';
</tr>
</thead>
<tbody>
<?php foreach($clients as $c): ?>
<?php foreach($usersArray as $user): ?>
<tr>
<td><?= Html::encode($c['prenom'].' '.$c['nom']) ?></td>
<td><?= date('d/m/Y', $c['created_at']); ?></td>
<td><?= Html::a('<span class="glyphicon glyphicon-pencil"></span>', ['user/update','id' => $c['user_id']], ['class' => 'btn btn-default btn-xs']) ; ?></td>
<td><?= Html::encode($user['lastname'].' '.$user['name']) ?></td>
<td><?= date('d/m/Y', $user['created_at']); ?></td>
<td><?= Html::a('<span class="glyphicon glyphicon-pencil"></span>', ['user/update','id' => $user['user_id']], ['class' => 'btn btn-default btn-xs']) ; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
@@ -127,7 +128,7 @@ $this->title = 'Tableau de bord';
</div>
<!-- Clients crédit pain négatif -->
<!-- Clients crédit négatif -->
<div class="">
<div class="panel panel-default">
<div class="panel-heading">
@@ -136,7 +137,7 @@ $this->title = 'Tableau de bord';
</h3>
</div>
<div class="panel-body">
<?php if(count($clients_credit_pain_negatif)): ?>
<?php if(count($usersNegativeCredit)): ?>
<table class="table table-bordered table-condensed">
<thead>
<tr>
@@ -145,11 +146,11 @@ $this->title = 'Tableau de bord';
</tr>
</thead>
<tbody>
<?php foreach($clients_credit_pain_negatif as $c): ?>
<?php foreach($usersNegativeCredit as $user): ?>
<tr>
<td><?= Html::encode($c['prenom'].' '.$c['nom']) ?></td>
<td><?= number_format($c['credit'],2) ?></td>
<td><?= Html::a('<span class="glyphicon glyphicon-euro"></span>', ['user/credit','id' => $c['user_id']], ['class' => 'btn btn-default btn-xs']) ; ?></td>
<td><?= Html::encode($user['lastname'].' '.$user['name']) ?></td>
<td><?= number_format($user['credit'],2) ?></td>
<td><?= Html::a('<span class="glyphicon glyphicon-euro"></span>', ['user/credit','id' => $user['user_id']], ['class' => 'btn btn-default btn-xs']) ; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
@@ -167,7 +168,7 @@ $this->title = 'Tableau de bord';
<div class="panel-heading">
<h3 class="panel-title">
Paramètres
<?= Html::a('Configurer',['etablissement/update'],['class' => 'btn btn-default btn-xs']) ; ?>
<?= Html::a('Configurer',['producer/update'],['class' => 'btn btn-default btn-xs']) ; ?>
</h3>
</div>
<div class="panel-body">
@@ -180,9 +181,9 @@ $this->title = 'Tableau de bord';
</thead>
<tbody>
<tr>
<td>Établissement activé</td>
<td>Producteur activé</td>
<td>
<?php if($etablissement->actif): ?>
<?php if($producer->active): ?>
<span class="label label-success">Active</span>
<?php else: ?>
<span class="label label-danger">Hors-ligne</span>
@@ -190,11 +191,11 @@ $this->title = 'Tableau de bord';
</td>
</tr>
<tr>
<td>Établissement protégé par un code</td>
<td>Producteur protégé par un code</td>
<td>
<?php if(strlen($etablissement->code)): ?>
<?php if(strlen($producer->code)): ?>
<span class="label label-success">Oui</span><br />
<strong><?= Html::encode($etablissement->code) ?></strong>
<strong><?= Html::encode($producer->code) ?></strong>
<?php else: ?>
<span class="label label-danger">Non</span>
<?php endif; ?>
@@ -202,16 +203,16 @@ $this->title = 'Tableau de bord';
</tr>
<tr>
<td>Délai de commande</td>
<td><?= $etablissement->delai_commande ?> jour<?php if($etablissement->delai_commande > 1): ?>s<?php endif; ?></td>
<td><?= $producer->prder_delay ?> jour<?php if($producer->order_delay > 1): ?>s<?php endif; ?></td>
</tr>
<tr>
<td>Heure limite de commande</td>
<td><?= $etablissement->heure_limite_commande ?>h</td>
<td><?= $producer->order_deadline ?>h</td>
</tr>
<tr>
<td>Système de Crédit Pain activé</td>
<td>Système de Crédit activé</td>
<td>
<?php if($etablissement->credit_pain): ?>
<?php if($producer->credit): ?>
<span class="label label-success">Oui</span><br />
<?php else: ?>
<span class="label label-danger">Non</span>
@@ -225,36 +226,23 @@ $this->title = 'Tableau de bord';
</div>

<!-- Mon abonnement -->
<div class="" id="facturation">
<div class="" id="billing">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Mon abonnement
<?= Html::a('Voir',['etablissement/facturation'],['class' => 'btn btn-default btn-xs']) ; ?>
<?= Html::a('Voir',['producer/billing'],['class' => 'btn btn-default btn-xs']) ; ?>
</h3>
</div>
<div class="panel-body">
<div class="col-md-12">
<?php if(is_null($etablissement->prix_libre)): ?>
<?php if(is_null($producer->free_price)): ?>
<h2>Prix libre</h2>
<p>Le modèle économique de <em>La boîte à pain</em> est basé sur un système de prix libre. <?= Html::a('En savoir plus',['etablissement/facturation']); ?></p>
<p>Le modèle économique de <em>La boîte à pain</em> est basé sur un système de prix libre. <?= Html::a('En savoir plus',['producer/billing']); ?></p>
<?php else: ?>
<h2><?= $etablissement->getPrixLibre() ?> / mois <?= Html::a('Modifier',['etablissement/facturation'],['class' => 'btn btn-xs btn-primary']) ?></h2>
<h2><?= $producer->getFreePrice() ?> / mois <?= Html::a('Modifier',['producer/billing'],['class' => 'btn btn-xs btn-primary']) ?></h2>
<?php endif; ?>
</div>
<!--<div class="col-md-6 mois-en-cours">
<h2>Chiffre d'affaire<br />du mois en cours</h2>
<div class="montant"><span><?= number_format($etablissement->getCA(date('Y-m')), 2); ?> €</span></div>
</div>

<div class="col-md-6">
<?php $montant = $etablissement->getMontantFacturer(date('Y-m'), 0); ?>
<h2>Participation<br /><em>La boîte à pain</em> (2%)</h2>
<div class="montant"><span><?php if($montant): echo number_format($montant,2).' €' ; else: echo 'Gratuit' ; endif; ?></span></div>
</div>
<div class="clr"></div>-->
</div>
</div>
</div>
@@ -263,7 +251,7 @@ $this->title = 'Tableau de bord';
<div class="col-md-8">
<!-- dernières commandes -->
<div id="dernieres-commandes" class="">
<div id="last-orders" class="">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
@@ -271,7 +259,7 @@ $this->title = 'Tableau de bord';
</h3>
</div>
<div class="panel-body">
<?php if(count($commandes)): ?>
<?php if(count($ordersArray)): ?>
<table class="table table-condensed table-bordered">
<thead>
<tr>
@@ -285,23 +273,23 @@ $this->title = 'Tableau de bord';
</tr>
</thead>
<tbody>
<?php foreach($commandes as $c): ?>
<tr class="<?= $c->getClassHistorique() ; ?>">
<td class="infos"><?= $c->getStrType(true); ?></td>
<?php foreach($ordersArray as $order): ?>
<tr class="<?= $order->getClassHistory() ; ?>">
<td class="infos"><?= $order->getStrType(true); ?></td>
<td class="date">
<div class="bloc-date">
<div class="jour"><?= strftime('%A', strtotime($c->production->date)) ?></div>
<div class="num"><?= date('d', strtotime($c->production->date)) ?></div>
<div class="mois"><?= strftime('%B', strtotime($c->production->date)) ?></div>
<div class="block-date">
<div class="day"><?= strftime('%A', strtotime($order->distribution->date)) ?></div>
<div class="num"><?= date('d', strtotime($order->distribution->date)) ?></div>
<div class="month"><?= strftime('%B', strtotime($order->distribution->date)) ?></div>
</div>
</td>
<td>
<?= $c->getStrUser(); ?><br />
<?= $order->getStrUser(); ?><br />
</td>
<td class="historique"><?= $c->getStrHistorique() ; ?></td>
<td><?= $c->getResumePanier() ; ?></td>
<td><?= $c->getResumePointVente() ; ?></td>
<td><?= $c->getMontant(true) ; ?></td>
<td class="history"><?= $order->getStrHistory() ; ?></td>
<td><?= $order->getCartSummary() ; ?></td>
<td><?= $order->getPointSaleSummary() ; ?></td>
<td><?= $order->getAmount(Order::AMOUNT_TOTAL, true) ; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
@@ -312,9 +300,5 @@ $this->title = 'Tableau de bord';
</div>
</div>
</div>

</div>
</div>

+ 1
- 1
backend/views/site/login.php 查看文件

@@ -53,7 +53,7 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="col-lg-5">
<?php if(YII_ENV == 'demo') : ?>
<div class="alert alert-warning">
Identifiant : <strong>boulanger@laboiteapain.net</strong><br />
Identifiant : <strong>producteur@laboiteapain.net</strong><br />
Mot de passe : <strong>laboiteapain</strong>
</div>
<?php endif; ?>

正在加载...
取消
保存