From 98facee5e0eff063d7bc273f12a1e26c21888fc8 Mon Sep 17 00:00:00 2001 From: edpibu Date: Sat, 22 Sep 2018 18:35:41 +0200 Subject: [PATCH] Added link to the switch on switch ports search results --- search/templates/search/index.html | 2 +- topologie/templates/topologie/aff_port.html | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/search/templates/search/index.html b/search/templates/search/index.html index 23b57cce..84ba501c 100644 --- a/search/templates/search/index.html +++ b/search/templates/search/index.html @@ -59,7 +59,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% endif %} {% if ports %}

{% trans "Results among ports" %}

- {% include "topologie/aff_port.html" with port_list=ports %} + {% include "topologie/aff_port.html" with port_list=ports search=True %} {% endif %} {% if switches %}

{% trans "Results among switches" %}

diff --git a/topologie/templates/topologie/aff_port.html b/topologie/templates/topologie/aff_port.html index c7c6a0b4..d6f18316 100644 --- a/topologie/templates/topologie/aff_port.html +++ b/topologie/templates/topologie/aff_port.html @@ -46,7 +46,11 @@ with this program; if not, write to the Free Software Foundation, Inc., {% for port in port_list %} - {{ port.port }} + {% if search %} + {{ port.port }} + {% else %} + {{ port.port }} + {% endif %} {% if port.room %} {{ port.room }}