diff --git a/Rules b/Rules
index 5067ae1..65481e5 100644
--- a/Rules
+++ b/Rules
@@ -6,8 +6,7 @@ preprocess do
themas.each do |thema|
content = ''
attributes = {
- naam: thema,
- verenigingen: @items.filter{|i| i[:themas] and i[:themas].include?(thema)}.flatten.uniq.compact
+ naam: thema
}
identifier = "/themas/#{thema}"
@@ -42,6 +41,7 @@ end
compile '/themas/*' do
layout '/thema.*'
layout '/default.*'
+ layout '/base.*'
write ext: 'html'
end
diff --git a/layouts/thema.erb b/layouts/thema.erb
index b111144..7a6d307 100644
--- a/layouts/thema.erb
+++ b/layouts/thema.erb
@@ -3,5 +3,7 @@
<%= yield %>
- <%= render '/partials/detail.*' %>
+ <% verenigingen_voor_thema(item[:naam]).each do |ver| %>
+ <%= render '/partials/pretty_link.*', :item => ver %>
+ <% end %>
diff --git a/lib/helpers/verenigingen.rb b/lib/helpers/verenigingen.rb
index d71defe..4d6e2fa 100644
--- a/lib/helpers/verenigingen.rb
+++ b/lib/helpers/verenigingen.rb
@@ -16,6 +16,10 @@ module VerenigingenHelper
@items.find_all("**/themas/*")
end
+ def verenigingen_voor_thema(thema)
+ @items.filter{|i| i[:themas] and i[:themas].include?(thema)}.to_a
+ end
+
def konventen
@items.find_all("**/konventen/*").to_a
end
@@ -48,7 +52,7 @@ module VerenigingenHelper
"id" => x[:id]
} }.flatten.to_a
end
-
+
def abbreviation(item)
item.identifier.without_ext.split('/').last