1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Arthur Hanson 7c17d2e932 Closes #13102: Establish initial translation support in templates
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-28 16:30:25 -04:00

90 lines
3.1 KiB
HTML

{% extends 'generic/object.html' %}
{% load helpers %}
{% load plugins %}
{% load render_table from django_tables2 %}
{% load i18n %}
{# Omit assigned IP addresses from object representation #}
{% block title %}{{ object.get_protocol_display }}: {{ object.group_id }}{% endblock %}
{% block breadcrumbs %}
{{ block.super }}
<li class="breadcrumb-item"><a href="{% url 'ipam:fhrpgroup_list' %}?protocol={{ object.protocol }}">{{ object.get_protocol_display }}</a></li>
{% endblock breadcrumbs %}
{% block content %}
<div class="row">
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">{% trans "FHRP Group" %}</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Protocol" %}</td>
<td>{{ object.get_protocol_display }}</td>
</tr>
<tr>
<td>{% trans "Group ID" %}</td>
<td>{{ object.group_id }}</td>
</tr>
<tr>
<td>{% trans "Name" %}</td>
<td>{{ object.name|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<td>{{ object.description|placeholder }}</td>
</tr>
<tr>
<th scope="row">{% trans "Members" %}</th>
<td>{{ member_count }}</td>
</tr>
</table>
</div>
</div>
{% include 'inc/panels/tags.html' %}
{% include 'inc/panels/comments.html' %}
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">{% trans "Authentication" %}</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Authentication Type" %}</td>
<td>{{ object.get_auth_type_display|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Authentication Key" %}</td>
<td>{{ object.auth_key|placeholder }}</td>
</tr>
</table>
</div>
</div>
{% include 'inc/panels/custom_fields.html' %}
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">{% trans "Virtual IP Addresses" %}</h5>
<div class="card-body htmx-container table-responsive"
hx-get="{% url 'ipam:ipaddress_list' %}?fhrpgroup_id={{ object.pk }}"
hx-trigger="load"
></div>
{% if perms.ipam.add_ipaddress %}
<div class="card-footer text-end">
<a href="{% url 'ipam:ipaddress_add' %}?fhrpgroup={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-primary">
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add IP Address" %}
</a>
</div>
{% endif %}
</div>
{% include 'inc/panel_table.html' with table=members_table heading='Members' %}
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}