ui: Rename 'plinth_extras' template tags module to 'extras'

- Remove yet another reference to 'plinth'.

Tests:

- Some basic pages work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2026-03-13 12:42:08 -07:00 committed by James Valleroy
parent 20ed01dfbc
commit 1d14d4a4d6
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
70 changed files with 75 additions and 75 deletions

View File

@ -5,7 +5,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block page_head %}
<link type="text/css" rel="stylesheet"

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block page_js %}
<script src="{% static 'backups/backups_add_remote_repository.js' %}"

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
<div class="table-responsive repository" data-repository-name="{{ repository.name }}">
<table class="table" class="archives-list">

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block page_head %}
{% endblock %}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block extra_content %}
<h3>{% trans "Domains" %}</h3>

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block subsubmenu %}
<a class="btn btn-default" role="button" href="/rspamd/">

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block breadcrumbs %}
{% endblock %}

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -5,7 +5,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}
<h2>{% trans "Contribute" %}</h2>

View File

@ -5,7 +5,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block page_head %}
<link type="text/css" rel="stylesheet"

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block pagetitle %}
<h2>{{ name }}</h2>

View File

@ -5,7 +5,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block page_js %}
<script src="{% static 'matrixsynapse/matrixsynapse.js' %}" defer></script>

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block status %}
{{ block.super }}

View File

@ -7,7 +7,7 @@
{% load static %}
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block page_head %}
<link type="text/css" rel="stylesheet"

View File

@ -4,7 +4,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% if form.non_field_errors %}
<div class="alert alert-danger alert-dismissible

View File

@ -4,7 +4,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
<h3>{% trans "Connections" %}</h3>

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block content %}
<h3>{% trans 'Add custom PageKite service' %}</h3>

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% if pkg_manager_is_busy %}
<div class="alert alert-danger d-flex align-items-center">

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% load static %}
{% block page_head %}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block status %}
<div class="btn-toolbar">

View File

@ -5,7 +5,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block page_head %}
<link type="text/css" rel="stylesheet"

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block page_js %}
<script src="{% static 'snapshot/snapshot.js' %}" defer></script>

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
<div id="snapshot-not-supported" class="alert alert-danger d-flex align-items-center">

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block page_head %}
<link type="text/css" rel="stylesheet"

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
{{ block.super }}

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block content %}
<h1>{% trans "Frequent Feature Updates" %}</h1>

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block content %}
<h3>{% trans "Confirm Distribution Update?" %}</h3>

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block content %}
<h3>{% trans "Distribution Update" %}</h3>

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block status %}
{{ block.super}} {% comment %} To extend instead of overwrite {% endcomment %}

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block content %}
<h2>{% trans "Administrator Account" %}</h2>

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block configuration %}
<h3>{% trans "As a Server" %}</h3>

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -5,7 +5,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
<header class="app-header {% if not app_info.icon_filename %} app-header-single-column {% endif %}">

View File

@ -4,7 +4,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block content %}
<h2>{% trans "Logs" %}: {{ app_info.name }}</h2>

View File

@ -7,7 +7,7 @@
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% load static %}
{% block content %}

View File

@ -1,6 +1,6 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load plinth_extras %}
{% load extras %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
<div class="card">
<a href="{{ item.url }}">

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% if clients %}
{% with client_platforms=clients|clients_get_platforms %}

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% load static %}
{% if clients %}

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block body_class %}
no-brand

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
<li id="id_help_menu" class="dropdown nav-item">
<a href="{% url 'help:index' %}" title="{% trans "Help" %}"

View File

@ -5,7 +5,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block body_class %}index-page{% endblock %}

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block internal_zone_warning %}
{% for component in firewall %}

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible

View File

@ -5,7 +5,7 @@
{# Template to display a drop down button for notifications in the navbar #}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% if notifications %}
<li class="nav-item notifications-dropdown">

View File

@ -6,7 +6,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% if notifications %}
<div id="notifications" class="notifications collapse no-no-js" hx-swap-oob="true">

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
<p>
{% if data.state == "waiting" %}

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load plinth_extras %}
{% load extras %}
{% for operation in operations %}
<div class="app-operation">

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% if port_forwarding_info.ports %}
<h3>{% trans "Port Forwarding" %}</h3>

View File

@ -6,7 +6,7 @@
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% load plinth_extras %}
{% load extras %}
{% block content %}

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% if tags %}
<div class="container">

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
<li id="id_theme_menu" class="dropdown nav-item">
<a href="#" title="{% trans "Toggle theme (auto)" %}"

View File

@ -3,7 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% load extras %}
{% block toolbar %}

View File

@ -5,7 +5,7 @@ Test module for custom Django template tags.
from unittest.mock import patch
from plinth.templatetags import plinth_extras
from plinth.templatetags import extras
def _assert_active_url(menu, url):
@ -44,7 +44,7 @@ def test_highlighting():
['/abc/123/ab/', '/abc/123/'], ['/abc/123/', '/abc/123/']]
for check_path, expected_active_path in tests:
menu = plinth_extras.mark_active_menuitem(menu, check_path)
menu = extras.mark_active_menuitem(menu, check_path)
_assert_active_url(menu, expected_active_path)
assert _verify_active_menuitems(menu)
@ -55,7 +55,7 @@ def test_icon(resolve_static_path, tmp_path):
icon1 = tmp_path / 'icon1.svg'
icon1.write_text('<svg><cirlcle></circle></svg>')
resolve_static_path.return_value = icon1
return_value = plinth_extras.icon('icon1')
return_value = extras.icon('icon1')
assert return_value == ('<svg class="svg-icon" data-icon-name="icon1" '
'><cirlcle></circle></svg>')
@ -68,12 +68,12 @@ def test_icon_attributes(resolve_static_path, tmp_path):
resolve_static_path.return_value = icon1
attributes = {'class': 'test-class'}
return_value = plinth_extras.icon('icon1', **attributes)
return_value = extras.icon('icon1', **attributes)
assert return_value == ('<svg class="test-class" data-icon-name="icon1" '
'><cirlcle></circle></svg>')
attributes = {'data-test': 'test-value'}
return_value = plinth_extras.icon('icon1', **attributes)
return_value = extras.icon('icon1', **attributes)
assert return_value == ('<svg data-test="test-value" class="svg-icon" '
'data-icon-name="icon1" ><cirlcle></circle></svg>')
@ -87,7 +87,7 @@ def test_icon_auto_ids(resolve_static_path, random_string, tmp_path):
icon2.write_text('<svg><cirlcle id="autoidmagic-foo"></circle>'
'<path id="autoidmagic-bar"></path></svg>')
resolve_static_path.return_value = icon2
return_value = plinth_extras.icon('icon2')
return_value = extras.icon('icon2')
assert return_value == ('<svg class="svg-icon" data-icon-name="icon2" >'
'<cirlcle id="randomvalue-foo"></circle>'
'<path id="randomvalue-bar"></path></svg>')
@ -100,6 +100,6 @@ def test_icon_xml_stripping(resolve_static_path, tmp_path):
icon2.write_text('<?xml version="1.0" encoding="utf-8">\n'
'<svg><cirlcle></circle></svg>')
resolve_static_path.return_value = icon2
return_value = plinth_extras.icon('icon2')
return_value = extras.icon('icon2')
assert return_value == ('<svg class="svg-icon" data-icon-name="icon2" >'
'<cirlcle></circle></svg>')