modal.html 1.9 KB

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