forked from mozilla/zamboni
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 572838, versions page is prettier
- Loading branch information
Showing
3 changed files
with
56 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,59 @@ | ||
{# addon, version, request #} | ||
<div class="version {{ itemclass }}"> | ||
{% set versions_url = url('addons.versions', addon.id) %} | ||
<h4><a href="{{ versions_url }}#version-{{ version.version }}" | ||
<h3><a href="{{ versions_url }}#version-{{ version.version }}" | ||
title="{{ _('Permanent link to this version') }}"> | ||
{{ _('Version {0}', 'addon_display_header_version')|f(version.version) }}</a> | ||
— | ||
<span title="{{ version.created|isotime }}">{{ | ||
version.created|datetime }}</span> | ||
{% if version.has_files %} | ||
— | ||
<span>{{ _('{0} KB')|f(version.all_files[0].size|int|numberfmt) }}</span> | ||
{% endif %} | ||
</h4> | ||
</h3> | ||
|
||
{{ install_button(addon, version=version) }} | ||
<div class="item-info"> | ||
{{ install_button(addon, version=version) }} | ||
|
||
{% if addon.compatible_apps %} | ||
<h5>{{ _('Works with:') }}</h5> | ||
<ul> | ||
{% for compat in addon.compatible_apps.values() %} | ||
<li>{{ compat }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
<div class="prose userinput" {{ version.releasenotes|locale_html }}> | ||
{{ version.releasenotes }} | ||
{% if addon.compatible_apps %} | ||
<h5>{{ _('Works with:') }}</h5> | ||
<ul> | ||
{% for compat in addon.compatible_apps.values() %} | ||
<li>{{ compat }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</div> | ||
|
||
<blockquote> | ||
<div class="prose userinput" {{ version.releasenotes|locale_html }}> | ||
{{ version.releasenotes }} | ||
</div> | ||
</blockquote> | ||
|
||
{# License #} | ||
{% if version.license %} | ||
<h5> | ||
{{ _('Source Code License') }} | ||
{# TODO reverse URL #} | ||
<a href="{{ remora_url('/pages/developer_faq#license') }}"> | ||
<span><a href="{{ remora_url('/pages/developer_faq#license') }}"> | ||
{{ _("What's this?", 'addons_display_a_license_what') }} | ||
</a> | ||
</a></span> | ||
</h5> | ||
{# TODO reverse URL #} | ||
<a href="{{ remora_url('/versions/license/{0}'|f(version.id)) }}"> | ||
{{ version.license.name }}</a> | ||
{% endif %} | ||
|
||
<ul class="further-navigation"> | ||
<nav class="further-navigation"> | ||
{% if addon.view_source and request.user.is_authenticated() and version.has_files %} | ||
<li> | ||
{# TODO reverse URL #} | ||
<a href="{{ remora_url('/files/browse/{0}'|f(version.all_files[0].pk)) }}"> | ||
{{ _('View the source') }}</a> | ||
</li> | ||
{% endif %} | ||
{% if show_versions_link and not addon.is_selfhosted() %} | ||
<li> | ||
<a href="{{ versions_url }}"> | ||
{{ _('View All Versions') }} | ||
</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</nav> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters