First fully working version of saving snips content with git control

This commit is contained in:
Tim
2023-04-04 23:23:53 +02:00
parent 1a7c9bb25a
commit 842c936d8c
12 changed files with 170 additions and 17 deletions

View File

@ -1,6 +1,6 @@
{% extends 'base/base.html.twig' %}
{% block body %}
<h2>{{ snip }}</h2>
<h2>Editing {{ snip }}</h2>
{{ form(form) }}
{% endblock %}

View File

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

View File

@ -1,5 +1,15 @@
{% extends 'base/base.html.twig' %}
{% block body %}
<h1>{{ snip }}</h1>
<div class="card" style="width: 100%;">
<h4 class="card-header">
<a class="btn btn-sm btn-outline-info" href="{{ path('snip_edit', {snip: snip.id}) }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
</a>
{{ snip }}
</h4>
<div class="card-body">
<p class="card-text">{{ content }}</p>
</div>
</div>
{% endblock %}