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.
Discovery Pane: Add-on Details and EULA views (bug 600397)
- Loading branch information
Showing
11 changed files
with
366 additions
and
272 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% set referrer_src = '?src=discovery-pane' %} | ||
<!DOCTYPE html> | ||
<html lang="{{ LANG }}" dir="{{ DIR }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=770"> | ||
<title>{% block title %}{{ page_title(addon.name) }}{% endblock %}</title> | ||
{{ css('zamboni/discovery-pane') }} | ||
<base target="_blank" href="{{ settings.SITE_URL }}"> | ||
{% block extrahead %}{% endblock %} | ||
</head> | ||
<body class="html-{{ DIR }} {{ request.APP.short }} detail {% block bodyclass %}{% endblock %}" | ||
data-app="{{ request.APP.short }}" | ||
data-appname="{{ request.APP.pretty }}" | ||
data-appid="{{ request.APP.id }}" | ||
data-anonymous="{{ (not request.user.is_authenticated())|json }}" | ||
data-readonly="{{ settings.READ_ONLY|json }}" | ||
data-media-url="{{ MEDIA_URL }}"> | ||
<section id="main"> | ||
<hgroup> | ||
<h1 class="addon"> | ||
<img class="icon" src="{{ addon.icon_url }}"> | ||
{{ addon.name }} | ||
{% set version = addon.current_version %} | ||
{% if version and not addon.is_selfhosted() %} | ||
<span class="version">{{ version.version }}</span> | ||
{% endif %} | ||
</h1> | ||
<h2 class="author"> | ||
{{ _('by') }} {{ users_list(addon.listed_authors) }} | ||
</h4> | ||
</hgroup> | ||
{% block main %}{% endblock %} | ||
</section> | ||
{% block secondary %}{% endblock %} | ||
<script src="{{ url('jsi18n') }}/build:{{ BUILD_ID_JS }}"></script> | ||
{{ js('common') }} | ||
{{ js('zamboni/discovery-pane') }} | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{% extends "discovery/addons/base.html" %} | ||
|
||
{% set previews = addon.previews.all() %} | ||
|
||
{% block extrahead %} | ||
{% for preview in previews %} | ||
<link rel="prefetch" href="{{ preview.image_url }}"> | ||
{% endfor %} | ||
{% endblock %} | ||
|
||
{% block main %} | ||
<p{{ addon.summary|locale_html }}>{{ addon.summary|nl2br }}</p> | ||
|
||
<ul id="install"> | ||
<li>{{ install_button(addon, show_contrib=False, show_warning=False, show_eula=False) }}</li> | ||
<li><a href="{{ url('addons.detail', addon.id) + referrer_src }}" | ||
class="button">{{ _('Learn More') }}</a></li> | ||
{% if not addon.privacy_policy %} | ||
<li><a href="{{ url('addons.privacy', addon.id) + referrer_src }}"> | ||
{{ _('View Privacy Policy') }}</a></li> | ||
{% endif %} | ||
</ul> | ||
|
||
{% if previews|length > 1 %} | ||
<div id="images"> | ||
<ul class="nav-images"> | ||
<li class="nav-prev"><a href="#" class="prev">{{ _('Previous') }}</a></li> | ||
<li class="nav-next"><a href="#" class="next">{{ _('Next') }}</a></li> | ||
</ul> | ||
<ul class="slider"> | ||
{% for preview in previews %} | ||
<li class="panel"> | ||
<a class="screenshot thumbnail" rel="jquery-lightbox" | ||
href="{{ preview.image_url }}" title="{{ preview.caption }}"> | ||
<img src="{{ preview.thumbnail_url }}"> | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
|
||
<ul class="addon-info"> | ||
<li> | ||
<h3>{{ _('Rating') }}</h3> | ||
{{ addon|reviews_link }} | ||
</li> | ||
<li> | ||
<h3>{{ _('Active Users') }}</h3> | ||
<p class="users">{{ addon.average_daily_users|numberfmt }}</p> | ||
</li> | ||
<li> | ||
<h3>{{ _('Last Updated') }}</h3> | ||
<p><time datetime="{{ addon.last_updated|isotime }}">{{ | ||
addon.last_updated|datetime }}</time></p> | ||
</li> | ||
{% if addon.homepage %} | ||
<li> | ||
<h3>{{ _('Website') }}</h3> | ||
<p><a href="{{ addon.homepage|external_url }}">{{ addon.homepage }}</a></p> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
{% endblock %} | ||
|
||
{% block secondary %} | ||
<section id="addon-reviews"> | ||
{{ review_list_box(addon=addon, reviews=reviews) }} | ||
</section> | ||
{% endblock %} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% extends "discovery/addons/base.html" %} | ||
|
||
{% block title %} | ||
{# L10n: {0} is the name of the add-on #} | ||
{{ page_title(_('End-User License Agreement for {0}')|f(addon.name)) }} | ||
{% endblock %} | ||
|
||
{% block bodyclass %}eula{% endblock %} | ||
|
||
{% block main %} | ||
<h3>{{ _('End-User License Agreement') }}</h3> | ||
<p> | ||
{% trans addon_name=addon.name %} | ||
{{ addon_name }} requires that you accept the following End-User License | ||
Agreement before installation can proceed: | ||
{% endtrans %} | ||
</p> | ||
<article id="eula"> | ||
<p>{{ addon.eula }}</p> | ||
</article> | ||
<ul id="install"> | ||
<li> | ||
{{ install_button(addon, version=version, show_contrib=False, | ||
show_eula=False, show_warning=False) }} | ||
</li> | ||
<li><a href="{{ url('addons.detail', addon.id) + referrer_src }}" class="button"> | ||
{{ _('Cancel Installation') }}</a></li> | ||
</ul> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.