fix themas listings
This commit is contained in:
parent
76db2afbbc
commit
aa724bdea5
3 changed files with 10 additions and 4 deletions
4
Rules
4
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
|
||||
|
||||
|
|
|
@ -3,5 +3,7 @@
|
|||
<div class="details-container details-text">
|
||||
<%= yield %>
|
||||
</div>
|
||||
<%= render '/partials/detail.*' %>
|
||||
<% verenigingen_voor_thema(item[:naam]).each do |ver| %>
|
||||
<%= render '/partials/pretty_link.*', :item => ver %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue