Files
fetsite/app/views/gremien/show.html.erb
2015-03-09 17:37:02 +01:00

63 lines
1.8 KiB
Plaintext

<%= render 'fetprofiles/tabs' %>
<div class="content-wrap content-column" itemscope itemtype="http://schema.org/Organization">
<p id="notice"><%= notice %></p>
<div class="content-wrap content-column">
<%= link_to I18n.t('common.edit'), edit_gremium_path(@gremium) if can? :edit, @gremium%>
<div class="container-fluid">
<div class="row-fluid">
<h1 itemprop="name">
<%= @gremium.name %>
</h1>
<% Gremium::TYPEN[@gremium.typ.to_i].to_s %>
<p itemprop="description">
<%= @gremium.desc.html_safe %>
</p>
<% unless @gremium.thema.nil? %>
<p>
<%= link_to thema_path(@gremium.thema) do%>
<%= fa_icon "book 2x border" %> Mehr über <%=@gremium.fall4 %> erfahren
<% end %>
</p>
<% end %>
</div>
<% @memberships.each_slice(4) do |r| %>
<div class="row-fluid">
<% r.each do |m| %>
<% cache(("member_" + m.id.to_s + "_portrait" + ([m.updated_at, m.try(:fetprofile).try(:updated_at)].max.utc.to_s))) do %>
<%= link_to m.fetprofile do %>
<div class="span3" style="vertical-align:middle; text-align:center" itemprop="hasmember" itemscope itemtype="http://schema.org/Person">
<%= image_tag m.fetprofile.try(:picture).try(:portrait) %>
<meta itemprop="sameAs" content="<%= fetprofile_path(m.fetprofile) %>"/>
<p>
<% if m.fetprofile.nil?%>
PROFIL fehlt
<% else %>
<span itemprop="name"><%= m.fetprofile.name %> </span><br>
<%= render(m) %>
<% end %>
</p>
</div>
<% end %>
<% end %>
<% end %>
</div>
<% end %>
<div class="row-fluid">
<div class="span12">
<ul class="unstyled">
<% @nlinks.each do |l| %>
<li><%= render l.neuigkeit if can? :show, l.neuigkeit %></li>
<% end %>
</ul>
<%= paginate @nlinks, theme:'twitter-bootstrap' %>
</div>
</div>
</div>
</div>
</div>