app/views/media_resources/_list.html.haml
:ruby
with_actions = (defined? with_actions and with_actions)
media_resources = (defined? media_resources and media_resources)
as = (defined? as and as)
catalog_set = (defined? catalog_set and catalog_set)
category_set = (defined? category_set and category_set)
layout = (defined? layout and layout) || "grid"
res_link_type = (defined? res_link_type and res_link_type)
no_content_msg = (defined? no_content_msg and no_content_msg)
%ul.ui-resources{:class => with_actions ? "active #{layout}" : "#{layout}"}
- if media_resources.count > 0
- media_resources.each do |mr|
- case as
- when :category
= render "filter_sets/category", category: mr, catalog_set: catalog_set
- when :section
= render :partial => "filter_sets/section", :locals => {:section => mr, :category_set => category_set, :catalog_set => catalog_set}
- when :featured_set
= render :partial => "media_resources/media_resource",
:locals => {:media_resource => mr, :with_actions => with_actions, :link => media_resource_path(mr.id)}
- else
= render :partial => "media_resources/media_resource",
:locals => {:media_resource => mr, :with_actions => with_actions, :res_link_type=> res_link_type}
- else
.ui-container.ptm.pbh
.title-m.by-center= no_content_msg || _("Keine Inhalte.")