2017-03-20 23:16:58 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2018-03-22 00:33:26 +01:00
|
|
|
<div class="btn-group float-right clearfix" role="group">
|
2017-03-21 23:35:13 +01:00
|
|
|
{% if next-image %}
|
2017-04-25 23:32:56 +02:00
|
|
|
<a class="btn btn-secondary" href="/show/{{ next-image.id }}" id="next-image">
|
|
|
|
{% else %}
|
|
|
|
<a class="btn btn-secondary disabled" href="#">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<span class="fa fa-arrow-left"></span> Neuer
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a class="btn btn-secondary" href="/">
|
2017-04-18 23:14:16 +02:00
|
|
|
<span class="fa fa-home"></span>
|
|
|
|
Gallerie
|
2017-04-25 23:32:56 +02:00
|
|
|
</a>
|
|
|
|
|
|
|
|
{% if prev-image %}
|
|
|
|
<a class="btn btn-secondary" href="/show/{{ prev-image.id }}" id="prev-image">
|
|
|
|
{% else %}
|
|
|
|
<a class="btn btn-secondary disabled" href="#">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
Älter <span class="fa fa-arrow-right"></span>
|
|
|
|
</a>
|
2017-03-22 01:02:51 +01:00
|
|
|
</div>
|
|
|
|
|
2018-03-22 00:33:26 +01:00
|
|
|
<div class="float-left clearfix">
|
2017-03-21 23:35:13 +01:00
|
|
|
<h1>{{ image.title }}</h1>
|
|
|
|
<div id="image-tags">
|
|
|
|
{% for tag in tags %}
|
2017-03-29 14:39:03 +02:00
|
|
|
<span class="badge badge-info">{{ tag.tagname }}</span>
|
2017-03-21 23:35:13 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
2017-03-20 23:16:58 +01:00
|
|
|
|
2017-04-18 23:14:16 +02:00
|
|
|
<div class="detail-image mb-3">
|
2017-04-15 22:45:43 +02:00
|
|
|
<a href="/images/raw/{{ image.hash }}">
|
|
|
|
<img class="card-img-top" src="/images/normal/{{ image.hash }}" alt="{{ image.title }}"/>
|
2017-03-21 23:35:13 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
2017-03-20 23:16:58 +01:00
|
|
|
|
2017-04-23 22:46:37 +02:00
|
|
|
<div id="detail-attributes">
|
|
|
|
{% ifequal identity ":creator" %}
|
2018-03-22 00:33:26 +01:00
|
|
|
<div class="btn-group float-right clearfix" role="group">
|
2017-04-23 22:46:37 +02:00
|
|
|
<a class="btn btn-primary btn-sm" href="/edit/{{ image.id }}">
|
|
|
|
<span class="fa fa-pencil"></span>
|
|
|
|
Bearbeiten
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-danger btn-sm" href="/delete/{{ image.id }}">
|
|
|
|
<span class="fa fa-trash"></span>
|
|
|
|
Löschen
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endifequal %}
|
2017-03-20 23:16:58 +01:00
|
|
|
|
2017-04-23 22:46:37 +02:00
|
|
|
<p>{{ image.created_at|parse-date|date:"dd.MM.yyyy, HH:mm" }} Uhr</p>
|
|
|
|
{% if image.description|length > 0 %}
|
|
|
|
<div class="col-md7">
|
|
|
|
<p>{{ image.description|markdown-to-html|safe }}</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-04-03 21:21:48 +02:00
|
|
|
|
2017-04-23 22:46:37 +02:00
|
|
|
<ul class="list-unlisted">
|
|
|
|
{% for comment in comments %}
|
|
|
|
<li class="media mb-3">
|
|
|
|
<a name="{{ comment.id }}"></a>
|
|
|
|
<img src="https://robohash.org/{{ comment.author }}?size=50x50" class="d-flex mr-3"/>
|
|
|
|
<div class="media-body">
|
|
|
|
<h5 class="mt-0 mb-1">{{ comment.author }}</h5>
|
|
|
|
{% ifequal identity ":creator" %}
|
|
|
|
<a class="btn btn-sm btn-danger" href="/delete-comment/{{ comment.id}}">Löschen</a>
|
|
|
|
{% endifequal %}
|
|
|
|
{{ comment.comment|markdown-to-html|safe }}
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2017-04-03 21:21:48 +02:00
|
|
|
|
2017-04-23 22:46:37 +02:00
|
|
|
<form action="/add-comment/{{ image.id }}" method="POST" class="form-horizontal">
|
|
|
|
{% csrf-field %}
|
2017-04-03 21:21:48 +02:00
|
|
|
|
2017-04-23 22:46:37 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="author">Name</label>
|
|
|
|
<input type="text" name="author" class="form-control"
|
|
|
|
value="{{ saved-author }}"
|
|
|
|
placeholder="Bitte einen Namen wählen (wird beim nächsten Mal gespeichert)">
|
|
|
|
</div>
|
2017-04-03 21:21:48 +02:00
|
|
|
|
2017-04-23 22:46:37 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="comment">Kommentar</label>
|
|
|
|
<textarea name="comment" class="form-control" rows="3"
|
|
|
|
placeholder="Es kann auch Markdown-Syntax verwendet werden"></textarea>
|
|
|
|
</div>
|
2017-04-03 21:21:48 +02:00
|
|
|
|
2017-04-23 22:46:37 +02:00
|
|
|
<button type="submit" class="btn btn-success">
|
|
|
|
<span class="fa fa-floppy-o"></span>
|
|
|
|
Kommentar hinzufügen
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
2017-03-20 23:16:58 +01:00
|
|
|
{% endblock %}
|