Sha256: 0273cd335cae545a73d9b1ce5dd42b2e9d987586f6cc3a6e8ffe736162386e2c

Contents?: true

Size: 1.59 KB

Versions: 3

Compression:

Stored size: 1.59 KB

Contents

%dl.rbbt_accordion
  - container.lists.each do |id, list, text, options|
    - if Proc === list
      = fragment do
        - list = list.call
        - next if list.nil?
        %dt.next
          = list.respond_to?(:list_link) ? list.list_link(:length, id) : list.length
          %span.title
            - title = text || id 
            = title.sub('--', '—').sub('->', '⇨')
        %dd
          - if (defined? force and force) or list.length < 500
            - if list.respond_to? :link
              = list.link * ", "
            - else
              = list * ", "
          - else
            = modal_fragment "Too many entities to list" do
              - if list.respond_to? :link
                = list.link * ", "
              - else
                = list * ", "
    - else
      - if list.empty?
        %dt
          = 0
          %span.title
            - title = text || id 
            = title.sub('--', '&#8212;').sub('->', '&#8680;')
      - else
        %dt.next
          = list.respond_to?(:list_link) ? list.list_link(:length, id) : list.length
          %span.title
            - title = text || id 
            = title.sub('--', '&#8212;').sub('->', '&#8680;')
        %dd
          - if (defined? force and force) or list.length < 500
            - if list.respond_to? :link
              = list.link * ", "
            - else
              = list * ", "
          - else
            = reveal "Too many entities to list" do
              = fragment do
                - if list.respond_to? :link
                  = list.link * ", "
                - else
                  = list * ", "


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rbbt-rest-1.6.2 share/views/entity_partials/list_container.haml
rbbt-rest-1.6.1 share/views/entity_partials/list_container.haml
rbbt-rest-1.6.0 share/views/entity_partials/list_container.haml