<% if(state.proto && state.proto.match(/http:/)) { %>
{{'<%=state.title%>'|translate}}
<% } else { %>
{{'<%=state.ui.title%>'|translate}}
<% } %>
<%
var nestedArray = [];
function checkParent(parent) {
for(var i=nestedArray.length-1; i>=0; i--){
if(parent == nestedArray[i]){
nestedArray.splice(i+1);
return nestedArray;
}
}
return [];
}
var createDirectives = function(elements, parent){
_.each(elements, function(element, key){
if(parent){
nestedArray = checkParent(parent);
}else{
nestedArray = [];
}
if(element.components){%>
{{'<%=element.ui.title%>'|translate}}
<%if(element.type == 'array'){%>
<%}else{
nestedArray.push(key);
createDirectives(element.components.elements, key);%>
<%}%>
<%}else{%>
<%}
})
}
createDirectives(state.components.elements, null);%>
{{'INVALID.NUMBER' | translate}}