<% 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 (links) { actionClassNames.push('dropdown-toggle'); } %> <% var togglerId = _.uniqueId('dropdown-') %> <% if (links) { %>
<% } %> <<%- tagName %> <% if (tagName == "a") { %> href="<%= link %>"<% } %> class="<%= actionClassNames.join(' ') %>" title="<%- title %>" <% attributesTemplate(attributes) %> <% if (links) { %> data-toggle="dropdown" 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 %> <% } %> > <% if (links) { %>
<% } %>