<commit_before>{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "questions/base.html" %}
{% set title = _('Firefox Support Forum') %}
{% set classes = 'questions' %}
{% set crumbs = [(None, _('Forum'))] %}
{% set canonical_url = unlocalized_url('questions.questions')|urlparams(filter=filter, sort=sort, tagged=tagged) %}
{% if questions.number > 1 %}
  {% set canonical_url = canonical_url|urlparams(page=questions.number) %}
{% endif %}

{% 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:') }}
      {% for tag in tags -%}
        <a class="tag" href="{{ url('questions.questions')|urlparams(tagged=tags_to_text(tags|remove(tag)), 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">
          <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.is_solved %}
              <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.num_answers > 0 and question.last_answer %}
              <span><a class="last-reply" href="{{ question.last_answer.get_absolute_url() }}">
                {{ _('last reply by {user}')|f(user=question.last_answer.creator.username) }}
              </a></span>
            {% endif %}
            {% if question.is_locked %}
              <span class="locked">{{ _('Locked') }}</span>
            {% endif %}
            {% if question.is_contributor(user) %}
              <span class="contributed">{{ _('Contributed') }}</span>
            {% endif %}
            {% set tags = question.tags.all() %}
            {% if tags %}
              <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>
                {% endfor %}
              </ul>
            {% endif %}
          </div>
        </li>
      {% endfor %}
    </ol>
    {{ questions|paginator }}
  {% else %}
    {# Not localized because it's not worth localizers time. #}
    <p>There are no questions. Maybe you should ask some!</p>
  {% endif %}
{% endblock %}

{% block side %}
  <a id="toggle-tag-filter" class="off" href="#tag-filter">{{ _('Filter Questions') }}</a>
  <section id="tag-filter" class="sd-module">
    <h1><mark>{{ _('Filter') }}</mark></h1>
    <p>{{ _('Ex: Firefox 7, bookmarks') }}</p>
    <form action="" method="get">
      <input type="hidden" class="current-tagged" value="{{ tagged }}"/>
      <input class="text tags-autocomplete" type="text" name="tagged" value="" data-vocabulary="{{ tag_vocab() }}" required="required"/>
      <input type="submit" value="{{ _('Go') }}" />
    </form>
  </section>
  {{ super() }}
{% endblock %}<commit_msg>[bug 699141] s/bookmarks/crash/ in filter example.<commit_after>{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "questions/base.html" %}
{% set title = _('Firefox Support Forum') %}
{% set classes = 'questions' %}
{% set crumbs = [(None, _('Forum'))] %}
{% set canonical_url = unlocalized_url('questions.questions')|urlparams(filter=filter, sort=sort, tagged=tagged) %}
{% if questions.number > 1 %}
  {% set canonical_url = canonical_url|urlparams(page=questions.number) %}
{% endif %}

{% 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:') }}
      {% for tag in tags -%}
        <a class="tag" href="{{ url('questions.questions')|urlparams(tagged=tags_to_text(tags|remove(tag)), 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">
          <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.is_solved %}
              <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.num_answers > 0 and question.last_answer %}
              <span><a class="last-reply" href="{{ question.last_answer.get_absolute_url() }}">
                {{ _('last reply by {user}')|f(user=question.last_answer.creator.username) }}
              </a></span>
            {% endif %}
            {% if question.is_locked %}
              <span class="locked">{{ _('Locked') }}</span>
            {% endif %}
            {% if question.is_contributor(user) %}
              <span class="contributed">{{ _('Contributed') }}</span>
            {% endif %}
            {% set tags = question.tags.all() %}
            {% if tags %}
              <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>
                {% endfor %}
              </ul>
            {% endif %}
          </div>
        </li>
      {% endfor %}
    </ol>
    {{ questions|paginator }}
  {% else %}
    {# Not localized because it's not worth localizers time. #}
    <p>There are no questions. Maybe you should ask some!</p>
  {% endif %}
{% endblock %}

{% block side %}
  <a id="toggle-tag-filter" class="off" href="#tag-filter">{{ _('Filter Questions') }}</a>
  <section id="tag-filter" class="sd-module">
    <h1><mark>{{ _('Filter') }}</mark></h1>
    <p>{{ _('Ex: Firefox 7, crash') }}</p>
    <form action="" method="get">
      <input type="hidden" class="current-tagged" value="{{ tagged }}"/>
      <input class="text tags-autocomplete" type="text" name="tagged" value="" data-vocabulary="{{ tag_vocab() }}" required="required"/>
      <input type="submit" value="{{ _('Go') }}" />
    </form>
  </section>
  {{ super() }}
{% endblock %}
{'fraction_non_alphanumeric': 0.2222222222222222, 'fraction_numerical': 0.00408059168579444, 'mean_word_length': 2.760869565217391, 'pattern_counts': {'":': 0, '<': 217, '<?xml version=': 0, '>': 223, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '364830', 'n_tokens_mistral': 4086, 'n_tokens_neox': 3664, 'n_words': 795}