<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="{{ app['locale'] }}">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>{{ 'thesaurus:: export en topics' | trans }}</title>
        <link type="text/css" rel="stylesheet" href="/assets/thesaurus/css/thesaurus{% if not app.debug %}.min{% endif %}.css" />
        <script type="text/javascript">
            var format = '???';
            function clkBut(button)
            {
                switch(button)
                {
                    case "submit":
                        $('.export-topics-form').submit();
                        $('.close-dialog').trigger('click');
                        break;
                    case "cancel":
                        self.returnValue = null;
                        $('.close-dialog').trigger('click');
                        break;
                }
            }
            function loaded()
            {
                chgFormat();
            }
            function ckis()
            {
                document.getElementById("submit_button").disabled = document.forms[0].t.value=="";
            }
            function enable_inputs(o, stat)
            {
                if(o.nodeType==1)  // element
                {
                    if(o.nodeName=='INPUT')
                    {
                        if(stat)
                            o.removeAttribute('disabled');
                        else
                            o.setAttribute('disabled', true);
                    }
                    for(var oo=o.firstChild; oo; oo=oo.nextSibling)
                        enable_inputs(oo, stat)
                }
            }
            function chgFormat()
            {
                var i;
                for(i=0; i<$('.ofm').length; i++)
                {
                    if($(".ofm_1")[0].checked) {
                        format = $(".ofm_1").val();
                    }
                    if($(".ofm_2")[0].checked) {
                        format = $(".ofm_2").val();
                    }
                }
            }
            $( document ).ready(function() {
                loaded();
            });
        </script>
    </head>
    <body class="dialog">
    <center>
        <form action="export_topics.php" class="export-topics-form" target="EXPORT2">
            <input type="hidden" name="bid" value="{{ bid }}" >
            <input type="hidden" name="piv" value="{{ piv }}" >
            <input type="hidden" name="id" value="{{ id }}" >
            <input type="hidden" name="typ" value="{{ typ }}" >
            <input type="hidden" name="dlg" value="{{ dlg }}" >
            <input type="hidden" name="obr" value="{{ obr }}" >

            <div style="padding: 5px 15px">
                <div class="x3Dbox">
                    <span class="title">{{ 'thesaurus:: exporter' | trans }}</span>
                    <div style="white-space:nowrap">
                        <input type='radio' name='ofm' class="ofm ofm_1" checked value='tofiles' onclick="chgFormat();">
                        {{ 'thesaurus:: exporter vers topics pour toutes les langues' | trans }}
                    </div>
                    <div style="white-space:nowrap">
                        <input type='radio' name='ofm' value='toscreen' class="ofm ofm_2" onclick="chgFormat();">
                        {% trans with {'%piv%' : piv} %}thesaurus:: exporter a l'ecran pour la langue %piv%{% endtrans %}
                    </div>
                </div>

                <br/>

                <div class="x3Dbox">
                    <span class="title">{{ 'phraseanet:: tri' | trans }}</span>
                    <div style="white-space:nowrap">
                        <input type='checkbox' name='srt' checked >
                        {{ 'phraseanet:: tri par date' | trans }}
                    </div>
                </div>

                <br/>

                <div class="x3Dbox">
                    <span class="title">{{ 'thesaurus:: recherche' | trans }}</span>
                    <div style="white-space:nowrap">
                        <input type='radio' name='sth' value="1" checked >
                        {{ 'thesaurus:: recherche thesaurus *:"query"' | trans }}
                    </div>
                    <div style="white-space:nowrap">
                        <input type='radio' name='sth' value="0" >
                        {{ 'thesaurus:: recherche fulltext' | trans }}
                    </div>
                    <div style="white-space:nowrap">
                        <input type='checkbox' name='sand' >
                        {{ 'thesaurus:: question complete (avec operateurs)' | trans }}
                    </div>
                </div>

                <br/>

                <div class="x3Dbox">
                    <span class="title">{{ 'thesaurus:: presentation' | trans }}</span>
                    <div style="white-space:nowrap">
                        <input type='radio' name='obrf' value="from_itf_closable" checked >
                        {{ 'thesaurus:: presentation : branches refermables' | trans }}
                    </div>
                    <div style="white-space:nowrap">
                        <input type='radio' name='obrf' value="from_itf_static" >
                        {{ 'thesaurus:: presentation : branche ouvertes' | trans }}
                    </div>
                    <div style="white-space:nowrap">
                        <input type='radio' name='obrf' value="all_opened_closable" >
                        {{ 'thesaurus:: tout deployer - refermable' | trans }}
                    </div>
                    <div style="white-space:nowrap">
                        <input type='radio' name='obrf' value="all_opened_static" >
                        {{ 'thesaurus:: tout deployer - statique' | trans }}
                    </div>
                    <div style="white-space:nowrap">
                        <input type='radio' name='obrf' value="all_closed" >
                        {{ 'thesaurus:: tout fermer' | trans }}
                    </div>
                </div>
            </div>
            <div class="thesaurus_confirm_bottom_block">
                <input type="button" id="cancel_button" class="cancel_btn" value="{{ 'boutton::annuler' | trans }}" onclick="clkBut('cancel');">
                <input type="button" id="submit_button" class="validate_btn" value="{{ 'boutton::valider' | trans }}" onclick="clkBut('submit');">
            </div>
        </form>
    </center>
</body>
</html>
