Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (46 sloc) 1.76 KB
{% extends 'base.html' %}
{% load stored_messages_tags %}
{% load staticfiles %}
{% block messages_active %}active{% endblock %}
{% block contents %}
<div class="row">
{% if user.is_authenticated %}
<ul class="nav nav-tabs ">
<li class="active"><a href="#">Notifications</a></li>
</ul>
<div class=".col-md-8">&nbsp;</div>
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked">
<li class="{% if unread %}active{% endif %}"><a href="{% url 'messages' %}?unread">Unread <span class="badge" ng-if="messages.length">{% verbatim %}{{ messages.length }}{% endverbatim %}</span></a></li>
<li class="{% if not unread %}active{% endif %}"><a href="{% url 'messages' %}">All</a></li>
</ul>
</div>
<div class="col-md-9">
{% if not unread %}
{% stored_messages_archive 100 %}
{% else %}
<div >
<div class="text-right">
<button type="button" class="btn btn-success" ng-click="markAllRead()">Mark all read</button>
<button type="button" class="btn btn-success" ng-click="sendBroadcast()">Send Broadcast</button>
</div>
<hr>
{% verbatim %}
<ul class="list-group" ng-if="messages.length">
<li class="list-group-item" ng-repeat="message in messages">
{{ message.date | date:'MMM d, y h:mm:ss a' }} - {{ message.message }}
<a ng-click="markRead($index)" style="cursor:pointer">Mark as read</a>
</li>
</ul>
{% endverbatim %}
<div class="list-group" ng-if="messages.length == 0">
<p>No messages here!</p>
</div>
</div>
{% endif %}
</div>
{% else %}
<!-- todo anon user view this -->
{% endif %}
</div>
{% endblock %}