Framework CCCS page

This commit is contained in:
Stefan Schlott 2013-09-05 09:51:17 +02:00
parent 09aba964a9
commit 8f812ab935
319 changed files with 24165 additions and 50 deletions

13
lib/location.rb Normal file
View file

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