% obj.attributesTemplate = function(attributes) {
_.each(attributes, function(attribute, name) { %>
<%- name %><% if (!_.isNull(attribute)) { %>="<%- attribute %>"<% } %>
<% });
} %>
<%
actionClassNames = [];
actionClassNames.push('action');
if (className) {
actionClassNames.push(className);
}
if (launcherMode == 'icon-only') {
actionClassNames.push('btn-icon');
}
if (!enabled) {
actionClassNames.push('disabled');
}
if (launcherMode != '') {
actionClassNames.push('mode-' + launcherMode);
}
if (obj.withinDropdown) {
actionClassNames.push('dropdown-item');
}
if (links) {
actionClassNames.push('dropdown-toggle');
}
%>
<% var togglerId = _.uniqueId('dropdown-') %>
<% if (links) { %>
<% } %>
<<%- tagName %>
<% if (tagName === "a") { %> href="<%- link %>" role="button"<% } %>
class="<%- actionClassNames.join(' ') %>"
title="<%- title %>"
<% if (obj.ariaLabel) { %>
aria-label="<%- ariaLabel %>"
<% } %>
<% attributesTemplate(attributes) %>
<% if (links) { %> data-toggle="dropdown" data-inherit-parent-width="loosely" role="button" id="<%- togglerId %>"
aria-haspopup="true" aria-expanded="false" aria-label="<%- label %>"<% } %>>
<% if (launcherMode == 'icon-text') { %>
<%- label %>
<% } else if (launcherMode == 'icon-only') { %>
<% } else if (launcherMode == 'text-only') { %>
<% if (iconClassName) { %><% } %>
<%- label %>
<% } %>
<%- tagName %>>
<% if (links) { %>
<% } %>