1 {% extends 'base.html' %}
4 <link rel="stylesheet" href="{{ STATIC_URL }}css/managment.css" type="text/css" />
5 <script type="text/javascript">
10 function refreshRow(id) {
11 var row = $('#request-' +id);
14 url: "http://localhost:8000/api/pull-requests/" + id,
17 success: function(data) {
18 row.removeClass('status-N');
19 row.removeClass('status-R');
20 row.removeClass('status-A');
21 row.addClass('status-'+ data.status);
23 $('.column-doc', row).html(data.document);
24 $('.column-status', row).html(data.status);
26 alert('Merge accepted.');
32 $('.accept-button').click(function()
34 var id = parseInt($(this).attr('title'));
38 url: "http://localhost:8000/api/pull-requests/" + id,
39 data: {action: 'accept'},
42 success: function(data) {
53 {% block maincontent %}
54 <table class="request-report" cellspacing="0">
56 <th>Utwór</th><th>Użytkownik</th><th>Komentarz</th><th>Stan</th>
60 {% for pullreq in objects %}
61 <tr class="status-{{pullreq.status}}" id="request-{{pullreq.id}}">
62 <td class="column-doc">{{ pullreq.document }}</td>
63 <td class="column-user">{{ pullreq.comitter }}</td>
64 <td class="column-comment">{{ pullreq.comment }}</td>
65 <td class="column-status"> {{ pullreq.status }}</td>
66 <td><button type="button" class="accept-button" title="{{pullreq.id}}">Akceptuj</button></td>
71 <tr><td colspan="*">Brak żądań</td></tr>