12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- {% load i18n misago_avatars misago_capture %}
- <div class="dropdown-title">
- {% if user.new_notifications %}
- {% capture trimmed as notifications %}
- <span class="label label-danger">{{ user.new_notifications }}</span>
- {% endcapture %}
- {% blocktrans trimmed with notifications=notifications|safe count counter=user.new_notifications%}
- {{ notifications }} new notification
- {% plural %}
- {{ notifications }} new notifications
- {% endblocktrans %}
- {% else %}
- {% capture trimmed as notifications %}
- <span class="label label-default">{{ notifications_count }}</span>
- {% endcapture %}
- {% blocktrans trimmed with notifications=notifications|safe count counter=user.new_notifications%}
- {{ notifications }} notification
- {% plural %}
- {{ notifications }} notifications
- {% endblocktrans %}
- {% endif %}
- </div>
- <ul class="list-unstyled scrollable">
- {% for item in items %}
- <li{% if item.is_new %} class="new"{% endif %}>
- <div class="state-icon">
- {% if item.is_new %}
- <span class="fa fa-circle"></span>
- {% else %}
- <span class="fa fa-circle-o"></span>
- {% endif %}
- </div>
- <a href="{{ item.get_absolute_url }}">
- {% if item.is_valid %}
- <a href="{{ item.get_absolute_url }}">
- {{ item.message|safe }}
- </a>
- {% else %}
- <a href="#">
- <em>{% trans "Notification is not available." %}</em>
- </a>
- {% endif %}
- <footer class="text-muted">
- {% if item.sender_username %}
- {% if item.sender_id %}
- <a href="{% url USER_PROFILE_URL user_slug=item.sender_slug user_id=item.sender_id %}" class="item-title">{{ item.sender_username }}</a>
- {% else %}
- <strong class="item-title">{{ item.sender_username }}</strong>
- {% endif %}
- {% endif %}
- <abbr class="tooltip-top dynamic time-ago" title="{{ item.date }}" data-timestamp="{{ item.date|date:"c" }}">
- {{ item.date|date }}
- </abbr>
- </footer>
- </li>
- {% empty %}
- <li class="empty">
- <span class="text-success fa fa-check fa-2x"></span>
- {% trans "You don't have any new notifications." %}
- </li>
- {% endfor %}
- </ul>
- <div class="dropdown-footer">
- <form action="{% url 'misago:notifications' %}" class="read-all-notifications" method="POST">
- {% csrf_token %}
- <a href="{% url 'misago:notifications' %}" name="read-all" class="btn btn-default btn-sm">
- {% trans "See all" %}
- </a>
- <button type="button" class="btn btn-default btn-refresh btn-sm" style="display: none;">
- {% trans "Refresh" %}
- </button>
- </form>
- </div>
|