{% extends "manage/manage_base.html" %}
{% load i18n %}

{% block left_slot %}
    <div class="navigation-left-title">
        {% trans "Pages" %}
    </div>
    {% for page in pages %}
        <div>
            <a href="{% url lfs_manage_page page.id %}"
               class="selectable {% ifequal page.id current_id %}selected{% endifequal %}">
                {{page.title}}
            </a>
        </div>
    {% endfor %}
{% endblock %}

{% block content %}

    <div class="site-actions">
        <span class="label">{{page.title}}</span>
        
        <a class="add" 
           href="{% url lfs_add_page %}">{% trans 'Add Page' %}</a>
        
        <a class="delete confirmation-link"
           data="{% trans 'Delete?' %}"
           href="{% url lfs_delete_page page.id %}">{% trans 'Delete Page' %}</a>

        <a class="preview" 
           href="{% url lfs_page_view page.slug %}">{% trans 'Preview Page' %}</a>
    </div>

    <div id="manage-tabs">
        
        <ul>
            <li class="ui-tabs-nav-item"><a href="#data">{% trans 'Page' %}</a></li>            
        </ul>

        <div id="data">
            <h2>{% trans 'Page' %}</h2>
            <form action="{% url lfs_manage_page page.id %}"
                  method="post"
                  enctype="multipart/form-data">
                {% include "manage/lfs_form.html" %}
                <input type="submit"
                       value="{% trans 'Save page' %}">
            </form>
        </div>
    </div>    
    
    <script>
        $(function() {    
            tinyMCE.execCommand('mceAddControl', true, 'id_body');
        });    
    </script>        
{% endblock %}