Revision ab02d61c templates/user_routes.html
b/templates/user_routes.html | ||
---|---|---|
16 | 16 |
modal: true, |
17 | 17 |
autoOpen: false, |
18 | 18 |
buttons: { |
19 |
'Suspend': function(){
|
|
19 |
'{% trans "Suspend" %}': function(){
|
|
20 | 20 |
route = $('#route_to_delete').text(); |
21 | 21 |
route_url_id = '#del_route_' + route; |
22 | 22 |
url = $(route_url_id).attr('href'); |
... | ... | |
29 | 29 |
} |
30 | 30 |
}); |
31 | 31 |
}, |
32 |
Cancel: function(){
|
|
32 |
'{% trans "Cancel" %}': function(){
|
|
33 | 33 |
$('#dialog').dialog('close'); |
34 | 34 |
}, |
35 | 35 |
|
... | ... | |
92 | 92 |
"bSortable": false |
93 | 93 |
}], |
94 | 94 |
"aaSorting": [[0, 'desc']], |
95 |
"oLanguage": { |
|
96 |
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> rules' |
|
97 |
}, |
|
98 | 95 |
"iDisplayLength": 25, |
96 |
"oLanguage": { |
|
97 |
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "rules" %}', |
|
98 |
"sProcessing": "Processing...", |
|
99 |
"sZeroRecords": '{% trans "No records to display" %}', |
|
100 |
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", |
|
101 |
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}", |
|
102 |
"sInfoFiltered": "(filtered from _MAX_ total entries)", |
|
103 |
"sInfoPostFix": "", |
|
104 |
"sSearch": '{% trans "Search:" %}', |
|
105 |
"sUrl": "", |
|
106 |
"oPaginate": { |
|
107 |
"sFirst": '{% trans "First" %}', |
|
108 |
"sPrevious": '{% trans "Previous" %}', |
|
109 |
"sNext": '{% trans "Next" %}', |
|
110 |
"sLast": '{% trans "Last" %}' |
|
111 |
} |
|
112 |
} |
|
99 | 113 |
}); |
100 | 114 |
|
101 | 115 |
oTable.fnDraw(); |
... | ... | |
220 | 234 |
<h3 style="margin-top: 0px;">{% trans "My rules" %}</h3> |
221 | 235 |
</div> |
222 | 236 |
<div class='button_place' style="float:right"> |
223 |
<button id="consolebutton">Console</button> <a href="{% url add-route %}" id="routebutton">Add Rule</a>
|
|
237 |
<button id="consolebutton">{% trans "Console" %}</button> <a href="{% url add-route %}" id="routebutton">{% trans "Add Rule" %}</a>
|
|
224 | 238 |
</div> |
225 | 239 |
<br><br> |
226 | 240 |
|
... | ... | |
290 | 304 |
style="border-bottom:2px dashed red;" |
291 | 305 |
title="Expires {% ifequal route.days_to_expire '0' %}today{% else%}in {{route.days_to_expire}} day{{ route.days_to_expire|pluralize }}{% endifequal %}" |
292 | 306 |
{% endif %}{% endif %}>{{ route.expires }}</span></td> |
293 |
<td style="text-align: center;">{% if route.status == 'EXPIRED' %}Rule expired{% else %}{% if route.status == 'ADMININACTIVE' %}Suspended by administrator{% else %}{% if route.status == 'INACTIVE' %}Suspended by user{% else %}{{ route.response }}{% endif %}{% endif %}{% endif %}</td>
|
|
307 |
<td style="text-align: center;">{% if route.status == 'EXPIRED' %}{% trans "Rule expired" %}{% else %}{% if route.status == 'ADMININACTIVE' %}{% trans "Suspended by administrator" %}{% else %}{% if route.status == 'INACTIVE' %}{% trans "Suspended by user" %}{% else %}{{ route.response }}{% endif %}{% endif %}{% endif %}</td>
|
|
294 | 308 |
<td style="text-align: center; width:180px;"> |
295 | 309 |
{% ifequal route.status 'ACTIVE' %} |
296 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">Edit</a>
|
|
297 |
<button class="del_button" id="{{route.name}}" onclick="javascript:delete_route(this.id)">Suspend</button>
|
|
310 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">{% trans "Edit" %}</a>
|
|
311 |
<button class="del_button" id="{{route.name}}" onclick="javascript:delete_route(this.id)">{% trans "Suspend" %}</button>
|
|
298 | 312 |
<a href="{% url delete-route route.name %}" style="display:none" id="del_route_{{route.name}}"></a> |
299 | 313 |
{% else %} |
300 | 314 |
{% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' %} |
301 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">Reactivate</a>
|
|
315 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">{% trans "Reactivate" %}</a>
|
|
302 | 316 |
{% else %} |
303 | 317 |
{% ifequal route.status 'OUTOFSYNC' %} |
304 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">ReSync</a>
|
|
318 |
<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">{% trans "ReSync" %}</a>
|
|
305 | 319 |
{% else %} |
306 | 320 |
- |
307 | 321 |
{% endifequal %} |
... | ... | |
315 | 329 |
</table> |
316 | 330 |
|
317 | 331 |
<div id="dialog" title="Suspend Rule"> |
318 |
<p>You are about to suspend rule <strong><span id="route_to_delete"></span></strong></p>
|
|
319 |
<p>Suspending the rule will automatically remove the configuration from the network and mark this rule as inactive.</p>
|
|
320 |
<p>Are you sure you want to proceed?</p>
|
|
332 |
<p>{% blocktrans %}You are about to suspend rule{% endblocktrans %} <strong><span id="route_to_delete"></span></strong></p>
|
|
333 |
<p>{% blocktrans %}Suspending the rule will automatically remove the configuration from the network and mark this rule as inactive.{% endblocktrans %}</p>
|
|
334 |
<p>{% blocktrans %}Are you sure you want to proceed?{% endblocktrans %}</p>
|
|
321 | 335 |
</div> |
322 |
<div id="console" title="Console">
|
|
336 |
<div id="console" title="{% trans "Console" %}">
|
|
323 | 337 |
{% include "poll.html" %} |
324 | 338 |
</div> |
325 | 339 |
{% endblock %} |
Also available in: Unified diff