- entity = card.entity - entity_id = "entity__" + entity.id - default = entity.respond_to?(:default)? entity.default || entity.to_s : entity.to_s .entity_card.ui.very.basic.segment(data-entity=entity data-entity-id=default data-entity-type="#{entity.base_type}" data-entity-format="#{entity.respond_to?(:format) ? entity.format : ""}" data-entity-info="#{entity.info.to_json}") /-- title -- .ui.header.title .name - case card.name - when nil = entity.respond_to?(:name) ? entity.name || entity : entity - when String = card.name - when Proc = fragment :name, &card.name .long_name - case card.long_name - when nil = entity.respond_to?(:long_name) ? entity.long_name : nil - when String = card.long_name - when Proc = fragment :long_name, &card.long_name .content - info = entity.info.dup - info.delete :annotated_array - info.delete :annotation_types - if info.any? or card.meta /-- sidebar -- .info.ui.compact.segment .meta - if info.any? .entity_info = hash2dl(info) - case card.meta - when nil - when Hash = hash2dl(card.meta) - when Proc = fragment :meta, &card.meta - if card.list_container = list_container_render(card.list_container) /-- content -- - case card.description - when nil - if entity.respond_to?(:description) and entity.description /-- description -- .description.ui.compact.basic.segment< %p= entity.description - when String /-- description -- .description.ui.compact.basic.segment< :documentation #{card.description} - when Proc /-- description -- .description.ui.compact.basic.segment< = fragment :description, &card.description - if defined? block and block /-- content block -- .description.ui.compact.basic.segment< = capture_haml &block - if card.action_controller /-- actions -- = action_controller_render(card.action_controller)