<% _(obj.history.style).chain()
.sortBy(function(item) { return item.id })
.each(function(item) {
%>
<%
var isactive = '';
if (obj.style) { (obj.style.id === item.id) ? (isactive = 'proj-active') : '' }
%>
<% }); %>
<% if (obj.source) { %>
<%= this.emptystate({message:'You don\'t have any saved styles yet.
Create one now to see it appear in this list.'}) %>
<% } else { %>
<%= this.emptystate({message:'You don\'t have any saved styles yet.
Save your currently active style to see it appear in this list.'}) %>
<% } %>
<%
var sourceitem = this.sourceitem;
_(obj.history.source).chain()
.filter(function(item) { return item.id.indexOf('tmsource://') === 0 })
.sortBy(function(item) { return item.id })
.each(function(item) {
print(sourceitem({
item: item,
withdel: true,
classes: (obj.source && obj.source.id === item.id) ? 'proj-active' : ''
}));
});
%>
<% if (obj.source) { %>
<%= this.emptystate({message:'You don\'t have any saved sources yet.
Save your currently active source'}) %>
<% } else { %>
<%= this.emptystate({message:'You don\'t have any saved sources.
Create a new local source now'}) %>
<% } %>