mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #13102: Establish initial translation support in templates
--------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
{% extends 'generic/object.html' %}
|
||||
{% load helpers %}
|
||||
{% load plugins %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row mb-3">
|
||||
<div class="col col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Custom Field
|
||||
{% trans "Custom Field" %}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Name</th>
|
||||
<th scope="row">{% trans "Name" %}</th>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -23,62 +24,62 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Label</th>
|
||||
<th scope="row">{% trans "Label" %}</th>
|
||||
<td>{{ object.label|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Group</th>
|
||||
<th scope="row">{% trans "Group Name" %}</th>
|
||||
<td>{{ object.group_name|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Description</th>
|
||||
<th scope="row"></th>
|
||||
<td>{{ object.description|markdown|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Required</th>
|
||||
<th scope="row">{% trans "Required" %}</th>
|
||||
<td>{% checkmark object.required %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Cloneable</th>
|
||||
<th scope="row">{% trans "Cloneable" %}</th>
|
||||
<td>{% checkmark object.is_cloneable %}</td>
|
||||
</tr>
|
||||
{% if object.choice_set %}
|
||||
<tr>
|
||||
<th scope="row">Choice Set</th>
|
||||
<th scope="row">{% trans "Choice Set" %}</th>
|
||||
<td>{{ object.choice_set|linkify }} ({{ object.choice_set.choices|length }} choices)</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th scope="row">Default Value</th>
|
||||
<th scope="row">{% trans "Default Value" %}</th>
|
||||
<td>{{ object.default }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h5 class="card-header">Behavior</h5>
|
||||
<h5 class="card-header">{% trans "Behavior" %}</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Search Weight</th>
|
||||
<th scope="row">{% trans "Search Weight" %}</th>
|
||||
<td>
|
||||
{% if object.search_weight %}
|
||||
{{ object.search_weight }}
|
||||
{% else %}
|
||||
<span class="text-muted">Disabled</span>
|
||||
<span class="text-muted">{% trans "Disabled" %}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Filter Logic</th>
|
||||
<th scope="row">{% trans "Filter Logic" %}</th>
|
||||
<td>{{ object.get_filter_logic_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Display Weight</th>
|
||||
<th scope="row">{% trans "Display Weight" %}</th>
|
||||
<td>{{ object.weight }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">UI Visibility</th>
|
||||
<th scope="row">{% trans "UI Visibility" %}</th>
|
||||
<td>{{ object.get_ui_visibility_display }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -88,7 +89,7 @@
|
||||
</div>
|
||||
<div class="col col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">Object Types</h5>
|
||||
<h5 class="card-header">{% trans "Object Types" %}</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
{% for ct in object.content_types.all %}
|
||||
@@ -100,19 +101,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h5 class="card-header">Validation Rules</h5>
|
||||
<h5 class="card-header">{% trans "Validation Rules" %}</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Minimum Value</th>
|
||||
<th scope="row">{% trans "Minimum Value" %}</th>
|
||||
<td>{{ object.validation_minimum|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Maximum Value</th>
|
||||
<th scope="row">{% trans "Maximum Value" %}</th>
|
||||
<td>{{ object.validation_maximum|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Regular Expression</th>
|
||||
<th scope="row">{% trans "Regular Expression" %}</th>
|
||||
<td>
|
||||
{% if object.validation_regex %}
|
||||
<code>{{ object.validation_regex }}</code>
|
||||
|
Reference in New Issue
Block a user