]> git.ipfire.org Git - ipfire.org.git/commitdiff
Remove old download pages
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Sep 2018 11:58:04 +0000 (12:58 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Sep 2018 11:58:33 +0000 (12:58 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
14 files changed:
src/templates/download-mirror-detail.html [deleted file]
src/templates/download-splash.html [deleted file]
src/templates/download.html [deleted file]
src/templates/downloads-all.html [deleted file]
src/templates/downloads-development.html [deleted file]
src/templates/downloads-index.html [deleted file]
src/templates/downloads-item.html [deleted file]
src/templates/downloads-mirrors.html [deleted file]
src/templates/downloads-older.html [deleted file]
src/templates/modules/release-item-short.html [deleted file]
src/templates/modules/release-item.html [deleted file]
src/web/__init__.py
src/web/handlers_download.py
src/web/ui_modules.py

diff --git a/src/templates/download-mirror-detail.html b/src/templates/download-mirror-detail.html
deleted file mode 100644 (file)
index 2fcb64a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Mirror-Server") }}{% end block %}
-
-{% block body %}
-       <div class="post">
-               <a name="latest"></a>
-               <h3>{{ _("IPFire Mirrors") }}</h3>
-
-               <table class="download-mirror-detail">
-                       <tr>
-                               <td>{{ _("Hostname") }}</td>
-                               <td><a href="{{ mirror.url }}">{{ mirror.hostname }}</a></td>
-                       </tr>
-                       <tr>
-                               <td>{{ _("Owner") }}</td>
-                               <td>{{ mirror.owner }}</td>
-                       </tr>
-                       <tr>
-                               <td>{{ _("Last update") }}</td>
-                               <td>{{ locale.format_date(mirror.last_update) }}</td>
-                       </tr>
-                       <tr>
-                               <td>{{ _("Number of files") }}</td>
-                               <td>{{ len(mirror.filelist) }}</td>
-                       </tr>
-               </table>
-
-               <br class="clear" />
-
-               <p>
-                       <a href="all">{{ _("View list of all mirror servers.") }}</a>
-               </p>
-       </div>
-
-{% end block %}
diff --git a/src/templates/download-splash.html b/src/templates/download-splash.html
deleted file mode 100644 (file)
index c06ec8a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Thanks for downloading IPFire") }}{% end block %}
-
-{% block container %}
-       <section class="container content-section text-center">
-               <div class="page-header">
-                       <h1>{{ _("Thanks for downloading IPFire") }}</h1>
-               </div>
-
-               <p class="lead">
-                       {{ _("Your download should begin in a few seconds. If not, click the link below.") }}
-               </p>
-
-               <p class="download-path"></p>
-       </section>
-
-       <section class="container content-section text-center">
-               <div class="row">
-                       <div class="col-lg-4 col-md-4">
-                               <a class="link-normal" href="https://wiki.ipfire.org/en/installation/start">
-                                       <span class="fa fa-4x fa-terminal"></span>
-                                       <h3>{{ _("How to install IPFire") }}</h3>
-                               </a>
-                       </div>
-
-                       <div class="col-lg-4 col-md-4">
-                               <a class="link-normal" href="//www.ipfire.org/donate">
-                                       <span class="fa fa-4x fa-heart text-danger"></span>
-                                       <h3>{{ _("Donate") }}</h3>
-                               </a>
-                       </div>
-
-                       <div class="col-lg-4 col-md-4">
-                               <a class="link-normal" href="https://www.ipfire.org/get-support">
-                                       <span class="fa fa-4x fa-question"></span>
-                                       <h3>{{ _("Get Support") }}</h3>
-                               </a>
-                       </div>
-               </div>
-       </section>
-{% end %}
diff --git a/src/templates/download.html b/src/templates/download.html
deleted file mode 100644 (file)
index 64bec13..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Download IPFire") }}{% end block %}
-
-{% block container %}
-       <div class="container">
-               <div class="row">
-                       <section id="download" class="features-content col-12">
-                               <h2 class="display-2 text-center">Download IP<strong>Fire</strong></h2>
-                               
-                               <div class="d-flex justify-content-center">
-                                       {% module DownloadButton(release) %}
-                               </div>
-                               
-                               <h5 class="subheadline mt-5"><a href="//downloads.ipfire.org/release/{{ release.sname }}">{{ _("Other download options") }}</a></h5>
-                       </section>
-               </div>
-       </div>
-{% end block %}
diff --git a/src/templates/downloads-all.html b/src/templates/downloads-all.html
deleted file mode 100644 (file)
index f78d332..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Ancient Downloads") }}{% end block %}
-
-{% block body %}
-       <div class="post">
-               <h3>{{ _("Download IPFire") }}</h3>
-               <p>
-                       {{ _("These are the ancient downloads of IPFire. They are just saved for historical reasons and should not be used in a productive environment.") }}
-               </p>
-               
-               <p>
-                       <a href="/downloads">{{ _("Go back to latest stable downloads.") }}</a>
-               </p>
-
-               <br class="clear" />
-       </div>
-       
-       {% for release in releases %}
-               {% module ReleaseItemShort(release) %}
-       {% end %}
-{% end block %}
diff --git a/src/templates/downloads-development.html b/src/templates/downloads-development.html
deleted file mode 100644 (file)
index 7dc6915..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends "downloads-older.html" %}
-
-{% block title %}{{ _("Development Downloads") }}{% end block %}
-
-{% block information %}
-       <h3>{{ _("Development Downloads") }}</h3>
-
-       <p>
-               The developers do create a snapshort version from the current 
-               development sources to get this distributed to a higher number
-               of testers.<br />
-               These versions are <strong>not</strong> intended to be used in a
-               productive environment.
-       </p>
-{% end block %}
diff --git a/src/templates/downloads-index.html b/src/templates/downloads-index.html
deleted file mode 100644 (file)
index 60dd48a..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Download Center") }}{% end block %}
-
-{% block body %}
-<div class="container">
-       <section class="features-content col-12">
-               <h2 class="display-2 text-center">{{ _("IPFire Download Center") }}</h2>
-               
-               <div class="row">
-                       <div class="col-md-12">
-                               <img class="pull-right" src="{{ static_url("images/box_ipfire.png") }}" alt="{{ _("CD-Box") }}">
-
-                               <p>
-                                       {{ _("Welcome to the downloads section of the IPFire project.") }}
-                                       {{ _("You will find all published releases of IPFire for download.") }}
-                               </p>
-                       </div>
-               </div>
-               
-               <div class="row">
-                       <div class="col">
-                               <h4>{{ _("Available releases") }}</h4>
-                               
-                               <table class="table table-striped table-hover">
-                                       <thead>
-                                               <tr>
-                                                       <th>{{ _("Release") }}</th>
-                                                       <th>{{ _("Release type") }}</th>
-                                                       <th>{{ _("Release date") }}</th>
-                                               </tr>
-                                       </thead>
-                                       <tbody>
-                                               {% for release in releases %}
-                                                       <tr>
-                                                               <td>
-                                                                       <a href="/release/{{ release.sname }}">{{ release.name }}</a>
-                                                               </td>
-                                                               <td>
-                                                                       {% if release.stable %}
-                                                                               <span class="label label-success">{{ _("Stable") }}</span>
-                                                                       {% else %}
-                                                                               <span class="label label-warning">{{ _("Development") }}</span>
-                                                                       {% end %}
-                                                               </td>
-                                                               <td>{{ locale.format_date(release.date, shorter=True) }}</td>
-                                                       </tr>
-                                               {% end %}
-                                       </tbody>
-                               </table>
-                       </div>
-               </div>
-       </section>
-</div>
-
-{% end block %}
diff --git a/src/templates/downloads-item.html b/src/templates/downloads-item.html
deleted file mode 100644 (file)
index 5e33f78..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}Download {{ release.name }}{% end block %}
-
-{% block body %}
-       {% module ReleaseItem(release, latest=latest) %}
-{% end block %}
diff --git a/src/templates/downloads-mirrors.html b/src/templates/downloads-mirrors.html
deleted file mode 100644 (file)
index 811125d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Mirror-Server") }}{% end block %}
-
-{% block body %}
-<div class="container">
-       <section class="features-content col-12">
-               <h2 class="display-2 text-center">{{ _("IPFire Mirrors") }}</h2>
-               
-               <div class="row">
-                       <div class="col">
-                               <p>
-                                       This page is an overview about our mirror servers.
-                               </p>
-       
-                               <p>
-                                       When a user downloads a file, one of the servers is arbitrarily
-                                       choosen und the user gets reditected.
-                               </p>
-                               
-                               <ul>
-                                       <li>
-                                               <a href="https://wiki.ipfire.org/project/web"
-                                                       target="_blank">How do I contribute a mirror server?</a>
-                                       </li>
-                               </ul>
-                       </div>
-               </div>
-               
-               <div class="row">
-                       <div class="col">
-                               <table class="download-mirrors">
-                                       <tr>
-                                               <th>{{ _("Owner") }}</th>
-                                               <th>{{ _("Hostname") }}</th>
-                                               <th>{{ _("Location") }}</th>
-                                               <th>{{ _("Last update") }}</th>
-                                               <th>&nbsp;</th>
-                                       </tr>
-                                       {% for mirror in mirrors %}
-                                               <tr class="{{ mirror.state.lower() }}">
-                                                       <td>{{ mirror.owner }}</td>
-                                                       <td><a href="{{ mirror.url }}" target="_blank">{{ mirror.hostname }}</a></td>
-                                                       <td>
-                                                               <img src="{{ static_url("images/flags/%s.png" % mirror.country_code) }}"
-                                                                        align="absmiddle" alt="{{ mirror.country_code }}" />
-                                                               {{ mirror.location }}
-                                                       </td>
-                                                       <td>{{ locale.format_date(mirror.last_update) }}</td>
-                                                       <td><a href="{{ mirror.id }}">{{ _("details") }}</a></td>
-                                               </tr>
-                                       {% end %}
-                               </table>
-                       </div>
-               </div>
-       </section>
-</div>
-{% end block %}
diff --git a/src/templates/downloads-older.html b/src/templates/downloads-older.html
deleted file mode 100644 (file)
index 9e0d64a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends "downloads-index.html" %}
-
-{% block title %}{{ _("Ancient downloads") }}{% end block %}
-
-{% block body %}
-       {% block information %}
-               <h3>{{ _("Ancient downloads") }}</h3>
-               <p>
-                       {{ _("These are the ancient downloads of IPFire. They are just saved for historical reasons and should not be used in a productive environment.") }}
-               </p>
-
-               <p class="warning">
-                       {{ _("Beware that these releases could lack possible security-fixes     and so it is recommended to use the <em>latest</em> version.") }}
-               </p>
-               
-               <p>
-                       <a href="/">{{ _("Go back to latest stable downloads.") }}</a>
-               </p>
-
-               <br class="clear" />
-       {% end block %}
-
-       <table>
-               <tr>
-                       <th>{{ _("Release") }}</th>
-                       <th>{{ _("Published on") }}</th>
-               </tr>
-               {% for release in releases %}
-               <tr>
-                       <td><a href="/release/{{ release.id }}">{{ release.name }}</a></td>
-                       <td>{{ locale.format_date(release.date, shorter=True, relative=False) }}</td>
-               </tr>
-               {% end %}
-       </table>
-{% end block %}
diff --git a/src/templates/modules/release-item-short.html b/src/templates/modules/release-item-short.html
deleted file mode 100644 (file)
index 7dd2036..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<div class="post">
-       <h3>{{ item.name }}</h3>
-       <p>     
-               {{ _("Here you will find the downloads for the version") }} {{ item.name }}:
-       </p>
-
-       <div align="right">
-               {% if item.files %}
-                       {% for file in item.files %}
-                               <a class="{{ file.type }}" href="{{ file.url }}">{{ _(file.desc) }}</a><br />
-                       {% end %}
-               {% else %}
-                       <p>{{ _("There are no downloads available for this release.") }}</p>
-               {% end %}
-       </div>
-
-       <br class="clear" />
-</div>
diff --git a/src/templates/modules/release-item.html b/src/templates/modules/release-item.html
deleted file mode 100644 (file)
index 26c21c9..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<div class="page-header">
-       <h2>
-               {% if latest %}{{ _("Latest release") }}:{% end %}
-               {{ release.name }}
-       </h2>
-</div>
-
-{% if release.files %}
-       {% if not release.stable %}
-               <div class="alert alert-danger">
-                       <h4>{{ _("Caution!") }}</h4>
-
-                       This release is not a stable version of IPFire and
-                       intended for testing purposes only.
-                       Do not use this release in production and please
-                       report any bugs.
-               </div>
-       {% end %}
-
-       <div class="ac">
-               {% module DownloadButton(release) %}
-       </div>
-
-       {% for arch, files in downloads %}
-               <h3>{{ arch }}</h3>
-
-               <ul class="list-group">
-                       {% for file in files %}
-                               <li class="list-group-item">
-                                       {% if file.size >= 1024 * 1024 %}
-                                               <div class="pull-right">
-                                                       <code class="hidden-sm hidden-xs">{{ _("SHA1: %s") % file.sha1 }}</code>
-                                                       <span class="label label-default">{{ format_size(file.size) }}</span>
-
-                                                       <div class="btn-group">
-                                                               {% if file.magnet_link %}
-                                                                       <a class="btn btn-default btn-xs" href="{{ file.magnet_link }}" title="{{ _("Magnet Link") }}">
-                                                                               <span class="glyphicon glyphicon-magnet"></span>
-                                                                       </a>
-                                                               {% end %}
-
-                                                               {% if file.torrent_url %}
-                                                                       <a class="btn btn-default btn-xs" href="{{ file.torrent_url }}" title="{{ _("Torrent Download") }}">
-                                                                               <span class="glyphicon glyphicon-download-alt"></span>
-                                                                       </a>
-                                                               {% end %}
-                                                       </div>
-                                               </div>
-                                       {% end %}
-
-                                       <a class="download-splash" href="{{ file.url }}">{{ _(file.desc) }}</a>
-                               </li>
-                       {% end %}
-               </ul>
-       {% end %}
-
-       {% if release.news %}
-               {% module NewsItem(release.news, show_heading=True, announcement=True) %}
-       {% end %}
-{% else %}
-       <div class="alert alert-warning">
-               {{ _("There are no downloads available for this release.") }}
-       </div>
-{% end %}
index 2aafc07bf58d4d9734e5972fd87e8ce2f90c73f5..2db2a1a2ab09741f819f5751b427c7ec8ab22c4d 100644 (file)
@@ -62,7 +62,6 @@ class Application(tornado.web.Application):
                                "NetBootMenuHeader"    : ui_modules.NetBootMenuHeaderModule,
                                "NetBootMenuSeparator" : ui_modules.NetBootMenuSeparatorModule,
                                "ProgressBar"          : ui_modules.ProgressBarModule,
