Re-themed the questions pages. [bug 623904]

This commit is contained in:
Ricky Rosario 2011-02-02 23:21:44 -05:00
Родитель a340b2d840
Коммит 58817ce195
49 изменённых файлов: 1430 добавлений и 1524 удалений

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

@ -26,7 +26,7 @@
<option value="1">{{ _('The flag is valid and I fixed the issue.') }}</option>
<option value="2">{{ _('The flag is invalid.') }}</option>
</select>
<input type="submit" class="btn g-btn" value="Update" />
<input type="submit" class="btn" value="Update" />
</form>
</div>
{% else %}

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

@ -58,7 +58,7 @@
<p>{{ delete_warning|safe }}</p>
<div class="form-actions">
<a href="{{ url('gallery.media', media_type, media.id) }}">{{ _('Cancel') }}</a>
<input type="submit" class="btn g-btn" value="{{ delete_this }}" />
<input type="submit" class="btn" value="{{ delete_this }}" />
</div>
</form>
</div>

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

@ -26,7 +26,7 @@
</div>
<div class="form-actions form-item">
<a href="{{ url('gallery.media', media_type, media.id) }}">{{ _('Cancel') }}</a>
<input type="submit" class="btn g-btn" value="{{ save_this }}" />
<input type="submit" class="btn" value="{{ save_this }}" />
</div>
</form>
</article>

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

@ -36,6 +36,7 @@ MSG_CONTENT_REQUIRED = _lazy(u'Please provide content.')
MSG_CONTENT_SHORT = _lazy(u'Your content is too short (%(show_value)s characters). It must be at least %(limit_value)s characters.')
MSG_CONTENT_LONG = _lazy(u'Please keep the length of your content to %(limit_value)s characters or less. It is currently %(show_value)s characters.')
REPLY_PLACEHOLDER = _lazy(u'Enter your reply here.')
class EditQuestionForm(forms.Form):
"""Form to edit an existing question"""
@ -175,7 +176,8 @@ class AnswerForm(forms.Form):
label=_lazy('Content:'),
min_length=5,
max_length=10000,
widget=forms.Textarea(),
widget=forms.Textarea(attrs={'placeholder':
REPLY_PLACEHOLDER}),
error_messages={'required': MSG_CONTENT_REQUIRED,
'min_length': MSG_CONTENT_SHORT,
'max_length': MSG_CONTENT_LONG})

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

