Skip to content

Commit

Permalink
Fix Bug 1101220 - Developer Edition follow-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoshino committed Jan 8, 2015
1 parent ef6d495 commit c0e1067
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 32 deletions.
6 changes: 3 additions & 3 deletions bedrock/firefox/templates/firefox/all.html
Expand Up @@ -9,7 +9,7 @@
{% if channel == 'beta' %}
{{ _('Download Firefox Beta in your language and experience cutting edge features before they make it to final release. Provide feedback to help us refine and polish the next version of Firefox.') }}
{% elif channel == 'aurora' %}
{{ _('Download Firefox Aurora in your language to experience the newest features and innovations in an unstable environment even before they go to Beta. Give us feedback that will determine what makes it to Final Release and help shape the future of Firefox.') }}
{{ _('Download Firefox Developer Edition in your language to experience the newest features and innovations in an unstable environment even before they go to Beta. Give us feedback that will determine what makes it to Final Release and help shape the future of Firefox.') }}
{% elif channel == 'esr' %}
{{ _('Firefox ESR is intended for groups who deploy and maintain the desktop environment in large organizations. <a href="%s">Learn more.</a>')|format(url('firefox.organizations.organizations')) }}
{% else %}
Expand All @@ -18,7 +18,7 @@
{% endblock %}

{% block body_class -%}
sky firefox-all-{{ channel }} {% if channel == 'aurora' %}space{% endif %}
sky firefox-all-{{ channel }} {% if channel == 'aurora' %}blueprint{% endif %}
{% endblock %}

{% block site_css %}
Expand All @@ -27,7 +27,7 @@

{% block site_header_logo %}
{% if channel == 'aurora' %}
<h2><a href="{{ url('firefox') }}"><img alt="Mozilla Firefox" height="70" width="185" src="{{media('img/firefox/template/header-logo-inverse.png?2013-06') }}"></a></h2>
<h2><a href="{{ url('firefox.developer') }}">{{ high_res_img('img/firefox/developer/title.png', {'alt': _('Firefox Developer Edition'), 'width': '220', 'height': '84'}) }}</a></h2>
{% else %}
{{ super() }}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions bedrock/firefox/templates/firefox/channel.html
Expand Up @@ -35,7 +35,7 @@
<ul id="toggler-container" class="pager-tabs">
<li id="beta-link"><a href="#beta"><img src="{{ media('/img/firefox/channel/toggler-beta.png?2013-06') }}" alt="Firefox Beta" id="toggler-logo-beta" /></a></li>
<li id="firefox-link"><a href="#firefox"><img src="{{ media('/img/firefox/channel/toggler-firefox.png?2013-06') }}" alt="Firefox" id="toggler-logo-firefox" /></a></li>
<li id="aurora-link"><a href="#aurora"><img src="{{ media('/img/firefox/channel/toggler-dev.png') }}" alt="Firefox Developer Edition" id="toggler-logo-aurora" /></a></li>
<li id="aurora-link"><a href="#developer"><img src="{{ media('/img/firefox/channel/toggler-dev.png') }}" alt="Firefox Developer Edition" id="toggler-logo-aurora" /></a></li>
</ul>

<a href="#" id="carousel-left" aria-hidden="true"></a>
Expand Down Expand Up @@ -80,7 +80,7 @@ <h3>{{_('Tried, tested and used by millions around the world')}}</h3>
<p class="more"><a href="{{ php_url('/firefox/') }}">{{_('Learn more about Firefox')}}</a></p>
</div>

