<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" th:lang="${#ctx.getLocale().toLanguageTag()}">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        
        <title>RENKAN</title>
        <meta name="description" content="" />
        <meta name="author" content="Institut de Recherche et d'Innovation" />
        <link rel="icon" href="../../static/img/favicon.ico" th:href="@{/static/img/favicon.ico}" type="image/x-icon" />
        <script src="lib/jquery.min.js" th:src="@{/static/lib/jquery.min.js}" ></script>
        <script src="lib/jquery.mousewheel.min.js" th:src="@{/static/lib/jquery.mousewheel.min.js}"></script>
        <script src="lib/underscore-min.js" th:src="@{/static/lib/underscore-min.js}"></script>
        <script src="lib/backbone.js" th:src="@{/static/lib/backbone.js}"></script>
        <script src="lib/backbone-relational.js" th:src="@{/static/lib/backbone-relational.js}"></script>
        <script src="lib/paper.js" th:src="@{/static/lib/paper.js}"></script>
        <script type="text/javascript" th:inline="javascript">
        /*<![CDATA[*/
            var require = {
                baseUrl: /*[[@{/static/js/}]]*/""
            };
        /*]]>*/
        </script>
        <script src="js/config.js" th:src="@{/static/js/config.js}"></script>
        <script type="text/javascript" th:inline="javascript">
            var cowebConfig = {
                baseUrl: window.location.protocol + '//' + window.location.host,
                adminUrl : dojoConfig.baseUrl+'ocw_admin',
                debug: /*[[${coweb_debug}]]*/false,
                useWebSockets: /*[[${coweb_websockets}]]*/false
            };
        </script>
        <script type="text/javascript" src="lib/dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true" th:src="@{/static/lib/dojo/dojo.js}"></script>                
        <script type="text/javascript" th:inline="javascript">
        /*<![CDATA[*/
            function startRenkan() {
            	var renkan_config = {
                    static_url : /*[[@{/static/}]]*/ "",
                    read_only: true,
                    bins: [
                        {
                            type: "Wikipedia",
                            lang: "en",
                            search: "Digital Humanities"
                        },
                        {
                            type: "Wikipedia",
                            lang: "ja",
                            search: "Digital Humanities"
                        },
                        {
                            title: "LDT Project",
                            type: "Ldt",
                            ldt_type: "Project",
                            project_id: "67280b1c-ff30-11e0-a82d-00145ea49a02",
                            ldt_platform: "http://ldt.iri.centrepompidou.fr/"
                        }
                    ],
                    search: [
                        {
                            type: "Wikipedia",
                            lang: "fr"
                        }, 
                        {
                            type: "Wikipedia",
                            lang: "en"
                        }, 
                        {
                            type: "Wikipedia",
                            lang: "ja"
                        }
                    ],
                    property_files: [
                        /*[[@{/static/data/properties.json}]]*/ "data/properties.json",
                    ],
                };
                var space_config = /*[[${space.binConfig}?${space.binConfig}:'{}']]*/"{}";
                space_config = JSON.parse(space_config || "{}");
                var _renkan = new Rkns.Renkan($.extend({}, renkan_config, space_config));
                var corenkanConfig = {
                    projectId: /*[[${project.id}]]*/"new_project",
                    renkan : _renkan
                };

                require({corenkanConfig: corenkanConfig}, ["corenkan"], function(corenkan) {
                    corenkan.app.onStatusChange = function(status) {
                    };
                });
            }
        /*]]>*/
        </script>
        <script src="js/renkan.js" th:src="@{/static/js/renkan.js}"></script>
        <link rel="stylesheet" href="css/renkan.css" th:href="@{/static/css/renkan.css}"/>
        <link rel="stylesheet" href="../../static/css/style.css" th:href="@{/static/css/style.css}"/>
        <link rel="stylesheet" href="../../static/css/renkanProject.css" th:href="@{/static/css/renkanProject.css}"/>
    </head>
    <body>
        <header><a href="/" th:href="@{/}">RENKAN</a>&nbsp;&gt;&nbsp;<a href=".." th:href="@{'/s/'+${space.id}}">Space</a></header>
        <div id="renkan-wrapper">
            <div id="renkan-container">
                <div id="renkan"></div>
            </div>
        </div>
        <footer id="footer" th:include="fragment/pageFragment :: footerFragment">
            <div id="version">© <span class="version-date">2014</span> <a href="http://www.iri.centrepompidou.fr" target="_blanck">IRI</a> - Version <span class="version-version">0.0</span></div>
        </footer>
    </body>
</html>