-                               "ReleaseItem"          : ui_modules.ReleaseItemModule,
                                "FireinfoDeviceTable"  : ui_modules.FireinfoDeviceTableModule,
                                "FireinfoDeviceAndGroupsTable" : ui_modules.FireinfoDeviceAndGroupsTableModule,
                                "FireinfoGeoTable"        : ui_modules.FireinfoGeoTableModule,
@@ -135,15 +134,6 @@ class Application(tornado.web.Application):
 
                # downloads.ipfire.org
                self.add_handlers(r"downloads?(\.dev)?\.ipfire\.org", [
-                       (r"/", DownloadsIndexHandler),
-                       (r"/latest", DownloadsLatestHandler),
-                       (r"/release/(\d)", DownloadsReleaseHandler),
-                       (r"/release/([\w\.\-]*)", DownloadsReleaseHandler),
-                       (r"/older", DownloadsOlderHandler),
-                       (r"/development", DownloadsDevelopmentHandler),
-                       (r"/mirrors", tornado.web.RedirectHandler, { "url" : "https://mirrors.ipfire.org/" }),
-                       (r"/source", tornado.web.RedirectHandler, { "url" : "https://source.ipfire.org/" }),
-                       (r"/download-splash", DownloadSplashHandler),
                        (r"/(iso|torrent)/(.*)", DownloadCompatHandler),
                        (r"/(.*)", DownloadFileHandler),
                ])
