-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.html.heex
More file actions
46 lines (45 loc) · 1.69 KB
/
index.html.heex
File metadata and controls
46 lines (45 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<.page title={"#{@organization.name} Partners"}>
<:actions>
<%= if not @empty? and @has_permissions? do %>
<.button navigate={~p"/organizations/#{@current_organization}/partners/new"} icon="hero-plus">
New Partner
</.button>
<% end %>
</:actions>
<!-- Tabs -->
<div class="pt-4">
<div class="flex flex-col border-b border-zinc-200">
<div class="flex w-full flex-wrap items-center justify-between gap-2">
<.tabs class="overflow-auto px-4 sm:px-6 lg:px-8">
<.link patch="?tab=all" replace={false}>
<.tab active={@current_tab == "all"}>
{gettext("Current Partners")}
</.tab>
</.link>
<%= if @has_permissions? do %>
<.link patch="?tab=inactive" replace={false}>
<.tab active={@current_tab == "inactive"}>
{gettext("Inactive Partners")}
</.tab>
</.link>
<% end %>
</.tabs>
</div>
</div>
</div>
<!-- Partners index -->
<%= if @empty? and @has_permissions? do %>
<div class="mt-16 text-center sm:mt-32">
<.empty_state url={~p"/organizations/#{@organization}/partners/new"} placeholder="partner" />
</div>
<% else %>
<ul role="list" class="mx-4 my-4 grid gap-x-4 gap-y-4 lg:grid-cols-2">
<%= for partner <- @partners do %>
<.link navigate={~p"/organizations/#{partner.organization_id}/partners/#{partner.id}"} class="block hover:bg-zinc-50">
<.partner_card partner={partner} />
</.link>
<% end %>
</ul>
<.pagination items={@partners} meta={@meta} params={@params} class="mt-2 flex w-full flex-wrap items-center justify-between" />
<% end %>
</.page>