Generate poster for events

This commit is contained in:
Stefan Schlott 2013-09-01 18:49:30 +02:00
parent 83cfdf7d85
commit e8fd28b96a
3 changed files with 425 additions and 3 deletions

View file

@ -1,6 +1,6 @@
def merge_item_location_data(location)
def merge_item_location_data(location, templates)
if (location && location[:location])
templates = @items['/_data/locations/'].attributes
# templates = @items['/_data/locations/'].attributes
if templates[location[:location].to_sym]
location.merge!(templates[location[:location].to_sym])
end
@ -8,6 +8,6 @@ def merge_item_location_data(location)
end
def merge_location_data()
items.select { |i| i[:kind] == 'event' }.each { |e| merge_item_location_data(e[:location]) }
items.select { |i| i[:kind] == 'event' }.each { |e| merge_item_location_data(e[:location], @items['/_data/locations/'].attributes) }
end