admin: add .pb-root-link for AdminSiteShell for links that should not be modified
This commit is contained in:
parent
517b811a99
commit
49397cef70
|
@ -86,9 +86,8 @@
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</pb-modal-button>
|
||||||
{# TODO: Fix execute link being modified #}
|
<a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-execute' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Execute' %}</a>
|
||||||
<a class="pf-c-button pf-m-secondary" href="{% url 'passbook_admin:flow-execute' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Execute' %}</a>
|
<a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-export' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Export' %}</a>
|
||||||
<a class="pf-c-button pf-m-secondary" href="{% url 'passbook_admin:flow-export' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Export' %}</a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
</pb-modal-button>
|
</pb-modal-button>
|
||||||
{% get_links provider as links %}
|
{% get_links provider as links %}
|
||||||
{% for name, href in links.items %}
|
{% for name, href in links.items %}
|
||||||
<a class="pf-c-button pf-m-tertiary" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% get_htmls provider as htmls %}
|
{% get_htmls provider as htmls %}
|
||||||
{% for html in htmls %}
|
{% for html in htmls %}
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
</pb-modal-button>
|
</pb-modal-button>
|
||||||
{% get_links source as links %}
|
{% get_links source as links %}
|
||||||
{% for name, href in links %}
|
{% for name, href in links %}
|
||||||
<a class="pf-c-button pf-m-tertiary" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</pb-modal-button>
|
</pb-modal-button>
|
||||||
{% get_links stage as links %}
|
{% get_links stage as links %}
|
||||||
{% for name, href in links.items %}
|
{% for name, href in links.items %}
|
||||||
<a class="pf-c-button pf-m-tertiary" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
</pb-modal-button>
|
</pb-modal-button>
|
||||||
{% get_links prompt as links %}
|
{% get_links prompt as links %}
|
||||||
{% for name, href in links.items %}
|
{% for name, href in links.items %}
|
||||||
<a class="pf-c-button pf-m-tertiary" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:user-update' pk=user.pk %}">
|
<pb-modal-button href="{% url 'passbook_admin:user-update' pk=user.pk %}">
|
||||||
<button slot="trigger" class="pf-c-button pf-m-secondary">
|
<button slot="trigger" class="pf-c-button pf-m-secondary">
|
||||||
{% trans 'Update' %}
|
{% trans 'Edit' %}
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</pb-modal-button>
|
||||||
|
@ -82,8 +82,8 @@
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</pb-modal-button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="pf-c-button pf-m-tertiary" href="{% url 'passbook_admin:user-password-reset' pk=user.pk %}?back={{ request.get_full_path }}">{% trans 'Reset Password' %}</a>
|
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{% url 'passbook_admin:user-password-reset' pk=user.pk %}?back={{ request.get_full_path }}">{% trans 'Reset Password' %}</a>
|
||||||
<a class="pf-c-button pf-m-tertiary" href="{% url 'passbook_core:impersonate-init' user_id=user.pk %}">{% trans 'Impersonate' %}</a>
|
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{% url 'passbook_core:impersonate-init' user_id=user.pk %}">{% trans 'Impersonate' %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -48,7 +48,7 @@ export class AdminSiteShell extends LitElement {
|
||||||
this.querySelector("[slot=body]")!.innerHTML = t;
|
this.querySelector("[slot=body]")!.innerHTML = t;
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// Ensure anchors only change the hash
|
// Ensure anchors only change the hash
|
||||||
this.querySelectorAll("a").forEach(a => {
|
this.querySelectorAll<HTMLAnchorElement>("a:not(.pb-root-link)").forEach(a => {
|
||||||
if (a.href === "") {
|
if (a.href === "") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue