{% extends 'allianceauth/base.html' %} {% load i18n %} {% load static %} {% block page_title %}{% trans 'Fleet Activity' %}{% endblock %} {% block content %}

{% include "afat/menu.html" %}

{% trans "All FAT Links" %}

{% if msg %} {% endif %} {% if perms.afat.change_afatlink or perms.afat.delete_afatlink %} {% endif %} {% for link in links %} {% if perms.afat.change_afatlink or perms.afat.delete_afatlink %} {% endif %} {% endfor %}
{% endblock %} {% block extra_javascript %} {% include 'bundles/datatables-js.html' %} {% include 'bundles/moment-js.html' %} {% endblock %} {% block extra_css %} {% include 'bundles/datatables-css.html' %} {% endblock %} {% block extra_script %} $.fn.dataTable.moment = function(format, locale) { var types = $.fn.dataTable.ext.type; // Add type detection types.detect.unshift(function(d) { return moment(d, format, locale, true).isValid() ? 'moment-'+format : null; } ); // Add sorting method - use an integer for the sorting types.order[ 'moment-'+format+'-pre' ] = function(d) { return moment(d, format, locale, true).unix(); }; }; $(document).ready(function(){ $.fn.dataTable.moment('YYYY-MMM-D, HH:mm'); $('#link-list').DataTable({ "order": [[ 3, "desc" ]], {% if perms.afat.change_afatlink or perms.afat.delete_afatlink %} "columnDefs": [{ "targets": 5, "orderable": false, "order": [] }] {% endif %} }); }); $('#deleteModal').on('show.bs.modal', function (event) { var button = $(event.relatedTarget) // Button that triggered the modal var url = button.data('url') // Extract info from data-* attributes var name = button.data('name'); var modal = $(this) modal.find('#fat-link').attr("href", url) modal.find('.modal-body').text('{% trans "Are you sure you want to delete" %} ' + name + '?'); }); {% endblock %}