Skip to content

Commit

Permalink
Closes #16929: Add version & user details as data attributes (#16939)
Browse files Browse the repository at this point in the history
* Closes #16929: Add version & user details as data attributes

* Fix typo
  • Loading branch information
jeremystretch authored Jul 18, 2024
1 parent 0830ebb commit 954d0cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion netbox/templates/base/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
<html
lang="en"
data-netbox-url-name="{{ request.resolver_match.url_name }}"
data-netbox-base-path="{{ settings.BASE_PATH }}"
data-netbox-version="{{ settings.VERSION }}"
{% if request.user.is_authenticated %}
data-netbox-user-name="{{ request.user.username }}"
data-netbox-user-id="{{ request.user.pk }}"
{% endif %}
>
<head>
<meta charset="UTF-8" />
Expand Down

0 comments on commit 954d0cf

Please sign in to comment.