Files
fetsite/app/views/fetprofiles/show.html.erb
Andreas Stephanides c01590f36c fetprofile fix
2015-03-04 15:50:53 +01:00

68 lines
2.4 KiB
Plaintext

<%= content_for :header do %>
<title>FET - <%= @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" itemtype="http://schema.org/Person" itemscope>
<meta itemprop="sameAs" content="<%= fetprofile_path(@fetprofile, theme: nil) %>"/>
<div class="media">
<span class="pull-left" itemprop="image" itemscope itemtype="http://schema.org/OmageObject">
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
<%= image_tag @fetprofile.picture.portrait.url %>
<meta itemprop="url" content="<%= @fetprofile.picture.portrait.url%>" />
</span>
<meta itemprop="url" content="<%= @fetprofile.picture.url%>" />
<meta itemprop="representativeOfPage" content="true" />
</span>
<div class="media-body">
<h2><span itemprop="givenName"><%= @fetprofile.vorname %></span><span itemprop="familyName"> <%= @fetprofile.nachname %></span><% unless @fetprofile.short.empty? %><span itemprop=""> <%= @fetprofile.short %> </span><% end %></h2>
<meta itemprop="name" content="<%= @fetprofile.name %>" />
<p itemprop="email">
<%= @fetprofile.fetmail %>
</p>
<p itemprop="description">
<%= @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>