<commit_before>{% extends "opendebates/base.html" %}
{% load i18n endless cache %}

{% block title %}
  {% blocktrans %}Open Debates{% endblocktrans %}
{% endblock %}

{% block pre_content %}
<form action="{% url 'search_ideas' %}" method="GET" id="top-search">
  <input type="submit" value=""/>
  <div class="search-ctn">
    <input name="q" class="form-control" id="search-full"
           placeholder="{% if ALLOW_VOTING_AND_SUBMITTING_QUESTIONS %}{% blocktrans %}Before submitting your own question, search keywords to see if it was already asked{% endblocktrans %}{% else %}{% blocktrans %}Search questions by keyword{% endblocktrans %}{% endif %}"
           value="{{ search_term|default:'' }}" onkeyup="javascript:if(arguments[0].keyCode===13)this.form.submit();">
  </div>
  <div class="search-ctn">
    <input name="q" class="form-control" id="search-small"
           placeholder="{% blocktrans %}Search questions by keyword{% endblocktrans %}"
           value="{{ search_term|default:'' }}" onchange="javascript:this.form.submit();">
  </div>
</form>

<div class="row white category-only hidden-xs text-center">
  <div class="vcenter {% if not category %}active-category-nav{% endif %}">
    <a href="/">{% blocktrans %}All Issue Areas{% endblocktrans %}</a>
  </div>
  {% cache 279 option_categories category.id %}
    {% for option in SUBMISSION_CATEGORIES %}
      {% if option.name != "Hidden" and option.name != "Uncategorized" and option.name != "Other" %}
        <div class="vcenter {% if category and category.id == option.id %}active-category-nav{% endif %}">
          <a href="{% url 'list_category' option.id %}">{{ option.name }}</a>
        </div>
      {% endif %}
    {% endfor %}
  {% endcache %}
</div>
<label id="category-select-picker-ctn" for="category-select-picker">
  {% trans "Issue areas" %}<br/>
  <select id="category-select-picker" class="selectpicker">
    <option value="/">All</option>
    {% cache 299 cat_options category.id %}
      {% for option in SUBMISSION_CATEGORIES %}
        {% if option.name != "Hidden" and option.name != "Uncategorized" and option.name != "Other" %}
          <option {% if category and category.id == option.id %}selected{% endif %} value"{% url 'list_category' option.id %}">{{ option.name }}</option>
        {% endif %}
      {% endfor %}
    {% endcache %}
  </select>
</label>
<br class="hidden-xs">
{% endblock %}

{% block primary_content %}
  {% cache 30 list_ideas_content sort url_name search_term category.id %}
    <div class="sort-column">
      <form action="{{ url_name }}" method="GET" class="form-inline">
        <label for="q">
          {% blocktrans %}Sort questions by{% endblocktrans %}
        </label><commit_msg>Make mobile category dropdown work -- it previously did nothing<commit_after>{% extends "opendebates/base.html" %}
{% load i18n endless cache %}

{% block title %}
  {% blocktrans %}Open Debates{% endblocktrans %}
{% endblock %}

{% block pre_content %}
<form action="{% url 'search_ideas' %}" method="GET" id="top-search">
  <input type="submit" value=""/>
  <div class="search-ctn">
    <input name="q" class="form-control" id="search-full"
           placeholder="{% if ALLOW_VOTING_AND_SUBMITTING_QUESTIONS %}{% blocktrans %}Before submitting your own question, search keywords to see if it was already asked{% endblocktrans %}{% else %}{% blocktrans %}Search questions by keyword{% endblocktrans %}{% endif %}"
           value="{{ search_term|default:'' }}" onkeyup="javascript:if(arguments[0].keyCode===13)this.form.submit();">
  </div>
  <div class="search-ctn">
    <input name="q" class="form-control" id="search-small"
           placeholder="{% blocktrans %}Search questions by keyword{% endblocktrans %}"
           value="{{ search_term|default:'' }}" onchange="javascript:this.form.submit();">
  </div>
</form>

<div class="row white category-only hidden-xs text-center">
  <div class="vcenter {% if not category %}active-category-nav{% endif %}">
    <a href="/">{% blocktrans %}All Issue Areas{% endblocktrans %}</a>
  </div>
  {% cache 279 option_categories category.id %}
    {% for option in SUBMISSION_CATEGORIES %}
      {% if option.name != "Hidden" and option.name != "Uncategorized" and option.name != "Other" %}
        <div class="vcenter {% if category and category.id == option.id %}active-category-nav{% endif %}">
          <a href="{% url 'list_category' option.id %}">{{ option.name }}</a>
        </div>
      {% endif %}
    {% endfor %}
  {% endcache %}
</div>
<label id="category-select-picker-ctn" for="category-select-picker">
  {% trans "Issue areas" %}<br/>
  <select id="category-select-picker" class="selectpicker" onchange="javascript:window.location=$(this).val() + window.location.search;">
    <option value="/">All</option>
    {% cache 299 cat_options category.id %}
      {% for option in SUBMISSION_CATEGORIES %}
        {% if option.name != "Hidden" and option.name != "Uncategorized" and option.name != "Other" %}
          <option {% if category and category.id == option.id %}selected{% endif %} value="{% url 'list_category' option.id %}">{{ option.name }}</option>
        {% endif %}
      {% endfor %}
    {% endcache %}
  </select>
</label>
<br class="hidden-xs">
{% endblock %}

{% block primary_content %}
  {% cache 30 list_ideas_content sort url_name search_term category.id %}
    <div class="sort-column">
      <form action="{{ url_name }}" method="GET" class="form-inline">
        <label for="q">
          {% blocktrans %}Sort questions by{% endblocktrans %}
        </label>
{'fraction_non_alphanumeric': 0.1843193670203201, 'fraction_numerical': 0.004675418090271534, 'mean_word_length': 3.8072601555747623, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '4932910', 'n_tokens_mistral': 1875, 'n_tokens_neox': 1684, 'n_words': 439}