{% extends 'kfet/base_col_2.html' %}
{% load l10n static widget_tweaks %}

{% block title %}Transferts{% endblock %}
{% block header-title %}Transferts{% endblock %}

{% block extra_head %}
<script type="text/javascript" src="{% url 'js_reverse' %}" ></script>
<script type="text/javascript" src="{% static 'kfet/js/history.js' %}"></script>
<script type="text/javascript" src="{% static 'kfet/vendor/moment/moment-timezone-with-data-2012-2022.min.js' %}"></script>
{% endblock %}

{% block fixed %}

<div class="buttons">
  <a class="btn btn-primary" href="{% url 'kfet.transfers.create' %}">
    Nouveaux
  </a>
</div>

{% endblock %}

{% block main %}

<table id="history" class="table">
</table>

<script type="text/javascript">

$(document).ready(function() {

    window.lock = 0;
    settings = { 'subvention_cof': parseFloat({{ kfet_config.subvention_cof|unlocalize }})}


    var khistory = new KHistory({
        fetch_options:{
            transfers_only: true,
        }
    });

    $(document).on('keydown', function (e) {
        if (e.keyCode == 46) {
            // DEL (Suppr)
            khistory.cancel_selected()
        }
    });

    khistory.fetch()
});

</script>

{% endblock %}
