fix tabs for nav
This commit is contained in:
parent
2187d9ab7a
commit
a9755e1a03
@ -30,7 +30,8 @@
|
|||||||
btn-success
|
btn-success
|
||||||
{% else %}
|
{% else %}
|
||||||
btn-default
|
btn-default
|
||||||
{% endif %}" href="{{ path('productcategory_index') }}">
|
{% endif %} "
|
||||||
|
href="{{ path('productcategory_index') }}">
|
||||||
<i class="fa fa-file-archive-o"></i>
|
<i class="fa fa-file-archive-o"></i>
|
||||||
Catégories
|
Catégories
|
||||||
|
|
||||||
@ -44,7 +45,9 @@
|
|||||||
btn-success
|
btn-success
|
||||||
{% else %}
|
{% else %}
|
||||||
btn-default
|
btn-default
|
||||||
{% endif %}" href="{{ path('product_index') }}" data-toggle="tab">
|
{% endif %} "
|
||||||
|
href="{{ path('product_index') }}"
|
||||||
|
>
|
||||||
<i class="fa fa-gears"></i>
|
<i class="fa fa-gears"></i>
|
||||||
Produits
|
Produits
|
||||||
<span class="badge">
|
<span class="badge">
|
||||||
@ -57,8 +60,9 @@
|
|||||||
btn-success
|
btn-success
|
||||||
{% else %}
|
{% else %}
|
||||||
btn-default
|
btn-default
|
||||||
{% endif %}" href='{{ path('festival_index') }}'
|
{% endif %}
|
||||||
data-toggle="tab">
|
" href='{{ path('festival_index') }}'
|
||||||
|
>
|
||||||
<i class="fa fa-th-large"></i>
|
<i class="fa fa-th-large"></i>
|
||||||
Festivals
|
Festivals
|
||||||
<span class="badge">
|
<span class="badge">
|
||||||
@ -72,7 +76,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
btn-default
|
btn-default
|
||||||
{% endif %}" href="{{ path('history') }}"
|
{% endif %}" href="{{ path('history') }}"
|
||||||
data-toggle="tab">
|
>
|
||||||
<i class="fa fa-clock-o"></i>
|
<i class="fa fa-clock-o"></i>
|
||||||
Historique
|
Historique
|
||||||
</a>
|
</a>
|
||||||
|
@ -45,7 +45,7 @@ class DefaultController extends Controller {
|
|||||||
$m = $this->getDoctrine()->getManager();
|
$m = $this->getDoctrine()->getManager();
|
||||||
$currentUser = $this->getUser();
|
$currentUser = $this->getUser();
|
||||||
|
|
||||||
|
// TODO on first login set default values
|
||||||
$lastFestival = $currentUser->getActiveFestival();
|
$lastFestival = $currentUser->getActiveFestival();
|
||||||
if ( ! $lastFestival ) {
|
if ( ! $lastFestival ) {
|
||||||
$lastFestival = $m->getRepository( 'AppBundle:Festival' )
|
$lastFestival = $m->getRepository( 'AppBundle:Festival' )
|
||||||
@ -54,14 +54,14 @@ class DefaultController extends Controller {
|
|||||||
0,
|
0,
|
||||||
1 );
|
1 );
|
||||||
}
|
}
|
||||||
if($lastFestival){
|
if ( $lastFestival ) {
|
||||||
|
|
||||||
$lastFestival->recalculateChiffreAffaire();
|
$lastFestival->recalculateChiffreAffaire();
|
||||||
}
|
}
|
||||||
$categRepo = $m->getRepository( 'AppBundle:ProductCategory' );
|
$categRepo = $m->getRepository( 'AppBundle:ProductCategory' );
|
||||||
$sellingRepo = $m->getRepository( 'AppBundle:SellRecord' );
|
$sellingRepo = $m->getRepository( 'AppBundle:SellRecord' );
|
||||||
$categories = $categRepo->findAll();
|
$categories = $categRepo->findAll();
|
||||||
$recentSells = $sellingRepo->findBy( ['user'=>$currentUser->getId()], [ 'id' => 'desc' ], 0, 5 );
|
$recentSells = $sellingRepo->findBy( [ 'user' => $currentUser->getId() ], [ 'id' => 'desc' ], 0, 5 );
|
||||||
|
|
||||||
return $this->render( 'logged/dashboard.html.twig',
|
return $this->render( 'logged/dashboard.html.twig',
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user