From 51c9fed15381421c4b7e8ba95af60b5204483d50 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 5 Jun 2022 14:20:40 +0200 Subject: First commit :baby: --- app/templates/home.html | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 app/templates/home.html (limited to 'app/templates/home.html') diff --git a/app/templates/home.html b/app/templates/home.html new file mode 100644 index 0000000..e4e690f --- /dev/null +++ b/app/templates/home.html @@ -0,0 +1,90 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} + +{% block title %} +{% if current_user.is_authenticated %} +Welcome, {{ user.name_first }} {{ user.name_last }}! +{% else %} +Welcome to mdl, the music downloader +{% endif %} +{% endblock %} + +{% block actions %} +{#
  • Download database
  • #} +{% endblock %} + +{% block content %} +{% if current_user.is_authenticated %} +
    +
    +

    New

    +
    +
    + Download audio from a URL to the server. + {% with form = form_download_remote %} + {{ form.csrf_token }} + {{ form.url.label() }} + {{ form.url() }} + {{ form.download_remote() }} + {% endwith %} +
    +
    +
    + {% if pending_files %} +
    +

    Pending

    + {% for file in pending_files %} +
    +
    + {{ file }} +
    +
    + {% endfor %} +
    + {% endif %} + {% if downloaded_files %} +
    +

    Finished

    + {% for file in downloaded_files %} +
    +
    + {{ file }} + {% with form = form_manage_remote %} + {{ form.csrf_token }} + {{ form.file_name(value=file) }} + {{ form.download_local() }} + {{ form.remove_remote() }} + {% endwith %} +
    +
    + {% endfor %} +
    + {% endif %} +
    +

    Download history

    + + + + + + + + + + + {% for file in download_history %} + + + + + + + {% endfor %} + +
    IDTitleDownloadedUser
    {{ file.primary_key }}{{ file.title }}{{ file.date_time_downloaded }}{{ file.user.username }}
    +{% else %} +

    You need to be logged in before using this web app.

    +{% endif %} + +{% endblock %} -- cgit v1.2.3