{% extends "base.html" %}
{% load i18n %}
{% load permissions %}
{% load crispy_forms_tags %}
{% load translations %}

{% block breadcrumbs %}
<li><a href="{{ object.project.get_absolute_url }}">{{ object.project }}</a></li>
<li><a href="{% url 'fonts' project=object.project.slug %}#fonts">{% trans "Fonts" %}</a></li>
<li><a href="{{ object.get_absolute_url }}">{{ object }}</a></li>
{% endblock %}

{% block content %}

<div class="panel panel-default">
<div class="panel-heading"><h4 class="panel-title">{% trans "Font" %}</h4></div>
<table class="table table-striped">
<tr><th>{% trans "Font family" %}</th><td>{{ object.family }}</td></tr>
<tr><th>{% trans "Font style" %}</th><td>{{ object.style }}</td></tr>
<tr><th>{% trans "File size" %}</th><td>{{ object.font.size }}</td></tr>
<tr><th>{% trans "Created" %}</th><td>{{ object.timestamp|naturaltime }}</td></tr>
<tr><th>{% trans "Uploaded by" %}</th><td>{{ object.get_user_display }}</td></tr>
<tr><th>{% trans "Used in groups" %}</th><td>
{% for group in object.get_usage %}
<a href="{{ group.get_absolute_url }}">{{ group }}</a>
{% endfor %}
</td></tr>
</table>
<div class="panel-footer">
{% if can_edit %}
<a class="btn btn-danger link-post" href="{{ object.get_absolute_url }}">{% trans "Delete" %}</a>
{% endif %}
</div>
</div>

{% endblock %}
