switcher.ejs 714 B

12345678910
  1. <% if (screens.length > 1) { %>
  2. <div class="dropdown project-screen-switcher">
  3. <button type="button" id="project-screen-switcher" class="btn btn-sm btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><%= screen.name %></button>
  4. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="project-screen-switcher">
  5. <% for (const item of screens) { %>
  6. <a class="dropdown-item<%= String(item.id) === String(screen.id) ? ' active' : '' %>" href="/projectscreen/<%= encodeURIComponent(item.id) %>"<% if (String(item.id) === String(screen.id)) { %> aria-current="page"<% } %>><%= item.name %></a>
  7. <% } %>
  8. </div>
  9. </div>
  10. <% } %>