Skip to content

Commit de2e7a3

Browse files
committed
Partner requests: add 'comment and sender' to Request History
1 parent 7cf9c71 commit de2e7a3

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

app/views/partners/requests/_history.html.erb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
<thead>
66
<tr class="border-bottom border-dark">
77
<th scope="col" class="p-4 w-40">Request Date</th>
8+
<th scope="col" class="p-4">Number of Items Requested</th>
89
<th scope="col" class="p-4">Items Requested</th>
10+
<th scope="col" class="p-4">Comment and Sender</th>
911
</tr>
1012
</thead>
1113
<tbody>
@@ -23,8 +25,24 @@
2325
</span>
2426
<% end %>
2527
</td>
28+
<td class="p-4">
29+
<% comment = partner_request.comments %>
30+
<% if comment.present? %>
31+
<div class="mb-2" data-bs-toggle="tooltip" data-bs-title="<%= comment %>">
32+
<%= truncate(comment, length: 20) %>
33+
</div>
34+
<% end %>
35+
<a href="mailto:<%= partner_request.requester.email %>"><%= partner_request.requester.email %></a>
36+
</td>
2637
</tr>
2738
<% end %>
2839
</tbody>
2940
</table>
3041
</section>
42+
43+
<script type="module">
44+
$(document).ready(function() {
45+
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
46+
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
47+
})
48+
</script>

0 commit comments

Comments
 (0)