<div id="aurora" class="pager-page">
<div id="developer" class="pager-page">
<h2 class="channel-title channel-title-aurora">{{ high_res_img('img/firefox/channel/title-dev.png', {'alt': 'Firefox Developer Edition', 'width': '214', 'height': '100'}) }}</h2>
{# L10n: This description applies to Firefox Developer Edition #}
{% if l10n_has_tag('channel_dev_edition') %}
Expand Down
2 changes: 1 addition & 1 deletion bedrock/firefox/urls.py
Expand Up @@ -19,7 +19,7 @@
whatsnew_re = latest_re % (version_re, 'whatsnew')
tour_re = latest_re % (version_re, 'tour')
product_re = '(?P<product>firefox|mobile)'
channel_re = '(?P<channel>beta|aurora|organizations)'
channel_re = '(?P<channel>beta|aurora|developer|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
mobile_releasenotes_re = releasenotes_re.replace('firefox', 'mobile')
sysreq_re = latest_re % (version_re, 'system-requirements')
Expand Down
5 changes: 3 additions & 2 deletions bedrock/firefox/views.py
Expand Up @@ -191,7 +191,8 @@ def dnt(request):
def all_downloads(request, channel):
if channel is None:
channel = 'release'

if channel == 'developer':
channel = 'aurora'
if channel == 'organizations':
channel = 'esr'

Expand All @@ -201,7 +202,7 @@ def all_downloads(request, channel):
channel_names = {
'release': _('Firefox'),
'beta': _('Firefox Beta'),
'aurora': _('Firefox Aurora'),
'aurora': _('Developer Edition'),
'esr': _('Firefox Extended Support Release'),
}

Expand Down
2 changes: 2 additions & 0 deletions bedrock/mozorg/helpers/misc.py
Expand Up @@ -456,6 +456,8 @@ def product_url(product, page, channel=None):
# Tweak the channel name for the naming URL pattern in urls.py
if channel == 'release':
channel = None
if channel == 'aurora' and product == 'firefox':
channel = 'developer'
if channel == 'esr':
channel = 'organizations'

Expand Down
6 changes: 3 additions & 3 deletions bedrock/mozorg/tests/test_helper_misc.py
Expand Up @@ -520,7 +520,7 @@ def test_firefox_all(self):
eq_(self._render('firefox', 'all', 'beta'),
'/en-US/firefox/beta/all/')
eq_(self._render('firefox', 'all', 'aurora'),
'/en-US/firefox/aurora/all/')
'/en-US/firefox/developer/all/')
eq_(self._render('firefox', 'all', 'esr'),
'/en-US/firefox/organizations/all/')
eq_(self._render('firefox', 'all', 'organizations'),
Expand All @@ -535,7 +535,7 @@ def test_firefox_sysreq(self):
eq_(self._render('firefox', 'sysreq', 'beta'),
'/en-US/firefox/beta/system-requirements/')
eq_(self._render('firefox', 'sysreq', 'aurora'),
'/en-US/firefox/aurora/system-requirements/')
'/en-US/firefox/developer/system-requirements/')
eq_(self._render('firefox', 'sysreq', 'esr'),
'/en-US/firefox/organizations/system-requirements/')
eq_(self._render('firefox', 'sysreq', 'organizations'),
Expand All @@ -550,7 +550,7 @@ def test_firefox_notes(self):
eq_(self._render('firefox', 'notes', 'beta'),
'/en-US/firefox/beta/notes/')
eq_(self._render('firefox', 'notes', 'aurora'),
'/en-US/firefox/aurora/notes/')
'/en-US/firefox/developer/notes/')
eq_(self._render('firefox', 'notes', 'esr'),
'/en-US/firefox/organizations/notes/')
eq_(self._render('firefox', 'notes', 'organizations'),
Expand Down
8 changes: 4 additions & 4 deletions bedrock/releasenotes/tests/test_base.py
Expand Up @@ -269,8 +269,8 @@ def test_desktop_beta_version(self):

@patch.dict(product_details.firefox_versions,
FIREFOX_AURORA='24.0a2')
def test_desktop_aurora_version(self):
self._test('/firefox/aurora/notes/',
def test_desktop_developer_version(self):
self._test('/firefox/developer/notes/',
'/firefox/24.0a2/auroranotes/')

@patch.dict(product_details.firefox_versions,
Expand Down Expand Up @@ -326,8 +326,8 @@ def test_desktop_beta_version(self):

@patch.dict(product_details.firefox_versions,
FIREFOX_AURORA='24.0a2')
def test_desktop_aurora_version(self):
self._test('/firefox/aurora/system-requirements/',
def test_desktop_developer_version(self):
self._test('/firefox/developer/system-requirements/',
'/firefox/24.0a2/system-requirements/')

@patch.dict(product_details.firefox_versions,
Expand Down
6 changes: 6 additions & 0 deletions bedrock/releasenotes/views.py
Expand Up @@ -116,6 +116,9 @@ def system_requirements(request, version, product='Firefox'):


def latest_notes(request, product='firefox', channel='release'):
if product == 'firefox' and channel == 'developer':
channel = 'aurora'

if product == 'thunderbird':
version = thunderbird_get_latest_version(product, channel)
else:
Expand All @@ -135,6 +138,9 @@ def latest_notes(request, product='firefox', channel='release'):


def latest_sysreq(request, channel, product):
if product == 'firefox' and channel == 'developer':
channel = 'aurora'

if product == 'thunderbird':
version = thunderbird_get_latest_version(product, channel)
else:
Expand Down
18 changes: 10 additions & 8 deletions etc/httpd/global.conf
Expand Up @@ -170,11 +170,12 @@ RewriteRule ^/en-US/firefox/search(?:\.html)?$ /en-US/firefox/ [L,R=301]
# bug 957664
RewriteRule ^/en-US/press/awards(?:\.html)?$ https://blog.mozilla.org/press/awards/ [L,R=301]

# bug 860865
# bug 860865, 1101220
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/all-(?:beta|rc)(?:\.html)?$ /firefox/beta/all/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/all-aurora(?:\.html)?$ /firefox/aurora/all/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/all-aurora(?:\.html)?$ /$1firefox/developer/all/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/aurora/(all|notes|system-requirements)/?$ /$1firefox/developer/$2/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/organizations/all(?:\.html)?$ /firefox/organizations/all/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/(aurora|beta)/all(/?)$ /b/$1firefox/$2/all$3 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/(developer|beta)/all(/?)$ /b/$1firefox/$2/all$3 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/organizations(.*)$ /b/$1firefox/organizations$2 [PT]

# bug 803345
Expand Down Expand Up @@ -253,8 +254,9 @@ RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/unsupported/(.*)$ /b/$1firefox/unsup
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/unsupported-systems\.html$ /$1firefox/unsupported-systems/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/unsupported-systems(.*)$ /b/$1firefox/unsupported-systems$2 [PT]

# Bug 1009247
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?(firefox|mobile)/(aurora|beta)/?$ /$1firefox/channel/#$3 [NE,L,R=301]
# Bug 1009247, 1101220
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?(firefox|mobile)/aurora/?$ /$1firefox/channel/#developer [NE,L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?(firefox|mobile)/beta/?$ /$1firefox/channel/#beta [NE,L,R=301]

# bug 960651
RewriteCond %{REQUEST_URI} !/unsupported
Expand Down Expand Up @@ -287,10 +289,10 @@ RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?mobile/customize(?:/.*)?$ /$1firefox/android
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?products(/?)$ /b/$1products$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox(/(?:\d+\.\d+\.?(?:\d+)?\.?(?:\d+)?(?:[a|b]?)(?:\d*)(?:pre)?(?:\d)?))?/whatsnew(/?)$ /b/$1firefox$2/whatsnew$3 [PT]

# bug 736934, 860865
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?(firefox|mobile)/((?:beta|aurora|organizations)/)?notes(/?)$ /b/$1$2/$3notes$4 [PT]
# bug 736934, 860865, 1101220
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?(firefox|mobile)/((?:beta|aurora|developer|organizations)/)?notes(/?)$ /b/$1$2/$3notes$4 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/((?:beta|aurora|organizations)/)?system-requirements(\.html)?$ /$1firefox/$2system-requirements/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/((?:beta|aurora|organizations)/)?system-requirements/$ /b/$1firefox/$2system-requirements/ [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/((?:beta|developer|organizations)/)?system-requirements/$ /b/$1firefox/$2system-requirements/ [PT]

# bug 778752
RewriteRule ^/en-US/firefox/channel/android(/?)$ /b/en-US/firefox/channel/android$1 [PT]
Expand Down
14 changes: 7 additions & 7 deletions media/css/firefox/channel.less
Expand Up @@ -81,39 +81,39 @@
.pager-selected-beta #aurora-link { left: 110px; z-index: 1; }
.pager-selected-beta #firefox-link { left: 635px; z-index: 2; }

.pager-selected-aurora #firefox-link { left: 110px; z-index: 1; }
.pager-selected-aurora #beta-link { left: 635px; z-index: 2; }
.pager-selected-developer #firefox-link { left: 110px; z-index: 1; }
.pager-selected-developer #beta-link { left: 635px; z-index: 2; }

.pager-selected-firefox #firefox-link,
.pager-selected-beta #beta-link,
.pager-selected-aurora #aurora-link {
.pager-selected-developer #aurora-link {
top: 0;
left: 335px;
z-index: 3;
}

.pager-selected-firefox #firefox-link a:hover,
.pager-selected-beta #beta-link a:hover,
.pager-selected-aurora #aurora-link a:hover {
.pager-selected-developer #aurora-link a:hover {
top: 0;
}

/* To override default image styles */

.pager-selected-firefox #beta-link,
.pager-selected-aurora #beta-link {
.pager-selected-developer #beta-link {
top: 25px;
}

.pager-selected-firefox #beta-link img,
.pager-selected-aurora #beta-link img {
.pager-selected-developer #beta-link img {
width: 150px;
height: 150px;
}

.pager-selected-firefox #firefox-link img,
.pager-selected-beta #beta-link img,
.pager-selected-aurora #aurora-link img {
.pager-selected-developer #aurora-link img {
height: 225px;
width: 225px;
}
Expand Down
8 changes: 6 additions & 2 deletions media/js/firefox/channel.js
Expand Up @@ -14,7 +14,7 @@ $(document).ready(function() {
}

pager.$container.bind('changePage', function(e, tab) {
if (pager.currentPage.id == 'aurora') {
if (pager.currentPage.id == 'developer') {
$('body').addClass('blueprint');
$logo.attr('src', $logo.attr('data-inverse-src'));
} else {
Expand All @@ -39,7 +39,7 @@ $(document).ready(function() {
});

// init
if (pager.currentPage.id == 'aurora') {
if (pager.currentPage.id == 'developer') {
$('body').removeClass('sky');
$('body').addClass('blueprint');
$logo.attr('src', $logo.attr('data-inverse-src'));
Expand All @@ -52,4 +52,8 @@ $(document).ready(function() {
$('.pager-tabs a.selected').bind('click.outgoing', function() {
redirect(this);
});

if (location.hash === '#aurora') {
location.hash = '#developer';
}
});

0 comments on commit c0e1067

Please sign in to comment.