Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions app/views/events/team.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,33 @@
</h1>

<% if @event.parent.present? %>
<%= render "application/callout", title: "The team behind #{@event.parent.name} also has access to #{@event.name}", type: "info", icon: "leader" do %>
<p>Because <%= @event.name %> is a sub-organization of <%= @event.parent.name %>, all team members of <%= @event.parent.name %> can access and view this organization.</p>
<%# The icons are wrapped rather than placed directly in the <summary> because
`summary > svg` picks up padding from the dock styles. %>
<details class="card border b--info p-0 mt3 mb3">
<summary class="px-4 py-3 list-none">
<div class="flex items-center gap-2">
<span class="info line-height-0"><%= inline_icon "leader", size: 24 %></span>
<p class="bold m0 flex-auto">The team behind <%= @event.parent.name %> also has access to <%= @event.name %></p>
<span class="muted line-height-0"><%= inline_icon "down-caret", size: 24, class: "flip-when-open" %></span>
</div>
</summary>

<% if @indirect_access.present? %>
<p>These team members can access this organization:</p>
<div class="border-top b--muted px-4 py-3">
<p class="mt0">Because <%= @event.name %> is a sub-organization of <%= @event.parent.name %>, all team members of <%= @event.parent.name %> can access and view this organization.</p>

<div class="grid">
<% @indirect_access.each do |user, role| %>
<span class="flex">
<%= user_mention(user) %><%= role == "manager" ? "can manage" : "can view" %>
</span>
<% end %>
</div>
<% end %>
<% end %>
<% if @indirect_access.present? %>
<p>These team members can access this organization:</p>

<div class="grid">
<% @indirect_access.each do |user, role| %>
Comment thread
anishanne marked this conversation as resolved.
<span class="flex">
<%= user_mention(user) %><%= role == "manager" ? "can manage" : "can view" %>
</span>
<% end %>
</div>
<% end %>
</div>
</details>
<% end %>

<div class="mb-4 flex flex-row justify-between items-center width-100 gap-2">
Expand Down