{% extends "egonomy_newbase.html" %}
{% load static %}
{% load i18n %}
{% load thumbnail %}

{% block title %}{% trans "View a fragment" %}{% endblock %}

{% block popins %}
    <div class="popin-wrap">
        <div id="collection-parameters" class="popin big-popin box-shadow">
            <header>
                <h2>PARAMÈTRES DE LA COLLECTION</h2>
                <a href="#" class="close-popin"></a>
            </header>
            <section>
                <form action="#">
                    <div class="col-left">
                        <table>
                            <tbody>
                                <tr>
                                    <th>Vignette :</th>
                                    <td>
                                        <label class="no-margin styled-select">
                                            <select class="w-192">
                                                <option selected value="">Mosaïque</option>
                                                <option value="/egonomy/allfragments/">Argumentaire</option>
                                            </select>
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <th>Visibilité :</th>
                                    <td>
                                        <label class="no-margin styled-select">
                                            <select class="w-192">
                                                <option selected value="">Visible par moi uniquement</option>
                                            </select>
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <th><label for="share-collection">Partager :</label></th>
                                    <td>
                                        <input id="share-collection" class="w-194" type="text" placeholder="http://">
                                    </td>
                                </tr>
                                <tr>
                                    <th colspan="2"><label for="description-collection">Description :</label></th>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <textarea name="" id="description-collection"></textarea>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                     <ul class="list-projets-2 clearfix">
                        <li>
                            <div class="top clearfix">
                                <img src="img/113x113.png" alt="">
                                <img src="img/113x113-2.png" alt="">
                            </div>
                            <div class="mid">
                                <h3>Collection n°1</h3>
                                <p>par Hubert Trucchose</p>
                            </div>
                            <div class="bot clearfix">
                                <img src="img/113x113.png" alt="">
                                <img src="img/113x113-2.png" alt="">
                            </div>
                        </li>
                    </ul>
                    <div class="buttons">
                        <a href="#" class="btn close-popin">Annuler</a>
                        <input class="btn" type="submit" value="Valider">
                    </div>
                </form>
            </section>
        </div>
    </div>
{% endblock %}

{% block content %}
            <div class="title-page">
                <h2>{{ col.title }}</h2>
                <ul class="sub-nav title-menu clearfix">
                    <li><a href="#" class="active">argumentaire</a></li>
                    <li><span class="dot-6"></span></li>
                    <li><a href="#">mosaïque</a></li>
                    <li><span class="dot-6"></span></li>
                    <li><a href="#">géographique</a></li>
                    <!--li><span class="dot-6"></span></li>
                    <li><a href="#">envoyer vers collage</a></li-->
                </ul>
            </div>
            <div class="bar-tools clearfix">
                <ul class="clearfix">
                    <!--li><a href="#">lire le diaporama</a></li>
                    <li><a class="icon save" href="#">enregistrer sous</a></li-->
                    <li><a class="open-popin" href="#collection-parameters">Paramètres de la collection</a></li>
                </ul>
            </div>
            <div class="empty-block">
                <form class="search-form-big" id="search-form-big" action="{% if search_fragment %}{% url 'all_fragments' %}{% else %}{% url 'all_pictures' %}{% endif %}" method="GET">
                    <p>
                        <input id="search-field-big" type="text" placeholder="{% trans 'Search' %}" name="search"/>
                        <label class="styled-select">
                            <select id="search-type-big">
                                <option value="{% url 'all_pictures' %}"{% if not search_fragment %} selected{% endif %}>Images</option>
                                <option value="{% url 'all_fragments' %}"{% if search_fragment %} selected{% endif %}>Fragments</option>
                            </select>
                        </label>
                        <input type="hidden" value="all" name="field">
                    </p>
                </form>
            </div>
{% endblock %}

{% block js_page %}
<script type="text/javascript">
$(function() {
    $("#search-type-big").change(function() {
        $("#search-form-big").attr("action", $(this).val());
        if ($("#search-field-big").val()) {
            $("#search-form-big").submit();
        }
    });
});
</script>
{% endblock %}
