From: Roland Häder Date: Thu, 22 Jun 2023 15:00:42 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4596072ef820f7cf2ecedb2621e1276b66d819d8;p=fba.git Continued: - moved links to "include" template and generalized them there --- diff --git a/templates/views/scoreboard.html b/templates/views/scoreboard.html index 46d5807..12fa8b6 100644 --- a/templates/views/scoreboard.html +++ b/templates/views/scoreboard.html @@ -37,8 +37,9 @@ {% elif entry['domain'] == None %} - {% else %} - {{entry['domain']}}  - ↗ + {% with domain=entry['domain'] %} + {% include "widgets/links.tpl" %} + {% endwith %} {% endif %} {{entry['score']}} diff --git a/templates/views/top.html b/templates/views/top.html index a395a89..0489ba4 100644 --- a/templates/views/top.html +++ b/templates/views/top.html @@ -38,12 +38,14 @@ {% for block in blocks[block_level] %} - {{block['blocker']}} - {% if reason or domain %}↘{% endif %} + {% with domain=block['blocker'] %} + {% include "widgets/links.tpl" %} + {% endwith %} - {{block['blocked']}} - {% if reason or reverse %}↘{% endif %} + {% with domain=block['blocked'] %} + {% include "widgets/links.tpl" %} + {% endwith %} {{block['reason']}} {{block['first_seen']}} diff --git a/templates/widgets/links.tpl b/templates/widgets/links.tpl new file mode 100644 index 0000000..f0499fa --- /dev/null +++ b/templates/widgets/links.tpl @@ -0,0 +1,3 @@ +{{domain}} +[D] +[R]