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
+++ /dev/null
-{% 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 %}
+++ /dev/null
-<a class="btn btn-primary btn-lg my-2" href="{{ file.url }}">
- {{ _("%s for %s") % (release, file.arch) }}
-</a>
"BlogPost" : blog.PostModule,
"BlogPosts" : blog.PostsModule,
- # Download
- "DownloadButton" : download.ButtonModule,
-
# Location
"Map" : ui_modules.MapModule,
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):
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 ""