]> git.ipfire.org Git - ipfire.org.git/commitdiff
dbl: Encourage users to submit reports on the list page
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 8 Feb 2026 16:48:25 +0000 (16:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 8 Feb 2026 16:48:25 +0000 (16:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/dbl/lists/show.html
src/templates/dbl/modules/submit-report.html
src/web/dbl.py

index a6d5cfcd36b76c85e1862b222a539c9c88e5bdf0..4d8c7925059c8768c51274be9b9ae2a9ac6065ac 100644 (file)
                </div>
        </section>
 
+       <section class="section">
+               <div class="container">
+                       {% module DBLSubmitReport(list=list) %}
+               </div>
+       </section>
+
        <section class="section">
                <div class="container">
                        <div class="buttons are-small is-centered">
index db89a02e69903af0c9588c0173d48cf1a54c7566..75ab8b4d48470e69c1209f607155f9891d971d45 100644 (file)
@@ -3,13 +3,19 @@
 <div class="notification">
        <div class="columns is-vcentered">
                <div class="column">
-                       {% if blocked %}
-                               <strong>
-                                       {{ _("Do you think this domain should not be blocked?") }}
-                               </strong>
+                       {% if name %}
+                               {% if blocked %}
+                                       <strong>
+                                               {{ _("Do you think this domain should not be blocked?") }}
+                                       </strong>
+                               {% else %}
+                                       <strong>
+                                               {{ _("Do you think this domain should be blocked?") }}
+                                       </strong>
+                               {% end %}
                        {% else %}
                                <strong>
-                                       {{ _("Do you think this domain should be blocked?") }}
+                                       Do you think something should be blocked?
                                </strong>
                        {% end %}
 
                <div class="column is-narrow">
                        <a class="button is-primary is-small is-fullwidth"
                                        href="/dbl/report?{{ urllib.parse.urlencode(args) }}">
-                               {{ _("Report %s") % name }}
+                               {% if name %}
+                                       {{ _("Report %s") % name }}
+                               {% else %}
+                                       {{ _("Submit A Report") }}
+                               {% end %}
                        </a>
                </div>
        </div>
index 1e2c7583b057092f6da294a9ea54fc83ff6daa55..9beec10c65480e00dee6efa888344429972adc57 100644 (file)
@@ -198,12 +198,16 @@ class SourcesModule(ui_modules.UIModule):
 
 
 class SubmitReportModule(ui_modules.UIModule):
-       def render(self, name, blocked=False, list=None):
+       def render(self, name=None, blocked=False, list=None):
                args = {
-                       "name"  : name,
                        "block" : not blocked,
                }
 
+               if name:
+                       args |= {
+                               "name" : name,
+                       }
+
                if list:
                        args |= {
                                "list" : list.slug,