]> git.ipfire.org Git - ipfire.org.git/commitdiff
download: Remove extra page which made no sense
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Oct 2018 10:55:19 +0000 (11:55 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Oct 2018 10:57:11 +0000 (11:57 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/download/index.html [deleted file]
src/templates/download/modules/button.html [deleted file]
src/web/__init__.py
src/web/download.py

index 154e4113e4b0b5de24e189f8adb8cf76ed1820a3..880c5de6c34456d8095ebcc139402cf456698add 100644 (file)
@@ -133,16 +133,10 @@ templates_blog_modulesdir = $(templates_blogdir)/modules
 
 templates_download_DATA = \
        src/templates/download/base.html \
-       src/templates/download/index.html \
        src/templates/download/release.html
 
 templates_downloaddir = $(templatesdir)/download
 
-templates_download_modules_DATA = \
-       src/templates/download/modules/button.html
-
-templates_download_modulesdir = $(templates_downloaddir)/modules
-
 templates_location_DATA = \
        src/templates/location/lookup.html
 
diff --git a/src/templates/download/index.html b/src/templates/download/index.html
deleted file mode 100644 (file)
index 2e20957..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Download") }}{% end block %}
-
-{% block content %}
-       <div class="row justify-content-center my-5">
-               <div class="col col-sm-8 text-center">
-                       <h1>{{ _("Download IPFire") }}</h1>
-
-                       <p class="lead mb-5">
-                               As you download and use IPFire, the IPFire Project invites you to become
-                               an active contributor to our community.
-                       </p>
-
-                       {% module DownloadButton(release) %}
-
-                       <ul class="nav justify-content-center">
-                               {% if release.blog %}
-                                       <li class="nav-item">
-                                               <a class="nav-link" href="https://blog.ipfire.org/post/{{ release.blog.slug }}">
-                                                       {{ _("Release Notes") }}
-                                               </a>
-                                       </li>
-                               {% end %}
-
-                               <li class="nav-item">
-                                       <a class="nav-link" href="/download/{{ release.slug }}">
-                                               {{ _("More Download Options") }}
-                                       </a>
-                               </li>
-                       </nav>
-               </div>
-       </div>
-{% end block %}
diff --git a/src/templates/download/modules/button.html b/src/templates/download/modules/button.html
deleted file mode 100644 (file)
index 66990d2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<a class="btn btn-primary btn-lg my-2" href="{{ file.url }}">
-       {{ _("%s for %s") % (release, file.arch) }}
-</a>
index 2b1d75ea18214f222bb3bdbc28d886a36d2a9e99..3429082968fc9b0a57a44fb1aff3f326176727a3 100644 (file)
@@ -48,9 +48,6 @@ class Application(tornado.web.Application):
                                "BlogPost"             : blog.PostModule,
                                "BlogPosts"            : blog.PostsModule,
 
-                               # Download
-                               "DownloadButton"       : download.ButtonModule,
-
                                # Location
                                "Map"                  : ui_modules.MapModule,
 
index fd18a147ea296f8d4281ec7426651190f58e8ac0..a4336193523bb20fe3c7d648c611b6acc5da7dde 100644 (file)
@@ -13,7 +13,8 @@ class IndexHandler(base.BaseHandler):
                if not release:
                        raise tornado.web.HTTPError(404)
 
-               self.render("download/index.html", release=release)
+               # Redirect to latest release page
+               self.redirect("/download/%s" % release.slug)
 
 
 class ReleaseHandler(base.BaseHandler):
@@ -73,13 +74,3 @@ class FileHandler(base.BaseHandler):
 
                self.db.execute("INSERT INTO log_download(filename, mirror, country_code) \
                        VALUES(%s, %s, %s)", filename, mirror.id, country_code)
-
-
-class ButtonModule(ui_modules.UIModule):
-       def render(self, release):
-               for arch in release.arches:
-                       for file in release.get_files_by_arch(arch):
-                               return self.render_string("download/modules/button.html", release=release, file=file)
-
-               # return nothing
-               return ""