Merge pull request #1631 from basecamp/bring-back-current-account
Bring back current account
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="flex gap">
|
||||
<div class="flex flex-column full-width justify-center gap-half">
|
||||
<div class="nav__header">
|
||||
<% if Current.user.identity.users.many? %>
|
||||
<% if Current.identity.accounts.many? %>
|
||||
<div class="nav__header-title max-width">
|
||||
<div class="overflow-ellipsis"><strong><%= Current.account.name %></strong></div>
|
||||
</div>
|
||||
|
||||
@@ -61,12 +61,12 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% accounts = Current.identity.accounts.where.not(id: Current.account) %>
|
||||
<% if accounts.any? %>
|
||||
<% accounts = Current.identity.accounts %>
|
||||
<% if accounts.many? %>
|
||||
<% cache [ Current.identity, accounts ] do %>
|
||||
<%= collapsible_nav_section "Accounts" do %>
|
||||
<% accounts.each do |account| %>
|
||||
<%= filter_place_menu_item landing_url(script_name: account.slug), account.name, "marker", new_window: true %>
|
||||
<%= filter_place_menu_item landing_url(script_name: account.slug), account.name, "marker", new_window: true, current: account == Current.account %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user