*: rename templatetags to clearly identify

This commit is contained in:
Jens Langhammer 2020-05-15 10:54:31 +02:00
parent 8cfd3f9a2b
commit a5319fc2fe
43 changed files with 42 additions and 48 deletions

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "base/page.html" %} {% extends "base/page.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block page_content %} {% block page_content %}
<main role="main" class="pf-c-page__main" tabindex="-1" id="main-content"> <main role="main" class="pf-c-page__main" tabindex="-1" id="main-content">

View File

@ -3,8 +3,8 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load is_active %} {% load passbook_is_active %}
{% load utils %} {% load passbook_utils %}
{% block head %} {% block head %}
{{ block.super }} {{ block.super }}

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% load admin_reflection %} {% load admin_reflection %}
{% block content %} {% block content %}

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% load admin_reflection %} {% load admin_reflection %}
{% block content %} {% block content %}

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% load admin_reflection %} {% load admin_reflection %}
{% block content %} {% block content %}

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -1,6 +1,6 @@
{% extends base_template|default:"generic/form.html" %} {% extends base_template|default:"generic/form.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block above_form %} {% block above_form %}

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% load static %} {% load static %}
{% block head %} {% block head %}

View File

@ -1,6 +1,6 @@
{% extends base_template|default:"generic/form.html" %} {% extends base_template|default:"generic/form.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block above_form %} {% block above_form %}

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block card_title %} {% block card_title %}
{{ title }} <span>(403)</span> {{ title }} <span>(403)</span>

View File

@ -3,8 +3,8 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load is_active %} {% load passbook_is_active %}
{% load utils %} {% load passbook_utils %}
{% block body %} {% block body %}
{% include 'partials/messages.html' %} {% include 'partials/messages.html' %}

View File

@ -1,6 +1,6 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block card_title %} {% block card_title %}
{% trans 'Bad Request' %} {% trans 'Bad Request' %}

View File

@ -1,7 +1,7 @@
{% extends "administration/base.html" %} {% extends "administration/base.html" %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block card %} {% block card %}
<form method="POST" class="pf-c-form"> <form method="POST" class="pf-c-form">

View File

@ -1,7 +1,7 @@
{% extends 'login/form.html' %} {% extends 'login/form.html' %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block head %} {% block head %}
{{ block.super }} {{ block.super }}

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block title %} {% block title %}
{% trans title %} {% trans title %}

View File

@ -3,8 +3,8 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load is_active %} {% load passbook_is_active %}
{% load utils %} {% load passbook_utils %}
{% block page_content %} {% block page_content %}
<main role="main" class="pf-c-page__main" tabindex="-1" id="main-content"> <main role="main" class="pf-c-page__main" tabindex="-1" id="main-content">

View File

@ -1,4 +1,4 @@
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% csrf_token %} {% csrf_token %}

View File

@ -1,4 +1,4 @@
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% csrf_token %} {% csrf_token %}

View File

@ -1,7 +1,7 @@
{% extends "base/page.html" %} {% extends "base/page.html" %}
{% load i18n %} {% load i18n %}
{% load is_active %} {% load passbook_is_active %}
{% load static %} {% load static %}
{% load passbook_user_settings %} {% load passbook_user_settings %}

View File

@ -192,7 +192,6 @@ class ToDefaultFlow(View):
flow_slug=flow.slug, flow_slug=flow.slug,
) )
del self.request.session[SESSION_KEY_PLAN] del self.request.session[SESSION_KEY_PLAN]
# TODO: Get Flow depending on subdomain?
return redirect_with_qs( return redirect_with_qs(
"passbook_flows:flow-executor", request.GET, flow_slug=flow.slug "passbook_flows:flow-executor", request.GET, flow_slug=flow.slug
) )

View File

@ -1,4 +1,4 @@
{% load utils %} {% load passbook_utils %}
{% spaceless %} {% spaceless %}
<div class="dynamic-array-widget"> <div class="dynamic-array-widget">

View File

@ -33,8 +33,6 @@ def is_active(context, *args, **kwargs):
@register.simple_tag(takes_context=True) @register.simple_tag(takes_context=True)
def is_active_url(context, view): def is_active_url(context, view):
"""Return whether a navbar link is active or not.""" """Return whether a navbar link is active or not."""
# matching_url = reverse(view, args=args, kwargs=kwargs)
request = context.get("request") request = context.get("request")
current_full_url = ( current_full_url = (
f"{request.resolver_match.app_name}:{request.resolver_match.url_name}" f"{request.resolver_match.app_name}:{request.resolver_match.url_name}"
@ -44,8 +42,6 @@ def is_active_url(context, view):
return "" return ""
if current_full_url == view: if current_full_url == view:
return ACTIVE_STRING return ACTIVE_STRING
# if matching_url == request.path:
# return 'active'
return "" return ""

View File

@ -1,6 +1,6 @@
{% extends "login/base.html" %} {% extends "login/base.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block card_title %} {% block card_title %}

View File

@ -1,6 +1,6 @@
{% extends "login/base.html" %} {% extends "login/base.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block card_title %} {% block card_title %}

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load utils %} {% load passbook_utils %}
{% block card_title %} {% block card_title %}
{% trans error %} {% trans error %}

View File

@ -1,6 +1,6 @@
{% extends "login/base.html" %} {% extends "login/base.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block card_title %} {% block card_title %}

View File

@ -1,6 +1,6 @@
{% extends "login/base.html" %} {% extends "login/base.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block card %} {% block card %}

View File

@ -1,6 +1,6 @@
{% extends "login/base.html" %} {% extends "login/base.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block title %} {% block title %}

View File

@ -1,5 +1,5 @@
{% load passbook_stages_email %} {% load passbook_stages_email %}
{% load utils %} {% load passbook_utils %}
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}

View File

@ -1,6 +1,6 @@
{% extends "stages/email/for_email/base.html" %} {% extends "stages/email/for_email/base.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% load humanize %} {% load humanize %}

View File

@ -55,7 +55,6 @@
</footer> </footer>
</main> </main>
<footer class="pf-c-login__footer"> <footer class="pf-c-login__footer">
<p></p>
<ul class="pf-c-list pf-m-inline"> <ul class="pf-c-list pf-m-inline">
<li> <li>
<a href="https://beryju.github.io/passbook/">{% trans 'Documentation' %}</a> <a href="https://beryju.github.io/passbook/">{% trans 'Documentation' %}</a>

View File

@ -1,6 +1,6 @@
{% extends "user/base.html" %} {% extends "user/base.html" %}
{% load utils %} {% load passbook_utils %}
{% load i18n %} {% load i18n %}
{% block page %} {% block page %}