{% extends "bases/bootstrap-with-nav.html" %}
{% load staticfiles %}
{% load bootstrap3 %}
{% block content %}
<div class="container">
<a href="{% url 'polls:index' %}"><< Back to Events List</a>
{% if is_organiser %}
<div>
<!-- Heading -->
<div class="col-xs-7 col-sm-9 col-md-9">
<h2>Event: {{object.title}}</h2>
</div>
<!-- Edit Button -->
<div class="col-xs-5 col-sm-3 col-md-3 marginTopEditButton">
{% if object.has_received_votes and object.ended == False %}
<a href="{% url 'polls:end-event' event.id %}" class="btn btn-danger" style="float: right;">
<span class="glyphicon glyphicon-stop"></span> End
</a>
{% endif %}
{% if decrypted == True and object.ended == True %}
<a href="{% url 'polls:event-results' event.id %}" class="btn btn-success" style="float: right;">
<span class="glyphicon glyphicon-stats"></span> Results
<a href="{% url 'polls:edit-event' event.id %}" class="btn btn-primary" style="float: right; margin-right: 0.4em;">
<span class="fa fa-pencil"></span> Edit
{% else %}
<br/>
<div class="overviewPadding {% if is_organiser %}marginTopOverview{% endif %}">
<hr/>
<span>By: {{object.users_organisers.all}}</span>
<span>Ready / Prepared: {{ object.prepared }}</span>
<span>Event Status: {{ object.status }}</span>
<ul class="nav nav-tabs">
<li class="{% block event_nav_details %}{% endblock %}">
<a href="{% url 'polls:view-event' event.id %}"><strong>Summary</strong></a>
</li>
<li class="{% block event_nav_polls %}{% endblock %}">
<a href="{% url 'polls:event-polls' event.id %}"><strong>Polls ({{ object.polls.count }})</strong></a>
<li class="{% block event_nav_organisers %}{% endblock %}">
<a href="{% url 'polls:event-entities' event.id %}"><strong>Entities</strong></a>
<li class="{% block event_nav_launch %}{% endblock %}">
<a href="{% url 'polls:event-advanced' event.id %}"><strong>Advanced</strong></a>
</ul>
{% block event_content %}{% endblock %}
{% endblock %}