@ -6,317 +6,347 @@
{# L10n: {q} is the title of the question. #}
{% set title = _('{q} | Firefox Support Forum')|f(q=question.title) %}
{% set classes = 'answers' %}
{% set crumbs = [(url('questions.questions'), _('Forum')), (None, question.title)] %}
{% block content %}
<div id="back-link">
<a href="{{ url('questions.questions') }}">&laquo; {{ _('Back to the Firefox Support Forum') }}</a>
</div>
{% if request.GET.get('new') %}
<div id="new-question">
{{ _('Thanks! Your question has been posted. See it below.') }}
</div>
{% endif %}
<div id="question">
<div class="user-section">
<div class="avatar">
<a href="{{ profile_url(question.creator) }}">
<img src="{{ profile_avatar(question.creator) }}" height="48" width="48" alt="{{ question.creator }}"/>
</a>
<article class="main">
{% if request.GET.get('new') %}
<div id="new-question">
{{ _('Thanks! Your question has been posted. See it below.') }}
</div>
<div class="asked-by">
{# L10n: {f} is the full username and {u} is the truncated username. #}
{{ _('Asked by <span class="user" title="{f}">{u}</span>')|fe(f=question.creator, u=question.creator.username|truncate(10, True)) }}
{{ datetimeformat(question.created, format='longdatetime') }}
</div>
</div>
<div class="main-section">
<h1>{{ question.title }}</h1>
<div class="badges">
{% if question.is_locked %}<span class="locked">{{ _('Locked') }}</span>{% endif %}
{% if is_watching(question) %}<span class="watching">{{ _('Watching') }}</span>{% endif %}
</div>
<div class="content">
{{ question.content_parsed|safe }}
</div>
{% if question.updated_by %}
<p class="edited">
{{ _('Modified {datetime} by {name}')|fe(name=question.updated_by.username, datetime=datetimeformat(question.updated, format='longdatetime')) }}
</p>
{% endif %}
<div class="problem">
{% include 'questions/includes/have_problem.html' %}
{% if not question.is_locked and not question.has_voted(request) %}
<div class="me-too">
<form action="{{ url('questions.vote', question_id=question.id) }}" method="post">
{{ csrf() }}
<input class="btn y-btn" type="submit" value="{{ _('I have this problem too.') }}">
</form>
</div>
{% endif %}
</div>
{% if question.solution %}
<div class="solution">
<h3>{{ _('Solution Chosen by {user}')|f(user=question.creator) }}</h3>
<div class="ans-wrap">
<div class="avatar">
<a href="{{ profile_url(question.solution.creator) }}">
<img src="{{ profile_avatar(question.solution.creator) }}" height="48" width="48" alt="{{ question.solution.creator }}"/>
</a>
</div>
<div class="answer">
<span class="user" title="{{question.solution.creator}}">{{ question.solution.creator.username|truncate(10, True) }}</span>
<span class="votes">{{ 2 * question.solution.num_helpful_votes - question.solution.num_votes }}</span>
{{ question.solution.content_parsed|safe }}
</div>
</div>
{% endif %}
<section id="question">
<div class="user-section">
<div class="avatar{% if user == question.creator %} self{% endif %}">
<a href="{{ profile_url(question.creator) }}">
<img src="{{ profile_avatar(question.creator) }}" height="48" width="48" alt="{{ question.creator }}"/>
{% if user == question.creator %}
<span>{{ _('You') }}</span>
{% endif %}
</a>
</div>
{% endif %}
{% for answer in question.helpful_replies[0:2] %}
{% if loop.first %}
<div class="other-helpful">
<h3>{{ _('Other Helpful Replies') }}</h3>
<div class="asked-by">
<a href="{{ profile_url(question.creator) }}">{{ question.creator }}</a>
</div>
<div class="asked-on">
{{ question.created|timesince }}
</div>
</div>
<div class="main-section">
<div class="content">
<h1>{{ question.title }}</h1>
{{ question.content_parsed|safe }}
<div class="stem"></div>{# for the speech bubble arrow #}
</div>
{% if question.updated_by %}
<p class="edited">
{{ _('Modified {datetime} by {name}')|fe(name=question.updated_by.username, datetime=datetimeformat(question.updated, format='longdatetime')) }}
</p>
{% endif %}
<div class="ans-wrap">
<div class="avatar">
<div class="problem">
{% if not question.is_locked and not question.has_voted(request) %}
<div class="me-too">
<form action="{{ url('questions.vote', question_id=question.id) }}" method="post">
{{ csrf() }}
<input class="btn btn-important" type="submit" value="{{ _('I have this problem, too!') }}">
</form>
</div>
{% endif %}
{% include 'questions/includes/have_problem.html' %}
</div>
{% if question.solution %}
<div class="solution">
<h2>{{ _('Solution Chosen by {user}')|f(user=question.creator) }}</h2>
<div class="mini-reply">
<div class="avatar">
<a href="{{ profile_url(question.solution.creator) }}">
<img src="{{ profile_avatar(question.solution.creator) }}" height="48" width="48" alt="{{ question.solution.creator }}"/>
</a>
</div>
<div class="answer">
<p>
<span class="user">{{ question.solution.creator.username }}:</span>
{{ question.solution.content_parsed|striptags()|truncate(170) }} <a href="{{ question.solution.get_absolute_url() }}">{{ _('Read more...') }}</a>
</p>
<div class="stem"></div>{# for the speech bubble arrow #}
</div>
<p class="helpful">
{{ ngettext('{count} out of 1 person found this reply helpful',
'{count} out of {total} people found this reply helpful',
question.solution.num_votes)|f(count=question.solution.num_helpful_votes, total=question.solution.num_votes) }}
</p>
</div>
</div>
{% endif %}
{% for answer in question.helpful_replies[0:2] %}
{% if loop.first %}
<div class="other-helpful">
<h2>{{ _('Other Helpful Replies') }}</h2>
{% endif %}
<div class="mini-reply">
<div class="avatar">
<a href="{{ profile_url(answer.creator) }}">
<img src="{{ profile_avatar(answer.creator) }}" height="48" width="48" alt="{{ answer.creator }}"/>
</a>
</div>
<div class="answer">
<p>
<span class="user">{{ answer.creator.username }}:</span>
{{ answer.content_parsed|striptags()|truncate(170) }} <a href="{{ answer.get_absolute_url() }}">{{ _('Read more...') }}</a>
</p>
<div class="stem"></div>{# for the speech bubble arrow #}
</div>
<p class="helpful">
{{ ngettext('{count} out of 1 person found this reply helpful',
'{count} out of {total} people found this reply helpful',
answer.num_votes)|f(count=answer.num_helpful_votes, total=answer.num_votes) }}
</p>
</div>
<div class="answer">
<span class="user" title="{{answer.creator}}">{{ answer.creator.username|truncate(10, True) }}</span>
<span class="votes">{{ 2 * answer.num_helpful_votes - answer.num_votes }}</span>
<p>{{ answer.content_parsed|striptags()|truncate(170) }} <a href="{{ answer.get_absolute_url() }}">{{ _('More...') }}</a></p>
</div>
</div>
{% if loop.last %}
{% if loop.last %}
</div>
{% endif %}
{% endfor %}
</div>
<div class="side-section">
<ul class="actions">
{% if user.has_perm('questions.change_question') or (not question.is_locked and question.creator == user) %}
<li class="edit">
<a href="{{ url('questions.edit_question', question.id) }}">{{ _('Edit this post') }}</a>
</li>
{% endif %}
{% if user.has_perm('questions.delete_question') %}
<li class="delete">
<a class="delete" href="{{ url('questions.delete', question.id) }}">{{ _('Delete this post') }}</a>
</li>
{% endif %}
{% if user.has_perm('questions.lock_question') %}
<li class="lock">
<form class="lock" action="{{ url('questions.lock', question.id) }}" method="post">
{{ csrf() }}
<input type="submit" class="submit" value="{% if question.is_locked %}{{ _('Unlock this post') }}{% else %}{{ _('Lock this post') }}{% endif %}" />
</form>
</li>
{% endif %}
<li class="email">
{% if is_watching(question) %}
<form class="unwatch" action="{{ url('questions.unwatch', question.id) }}" method="post">
{{ csrf() }}
<input type="submit" class="stop" value="{{ _('Stop email updates') }}" />
</form>
{% else %}
<a id="email-subscribe-link" href="#email-subscribe">{{ _('Get email updates') }}</a>
{% include "questions/includes/email_subscribe.html" %}
{% endif %}
</li>
<li class="rss">
<a href="{{ url('questions.answers.feed', question.id) }}">{{ _("Subscribe to feed") }}</a>
</li>
</ul>
<h2>{{ _('System Details') }}</h2>
{% block system_info %}
<ul class="system">
{% if question.metadata.os %}
{% set os = question.metadata.os %}
{% set os_lower = os.lower() %}
<li class="{% if os_lower.find('mac') >= 0 %}mac{% elif os_lower.find('linux') >= 0 %}linux{% elif os_lower.find('win') >= 0 %}windows{% endif %}">{{ os }}</li>
{% endif %}
{% if question.metadata.ff_version %}
<li class="ff">Firefox {{ question.metadata.ff_version }}</li>
{% endif %}
</ul>
{% endblock %}
<p><a id="show-more-details" href="#more-system-details">{{ _('More system details...') }}</a></p>
<section id="more-system-details" class="kbox" title="{{ _('Additional System Details') }}" data-target="#show-more-details" data-modal="true" data-id="more-system-details-kbox">
<h1>{{ _('Additional System Details') }}</h1>
{{ self.system_info() }}
{% if question.metadata.sites_affected %}
<h2>{{ _('Sites Affected') }}</h2>
<p>{{ question.metadata.sites_affected }}</p>
{% endif %}
{% if question.metadata.crash_id %}
<h2>{{ _('Crash ID') }}</h2>
<p>{{ question.metadata.crash_id }}</p>
{% endif %}
{% if question.metadata.frequency %}
<h2>{{ _('This happened') }}</h2>
<p>{{ frequencies[question.metadata.frequency] }}</p>
{% endif %}
{% if question.metadata.started %}
<h2>{{ _('This started when...') }}</h2>
<p>{{ question.metadata.started }}</p>
{% endif %}
{% if question.metadata.troubleshooting %}
<h2>{{ _('More Information') }}</h2>
<p>{{ question.metadata.troubleshooting|trim|collapse_linebreaks|nl2br }}</p>
{% endif %}
{% if question.metadata.plugins %}
<h2>{{ _('Installed Plug-ins') }}</h2>
<div class="plugins">
{{ question.metadata.plugins|wiki_to_html }}
</div>
{% endif %}
{% if question.metadata.useragent %}
<h2>{{ _('User Agent') }}</h2>
<p>{{ question.metadata.useragent }}</p>
{% endif %}
</section>
{% set tags = question.tags.all() %}
{% if tags or can_tag %}
<h2>{{ _('Tags') }}</h2>
<div class="tags"{% if can_tag %} data-tag-vocab-json="{{ tag_vocab }}"{% endif %}{% if can_create_tags %} data-can-create-tags="1"{% endif %}>
{% if can_tag %}
<form action="{{ url('questions.remove_tag', question.id) }}"
data-action-async="{{ url('questions.remove_tag_async', question.id) }}"
method="POST"
class="remove-tag-form">
{{ csrf() }}
{% endif %}
<ul class="tag-list{% if not can_tag %} immutable{% endif %}">
{% for tag in tags %}
<li class="tag">{# -#}
<a class="tag-name" href="{{ url('questions.questions')|urlparams(tagged=tag.slug) }}">{{ tag }}</a>
{%- if can_tag -%}
<input type="submit"
name="remove-tag-{{ tag }}"
value="&#x2716;"
class="remover" />
{%- endif -%}
</li>
{% endfor %}
</ul>
{% if can_tag %}
</form>
{% endif %}
{% if can_tag %}
{% if tag_adding_error %}
<p class="tag-error-message">{{ tag_adding_error }}</p>
{% endif %}
<form action="{{ url('questions.add_tag', question.id) }}"
data-action-async="{{ url('questions.add_tag_async', question.id) }}"
method="POST"
class="tag-adder">
{{ csrf() }}
<input type="text" name="tag-name" size="12"
class="autocomplete-tags {% if tag_adding_error %} invalid{% endif %}"
value="{{ tag_adding_value }}" />
<input class="adder btn" type="submit" value="{{ _('Add') }}" />
</form>
{% endif %}
</div>
{% endif %}
{% endfor %}
<div class="report-reply">
{% if user.has_perm('questions.change_question') or (not question.is_locked and question.creator == user) %}
<span class="edit">
<a href="{{ url('questions.edit_question', question.id) }}">{{ _('Edit this post') }}</a>
</span>
{% endif %}
{% if user.has_perm('questions.lock_question') %}
<form class="lock" action="{{ url('questions.lock', question.id) }}" method="post">
{{ csrf() }}
<input type="submit" class="submit" value="{% if question.is_locked %}{{ _('Unlock this post') }}{% else %}{{ _('Lock this post') }}{% endif %}" />
</form>
{% endif %}
{% if user.has_perm('questions.delete_question') %}
<a class="delete" href="{{ url('questions.delete', question.id) }}">
{{ _('Delete this post') }}
</a>
{% endif %}
{% if user.is_authenticated() and user != question.creator and not question.is_locked %}
<form class="report" action="{{ url('questions.flag', question.id) }}" method="post">
{% include 'questions/includes/flag_form.html' %}
</form>
{% endif %}
{% if not question.is_locked %}
<a class="btn g-btn reply" href="#question-reply">{{ _('Post a New Reply') }}</a>
{% endif %}
</div>
</div>
<div class="side-section">
<ul class="subscribe">
<li class="email">
{% if is_watching(question) %}
<form class="unwatch" action="{{ url('questions.unwatch', question.id) }}" method="post">
{{ csrf() }}
<input type="submit" class="submit" value="{{ _('Stop receiving updates via email') }}" />
</form>
{% else %}
<a id="email-subscribe-link" href="#email-subscribe">{{ _('Receive updates via email') }}</a>
{% include "questions/includes/email_subscribe.html" %}
{% endif %}
</li>
<li class="rss">
<a href="{{ url('questions.answers.feed', question.id) }}">{{ _("Subscribe to this page's feed") }}</a>
</li>
</ul>
<h4>{{ _('System Details') }}</h4>
{% block system_info %}
<ul class="system">
{% if question.metadata.os %}
{% set os = question.metadata.os %}
{% set os_lower = os.lower() %}
<li class="{% if os_lower.find('mac') >= 0 %}mac{% elif os_lower.find('linux') >= 0 %}linux{% elif os_lower.find('win') >= 0 %}windows{% endif %}">{{ os }}</li>
{% endif %}
{% if question.metadata.ff_version %}
<li class="ff">Firefox {{ question.metadata.ff_version }}</li>
{% endif %}
</ul>
{% endblock %}
<p><a id="show-more-details" href="#more-system-details">{{ _('More system details...') }}</a></p>
<section id="more-system-details" class="kbox" title="{{ _('Additional System Details') }}" data-target="#show-more-details" data-modal="true" data-id="more-system-details-kbox">
<h1>{{ _('Additional System Details') }}</h1>
{{ self.system_info() }}
{% if question.metadata.sites_affected %}
<h2>{{ _('Sites Affected') }}</h2>
<p>{{ question.metadata.sites_affected }}</p>
{% endif %}
{% if question.metadata.crash_id %}
<h2>{{ _('Crash ID') }}</h2>
<p>{{ question.metadata.crash_id }}</p>
{% endif %}
{% if question.metadata.frequency %}
<h2>{{ _('This happened') }}</h2>
<p>{{ frequencies[question.metadata.frequency] }}</p>
{% endif %}
{% if question.metadata.started %}
<h2>{{ _('This started when...') }}</h2>
<p>{{ question.metadata.started }}</p>
{% endif %}
{% if question.metadata.troubleshooting %}
<h2>{{ _('More Information') }}</h2>
<p>{{ question.metadata.troubleshooting|trim|collapse_linebreaks|nl2br }}</p>
{% endif %}
{% if question.metadata.plugins %}
<h2>{{ _('Installed Plug-ins') }}</h2>
<div class="plugins">
{{ question.metadata.plugins|wiki_to_html }}
</div>
{% endif %}
{% if question.metadata.useragent %}
<h2>{{ _('User Agent') }}</h2>
<p>{{ question.metadata.useragent }}</p>
{% endif %}
</section>
{% set tags = question.tags.all() %}
{% if tags or can_tag %}
<h4>{{ _('Tags') }}</h4>
<div class="tags"{% if can_tag %} data-tag-vocab-json="{{ tag_vocab }}"{% endif %}{% if can_create_tags %} data-can-create-tags="1"{% endif %}>
{% if can_tag %}
<form action="{{ url('questions.remove_tag', question.id) }}"
data-action-async="{{ url('questions.remove_tag_async', question.id) }}"
method="POST"
class="remove-tag-form">
{{ csrf() }}
{% endif %}
<ul class="tag-list{% if not can_tag %} immutable{% endif %}">
{% for tag in tags %}
<li class="tag">{# -#}
<a class="tag-name" href="{{ url('questions.questions')|urlparams(tagged=tag.slug) }}">{{ tag }}</a>
{%- if can_tag -%}
<input type="submit"
name="remove-tag-{{ tag }}"
value="&#x2716;"
class="remover" />
{%- endif -%}
</li>
{% if related %}
<h2>{{ _('Related Questions') }}</h2>
<ul class="related">
{% for q in related %}
<li><a href="{{ q.get_absolute_url() }}">{{ q.title|truncate(30, True) }}</a></li>
{% endfor %}
</ul>
{% if can_tag %}
</form>
{% endif %}
</div>
</section>
{% if answers.object_list %}
<section id="answers">
<header>
<h1>
{% if question.num_answers > 0 %}
{# L10n: {n} is the number of replies. #}
{{ ngettext('1 reply', '{n} replies', question.num_answers)|f(n=question.num_answers) }}
{% else %}
{{ _('No replies') }}
{% endif %}
{% if can_tag %}
{% if tag_adding_error %}
<p class="tag-error-message">{{ tag_adding_error }}</p>
{% endif %}
<form action="{{ url('questions.add_tag', question.id) }}"
data-action-async="{{ url('questions.add_tag_async', question.id) }}"
method="POST"
class="tag-adder">
{{ csrf() }}
<input type="text" name="tag-name" size="12"
class="autocomplete-tags {% if tag_adding_error %} invalid{% endif %}"
value="{{ tag_adding_value }}" />
<input class="adder btn g-btn" type="submit" value="{{ _('Add') }}" />
</form>
{% endif %}
</div>
{% endif %}
{% if related %}
<h4>{{ _('Related Questions') }}</h4>
<ul class="related">
{% for q in related %}
<li><a href="{{ q.get_absolute_url() }}">{{ q.title|truncate(30, True) }}</a></li>
{% endfor %}
</ul>
{% endif %}
<p><a href="{{ url('questions.questions') }}">{{ _('Browse more Support Questions...') }}</a></p>
</div>
</div>
{% if answers.object_list %}
<ol class="answers">
{% for answer in answers.object_list %}
<li id="answer-{{ answer.id }}" class="{% if answer.creator == question.creator %}author{% endif %}{% if question.solution == answer %} solution{% endif %}">
{% include "questions/includes/answer.html" %}
</li>
{% endfor %}
</ol>
{{ answers|paginator }}
{% endif %}
<div id="question-reply">
<h3>{{ _('Post a Reply') }}</h3>
{% if question.is_locked %}
<div class="user-section"></div>
<div class="main-section">
<p>
{{ _('This question is locked.') }}
</p>
</div>
<div class="side-section"></div>
{% elif user.is_authenticated() %}
<div class="user-section">
<div class="avatar">
<a href="{{ profile_url(user) }}">
<img src="{{ profile_avatar(user) }}" height="48" width="48" alt="{{ user }}"/>
</a>
</div>
<div class="asked-by">
<span class="user" title="{{user}}">{{ user.username|truncate(10, True) }}</span>
</div>
</div>
<div class="main-section">
<form action="{{ url('questions.reply', question_id=question.id) }}#question-reply" method="post" enctype="multipart/form-data">
{{ csrf() }}
{{ errorlist(form) }}
{{ content_editor(form.content) }}
{{ attachments_form('questions.Question', question.pk, images, settings, user) }}
<div class="submit">
<input type="submit" class="btn y-btn" name="preview" value="{{ _('Preview Reply') }}" />
<input type="submit" class="btn g-btn" value="{{ _('Post Reply') }}" />
</div>
</form>
</div>
<div class="side-section"></div>
{% else %}
<div class="user-section"></div>
<div class="main-section">
<p>
{{ _('You must <a href="{url}">log in to your account</a> to reply to posts.')|fe(url=url('users.login')) }}
</p>
<p>
{{ _("Don't have an account? You can <a href='{url}'>create a free account</a> now.")|fe(url=url('users.register')) }}
</p>
</div>
<div class="side-section"></div>
{% endif %}
</div>
{% if answer_preview %}
<div id="answer-preview">
<h3>{{ _('Reply Preview:') }}</h3>
</h1>
<a class="btn btn-important" href="#question-reply">{{ _('Post a Reply') }}</a>
</header>
<ol class="answers">
<li>
{% set answer = answer_preview %}
{% include "questions/includes/answer.html" %}
</li>
{% for answer in answers.object_list %}
<li id="answer-{{ answer.id }}" class="answer">
{% include "questions/includes/answer.html" %}
</li>
{% endfor %}
</ol>
</div>
{% endif %}
{{ answers|paginator }}
</section>
{% endif %}
<section id="question-reply">
<header>
<h1>{{ _('Post a Reply') }}</h1>
</header>
{% if question.is_locked %}
<div class="user-section"></div>
<div class="main-section">
<p>
{{ _('This question is locked.') }}
</p>
</div>
<div class="side-section"></div>
{% elif user.is_authenticated() %}
<div class="user-section">
<div class="avatar self">
<a href="{{ profile_url(user) }}">
<img src="{{ profile_avatar(user) }}" height="48" width="48" alt="{{ user }}"/>
<span>{{ _('You') }}</span>
</a>
</div>
</div>
<div class="main-section">
<form action="{{ url('questions.reply', question_id=question.id) }}#question-reply" method="post" enctype="multipart/form-data">
{{ csrf() }}
{{ errorlist(form) }}
<div class="content">
{{ content_editor(form.content) }}
<div class="stem"></div>{# for the speech bubble arrow #}
</div>
{{ attachments_form('questions.Question', question.pk, images, settings, user) }}
<div class="submit">
<input type="submit" class="btn btn-important" value="{{ _('Post Reply') }}" />
<input type="submit" class="preview" name="preview" value="{{ _('Preview Reply') }}" />
</div>
</form>
</div>
<div class="side-section"></div>
{% else %}
<div class="user-section"></div>
<div class="main-section">
<p>
{{ _('You must <a href="{url}">log in to your account</a> to reply to posts.')|fe(url=url('users.login')) }}
</p>
<p>
{{ _("Don't have an account? You can <a href='{url}'>create a free account</a> now.")|fe(url=url('users.register')) }}
</p>
</div>
<div class="side-section"></div>
{% endif %}
</section>
{% if answer_preview %}
<section id="answer-preview">
<header>
<h1>{{ _('Reply Preview') }}</h1>
</header>
<ol class="answers">
<li class="answer">
{% set answer = answer_preview %}
{% include "questions/includes/answer.html" %}
</li>
</ol>
</section>
{% endif %}
</article>
{% endblock %}
{% block side %}

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

@ -3,74 +3,29 @@
{% set styles = ('questions', 'jqueryui/jqueryui') %}
{% set scripts = ('questions', 'libs/jqueryui') %}
{% block sub_header %}
<hgroup>
<h1><a href="{{ url('questions.questions') }}">{{ _('Firefox Support Forum') }}</a></h1>
<h2>{{ _('The Official Community-Driven Support Web Site for Firefox') }}</h2>
</hgroup>
<div id="support-search" role="search">
<form action="{{ url('search') }}" method="get">
<input type="hidden" name="w" value="2" />{# 2 is support questions #}
<div class="wrap">
<input type="text" class="text" name="q" placeholder="{{ _('Search Mozilla Support') }}" required="required" />
</div>
<noscript>
<input type="submit" class="submit" value="{{ _('Search') }}" />
</noscript>
</form>
</div>
<div id="greeting">
{% if user.is_authenticated() %}
{{ _('Welcome, <span class="user">{user}</span>.')|fe(user=user) }}
<nav>
<a href="{{ profile_url(user) }}">{{ _('Profile') }}</a>
&bull;
<a href="{{ url('users.logout') }}">{{ _('Sign Out') }}</a>
</nav>
{% else %}
<p>
{% trans login_url=url('users.login'), register_url=url('users.register') %}
Want to contribute? <a href="{{ login_url }}">Sign In</a> or <a href="{{ register_url }}">Register</a>
{% endtrans %}
</p>
{% endif %}
</div>
{% endblock %}
{% block above_main %}
{% block filter %}
{% endblock %}
{% endblock %}
{% block outer_side %}
<div id="main-sd">
{% block side %}
<div class="sd-module" id="ask-question-module">
<h3>{{ _("Can't Find an Answer?") }}</h3>
<p>{{ _('Post your question to the support forum. The Firefox community is here to help!') }}</p>
<div class="ask-question">
<a href="{{ url('questions.new_question') }}">
<span class="q">?</span>
{{ _('Ask a Question') }}
</a>
</div>
</div>
{% if top_contributors %}
<div class="sd-module" id="top-contributors">
<h3>{{ _('Top Contributors') }}</h3>
<h4>{{ _('Most Solutions this Week') }}</h4>
<ol>
{% for user in top_contributors %}
<li>{{ user }}</li>
{% endfor %}
</ol>
</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}
{% block breadcrumbs %}
<div id="side">
{% block side %}
<section class="sd-module" id="ask-question-module">
<h1>{{ _("Can't Find an <mark>Answer?</mark>")|safe }}</h1>
<p>{{ _('Post your question to the support forum. The Firefox community is here to help!') }}</p>
<div class="ask-question">
<a class="btn btn-important" href="{{ url('questions.new_question') }}">
{{ _('Ask a Question') }}
</a>
</div>
</section>
{% if top_contributors %}
<section class="sd-module" id="top-contributors">
<h1>{{ _('Top <mark>Contributors</mark>')|safe }}</h1>
<h2>{{ _('Most Solutions this Week') }}</h2>
<ol>
{% for user in top_contributors %}
<li>{{ user }}</li>
{% endfor %}
</ol>
</section>
{% endif %}
{% endblock %}
</div>
{% endblock %}

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

@ -2,24 +2,32 @@
{% extends "questions/base.html" %}
{# L10n: {t} is the title of the question. #}
{% set title = _('Delete Answer | {t} | Firefox Support Forum')|f(t=answer.question.title) %}
{% set crumbs = [(url('questions.questions'), _('Forum')),
(url('questions.answers', answer.question.id), answer.question.title),
(None, _('Delete answer'))] %}
{% block content %}
<div class="to-delete">
<h2>{{ _('Are you sure you want to delete this answer?') }}</h2>
<label>{{ _('Creator') }}</label>
<div>{{ answer.creator }}</div>
<label>{{ _('Date') }}</label>
<div>{{ datetimeformat(answer.created, format='longdatetime') }}</div>
<label>{{ _('Content') }}</label>
<div>{{ answer.content_parsed }}</div>
<article class="main">
<div class="to-delete">
<h1>{{ _('Are you sure you want to delete this answer?') }}</h1>
<label>{{ _('Creator') }}</label>
<div>{{ answer.creator }}</div>
<label>{{ _('Date') }}</label>
<div>{{ datetimeformat(answer.created, format='longdatetime') }}</div>
<label>{{ _('Content') }}</label>
<div>{{ answer.content_parsed }}</div>
<form action="{{ url('questions.delete_answer', answer.question.id, answer.id) }}" method="post">
{{ csrf() }}
<p>
{{ _('You are about to permanently delete this answer. <strong>This cannot be undone!</strong> Are you sure you want to continue?')|safe }}
</p>
<a href="{{ url('questions.answers', answer.question.id) }}">{{ _('Cancel') }}</a>
<input type="submit" class="btn g-btn" value="{{ _('Delete') }}" />
</form>
</div>
<form action="{{ url('questions.delete_answer', answer.question.id, answer.id) }}" method="post">
{{ csrf() }}
<p>
{{ _('You are about to permanently delete this answer. <strong>This cannot be undone!</strong> Are you sure you want to continue?')|safe }}
</p>
<input type="submit" class="btn" value="{{ _('Delete') }}" />
<a href="{{ url('questions.answers', answer.question.id) }}">{{ _('Cancel') }}</a>
</form>
</div>
</article>
{% endblock %}
{% block side %}
{% endblock %}

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

@ -4,16 +4,21 @@
{% set classes = 'questions' %}
{% block content %}
<div class="confirm-question">
<h2>{{ _('Please confirm your email address.') }}</h2>
<p>
{% trans %}
Thank you! Your question will appear on the site as soon as you confirm
your email address. You should receive an email shortly with a link to
confirm.
{% endtrans %}
</p>
<p>{{ _('An email has been sent to the address below:') }}</p>
<p><strong>{{ question.creator.email }}</strong></p>
</div>
<article class="main">
<div class="confirm-question">
<h1>{{ _('Please confirm your email address.') }}</h1>
<p>
{% trans %}
Thank you! Your question will appear on the site as soon as you confirm
your email address. You should receive an email shortly with a link to
confirm.
{% endtrans %}
</p>
<p>{{ _('An email has been sent to the address below:') }}</p>
<p><strong>{{ question.creator.email }}</strong></p>
</div>
</article>
{% endblock %}
{% block side %}
{% endblock %}

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

@ -2,26 +2,34 @@
{% extends "questions/base.html" %}
{# L10n: {t} is the title of the question. #}
{% set title = _('Delete Question | {t} | Firefox Support Forum')|f(t=question.title) %}
{% set crumbs = [(url('questions.questions'), _('Forum')),
(url('questions.answers', question.id), question.title),
(None, _('Delete question'))] %}
{% block content %}
<div class="to-delete">
<h2>{{ _('Are you sure you want to delete this question?') }}</h2>
<label>{{ _('Title') }}</label>
<div class="content">{{ question.title }}</div>
<label>{{ _('Creator') }}</label>
<div>{{ question.creator }}</div>
<label>{{ _('Date') }}</label>
<div>{{ datetimeformat(question.created, format='longdatetime') }}</div>
<label>{{ _('Number of Answers') }}</label>
<div>{{ question.num_answers }}</div>
<article class="main">
<div class="to-delete">
<h1>{{ _('Are you sure you want to delete this question?') }}</h1>
<label>{{ _('Title') }}</label>
<div class="content">{{ question.title }}</div>
<label>{{ _('Creator') }}</label>
<div>{{ question.creator }}</div>
<label>{{ _('Date') }}</label>
<div>{{ datetimeformat(question.created, format='longdatetime') }}</div>
<label>{{ _('Number of Answers') }}</label>
<div>{{ question.num_answers }}</div>
<form action="{{ url('questions.delete', question.id) }}" method="post">
{{ csrf() }}
<p>
{{ _('You are about to permanently delete this question. <strong>This cannot be undone!</strong> Are you sure you want to continue?')|safe }}
</p>
<a href="{{ url('questions.answers', question.id) }}">{{ _('Cancel') }}</a>
<input type="submit" class="btn g-btn" value="{{ _('Delete') }}" />
</form>
</div>
<form action="{{ url('questions.delete', question.id) }}" method="post">
{{ csrf() }}
<p>
{{ _('You are about to permanently delete this question. <strong>This cannot be undone!</strong> Are you sure you want to continue?')|safe }}
</p>
<input type="submit" class="btn" value="{{ _('Delete') }}" />
<a href="{{ url('questions.answers', question.id) }}">{{ _('Cancel') }}</a>
</form>
</div>
</article>
{% endblock %}
{% block side %}
{% endblock %}

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

@ -4,15 +4,20 @@
{% set classes = 'questions' %}
{% block content %}
<div class="confirm-question">
<h2>{{ _('Please confirm that you entered the question below.')}}</h2>
<h3>{{ question.title }}</h3>
<form action="" method="post">
{{ csrf() }}
<div class="submit-or-cancel">
<a href="{{ url('questions.questions') }}">{{ _('Cancel') }}</a>
<input type="submit" value="Confirm"/>
<article class="main">
<div class="confirm-question">
<h1>{{ _('Please confirm that you entered the question below.')}}</h1>
<h2>{{ question.title }}</h2>
<form action="" method="post">
{{ csrf() }}
<div class="submit-or-cancel">
<a href="{{ url('questions.questions') }}">{{ _('Cancel') }}</a>
<input type="submit" value="Confirm"/>
</div>
</form>
</div>
</form>
</div>
</article>
{% endblock %}
{% block side %}
{% endblock %}

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

@ -8,63 +8,67 @@
{% set classes = 'answers' %}
{% block content %}
<div class="edit-answer">
<h2>{{ _('Edit an answer') }}</h2>
<ul class="info">
<li>
<label>{{ _('Created by:') }}</label>
{{ answer.creator }}
</li>
<li>
<label>{{ _('Created:') }}</label>
{{ datetimeformat(answer.created, format='longdatetime') }}
</li>
{% if answer.updated_by %}
<article class="main">
<div class="edit-answer">
<h2>{{ _('Edit an answer') }}</h2>
<ul class="info">
<li>
<label>{{ _('Last updated by:') }}</label>
{{ answer.updated_by }}
<label>{{ _('Created by:') }}</label>
{{ answer.creator }}
</li>
<li>
<label>{{ _('Last updated:') }}</label>
{{ datetimeformat(answer.updated, format='longdatetime') }}
<label>{{ _('Created:') }}</label>
{{ datetimeformat(answer.created, format='longdatetime') }}
</li>
{% endif %}
<li>
<label>{{ _('Question:') }}</label>
{{ answer.question.title }}
</li>
</ul>
<form action="{{ url('questions.edit_answer', answer.question.id, answer.id) }}" method="post">
{{ csrf() }}
{{ errorlist(form) }}
<div class="form-widget{% if form.content.errors %} invalid{% endif %}">
{{ content_editor(form.content) }}
</div>
{{ attachments_form('questions.Answer', answer.pk, answer.images.all(), settings, request.user) }}
<div class="form-widget submit">
<a href="{{ url('questions.answers', answer.question.id) }}">{{ _('Cancel') }}</a>
<input type="submit" class="btn y-btn" name="preview" value="{{ _('Preview Reply') }}" />
<input type="submit" class="btn g-btn" value="{{ _('Update answer') }}" />
</div>
</form>
{% if answer_preview %}
<div id="answer-preview">
<h3>{{ _('Answer Preview:') }}</h3>
<ol class="answers">
{% if answer.updated_by %}
<li>
{% set answer = answer_preview %}
{% set question = answer.question %}
{% include "questions/includes/answer.html" %}
<label>{{ _('Last updated by:') }}</label>
{{ answer.updated_by }}
</li>
</ol>
</div>
{% endif %}
</div>
<li>
<label>{{ _('Last updated:') }}</label>
{{ datetimeformat(answer.updated, format='longdatetime') }}
</li>
{% endif %}
<li>
<label>{{ _('Question:') }}</label>
{{ answer.question.title }}
</li>
</ul>
<form action="{{ url('questions.edit_answer', answer.question.id, answer.id) }}" method="post">
{{ csrf() }}
{{ errorlist(form) }}
<div class="form-widget{% if form.content.errors %} invalid{% endif %}">
{{ content_editor(form.content) }}
</div>
{{ attachments_form('questions.Answer', answer.pk, answer.images.all(), settings, request.user) }}
<div class="form-widget submit">
<input type="submit" class="btn" value="{{ _('Update answer') }}" />
<input type="submit" class="preview" name="preview" value="{{ _('Preview Reply') }}" />
<a href="{{ url('questions.answers', answer.question.id) }}">{{ _('Cancel') }}</a>
</div>
</form>
{% if answer_preview %}
<section id="answer-preview">
<header>
<h1>{{ _('Answer Preview:') }}</h1>
</header>
<ol class="answers">
<li class="answer">
{% set answer = answer_preview %}
{% set question = answer.question %}
{% include "questions/includes/answer.html" %}
</li>
</ol>
</section>
{% endif %}
</div>
</article>
{% endblock %}
{% block side %}
{% endblock %}
{% endblock %}

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

@ -1,7 +1,7 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "questions/includes/question_editing_frame.html" %}
{% set title = _('Edit a Question') %}
{% set crumbs = [(url('questions.questions'), _('Questions')),
{% set crumbs = [(url('questions.questions'), _('Forum')),
(url('questions.answers', question.id), question.title),
(None, _('Edit a question'))] %}

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

@ -1,26 +1,26 @@
{% from "upload/attachments.html" import attachment %}
<div class="user-section">
<div class="avatar">
<div class="avatar{% if user == answer.creator %} self{% endif %}{% if question.creator == answer.creator %} owner{% endif %}">
<a href="{{ profile_url(answer.creator) }}">
<img src="{{ profile_avatar(answer.creator) }}" height="48" width="48" alt="{{ answer.creator }}"/>
{% if user == answer.creator %}
<span>{{ _('You') }}</span>
{% elif question.creator == answer.creator %}
<span>{{ _('Owner') }}</span>
{% endif %}
</a>
</div>
<div class="answered-by">
<span class="user" title="{{answer.creator}}">{{ answer.creator.username|truncate(10, True) }}</span>
{% if answer.creator==question.creator %}
<span class="author">{{ _('Author') }}</span>
{% else %}
<span class="posts">{{ _('{numposts} posts')|f(numposts=answer.creator_num_posts) }}</span>
<span class="answers">{{ _('{numanswers} answers')|f(numanswers=answer.creator_num_answers) }}</span>
{% endif %}
<div class="asked-by">
<a href="{{ profile_url(answer.creator) }}">{{ answer.creator }}</a>
</div>
<div class="asked-on">
{{ question.created|timesince }}
</div>
</div>
<div class="main-section">
<p class="posted">
{{ _('Posted {datetime}:')|fe(datetime=datetimeformat(answer.created, format='longdatetime')) }}
</p>
<div class="content">
{{ answer.content_parsed|safe }}
<div class="stem"></div>{# for the speech bubble arrow #}
</div>
<div class="ans-attachments attachments-list">
{% for image in answer.images.all() %}
@ -32,11 +32,21 @@
{{ _('Modified {datetime} by {name}')|fe(name=answer.updated_by.username, datetime=datetimeformat(answer.updated, format='longdatetime')) }}
</p>
{% endif %}
{% if answer.id and not question.is_locked %}
<div class="reply">
<a href="#question-reply">{{ _('Reply to this post') }}</a>
</div>
{% endif %}
<div class="meta">
{% if question.solution == answer %}
<span class="solved">{{ _('Solution chosen by {author}')|f(author=question.creator) }}</span>
{% endif %}
{% if answer.num_votes != 0 %}
<span class="helpful">
{{ ngettext('{count} out of 1 person found this reply helpful',
'{count} out of {total} people found this reply helpful',
answer.num_votes)|f(count=answer.num_helpful_votes, total=answer.num_votes) }}
</span>
{% endif %}
{% if answer.id and not question.is_locked %}
<a class="reply" href="#question-reply">{{ _('Reply') }}</a>
{% endif %}
</div>
</div>
<div class="side-section">
{% if answer.creator != question.creator %}
@ -45,43 +55,35 @@
<h4>{{ _('Did this solve your problem?') }}</h4>
<form class="helpful" action="{{ url('questions.solution', question_id=question.id, answer_id=answer.id) }}" method="post">
{{ csrf() }}
<input type="submit" class="btn g-btn" name="solution" value="{{ _('Solved It') }}" />
<input type="submit" class="btn" name="solution" value="{{ _('Solved It') }}" />
</form>
{% elif not answer.has_voted(request) and user != question.creator and user != answer.creator %}
<h4>{{ _('Was this reply helpful?') }}</h4>
<form class="helpful" action="{{ url('questions.answer_vote', question_id=question.id, answer_id=answer.id) }}" method="post">
{{ csrf() }}
<input type="submit" class="btn g-btn" name="helpful" value="{{ _('Helpful') }}" />
<input type="submit" class="btn g-btn" name="not-helpful" value="{{ _('Not Helpful') }}" />
<input type="submit" class="btn" name="helpful" value="{{ _('Helpful') }}" />
<input type="submit" class="btn" name="not-helpful" value="{{ _('Not Helpful') }}" />
</form>
{% endif %}
{% endif %}
{% if question.solution == answer %}
<div class="solved">{{ _('Solution chosen by author') }}</div>
{% endif %}
{% if answer.num_votes != 0 %}
<div class="helpful {% if answer.num_helpful_votes == 0 %}zero{% endif %}">
{{ ngettext('<mark>{count} out of {total} person</mark> <span>found this reply helpful</span>',
'<mark>{count} out of {total} people</mark> <span>found this reply helpful</span>',
answer.num_votes)|fe(count=answer.num_helpful_votes, total=answer.num_votes) }}
</div>
{% endif %}
{% endif %}
<ul class="actions">
{% if answer.id and not question.is_locked and has_perm_or_owns('questions.change_answer', answer, answer) %}
<li class="edit">
<a href="{{ url('questions.edit_answer', question.id, answer.id) }}">{{ _('Edit this post') }}</a>
</li>
{% endif %}
{% if answer.id and user.has_perm('questions.delete_answer') %}
<li class="delete">
<a href="{{ url('questions.delete_answer', question.id, answer.id) }}">{{ _('Delete this post') }}</a>
</li>
{% endif %}
</ul>
{% if user.is_authenticated() and user != answer.creator and not question.is_locked %}
<form class="report" action="{{ url('questions.answer_flag', question.id, answer.id) }}" method="post">
{% include 'questions/includes/flag_form.html' %}
</form>
{% endif %}
{% if answer.id and not question.is_locked and has_perm_or_owns('questions.change_answer', answer, answer) %}
<a class="edit" href="{{ url('questions.edit_answer', question.id, answer.id) }}">
{{ _('Edit this post') }}
</a>
{% endif %}
{% if answer.id and user.has_perm('questions.delete_answer') %}
<a class="delete" href="{{ url('questions.delete_answer', question.id, answer.id) }}">
{{ _('Delete this post') }}
</a>
{% endif %}
</div>

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

@ -14,7 +14,7 @@
{{ watch_form.email|safe }}
{% endif %}
{{ watch_form.event_type|safe }}
<input type="submit" class="btn g-btn" value="{{ _('Send Updates') }}" />
<input type="submit" class="btn" value="{{ _('Send Updates') }}" />
<span class="cancel">
<a class="kbox-cancel" href="{{ question.get_absolute_url() }}">{{ _('Cancel') }}</a>
</span>

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

@ -6,4 +6,4 @@
<option value="other">{{ _('Other (please specify)') }}</option>
</select>
<input type="text" class="text" name="other" />
<input type="submit" class="submit" value="{{ _('Report this post') }}" />
<input type="submit" class="submit" value="{{ _('Report Abuse') }}" />

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

@ -1,16 +1,6 @@
{% set num_votes = question.num_votes %}
{% if num_votes == 0 %}
{% set classname="nobody" %}
{% elif num_votes == 1 %}
{% set classname="just-one" %}
{% elif num_votes < 10 %}
{% set classname="less-ten" %}
{% elif num_votes >= 10 %}
{% set classname="more-ten" %}
{% endif %}
<div class="have-problem {{ classname }}">
{{ ngettext('<mark>{count} person</mark> <span>has this problem</span>',
<div class="have-problem">
{{ ngettext('<mark>1 person</mark> <span>has this problem</span>',
'<mark>{count} people</mark> <span>have this problem</span>',
num_votes)|fe(count=num_votes) }}
<span class="recent">{{ _('<strong>{count} new</strong> this week')|fe(count=question.num_votes_past_week) }}</span>
question.num_votes)|fe(count=question.num_votes ) }}
<span class="recent">{{ _('{count} new this week')|f(count=question.num_votes_past_week) }}</span>
</div>

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

@ -15,95 +15,97 @@ we can compute the edit-title URL.
{% set classes = 'new-question' %}
{% block content %}
<div id="ask-question">
<h1>{% block headline %}Do Something to a Question{% endblock %}</h1>
<div class="inner-wrap">
<article class="main">
<div id="ask-question">
<h1>{% block headline %}Do Something to a Question{% endblock %}</h1>
<div class="inner-wrap">
{% block product %}
{% if current_product %}
<div class="selected">
<label>{{ _('Firefox Product') }}:</label>
<span>{{ current_product.name }}</span>
{% block product_changer %}
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% block category %}
{% if current_product and current_category %}
<div class="selected">
<label>Category:</label>
<span>{{ current_category.name }}</span>
{% block category_changer %}
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% block articles_and_search_results %}
{% endblock %}
{% if form %}
<form id="question-form" action="" method="post">
{{ csrf() }}
{% block major_detail_instructions %}
<h2>Do some stuff.</h2>
{% endblock %}
<h3>{{ _('The more information you can provide, the better the chance your question will be answered.') }}</h3>
{{ errorlist(form) }}
{% for field in form.hidden_fields() %}
{{ field|safe }}
{% endfor %}
<ol>
{% set li_class='' %}
{% for field in form.visible_fields() %}
{% if field.name == 'ff_version' %}
<li class="system-details-info show">
<p>
{{ _("We've made some educated guesses about your current browser and operating system.") }}
<a href="#show-details" class="show">{{ _('Show details &raquo;')|safe }}</a>
<a href="#hide-details" class="hide">{{ _('Hide details &raquo;')|safe }}</a>
</p>
</li>
{% set li_class='details' %}
{% block product %}
{% if current_product %}
<div class="selected">
<label>{{ _('Firefox Product') }}:</label>
<span>{{ current_product.name }}</span>
{% block product_changer %}
{% endblock %}
</div>
{% endif %}
{% endblock %}
<li class="{{ li_class }} {% if field.errors %}invalid{% endif %}">
{{ field.label_tag()|safe }}
{% block category %}
{% if current_product and current_category %}
<div class="selected">
<label>Category:</label>
<span>{{ current_category.name }}</span>
{% block category_changer %}
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% if field.name == 'title' and not request.GET.edit_title %}
<div id="title-val">
<span title="{{ _('Click to change your question') }}">
{% if form.initial %}{{ form.initial.title }}{% else %}{{ form.title.data }}{% endif %}
</span>
<a href="{{ ''|urlparams(product=current_product.key, category=current_category.key, showform=1, search=request.GET.search, edit_title=1) }}#question-form">edit</a>
{{ field.as_hidden()|safe }}
</div>
{% elif field.name == 'content' %}
{{ content_editor(field) }}
{% else %}
{% block articles_and_search_results %}
{% endblock %}
{% if form %}
<form id="question-form" action="" method="post">
{{ csrf() }}
{% block major_detail_instructions %}
<h2>Do some stuff.</h2>
{% endblock %}
<h3>{{ _('The more information you can provide, the better the chance your question will be answered.') }}</h3>
{{ errorlist(form) }}
{% for field in form.hidden_fields() %}
{{ field|safe }}
{% endif %}
{% endfor %}
<ol>
{% set li_class='' %}
{% for field in form.visible_fields() %}
{% if field.help_text %}
<p class="help-text">{{ field.help_text|safe }}</p>
{% endif %}
</li>
{% if field.name == 'ff_version' %}
<li class="system-details-info show">
<p>
{{ _("We've made some educated guesses about your current browser and operating system.") }}
<a href="#show-details" class="show">{{ _('Show details &raquo;')|safe }}</a>
<a href="#hide-details" class="hide">{{ _('Hide details &raquo;')|safe }}</a>
</p>
</li>
{% set li_class='details' %}
{% endif %}
{% endfor %}
<li class="{{ li_class }} {% if field.errors %}invalid{% endif %}">
{{ field.label_tag()|safe }}
<li class="submit">
<input type="submit" class="btn g-btn" value="{% block submit_button_value %}Save Question{% endblock %}" />
{% block more_submit_buttons %}{% endblock %}
</li>
</ol>
</form>
{% endif %}
{% if field.name == 'title' and not request.GET.edit_title %}
<div id="title-val">
<span title="{{ _('Click to change your question') }}">
{% if form.initial %}{{ form.initial.title }}{% else %}{{ form.title.data }}{% endif %}
</span>
<a href="{{ ''|urlparams(product=current_product.key, category=current_category.key, showform=1, search=request.GET.search, edit_title=1) }}#question-form">edit</a>
{{ field.as_hidden()|safe }}
</div>
{% elif field.name == 'content' %}
{{ content_editor(field) }}
{% else %}
{{ field|safe }}
{% endif %}
</div>
</div>
{% if field.help_text %}
<p class="help-text">{{ field.help_text|safe }}</p>
{% endif %}
</li>
{% endfor %}
<li class="submit">
<input type="submit" class="btn btn-important" value="{% block submit_button_value %}Save Question{% endblock %}" />
{% block more_submit_buttons %}{% endblock %}
</li>
</ol>
</form>
{% endif %}
</div>
</div>
</article>
{% endblock %}
{% block side %}

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

@ -20,7 +20,7 @@
{{ watch_form.email|safe }}
{% endif %}
<input type="submit" class="btn g-btn" value="{{ _('Send Updates') }}" />
<input type="submit" class="btn" value="{{ _('Send Updates') }}" />
<a class="no-thanks kbox-cancel" href="{{ question.get_absolute_url() }}">{{ _('No Thanks') }}</a>
</form>
</section>

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

@ -1,6 +1,8 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "questions/includes/question_editing_frame.html" %}
{% set title = _('Ask a Question') %}
{% set crumbs = [(url('questions.questions'), _('Forum')),
(None, _('Ask a New Question'))] %}
{% block headline %}{{ _('Ask a New Question') }}{% endblock %}
@ -80,7 +82,7 @@
<input type="hidden" name="product" value="{{ current_product.key }}" />
<input type="hidden" name="category" value="{{ current_category.key }}" />
<input type="text" class="question" name="search" value="{{ request.GET.search }}" />
<input type="submit" class="btn g-btn" value="Ask this" />
<input type="submit" class="btn btn-important" value="{{ _('Ask this') }}" />
</form>
{% endif %}
@ -108,7 +110,7 @@
<input type="hidden" name="category" value="{{ current_category.key }}" />
<input type="hidden" name="search" value="{{ request.GET.search }}" />
<input type="hidden" name="showform" value="1" />
<input type="submit" id="show-form-btn" class="btn y-btn" value="{{ button_text }}" />
<input type="submit" id="show-form-btn" class="btn" value="{{ button_text }}" />
</form>
{% endif %}

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

@ -7,48 +7,48 @@
{# TODO: make these macros: register_form, login_form #}
{% block articles_and_search_results %}
<h2>{{ _('Before you continue, we ask you to create a support account so we can contact you.') }}</h2>
<p>{{ _('A support account lets us alert you when people respond to your question.') }}</p>
<div id="register_form">
<h2>{{ _('Create an account') }}</h2>
{{ errorlist(register_form) }}
<form method="post" action="">
{{ csrf() }}
<ul>
{% for field in register_form %}
<li>{{ field|label_with_help }} {{ field|safe }}</li>
{% endfor %}
</ul>
<div class="submit">
<input type="hidden" value="register" name="type" />
<input type="submit" class="btn y-btn" value="{{ _('Register') }}" />
</div>
</form>
</div>
<h2>{{ _('Before you continue, we ask you to create a support account so we can contact you.') }}</h2>
<p>{{ _('A support account lets us alert you when people respond to your question.') }}</p>
<div id="register_form">
<h2>{{ _('Create an account') }}</h2>
{{ errorlist(register_form) }}
<form method="post" action="">
{{ csrf() }}
<ul>
{% for field in register_form %}
<li>{{ field|label_with_help }} {{ field|safe }}</li>
{% endfor %}
</ul>
<div class="submit">
<input type="hidden" value="register" name="type" />
<input type="submit" class="btn" value="{{ _('Register') }}" />
</div>
</form>
</div>
<div id="login_form">
<h2>{{ _('I already have an account') }}</h2>
{{ errorlist(login_form) }}
<form method="post" action="">
{{ csrf() }}
<input type="hidden" name="next" value="{{ next_url }}" />
<ul>
<li>
<label for="id_username">{{ _('Username:') }}</label>
<input id="id_username" type="text" name="username" autofocus />
</li>
<li>
<label for="id_password">{{ _('Password:') }}</label>
{{ login_form.password|safe }}
</li>
</ul>
<div class="submit">
<input type="hidden" value="login" name="type" />
<input type="submit" class="btn g-btn" value="{{ _('Log in') }}" data-progress="{{ _('Logging in...') }}" data-done="{{ _('Logged in!') }}" data-reset="{{ _('Log in') }}" />
</div>
</form>
<a id="reset_password" target="_blank" href="{{ url('users.pw_reset') }}">{{ _("I forgot my password.") }}</a>
</div>
<div id="login_form">
<h2>{{ _('I already have an account') }}</h2>
{{ errorlist(login_form) }}
<form method="post" action="">
{{ csrf() }}
<input type="hidden" name="next" value="{{ next_url }}" />
<ul>
<li>
<label for="id_username">{{ _('Username:') }}</label>
<input id="id_username" type="text" name="username" autofocus />
</li>
<li>
<label for="id_password">{{ _('Password:') }}</label>
{{ login_form.password|safe }}
</li>
</ul>
<div class="submit">
<input type="hidden" value="login" name="type" />
<input type="submit" class="btn" value="{{ _('Log in') }}" data-progress="{{ _('Logging in...') }}" data-done="{{ _('Logged in!') }}" data-reset="{{ _('Log in') }}" />
</div>
</form>
<a id="reset_password" target="_blank" href="{{ url('users.pw_reset') }}">{{ _("I forgot my password.") }}</a>
</div>
{% endblock %}
{% block submit_button_value %}{{ _('Post Question') }}{% endblock %}

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

@ -3,87 +3,90 @@
{# TODO: Make the title and other references to FF configurable. #}
{% set title = _('Firefox Support Forum') %}
{% set classes = 'questions' %}
{% set crumbs = [(None, _('Forum'))] %}
{% block filter %}
{% if tags %}
<div id="tagged">
<label>{{ _('Questions Tagged:') }}</label>
{% for tag in tags %}
<a href="{{ url('questions.questions')|urlparams(tagged=tag.slug, filter=filter, sort=sort) }}">{{ tag.name }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
<a class="show-all" href="{{ url('questions.questions')|urlparams(filter=filter, sort=sort) }}">{{ _('Show All Questions') }}</a>
</div>
{% endif %}
<div id="filter">
<ul>
<li{% if not sort %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter=filter, tagged=tagged) }}">{{ _('Most Recent') }}</a>
</li>
<li{% if sort == 'requested' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(sort='requested', filter=filter, tagged=tagged) }}">{{ _('Most Requested') }}</a>
</li>
<li class="separator">|</li>
<li{% if not filter %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(sort=sort, tagged=tagged) }}">{{ _('All') }}</a>
</li>
<li{% if filter == 'unsolved' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='unsolved', sort=sort, tagged=tagged) }}">{{ _('Unsolved') }}</a>
</li>
<li{% if filter == 'solved' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='solved', sort=sort, tagged=tagged) }}">{{ _('Solved') }}</a>
</li>
<li{% if filter == 'no-replies' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='no-replies', sort=sort, tagged=tagged) }}">{{ _('No Replies') }}</a>
</li>
{% if user.is_authenticated() %}
<li{% if filter == 'my-contributions' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='my-contributions', sort=sort, tagged=tagged) }}">{{ _('My Contributions') }}</a>
</li>
{% endif %}
</ul>
</div>
{% block above_main %}
<hgroup>
<h1><a href="{{ url('questions.questions') }}">{{ _('Firefox Support Forum') }}</a></h1>
<h2>{{ _('The Official Community-Driven Support Web Site for Firefox') }}</h2>
</hgroup>
{% endblock %}
{% block content %}
{% if tags %}
<div id="tagged">
{{ _('Showing questions tagged:') }}
{% set comma = joiner(', ') %}
{% for tag in tags %}{{ comma() }}
<a href="{{ url('questions.questions')|urlparams(tagged=tag.slug, filter=filter, sort=sort) }}">{{ tag.name }}</a>{% endfor %}
<a class="show-all" href="{{ url('questions.questions')|urlparams(filter=filter, sort=sort) }}">{{ _('Show all questions') }}</a>
</div>
{% endif %}
<div id="filter">
{{ _('Sort:') }}
<ul>
<li{% if not sort %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter=filter, tagged=tagged) }}">{{ _('Most Recent') }}</a>
</li>
<li{% if sort == 'requested' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(sort='requested', filter=filter, tagged=tagged) }}">{{ _('Most Requested') }}</a>
</li>
</ul>
{{ _('Show:') }}
<ul>
<li{% if not filter %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(sort=sort, tagged=tagged) }}">{{ _('All') }}</a>
</li>
<li{% if filter == 'unsolved' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='unsolved', sort=sort, tagged=tagged) }}">{{ _('Unsolved') }}</a>
</li>
<li{% if filter == 'solved' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='solved', sort=sort, tagged=tagged) }}">{{ _('Solved') }}</a>
</li>
<li{% if filter == 'no-replies' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='no-replies', sort=sort, tagged=tagged) }}">{{ _('No Replies') }}</a>
</li>
{% if user.is_authenticated() %}
<li{% if filter == 'my-contributions' %} class="active"{% endif %}>
<a href="{{ url('questions.questions')|urlparams(filter='my-contributions', sort=sort, tagged=tagged) }}">{{ _('My Contributions') }}</a>
</li>
{% endif %}
</ul>
</div>
{% if questions.object_list %}
<ol class="questions">
{% for question in questions.object_list %}
<li id="question-{{ question.id }}" class="question">
{% include 'questions/includes/have_problem.html' %}
<div class="title">
<div class="content">
<h2><a href="{{ question.get_absolute_url() }}">{{ question.title }}</a></h2>
<p>{{ question.content_parsed|striptags()|truncate(170) }}</p>
<div class="stem"></div>
</div>
<div class="user-meta">
<div class="user">{{ question.creator }}</div>
<div class="date">{{ datetimeformat(question.created, format='longdatetime') }}</div>
{% include 'questions/includes/have_problem.html' %}
</div>
<div class="thread-meta">
{% if question.solution %}
<span class="badge solved">{{ _('Solved') }}</span>
{% elif question.num_answers > 0 %}
{# L10n: {n} is the number of replies. #}
<span class="badge replies">{{ ngettext('{n} reply', '{n} replies', question.num_answers)|fe(n=question.num_answers) }}</span>
<span class="solved">{{ _('Solved') }}</span>
{% endif %}
<span><a class="replies" href="{{ question.get_absolute_url()|urlparams(hash='answers') }}">
{% if question.num_answers > 0 %}
{# L10n: {n} is the number of replies. #}
{{ ngettext('1 reply', '{n} replies', question.num_answers)|f(n=question.num_answers) }}
{% else %}
{{ _('No replies') }}
{% endif %}
</a></span>
{% if question.is_locked %}
<span class="badge locked">{{ _('Locked') }}</span>
<span class="locked">{{ _('Locked') }}</span>
{% endif %}
{% if question.is_contributor(user) %}
<span class="badge contributed">{{ _('Contributed') }}</span>
{% endif %}
</div>
<div class="asked-by">
{{ _('Asked by <span class="user">{user}</span>')|fe(user=question.creator) }}
{{ datetimeformat(question.created, format='longdatetime') }}
</div>
<p>{{ question.content_parsed|striptags()|truncate(170) }}</p>
<div class="meta">
{% set bullet = joiner("&bull;") %}
{% if question.metadata.ff_version %}
{{ bullet()|safe }}
<span>Firefox {{ question.metadata.ff_version }}</span>
{% endif %}
{% if question.metadata.os %}
{{ bullet()|safe }}
<span>{{ question.metadata.os }}</span>
<span class="contributed">{{ _('Contributed') }}</span>
{% endif %}
{% set tags = question.tags.all() %}
{% if tags %}
{{ bullet()|safe }}
{{ _('Tagged') }}
<ul class="tag-list immutable">
{% for tag in tags %}
<li><a class="tag-name" href="{{ url('questions.questions')|urlparams(tagged=tag.slug, filter=filter, sort=sort) }}">{{ tag }}</a></li>

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

@ -126,7 +126,8 @@ class AnswersTemplateTestCase(TestCaseBase):
args=[self.question.id, answer.id])
doc = pq(response.content)
eq_(1, len(doc('div.solution')))
eq_('answer-%s' % answer.id, doc('li.solution')[0].attrib['id'])
li = doc('span.solved')[0].getparent().getparent().getparent()
eq_('answer-%s' % answer.id, li.attrib['id'])
self.question.solution = None
self.question.save()
@ -212,14 +213,16 @@ class AnswersTemplateTestCase(TestCaseBase):
args=[self.question.id])
doc = pq(response.content)
eq_('1 out of 1 person', doc('#answer-1 div.helpful mark')[0].text)
eq_('1 out of 1 person found this reply helpful',
doc('#answer-1 span.helpful')[0].text.strip())
eq_(0, len(doc('form.helpful input[name="helpful"]')))
# Voting again (same user) should not increment vote count
post(self.client, 'questions.answer_vote', {'helpful': 'y'},
args=[self.question.id, self.answer.id])
doc = pq(response.content)
eq_('1 out of 1 person', doc('#answer-1 div.helpful mark')[0].text)
eq_('1 out of 1 person found this reply helpful',
doc('#answer-1 span.helpful')[0].text.strip())
def test_answer_authenticated_vote(self):
"""Authenticated user answer vote."""
@ -238,31 +241,6 @@ class AnswersTemplateTestCase(TestCaseBase):
# Common vote test
self.common_answer_vote()
def test_answer_score(self):
"""Test the helpful replies score."""
self.client.logout()
# A helpful vote
post(self.client, 'questions.answer_vote', {'helpful': 'y'},
args=[self.question.id, self.answer.id])
# Verify score (should be 1)
response = get(self.client, 'questions.answers',
args=[self.question.id])
doc = pq(response.content)
eq_('1', doc('div.other-helpful span.votes')[0].text)
# A non-helpful vote
self.client.login(username='rrosario', password='testpass')
post(self.client, 'questions.answer_vote', {'not-helpful': 'y'},
args=[self.question.id, self.answer.id])
# Verify score (should be 0 now)
response = get(self.client, 'questions.answers',
args=[self.question.id])
doc = pq(response.content)
eq_('0', doc('div.other-helpful span.votes')[0].text)
def test_delete_question_without_permissions(self):
"""Deleting a question without permissions is a 403."""
self.client.login(username='tagger', password='testpass')
@ -350,7 +328,7 @@ class AnswersTemplateTestCase(TestCaseBase):
response = get(self.client, 'questions.answers',
args=[self.question.id])
doc = pq(response.content)
eq_(0, len(doc('ol.answers a.edit')))
eq_(0, len(doc('ol.answers li.edit')))
answer = self.question.last_answer
response = get(self.client, 'questions.edit_answer',
@ -372,7 +350,7 @@ class AnswersTemplateTestCase(TestCaseBase):
response = get(self.client, 'questions.answers',
args=[self.question.id])
doc = pq(response.content)
eq_(1, len(doc('ol.answers a.edit')))
eq_(1, len(doc('ol.answers li.edit')))
answer = self.question.last_answer
response = get(self.client, 'questions.edit_answer',
@ -393,7 +371,7 @@ class AnswersTemplateTestCase(TestCaseBase):
response = get(self.client, 'questions.answers',
args=[self.question.id])
doc = pq(response.content)
eq_(0, len(doc('ol.answers a.edit')))
eq_(0, len(doc('ol.answers li.edit')))
# Add an answer and verify the edit link shows up
content = 'lorem ipsum dolor sit amet'
@ -401,9 +379,9 @@ class AnswersTemplateTestCase(TestCaseBase):
{'content': content},
args=[self.question.id])
doc = pq(response.content)
eq_(1, len(doc('ol.answers a.edit')))
eq_(1, len(doc('ol.answers li.edit')))
new_answer = self.question.answers.order_by('-created')[0]
eq_(1, len(doc('#answer-%s a.edit' % new_answer.id)))
eq_(1, len(doc('#answer-%s li.edit' % new_answer.id)))
# Make sure it can be edited
content = 'New content for answer'
@ -450,14 +428,13 @@ class AnswersTemplateTestCase(TestCaseBase):
eq_(200, response.status_code)
eq_(True, Question.objects.get(pk=q.pk).is_locked)
doc = pq(response.content)
eq_(1, len(doc('#question div.badges span.locked')))
eq_('This question is locked.',
doc('#question-reply div.main-section p').text())
# now unlock it
response = post(self.client, 'questions.lock', args=[q.id])
eq_(200, response.status_code)
eq_(False, Question.objects.get(pk=q.pk).is_locked)
doc = pq(response.content)
eq_(0, len(doc('#question div.badges span.locked')))
def test_reply_to_locked_question_403(self):
"""Locked questions can't be answered."""
@ -778,7 +755,7 @@ class QuestionsTemplateTestCase(TestCaseBase):
def test_all_filter_highlight(self):
response = get(self.client, 'questions.questions')
doc = pq(response.content)
eq_('active', doc('div#filter ul li')[3].attrib['class'])
eq_('active', doc('div#filter ul li')[2].attrib['class'])
eq_('question-1', doc('ol.questions li')[0].attrib['id'])
def test_no_reply_filter(self):
@ -795,7 +772,7 @@ class QuestionsTemplateTestCase(TestCaseBase):
filter='solved')
response = self.client.get(url_)
doc = pq(response.content)
eq_('active', doc('div#filter ul li')[5].attrib['class'])
eq_('active', doc('div#filter ul li')[4].attrib['class'])
eq_(0, len(doc('ol.questions li')))
# solve one question then verify that it shows up
@ -814,7 +791,7 @@ class QuestionsTemplateTestCase(TestCaseBase):
filter='unsolved')
response = self.client.get(url_)
doc = pq(response.content)
eq_('active', doc('div#filter ul li')[4].attrib['class'])
eq_('active', doc('div#filter ul li')[3].attrib['class'])
eq_(4, len(doc('ol.questions li')))
# solve one question then verify that it doesn't show up
@ -832,7 +809,7 @@ class QuestionsTemplateTestCase(TestCaseBase):
self.client.login(username=username, password="testpass")
response = self.client.get(url_)
doc = pq(response.content)
eq_('active', doc('div#filter ul li')[7].attrib['class'])
eq_('active', doc('div#filter ul li')[6].attrib['class'])
eq_(expected_qty, len(doc('ol.questions li')))
def test_my_contributions_filter(self):

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

