1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Jeremy Stretch d302982a88 Fix left padding of login button in top menu
Clean up spacing for nav pills

Markdown fields should default to using monospace font

Wrap action buttons in object page header

Fix page link style for non-HTMX paginators

Clean up styling of Markdown preview widget

Fix spacing around placeholder text for empty panel tables

Remove obsolete templates

Tweak checkbox input spacing

Fix toggling of clear button for quick search

Fix positioning of quick search filter dropdown

Fix positioning of 'highlight device' button

Fix styling for custom field group names

Widen buttons on nav menu items

Restyle the login page

Fix active nav-pill background color in dark mode

Fix spacing around 'map' button for sites
2024-01-31 17:59:14 -05:00

112 lines
3.1 KiB
HTML

{% extends 'generic/_base.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %}
{% load perms %}
{% load plugins %}
{% load tabs %}
{% load i18n %}
{% comment %}
Blocks:
breadcrumbs: Breadcrumb list items (HTML <li> elements)
object_identifier: Unique identifier for the object
extra_controls: Additional action buttons to display
content: Page content
Context:
object: The object instance being viewed
{% endcomment %}
{% block page-header %}
<div class="container-xl">
<div class="d-flex justify-content-between align-items-center mt-2">
{# Breadcrumbs #}
<ol class="breadcrumb" aria-label="breadcrumbs">
{% block breadcrumbs %}
<li class="breadcrumb-item">
<a href="{% url object|viewname:'list' %}">{{ object|meta:'verbose_name_plural'|bettertitle }}</a>
</li>
{% endblock breadcrumbs %}
</ol>
{# Object identifier #}
<code class="d-block text-muted bg-transparent px-0">
{% block object_identifier %}
{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}
{% if object.slug %}({{ object.slug }}){% endif %}
{% endblock object_identifier %}
</code>
</div>
</div>
{{ block.super }}
{% endblock page-header %}
{% block title %}{{ object }}{% endblock %}
{% block subtitle %}
<div class="text-secondary fs-5">
<span>{% trans "Created" %} {{ object.created|annotated_date }}</span>
{% if object.last_updated %}
<span class="separator">&middot;</span>
<span>{% trans "Updated" %} <span title="{{ object.last_updated }}">{{ object.last_updated|timesince }}</span> {% trans "ago" %}</span>
{% endif %}
</div>
{% endblock subtitle %}
{% block controls %}
<div class="btn-list justify-content-end mb-2">
{% plugin_buttons object %}
{# Add/edit/delete/etc. buttons #}
{% block control-buttons %}
{# Extra buttons #}
{% block extra_controls %}{% endblock %}
{# Default buttons #}
{% if perms.extras.add_bookmark and object.bookmarks %}
{% bookmark_button object %}
{% endif %}
{% if request.user|can_add:object %}
{% clone_button object %}
{% endif %}
{% if request.user|can_change:object %}
{% edit_button object %}
{% endif %}
{% if request.user|can_delete:object %}
{% delete_button object %}
{% endif %}
{% endblock control-buttons %}
</div>
{# Custom links #}
<div class="d-flex justify-content-end">
<div class="btn-list">
{% block custom-links %}
{% custom_links object %}
{% endblock custom-links %}
</div>
</div>
{% endblock controls %}
{% block tabs %}
<ul class="nav nav-tabs">
{# Primary tab #}
<li class="nav-item" role="presentation">
<a class="nav-link{% if not tab %} active{% endif %}" href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
</li>
{# Include tabs for registered model views #}
{% model_view_tabs object %}
</ul>
{% endblock tabs %}
{% block content %}{% endblock %}
{% block modals %}
{% include 'inc/htmx_modal.html' %}
{% endblock modals %}