Initial commit

This commit is contained in:
Crizomb 2025-06-28 12:17:52 +02:00
commit 3bc898dd10
130 changed files with 25918 additions and 0 deletions

View file

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_collection_fractal_delete', {'id': collection_fractal.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ collection_fractal.id) }}">
<button class="btn">Delete</button>
</form>

View file

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn btn-success mt-2 mb-2">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View file

@ -0,0 +1,21 @@
{% extends 'base.html.twig' %}
{% block title %}CollectionFractal{% endblock %}
{% block main %}
<div class="text-center"><h1>Collection "{{collection_fractal.name}}"</h1>
<a href="{{ path('app_collection_fractal_show',{'id': collection_fractal.id}) }}", class="btn btn-primary mb-3 mx-auto">Retour</a>
</div>
<div class="card shadow p-3 mb-5 bg-body-tertiary rounded bg-light mx-auto" style="width: 25rem;">
<img src={{ vich_uploader_asset(carte_fractal,'imageFile') }} class="mx-auto img-fluid" alt="carte" />
<div class="card-body mx-auto p-2">
<h5 class="card-title text-center">{{ carte_fractal.description }}</h5>
<p class="card-text text-center">{{ carte_fractal.type }}</p>
<p class="card-text text-center">{{ carte_fractal.prix }} Points Fractal</p>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit CollectionFractal{% endblock %}
{% block main %}
<h1>Edit CollectionFractal</h1>
{{ include('collection_fractal/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_collection_fractal_index') }}">back to list</a>
{{ include('collection_fractal/_delete_form.html.twig') }}
{% endblock %}

View file

@ -0,0 +1,79 @@
{% extends 'base.html.twig' %}
{% block title %}Collection Fractal{% endblock %}
{% block main %}
<div class="text-center mt-3 mb-3">
<a href="{{ path('app_collection_fractal_new', {'id': app.user.membreFractal.id}) }}" class="btn btn-success"><h2>Nouvelle Collection</h2></a>
</div>
{% if 'ROLE_ADMIN' in app.user.roles %}
<div class="text-center mb-3"><h1>Toutes les collections</h1></div>
{% for collection in priv_collections_fractal %}
<div class="card shadow p-3 mb-5 bg-body-tertiary rounded bg-light mx-auto" style="width: 25rem;">
<img src='https://render.fineartamerica.com/images/rendered/default/flat/tapestry/images/artworkimages/medium/1/buddhabrot-fractal-buddha-miroslav-nemecek.jpg?&targetx=0&targety=-68&imagewidth=930&imageheight=930&modelwidth=930&modelheight=794&backgroundcolor=000018&orientation=1&producttype=tapestry-50-61' class="mx-auto p-2" alt="collection" width="100" height="100">
<div class="card-body mx-auto p-2">
<h5 class="card-title text-center">{{ collection.name }}</h5>
<p class="card-text text-center">Collection de {{ collection.membreFractal }}</p>
<p class="card-text text-center">{{ collection.ispublic ? 'Publique' : 'Privée' }}</p>
<div class="container mx-auto p-2">
<a href="{{ path('app_collection_fractal_show',{'id':collection.id}) }}" class="btn btn-primary">Détails</a>
<a href="{{ path('app_collection_fractal_edit',{'id':collection.id}) }}" class="btn btn-danger">Éditer</a>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class=text-center><h1>Collections Fractal</h1></div>
{% for collection in collection_fractales %}
<div class="card shadow p-3 mb-5 bg-body-tertiary rounded bg-light mx-auto" style="width: 25rem;">
<img src='https://render.fineartamerica.com/images/rendered/default/flat/tapestry/images/artworkimages/medium/1/buddhabrot-fractal-buddha-miroslav-nemecek.jpg?&targetx=0&targety=-68&imagewidth=930&imageheight=930&modelwidth=930&modelheight=794&backgroundcolor=000018&orientation=1&producttype=tapestry-50-61' class="mx-auto" alt="collection" width="100" height="100">
<div class="card-body mx-auto">
<h5 class="card-title text-center">{{ collection.name }}</h5>
<p class="card-text text-center">Collection de {{ collection.membreFractal }}</p>
<div class="container">
<a href="{{ path('app_collection_fractal_show',{'id':collection.id}) }}" class="btn btn-primary text-center">Détails</a>
{% if app.user.membreFractal.id == collection.membreFractal.id %}
<a href="{{ path('app_collection_fractal_edit',{'id':collection.id}) }}" class="btn btn-danger">Éditer</a>
{% endif %}
</div>
</div>
</div> {% endfor %}
<div class=text-center><h1>Mes Collections Privées</h1></div>
<table class="table">
<thead>
<tr>
<th>Nom</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for collection_fractal in priv_collections_fractal %}
<tr>
<td>{{ collection_fractal.name }}</td>
<td>
<a href="{{ path('app_collection_fractal_show', {'id': collection_fractal.id}) }}" class="btn btn-primary">Afficher</a>
<a href="{{ path('app_collection_fractal_edit', {'id': collection_fractal.id}) }}" class="btn btn-danger">Éditer</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="4">Vous n'avez pas de collection privée.</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New CollectionFractal{% endblock %}
{% block main %}
<h1>Create new CollectionFractal</h1>
{{ include('collection_fractal/_form.html.twig') }}
<a href="{{ path('app_collection_fractal_index') }}">back to list</a>
{% endblock %}

View file

@ -0,0 +1,21 @@
{% extends 'base.html.twig' %}
{% block title %}CollectionFractal{% endblock %}
{% block main %}
<div class="text-center">
<h1 class="mb-3">Collection "{{ collection_fractal.name }}"</h1>
<ul>
{% for carte in collection_fractal.cartesfractal %}
<a href="{{ path('app_collection_carte_show', {'carte_id': carte.id, 'collection_id': collection_fractal.id}) }}" class="btn btn-success">
<img src={{vich_uploader_asset(carte,'imageFile')}} class="img-fluid" alt="carte" />
<br>
<p class="text-center"><h5>{{ carte }}</h5></p>
</a>
{% endfor %}
</ul>
<a href="{{ path('app_collection_fractal_index') }}", class="btn btn-primary">Retour aux Collections</a>
</div>
{% endblock %}