Add in lecture time popover
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
</td>
|
||||
<% else %>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 flex justify-center">
|
||||
<div>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 flex justify-center" data-controller="popover">
|
||||
<div data-action="mouseenter->popover#show mouseleave->popover#hide">
|
||||
<% if lecture.attendance.nil? %>
|
||||
<i class="fa fa-times text-red-700"></i>
|
||||
<% elsif lecture.attendance.kind == 'concurrent' %>
|
||||
@@ -69,6 +69,14 @@
|
||||
<% else %>
|
||||
<% lecture.attendance.kind %>
|
||||
<% end %>
|
||||
|
||||
<% if lecture.attendance.present? %>
|
||||
<template data-popover-target="content">
|
||||
<div class="content absolute max-w-xs bg-gray-300 rounded p-2" data-popover-target="card">
|
||||
In lecture: <%= lecture.attendance.duration.in_minutes.round %> minutes
|
||||
</div>
|
||||
</template>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user