1 {% extends 'qcg/base.html' %}
6 $('.delete-template').on('click', function() {
8 $modal = $('#delete-modal');
10 $modal.attr('action', $this.data('url'));
11 $modal.find('em').text($this.data('name'));
18 <h1 class="page-header">{% block title %}Szablony zadania{% endblock %}</h1>
21 <table class="table table-hover">
24 <th class="text-right" style="width: 40px">#</th>
26 <th style="width: 200px">Data utworzenia</th>
27 <th style="width: 200px">Data modyfikacji</th>
32 {% for template in templates %}
34 <td class="text-right">{{ forloop.counter }}</td>
35 <td><a href="{{ template.get_absolute_url }}">{{ template.name }}</a></td>
36 <td>{{ template.created }}</td>
37 <td>{{ template.updated }}</td>
38 <td class="text-right">
39 <button class="btn btn-xs btn-danger delete-template" title="Usuń"
40 data-url="{% url 'template_delete' template.id %}"
41 data-name="{{ template.name }}"
42 data-toggle="modal" data-target="#delete-modal">
43 <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
51 <div id="no-items" class="alert alert-info">
52 <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
53 Brak zapisanych szablonów zadań
57 <form id="delete-modal" action="" method="post" class="modal fade" tabindex="-1"
58 role="dialog" aria-labelledby="delete-modal-label" aria-hidden="true">
59 <div class="modal-dialog">
60 <div class="modal-content">
61 <div class="modal-header">
62 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
63 <h4 class="modal-title" id="delete-modal-label">Usuwanie szablonu</h4>
65 <div class="modal-body">
67 <p>Czy na pewno usunąć szablon <em></em>?</p>
69 <div class="modal-footer">
70 <button type="button" class="btn btn-default" data-dismiss="modal">Anuluj</button>
71 <button type="submit" class="btn btn-danger">Usuń</button>