neuigkeit relevant date

This commit is contained in:
Andreas Stephanides
2015-03-08 22:33:50 +01:00
parent badb43c7e3
commit b76239c850

View File

@@ -21,11 +21,7 @@
<% if neuigkeit.has_calentries? %>
<div class="pull-right" href="#">
<%= fa_icon("calendar 2x") %>
<% unless neuigkeit.calentries.upcoming.empty? %>
<%= neuigkeit.calentries.upcoming.first.text %>
<% else unless neuigkeit.calentries.recent.empty? %>
<%= neuigkeit.calentries.recent.first.text %>
<% end %><% end %>
<%= neuigkeit.calentries.min{|c| c.days_to_today * ((c.is_past?)? 2:1)}.text %>
</div>
<% end %>