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 %}Zlecanie zadań{% endblock %}</h1>
20 <p>Zleć <a class="btn btn-default" href="{% url 'job_submit' %}" role="button">nowe zadanie</a> lub wybierz z listy zapisanych szablonów poniżej.</p>
22 <h3>Zapisane szablony zadania</h3>
25 <table class="table table-hover">
28 <th class="text-right" style="width: 40px">#</th>
30 <th style="width: 200px">Data utworzenia</th>
31 <th style="width: 200px">Data modyfikacji</th>
36 {% for template in templates %}
38 <td class="text-right">{{ forloop.counter }}</td>
39 <td><a href="{{ template.get_absolute_url }}">{{ template.name }}</a></td>
40 <td>{{ template.created }}</td>
41 <td>{{ template.updated }}</td>
42 <td class="text-right">
43 <button class="btn btn-xs btn-danger delete-template" title="Usuń"
44 data-url="{% url 'template_delete' template.id %}"
45 data-name="{{ template.name }}"
46 data-toggle="modal" data-target="#delete-modal">
47 <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
55 <div id="no-items" class="alert alert-info">
56 <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
57 Brak zapisanych szablonów zadań
61 <form id="delete-modal" action="" method="post" class="modal fade" tabindex="-1"
62 role="dialog" aria-labelledby="delete-modal-label" aria-hidden="true">
63 <div class="modal-dialog">
64 <div class="modal-content">
65 <div class="modal-header">
66 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
67 <h4 class="modal-title" id="delete-modal-label">Usuwanie szablonu</h4>
69 <div class="modal-body">
71 <p>Czy na pewno usunąć szablon <em></em>?</p>
73 <div class="modal-footer">
74 <button type="button" class="btn btn-default" data-dismiss="modal">Anuluj</button>
75 <button type="submit" class="btn btn-danger">Usuń</button>