<%= content_for :header do %>
<title>Fetsite - <%=  @fetprofile.name %></title>
<% unless @fetprofile.picture.url.nil?
   picture_url=URI(root_url)
   picture_url.path=@fetprofile.picture.portrait.url
end
%>

<% set_meta_tags :og => {
    :image => picture_url.to_s,
    :title => @fetprofile.name.to_s ,
    :type => "profile",
    :url=>fetprofile_url(@fetprofile,:theme=>nil),
:profile=> {
  :first_name=>@fetprofile.vorname,
  :last_name=>@fetprofile.nachname
  }
}
%>
<% set_meta_tags :og=>{:article=> {:published_time=>I18n.l(@neuigkeit.try(:datum).try(:to_date)) }} unless @neuigkeit.try(:datum).try(:to_date).nil? %>

<%= display_meta_tags %>
<% end %>


<%= render 'fetprofiles/tabs' %>

<div class="content-wrap content-column">

<p id="notice"><%= notice %></p>
<div style="max-width:70em">
  <div class="media">
    <span class="pull-left">
      <%= image_tag @fetprofile.picture.portrait.url %>
    </span>
    <div class="media-body">
      <h2><%= @fetprofile.name %></h2>
      <p>
	<%= @fetprofile.fetmail %>
      </p>
      <p>
	<%= @fetprofile.desc %>
      </p>
      <%= render partial: "interninfo", object: @fetprofile if can?(:seeintern, @fetprofile) %>
      <ul>
	<% @memberships.each do |m| %>
	<li>
	  <%= link_to m.gremium do %> <%= render m %><% end %>
	  <%= link_to I18n.t('common.edit'), edit_fetprofile_membership_path(@fetprofile,m) if params["verwalten"] && can?(:edit, m)%>
	  <%= link_to I18n.t('common.delete'), [@fetprofile, m], method: :delete, data: {confirm: I18n.t('common.sure_del')} if params["verwalten"] && can?(:delete, m ) %>
	</li>
	<% end %>
      </ul>

    </div>
  </div>
</div>
      <%= render 'layouts/pretty_toolbar' %>
</div>
