mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 08:46:10 -06:00
Flesh out object templates
This commit is contained in:
parent
34b8d2a097
commit
5c2f0c5975
@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
{% block title %}{% trans "Group" %} {{ object.name }}{% endblock %}
|
{% block title %}{% trans "Group" %} {{ object.name }}{% endblock %}
|
||||||
|
|
||||||
|
{% block subtitle %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Account Details" %}</h5>
|
<h5 class="card-header">{% trans "Group" %}</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
@ -23,13 +25,23 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Users" %}</h5>
|
<h5 class="card-header">{% trans "Users" %}</h5>
|
||||||
<ul class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
{% for user in object.user_set.all %}
|
{% for user in object.user_set.all %}
|
||||||
<li class="list-group-item">{{ user }}</li>
|
<a href="{% url 'users:netboxuser' pk=user.pk %}" class="list-group-item list-group-item-action">{{ user }}</a>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<li class="list-group-item text-muted">{% trans "None" %}</li>
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header">{% trans "Assigned Permissions" %}</h5>
|
||||||
|
<div class="list-group list-group-flush">
|
||||||
|
{% for perm in object.object_permissions.all %}
|
||||||
|
<a href="{% url 'users:objectpermission' pk=perm.pk %}" class="list-group-item list-group-item-action">{{ perm }}</a>
|
||||||
|
{% empty %}
|
||||||
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,42 +5,92 @@
|
|||||||
|
|
||||||
{% block title %}{% trans "Permission" %} {{ object.name }}{% endblock %}
|
{% block title %}{% trans "Permission" %} {{ object.name }}{% endblock %}
|
||||||
|
|
||||||
|
{% block subtitle %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Account Details" %}</h5>
|
<h5 class="card-header">{% trans "Permission" %}</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Name" %}</th>
|
<th scope="row">{% trans "Name" %}</th>
|
||||||
<td>{{ object.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Description" %}</th>
|
||||||
|
<td>{{ object.description|placeholder }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Enabled" %}</th>
|
||||||
|
<td>{% checkmark object.enabled %}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header">{% trans "Actions" %}</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table table-hover attr-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "View" %}</th>
|
||||||
|
<td>{% checkmark object.can_view %}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Add" %}</th>
|
||||||
|
<td>{% checkmark object.can_add %}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Change" %}</th>
|
||||||
|
<td>{% checkmark object.can_change %}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Delete" %}</th>
|
||||||
|
<td>{% checkmark object.can_delete %}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header">{% trans "Constraints" %}</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
{% if object.constraints %}
|
||||||
|
<pre>{{ object.constraints|json }}</pre>
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">None</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Assigned Users" %}</h5>
|
<h5 class="card-header">{% trans "Object Types" %}</h5>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
{% for user in object.users.all %}
|
{% for user in object.object_types.all %}
|
||||||
<li class="list-group-item">{{ user }}</li>
|
<li class="list-group-item">{{ user }}</li>
|
||||||
{% empty %}
|
|
||||||
<li class="list-group-item text-muted">{% trans "None" %}</li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header">{% trans "Assigned Users" %}</h5>
|
||||||
|
<div class="list-group list-group-flush">
|
||||||
|
{% for user in object.users.all %}
|
||||||
|
<a href="{% url 'users:netboxuser' pk=user.pk %}" class="list-group-item list-group-item-action">{{ user }}</a>
|
||||||
|
{% empty %}
|
||||||
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Assigned Groups" %}</h5>
|
<h5 class="card-header">{% trans "Assigned Groups" %}</h5>
|
||||||
<ul class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
{% for group in object.groups.all %}
|
{% for group in object.groups.all %}
|
||||||
<li class="list-group-item">{{ group }}</li>
|
<a href="{% url 'users:netboxgroup' pk=group.pk %}" class="list-group-item list-group-item-action">{{ group }}</a>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<li class="list-group-item text-muted">{% trans "None" %}</li>
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
{% block title %}{% trans "User" %} {{ object.username }}{% endblock %}
|
{% block title %}{% trans "User" %} {{ object.username }}{% endblock %}
|
||||||
|
|
||||||
|
{% block subtitle %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Account Details" %}</h5>
|
<h5 class="card-header">{% trans "User" %}</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
@ -18,13 +20,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Full Name" %}</th>
|
<th scope="row">{% trans "Full Name" %}</th>
|
||||||
<td>
|
<td>{{ object.get_full_name|placeholder }}</td>
|
||||||
{% if object.first_name or object.last_name %}
|
|
||||||
{{ object.first_name }} {{ object.last_name }}
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Email" %}</th>
|
<th scope="row">{% trans "Email" %}</th>
|
||||||
@ -35,13 +31,17 @@
|
|||||||
<td>{{ object.date_joined|annotated_date }}</td>
|
<td>{{ object.date_joined|annotated_date }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Superuser" %}</th>
|
<th scope="row">{% trans "Active" %}</th>
|
||||||
<td>{% checkmark object.is_superuser %}</td>
|
<td>{% checkmark object.active %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Admin Access" %}</th>
|
<th scope="row">{% trans "Staff" %}</th>
|
||||||
<td>{% checkmark object.is_staff %}</td>
|
<td>{% checkmark object.is_staff %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Superuser" %}</th>
|
||||||
|
<td>{% checkmark object.is_superuser %}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -49,27 +49,25 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Assigned Groups" %}</h5>
|
<h5 class="card-header">{% trans "Assigned Groups" %}</h5>
|
||||||
<ul class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
{% for group in object.groups.all %}
|
{% for group in object.groups.all %}
|
||||||
<li class="list-group-item">{{ group }}</li>
|
<a href="{% url 'users:netboxgroup' pk=group.pk %}" class="list-group-item list-group-item-action">{{ group }}</a>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<li class="list-group-item text-muted">{% trans "None" %}</li>
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Assigned Permissions" %}</h5>
|
<h5 class="card-header">{% trans "Assigned Permissions" %}</h5>
|
||||||
<ul class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
{% for perm in object.object_permissions.all %}
|
{% for perm in object.object_permissions.all %}
|
||||||
<li class="list-group-item">{{ perm }}</li>
|
<a href="{% url 'users:objectpermission' pk=perm.pk %}" class="list-group-item list-group-item-action">{{ perm }}</a>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<li class="list-group-item text-muted">{% trans "None" %}</li>
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
Reference in New Issue
Block a user