From 197c7d90842063964d81388a63038e5e3ffe5b68 Mon Sep 17 00:00:00 2001
From: mcbloch
Date: Sun, 11 Oct 2020 05:07:08 +0200
Subject: [PATCH] Add endtime render to event
---
layouts/eventpost.erb | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/layouts/eventpost.erb b/layouts/eventpost.erb
index 9f604db..27fccc9 100644
--- a/layouts/eventpost.erb
+++ b/layouts/eventpost.erb
@@ -57,7 +57,28 @@
<%= item[:description] %>
- - <%= fa 'clock-o', li: true %><%= item[:time].strftime '%A %d %B %Y %H:%M' %>
+ -
+ <%= fa 'clock-o', li: true %>
+ <%= item[:time].strftime '%A %d %B %Y %H:%M' %>
+ <% if item[:end] %>
+
+ -
+
+ <% if (item[:end].strftime '%d %B %Y') != (item[:time].strftime '%d %B %Y') %>
+
+ <%= item[:end].strftime '%d %B ' %>
+
+ <% end %>
+ <% if (item[:end].strftime '%Y') != (item[:time].strftime '%Y') %>
+
+ <%= item[:end].strftime '%Y ' %>
+
+ <% end %>
+
+ <%= item[:end].strftime '%H:%M' %>
+
+ <% end %>
+
- <%= fa 'map-marker', li: true %><%= item[:location] %>