<% if (locals.action) { // Make it possible to override action button color (specify fallback color if no color specified) locals.action.forEach(function(actionItem) { actionItem.button.forEach(function(button) { // Make it possible to override action button color (specify fallback color if no color specified) if (!button.color) { button.color = '#222222'; } deprecatedColorToHex(button); }); }); // Convert deprecated red/green/blue action button color to hex since we switched to a hex-based button color function deprecatedColorToHex(button) { if (button.color === 'red') { button.color = '#DC4D2F'; } else if (button.color === 'green') { button.color = '#22BC66'; } else if (button.color === 'blue') { button.color = '#3869D4'; } } } %>
<% if (locals.product.logo) { %> <% if (locals.product.logoHeight) { %> <% } else { %> <% } %> <% } else { %> <%- product.name %> <% } %>
<% if (locals.title) { %> <% } %> <% if (locals.action.length !== 0) { %> <% } %>

<%- title %>

<% if (locals.intro) { %> <% intro.forEach(function (introItem) { -%>

<%- introItem %>

<% }) -%> <% } %> <% if (locals.dictionary) { %>
<% for (item in dictionary) { -%>
<%- item.charAt(0).toUpperCase() + item.slice(1) %>:
<%- dictionary[item] %>
<% } -%>

<% } %> <% if (locals.table) { %> <% table.forEach(function (tableItem, i) { -%>

<%- tableItem.title %>

<% for (var column in tableItem.data[0]) {%> <% } %> <% for (var i in tableItem.data) {%> <% for (var column in tableItem.data[i]) {%> <% } %> <% } %>
width="<%= tableItem.columns.customWidth[column] %>" <% } %> <% if(tableItem.columns && tableItem.columns.customAlignment && tableItem.columns.customAlignment[column]) { %> style="text-align:<%= tableItem.columns.customAlignment[column] %>" <% } %> >

<%- column.charAt(0).toUpperCase() + column.slice(1) %>

style="text-align:<%= tableItem.columns.customAlignment[column] %>" <% } %> > <%- tableItem.data[i][column] %>
<% }) %> <% } %>

<% action.forEach(function (actionItem) { -%>

<%- actionItem.instructions %>


<% actionItem.button.forEach(function (actionButton) { -%> <% }) -%>
    <%- actionButton.text %>    

<% }) -%>
<% if (signature) { %> <% } %>
<% if (locals.outro) { %> <% outro.forEach(function (outroItem) { -%>

<%- outroItem %>

<% }) -%> <% } %>
<%- signature %>,
<%- product.name %>
<% if (locals.action.length !== 0 && locals.action[0].button[0].fallback) { %>
<% action.forEach(function (actionItem) { -%> <% actionItem.button.forEach(function (actionButton) { -%> <% if (actionButton.fallback != null) { %>

<%- actionButton.fallback.text %>
<%- actionButton.link %>

<% } %> <% }) -%> <% }) -%>
<% } %>
<% if (locals.goToAction) { %> <% } %>