index 406d47a8a6f6d42dd17f286852a71e35fbd38744..11a09853df6ae266fa617dec6648a9f1bfd9474a 100644 (file)
@@ -1,70 +1,10 @@
 #!/usr/bin/python
 
-import logging
 import random
 import tornado.web
 
 from handlers_base import *
 
-class DownloadsIndexHandler(BaseHandler):
-       def get(self):
-               releases = self.releases.get_all()
-
-               self.render("downloads-index.html", releases=releases)
-
-
-class DownloadsReleaseHandler(BaseHandler):
-       def get(self, release):
-               release = self.releases.get_by_sname(release)
-
-               if not release:
-                       release = self.releases.get_by_id(release)
-
-               if not release:
-                       raise tornado.web.HTTPError(404)
-
-               self.render("downloads-item.html", release=release, latest=False)
-
-
-class DownloadsLatestHandler(BaseHandler):
-       def get(self):
-               release = self.releases.get_latest()
-               if not release:
-                       raise tornado.web.HTTPError(404)
-
-               self.render("downloads-item.html", release=release, latest=True)
-
-
-class DownloadsOlderHandler(BaseHandler):
-       def get(self):
-               releases = self.releases.get_stable()
-
-               # Drop the latest release
-               if releases:
-                       releases = releases[1:]
-
-               self.render("downloads-older.html", releases=releases)
-
-
-class DownloadsDevelopmentHandler(BaseHandler):
-       def get(self):
-               releases = self.releases.get_unstable()
-
-               self.render("downloads-development.html", releases=releases)
-
-
-class DownloadAllHandler(BaseHandler):
-       def get(self):
-               self.render("downloads-all.html",
-                       releases=self.releases.get_stable())
-
-
-class DownloadDevelopmentHandler(BaseHandler):
-       def get(self):
-               self.render("downloads-development.html",
-                       releases=self.releases.get_unstable())
-
-
 class DownloadFileHandler(BaseHandler):
        def prepare(self):
                self.set_header("Pragma", "no-cache")