@ -42,7 +42,7 @@
style="height:{{ settings.THUMBNAIL_SIZE }}px;width:{{ settings.THUMBNAIL_SIZE }}px"></div>
</div>
<noscript>
<input type="submit" name="delete_images" class="btn g-btn image-delete"
<input type="submit" name="delete_images" class="btn image-delete"
value="{{ _('Delete selected images') }}"/>
</noscript>
</div>
@ -52,7 +52,7 @@
accept="{{ settings.IMAGE_ALLOWED_MIMETYPES }}"
title="{{ _('Browse for an image to upload.') }}"/>
<noscript>
<input type="submit" name="upload_image" class="btn g-btn"
<input type="submit" name="upload_image" class="btn"
value="{{ _('Upload') }}"/>
</noscript>
</div>

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

@ -21,7 +21,7 @@
</p>
<div class="form-actions">
<a href="{{ url('users.edit_profile') }}">{{ _('Cancel') }}</a>
<input type="submit" class="btn g-btn" value="{{ _('Delete avatar') }}" />
<input type="submit" class="btn" value="{{ _('Delete avatar') }}" />
</div>
</form>
</article>

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

@ -16,7 +16,7 @@
/*----------------------------------
Global
----------------------------------*/
article, nav, section {
article, header, hgroup, footer, nav, section {
display: block;
}
@ -43,9 +43,13 @@ a:link, a:visited, a:active {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1, h2, h3, h4, h5, h6 {
color: #303030;
font-weight: normal;
color: #303030;
font-weight: normal;
}
h1 {
@ -69,8 +73,9 @@ h2 {
----------------------------------*/
.breadcrumbs {
margin: 0 0 15px;
font-family: Verdana;
margin: 0 0 15px;
padding: 0 9px;
}
.breadcrumbs li {
@ -341,6 +346,12 @@ div.warning-box p {
text-transform: uppercase;
}
.sd-module h2 {
font-size: 13px;
font-weight: bold;
margin: 15px 0 0;
}
.sd-module p {
color: #666;
margin: 10px 0;
@ -592,32 +603,6 @@ article.main div.submit {
padding: 10px 0 0;
}
article.main input[type="button"],
article.main input[type="submit"]:not(.remover), /* Exclude tag remover button. */
section.marky button {
border: none;
background: #0063d8;
background: -moz-linear-gradient(top, #4aa9f7, #0063d8);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow: 0 2px 2px rgba(0,0,0,.25);
-moz-box-shadow: 0 2px 2px rgba(0,0,0,.25);
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,.25);
color: #fff;
cursor: pointer;
font-family: Verdana;
margin: 0 15px 0 0;
padding: 3px 20px 5px;
text-shadow: rgba(0,0,0,.25) 0 -1px 0;
}
article.main input[disabled]:not(.remover) {
background: #ddd;
color: #888;
cursor: default;
}
/*----------------------------------
Markup editor styles
----------------------------------*/
@ -972,6 +957,61 @@ ul.ui-autocomplete {
/*----------------------------------
Common button styles
----------------------------------*/
input[type="button"],
input[type="submit"]:not(.remover), /* Exclude tag remover button. */
section.marky button,
a.btn {
border: none;
background: #5784BF;
background: -moz-linear-gradient(#669BE1, #5784BF) repeat scroll 0 0 transparent;
background: -webkit-gradient(linear, left top, left bottom, from(#669BE1), to(#5784BF));
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
box-shadow: 0 2px rgba(0, 0, 0, 0.1), 0 -3px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow: 0 2px rgba(0, 0, 0, 0.1), 0 -3px rgba(0, 0, 0, 0.1) inset;
-webkit-box-shadow: 0 2px rgba(0, 0, 0, 0.1), 0 -3px rgba(0, 0, 0, 0.1) inset;
color: #fff;
cursor: pointer;
font-family: "Trebuchet MS",Helvetica,sans-serif;
font-size: 13px;
font-weight: bold;
margin: 0 15px 0 0;
overflow: visible;
padding: 5px 12px 7px;
text-align: center;
width: auto;
}
input[type="button"]:hover,
input[type="submit"]:not(.remover):hover, /* Exclude tag remover button. */
section.marky button:hover,
a.btn:hover {
box-shadow: 0 2px rgba(0, 0, 0, 0.1), 0 -3px rgba(0, 0, 0, 0.1) inset, 0 0 100px rgba(255, 255, 255, 0.2) inset;
-moz-box-shadow: 0 2px rgba(0, 0, 0, 0.1), 0 -3px rgba(0, 0, 0, 0.1) inset, 0 0 100px rgba(255, 255, 255, 0.2) inset;
-webkit-box-shadow: 0 2px rgba(0, 0, 0, 0.1), 0 -3px rgba(0, 0, 0, 0.1) inset, 0 0 100px rgba(255, 255, 255, 0.2) inset;
text-decoration: none;
}
input[type="submit"].btn-important,
a.btn-important {
background: #489615;
background: -moz-linear-gradient(#84C63C, #489615) repeat scroll 0 0 transparent;
background: -webkit-gradient(linear, left top, left bottom, from(#84C63C), to(#489615));
box-shadow: 0 3px rgba(0, 0, 0, 0.1), 0 -4px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow: 0 3px rgba(0, 0, 0, 0.1), 0 -4px rgba(0, 0, 0, 0.1) inset;
-webkit-box-shadow: 0 3px rgba(0, 0, 0, 0.1), 0 -4px rgba(0, 0, 0, 0.1) inset;
font-size: 16px;
padding: 8px 16px 12px;
}
input[disabled]:not(.remover) {
background: #ddd;
color: #888;
cursor: default;
}
button.img-submit {
background: none;
border: none;
@ -985,4 +1025,3 @@ form.disabled input[type="image"],
form.disabled button {
opacity: 0.5; /* dim submit buttons when form is disabled */
}
/* TODO: more to come during the great css/html refactor */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,7 +1,7 @@
/* Delete Page Confirmation */
/* Used for questions and media */
div.to-delete {
padding: 0 0 0 30px;
padding: 0 0 0 9px;
}
div.to-delete label {

Двоичные данные
media/img/icons.actions.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 945 B

Двоичные данные
media/img/questions/bkg.askquestion.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 13 KiB

Двоичные данные
media/img/questions/bkg.divider.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 529 B

Двоичные данные
media/img/questions/bkg.problem.jpg

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.8 KiB

Двоичные данные
media/img/questions/botbar.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 4.7 KiB

Двоичные данные
media/img/questions/icon.contributed.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 544 B

Двоичные данные
media/img/questions/icon.email.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1001 B

Двоичные данные
media/img/questions/icon.firefox.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 655 B

Двоичные данные
media/img/questions/icon.lessten.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.0 KiB

Двоичные данные
media/img/questions/icon.linux.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 696 B

Двоичные данные
media/img/questions/icon.mac.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.0 KiB

Двоичные данные
media/img/questions/icon.one.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 994 B

Двоичные данные
media/img/questions/icon.replies.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1021 B

Двоичные данные
media/img/questions/icon.report.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 587 B

Двоичные данные
media/img/questions/icon.rss.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичные данные
media/img/questions/icon.search.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 172 B

Двоичные данные
media/img/questions/icon.solutions.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 594 B

Двоичные данные
media/img/questions/icon.solved.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 345 B

Двоичные данные
media/img/questions/icon.tenmore.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичные данные
media/img/questions/icon.windows.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 740 B

Двоичные данные
media/img/questions/topbar.gif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 4.7 KiB

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

@ -257,7 +257,7 @@
* Ajaxify email subscribe
*/
function initEmailSubscribeAjax() {
var $container = $('#question ul.subscribe li.email'),
var $container = $('#question ul.actions li.email'),
$link = $('#email-subscribe-link');
if ($link.length > 0) {
initAjaxForm($container, '#email-subscribe');