Allow ceating and editing snips

This commit is contained in:
Tim
2023-04-04 00:36:35 +02:00
parent 921dcf1e97
commit dce2fbff42
7 changed files with 75 additions and 32 deletions

View File

@ -0,0 +1,12 @@
{% extends 'base/base.html.twig' %}
{% block body %}
<h2>{{ snip }}</h2>
<div class="container">
<div class="row">
<div class="col-md-12">
{{ form(form) }}
</div>
</div>
</div>
{% endblock %}

View File

@ -7,10 +7,11 @@
<h1>Snippets</h1>
</div>
</div>
<a class="btn btn-primary" href="{{ path('snip_new') }}">Create a new Snip</a>
<div class="row">
<div class="list-group">
{% for snip in snips %}
<a class="list-group-item">
<a class="list-group-item" href="{{ path('snip_edit', {snip: snip.id}) }}">
{{ snip }}
</a>
{% endfor %}