@@ -125,8 +65,3 @@ class DownloadCompatHandler(BaseHandler):
                        return
 
                raise tornado.web.HTTPError(404)
-
-
-class DownloadSplashHandler(BaseHandler):
-       def get(self):
-               self.render("download-splash.html")
index fdcfe3307f430a6d1471c07d50d83637b67cca46..5fe12c4f3a01cc3973e02cd01bf93088216ef2be 100644 (file)
@@ -141,45 +141,6 @@ class NetBootMenuSeparatorModule(UIModule):
                return self.render_string("netboot/menu-separator.cfg")
 
 
-class ReleaseItemModule(UIModule):
-       def render(self, release, latest=False):
-               arches = ("x86_64", "i586", "arm")
-
-               downloads = []
-               for arch in arches:
-                       files = []
-
-                       for file in release.files:
-                               if not file.arch == arch:
-                                       continue
-
-                               files.append(file)
-
-                       if files:
-                               downloads.append((arch, files))
-
-               return self.render_string("modules/release-item.html",
-                       release=release, latest=latest, downloads=downloads)
-
-
-class DownloadButtonModule(UIModule):
-       def render(self, release, text="Download now!"):
-               best_image = None
-
-               for file in release.files:
-                       if (release.sname < "ipfire-2.19-core100" or file.arch == "x86_64") \
-                                       and file.type == "iso":
-                               best_image = file
-                               break
-
-               # Show nothing when there was no image found.
-               if not best_image:
-                       return ""
-
-               return self.render_string("modules/download-button.html",
-                       release=release, image=best_image)
-
-
 class ProgressBarModule(UIModule):
        def render(self, value, colour=None):
                value *= 100