neuigkeit relevant date
This commit is contained in:
@@ -21,11 +21,7 @@
|
|||||||
<% if neuigkeit.has_calentries? %>
|
<% if neuigkeit.has_calentries? %>
|
||||||
<div class="pull-right" href="#">
|
<div class="pull-right" href="#">
|
||||||
<%= fa_icon("calendar 2x") %>
|
<%= fa_icon("calendar 2x") %>
|
||||||
<% unless neuigkeit.calentries.upcoming.empty? %>
|
<%= neuigkeit.calentries.min{|c| c.days_to_today * ((c.is_past?)? 2:1)}.text %>
|
||||||
<%= neuigkeit.calentries.upcoming.first.text %>
|
|
||||||
<% else unless neuigkeit.calentries.recent.empty? %>
|
|
||||||
<%= neuigkeit.calentries.recent.first.text %>
|
|
||||||
<% end %><% end %>
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user