Revert "impala add-on developers page"

This reverts commit 43f3351596.
This commit is contained in:
Jeff Balogh 2011-07-22 10:00:27 -07:00
Родитель 1a43eeb820
Коммит 01b5f5727e
18 изменённых файлов: 59 добавлений и 350 удалений

Просмотреть файл

@ -1,11 +0,0 @@
{% if author_addons %}
<ol>
{% for other in author_addons %}
{% if other.id == addon.id %}{% continue %}{% endif %}
<li>
<a href="{{ other.get_url_path(impala=True) }}" title="{{ other.name }}">
{{ other.name|string|truncate(50) }}</a>
</li>
{% endfor %}
</ol>
{% endif %}

Просмотреть файл

@ -1,4 +1,3 @@
{% set meet_url = url('addons.meet', addon.slug) %}
{% if addon.charity %}
{% set charity_url = addon.charity.outgoing_url %}
{% set charity_name = addon.charity.name %}
@ -6,16 +5,22 @@
<div class="notice c author" id="contribution">
{% with single_dev = addon.listed_authors|random %}
<img class="avatar" alt="{{ single_dev.name }}"
src="{{ single_dev.picture_url }}">
<img class="avatar" alt="{{ single_dev.name }}" height="64"
width="64" src="{{ single_dev.picture_url }}"/>
{% endwith %}
<div class="aux">
<div class="aux{% if show_install %}-bottom{% endif %}">
<div class="button-wrapper">
<a class="button contribute prominent" id="contribute-button"
href="{{ url('addons.contribute', addon.slug)|urlparams(src=contribution_src) }}">
<b></b>{{ _('Contribute') }}
</a>
{% if show_install %}
{# L10n: Click Contribute button OR Install button #}
<span class="continue">{{ _('or') }}</span>
{% set ver = version or None %}
{{ install_button(addon, version=ver, show_contrib=False, src=src) }}
{% endif %}
</div>{# /button-wrapper #}
<p class="suggestion">
@ -25,14 +30,6 @@
{% endtrans %}
{% endif %}
</p>{# /suggestion #}
{% if show_install %}
{# L10n: Click Contribute button OR Install button #}
<span class="continue">{{ _('or') }}</span>
{% set ver = version or None %}
{{ install_button(addon, impala=True, version=ver, show_contrib=False,
src=src) }}
{% endif %}
</div>{# /aux #}
<h3>{{ _('Enjoy this add-on?') }}</h3>
@ -40,17 +37,17 @@
{% if text %}
{{ text }}
{% elif not addon.charity %}
{% trans %}
The <a href="{{ meet_url }}">developer of this add-on</a> asks that you help support its
{% trans meet_url=url('addons.meet', addon.slug) %}
The <a href="{{ meet_url }}">developer of this add-on</a> asks that you help support its
continued development by making a small contribution.
{% endtrans %}
{% elif addon.charity_id == amo.FOUNDATION_ORG %}
{% trans %}
{% trans meet_url=url('addons.meet', addon.slug) %}
The <a href="{{ meet_url }}">developer of this add-on</a> asks that you show your support
by making a donation to the <a href="{{ charity_url }}">{{ charity_name }}</a>.
{% endtrans %}
{% else %}
{% trans %}
{% trans meet_url=url('addons.meet', addon.slug) %}
The <a href="{{ meet_url }}">developer of this add-on</a> asks that you show your support
by making a small contribution to <a href="{{ charity_url }}">{{ charity_name }}</a>.
{% endtrans %}

Просмотреть файл

@ -233,7 +233,7 @@
<div class="modal" id="privacy-policy">
<a href="#" class="close">{{ _('close') }}</a>
<h2>{{ _('Privacy Policy') }}</h2>
<div class="prose">
<div class="copy">
{{ addon.privacy_policy|nl2br }}
</div>
</div>

Просмотреть файл

@ -1,106 +0,0 @@
{% extends "impala/base.html" %}
{# L10n: {0} is an add-on name. #}
{% if page == 'installed' %}
{% set title = _('Thank you for installing {0}')|f(addon.name) %}
{% else %}
{% set title = _('Meet the {0} Developer')|f(addon.name) %}
{% endif %}
{% block title %}{{ page_title(title) }}{% endblock %}
{% set authors = addon.listed_authors %}
{% block bodyclass %}
meet gutter {% if page == 'installed' %}about{% endif %}
{% endblock %}
{% if page == 'roadblock' %}
{% set contribution_src = page %}
{% endif %}
{# contribute/installed is a 'headerless' page, so remove those elements. #}
{% block site_header %}
{% if page != 'installed' %}{{ super() }}{% endif %}
{% endblock %}
{% block navbar %}
{% if page != 'installed' %}{{ super() }}{% endif %}
{% endblock %}
{% block footer %}
{% if page != 'installed' %}{{ super() }}{% endif %}
{% endblock %}
{% if page == 'roadblock' and not addon.charity %}
{% set msg = _('Before downloading this add-on, please consider supporting the '
'development of this add-on by making a small contribution.') %}
{% else %}
{% set msg = None %}
{% endif %}
{% block content %}
<section class="primary full">
<hgroup class="hero">
{% if page == 'installed' %}
<h2 class="addon"{{ addon.name|locale_html }}>{{ title }}</h2>
{% else %}
{{ impala_breadcrumbs([(addon.type_url(), amo.ADDON_TYPES[addon.type]),
(addon.get_url_path(), addon.name),
(None, title)]) }}
<h2>{{ title }}</h2>
{% endif %}
</hgroup>
</section>
<aside class="secondary">
{{ addon|sidebar_listing }}
</aside>
<section class="primary c">
{% if addon.takes_contributions %}
{{ impala_contribution(addon=addon, src=src, text=msg,
show_install=(page != 'installed'),
contribution_src=contribution_src) }}
{% endif %}
</section>
<section class="primary full c">
<div class="island prose">
{% if addon.the_reason %}
<h3>{{ _('Why was {0} created?')|f(addon.name) }}</h3>
<p>{{ addon.the_reason|nl2br }}</p>
{% endif %}
{% if addon.the_future %}
<h3>{{ _("What's next for {0}")|f(addon.name) }}</h3>
<p>{{ addon.the_future|nl2br }}</p>
{% endif %}
</div>
</section>
<section class="primary full">
<header class="hero">
<h2>{{ ngettext('About the Developer', 'About the Developers',
authors|length) }}</h2>
 </header>
</section>
{% for author in authors %}
<section class="island c">
<aside class="secondary">
<img class="avatar" src="{{ author.picture_url }}"
{% if not author.picture_type %}alt="{{ _('No Photo') }}"{% endif %}>
</aside>
<section class="primary">
<div class="vcard">
{% with profile=author, table_class='person-info' %}
{% include "users/impala/vcard.html" %}
{% endwith %}
</div>
<div class="prose">
{% if author.bio %}
<h3>{{ _('Who is {0}?')|f(author.name) }}</h3>
<p class="intro">{{ author.bio|nl2br }}</p>
{% endif %}
</div>
</section>
</section>
{% endfor %}
{% endblock %}

Просмотреть файл

@ -41,7 +41,7 @@
{{ impala_performance_note(amount=addon.ts_slowness, listing=True) }}
{% endif %}
</div>
{{ install_button(addon, impala=True, collection=collection) }}
{{ install_button(addon, impala=True) }}
</div>
{% endfor %}
{% endcache %}

Просмотреть файл

@ -42,12 +42,6 @@ detail_patterns = patterns('',
impala_detail_patterns = patterns('',
url('^$', views.impala_addon_detail, name='addons.i_detail'),
('^reviews/', include('reviews.impala_urls')),
url('^developers$', views.impala_developers, {'page': 'developers'},
name='addons.meet'),
url('^contribute/roadblock/', views.impala_developers,
{'page': 'roadblock'}, name='addons.roadblock'),
url('^contribute/installed/', views.impala_developers,
{'page': 'installed'}, name='addons.installed'),
)

Просмотреть файл

@ -532,7 +532,8 @@ def privacy(request, addon):
return jingo.render(request, 'addons/privacy.html', {'addon': addon})
def _developers(request, addon, page, template=None):
@addon_view
def developers(request, addon, page):
if 'version' in request.GET:
qs = addon.versions.filter(files__status__in=amo.VALID_STATUSES)
version = get_list_or_404(qs, version=request.GET['version'])[0]
@ -553,23 +554,13 @@ def _developers(request, addon, page, template=None):
if addon.is_persona():
raise http.Http404()
author_addons = order_by_translation(addon.authors_other_addons, 'name')
return jingo.render(request, template,
return jingo.render(request, 'addons/developers.html',
{'addon': addon, 'author_addons': author_addons,
'page': page, 'src': src,
'contribution_src': contribution_src,
'version': version})
@addon_view
def developers(request, addon, page):
return _developers(request, addon, page, 'addons/developers.html')
@addon_view
def impala_developers(request, addon, page):
return _developers(request, addon, page, 'addons/impala/developers.html')
@addon_view
def contribute(request, addon):
contrib_type = request.GET.get('type', 'suggested')

Просмотреть файл

@ -71,7 +71,7 @@ def review_list(request, addon, review_id=None, user_id=None, template=None):
@addon_view
def impala_review_list(request, addon, review_id=None, user_id=None):
def impala_review_list(request, addon, review_id=None, user_id=None, template=None):
q = (Review.objects.valid().filter(addon=addon)
.order_by('-created'))

Просмотреть файл

@ -1,48 +0,0 @@
<table class="{{ table_class }}">
<caption>{{ _('Developer Information') }}</caption>
<tbody>
<tr>
<th>{{ _('Name') }}</th>
<td class="fn n">{{ profile.name }}</td>
</tr>
{% if profile.location %}
<tr>
<th>{{ _('Location') }}</th>
<td class="adr">{{ profile.location }}</td>
</tr>
{% endif %}
{% if profile.occupation %}
<tr>
<th>{{ _('Occupation') }}</th>
<td class="role">{{ profile.occupation }}</td>
</tr>
{% endif %}
{% if profile.homepage %}
<tr>
<th>{{ _('Homepage') }}</th>
<td><a class="url" href="{{ profile.homepage|external_url }}">
{{ profile.homepage }}</a></td>
</tr>
{% endif %}
{% if not profile.emailhidden %}
<tr>
<th>{{ _('Email address') }}</th>
<td>{{ emaillink(profile.email) }}</td>
</tr>
{% endif %}
<tr>
<th>{{ _('User since') }}</th>
<td>{{ profile.created|datetime }}</td>
</tr>
{% if author_addons %}
<tr>
<th>{{ _('Other Add-ons developed') }}</th>
<td>{% include "addons/impala/author_other_addons.html" %}</td>
</tr>
{% endif %}
<tr>
<th>{{ _('Average rating for their Add-ons') }}</th>
<td>{{ profile.averagerating|float|stars }}</td>
</tr>
</tbody>
</table>

Просмотреть файл

@ -12,6 +12,7 @@
margin: 0 12px 1em 0;
}
h2 {
font-size: 24px;
padding-right: 54px;
}
.install {
@ -63,7 +64,7 @@
.border-radius(5px);
.box-shadow(0 -1px 0 #D7E1ED inset, 0 1px 0 rgba(0, 0, 0, 0.05));
border: 1px solid #CCD6E3;
padding: 14px 14px 14px 104px;
padding: 1em 1em 1em 104px;
background: #E3EDFA;
margin-bottom: 1em;
h3 {
@ -79,23 +80,17 @@
}
.notice.author {
min-height: 64px;
position: relative;
height: 64px;
.aux {
float: right;
margin-left: 7px;
text-align: center;
margin: 0 1em;
p {
font-size: 11px;
}
}
.continue {
display: block;
margin-top: .25em;
}
.avatar {
height: 64px;
width: 64px;
position: absolute;
left: 20px;
top: 1em;
@ -406,8 +401,8 @@
}
h4 {
font-size: 12px;
line-height: 14px;
}
}
}
@ -426,93 +421,3 @@ span.featured {
span.featured {
background-color: #093;
}
span.emaillink {
direction: rtl;
unicode-bidi: bidi-override;
.i {
display: none;
}
}
caption {
display: none;
}
th {
text-align: left;
}
.html-rtl th {
text-align: right;
}
table.person-info {
width: 100%;
th, td {
border-top: 1px solid @border-black;
padding: 8px 0;
}
th {
color: #333;
line-height: 15px;
width: 40%;
}
tr:first-child {
th, td {
border-top: none;
}
}
td {
padding-top: 0;
}
ol {
list-style: decimal;
margin: 0 0 0 1.5em;
}
}
img.avatar {
border: 3px solid #fff;
}
img.icon {
padding: 4px;
}
.meet {
.hero h2 {
margin-top: 1em;
}
hgroup.hero h2 {
margin-bottom: 1em;
}
&.about {
hgroup.hero h2 {
margin: 2em 0;
}
}
.author-bio {
border-top: 1px dotted @border-blue;
margin-top: 1em;
padding-top: 1em;
}
.notice.author {
padding-left: 14px;
.avatar {
display: none;
}
}
.island {
> h3 {
margin: 0;
}
> section {
float: none;
padding: 0 14px 0 0;
width: auto;
}
.secondary {
width: 208px;
}
}
}

Просмотреть файл

@ -0,0 +1,16 @@
.copy {
b {
font-weight: bold;
}
ul {
list-style: disc outside none;
margin: 0 0 0 20px;
}
ol {
list-style: decimal outside none;
margin: 0 0 0 20px;
}
blockquote {
margin-bottom: 0;
}
}

Просмотреть файл

@ -7,7 +7,6 @@
@error-red: #C00000;
@orange: #D16B00;
@border-blue: #C9DDF2;
@border-black: fadeOut(#000, 80%);
@green: #093;

Просмотреть файл

@ -1,13 +1,10 @@
.prose {
line-height: 1.2em;
ul, ol {
 margin: 0 0 0 20px;
}
ul {
list-style: disc;
list-style-type: disc;
}
ol {
list-style: decimal;
list-style-type: decimal;
}
li {
margin-left: 1em;
@ -19,6 +16,6 @@
font-style: italic;
}
blockquote {
margin: 1em 1em 0;
margin: 1em;
}
}
}

Просмотреть файл

@ -54,12 +54,11 @@ a {
}
.primary {
margin-left: 210px;
position: relative;
&.full {
margin: 0;
width: 100%;
}
}
.primary {
margin-left: 210px;
.primary {
margin-right: 210px;
margin-left: 0;
@ -72,9 +71,6 @@ a {
.html-rtl.gutter .primary {
margin-left: 210px;
margin-right: 0;
&.full {
margin: 0;
}
}
.secondary {
@ -117,7 +113,7 @@ a {
margin-bottom: 28px;
}
li {
border: 1px solid @border-black;
border: 1px solid fadeOut(#000, 80%);
border-width: 0 0 1px 0;
position: relative;
&:first-child {
@ -168,7 +164,7 @@ a {
padding: 0 6px;
}
section > h3 {
border-bottom: 1px solid @border-black;
border-bottom: 1px solid fadeOut(#000, 80%);
color: #484848;
font-size: 12px;
font-weight: bold;

Просмотреть файл

@ -25,10 +25,6 @@ h1 {
text-transform: uppercase;
}
h2 {
font-size: 24px;
}
h4 {
font-size: 14px;
}
@ -103,6 +99,10 @@ pre, code, kbd, tt, samp, tt {
}
}
&.hero {
h2 {
color: @red;
font-size: 24px;
}
hgroup {
h3 {
color: #666;
@ -119,20 +119,6 @@ pre, code, kbd, tt, samp, tt {
}
}
.primary {
.hero {
h2 {
color: @red;
}
}
.prose {
h3 {
font: italic 16px/18px @serif-stack;
margin-top: 1em;
}
}
}
.secondary {
h2 {
font-family: @sans-stack;
@ -152,4 +138,4 @@ pre, code, kbd, tt, samp, tt {
.error {
color: @red;
}
}

Просмотреть файл

@ -108,14 +108,6 @@ $(function() {
$img.attr('src', $img.attr('data-defer-src'));
});
// Email obfuscation.
$('span.emaillink').each(function() {
var $this = $(this);
$this.find('.i').remove();
var em = $this.text().split('').reverse().join('');
$this.prev('a').attr('href', 'mailto:' + em);
});
//allow dismissal of site-balloons.
$('.site-balloon .close').click(function(e) {
e.preventDefault();

Просмотреть файл

@ -428,9 +428,10 @@ MINIFY_BUNDLES = {
'css/impala/l10n.less',
'css/impala/contributions.less',
'css/impala/lightbox.less',
'css/impala/prose.less',
'css/impala/copy.less',
'css/impala/sharing.less',
'css/impala/abuse.less',
'css/impala/prose.less',
'css/impala/paginator.less',
'css/impala/listing.less',
'css/impala/users.less',
@ -697,6 +698,7 @@ PREVIEWS_PATH = UPLOADS_PATH + '/previews'
USERPICS_PATH = UPLOADS_PATH + '/userpics'
PACKAGER_PATH = os.path.join(TMP_PATH, 'packager')
ADDON_ICONS_DEFAULT_PATH = os.path.join(MEDIA_ROOT, 'img/addon-icons')
PREVIEW_THUMBNAIL_PATH = (PREVIEWS_PATH + '/thumbs/%s/%d.png')
PREVIEW_FULL_PATH = (PREVIEWS_PATH + '/full/%s/%d.png')
@ -707,7 +709,6 @@ ADDON_ICONS_DEFAULT_URL = MEDIA_URL + '/img/addon-icons'
ADDON_ICON_BASE_URL = MEDIA_URL + 'img/icons/'
ADDON_ICON_URL = ('%s/images/addon_icon/%%d-%%d.png?modified=%%s' %
STATIC_URL)
PREVIEW_THUMBNAIL_URL = (STATIC_URL +
'/img/uploads/previews/thumbs/%s/%d.png?modified=%d')
PREVIEW_FULL_URL = (STATIC_URL +

Просмотреть файл

@ -45,7 +45,7 @@ urlpatterns = patterns('',
('', include('users.urls')),
# Developer Hub.
('^developers/', include('devhub.urls')),
('developers/', include('devhub.urls')),
# Developer Hub.
('editors/', include('editors.urls')),