{% extends 'admin.html' %}
{% block content %}
{% if admin.user_level >= 100 %}
<a href="{{config.basedir}}admin/songs/new" class="side-button">New song</a>
{% endif %}
<h1>Songs</h1>
{% for message in get_flashed_messages() %}
<div class="message">{{ message }}</div>
{% endfor %}
{% for song in songs %}
    <a href="{{config.basedir}}admin/songs/{{ song.id }}" class="song-link">
        <div class="song">
            {% if song.title_lang.en and song.title_lang.en != song.title %}
                <p><span class="song-id">{{ song.id }}.</span>
                {% if not song.enabled %}(Not enabled){% endif %}
                {{ song.title_lang.en }} <small>({{ song.title }})</small></p>
            {% else %}
                <p><span class="song-id">{{ song.id }}.</span>
                {% if not song.enabled %}(Not enabled){% endif %}
                {{ song.title }}</p>
            {% endif %}
        </div>
    </a>
{% endfor %}
{% endblock %}
