Skip to content

Commit

Permalink
Add Open in Avo button on talk show page
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Jan 27, 2025
1 parent 2a9763e commit 5b945c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/views/talks/_talk.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@
</div>

<div class="flex grow gap-1 py-3 lg:divide-y-0 text-xs xl:justify-end overflow-y-visible overflow-x-scroll lg:overflow-x-hidden order-last xl:order-none">
<% if Current.user&.admin? %>
<%= ui_tooltip "Watch on YouTube" do %>
<%= ui_button url: avo.resources_talk_path(talk), kind: :pill, target: "_blank" do %>
<%= fa :avocado, size: :xs, style: :solid %>

<span class="text-xs">Open in Avo</span>
<% end %>
<% end %>
<% end %>

<% if talk.youtube? || talk.parent_talk&.youtube? %>
<%= ui_tooltip "Watch on YouTube" do %>
<%= ui_button url: talk.external_player_url, kind: :pill, target: "_blank", data: {action: "click->video-player#pause"} do %>
Expand Down

0 comments on commit 5b945c1

Please sign in to comment.