1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <div class="midman-alerts">
- {% if alerts %}
- {% if user.alerts %}
- <h2>{% trans alerts=user.alerts %}You have one new alert{% pluralize %}You have {{ alerts }} new alerts{% endtrans %}</h2>
- {% else %}
- <h2>{% trans %}Your Notifications{% endtrans %}</h2>
- {% endif %}
- <table class="table">
- <tbody>
- {% for alert in alerts %}
- <tr>
- <td class="alert-icon{% if alert.date > user.alerts_date %} alert-new{% endif %}">
- {% if alert.date > user.alerts_date %}
- <i class="icon-star tooltip-top" title="{% trans %}New notification{% endtrans %}"></i>
- {% else %}
- <i class="icon-star-empty tooltip-top" title="{% trans %}Old notification{% endtrans %}"></i>
- {% endif %}
- </td>
- <td class="alert-message">{{ (_(alert.message) % alert.vars())|safe }}</td>
- <td class="alert-date">{{ alert.date|reltimesince }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- <p class="lead">
- <form action="{{ url('alerts_clear_recent') }}" method="post" class="form-inline">
- <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
- <a href="{{ url('alerts') }}" class="btn">{% trans %}All Notifications{% endtrans %}</a>
- <button type="submit" class="btn">{% trans %}Clear List{% endtrans %}</button>
- <a href="#" class="btn midman-close">{% trans %}Close{% endtrans %}</a>
- </form>
- </p>
- {% else %}
- <h2>{% trans %}Your Notifications{% endtrans %}</h2>
- <p class="lead">{% trans %}You have no recent notifications.{% endtrans %}</p>
- <p class="lead">
- <a href="{{ url('alerts') }}" class="btn">{% trans %}All Notifications{% endtrans %}</a>
- <a href="#" class="btn midman-close">{% trans %}Close{% endtrans %}</a>
- </p>
- {% endif %}
- </div>
|