Skip to content

Commit

Permalink
fix beta label and use different labels for active and inactive packages
Browse files Browse the repository at this point in the history
- apply "beta" to package versions instead of packages
- use green labels for active packages
- use default (gray) label for inactive packages and add tooltip telling the package is inactive
- update version date (cut microseconds)
- fix unclosed span tag in package.html
  • Loading branch information
hgy59 committed Jan 1, 2024
1 parent 6fdab83 commit f7ed0fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
29 changes: 16 additions & 13 deletions spkrepo/templates/frontend/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
</a>
<div class="media-body">
<h1 class="media-heading">{{ package.versions[-1].displaynames['enu'].displayname }}
<small>v{{ package.versions[-1].version_string }}
{% if package.versions[-1].report_url %}<span class="label label-danger">beta</span>{% endif %}
</small>
<small>v{{ package.versions[-1].version_string }}</small>
</h1>
<p>{{ package.versions[-1].descriptions['enu'].description }}</p>
<div class="package-screenshots">
Expand All @@ -20,31 +18,36 @@ <h1 class="media-heading">{{ package.versions[-1].displaynames['enu'].displaynam
</div>
{% for version in package.versions|reverse %}
<dl>
<dt>Version {{ version.version_string | safe }}</dt>
<dt>Version {{ version.version_string | safe }}{% if version.report_url %} <span class="label label-danger">beta</span>{% endif %}</dt>
<dd>{{ version.changelog | safe }}</dd>
<dt>Date</dt>
<dd>{{ version.insert_date }}</dd>
<dd>{{ version.insert_date.replace(microsecond=0) }}</dd>
<dt>Architectures</dt>
<dd>
{% for (version, builds) in version.builds_per_dsm.items() %}
{% for (version, builds) in version.builds_per_dsm.items() %}
<!-- Group firmware by DSM or SRM if 1.x -->
{% if version == '1' %}
SRM {{ version }}.x:
SRM {{ version }}.x:
{% else %}
DSM {{ version }}.x:
DSM {{ version }}.x:
{% endif %}
{% for build in builds %}
{% for arch in build.architectures %}
<a href="{{ url_for('nas.data', path=build.path) }}"><span class="label label-default">{{ build.firmware.version }} {{ arch.code }}</span></a>
{% endfor %}
{% if build.active %}
{% for arch in build.architectures %}
<a href="{{ url_for('nas.data', path=build.path) }}"><span class="label label-success">{{ build.firmware.version }} {{ arch.code }}</span></a>
{% endfor %}
{% else %}
{% for arch in build.architectures %}
<a href="{{ url_for('nas.data', path=build.path) }}"><span class="label label-default" data-toggle="tooltip" title="Inactive: Manual installation only. This Package might be under development and have pending issues.">{{ build.firmware.version }} {{ arch.code }}</span></a>
{% endfor %}
{% endif %}
{% endfor %}
<br/>
{% endfor %}
{% endfor %}
</dd>
</dl>
{% endfor %}
</div>
<span
</div>
</div>
{% endblock %}
4 changes: 1 addition & 3 deletions spkrepo/templates/frontend/packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
</a>
<div class="media-body">
<h4 class="media-heading">{{ version.displaynames['enu'].displayname }}
<small>v{{ version.version_string }}
{% if version.report_url %}<span class="label label-danger">beta</span>{% endif %}
</small>
<small>v{{ version.version_string }}</small>
</h4>
<div class="ellipsis package-description">
<p>{{ version.descriptions['enu'].description }}</p>
Expand Down

0 comments on commit f7ed0fd

Please sign in to comment.