style cruds

This commit is contained in:
Kayn Ty 2018-04-17 14:52:31 +02:00
parent cf7a892e08
commit 85e578477c
23 changed files with 140 additions and 120 deletions

View File

@ -6,38 +6,41 @@
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<div class="row">
<div class="col-xs-6">
<a class="btn btn-default" href="{{ path('homepage') }}">
<i class="fa fa-home"></i>
Caisse
</a>
<a class="btn btn-default" href="{{ path('dashboard') }}">
<i class="fa fa-list"></i>
Dashboard
</a>
<div id="menu-dashboard">
<ul class="nav nav-pills">
<li>
<a class="btn btn-primary" href="#caisse-now" data-toggle="tab">Caisse</a>
<a class="btn btn-default" href="{{ path('homepage') }}" title="accueil Caisse">
<i class="fa fa-home"></i>
</a>
<li>
<li>
<a class="btn btn-default" href="{{ path('dashboard') }}">
<i class="fa fa-list"></i>
Dashboard
</a>
</li>
<li>
<a class="btn btn-primary" href="{{ path('productcategory_index') }}">
<a class="btn btn-default" href="{{ path('productcategory_index') }}">
<i class="fa fa-gears"></i>
Catégories
</a>
</li>
<li>
<a class="btn btn-primary" href="{{ path('product_index') }}" data-toggle="tab">
<a class="btn btn-default" href="{{ path('product_index') }}" data-toggle="tab">
Produits
</a>
</li>
<li>
<a class="btn btn-primary" href="#history" data-toggle="tab">Historique</a>
</li>
</ul>
</div>
</div>
<div class="col-xs-6 text-right">
{{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} |
Bonjour
{#<a href="href={{ path('fos_user_profile_edit') }}">#}
{##}
{#</a>#}
{{ app.user.username }}
|
<a class="btn btn-default" href="{{ path('fos_user_security_logout') }}">
{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
</a>

View File

@ -12,7 +12,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('festival_index') }}">
<i class="fa fa-arrow-left"/>
<i class="fa fa-arrow-left"></i>
Retour à la liste
</a>
</li>

View File

@ -3,7 +3,7 @@
{% block body %}
<h1>Festivals list</h1>
<table>
<table class="table-responsive table-striped table table-bordered table-light">
<thead>
<tr>
<th>Id</th>
@ -41,7 +41,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('festival_new') }}">Create a new festival</a>
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
</li>
</ul>
{% endblock %}

View File

@ -10,7 +10,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('festival_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('festival_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
</li>
</ul>
{% endblock %}

View File

@ -3,33 +3,36 @@
{% block body %}
<h1>Festival</h1>
<table>
<table class="table-responsive table-striped table table-bordered table-light">
<tbody>
<tr>
<th>Id</th>
<td>{{ festival.id }}</td>
</tr>
<tr>
<th>Name</th>
<td>{{ festival.name }}</td>
</tr>
<tr>
<th>Datecreation</th>
<td>{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}</td>
</tr>
<tr>
<th>Id</th>
<td>{{ festival.id }}</td>
</tr>
<tr>
<th>Name</th>
<td>{{ festival.name }}</td>
</tr>
<tr>
<th>Datecreation</th>
<td>{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}</td>
</tr>
</tbody>
</table>
<ul>
<li>
<a class="btn btn-primary" href="{{ path('festival_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('festival_index') }}">
<i class="fa fa-arrow-left"></i>
Retour à la liste
</a>
</li>
<li>
<a class="btn btn-primary" href="{{ path('festival_edit', { 'id': festival.id }) }}"><a class="btn btn-primary" href="</a>
<a class="btn btn-primary" href="{{ path('festival_edit', { 'id': festival.id }) }}">edit</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="Delete">
<input type="submit" value="Delete">
{{ form_end(delete_form) }}
</li>
</ul>

View File

@ -1,26 +1,16 @@
{% verbatim %}
<div class="current-selling">
<div class="well">
<button class="btn btn-primary btn-block" id="validate_selling" ng-click="sendForm()"
ng-disabled="!paidAmount">
<i class="fa fa-check"></i>
Valider
</button>
<pre>
{{lesParams|json}}
</pre>
</div>
<form action="#">
Festival:
<input type="text" ng-model="activeFestival.name" placeholder="nom du festival">
<input type="text" ng-model="activeFestival.commentaire" placeholder="commentaire">
<hr>
<i class="fa fa-user"></i>
Client actuel:
{{ activeSelling.length }} produits
<input type="text" ng-model="sellingComment" placeholder="commentaire">
<hr>
<ul>
<li ng-repeat="p in activeSelling track by $index">
<div class="row">
@ -67,21 +57,21 @@
</div>
<div class="row">
<div class="col">
<button class="btn btn-primary btn-block" id="validate_selling" ng-click="sendForm()"
ng-disabled="!paidAmount">
<i class="fa fa-check"></i>
Valider
</button>
</div>
<div class="col">
<button class="btn btn-default" id="pause_selling" ng-click="pauseSelling()">
<i class="fa fa-clock"></i>
Pause
</button>
{% endverbatim %}
{% include 'logged/angular/validate-button.html.twig' %}
{% verbatim %}
</div>
<!--<div class="col">-->
<!--<button class="btn btn-default" id="pause_selling" ng-click="pauseSelling()">-->
<!--<i class="fa fa-clock"></i>-->
<!--Pause-->
<!--</button>-->
<!--</div>-->
</div>
</form>
<hr>
</div>
{% endverbatim %}

View File

@ -1,19 +1,18 @@
{% verbatim %}
<div class="category-listing" ng-repeat="c in categories">
<div class="category-listing well" ng-repeat="c in categories">
<h2>
{{ c.name }}
</h2>
<button ng-repeat="p in c.products track by p.id"
class="btn btn-default"
ng-click="addProduct( p )">
{{ p.name }}
<span class="product-name">
{{ p.name }}
</span>
<span class="badge">
{{ p.price }}
</span>
<span class="badge">
c
{{ c.id }}
</span>
{{ p.price }}
</span>
</button>
</div>
{% endverbatim %}

View File

@ -10,12 +10,14 @@
</div>
<div class="sellings col-xs-5">
{% include 'logged/angular/validate-button.html.twig' %}
{% include 'logged/angular/current.html.twig' %}
{% include 'logged/angular/paused.html.twig' %}
{% include 'logged/angular/recent.html.twig' %}
{#{% include 'logged/angular/paused.html.twig' %}#}
</div>
</div>
<div id="other_time">
{% include 'logged/angular/recent.html.twig' %}
</div>
</div>

View File

@ -0,0 +1,11 @@
<button class="btn btn-primary btn-block" id="validate_selling" ng-click="sendForm()"
ng-disabled="!paidAmount">
<i class="fa fa-check"></i>
<span ng-if="paidAmount && CurrentSellingTotal() - paidAmount <=0">
Valider
</span>
<span ng-if="paidAmount && CurrentSellingTotal() - paidAmount >0">
<i class="fa fa-warning"></i>
</span>
</button>

View File

@ -11,7 +11,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('product_index') }}">
<i class="fa fa-arrow-left"/>
<i class="fa fa-arrow-left"></i>
Retour à la liste
</a>
</li>

View File

@ -3,8 +3,8 @@
{% block body %}
<h1>Products list</h1>
<table>
<thead>
<table class="table-responsive table-striped table table-bordered table-light">
<thead class="bg-dark">
<tr>
<th>Id</th>
<th>Name</th>
@ -44,7 +44,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('product_new') }}">Create a new product</a>
<a class="btn btn-primary" href="{{ path('product_new') }}">Nouveau product</a>
</li>
</ul>
{% endblock %}

