Termin bei Neuigkeit anzeigen
This commit is contained in:
@@ -57,6 +57,9 @@ end
|
|||||||
summary
|
summary
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
def text
|
||||||
|
I18n.l(self.start) +" bis "+ I18n.l(self.ende)
|
||||||
|
end
|
||||||
scope :public, -> { where(:public => :true) }
|
scope :public, -> { where(:public => :true) }
|
||||||
scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 8.days.from_now) }
|
scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 8.days.from_now) }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ format=:timeonly
|
|||||||
else
|
else
|
||||||
format =:default
|
format =:default
|
||||||
end%>
|
end%>
|
||||||
<%= link_to I18n.l(calentry.start) +" bis "+ I18n.l(calentry.ende,:format=>format), calentry_path(calentry) %>
|
<%= link_to calentry.name, calentry_path(calentry) %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,12 +8,20 @@
|
|||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<div>
|
<div>
|
||||||
<small><%= neuigkeit.rubrik.name %></small>
|
<small><%= neuigkeit.rubrik.name %></small>
|
||||||
<small class="pull-right"><%= "am "+ I18n.l(neuigkeit.try(:datum).try(:to_date)) unless neuigkeit.try(:datum).try(:to_date).nil? %></small>
|
<small class="pull-right"> <%= "am "+ I18n.l(neuigkeit.try(:datum).try(:to_date)) unless neuigkeit.try(:datum).try(:to_date).nil? %></small>
|
||||||
</div>
|
</div>
|
||||||
<h1><%= image_tag("/iconnavy/time.png") if neuigkeit.has_calentries? %>
|
<h1>
|
||||||
<%= neuigkeit.title%></h1>
|
<%= neuigkeit.title%>
|
||||||
|
</h1>
|
||||||
<%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%>
|
<%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%>
|
||||||
</div>
|
</div>
|
||||||
|
<% if neuigkeit.has_calentries? %>
|
||||||
|
<div class="pull-right" href="#">
|
||||||
|
<%= image_tag("/iconnavy/time.png") %>
|
||||||
|
|
||||||
|
<%= neuigkeit.calentries.first.text %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user