website/conservancy/usethesource/templates/usethesource/candidate.html

36 lines
1.3 KiB
HTML

{% extends "usethesource/base.html" %}
{% block head %}
{{ block.super }}
<script src="https://unpkg.com/htmx.org@1.9.6"></script>
{% endblock %}
{% block content %}
{{ block.super }}
<section class="pa2 mt4 mb3">
<div style="display: flex; justify-content: space-between">
<div>
<h2 class="f2 lh-title ttu mt0">{{ candidate.name }}</h2>
<p><strong>Vendor</strong>: {{ candidate.vendor }}</em></p>
<p><strong>Device</strong>: {{ candidate.device }}</em></p>
<p><strong>Released</strong>: {{ candidate.release_date }}</em></p>
</div>
<div class="mt2">
<div><a href="{% url 'usethesource:download' slug=candidate.slug download_type='source' %}" class="white bg-green db pv2 ph3 mb2">Download source</a></div>
<div><a href="{% url 'usethesource:download' slug=candidate.slug download_type='binary' %}" class="white bg-green db pv2 ph3">Download image</a></div>
</div>
</div>
<p>{{ candidate.description }}</p>
<h3 class="f3 lh-title mt4">Comments</h3>
{% for comment in candidate.comment_set.all %}
{% include "usethesource/comment_partial.html" %}
{% endfor %}
{% if user.is_staff %}
{% include "usethesource/add_comment_button_partial.html" %}
{% endif %}
</section>
{% endblock content %}