fixed fetprofiles

This commit is contained in:
Andreas Stephanides
2013-09-24 10:00:13 +02:00
parent 5e06187a94
commit e884e82fa5
6 changed files with 66 additions and 55 deletions

View File

@@ -16,10 +16,14 @@
<% r.each do |m| %>
<%= link_to m.fetprofile do %>
<div class="span3" style="vertical-align:middle; text-align:center">
<%= image_tag m.fetprofile.picture.portrait %>
<p>
<%= image_tag m.fetprofile.try(:picture).try(:portrait) %>
<p>
<% if m.fetprofile.nil?%>
PROFIL fehlt
<% else %>
<%= m.fetprofile.name %> <br>
<%= render(m) %>
<% end %>
</p>
</div>
<% end %>

View File

@@ -5,15 +5,25 @@
<div class="span2">
<%= gremium.typ %>
</div>
<div class="span18">
<div class="span8">
<b><%= gremium.name %></b>
<%= gremium.desc %>
</div>
<div span="2">
<%= link_to 'Show', gremium %>
<%= link_to 'Edit', edit_gremium_path(gremium) %>
<%= link_to 'Destroy', gremium, method: :delete, data: { confirm: 'Are you sure?' } %>
<div class="span2">
<div class="btn-group">
<%= link_to 'Show', gremium,{:class=>"btn"} %>
<button class="btn dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li>
<%= link_to 'Show', gremium %></li>
<li> <%= link_to 'Edit', edit_gremium_path(gremium) %></li>
<li> <%= link_to 'Destroy', gremium, method: :delete, data: { confirm: 'Are you sure?' }, class:"btn-danger" %>
</li> </ul>
</div>
</div>
</div>
<% end %>
</div>