{% extends 'djangomaster/_single_col.html' %}
{% load i18n %}
{% block page_title %}{% trans 'Signals' %}{% endblock %}

{% block content %}

    <p>&nbsp;</p>

    <div class="pure-g signal-list">
        {% for signal in signal_list %}
            {% if signal.has_receivers %}
                <div class="pure-u-5-5">
                    {{ signal.name }}<br />
                    {% for receiver in signal.receivers %}
                        <div class="pure-u-5-5" style="margin-left: 20px; font-size: 80%">
                            {% trans 'function name:' %} {{receiver.name}}<br />
                            {% trans 'file:' %} {{receiver.file_name}}<br />
                            <br />
                        </div>
                    {% endfor %}
                </div>
            {% endif %}
        {% endfor %}
    </div>

    <h4>{% trans 'Signals with no receivers' %}</h4>
    <div class="pure-u-5-5">
        {% for signal in signal_list %}
            {% if not signal.has_receivers %}
                {{ signal.name }}<br />
            {% endif %}
        {% endfor %}
    </div>

{% endblock %}

{% block footer %}
    <small>
        {% blocktrans with conf_name='DJANGOMASTER_SIGNAL_MODULES' %}You can modules to be watched adding them to `{{conf_name}}` settings. ex: {% endblocktrans %}<br />
        <code>{% blocktrans with conf_name='DJANGOMASTER_SIGNAL_MODULES' %}{{conf_name}} = ('amazingapp.signals', 'anotherapp.models', ){% endblocktrans %}</code>
    </small>
{% endblock %}
