- list = card.list - list_id = card.list_id .entity_list_card.ui.very.basic.segment(id="#{ list_id.gsub(/\s/,'_') }_card" data-list=list_id data-list-type="#{list.base_type}") /-- title -- .title.ui.header .name = list.base_type List .long_name = Misc.humanize list_id .content /-- sidebar -- .ui.segment.info .meta .list_management.ui.small.buttons.flex-wrap %a.compare_list.ui.button(href="#" data-reveal-id='modal1') Compare %a.list_list.ui.button(href="#{request.path_info + "?_format=list"}") List - if list.respond_to? :name %a.name_list.ui.button(href="#{request.path_info + "?_format=name"}") Name - if list.respond_to? :ensembl %a.ensembl_list.ui.button(href="#{request.path_info + "?_format=ensembl"}") Ensembl %a.download_list.ui.button(href="#{request.path_info + "?_format=raw"}") Raw %a.edit_list.ui.button(href="#") Edit .entity_info - info = list.info.dup - info.delete :annotated_array - info.delete :annotation_types = hash2dl(info) - case card.meta - when nil - when Hash = hash2dl(card.meta) - when Proc = capture_haml &card.meta .entities %p #{list.length} entities - if (defined? force and force) or list.length < 500 %ul.entity_list.clean_list - list = list.sort_by{|g| g.name || "Z" << g} if list.respond_to? :name - list.link.each do |link| %li= link - else %p = reveal "Too many entities to list (#{list.length})" do = fragment do - list = list.sort_by{|g| g.name || "Z" << g} if list.respond_to? :name %ul.entity_list.clean_list - list.link.each do |link| %li= link - if card.list_container .entity_lists = list_container_render(card.list_container) /-- description -- .description.ui.basic.segment< - case card.description - when nil - if list.length == list.uniq.length %p== #{ list.length } elements - else %p== #{ list.length } elements (#{list.uniq.length} unique) - when String %p= card.description - when Proc = capture_haml &card.description - if card.action_controller /-- actions -- = action_controller_render(card.action_controller)