mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 08:53:46 +00:00
Add buttons for aliases collapse
This commit is contained in:
parent
ae7b8ee0ba
commit
3e07158273
2 changed files with 35 additions and 19 deletions
|
@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% include "pagination.html" with list=machines_list %}
|
{% include "pagination.html" with list=machines_list %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<table class="table">
|
<table class="table" id="machines_table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col>
|
<col>
|
||||||
<col>
|
<col>
|
||||||
|
@ -65,21 +65,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% if interface.domain.related_domain.all %}
|
{% if interface.domain.related_domain.all %}
|
||||||
<div class="dropdown">
|
{{ interface.domain }}
|
||||||
<button class="btn btn-default dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseDomain_{{interface.id}}" aria-expanded="true" aria-controls="collapseDomain_{{interface.id}}">
|
||||||
{{ interface.domain }} <span class="caret"></span>
|
Afficher les alias
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu" aria-labelledby="editioninterface">
|
|
||||||
{% for al in interface.domain.related_domain.all %}
|
|
||||||
<li>
|
|
||||||
<a href="http://{{ al }}">
|
|
||||||
{{ al }}
|
|
||||||
<i class="glyphicon glyphicon-share-alt"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ interface.domain }}
|
{{ interface.domain }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -132,6 +121,24 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% if interface.domain.related_domain.all %}
|
||||||
|
<tr>
|
||||||
|
<td colspan=5 style="border-top: none; padding: 1px;">
|
||||||
|
<div class="collapse in" id="collapseDomain_{{interface.id}}">
|
||||||
|
<ul class="list-group" style="margin-bottom: 0px;">
|
||||||
|
{% for al in interface.domain.related_domain.all %}
|
||||||
|
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">
|
||||||
|
<a href="http://{{ al }}">
|
||||||
|
{{ al }}
|
||||||
|
<i class="glyphicon glyphicon-share-alt"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="8"></td>
|
<td colspan="8"></td>
|
||||||
|
@ -140,6 +147,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$("#machines_table").ready( function() {
|
||||||
|
var alias_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.domain.related_domain.all %}$("#collapseDomain_{{interface.id}}"), {% endif %}{% endfor %}{% endfor %}];
|
||||||
|
for (var i=0 ; i<alias_div.length ; i++) {
|
||||||
|
alias_div[i].collapse('hide');
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
</script>
|
||||||
|
|
||||||
{% if machines_list.paginator %}
|
{% if machines_list.paginator %}
|
||||||
{% include "pagination.html" with list=machines_list %}
|
{% include "pagination.html" with list=machines_list %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -90,10 +90,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$("#listRights_table").ready( function () {
|
$("#listRights_table").ready( function () {
|
||||||
var listRights_div = [{% for listright in listright_list %}[$("#accordion_{{listright.gid}}"), $("#collapseListRight_user_{{listright.gid}}"), $("#collapseListRight_perm_{{listright.gid}}")], {% endfor %}];
|
var listRights_div = [{% for listright in listright_list %}[$("#accordion_{{listright.gid}}"), $("#collapseListRight_user_{{listright.gid}}"), $("#collapseListRight_perm_{{listright.gid}}")], {% endfor %}];
|
||||||
for (var i=0 ; i<listRights_div.length ; i++) {
|
for (var i=0 ; i<listRights_div.length ; i++) {
|
||||||
listRights_div[i][1].collapse({ toggle: true, parent: listRights_div[i][0] });
|
listRights_div[i][1].collapse({ toggle: true, parent: listRights_div[i][0] });
|
||||||
listRights_div[i][2].collapse({ toggle: true, parent: listRights_div[i][0] });
|
listRights_div[i][2].collapse({ toggle: true, parent: listRights_div[i][0] });
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue