From e410aef098ca3c793d492bfb799acebbaeed4268 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 25 Feb 2015 11:41:13 +0100 Subject: [PATCH 1/4] foto abiltiy --- app/models/ability.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 8d8e51b..35084d1 100755 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -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 From 564c355d2d43b021b27c60b38e69f35642edd4e8 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 25 Feb 2015 11:41:59 +0100 Subject: [PATCH 2/4] fetprofile schema --- app/views/fetprofiles/show.html.erb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/views/fetprofiles/show.html.erb b/app/views/fetprofiles/show.html.erb index f3e656c..9446b39 100644 --- a/app/views/fetprofiles/show.html.erb +++ b/app/views/fetprofiles/show.html.erb @@ -1,5 +1,5 @@ <%= content_for :header do %> -Fetsite - <%= @fetprofile.name %> +FET - <%= @fetprofile.name %> <% unless @fetprofile.picture.url.nil? picture_url=URI(root_url) picture_url.path=@fetprofile.picture.portrait.url @@ -28,17 +28,23 @@ end

<%= notice %>

-
+
+
- - <%= image_tag @fetprofile.picture.portrait.url %> + + + <%= image_tag @fetprofile.picture.portrait.url %> + + + +
-

<%= @fetprofile.name %>

-

+

<%= @fetprofile.vorname %> <%= @fetprofile.nachname %><% unless @fetprofile.shot.empty? %> <%= @fetprofile.short %> <% end %>

+

<%= @fetprofile.fetmail %>

-

+

<%= @fetprofile.desc %>

<%= render partial: "interninfo", object: @fetprofile if can?(:seeintern, @fetprofile) %> From ad375d6c1048eae5e127c3c36d787a5f3f37706b Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 25 Feb 2015 11:42:12 +0100 Subject: [PATCH 3/4] neuigkeiten Themen view fix --- app/views/neuigkeiten/_compact.html.erb | 39 ++++++++++++++----------- app/views/neuigkeiten/show.html.erb | 2 +- app/views/themen/_small.html.erb | 5 +++- app/views/themen/show.html.erb | 10 +++++++ 4 files changed, 37 insertions(+), 19 deletions(-) diff --git a/app/views/neuigkeiten/_compact.html.erb b/app/views/neuigkeiten/_compact.html.erb index c9eabd9..14fc995 100644 --- a/app/views/neuigkeiten/_compact.html.erb +++ b/app/views/neuigkeiten/_compact.html.erb @@ -1,27 +1,32 @@ -
+
+
-


<%= image_tag neuigkeit.picture.thumb.url unless neuigkeit.picture.url.nil? %> -

+


+<% unless neuigkeit.picture.url.nil? %><%= image_tag neuigkeit.picture.thumb.url %> + <% end %>

- <%= ff_icon(neuigkeit.rubrik.icon) unless neuigkeit.rubrik.icon.nil? or neuigkeit.rubrik.icon.empty? %> <%= neuigkeit.rubrik.name %> - <% unless neuigkeit.has_calentries? %> <%= I18n.t("neuigkeit.am")+" "+ I18n.l(neuigkeit.try(:datum).try(:to_date)) unless neuigkeit.try(:datum).try(:to_date).nil? %> <% end %> + <%= ff_icon(neuigkeit.rubrik.icon) unless neuigkeit.rubrik.icon.nil? or neuigkeit.rubrik.icon.empty? %> <%= neuigkeit.rubrik.name %> + <% unless neuigkeit.has_calentries? %> <% unless neuigkeit.try(:datum).try(:to_date).nil? %> +<%= I18n.t("neuigkeit.am") %> + +<% end %> <% else %> <% end %>
-

+

<%= neuigkeit.title%> -

- <%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%> +
+ <%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%>
<% if neuigkeit.has_calentries? %> -
- <%= fa_icon("calendar 2x") %> - <% unless neuigkeit.calentries.upcoming.empty? %> - <%= neuigkeit.calentries.upcoming.first.text %> - <% else unless neuigkeit.calentries.recent.empty? %> - <%= neuigkeit.calentries.recent.first.text %> - <% end %><% end %> -
- <% end %> +
+ <%= fa_icon("calendar 2x") %> + <% unless neuigkeit.calentries.upcoming.empty? %> + <%= neuigkeit.calentries.upcoming.first.text %> + <% else unless neuigkeit.calentries.recent.empty? %> + <%= neuigkeit.calentries.recent.first.text %> + <% end %><% end %> +
+ <% end %>
diff --git a/app/views/neuigkeiten/show.html.erb b/app/views/neuigkeiten/show.html.erb index 57e38fc..ca0dd9d 100755 --- a/app/views/neuigkeiten/show.html.erb +++ b/app/views/neuigkeiten/show.html.erb @@ -70,7 +70,7 @@ end <%= render ce unless ce.nil? %> <% end %>
-
" data-layout="standard" data-action="like" data-show-faces="true" data-share="true">
+
" data-layout="standard" data-action="like" data-show-faces="true" data-share="true">
<% unless @neuigkeit.meeting.nil? %> <%= render @neuigkeit.meeting %> diff --git a/app/views/themen/_small.html.erb b/app/views/themen/_small.html.erb index 82a4409..1c59005 100644 --- a/app/views/themen/_small.html.erb +++ b/app/views/themen/_small.html.erb @@ -1,6 +1,8 @@ <% if can? :show, small %> -

<%= link_to small.title,small %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %>

+
+ +

<%= link_to small.title,small %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %>

<%= image_tag small.titlepics.first.datei.url unless small.titlepics.first.nil? %> <% if small.is_outdated? %> @@ -68,3 +70,4 @@ <% else %> Error <% end %> +
diff --git a/app/views/themen/show.html.erb b/app/views/themen/show.html.erb index 692df6f..fd9d8d0 100644 --- a/app/views/themen/show.html.erb +++ b/app/views/themen/show.html.erb @@ -23,6 +23,14 @@

<%= notice %>

<% link_to "Zurück", @thema.themengruppe %> +
+ <% thema=@thema %>
@@ -44,6 +52,8 @@
+
" data-layout="standard" data-action="like" data-show-faces="true" data-share="true">
+
From 374f535dac585ab603281b6b6c9a16a940f67fe5 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 25 Feb 2015 11:42:20 +0100 Subject: [PATCH 4/4] sitemap add themen --- config/sitemap.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/sitemap.rb b/config/sitemap.rb index a520725..0eca29d 100644 --- a/config/sitemap.rb +++ b/config/sitemap.rb @@ -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. #