View File

@ -11,7 +11,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('product_index') }}">
<i class="fa fa-arrow-left"/>
<i class="fa fa-arrow-left"></i>
Retour à la liste
</a>
</li>

View File

@ -3,41 +3,44 @@
{% block body %}
<h1>Product</h1>
<table>
<table class="table-responsive table-striped table table-bordered table-light">
<tbody>
<tr>
<th>Id</th>
<td>{{ product.id }}</td>
</tr>
<tr>
<th>Name</th>
<td>{{ product.name }}</td>
</tr>
<tr>
<th>Image</th>
<td>{{ product.image }}</td>
</tr>
<tr>
<th>Price</th>
<td>{{ product.price }}</td>
</tr>
<tr>
<th>Comment</th>
<td>{{ product.comment }}</td>
</tr>
<tr>
<th>Id</th>
<td>{{ product.id }}</td>
</tr>
<tr>
<th>Name</th>
<td>{{ product.name }}</td>
</tr>
<tr>
<th>Image</th>
<td>{{ product.image }}</td>
</tr>
<tr>
<th>Price</th>
<td>{{ product.price }}</td>
</tr>
<tr>
<th>Comment</th>
<td>{{ product.comment }}</td>
</tr>
</tbody>
</table>
<ul>
<li>
<a class="btn btn-primary" href="{{ path('product_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('product_index') }}">
<i class="fa fa-arrow-left"></i>
Retour à la liste
</a>
</li>
<li>
<a class="btn btn-primary" href="{{ path('product_edit', { 'id': product.id }) }}"><a class="btn btn-primary" href="</a>
<a class="btn btn-primary" href="{{ path('product_edit', { 'id': product.id }) }}">edit</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="Delete">
<input type="submit" value="Delete">
{{ form_end(delete_form) }}
</li>
</ul>

