{% extends "help_files/base.html" %}
{% load pagination_tags %}
{% load help_file_tags %}
{% load search_tags %}
{% load i18n %}

{% block title %}{{ block.super }}{% firstof MODULE_HELP_FILES_LABEL_PLURAL 'Help Files' %} {% trans "Search" %}{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/helpfiles.css">
{% endblock %}

{% block body %}
<div class="t">
    {% help_file_nav request.user %}
    <div class="breadcrumbs"><p><a href="{% url help_files %}">{% trans 'All' %} {% firstof MODULE_HELP_FILES_LABEL_PLURAL 'Help Files' %}</a> > <strong>{{ request.GET.q|striptags }}</strong> {% firstof MODULE_HELP_FILES_LABEL 'Help Files' %}</p></div>
    <h1>{% firstof MODULE_HELP_FILES_LABEL_PLURAL 'Help Files' %} {% trans "Search" %}</h1>
     
    {% autopaginate help_files 10 %}
    {% help_file_search %}
    <span><em>{{ paginator.count }} {% firstof MODULE_HELP_FILES_LABEL_PLURAL 'Help Files' %} {% trans "Found" %}</em></span>
    
    
    <div class="help-files-wrap">
    {% for help_file in help_files %}
        {% search_result help_file %}
    {% empty %}
        {% if user.profile.is_superuser %}
        <p><a href="{% url help_files.add %}">{% trans "Add a new" %} {% firstof MODULE_HELP_FILES_LABEL 'Help File' %}</a></p>
        {% endif %}
    {% endfor %}
    </div>

    {% paginate %}
</div>
{% endblock %}
