|
1 | | -<div class="modal" id="modal-json-download"> |
| 1 | +{% load humanize %} |
| 2 | +<div class="modal" id="modal-json-download-{{ project.slug }}"> |
2 | 3 | <div class="modal-background"></div> |
3 | 4 | <div class="modal-card"> |
4 | 5 | <header class="modal-card-head"> |
5 | | - <p class="modal-card-title">Download JSON results</p> |
| 6 | + <p class="modal-card-title"> |
| 7 | + <span class="icon-text"> |
| 8 | + <span class="icon has-text-success"><i class="fa-solid fa-download"></i></span> |
| 9 | + <span>Download JSON results</span> |
| 10 | + </span> |
| 11 | + </p> |
6 | 12 | <button class="delete" aria-label="close"></button> |
7 | 13 | </header> |
8 | | - <form action="" method="get"> |
| 14 | + <form action="{% url 'project_results' project.slug 'json' %}" method="get"> |
9 | 15 | <section class="modal-card-body"> |
10 | | - <p class="mb-3">Select the sections to include in the JSON output:</p> |
11 | | - <div class="field"> |
12 | | - <label class="checkbox"> |
13 | | - <input type="checkbox" name="sections" value="packages" checked> |
14 | | - Packages (<span data-label="packageCount">0</span>) |
| 16 | + <p class="has-text-grey mb-4">Select the sections to include in the JSON output.</p> |
| 17 | + <label class="json-section-option box has-border-radius p-3 mb-2 is-flex is-align-items-center"> |
| 18 | + <span class="icon has-text-success is-size-4 mr-3"><i class="fa-solid fa-box"></i></span> |
| 19 | + <span class="has-text-weight-semibold is-flex-grow-1">Packages</span> |
| 20 | + <span class="tag is-light has-text-weight-bold mr-2">{{ project.package_count|intcomma }}</span> |
| 21 | + <input type="checkbox" class="width-1 height-1" name="sections" value="packages" checked> |
| 22 | + </label> |
| 23 | + <label class="json-section-option box has-border-radius p-3 mb-2 is-flex is-align-items-center"> |
| 24 | + <span class="icon has-text-success is-size-4 mr-3"><i class="fa-solid fa-layer-group"></i></span> |
| 25 | + <span class="has-text-weight-semibold is-flex-grow-1">Dependencies</span> |
| 26 | + <span class="tag is-light has-text-weight-bold mr-2">{{ project.dependency_count|intcomma }}</span> |
| 27 | + <input type="checkbox" class="width-1 height-1" name="sections" value="dependencies" checked> |
| 28 | + </label> |
| 29 | + <label class="json-section-option box has-border-radius p-3 mb-2 is-flex is-align-items-center"> |
| 30 | + <span class="icon has-text-success is-size-4 mr-3"><i class="fa-solid fa-folder-open"></i></span> |
| 31 | + <span class="has-text-weight-semibold is-flex-grow-1">Resources</span> |
| 32 | + <span class="tag is-light has-text-weight-bold mr-2">{{ project.resource_count|intcomma }}</span> |
| 33 | + <input type="checkbox" class="width-1 height-1" name="sections" value="files" checked> |
| 34 | + </label> |
| 35 | + {% if project.relation_count %} |
| 36 | + <label class="json-section-option box has-border-radius p-3 mb-0 is-flex is-align-items-center"> |
| 37 | + <span class="icon has-text-success is-size-4 mr-3"><i class="fa-solid fa-link"></i></span> |
| 38 | + <span class="has-text-weight-semibold is-flex-grow-1">Relations</span> |
| 39 | + <span class="tag is-light has-text-weight-bold mr-2">{{ project.relation_count|intcomma }}</span> |
| 40 | + <input type="checkbox" class="width-1 height-1" name="sections" value="relations" checked> |
15 | 41 | </label> |
16 | | - </div> |
17 | | - <div class="field"> |
18 | | - <label class="checkbox"> |
19 | | - <input type="checkbox" name="sections" value="dependencies" checked> |
20 | | - Dependencies (<span data-label="dependencyCount">0</span>) |
21 | | - </label> |
22 | | - </div> |
23 | | - <div class="field"> |
24 | | - <label class="checkbox"> |
25 | | - <input type="checkbox" name="sections" value="files" checked> |
26 | | - Resources (<span data-label="resourceCount">0</span>) |
27 | | - </label> |
28 | | - </div> |
29 | | - <div class="field"> |
30 | | - <label class="checkbox"> |
31 | | - <input type="checkbox" name="sections" value="relations" checked> |
32 | | - Relations (<span data-label="relationCount">0</span>) |
33 | | - </label> |
34 | | - </div> |
| 42 | + {% endif %} |
35 | 43 | </section> |
36 | 44 | <input type="hidden" name="filtered" value="1"> |
37 | 45 | <footer class="modal-card-foot is-justify-content-flex-end"> |
|
0 commit comments