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

{% block breadcrumbs %}
<li><a href="{{ project.get_absolute_url }}">{{ project }}</a></li>
<li><a href="{% url 'show_dictionaries' project=project.slug %}">{% trans "glossaries" %}</a></li>
<li><a href="{% url 'show_dictionary' project=project.slug lang=language.code %}">{{ language }}</a></li>
{% endblock %}

{% block content %}

{% can_change_dictionary user project as user_can_change_dictionary %}

{% if user_can_change_dictionary %}

<form method="POST">
<div class="panel panel-primary">
<div class="panel-heading"><h4 class="panel-title">{% trans "Change word" %}</h4></div>
  <div class="panel-body">
{% csrf_token %}
{{ form|crispy }}
</div>
  <div class="panel-footer">
<input type="submit" value="{% trans "Save" %}" class="btn btn-default" />
</div>
</div>
</form>
{% endif %}

<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="panel-title">
{% trans "History" %}
</h4>
</div>
<div class="panel-body">

{% include "last-changes-content.html" %}

</div>
</div>

{% endblock %}
