1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

81 lines
2.8 KiB
HTML
Raw Normal View History

2021-03-02 15:58:33 -05:00
{% extends 'base.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %}
{% load perms %}
{% load plugins %}
{% block header %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
{% block breadcrumbs %}{% endblock %}
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url object|viewname:'list' %}" method="get">
2021-03-02 15:58:33 -05:00
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% block buttons %}
{% 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 %}
</div>
2021-04-13 16:03:07 -04:00
<h1 class="title">{% block title %}{{ object }}{% endblock %}</h1>
<p>
<small class="text-muted">
Created {{ object.created }} &middot;
Updated <span title="{{ object.last_updated }}">{{ object.last_updated|timesince }}</span> ago
</small>
<span class="label label-default">{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}</span>
2021-04-13 16:03:07 -04:00
</p>
2021-03-02 15:58:33 -05:00
<div class="pull-right noprint">
{% block tab_buttons %}
{% custom_links object %}
{% endblock %}
</div>
{% block tabs %}
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
</li>
{% if perms.extras.view_journalentry %}
{% with journal_viewname=object|viewname:'journal' %}
{% url journal_viewname pk=object.pk as journal_url %}
{% if journal_url %}
<li role="presentation"{% if active_tab == 'journal' %} class="active"{% endif %}>
<a href="{{ journal_url }}">Journal</a>
</li>
{% endif %}
{% endwith %}
{% endif %}
2021-03-02 15:58:33 -05:00
{% if perms.extras.view_objectchange %}
{% with changelog_viewname=object|viewname:'changelog' %}
{% url changelog_viewname pk=object.pk as changelog_url %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{{ changelog_url }}">Change Log</a>
</li>
{% endwith %}
2021-03-02 15:58:33 -05:00
{% endif %}
</ul>
{% endblock %}
{% endblock %}