<div class="flex horizontal js-avatars"></div>
<div class="buttonDropdown btn js-reset <% if !@resetButtonShown: %>hide<% end %>"><%- @T('Discard your unsaved changes.') %></div>
<div class="buttonDropdown dropdown dropdown--actions dropup">
  <div class="btn btn--text btn--icon--last" data-toggle="dropdown">
    <span class="js-secondaryActionButtonLabel"></span> <%- @Icon('arrow-up') %>
  </div>
  <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="secondaryAction">
    <li class="js-secondaryAction" role="menuitem">
      <span class="js-secondaryActionLabel" data-type="closeTab"><%- @T('Close tab') %></span>
      <span class="dropdown-selectedSpacer js-selectedIcon">
        <%- @Icon('checkmark') %>
      </span>
    <% if @overview_id: %>
    <li class="js-secondaryAction" role="menuitem">
      <span class="js-secondaryActionLabel" data-type="closeNextInOverview"><%- @T('Next in overview') %></span>
      <span class="dropdown-selectedSpacer js-selectedIcon">
        <%- @Icon('checkmark') %>
      </span>
    <% end %>
    <li class="js-secondaryAction" role="menuitem">
      <span class="js-secondaryActionLabel" data-type="stayOnTab"><%- @T('Stay on tab') %></span>
      <span class="dropdown-selectedSpacer js-selectedIcon">
        <%- @Icon('checkmark') %>
      </span>
  </ul>
</div>
<form class="buttonDropdown">
<% if @macroDisabled: %>
  <button class="btn btn--primary js-submit"><%- @T('Update') %></button>
<% else: %>
  <div class="buttonDropdown dropdown dropup js-submitDropdown">
    <button class="btn btn--primary btn--split--first js-submit"><%- @T('Update') %></button>
    <button class="btn btn--primary btn--slim btn--split--last js-openDropdownMacro"><%- @Icon('arrow-up') %></button>
    <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="userAction">
      <% for macro in @macros: %>
        <li class="js-dropdownActionMacro" role="menuitem" data-id="<%= macro.id %>"><%- @T(macro.displayName()) %>
      <% end %>
    </ul>
  </div>
<% end %>
</form>