Sha256: fbf18722a3aa80c58852729785eda3b73d98a29195cc64d5f7f63eb6d6770fc9

Contents?: true

Size: 775 Bytes

Versions: 12

Compression:

Stored size: 775 Bytes

Contents

module KonoUtils
  module Object
    module Cell
  ##
  # Contenitore principale modal, come Model riceve un oggetto che rappresente il body da renderizzare che deve rispondere
  # a to_s per restituire il contenuto del body e metodi to_footer e to_header per il contenuto degli altri componenti
  # se l'oggetto non risponde a tali metodi, non visualizziamo nemmeno il componente header o footer.
  class Modals::Container < Base


    ##
    # Id per identificare il container che raggruppa campi e bottone per cancellare
    def modal_container_id
      @_unique ||= context[:modal_container_id] = SecureRandom.uuid
    end

    def have_header?
      model.respond_to? :to_header
    end

    def have_footer?
      model.respond_to? :to_footer
    end

  end
end
end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kono_utils_bootstrap_view4-0.3.2 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.3.1 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.3 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.2.3 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.2.2 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.2.1 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.2 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.1.2 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.1.1 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.1.0 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.1.0.pre.rc.7 app/concepts/kono_utils/object/cell/modals/container.rb
kono_utils_bootstrap_view4-0.1.0.pre.rc.4 app/concepts/kono_utils/object/cell/modals/container.rb