Neuigkeiten Link

Querverweise für Neuigkeiten
This commit is contained in:
Andreas Stephanides
2014-03-29 11:30:46 +01:00
parent 1d2d3e791b
commit a8401391a6
22 changed files with 199 additions and 55 deletions

View File

@@ -0,0 +1,21 @@
<div class="media gallery-block">
<div class="pull-left" href="#">
<%= if(nlink.fotos.empty?)
image_tag "no_image_128.png", {:class => "img-rounded"}
else
image_tag nlink.fotos.sample.datei.big_thumb.url, {:class => "img-rounded"}
end %>
</div>
<div class="media-body">
<small class="pull-left"><%= nlink.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> </small>
<small class="pull-right"><%=I18n.l(nlink.try(:datum).try(:to_date)) unless nlink.try(:datum).try(:to_date).nil? %></small></br>
<h1><%= nlink.name %></h1>
<p>
<%= if nlink.desc.split.size > Gallery::WORD_COUNT
nlink.desc.split[0..Gallery::WORD_COUNT].join(" ") + " ..."
else
nlink.desc
end%>
</p>
</div>
</div>

View File

@@ -25,6 +25,27 @@
</p>
</div>
</div>
<div class="media gallery-block">
<div class="pull-left" href="#">
<%= if(gallery.fotos.empty?)
image_tag "no_image_128.png", {:class => "img-rounded"}
else
image_tag gallery.fotos.sample.datei.big_thumb.url, {:class => "img-rounded"}
end %>
</div>
<div class="media-body">
<small class="pull-left"><%= gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> </small>
<small class="pull-right"><%=I18n.l(gallery.try(:datum).try(:to_date)) unless gallery.try(:datum).try(:to_date).nil? %></small></br>
<h1><%= gallery.name %></h1>
<p>
<%= if gallery.desc.split.size > Gallery::WORD_COUNT
gallery.desc.split[0..Gallery::WORD_COUNT].join(" ") + " ..."
else
gallery.desc
end%>
</p>
</div>
</div>
<% end %> <!-- end link -->
</div> <!-- close span6 -->
<% end %> <!-- end row -->