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") %} {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<div class="row"> <div class="row">
<div class="col-xs-6"> <div class="col-xs-6">
<a class="btn btn-default" href="{{ path('homepage') }}"> <div id="menu-dashboard">
<ul class="nav nav-pills">
<li>
<a class="btn btn-default" href="{{ path('homepage') }}" title="accueil Caisse">
<i class="fa fa-home"></i> <i class="fa fa-home"></i>
Caisse
</a> </a>
<li>
<li>
<a class="btn btn-default" href="{{ path('dashboard') }}"> <a class="btn btn-default" href="{{ path('dashboard') }}">
<i class="fa fa-list"></i> <i class="fa fa-list"></i>
Dashboard Dashboard
</a> </a>
<div id="menu-dashboard">
<ul class="nav nav-pills">
<li>
<a class="btn btn-primary" href="#caisse-now" data-toggle="tab">Caisse</a>
</li> </li>
<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 Catégories
</a> </a>
</li> </li>
<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 Produits
</a> </a>
</li> </li>
<li>
<a class="btn btn-primary" href="#history" data-toggle="tab">Historique</a>
</li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="col-xs-6 text-right"> <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') }}"> <a class="btn btn-default" href="{{ path('fos_user_security_logout') }}">
{{ 'layout.logout'|trans({}, 'FOSUserBundle') }} {{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
</a> </a>

View File

@ -12,7 +12,7 @@
<ul> <ul>
<li> <li>
<a class="btn btn-primary" href="{{ path('festival_index') }}"> <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 Retour à la liste
</a> </a>
</li> </li>

View File

@ -3,7 +3,7 @@
{% block body %} {% block body %}
<h1>Festivals list</h1> <h1>Festivals list</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<thead> <thead>
<tr> <tr>
<th>Id</th> <th>Id</th>
@ -41,7 +41,7 @@
<ul> <ul>
<li> <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> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -10,7 +10,7 @@
<ul> <ul>
<li> <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>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -3,7 +3,7 @@
{% block body %} {% block body %}
<h1>Festival</h1> <h1>Festival</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<tbody> <tbody>
<tr> <tr>
<th>Id</th> <th>Id</th>
@ -22,10 +22,13 @@
<ul> <ul>
<li> <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>
<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>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}

View File

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

View File

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

View File

@ -10,12 +10,14 @@
</div> </div>
<div class="sellings col-xs-5"> <div class="sellings col-xs-5">
{% include 'logged/angular/validate-button.html.twig' %}
{% include 'logged/angular/current.html.twig' %} {% include 'logged/angular/current.html.twig' %}
{% include 'logged/angular/paused.html.twig' %} {#{% include 'logged/angular/paused.html.twig' %}#}
</div>
</div>
<div id="other_time">
{% include 'logged/angular/recent.html.twig' %} {% include 'logged/angular/recent.html.twig' %}
</div>
</div> </div>
</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> <ul>
<li> <li>
<a class="btn btn-primary" href="{{ path('product_index') }}"> <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 Retour à la liste
</a> </a>
</li> </li>

View File

@ -3,8 +3,8 @@
{% block body %} {% block body %}
<h1>Products list</h1> <h1>Products list</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<thead> <thead class="bg-dark">
<tr> <tr>
<th>Id</th> <th>Id</th>
<th>Name</th> <th>Name</th>
@ -44,7 +44,7 @@
<ul> <ul>
<li> <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> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -11,7 +11,7 @@
<ul> <ul>
<li> <li>
<a class="btn btn-primary" href="{{ path('product_index') }}"> <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 Retour à la liste
</a> </a>
</li> </li>

View File

@ -3,7 +3,7 @@
{% block body %} {% block body %}
<h1>Product</h1> <h1>Product</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<tbody> <tbody>
<tr> <tr>
<th>Id</th> <th>Id</th>
@ -30,10 +30,13 @@
<ul> <ul>
<li> <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>
<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>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}

View File

@ -10,7 +10,7 @@
<ul> <ul>
<li> <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>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}

View File

@ -3,11 +3,11 @@
{% block body %} {% block body %}
<h1>Productcategories list</h1> <h1>Productcategories list</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<thead> <thead>
<tr> <tr>
<th>Id</th> <th>Id</th>
<th>Name</th> <th>Nom</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -41,7 +41,7 @@
<ul> <ul>
<li> <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> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -10,7 +10,7 @@
<ul> <ul>
<li> <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>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -3,7 +3,7 @@
{% block body %} {% block body %}
<h1>Productcategory</h1> <h1>Productcategory</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<tbody> <tbody>
<tr> <tr>
<th>Id</th> <th>Id</th>
@ -18,10 +18,10 @@
<ul> <ul>
<li> <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>
<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>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}

View File

@ -10,7 +10,7 @@
<ul> <ul>
<li> <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>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}

View File

@ -3,7 +3,7 @@
{% block body %} {% block body %}
<h1>Sellrecords list</h1> <h1>Sellrecords list</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<thead> <thead>
<tr> <tr>
<th>Date</th> <th>Date</th>
@ -39,7 +39,7 @@
<ul> <ul>
<li> <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> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -10,7 +10,7 @@
<ul> <ul>
<li> <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>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -3,7 +3,7 @@
{% block body %} {% block body %}
<h1>Sellrecord</h1> <h1>Sellrecord</h1>
<table> <table class="table-responsive table-striped table table-bordered table-light">
<tbody> <tbody>
<tr> <tr>
<th>Date</th> <th>Date</th>
@ -14,10 +14,13 @@
<ul> <ul>
<li> <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>
<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>
<li> <li>
{{ form_start(delete_form) }} {{ form_start(delete_form) }}

View File

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

View File

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