Forgot to add the block for inpage_search

This commit is contained in:
iFargle
2023-03-21 14:38:09 +09:00
parent a39fe4d791
commit 4eca688e55
4 changed files with 16 additions and 16 deletions

View File

@@ -581,17 +581,14 @@ def oidc_nav_mobile(user_name, email_address, name):
"""
return Markup(html_payload)
def render_search(page):
if page == "users" or page == "machines":
app.logger.info("Rendering search for %s page", page)
html_payload = """
<form>
<div class="input-field">
<input id="search" type="search" required>
<label class="label-icon" for="search"><i class="material-icons">search</i></label>
<i class="material-icons">close</i>
</div>
</form>
"""
return Markup(html_payload)
return Markup("")
def render_search():
html_payload = """
<form>
<div class="input-field">
<input id="search" type="search" required>
<label class="label-icon" for="search"><i class="material-icons">search</i></label>
<i class="material-icons">close</i>
</div>
</form>
"""
return Markup(html_payload)

View File

@@ -171,7 +171,7 @@ def machines_page():
# Check if OIDC is enabled. If it is, display the buttons:
OIDC_NAV_DROPDOWN = Markup("")
OIDC_NAV_MOBILE = Markup("")
INPAGE_SEARCH = Markup(renderer.render_search("machines"))
INPAGE_SEARCH = Markup(renderer.render_search())
if AUTH_TYPE == "oidc":
email_address = oidc.user_getfield("email")
user_name = oidc.user_getfield("preferred_username")
@@ -200,7 +200,7 @@ def users_page():
# Check if OIDC is enabled. If it is, display the buttons:
OIDC_NAV_DROPDOWN = Markup("")
OIDC_NAV_MOBILE = Markup("")
INPAGE_SEARCH = Markup(renderer.render_search("users"))
INPAGE_SEARCH = Markup(renderer.render_search()
if AUTH_TYPE == "oidc":
email_address = oidc.user_getfield("email")
user_name = oidc.user_getfield("preferred_username")

View File

@@ -7,6 +7,8 @@
{% block OIDC_NAV_DROPDOWN %} {{ OIDC_NAV_DROPDOWN}} {% endblock %}
{% block OIDC_NAV_MOBILE %} {{ OIDC_NAV_MOBILE }} {% endblock %}
{% block INPAGE_SEARCH%} {{ INPAGE_SEARCH }} {% endblock %}
{% block content %}
<div class="row"><br>

View File

@@ -7,6 +7,7 @@
{% block OIDC_NAV_DROPDOWN %} {{ OIDC_NAV_DROPDOWN}} {% endblock %}
{% block OIDC_NAV_MOBILE %} {{ OIDC_NAV_MOBILE }} {% endblock %}
{% block INPAGE_SEARCH%} {{ INPAGE_SEARCH }} {% endblock %}
{% block content %}
<div class="row"><br>