<script>
var baseUrl = "{{ app.request.getSchemeAndHttpHost() }}{{ app.request.getBaseURL() }}/";
var baseUrlTemplates = "{{ app.request.getSchemeAndHttpHost() }}{{ app.request.getBaseURL() }}/app/";
baseUrlTemplates = baseUrlTemplates.replace(/(app.php|app_dev.php)\//, "");
var baseUrlImage = "{{ app.request.getSchemeAndHttpHost() }}{{ app.request.getBaseURL() }}/uploads/";
baseUrlImage = baseUrlImage.replace(/(app.php|app_dev.php)\//, "");
var baseUrlAdmin = baseUrl + "admin/";
var baseUrlPublic = baseUrl + "user/public/";
var rol = null;
{% if app.user %}
{% if 'ROLE_ADMIN' in app.user.getRoles() and '/admin/' in app.request.requestUri %}
var baseUrlByRol = baseUrl + "admin/";
{% endif %}
{% if 'ROLE_CLIENTE' in app.user.getRoles() and '/cliente/' in app.request.requestUri %}
var baseUrlByRol = baseUrl + "cliente/";
{% endif %}
{% if 'ROLE_OPERADOR' in app.user.getRoles() and '/operador/' in app.request.requestUri %}
var baseUrlByRol = baseUrl + "operador/";
{% endif %}
{% if 'ROLE_OPERADOR_ADUANA' in app.user.getRoles() and '/operador_aduana/' in app.request.requestUri %}
var baseUrlByRol = baseUrl + "operador_aduana/";
{% endif %}
{% if 'ROLE_FUMIGACION' in app.user.getRoles() and '/fumigacion/' in app.request.requestUri %}
var baseUrlByRol = baseUrl + "fumigacion/";
{% endif %}
{% endif %}
var baseUrlCommon = baseUrl + "common/";
var baseUrlRedirect = "";
var urlImages = "";
var urlLogos = "";
</script>