|
1 | | -{% extends "base.html" %} |
2 | | - |
3 | | -{% block main %} |
4 | | - <div class="container"> |
5 | | - <h1>Download files</h1> |
6 | | - |
7 | | - {% if state.free_space.free_space_percent < 5 %} |
8 | | - <div class="alert alert-warning mt-4"> |
9 | | - The disks are almost full : <span class="fw-bold">{{ state.free_space.free_space_gib }} GiB left</span> |
10 | | - </div> |
11 | | - {% endif %} |
| 1 | +{% extends "layouts/file_system_base.html" %} |
| 2 | + |
| 3 | +{% block breadcrumb %} |
| 4 | + <li class="breadcrumb-item"> |
| 5 | + <a href="/"> |
| 6 | + Categories |
| 7 | + </a> |
| 8 | + </li> |
| 9 | +{% endblock %} |
12 | 10 |
|
13 | | - <form method="POST" action="/upload" enctype="multipart/form-data" accept-charset="utf-8"> |
14 | | - <div class="card mt-4"> |
15 | | - <div class="card-body"> |
16 | | - <div class="form-group"> |
17 | | - <label for="collection" class="form-label mb-0">Category</label> |
18 | | - <div id="collection" class="form-text mb-1">Choose the type of content you want to download.</div> |
19 | | - <select class="form-select" aria-label="Choose the type of content you want to download" name="collection">{#{% set post_tag = post.tag %} TODO #} |
20 | | - <option disabled {#{% if post_tag is not defined %}selected{% endif %}#}>Genre</option> |
21 | | - {% for tag in categories %} |
22 | | - <option {#{% if post_tag == tag %}selected {% endif %}#}value="{{ tag }}">{{ tag }}</option> |
23 | | - {% endfor %} |
24 | | - </select> |
| 11 | +{% block folder_title %} |
| 12 | + All categories |
| 13 | +{% endblock%} |
| 14 | + |
| 15 | +{% block actions_buttons %} |
| 16 | + {% include "categories/dropdown_actions.html" %} |
| 17 | +{% endblock actions_buttons %} |
| 18 | + |
| 19 | +{% block system_list %} |
| 20 | + {% for category in categories %} |
| 21 | + <li class="list-group-item py-3"> |
| 22 | + <a class="d-block text-decoration-none" href="/folders/{{ category.name }}"> |
| 23 | + <div class="row"> |
| 24 | + <div class="col-9"> |
| 25 | + <div class="d-flex align-items-center"> |
| 26 | + <i class="fa fa-folder text-info me-3"></i> |
| 27 | + <h5 class="mb-0"> |
| 28 | + {{ category.name }} <code class="ms-2"span><small>{{ category.path }}</small></code> |
| 29 | + </h5> |
| 30 | + </div> |
25 | 31 | </div> |
26 | | - </div> |
27 | | - </div> |
28 | | - |
29 | | - <div class="row mt-4"> |
30 | | - <div class="col-sm"> |
31 | | - {% include "sources/magnet.html" %} |
32 | | - </div> |
33 | | - |
34 | | - <div class="col-md-1 mt-3 mt-sm-0"> |
35 | | - <div class="d-flex align-items-center h-100 justify-content-center"> |
36 | | - <h2>OR</h2> |
| 32 | + <div class="col-3"> |
| 33 | + <p class="mb-0 fst-italic text-end"> |
| 34 | + <i class="fa fa-chevron-right"></i> |
| 35 | + </p> |
37 | 36 | </div> |
38 | 37 | </div> |
| 38 | + </a> |
| 39 | + </li> |
| 40 | + {% endfor %} |
| 41 | +{% endblock %} |
39 | 42 |
|
40 | | - <div class="col-sm mt-3 mt-sm-0"> |
41 | | - {% include "sources/torrent.html" %} |
42 | | - </div> |
43 | | - </div> |
44 | | - |
45 | | - <div class="text-center mt-4"> |
46 | | - <input type="Submit" class="btn btn-success btn-lg" value="Next"> |
47 | | - </div> |
48 | | - </form> |
49 | | - |
50 | | - {% if categories.len() == 0 %} |
51 | | - <div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="false"> |
52 | | - <div class="modal-dialog modal-dialog-centered"> |
53 | | - <div class="modal-content"> |
54 | | - <div class="modal-header"> |
55 | | - <h1 class="modal-title fs-5" id="staticBackdropLabel">Oops, you don't have any categories yet</h1> |
56 | | - </div> |
57 | | - <div class="modal-body"> |
58 | | - {% include "categories/form.html" %} |
59 | | - </div> |
60 | | - </div> |
61 | | - </div> |
62 | | - </div> |
63 | 43 |
|
64 | | - <script> |
65 | | - window.addEventListener("load", (event) => { |
66 | | - const modal = new bootstrap.Modal('#staticBackdrop').show() |
67 | | - }); |
68 | | - </script> |
69 | | - {% endif %} |
70 | | - </div> |
71 | | -{% endblock %} |
0 commit comments