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

9
lib/projectpages.rb Normal file
View file

@ -0,0 +1,9 @@
def projects_by_state()
@cache_projects ||= items.select { |i| i[:kind] == 'project' }.sort_by { |i| i[:title] }
@cache_projects_by_state ||= @cache_projects.group_by { |item| item[:status] }
@cache_projects_by_state
end
def project_id(project)
project.identifier.split('/')[2]
end