Fix bug 935248: Firefox Release notes powered by RNA/Nucleus.

This commit is contained in:
Michael Kelly 2013-12-02 16:27:54 -05:00 коммит произвёл Josh Mize
Родитель e5d31c3a37
Коммит 09b0ac712c
113 изменённых файлов: 318 добавлений и 5 удалений

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

@ -0,0 +1,74 @@
{# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. #}
{% extends "firefox/fxos-base.html" %}
{% block page_title_prefix %}{% endblock %}
{% block page_title %}{{ _('Firefox — {version} Notes')|f(version=version) }}{% endblock %}
{% block body_id %}notes{% endblock %}
{% block body_class %}fxos-notes sky{% endblock %}
{% block site_css %}
{{ css('firefox_releasenotes') }}
{% endblock %}
{% block extrahead %}{% endblock %}
{% block content %}
<header id="main-feature">
<h1>{{ _('Firefox {version} Notes')|f(version=version) }}</h1>
<h2>{{ _('First offered to release channel users on {date}')|f(date=release.release_date|l10n_format_date) }}</h2>
<p>
{% trans feedback='https://input.mozilla.org/feedback',
bugzilla='https://bugzilla.mozilla.org/' %}
As always, you&#146;re encouraged to
<a href="{{ feedback }}">tell us what you think</a>,
or <a href="{{ bugzilla }}">file a bug in Bugzilla</a>.
{% endtrans %}
</p>
</header>
<div id="main-content">
<article class="main-column">
<section class="notes-section" id="new-features">
<h3>{{ _('New Features') }}</h3>
<ul class="section-items">
{% for note in new_features %}
<li>
<small>{{ note.tag.text }}</small>
<p>{{ note.html|safe }}</p>
</li>
{% endfor %}
</ul>
</section>
<section class="notes-section" id="known-issues">
<h3>{{ _('Known Issues') }}</h3>
<ul class="section-items">
{% for note in known_issues %}
<li>
<small>{{ _('UNRESOLVED') }}</small>
<p>{{ note.html|safe }}</p>
{% if not note.fixed_in_version is none %}
<small>{{ _('Unresolved in v{version_number}')|f(version_number=major_version) }}</small>
<small>
<a href="{{ url('firefox.releasenotes', '{major_version}.0'|f(major_version=note.fixed_in_version)) }}">
{{ _('Resolved in v{version_number}')|f(version_number=note.fixed_in_version) }}
</a>
</small>
{% endif %}
</li>
{% endfor %}
</ul>
</section>
</article>
<aside id="sidebar" class="sidebar"></aside>
</div>
{% endblock %}
{% block js %}{% endblock %}

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

@ -0,0 +1,33 @@
{# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. #}
{% extends "firefox/base-resp.html" %}
{% block page_title_prefix %}{% endblock %}
{% block page_title %}{{ _('Firefox — {version} System Requirements')|f(version=version) }}{% endblock %}
{% block body_id %}notes{% endblock %}
{% block body_class %}fxos-notes sky{% endblock %}
{% block site_css %}
{{ css('firefox_releasenotes') }}
{% endblock %}
{% block extrahead %}{% endblock %}
{% block content %}
<header id="main-feature">
<h1>{{ _('Firefox {version} System Requirements')|f(version=version) }}</h1>
</header>
<div id="main-content">
<article class="main-column">
{{ release.system_requirements|markdown()|safe }}
</article>
</div>
{% block sidebar %}{% endblock %}
{% endblock %}
{% block js %}{% endblock %}

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

@ -0,0 +1,49 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from datetime import datetime
import rna.models
from factory import DjangoModelFactory, LazyAttribute, Sequence, SubFactory
from factory.fuzzy import FuzzyNaiveDateTime, FuzzyInteger
class ChannelFactory(DjangoModelFactory):
FACTORY_FOR = rna.models.Channel
name = Sequence(lambda n: 'Channel {0}'.format(n))
class ProductFactory(DjangoModelFactory):
FACTORY_FOR = rna.models.Product
name = Sequence(lambda n: 'Product {0}'.format(n))
text = Sequence(lambda n: 'Text {0}'.format(n))
class ReleaseFactory(DjangoModelFactory):
FACTORY_FOR = rna.models.Release
product = SubFactory(ProductFactory)
channel = SubFactory(ChannelFactory)
version = FuzzyInteger(0)
sub_version = 0
release_date = FuzzyNaiveDateTime(datetime(2013, 12, 2))
text = ''
class TagFactory(DjangoModelFactory):
FACTORY_FOR = rna.models.Tag
text = Sequence(lambda n: 'Tag {0}'.format(n))
sort_num = Sequence(lambda n: n)
class NoteFactory(DjangoModelFactory):
FACTORY_FOR = rna.models.Note
bug = None
html = '<p>Note!</p>'
first_version = Sequence(lambda n: n)
first_channel = SubFactory(ChannelFactory)
fixed_in_version = LazyAttribute(lambda n: n.first_version + 2)
fixed_in_channel = SubFactory(ChannelFactory)
tag = SubFactory(TagFactory)
product = SubFactory(ProductFactory)
sort_num = Sequence(lambda n: n)
fixed_in_subversion = None

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

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше