Skip to content

Commit

Permalink
#6797: Fix search result layout
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Jul 24, 2021
1 parent a60e8d3 commit 05cfdd0
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions netbox/templates/search.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'base/layout.html' %}
{% load helpers %}
{% load form_helpers %}
{% load render_table from django_tables2 %}

{% block title %}Search{% endblock %}

Expand All @@ -10,20 +11,25 @@
<div class="row">
<div class="col col-md-9">
{% for obj_type in results %}
<h3 id="{{ obj_type.name|lower }}">{{ obj_type.name|bettertitle }}</h3>
{% include 'inc/panel_table.html' with table=obj_type.table %}
<a href="{{ obj_type.url }}" class="btn btn-primary float-end my-3">
<i class="mdi mdi-arrow-right-bold" aria-hidden="true"></i>
{% if obj_type.table.page.has_next %}
See All {{ obj_type.table.page.paginator.count }} Results
{% else %}
Refine Search
{% endif %}
</a>
<div class="card">
<h5 class="card-header">{{ obj_type.name|bettertitle }}</h5>
<div class="card-body">
{% render_table obj_type.table 'inc/table.html' %}
</div>
<div class="card-footer text-end">
<a href="{{ obj_type.url }}" class="btn btn-sm btn-primary my-1">
<i class="mdi mdi-arrow-right-bold" aria-hidden="true"></i>
{% if obj_type.table.page.has_next %}
See All {{ obj_type.table.page.paginator.count }} Results
{% else %}
Refine Search
{% endif %}
</a>
</div>
</div>
{% endfor %}
</div>
<div class="col col-md-3">
<h3 class="invisible">&nbsp;</h3>
<div class="card">
<h5 class="card-header">
Search Results
Expand Down

0 comments on commit 05cfdd0

Please sign in to comment.