mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-10-04 17:04:54 +02:00
up templates
This commit is contained in:
parent
71bce538af
commit
a39b6239b0
71 changed files with 1536 additions and 262 deletions
4
templates/category/_delete_form.html.twig
Normal file
4
templates/category/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_category_delete', {'id': category.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ category.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/category/_form.html.twig
Normal file
4
templates/category/_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
13
templates/category/edit.html.twig
Normal file
13
templates/category/edit.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit Category{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit Category</h1>
|
||||
|
||||
{{ include('category/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_category_index') }}">back to list</a>
|
||||
|
||||
{{ include('category/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
35
templates/category/index.html.twig
Normal file
35
templates/category/index.html.twig
Normal file
|
@ -0,0 +1,35 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Category index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Category index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td>{{ category.id }}</td>
|
||||
<td>{{ category.name }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_category_show', {'id': category.id}) }}">show</a>
|
||||
<a href="{{ path('app_category_edit', {'id': category.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="3">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_category_new') }}">Create new</a>
|
||||
{% endblock %}
|
11
templates/category/new.html.twig
Normal file
11
templates/category/new.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New Category{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new Category</h1>
|
||||
|
||||
{{ include('category/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_category_index') }}">back to list</a>
|
||||
{% endblock %}
|
26
templates/category/show.html.twig
Normal file
26
templates/category/show.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Category{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Category</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ category.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ category.name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_category_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_category_edit', {'id': category.id}) }}">edit</a>
|
||||
|
||||
{{ include('category/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
4
templates/expense/_delete_form.html.twig
Normal file
4
templates/expense/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_expense_delete', {'id': expense.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ expense.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/expense/_form.html.twig
Normal file
4
templates/expense/_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
13
templates/expense/edit.html.twig
Normal file
13
templates/expense/edit.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit Expense{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit Expense</h1>
|
||||
|
||||
{{ include('expense/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_expense_index') }}">back to list</a>
|
||||
|
||||
{{ include('expense/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
37
templates/expense/index.html.twig
Normal file
37
templates/expense/index.html.twig
Normal file
|
@ -0,0 +1,37 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Expense index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Expense index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Price</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for expense in expenses %}
|
||||
<tr>
|
||||
<td>{{ expense.id }}</td>
|
||||
<td>{{ expense.name }}</td>
|
||||
<td>{{ expense.price }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_expense_show', {'id': expense.id}) }}">show</a>
|
||||
<a href="{{ path('app_expense_edit', {'id': expense.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_expense_new') }}">Create new</a>
|
||||
{% endblock %}
|
11
templates/expense/new.html.twig
Normal file
11
templates/expense/new.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New Expense{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new Expense</h1>
|
||||
|
||||
{{ include('expense/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_expense_index') }}">back to list</a>
|
||||
{% endblock %}
|
30
templates/expense/show.html.twig
Normal file
30
templates/expense/show.html.twig
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Expense{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Expense</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ expense.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ expense.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Price</th>
|
||||
<td>{{ expense.price }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_expense_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_expense_edit', {'id': expense.id}) }}">edit</a>
|
||||
|
||||
{{ include('expense/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
4
templates/festival/_delete_form.html.twig
Normal file
4
templates/festival/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_festival_delete', {'id': festival.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ festival.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/festival/_form.html.twig
Normal file
4
templates/festival/_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
26
templates/festival/edit.html.twig
Executable file → Normal file
26
templates/festival/edit.html.twig
Executable file → Normal file
|
@ -1,25 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit Festival{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Festival edit</h1>
|
||||
<h1>Edit Festival</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_widget(edit_form) }}
|
||||
<input type=submit value=" Envoyer
|
||||
"/>
|
||||
{{ form_end(edit_form) }}
|
||||
{{ include('festival/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('festival_index') }}">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
Retour à la liste
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
<a href="{{ path('app_festival_index') }}">back to list</a>
|
||||
|
||||
{{ include('festival/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
|
|
100
templates/festival/index.html.twig
Executable file → Normal file
100
templates/festival/index.html.twig
Executable file → Normal file
|
@ -1,95 +1,39 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Festival index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row heading-of-list">
|
||||
<div class="col-xs-6">
|
||||
<h1>Festivals</h1></div>
|
||||
<div class="col-xs-6">
|
||||
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Festival index</h1>
|
||||
|
||||
|
||||
<table class="table-responsive table-striped table table-bordered table-light">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Datecreation</th>
|
||||
<th>Tous Frais</th>
|
||||
<th>Clients</th>
|
||||
<th>fond caisse avant</th>
|
||||
<th>fond caisse apres</th>
|
||||
<th>chiffre affaire</th>
|
||||
<th>fond caisse + CA</th>
|
||||
<th>diff</th>
|
||||
<th>bénefices CA - frais</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Date_start</th>
|
||||
<th>Date_end</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
{% for festival in festivals %}
|
||||
<tr
|
||||
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
|
||||
class="bg-success"
|
||||
{% endif %}
|
||||
>
|
||||
<td>
|
||||
<a class="btn btn-primary"
|
||||
href="{{ path('festival_show', { 'id': festival.id }) }}">{{ festival.id }}</a>
|
||||
</td>
|
||||
<tr>
|
||||
<td>{{ festival.id }}</td>
|
||||
<td>{{ festival.name }}</td>
|
||||
<td>{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}</td>
|
||||
<td>{{ festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement }}
|
||||
€
|
||||
</td>
|
||||
|
||||
<td>{{ festival.sellRecords|length }}</td>
|
||||
<td>{{ festival.fondDeCaisseAvant }}€</td>
|
||||
<td>{{ festival.fondDeCaisseApres }}€</td>
|
||||
<td>{{ festival.chiffreAffaire }}€</td>
|
||||
<td>{{ festival.fondDeCaisseAvant + festival.chiffreAffaire }}€</td>
|
||||
<td
|
||||
class="{% if (festival.chiffreAffaire - festival.fondDeCaisseApres) != 0 %}
|
||||
bg-warning
|
||||
{% else %}
|
||||
bg-success
|
||||
{% endif %}"
|
||||
>{{ festival.chiffreAffaire - festival.fondDeCaisseApres }}€
|
||||
</td>
|
||||
<td>{{ festival.chiffreAffaire - (festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement ) }}</td>
|
||||
<td>{{ festival.dateStart ? festival.dateStart|date('Y-m-d') : '' }}</td>
|
||||
<td>{{ festival.dateEnd ? festival.dateEnd|date('Y-m-d') : '' }}</td>
|
||||
<td>
|
||||
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
|
||||
<span class="badge badge-success">
|
||||
Actuel
|
||||
</span>
|
||||
{% else %}
|
||||
<a class="btn btn-success" href="{{ path('set_active_festival', { 'id': festival.id }) }}">
|
||||
choisir comme actuel
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if festival.user|length %}
|
||||
{% for u in festival.user %}
|
||||
<span class="badge badge-info">{{ u.username }}</span>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info">
|
||||
|
||||
pas d'owner.
|
||||
</div>
|
||||
{% endif %}
|
||||
<a class="btn btn-primary" href="{{ path('festival_edit', { 'id': festival.id }) }}">
|
||||
<i class="fa fa-pencil"></i>
|
||||
Modifier
|
||||
</a>
|
||||
<a href="{{ path('app_festival_show', {'id': festival.id}) }}">show</a>
|
||||
<a href="{{ path('app_festival_edit', {'id': festival.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
|
||||
<a href="{{ path('app_festival_new') }}">Create new</a>
|
||||
{% endblock %}
|
||||
|
|
15
templates/festival/new.html.twig
Executable file → Normal file
15
templates/festival/new.html.twig
Executable file → Normal file
|
@ -1,16 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New Festival{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Festival creation</h1>
|
||||
<h1>Create new Festival</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<input class="btn btn-primary btn-block" type="submit" value="Créer" />
|
||||
{{ form_end(form) }}
|
||||
{{ include('festival/_form.html.twig') }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('festival_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="{{ path('app_festival_index') }}">back to list</a>
|
||||
{% endblock %}
|
||||
|
|
53
templates/festival/show.html.twig
Executable file → Normal file
53
templates/festival/show.html.twig
Executable file → Normal file
|
@ -1,39 +1,34 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Festival{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Festival</h1>
|
||||
|
||||
<table class="table-responsive table-striped table table-bordered table-light">
|
||||
<table class="table">
|
||||
<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>Date_start</th>
|
||||
<td>{{ festival.dateStart ? festival.dateStart|date('Y-m-d') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Date_end</th>
|
||||
<td>{{ festival.dateEnd ? festival.dateEnd|date('Y-m-d') : '' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<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 }) }}">edit</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
<a href="{{ path('app_festival_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_festival_edit', {'id': festival.id}) }}">edit</a>
|
||||
|
||||
{{ include('festival/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
|
|
4
templates/group_of_products/_delete_form.html.twig
Normal file
4
templates/group_of_products/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_group_of_products_delete', {'id': group_of_product.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ group_of_product.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/group_of_products/_form.html.twig
Normal file
4
templates/group_of_products/_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
13
templates/group_of_products/edit.html.twig
Normal file
13
templates/group_of_products/edit.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit GroupOfProducts{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit GroupOfProducts</h1>
|
||||
|
||||
{{ include('group_of_products/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_group_of_products_index') }}">back to list</a>
|
||||
|
||||
{{ include('group_of_products/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
35
templates/group_of_products/index.html.twig
Normal file
35
templates/group_of_products/index.html.twig
Normal file
|
@ -0,0 +1,35 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}GroupOfProducts index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>GroupOfProducts index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for group_of_product in group_of_products %}
|
||||
<tr>
|
||||
<td>{{ group_of_product.id }}</td>
|
||||
<td>{{ group_of_product.name }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_group_of_products_show', {'id': group_of_product.id}) }}">show</a>
|
||||
<a href="{{ path('app_group_of_products_edit', {'id': group_of_product.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="3">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_group_of_products_new') }}">Create new</a>
|
||||
{% endblock %}
|
11
templates/group_of_products/new.html.twig
Normal file
11
templates/group_of_products/new.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New GroupOfProducts{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new GroupOfProducts</h1>
|
||||
|
||||
{{ include('group_of_products/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_group_of_products_index') }}">back to list</a>
|
||||
{% endblock %}
|
26
templates/group_of_products/show.html.twig
Normal file
26
templates/group_of_products/show.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}GroupOfProducts{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>GroupOfProducts</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ group_of_product.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ group_of_product.name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_group_of_products_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_group_of_products_edit', {'id': group_of_product.id}) }}">edit</a>
|
||||
|
||||
{{ include('group_of_products/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
4
templates/product/_delete_form.html.twig
Normal file
4
templates/product/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_product_delete', {'id': product.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ product.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/product/_form.html.twig
Normal file
4
templates/product/_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
25
templates/product/edit.html.twig
Executable file → Normal file
25
templates/product/edit.html.twig
Executable file → Normal file
|
@ -1,24 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit Product{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Product edit</h1>
|
||||
<h1>Edit Product</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_widget(edit_form) }}
|
||||
<input type="submit" value="Edit"/>
|
||||
{{ form_end(edit_form) }}
|
||||
{{ include('product/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('product_index') }}">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
Retour à la liste
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
<a href="{{ path('app_product_index') }}">back to list</a>
|
||||
|
||||
{{ include('product/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
|
|
79
templates/product/index.html.twig
Executable file → Normal file
79
templates/product/index.html.twig
Executable file → Normal file
|
@ -1,74 +1,39 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Product index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row heading-of-list">
|
||||
<div class="col-xs-6">
|
||||
<h1>Produits</h1></div>
|
||||
<div class="col-xs-6">
|
||||
<h1>Product index</h1>
|
||||
|
||||
<a class="btn btn-primary pull-right" href="{{ path('product_new') }}">Nouveau produit</a>
|
||||
<span class="hint alert alert-info pull-right">
|
||||
astuce: Utilisez
|
||||
<strong>
|
||||
|
||||
<a href="{{ path('import') }}">
|
||||
l'import de masse
|
||||
</a>
|
||||
</strong>
|
||||
pour créer plusieurs produits et catégories à la fois
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table-responsive table-striped table table-bordered table-light">
|
||||
<thead class="bg-dark">
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Category</th>
|
||||
<th>Name</th>
|
||||
<th>Image</th>
|
||||
<th>Price</th>
|
||||
<th>Stocks</th>
|
||||
<th>Vendus</th>
|
||||
<th>Comment</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Price</th>
|
||||
<th>Stock</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for product in products %}
|
||||
<tr>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-block"
|
||||
href="{{ path('product_show', { 'id': product.id }) }}">{{ product.id }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-block"
|
||||
href="{{ path('productcategory_edit', { 'id': product.category.id }) }}">
|
||||
{{ product.category.name }}
|
||||
</a>
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-default btn-block" href="{{ path('product_edit', { 'id': product.id }) }}">
|
||||
{{ product.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ product.image }}</td>
|
||||
<td>{{ product.id }}</td>
|
||||
<td>{{ product.name }}</td>
|
||||
<td>{{ product.price }}</td>
|
||||
<td>{{ product.stockCount }}</td>
|
||||
<td>{{ product.productsSold | length }}</td>
|
||||
<td>{{ product.comment }}</td>
|
||||
<td>{{ product.stock }}</td>
|
||||
<td>
|
||||
<a class="btn btn-default" href="{{ path('product_edit', { 'id': product.id }) }}">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</a>
|
||||
<a href="{{ path('app_product_show', {'id': product.id}) }}">show</a>
|
||||
<a href="{{ path('app_product_edit', {'id': product.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="btn btn-primary" href="{{ path('product_new') }}">Nouveau produit</a>
|
||||
<a href="{{ path('app_product_new') }}">Create new</a>
|
||||
{% endblock %}
|
||||
|
|
18
templates/product/new.html.twig
Executable file → Normal file
18
templates/product/new.html.twig
Executable file → Normal file
|
@ -1,19 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New Product{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Product creation</h1>
|
||||
<h1>Create new Product</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<input type="submit" class="btn btn-primary btn-block" value="Créer"/>
|
||||
{{ form_end(form) }}
|
||||
{{ include('product/_form.html.twig') }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('product_index') }}">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
Retour à la liste
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="{{ path('app_product_index') }}">back to list</a>
|
||||
{% endblock %}
|
||||
|
|
61
templates/product/show.html.twig
Executable file → Normal file
61
templates/product/show.html.twig
Executable file → Normal file
|
@ -1,47 +1,34 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Product{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Product</h1>
|
||||
|
||||
<table class="table-responsive table-striped table table-bordered table-light">
|
||||
<table class="table">
|
||||
<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>Price</th>
|
||||
<td>{{ product.price }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Stock</th>
|
||||
<td>{{ product.stock }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<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 }) }}">edit</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
<a href="{{ path('app_product_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_product_edit', {'id': product.id}) }}">edit</a>
|
||||
|
||||
{{ include('product/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
|
|
4
templates/selling/_delete_form.html.twig
Normal file
4
templates/selling/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_selling_delete', {'id': selling.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ selling.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/selling/_form.html.twig
Normal file
4
templates/selling/_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
13
templates/selling/edit.html.twig
Normal file
13
templates/selling/edit.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit Selling{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit Selling</h1>
|
||||
|
||||
{{ include('selling/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_selling_index') }}">back to list</a>
|
||||
|
||||
{{ include('selling/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
41
templates/selling/index.html.twig
Normal file
41
templates/selling/index.html.twig
Normal file
|
@ -0,0 +1,41 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Selling index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Selling index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Note</th>
|
||||
<th>Products</th>
|
||||
<th>Sum</th>
|
||||
<th>Reduction</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for selling in sellings %}
|
||||
<tr>
|
||||
<td>{{ selling.id }}</td>
|
||||
<td>{{ selling.note }}</td>
|
||||
<td>{{ selling.products }}</td>
|
||||
<td>{{ selling.sum }}</td>
|
||||
<td>{{ selling.reduction }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_selling_show', {'id': selling.id}) }}">show</a>
|
||||
<a href="{{ path('app_selling_edit', {'id': selling.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_selling_new') }}">Create new</a>
|
||||
{% endblock %}
|
11
templates/selling/new.html.twig
Normal file
11
templates/selling/new.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New Selling{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new Selling</h1>
|
||||
|
||||
{{ include('selling/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_selling_index') }}">back to list</a>
|
||||
{% endblock %}
|
38
templates/selling/show.html.twig
Normal file
38
templates/selling/show.html.twig
Normal file
|
@ -0,0 +1,38 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Selling{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Selling</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ selling.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Note</th>
|
||||
<td>{{ selling.note }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Products</th>
|
||||
<td>{{ selling.products }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sum</th>
|
||||
<td>{{ selling.sum }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Reduction</th>
|
||||
<td>{{ selling.reduction }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_selling_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_selling_edit', {'id': selling.id}) }}">edit</a>
|
||||
|
||||
{{ include('selling/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
25
templates/toMigrate/festival/edit.html.twig
Executable file
25
templates/toMigrate/festival/edit.html.twig
Executable file
|
@ -0,0 +1,25 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Festival edit</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_widget(edit_form) }}
|
||||
<input type=submit value=" Envoyer
|
||||
"/>
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('festival_index') }}">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
Retour à la liste
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
95
templates/toMigrate/festival/index.html.twig
Executable file
95
templates/toMigrate/festival/index.html.twig
Executable file
|
@ -0,0 +1,95 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row heading-of-list">
|
||||
<div class="col-xs-6">
|
||||
<h1>Festivals</h1></div>
|
||||
<div class="col-xs-6">
|
||||
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table-responsive table-striped table table-bordered table-light">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Datecreation</th>
|
||||
<th>Tous Frais</th>
|
||||
<th>Clients</th>
|
||||
<th>fond caisse avant</th>
|
||||
<th>fond caisse apres</th>
|
||||
<th>chiffre affaire</th>
|
||||
<th>fond caisse + CA</th>
|
||||
<th>diff</th>
|
||||
<th>bénefices CA - frais</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
{% for festival in festivals %}
|
||||
<tr
|
||||
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
|
||||
class="bg-success"
|
||||
{% endif %}
|
||||
>
|
||||
<td>
|
||||
<a class="btn btn-primary"
|
||||
href="{{ path('festival_show', { 'id': festival.id }) }}">{{ festival.id }}</a>
|
||||
</td>
|
||||
<td>{{ festival.name }}</td>
|
||||
<td>{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}</td>
|
||||
<td>{{ festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement }}
|
||||
€
|
||||
</td>
|
||||
|
||||
<td>{{ festival.sellRecords|length }}</td>
|
||||
<td>{{ festival.fondDeCaisseAvant }}€</td>
|
||||
<td>{{ festival.fondDeCaisseApres }}€</td>
|
||||
<td>{{ festival.chiffreAffaire }}€</td>
|
||||
<td>{{ festival.fondDeCaisseAvant + festival.chiffreAffaire }}€</td>
|
||||
<td
|
||||
class="{% if (festival.chiffreAffaire - festival.fondDeCaisseApres) != 0 %}
|
||||
bg-warning
|
||||
{% else %}
|
||||
bg-success
|
||||
{% endif %}"
|
||||
>{{ festival.chiffreAffaire - festival.fondDeCaisseApres }}€
|
||||
</td>
|
||||
<td>{{ festival.chiffreAffaire - (festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement ) }}</td>
|
||||
<td>
|
||||
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
|
||||
<span class="badge badge-success">
|
||||
Actuel
|
||||
</span>
|
||||
{% else %}
|
||||
<a class="btn btn-success" href="{{ path('set_active_festival', { 'id': festival.id }) }}">
|
||||
choisir comme actuel
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if festival.user|length %}
|
||||
{% for u in festival.user %}
|
||||
<span class="badge badge-info">{{ u.username }}</span>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info">
|
||||
|
||||
pas d'owner.
|
||||
</div>
|
||||
{% endif %}
|
||||
<a class="btn btn-primary" href="{{ path('festival_edit', { 'id': festival.id }) }}">
|
||||
<i class="fa fa-pencil"></i>
|
||||
Modifier
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
|
||||
{% endblock %}
|
16
templates/toMigrate/festival/new.html.twig
Executable file
16
templates/toMigrate/festival/new.html.twig
Executable file
|
@ -0,0 +1,16 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Festival creation</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<input class="btn btn-primary btn-block" type="submit" value="Créer" />
|
||||
{{ form_end(form) }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('festival_index') }}"> <i class="fa fa-arrow-left"></i>Retour à la liste</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
39
templates/toMigrate/festival/show.html.twig
Executable file
39
templates/toMigrate/festival/show.html.twig
Executable file
|
@ -0,0 +1,39 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Festival</h1>
|
||||
|
||||
<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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<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 }) }}">edit</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
24
templates/toMigrate/product/edit.html.twig
Executable file
24
templates/toMigrate/product/edit.html.twig
Executable file
|
@ -0,0 +1,24 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Product edit</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_widget(edit_form) }}
|
||||
<input type="submit" value="Edit"/>
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('product_index') }}">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
Retour à la liste
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
74
templates/toMigrate/product/index.html.twig
Executable file
74
templates/toMigrate/product/index.html.twig
Executable file
|
@ -0,0 +1,74 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row heading-of-list">
|
||||
<div class="col-xs-6">
|
||||
<h1>Produits</h1></div>
|
||||
<div class="col-xs-6">
|
||||
|
||||
<a class="btn btn-primary pull-right" href="{{ path('product_new') }}">Nouveau produit</a>
|
||||
<span class="hint alert alert-info pull-right">
|
||||
astuce: Utilisez
|
||||
<strong>
|
||||
|
||||
<a href="{{ path('import') }}">
|
||||
l'import de masse
|
||||
</a>
|
||||
</strong>
|
||||
pour créer plusieurs produits et catégories à la fois
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table-responsive table-striped table table-bordered table-light">
|
||||
<thead class="bg-dark">
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Category</th>
|
||||
<th>Name</th>
|
||||
<th>Image</th>
|
||||
<th>Price</th>
|
||||
<th>Stocks</th>
|
||||
<th>Vendus</th>
|
||||
<th>Comment</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for product in products %}
|
||||
<tr>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-block"
|
||||
href="{{ path('product_show', { 'id': product.id }) }}">{{ product.id }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-block"
|
||||
href="{{ path('productcategory_edit', { 'id': product.category.id }) }}">
|
||||
{{ product.category.name }}
|
||||
</a>
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-default btn-block" href="{{ path('product_edit', { 'id': product.id }) }}">
|
||||
{{ product.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ product.image }}</td>
|
||||
<td>{{ product.price }}</td>
|
||||
<td>{{ product.stockCount }}</td>
|
||||
<td>{{ product.productsSold | length }}</td>
|
||||
<td>{{ product.comment }}</td>
|
||||
<td>
|
||||
<a class="btn btn-default" href="{{ path('product_edit', { 'id': product.id }) }}">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="btn btn-primary" href="{{ path('product_new') }}">Nouveau produit</a>
|
||||
{% endblock %}
|
19
templates/toMigrate/product/new.html.twig
Executable file
19
templates/toMigrate/product/new.html.twig
Executable file
|
@ -0,0 +1,19 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Product creation</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<input type="submit" class="btn btn-primary btn-block" value="Créer"/>
|
||||
{{ form_end(form) }}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="btn btn-primary" href="{{ path('product_index') }}">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
Retour à la liste
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
47
templates/toMigrate/product/show.html.twig
Executable file
47
templates/toMigrate/product/show.html.twig
Executable file
|
@ -0,0 +1,47 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Product</h1>
|
||||
|
||||
<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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<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 }) }}">edit</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
<input type="submit" value="Delete">
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue