mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-14 20:34:19 +08:00
21 lines
897 B
Plaintext
21 lines
897 B
Plaintext
{#
|
|
One top-of-content warning notice: heading, sentence and an optional "go fix it" button. The
|
|
`dispatcher.lookup` guard is the part that must not drift — it keeps the button from pointing at a
|
|
page this user's ACLs do not grant.
|
|
|
|
include(…, { title, text }) for a plain notice; add { path, label } for the button. `path` is a
|
|
dispatcher path, looked up before it is linked, so a build without that page — or a user without
|
|
rights to it — gets the warning and no dead link.
|
|
|
|
title/text are emitted unescaped: they are `_()` results over strings this theme ships, not
|
|
request data.
|
|
Licensed to the public under the Apache License 2.0.
|
|
-#}
|
|
<div class="alert-message warning">
|
|
<h2>{{ title }}</h2>
|
|
<p>{{ text }}</p>
|
|
{% if (path && dispatcher.lookup(path)): %}
|
|
<div class="right"><a class="btn" href="{{ dispatcher.build_url(path) }}">{{ label }}</a></div>
|
|
{% endif %}
|
|
</div>
|