From d72b6c067e27d3987c274f04bcaebf6fc17e754b Mon Sep 17 00:00:00 2001 From: Marco Roth Date: Sat, 24 Aug 2024 02:43:06 +0200 Subject: [PATCH] Add speaker tab to talk show page --- app/views/talks/_talk.html.erb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/views/talks/_talk.html.erb b/app/views/talks/_talk.html.erb index 161efb8a..67371c16 100644 --- a/app/views/talks/_talk.html.erb +++ b/app/views/talks/_talk.html.erb @@ -59,6 +59,36 @@
<%= render partial: "talks/transcript", locals: {talk: talk} %>
+ + "> +
+
+ <% talk.speakers.each do |speaker| %> + <%= link_to speaker_path(speaker), class: "bg-[#f3f4f6] hover:bg-[#e5e7eb] rounded-lg flex content-center p-2 border border-[#e5e7eb] hover:border-[#d1d5db]" do %> +
+ <% if speaker.github.present? && local_assigns.fetch(:picture_profile, true) %> + <%= image_tag speaker.github_avatar_url(size: 128), class: "rounded-full w-16 h-16", alt: "GitHub picture profile of #{talk.speakers.last.github}", loading: :lazy %> + <% else %> +
+
+ <%= speaker.name.split(" ").map(&:first).join.first(2) %> +
+
+ <% end %> + +
+
+ <%= speaker.name %> +
+
+ <%= pluralize(speaker.talks.count, "talk") %> +
+
+
+ <% end %> + <% end %> +
+
<% if action_name != "show" %>