Revision 97e42c7d templates/user_routes.html
b/templates/user_routes.html | ||
---|---|---|
13 | 13 |
'Delete': function() { |
14 | 14 |
route = $('#route_to_delete').text(); |
15 | 15 |
route_url_id = '#del_route_'+route; |
16 |
console.log(route_url_id); |
|
17 | 16 |
url = $(route_url_id).attr('href'); |
18 |
console.log(route, url); |
|
19 | 17 |
$.ajax({ |
20 | 18 |
url: url , |
21 | 19 |
cache: false, |
... | ... | |
23 | 21 |
$('#dialog').dialog('close'); |
24 | 22 |
} |
25 | 23 |
}); |
26 |
// $('#dialog').dialog('close'); |
|
27 | 24 |
}, |
28 | 25 |
Cancel: function() { |
29 | 26 |
$('#dialog').dialog('close'); |
... | ... | |
32 | 29 |
}); |
33 | 30 |
$('#console').dialog({ |
34 | 31 |
height: 250, |
35 |
width: 500,
|
|
32 |
width: 800,
|
|
36 | 33 |
modal: true, |
37 | 34 |
autoOpen: false |
38 | 35 |
}); |
... | ... | |
115 | 112 |
<th style="text-align: center;">{% trans "Applier" %}</th> |
116 | 113 |
<th style="text-align: center;">{% trans "Expires" %}</th> |
117 | 114 |
<th style="text-align: center;">{% trans "Response" %}</th> |
118 |
<th style="text-align: center; width:120px;">{% trans "Actions" %}</th>
|
|
115 |
<th style="text-align: center; width:140px;">{% trans "Actions" %}</th>
|
|
119 | 116 |
</tr> |
120 | 117 |
</thead> |
121 | 118 |
|
122 | 119 |
<tbody> |
123 | 120 |
{% for route in routes %} |
124 | 121 |
|
125 |
<tr {% if route.is_online %} class="GradeA" {% else %} class="GradeX" {% endif %}>
|
|
122 |
<tr {% ifequal route.status 'ACTIVE' %} class="GradeA" {% else %} class="GradeX" {% endifequal %}>
|
|
126 | 123 |
<td>{{ route.name }}</td> |
127 | 124 |
<td>{{ route.get_match|safe|escape }}</td> |
128 | 125 |
<td style="text-align: center;">{{route.get_then|safe|escape}}</td> |
129 |
<td style="text-align: center;">{% if route.is_online %}Online{% else %}Offline{% endif %}</td>
|
|
126 |
<td style="text-align: center;">{{route.status}}</td>
|
|
130 | 127 |
{% comment %}<td style="text-align: center;">{{ route.response }}</td>{% endcomment %} |
131 | 128 |
<td style="text-align: center;">{{ route.applier }}</td> |
132 | 129 |
<td style="text-align: center;">{{ route.expires }}</td> |
133 | 130 |
<td style="text-align: center;">{{ route.response }}</td> |
134 | 131 |
<td style="text-align: center;"> |
135 |
{% if route.is_active %}
|
|
132 |
{% ifequal route.status 'ACTIVE' %}
|
|
136 | 133 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">Edit</a> |
137 | 134 |
<button class="del_button" id="{{route.name}}" onclick="javascript:delete_route(this.id)">Del</button> |
138 | 135 |
<a href="{% url delete-route route.name %}" style="display:none" id="del_route_{{route.name}}"></a> |
139 | 136 |
{% else %} |
137 |
{% ifequal route.status 'INACTIVE' %} |
|
138 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">Reactivate</a> |
|
139 |
{% else %} |
|
140 | 140 |
- |
141 |
{% endif %}</td> |
|
141 |
{% endifequal %} |
|
142 |
{% endifequal %}</td> |
|
142 | 143 |
</tr> |
143 | 144 |
|
144 | 145 |
{% endfor %} |
Also available in: Unified diff