2016-05-29 18:37:43 +00:00
|
|
|
{% extends "hosting/base_short.html" %}
|
|
|
|
{% load staticfiles bootstrap3 %}
|
|
|
|
{% block content %}
|
|
|
|
<div>
|
|
|
|
<div class="container virtual-machine-container dashboard-container ">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-9 col-md-offset-2">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<h3><i class="fa fa-bell" aria-hidden="true"></i> Notifications</h3>
|
|
|
|
<hr/>
|
|
|
|
<div class="col-md-3"> <!-- required for floating -->
|
|
|
|
<!-- Nav tabs -->
|
|
|
|
<ul class="nav nav-tabs tabs-left sideways">
|
|
|
|
<li class="active">
|
|
|
|
<a href="#unread-v" data-toggle="tab">
|
2016-06-07 05:29:22 +00:00
|
|
|
Unread
|
|
|
|
{% if unread_notifications|length > 0%}
|
|
|
|
<span class="badge">
|
|
|
|
{{unread_notifications|length}}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
2016-05-29 18:37:43 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="#all-v" data-toggle="tab">
|
|
|
|
All
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane active" id="unread-v">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<h3>Unread notifications</h3>
|
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
{% for notification in unread_notifications %}
|
|
|
|
<form method="POST" action="{% url 'hosting:read_notification' notification.id %}">
|
|
|
|
{% csrf_token %}
|
|
|
|
<span>{{notification}} -</span>
|
|
|
|
<button type="submit" class="btn btn-link">Mark as read</button>
|
|
|
|
<span class="pull-right" style="font-size: 11px;color: #999;">{{notification.date}}</span>
|
|
|
|
</form>
|
|
|
|
<hr/>
|
|
|
|
{% endfor %}
|
|
|
|
</div><!--/col-12-->
|
|
|
|
</div><!--/row-->
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane" id="all-v">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<h3>All notifications</h3>
|
|
|
|
<hr>
|
|
|
|
{% for notification in all_notifications %}
|
|
|
|
<span>{{notification.message}} </span>
|
|
|
|
<span class="pull-right" style="font-size: 11px;color: #999;">{{notification.message.date}}</span>
|
|
|
|
<hr/>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
</div><!--/col-12-->
|
|
|
|
</div><!--/row-->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{%endblock%}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|