]> git.mxchange.org Git - fba.git/blobdiff - templates/views/top.html
Continued:
[fba.git] / templates / views / top.html
index a395a892bfb28f3c8e0ffc7f3d93ebb395883c1e..9b0d1c3309afe77fcee8d9a6c4edc159a54a7ce7 100644 (file)
@@ -1,31 +1,41 @@
 {% extends "base.html" %}
 
-{% block title %}{% if domain %} - Instances that block {{domain}}{% elif reverse %} - Instances that are blocked by {{reverse}}{% endif %}{% endblock %}
+{% block title %}{% if mode == 'domain' %} - Instances that block {{value}}{% elif mode == 'reverse' %} - Instances that are blocked by {{value}}{% elif mode == 'reason' %} - Instances having block reason {{value}}{% endif %}{% endblock %}
 
 {% block rss %}
     {{ super() }}
-    {% if domain %}
-        <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocked domain {{domain}}" href="{{base_url}}/rss?domain={{domain}}" />
-    {% elif reverse %}
-        <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocking domain {{reverse}}" href="{{base_url}}/rss?reverse={{reverse}}" />
+    {% if mode == 'domain' %}
+        <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocked domain {{value}}" href="rss?domain={{value}}" />
+    {% elif mode == 'reverse' %}
+        <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocking domain {{value}}" href="rss?reverse={{value}}" />
     {% endif %}
 {% endblock %}
 
 {% block header %}
-    {% if reason %}
-        <h1>Instances that use "{{reason}}" in their reason</h1>
-    {% elif reverse %}
-        <h1>Instances that are blocked by {{reverse}}</h1>
-    {% elif domain %}
-        <h1>Instances that block {{domain}}</h1>
+    {% if mode == 'reason' %}
+        <h1>Instances that use "{{value}}" in their reason</h1>
+    {% elif mode == 'reverse' %}
+        <h1>Instances that are blocked by {{value}}</h1>
+    {% elif mode == 'domain' %}
+        <h1>Instances that block {{value}}</h1>
     {% endif %}
 {% endblock %}
 
 {% block content %}
-    {% for block_level in blocks %}
-        <div class="block_level" id="{{block_level}}">
-            <h2>{{block_level}} ({{blocks[block_level]|length}})</h2>
-            <table>
+    {% if amount == found %}
+        <div class="notice">
+            <h3>Maximum amount reached!</h3>
+            <div>
+                Please note that the maximum allowed amount is only returned, the blocker/blocked/reason might be more.
+                Paging support is not finished yet.
+            </div>
+        </div>
+    {% endif %}
+
+    {% for block_level in blocklist %}
+        <div class="block_level">
+            <h2>{{block_level}} ({{blocklist[block_level]|length}})</h2>
+            <table class="table-with-rows">
                 <thead>
                     <th>Blocker</th>
                     <th>{% if block_level == 'accept' %}Accepted{% else %}Blocked{% endif %}</th>
                 </thead>
 
                 <tbody>
-                {% for block in blocks[block_level] %}
+                {% for block in blocklist[block_level] %}
                     <tr>
                         <td>
-                            <a href="https://{{block['blocker']}}" rel="nofollow noopener noreferrer">{{block['blocker']}}</a>
-                            {% if reason or domain %}<a class="listlink" href="{{base_url}}/top?reverse={{block['blocker']}}">↘</a>{% endif %}
+                            {% with domain=block['blocker'] %}
+                            {% include "widgets/links.html" %}
+                            {% endwith %}
                         </td>
                         <td>
-                            <a href="https://{{domain or block['blocked']}}" rel="nofollow noopener noreferrer">{{block['blocked']}}</a>
-                            {% if reason or reverse %}<a class="listlink" href="{{base_url}}/top?domain={{domain or block['blocked']}}">↘</a>{% endif %}
+                            {% with domain=block['blocked'] %}
+                            {% include "widgets/links.html" %}
+                            {% endwith %}
                         </td>
                         <td>{{block['reason']}}</td>
                         <td>{{block['first_seen']}}</td>