]> git.ipfire.org Git - ipfire.org.git/commitdiff
download: Re-add torrent links
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Aug 2020 20:06:18 +0000 (20:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Aug 2020 20:07:16 +0000 (20:07 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/download/release.html

index a73a47a9929d849826331e056e0a94a9ac5963ca..98fbcb7fa24d87b509a07d9aa30d9473cf179238 100644 (file)
                                <div class="my-5">
                                        <h5>{{ arch }}</h5>
 
                                <div class="my-5">
                                        <h5>{{ arch }}</h5>
 
-                                       <div class="list-group">
+                                       <ul class="list-group">
                                                {% for file in release.get_files_by_arch(arch) %}
                                                {% for file in release.get_files_by_arch(arch) %}
-                                                       <a class="list-group-item list-group-item-action"
-                                                                       href="{{ file.url }}">
+                                                       <li class="list-group-item">
                                                                <div class="d-flex w-100 justify-content-between">
                                                                <div class="d-flex w-100 justify-content-between">
-                                                                       {{ _(file.desc) }}
+                                                                       <a href="{{ file.url }}">{{ _(file.desc) }}</a>
 
                                                                        {% if file.size >= 1024 * 1024 %}
                                                                                <span class="text-muted">{{ format_size(file.size) }}</span>
                                                                        {% end %}
                                                                </div>
 
 
                                                                        {% if file.size >= 1024 * 1024 %}
                                                                                <span class="text-muted">{{ format_size(file.size) }}</span>
                                                                        {% end %}
                                                                </div>
 
-                                                               <p class="text-muted small mb-0 d-none d-md-block">
-                                                                       {{ "%s: %s" % ("SHA256" if file.sha256 else "SHA1", file.sha256 or file.sha1) }}
-                                                               </p>
-                                                       </a>
+                                                               <ul class="list-inline text-muted small mb-0 d-none d-md-block">
+                                                                       <li class="list-inline-item">
+                                                                               {{ "%s: %s" % ("SHA256" if file.sha256 else "SHA1", file.sha256 or file.sha1) }}
+                                                                       </li>
+
+                                                                       {% if file.torrent_url %}
+                                                                               <li class="list-inline-item">
+                                                                                       <a href="{{ file.torrent_url }}">
+                                                                                               <i class="fas fa-download"></i> {{ _("Torrent Download") }}
+                                                                                       </a>
+                                                                               </li>
+                                                                       {% end %}
+                                                               </ul>
+                                                       </li>
                                                {% end %}
                                                {% end %}
-                                       </div>
+                                       </ul>
                                </div>
                        {% end %}
                </div>
                                </div>
                        {% end %}
                </div>
                                                        {% end %}
                                                </h5>
 
                                                        {% end %}
                                                </h5>
 
-                                               <div class="list-group">
+                                               <ul class="list-group">
                                                        {% for file in release.get_files_by_arch(arch) %}
                                                        {% for file in release.get_files_by_arch(arch) %}
-                                                               <a class="list-group-item list-group-item-action"
-                                                                               href="{{ file.url }}">
+                                                               <li class="list-group-item">
                                                                        <div class="d-flex w-100 justify-content-between">
                                                                        <div class="d-flex w-100 justify-content-between">
-                                                                               {{ _(file.desc) }}
+                                                                               <a href="{{ file.url }}">{{ _(file.desc) }}</a>
 
                                                                                {% if file.size >= 1024 * 1024 %}
                                                                                        <span class="text-muted">{{ format_size(file.size) }}</span>
                                                                                {% end %}
                                                                        </div>
 
 
                                                                                {% if file.size >= 1024 * 1024 %}
                                                                                        <span class="text-muted">{{ format_size(file.size) }}</span>
                                                                                {% end %}
                                                                        </div>
 
-                                                                       <p class="text-muted small mb-0 d-none d-md-block">
-                                                                               {{ "%s: %s" % ("SHA256" if file.sha256 else "SHA1", file.sha256 or file.sha1) }}
-                                                                       </p>
-                                                               </a>
+                                                                       <ul class="list-inline text-muted small mb-0 d-none d-md-block">
+                                                                               <li class="list-inline-item">
+                                                                                       {{ "%s: %s" % ("SHA256" if file.sha256 else "SHA1", file.sha256 or file.sha1) }}
+                                                                               </li>
+
+                                                                               {% if file.torrent_url %}
+                                                                                       <li class="list-inline-item">
+                                                                                               <a href="{{ file.torrent_url }}">
+                                                                                                       <i class="fas fa-download"></i> {{ _("Torrent Download") }}
+                                                                                               </a>
+                                                                                       </li>
+                                                                               {% end %}
+                                                                       </ul>
+                                                               </li>
                                                        {% end %}
                                                        {% end %}
-                                               </div>
+                                               </ul>
                                        </div>
                                {% end %}
                        </div>
                                        </div>
                                {% end %}
                        </div>