Multi-platform: support multiple files per version #201

Merged
Oleg-Komarov merged 43 commits from multi-os into main 2024-07-09 16:27:46 +02:00
3 changed files with 13 additions and 8 deletions
Showing only changes of commit acca5d5404 - Show all commits

View File

@ -72,7 +72,9 @@
{% if version.single_file %} {% if version.single_file %}
<dd>{{ version.files.first.size_bytes|filesizeformat }}</dd> <dd>{{ version.files.first.size_bytes|filesizeformat }}</dd>
{% else %} {% else %}
<dd>TODO multiple files</dd> {% for file in version.files.all %}
<dd>{{ file.size_bytes|filesizeformat }} ({{ file.platforms|join:", " }})</dd>
{% endfor %}
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -190,7 +190,9 @@
{% if latest.single_file %} {% if latest.single_file %}
<dd>{{ latest.files.first.size_bytes|filesizeformat }}</dd> <dd>{{ latest.files.first.size_bytes|filesizeformat }}</dd>
{% else %} {% else %}
<dd>TODO multiple files</dd> {% for file in latest.files.all %}
<dd>{{ file.size_bytes|filesizeformat }} ({{ file.platforms|join:", " }})</dd>
{% endfor %}
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -33,7 +33,9 @@
{% if version.single_file %} {% if version.single_file %}
<li class="show-on-collapse">{{ version.files.first.size_bytes|filesizeformat }}</li> <li class="show-on-collapse">{{ version.files.first.size_bytes|filesizeformat }}</li>
{% else %} {% else %}
<li class="show-on-collapse">TODO multiple files</li> {% for file in version.files.all %}
<li class="show-on-collapse">{{ file.size_bytes|filesizeformat }} ({{ file.platforms|join:", " }})</li>
{% endfor %}
{% endif %} {% endif %}
<li class="show-on-collapse"><i class="i-download"></i> {{ version.download_count }}</li> <li class="show-on-collapse"><i class="i-download"></i> {{ version.download_count }}</li>
<li> <li>
@ -76,7 +78,9 @@
{% if version.single_file %} {% if version.single_file %}
<dd>{{ version.files.first.size_bytes|filesizeformat }}</dd> <dd>{{ version.files.first.size_bytes|filesizeformat }}</dd>
{% else %} {% else %}
<dd>TODO multiple files</dd> {% for file in version.files.all %}
<dd>{{ file.size_bytes|filesizeformat }} ({{ file.platforms|join:", " }})</dd>
{% endfor %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -99,11 +103,8 @@
<div class="dl-row"> <div class="dl-row">
<div class="dl-col"> <div class="dl-col">
<dt>Status</dt> <dt>Status</dt>
{% if version.single_file %} {# all files of a version get approved together #}
<dd>{% include "common/components/status.html" with object=version.files.first %}</dd> <dd>{% include "common/components/status.html" with object=version.files.first %}</dd>
{% else %}
<dd>TODO multiple files</dd>
{% endif %}
</div> </div>
</div> </div>
{% endif %} {% endif %}