Merge branch 'master' of https://github.com/andreassteph/fetsite into andi_spinnt

This commit is contained in:
Thomas Blazek
2015-02-25 11:43:02 +01:00
7 changed files with 58 additions and 27 deletions

View File

@@ -63,7 +63,7 @@ class Ability
end
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
can :manage, Gallery
can :show, Foto
can :manage, Foto
end
unless user.has_role?("fetadmin")
cannot :delete, Gallery

View File

@@ -1,5 +1,5 @@
<%= content_for :header do %>
<title>Fetsite - <%= @fetprofile.name %></title>
<title>FET - <%= @fetprofile.name %></title>
<% unless @fetprofile.picture.url.nil?
picture_url=URI(root_url)
picture_url.path=@fetprofile.picture.portrait.url
@@ -28,17 +28,23 @@ end
<div class="content-wrap content-column">
<p id="notice"><%= notice %></p>
<div style="max-width:70em">
<div style="max-width:70em" itemtype="http://schema.org/Person" itemscope>
<meta itemprop="sameAs" content="<%= fetprofile_path(@fetprofile, params:{theme: nil}) %>"/>
<div class="media">
<span class="pull-left">
<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><%= @fetprofile.name %></h2>
<p>
<h2><span itemprop="givenName"><%= @fetprofile.vorname %></span><span itemprop="familyName"> <%= @fetprofile.nachname %></span><% unless @fetprofile.shot.empty? %><span itemprop=""> <%= @fetprofile.short %> </span><% end %></h2>
<p itemprop="email">
<%= @fetprofile.fetmail %>
</p>
<p>
<p itemprop="description">
<%= @fetprofile.desc %>
</p>
<%= render partial: "interninfo", object: @fetprofile if can?(:seeintern, @fetprofile) %>

View File

@@ -1,17 +1,22 @@
<div class="media">
<div class="media" itemscope itemtype="http://schema.org/Article">
<meta itemprop="sameAs" content="<%= rubrik_neuigkeit_path(neuigkeit.rubrik,neuigkeit, {theme: nil,locale: nil})%>"/>
<div class="pull-left" href="#">
<p><br><%= image_tag neuigkeit.picture.thumb.url unless neuigkeit.picture.url.nil? %>
</p>
<p><br>
<% unless neuigkeit.picture.url.nil? %><%= image_tag neuigkeit.picture.thumb.url %> <meta imageprop="thumbnailUrl" content="<%= neuigkeit.picture.thumb.url%>"/>
<% end %> </p>
</div>
<div class="media-body">
<div>
<small><%= ff_icon(neuigkeit.rubrik.icon) unless neuigkeit.rubrik.icon.nil? or neuigkeit.rubrik.icon.empty? %>&nbsp;<%= neuigkeit.rubrik.name %></small>
<% unless neuigkeit.has_calentries? %> <small class="pull-right"> <%= I18n.t("neuigkeit.am")+" "+ I18n.l(neuigkeit.try(:datum).try(:to_date)) unless neuigkeit.try(:datum).try(:to_date).nil? %></small> <% end %>
<small><%= ff_icon(neuigkeit.rubrik.icon) unless neuigkeit.rubrik.icon.nil? or neuigkeit.rubrik.icon.empty? %>&nbsp;<span itemprop="articleSection"><%= neuigkeit.rubrik.name %></span></small>
<% unless neuigkeit.has_calentries? %> <small class="pull-right"><% unless neuigkeit.try(:datum).try(:to_date).nil? %>
<%= I18n.t("neuigkeit.am") %>
<span itemprop="datePublished" datetime="<%= neuigkeit.try(:datum).to_formatted_s(:iso8601)%>"> <%= I18n.l(neuigkeit.try(:datum).try(:to_date))%> </span>
<% end %> </small> <% else %> <meta itemprop="datePublished" content="<%= neuigkeit.try(:datum).to_formatted_s(:iso8601) %>"/> <% end %>
</div>
<h1>
<h1 itemprop="name">
<%= neuigkeit.title%>
</h1>
<%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%>
</h1><div itemprop="description">
<%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%></div>
</div>
<% if neuigkeit.has_calentries? %>
<div class="pull-right" href="#">

View File

@@ -70,7 +70,7 @@ end
<%= render ce unless ce.nil? %>
<% end %>
</div>
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit)%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit,{themes: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<% unless @neuigkeit.meeting.nil? %>
<%= render @neuigkeit.meeting %>

View File

@@ -1,6 +1,8 @@
<% if can? :show, small %>
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
<h2><%= link_to small.title,small %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %> </h2>
<div itemscope itemtype="http://schema.org/Article">
<meta itemprop="sameAs" content="<%= thema_url(thema, {theme:nil, locale:nil})%>"/>
<h2><span itemprop="name"><%= link_to small.title,small %></span> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %> </h2>
</a>
<%= image_tag small.titlepics.first.datei.url unless small.titlepics.first.nil? %>
<% if small.is_outdated? %>
@@ -68,3 +70,4 @@
<% else %>
Error
<% end %>
</div>

View File

@@ -23,6 +23,14 @@
<p id="notice"><%= notice %></p>
<% link_to "Zurück", @thema.themengruppe %>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<% thema=@thema %><div class="content-wrap content-column" >
@@ -44,6 +52,8 @@
</ul>
</div>
<div class="fb-like" data-href"<%= thema_url(@thema,{theme: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<br>
<div class="">

View File

@@ -52,11 +52,18 @@ SitemapGenerator::Sitemap.create do
Themengruppe.public.with_translations(:en).find_each do |thema|
add themengruppe_path(thema, :locale=>:en, :theme=>nil),:lastmod=>thema.updated_at
end
Thema.public.with_translations(:en).find_each do |thema|
add thema_path(thema, :locale=>:en, :theme=>nil),:lastmod=>thema.updated_at
end
end
Globalize.with_locale(:de) do
Themengruppe.public.with_translations(:de).find_each do |thema|
add themengruppe_path(thema, :locale=>:de, :theme=>nil),:lastmod=>thema.updated_at
end
Thema.public.with_translations(:de).find_each do |thema|
add thema_path(thema, :locale=>:de, :theme=>nil),:lastmod=>thema.updated_at
end
end
# Put links creation logic here.
#