diff --git a/topologie/templates/topologie/aff_modules.html b/topologie/templates/topologie/aff_modules.html
index d73fffeb..0c7a3207 100644
--- a/topologie/templates/topologie/aff_modules.html
+++ b/topologie/templates/topologie/aff_modules.html
@@ -83,3 +83,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% include "pagination.html" with list=module_list %}
{% endif %}
+
{% trans "All modular switchs" %}
+
+
+
+ {% trans "Switch" %} |
+ {% trans "Reference" %} |
+ {% trans "Slot" %} |
+
+ {% for switch in modular_switchs %}
+ {% if switch.list_modules %}
+
+
+ {{ switch }}
+ |
+
+ {% for module in switch.list_modules %}
+
+ |
+ {{ module.1 }} |
+ {{ module.0 }} |
+
+ {% endfor %}
+{% endif %}
+{% endfor %}
+
diff --git a/topologie/templates/topologie/index_module.html b/topologie/templates/topologie/index_module.html
index 5c4c5c7c..d9cc2925 100644
--- a/topologie/templates/topologie/index_module.html
+++ b/topologie/templates/topologie/index_module.html
@@ -35,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% trans " Add a module" %}
{% acl_end %}
- {% include "topologie/aff_modules.html" with module_list=module_list %}
+ {% include "topologie/aff_modules.html" with module_list=module_list modular_switchs=modular_switchs %}
diff --git a/topologie/views.py b/topologie/views.py
index 6ee4de85..4da375e7 100644
--- a/topologie/views.py
+++ b/topologie/views.py
@@ -325,12 +325,14 @@ def index_model_switch(request):
def index_module(request):
"""Display all modules of switchs"""
module_list = ModuleSwitch.objects.all()
+ modular_switchs = Switch.objects.filter(model__is_modular=True)
pagination_number = GeneralOption.get_cached_value('pagination_number')
module_list = re2o_paginator(request, module_list, pagination_number)
return render(
request,
'topologie/index_module.html',
- {'module_list': module_list}
+ {'module_list': module_list,
+ 'modular_switchs': modular_switchs}
)