<%
include("/jagg/jagg.jag");
var site = require("/site/conf/site.json");

// Since the header.jag is not installed
var encode = require('encode');
encode = new encode.Encode();

if(site.request_url == "READ_FROM_REQUEST"){
    request_url = request.getRequestURL().split(request.getRequestURI())[0]+request.getContextPath();
}
else{
    request_url = site.request_url;
}


var ssoEnabled = site.ssoConfiguration.enabled;
if (ssoEnabled === 'true') {
    jagg.includeBlock("sso/logout", {});
} else {
(function () {
   jagg.render({
        "name":"page/base",
        "inputs":{
            "title":"Log out",
            "pagePath":"/site/pages/logout.jag",
            "body":[
                {
                    "name":"layout/base",
                    "inputs":{
                        "title":"Log out",
                        "middle":[
                            {
                                "name":"user/logout",
                                "inputs":{
                                }
                            }
                        ]
                    }
                }
            ]
        }
    });
}());

}
%>