{% extends "djangovoice/container.html" %}
{% load i18n %}
{% load user_name from djangovoice_tags %}

{% block sectionid %}feedback{% endblock %}

{% block script_base %}
	<link rel="alternate" type="application/rss+xml" title="{% trans "Latest feedback" %}" href="{% url feeds_latest %}" />
{% endblock %}

{% block body %}
	<div class="topbar">
		<div class="fill">
			<div class="container">
				<h3>
					<a href="{% url djangovoice_home %}">{{ site.name }} {% trans "Feedback" %}</a>
				</h3>
				<ul>
					{% block navigation %}
						<li><a href="{% url djangovoice_list 'all' %}">{% trans "All" %}</a></li>
						<li><a href="{% url djangovoice_list 'open' %}">{% trans "Open" %}</a></li>
						<li><a href="{% url djangovoice_list 'closed' %}">{% trans "Closed" %}</a></li>
						<li><a href="{% url djangovoice_list 'mine' %}">{% trans "Mine" %}</a></li>
	                    <li class="feed-link">
	                        <a href="{% url feeds_latest %}" title="{% trans "Subscribe to the feedback RSS feed" %}">
	                            <img src="{{ STATIC_URL }}djangovoice/images/rss.png" alt="RSS" />
	                        </a>
	                    </li>
					{% endblock %}
				</ul>
				<ul class="nav secondary-nav">
					<li class="menu">
						{% if user.is_authenticated %}
							<a class="menu" href="#">{% user_name user %}</a>
							<ul class="menu-dropdown">
								<li>
									<a href="/">{% trans "Back to mainpage" %}</a>
								</li>
								<li class="divider"></li>
								<li>
									<a href="{% url django.contrib.auth.views.logout %}?next={% url djangovoice_home %}">{% trans "Sign out" %}</a>
								</li>
							</ul>
						{% else %}
							<a href="{% url django.contrib.auth.views.login %}?next={% url djangovoice_home %}">{% trans "Sign in" %}</a>
						{% endif %}
					</li>
				</ul>
			</div>
		</div>
	</div>

	<div id="wrapper">
		<div class="container" id="actions">
			<ul>
				<li><a href="{% url djangovoice_submit %}">{% trans "Submit feedback" %}</a></li>
				{% block actions %}{% endblock %}
			</ul>
		</div>
	</div>

	<div class="container">
		<div class="row" id="content">
			<div class="span12 columns" id="feedback">
				{% for message in messages %}
					<div class="alert-message{% if message.tags %} {{ message.tags }}{% endif %}">
						<a class="close" href="#">×</a>
						<p>{{ message }}</p>
					</div>
				{% endfor %}

				{% block content %}{% endblock %}
			</div>
			<div class="span4 columns">
				<div id="sidebar">
					{% block sidebar %}{% endblock %}
				</div>
			</div>
		</div>

		<div class="span16" id="footer">
            <p>
                <a href="https://github.com/alageek/django-voice">{% trans "Powered by django-voice" %}</a>
            </p>
		</div>
	</div>
{% endblock %}