Browse Source

Fixes #948: Region name should be hyperlinked to site list

Jeremy Stretch 9 năm trước cách đây
mục cha
commit
086340540a
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      netbox/dcim/tables.py

+ 2 - 2
netbox/dcim/tables.py

@@ -12,11 +12,11 @@ from .models import (
 
 
 REGION_LINK = """
 REGION_LINK = """
 {% if record.get_children %}
 {% if record.get_children %}
-    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="fa fa-caret-right"></i></a>
+    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="fa fa-caret-right"></i>
 {% else %}
 {% else %}
     <span style="padding-left: {{ record.get_ancestors|length }}9px">
     <span style="padding-left: {{ record.get_ancestors|length }}9px">
 {% endif %}
 {% endif %}
-    {{ record.name }}
+    <a href="{% url 'dcim:site_list' %}?region={{ record.slug }}">{{ record.name }}</a>
 </span>
 </span>
 """
 """