modal.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <div class="midman-alerts">
  2. {% if alerts %}
  3. {% if user.alerts %}
  4. <h2>{% trans alerts=user.alerts %}You have one new alert{% pluralize %}You have {{ alerts }} new alerts{% endtrans %}</h2>
  5. {% else %}
  6. <h2>{% trans %}Your Notifications{% endtrans %}</h2>
  7. {% endif %}
  8. <table class="table">
  9. <tbody>
  10. {% for alert in alerts %}
  11. <tr>
  12. <td class="alert-icon{% if alert.date > user.alerts_date %} alert-new{% endif %}">
  13. {% if alert.date > user.alerts_date %}
  14. <i class="icon-star tooltip-top" title="{% trans %}New notification{% endtrans %}"></i>
  15. {% else %}
  16. <i class="icon-star-empty tooltip-top" title="{% trans %}Old notification{% endtrans %}"></i>
  17. {% endif %}
  18. </td>
  19. <td class="alert-message">{{ (_(alert.message) % alert.vars())|safe }}</td>
  20. <td class="alert-date">{{ alert.date|reltimesince }}</td>
  21. </tr>
  22. {% endfor %}
  23. </tbody>
  24. </table>
  25. <p class="lead">
  26. <form action="{{ url('alerts_clear_recent') }}" method="post" class="form-inline">
  27. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  28. <a href="{{ url('alerts') }}" class="btn">{% trans %}All Notifications{% endtrans %}</a>
  29. <button type="submit" class="btn">{% trans %}Clear List{% endtrans %}</button>
  30. <a href="#" class="btn midman-close">{% trans %}Close{% endtrans %}</a>
  31. </form>
  32. </p>
  33. {% else %}
  34. <h2>{% trans %}Your Notifications{% endtrans %}</h2>
  35. <p class="lead">{% trans %}You have no recent notifications.{% endtrans %}</p>
  36. <p class="lead">
  37. <a href="{{ url('alerts') }}" class="btn">{% trans %}All Notifications{% endtrans %}</a>
  38. <a href="#" class="btn midman-close">{% trans %}Close{% endtrans %}</a>
  39. </p>
  40. {% endif %}
  41. </div>