Sha256: f40797c672683fb46da159431e3335280e94a65d6e0660888e258907f7543653

Contents?: true

Size: 865 Bytes

Versions: 12

Compression:

Stored size: 865 Bytes

Contents

# -*- encoding : utf-8 -*-

class AddNotificationEventCard < Cardio::Migration::Core
  def up
    ensure_card "Notification template", codename: "notification_template",
                                         type_id: Card::CardtypeID
    ensure_trait "*message", "message", default: { type_id: Card::PhraseID }
    ensure_trait "*disappear", "disappear", default: { type_id: Card::ToggleID }
    ensure_trait "*contextual class", "contextual_class",
                 default: { type_id: Card::PointerID },
                 input: "radio",
                 options: { type_id: Card::PointerID,
                            content: %w[success info warning danger] }

    %i[create update delete].each do |action|
      update ["on_#{action}".to_sym, :right, :help],
             content: "Configure events to be executed when card id #{action}d"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
card-1.104.2 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.104.1 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.104.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.103.4 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.103.3 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.103.2 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.103.1 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.103.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.101.7 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.102.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.101.6 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.101.5 db/migrate_core_cards/20170314175313_add_notification_event_card.rb