Skip to content

Commit dbcd89c

Browse files
tobiasgejeremystretch
authored andcommitted
Closes #16273: Add search box to menu on mobile
1 parent 00d9a86 commit dbcd89c

File tree

1 file changed

+16
-0
lines changed
  • netbox/utilities/templates/navigation

1 file changed

+16
-0
lines changed

netbox/utilities/templates/navigation/menu.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
{% load helpers %}
2+
{% load i18n %}
23
{% load navigation %}
34

45
<ul class="navbar-nav pt-lg-2" {% htmx_boost %}>
6+
<li class="nav-item d-block d-lg-none">
7+
<form action="{% url 'search' %}" method="get" autocomplete="off" novalidate>
8+
<div class="input-group mb-1 mt-2">
9+
<div class="input-group-prepend">
10+
<span class="input-group-text">
11+
<i class="mdi mdi-magnify"></i>
12+
</span>
13+
</div>
14+
<input type="text" name="q" value="" class="form-control" placeholder="{% trans "Search…" %}" aria-label="{% trans "Search NetBox" %}">
15+
<div class="input-group-append">
16+
<button type="submit" class="form-control">{% trans "Search" %}</button>
17+
</div>
18+
</div>
19+
</form>
20+
</li>
521
{% for menu, groups in nav_items %}
622
<li class="nav-item dropdown">
723

0 commit comments

Comments
 (0)