View File

@ -10,7 +10,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('productcategory_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('productcategory_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
</li>
<li>
{{ form_start(delete_form) }}

View File

@ -3,11 +3,11 @@
{% block body %}
<h1>Productcategories list</h1>
<table>
<table class="table-responsive table-striped table table-bordered table-light">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Nom</th>
<th>Actions</th>
</tr>
</thead>
@ -41,7 +41,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('productcategory_new') }}">Create a new productCategory</a>
<a class="btn btn-primary" href="{{ path('productcategory_new') }}">Nouveau productCategory</a>
</li>
</ul>
{% endblock %}

View File

@ -10,7 +10,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('productcategory_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('productcategory_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
</li>
</ul>
{% endblock %}

View File

@ -3,7 +3,7 @@
{% block body %}
<h1>Productcategory</h1>
<table>
<table class="table-responsive table-striped table table-bordered table-light">
<tbody>
<tr>
<th>Id</th>
@ -18,10 +18,10 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('productcategory_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('productcategory_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
</li>
<li>
<a class="btn btn-primary" href="{{ path('productcategory_edit', { 'id': productCategory.id }) }}"><a class="btn btn-primary" href="</a>
<a class="btn btn-primary" href="{{ path('productcategory_edit', { 'id': productCategory.id }) }}">edit</a>
</li>
<li>
{{ form_start(delete_form) }}

View File

@ -10,7 +10,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('sellrecord_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('sellrecord_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
</li>
<li>
{{ form_start(delete_form) }}

View File

@ -3,7 +3,7 @@
{% block body %}
<h1>Sellrecords list</h1>
<table>
<table class="table-responsive table-striped table table-bordered table-light">
<thead>
<tr>
<th>Date</th>
@ -39,7 +39,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('sellrecord_new') }}">Create a new sellRecord</a>
<a class="btn btn-primary" href="{{ path('sellrecord_new') }}">Nouveau sellRecord</a>
</li>
</ul>
{% endblock %}

View File

@ -10,7 +10,7 @@
<ul>
<li>
<a class="btn btn-primary" href="{{ path('sellrecord_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('sellrecord_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
</li>
</ul>
{% endblock %}

View File

@ -3,25 +3,28 @@
{% block body %}
<h1>Sellrecord</h1>
<table>
<table class="table-responsive table-striped table table-bordered table-light">
<tbody>
<tr>
<th>Date</th>
<td>{% if sellRecord.date %}{{ sellRecord.date|date('Y-m-d H:i:s') }}{% endif %}</td>
</tr>
<tr>
<th>Date</th>
<td>{% if sellRecord.date %}{{ sellRecord.date|date('Y-m-d H:i:s') }}{% endif %}</td>
</tr>
</tbody>
</table>
<ul>
<li>
<a class="btn btn-primary" href="{{ path('sellrecord_index') }}"> <i class="fa fa-arrow-left" />Retour à la liste</a>
<a class="btn btn-primary" href="{{ path('sellrecord_index') }}">
<i class="fa fa-arrow-left"></i>
Retour à la liste
</a>
</li>
<li>
<a class="btn btn-primary" href="{{ path('sellrecord_edit', { 'date': sellRecord.date }) }}"><a class="btn btn-primary" href="</a>
<a class="btn btn-primary" href="{{ path('sellrecord_edit', { 'date': sellRecord.date }) }}">edit</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="Delete">
<input type="submit" value="Delete">
{{ form_end(delete_form) }}
</li>
</ul>

View File

@ -49,6 +49,7 @@ security:
ROLE_SUPER_ADMIN: ROLE_ADMIN
access_control:
- { path: ^/dashboard$, role: IS_AUTHENTICATED_REMEMBERED }
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }

View File

@ -13,3 +13,8 @@
overflow: hidden;
z-index: -1;
}
thead {
background: #000;
color: #fff;
}