From 0e78825e5823436dae2752b6139a8d2315633bf4 Mon Sep 17 00:00:00 2001
From: Felix Eckhofer <felix@eckhofer.com>
Date: Fri, 27 Dec 2024 11:56:44 +0100
Subject: [PATCH] Fix mobile view of files and add date

---
 app/views/sessions/show.html.erb | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/views/sessions/show.html.erb b/app/views/sessions/show.html.erb
index 6b9144d..aff3ec0 100644
--- a/app/views/sessions/show.html.erb
+++ b/app/views/sessions/show.html.erb
@@ -23,18 +23,19 @@
   <h3 class="mt-4">Files <span class="font-normal">from Speakers' Filedrop</span></h3>
   <ul class="space-y-4 my-4">
     <% @session.filedrop_files.each do |file| %>
-      <li class="bg-white shadow rounded-lg p-4">
-        <div class="flex justify-between items-center">
+    <li class="bg-white shadow rounded-lg p-4">
+        <div class="flex flex-wrap justify-between items-start max-w-full">
           <div>
             <div class="text-gray-900 text-lg font-semibold"><%= file.name %></div>
             <div class="text-gray-500 text-sm">Size: <%= number_to_human_size(file.size) %></div>
+            <div class="text-gray-500 text-sm">Date: <%=file.orig_created&.in_time_zone(@session.conference.time_zone || 'UTC')&.strftime("%B %d, %Y %H:%M") %></div>
             <div class="text-gray-500 text-sm">Checksum: <%= file.checksum %></div>
           </div>
-          <div>
-            <%= link_to 'Download', download_filedrop_file_path(file), class: "bg-blue-500 text-white px-3 py-2 rounded" %>
-          </div>
+        <div class="mt-2 sm:mt-0 flex-shrink-0">
+          <%= link_to 'Download', download_filedrop_file_path(file), class: "bg-blue-500 text-white px-3 py-2 rounded" %>
         </div>
-      </li>
+      </div>
+    </li>
     <% end %>
   </ul>
 
-- 
GitLab