Fully implement snip db storage

This commit is contained in:
Tim
2023-12-17 01:55:26 +01:00
parent 0fce8ee4fe
commit 6107f560e2
11 changed files with 89 additions and 57 deletions

View File

@ -6,14 +6,14 @@
<a href="{{ path('snip_single', {snip: snip.id}) }}" class="btn btn-primary">
<i class="fa fa-arrow-left"></i> Back
</a>
<a href="{{ path('history_set', {commit: 'master', snip: snip.id}) }}" class="btn btn-warning">
<i class="fa fa-refresh"></i> Master
<a href="{{ path('history_set', {version: latestVersion, snip: snip.id}) }}" class="btn btn-warning">
<i class="fa fa-refresh"></i> Latest
</a>
<br><br>
<div class="list-group">
{% for commit in commits %}
<a class="list-group-item" href="{{ path('history_set', {commit: commit.hash, snip: snip.id}) }}">
{{ commit.date|date }} - {{ commit.hash }}
{% for version in versions %}
<a class="list-group-item" href="{{ path('history_set', {version: version.id, snip: snip.id}) }}">
{{ version.name }} - {{ version.id }}
</a>
{% endfor %}
</div>

View File

@ -27,7 +27,7 @@
{{ snip }} <small class="text-muted">#{{ snip.id }}</small>
</h4>
<div class="card-header">
<p class="card-text">Current branch: {{ branch }}</p>
<p class="card-text">Current version: {{ branch }}</p>
</div>
<div class="card-body">
{{ content|raw }}