Sha256: c111dbbd6c71eca27e851b0e2df6b21ed6adcd9d5f222774be72cd7023bd3c38
Contents?: true
Size: 904 Bytes
Versions: 36
Compression:
Stored size: 904 Bytes
Contents
module Lolita module Components module Configuration # Should include routes helper and lolita urls helpers # - nested_list_options = column.list && {} || {} # - content_text = column.formatted_value(record,self) # %td{{:class => column.list && "with-nested-list"}.merge(nested_list_options)}= column.list ? link_to(content_text,"#") : content_text class ColumnComponent < Lolita::Components::Base def td_attributes(record) { :class => parent.list && "with-nested-list" }.merge(nested_list_options(record)) end def td_value(record,view) column.formatted_value(record) end def nested_list_options parent parent.list && { :"data-nested-list-url" => lolita_resources_path(column.list.mapping, column.list.nested_options_for(record)) } end end end end end
Version data entries
36 entries across 36 versions & 1 rubygems