card-mod-bootstrap 0.15.6 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +674 -0
  3. data/README.md +6 -0
  4. data/assets/script/script_load_select2.js.coffee +37 -16
  5. data/config/admin.yml +5 -0
  6. data/data/files/lumen_skin_image/image-icon.png +0 -0
  7. data/data/files/lumen_skin_image/image-large.png +0 -0
  8. data/data/files/lumen_skin_image/image-medium.png +0 -0
  9. data/data/files/lumen_skin_image/image-small.png +0 -0
  10. data/data/files/mod_bootstrap_script_asset_output/file.js +1 -1
  11. data/data/files/sandstone_skin_image/image-icon.png +0 -0
  12. data/data/files/sandstone_skin_image/image-large.png +0 -0
  13. data/data/files/sandstone_skin_image/image-medium.png +0 -0
  14. data/data/files/sandstone_skin_image/image-small.png +0 -0
  15. data/data/files/simplex_skin_image/image-icon.png +0 -0
  16. data/data/files/simplex_skin_image/image-large.png +0 -0
  17. data/data/files/simplex_skin_image/image-medium.png +0 -0
  18. data/data/files/simplex_skin_image/image-small.png +0 -0
  19. data/data/files/slate_skin_image/image-icon.png +0 -0
  20. data/data/files/slate_skin_image/image-large.png +0 -0
  21. data/data/files/slate_skin_image/image-medium.png +0 -0
  22. data/data/files/slate_skin_image/image-small.png +0 -0
  23. data/{db/migrate_core_cards → data/transform}/20170719163733_update_bootswatch_themes_to_4_beta.rb +7 -7
  24. data/{db/migrate_core_cards → data/transform}/20171110164934_customizable_skin.rb +1 -1
  25. data/{db/migrate_core_cards → data/transform}/20180423143147_add_type_customized_bootswatch_skin.rb +1 -1
  26. data/{db/migrate_core_cards → data/transform}/20180423160231_migrate_customized_bootstrap_skin.rb +1 -1
  27. data/{db/migrate_core_cards → data/transform}/20180423170283_add_type_bootswatch_skin.rb +1 -1
  28. data/{db/migrate_core_cards → data/transform}/20180425174433_delete_deprecated_skin_cards.rb +1 -1
  29. data/{db/migrate_core_cards → data/transform}/20180509090433_bootstrap_cleanup.rb +5 -5
  30. data/{db/migrate_core_cards → data/transform}/20180516153037_add_style_select2_card.rb +1 -1
  31. data/{db/migrate_core_cards → data/transform}/20180601133753_migrate_skins.rb +1 -1
  32. data/{db/migrate_core_cards → data/transform}/20201129140917_remove_script_cards.rb +1 -1
  33. data/{db/migrate_core_cards → data/transform}/20220514141025_remove_customized_bootswatch_skins.rb +2 -2
  34. data/lib/card/bootstrap/component/carousel.rb +18 -14
  35. data/lib/card/bootstrap/component/horizontal_form.rb +2 -2
  36. data/set/abstract/bs_badge/labeled_badge.haml +1 -1
  37. data/set/all/bootstrap/dropdown.rb +8 -7
  38. data/set/all/bootstrap/icon.rb +22 -5
  39. data/set/all/bootstrap/navbar.rb +3 -0
  40. data/set/type_plus_right/bootswatch_skin/colors.rb +2 -2
  41. metadata +29 -26
  42. /data/{db/migrate_core_cards → data/transform}/lib/skin.rb +0 -0
@@ -13,25 +13,11 @@ $.extend decko,
13
13
  if elem.length == 0
14
14
  return
15
15
  else if elem.length > 1
16
- decko.initSelect2($(single_el)) for single_el in elem
16
+ initSingleSelect2($(single_el)) for single_el in elem
17
17
  else
18
- opts = {
19
- dropdownAutoWidth: "true",
20
- # containerCssClass: ":all:",
21
- width: "auto",
22
- dropdownParent: elem.parent()
23
- }
18
+ initSingleSelect2 elem
24
19
 
25
- elem.attr "id", decko.uniqSelect2Id(elem.attr("id"))
26
20
 
27
- if elem.hasClass("tags")
28
- opts.tags = "true"
29
- if elem.data("placeholder")
30
- opts.placeholder = elem.data("placeholder")
31
- if elem.data("minimum-results-for-search")?
32
- opts.minimumResultsForSearch = elem.data("minimum-results-for-search")
33
-
34
- elem.select2(opts)
35
21
 
36
22
  uniqSelect2Id: (id) ->
37
23
  return id unless $("[data-select2-id=" + id + "]").length > 0
@@ -64,3 +50,38 @@ $.fn.extend
64
50
  @select2 "destroy"
65
51
  @removeAttr "data-select2-id"
66
52
  @find("option").removeAttr "data-select2-id"
53
+
54
+
55
+ initSingleSelect2 = (elem) ->
56
+ opts = {
57
+ dropdownAutoWidth: "true",
58
+ # containerCssClass: ":all:",
59
+ width: "auto",
60
+ dropdownParent: elem.parent()
61
+ }
62
+
63
+ elem.attr "id", decko.uniqSelect2Id(elem.attr("id"))
64
+
65
+ if elem.hasClass("tags")
66
+ opts.tags = "true"
67
+ if elem.data("placeholder")
68
+ opts.placeholder = elem.data("placeholder")
69
+ if elem.data("minimum-results-for-search")?
70
+ opts.minimumResultsForSearch = elem.data("minimum-results-for-search")
71
+ if elem.data("options-card")
72
+ opts.ajax =
73
+ delay: 200
74
+ cache: true
75
+ url: decko.path elem.data("options-card")
76
+ processResults: (data) ->
77
+ results: $.map(data, (card, i) ->
78
+ { id: "~" + card.id, text: card.name }
79
+ )
80
+ data: (params) ->
81
+ term: params.term
82
+ format: "json"
83
+ view: "name_match"
84
+ slot: { items: { view: "nucleus" } }
85
+
86
+
87
+ elem.select2(opts)
data/config/admin.yml ADDED
@@ -0,0 +1,5 @@
1
+ cardtypes:
2
+ styling:
3
+ - bootswatch_skin
4
+ views:
5
+ - carousel
@@ -12,7 +12,7 @@ const i=this._directionToOrder(t),n=Ce.findOne(ai,this._element),s=this._getItem
12
12
  // decko_popover.js.coffee
13
13
  (function(){$(window).ready(function(){return $("body").on("show.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover").removeClass("_show-on-hover").addClass("_show-on-hover-disabled")}),$("body").on("hide.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover-disabled").removeClass("_show-on-hover-disabled").addClass("_show-on-hover")})}),decko.slot.ready(function(o){return o.find('[data-tooltip="true"]').tooltip(),o.find('[data-bs-toggle="popover"]').popover({html:!0})})}).call(this);
14
14
  // script_load_select2.js.coffee
15
- (function(){$.fn.select2.defaults.set("theme","bootstrap-5"),decko.slot.ready(function(e){return e.find("select:not(._no-select2):not(._no-select2-init)").each(function(){return decko.initSelect2($(this))})}),decko.slot.destroy(function(e){return e.find("select:not(._no-select2)").each(function(){return $(this).deInitSelect2()})}),$.extend(decko,{initSelect2:function(e){var t,n,i,c,o;if(0!==e.length){if(e.length>1){for(c=[],t=0,n=e.length;t<n;t++)o=e[t],c.push(decko.initSelect2($(o)));return c}return i={dropdownAutoWidth:"true",width:"auto",dropdownParent:e.parent()},e.attr("id",decko.uniqSelect2Id(e.attr("id"))),e.hasClass("tags")&&(i.tags="true"),e.data("placeholder")&&(i.placeholder=e.data("placeholder")),null!=e.data("minimum-results-for-search")&&(i.minimumResultsForSearch=e.data("minimum-results-for-search")),e.select2(i)}},uniqSelect2Id:function(e){return $("[data-select2-id="+e+"]").length>0?decko.uniqSelect2Id(e+"1"):e}}),$(window).ready(function(){return $("body").on("select2:select","._go-to-selected",function(){var e;if(""!==(e=$(this).val()))return window.location=decko.path(escape(e))}),$("body").on("select2:select","._submit-on-select",function(e){return $(e.target).closest("form").submit()})}),$.fn.extend({cloneSelect2:function(e,t){var n,i;return(i=this.is("select")?this:this.find("select")).deInitSelect2(),n=this.clone(e,t),decko.initSelect2(i),n.is("select")?decko.initSelect2(n):decko.initSelect2(n.find("select")),n},deInitSelect2:function(){if(this.attr("data-select2-id"))return this.select2("destroy"),this.removeAttr("data-select2-id"),this.find("option").removeAttr("data-select2-id")}})}).call(this);
15
+ (function(){var t;$.fn.select2.defaults.set("theme","bootstrap-5"),decko.slot.ready(function(t){return t.find("select:not(._no-select2):not(._no-select2-init)").each(function(){return decko.initSelect2($(this))})}),decko.slot.destroy(function(t){return t.find("select:not(._no-select2)").each(function(){return $(this).deInitSelect2()})}),$.extend(decko,{initSelect2:function(e){var n,i,c,o;if(0!==e.length){if(e.length>1){for(c=[],n=0,i=e.length;n<i;n++)o=e[n],c.push(t($(o)));return c}return t(e)}},uniqSelect2Id:function(t){return $("[data-select2-id="+t+"]").length>0?decko.uniqSelect2Id(t+"1"):t}}),$(window).ready(function(){return $("body").on("select2:select","._go-to-selected",function(){var t;if(""!==(t=$(this).val()))return window.location=decko.path(escape(t))}),$("body").on("select2:select","._submit-on-select",function(t){return $(t.target).closest("form").submit()})}),$.fn.extend({cloneSelect2:function(t,e){var n,i;return(i=this.is("select")?this:this.find("select")).deInitSelect2(),n=this.clone(t,e),decko.initSelect2(i),n.is("select")?decko.initSelect2(n):decko.initSelect2(n.find("select")),n},deInitSelect2:function(){if(this.attr("data-select2-id"))return this.select2("destroy"),this.removeAttr("data-select2-id"),this.find("option").removeAttr("data-select2-id")}}),t=function(t){var e;return e={dropdownAutoWidth:"true",width:"auto",dropdownParent:t.parent()},t.attr("id",decko.uniqSelect2Id(t.attr("id"))),t.hasClass("tags")&&(e.tags="true"),t.data("placeholder")&&(e.placeholder=t.data("placeholder")),null!=t.data("minimum-results-for-search")&&(e.minimumResultsForSearch=t.data("minimum-results-for-search")),t.data("options-card")&&(e.ajax={delay:200,cache:!0,url:decko.path(t.data("options-card")),processResults:function(t){return{results:$.map(t,function(t){return{id:"~"+t.id,text:t.name}})}},data:function(t){return{term:t.term,format:"json",view:"name_match",slot:{items:{view:"nucleus"}}}}}),t.select2(e)}}).call(this);
16
16
  // bootstrap-colorpicker.min.js
17
17
  /*!
18
18
  * Bootstrap Colorpicker v2.5.2
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "lib/skin"
4
4
 
5
- class UpdateBootswatchThemesTo4Beta < Cardio::Migration::Core
5
+ class UpdateBootswatchThemesTo4Beta < Cardio::Migration::Transform
6
6
  def up
7
7
  remove_old_stuff
8
8
  update_bootstrap_cards
@@ -22,11 +22,11 @@ class UpdateBootswatchThemesTo4Beta < Cardio::Migration::Core
22
22
  ensure_scss "bootstrap: #{n}", codename: "bootstrap_#{n}"
23
23
  delete_code_card "style: bootstrap #{n}"
24
24
  end
25
- if Card::Codename.exist? :bootstrap_cards
26
- update_card! :bootstrap_cards,
27
- name: "style: bootstrap cards",
28
- codename: "style_bootstrap_cards"
29
- end
25
+ return unless Card::Codename.exist? :bootstrap_cards
26
+
27
+ update_card! :bootstrap_cards,
28
+ name: "style: bootstrap cards",
29
+ codename: "style_bootstrap_cards"
30
30
  end
31
31
 
32
32
  def remove_old_stuff
@@ -48,7 +48,7 @@ class UpdateBootswatchThemesTo4Beta < Cardio::Migration::Core
48
48
  def add_icon_cards
49
49
  %w[font_awesome material_icons].each do |name|
50
50
  ensure_css name.tr("_", " "), codename: name
51
- Card["themeless bootstrap skin"].add_item! name.tr("_", " ")
51
+ Card["themeless bootstrap skin"]&.add_item! name.tr("_", " ")
52
52
  end
53
53
  end
54
54
  end
@@ -1,7 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  # Migration to create cards for a customizable skin
4
- class CustomizableSkin < Cardio::Migration::Core
4
+ class CustomizableSkin < Cardio::Migration::Transform
5
5
  def up
6
6
  # data_dir = File.expand_path("../data/custom_theme", __FILE__)
7
7
  # skin = CustomSkin.new("customizable bootstrap", data_dir)
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "lib/skin"
4
4
 
5
- class AddTypeCustomizedBootswatchSkin < Cardio::Migration::Core
5
+ class AddTypeCustomizedBootswatchSkin < Cardio::Migration::Transform
6
6
  def up
7
7
  rename_customized_bootswatch_skin
8
8
  Card.ensure name: "*stylesheets", codename: "stylesheets"
@@ -32,7 +32,7 @@ class Skin
32
32
  # end
33
33
  end
34
34
 
35
- class MigrateCustomizedBootstrapSkin < Cardio::Migration::Core
35
+ class MigrateCustomizedBootstrapSkin < Cardio::Migration::Transform
36
36
  NEW_SKIN = "customized bootstrap skin".freeze
37
37
  OLD_SKIN = :customizable_bootstrap_skin
38
38
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "lib/skin"
4
4
 
5
- class AddTypeBootswatchSkin < Cardio::Migration::Core
5
+ class AddTypeBootswatchSkin < Cardio::Migration::Transform
6
6
  STYLE_INPUT_SEARCH = <<-JSON.strip_heredoc
7
7
  {
8
8
  "type": {
@@ -18,7 +18,7 @@ class Skin
18
18
  end
19
19
  end
20
20
 
21
- class DeleteDeprecatedSkinCards < Cardio::Migration::Core
21
+ class DeleteDeprecatedSkinCards < Cardio::Migration::Transform
22
22
  def up
23
23
  Skin.each(&:delete_deprecated_skin_cards)
24
24
  Skin.new("bootstrap default").delete_deprecated_skin_cards
@@ -1,14 +1,14 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
- class BootstrapCleanup < Cardio::Migration::Core
3
+ class BootstrapCleanup < Cardio::Migration::Transform
4
4
  def up
5
5
  delete_code_card :bootstrap_breakpoints
6
6
  delete_code_card :bootstrap_variables
7
7
  delete_code_card :bootstrap_mixins
8
8
  Card.ensure name: "script: bootstrap", codename: "script_bootstrap"
9
- if (card = Card.fetch(:all, :script))
10
- card.drop_item! "script: bootstrap"
11
- card.drop_item! "script: jquery helper"
12
- end
9
+ return unless (card = Card.fetch :all, :script)
10
+
11
+ card.drop_item! "script: bootstrap"
12
+ card.drop_item! "script: jquery helper"
13
13
  end
14
14
  end
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
- class AddStyleSelect2Card < Cardio::Migration::Core
3
+ class AddStyleSelect2Card < Cardio::Migration::Transform
4
4
  def up
5
5
  Card.ensure name: "style: select2",
6
6
  type_id: Card::ScssID,
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
- class MigrateSkins < Cardio::Migration::Core
3
+ class MigrateSkins < Cardio::Migration::Transform
4
4
  def up
5
5
  Card.search(link_to: "bootstrap default skin", type_id: Card::SkinID) do |card|
6
6
  card.drop_item! "bootstrap default skin"
@@ -1,5 +1,5 @@
1
1
 
2
- class RemoveScriptCards < Cardio::Migration::Core
2
+ class RemoveScriptCards < Cardio::Migration::Transform
3
3
  def up
4
4
  delete_code_card :script_select2
5
5
  delete_code_card :script_bootstrap
@@ -1,5 +1,5 @@
1
1
 
2
- class RemoveCustomizedBootswatchSkins < Cardio::Migration::Core
2
+ class RemoveCustomizedBootswatchSkins < Cardio::Migration::Transform
3
3
  def up
4
4
  Card.ensure! codename: "parent", name: "parent"
5
5
  return unless Card::Codename[:customized_bootswatch_skin]
@@ -9,7 +9,7 @@ class RemoveCustomizedBootswatchSkins < Cardio::Migration::Core
9
9
  end
10
10
 
11
11
  def convert_bootswatch_skins
12
- Card.search(type_id: ::Card::CustomizedBootswatchSkinID) do |card|
12
+ Card.search(type: :customized_bootswatch_skin) do |card|
13
13
  update_args = { type_id: Card::BootswatchSkinID, skip: :asset_input_changed }
14
14
  parent = find_parent(card.name)
15
15
  if parent && parent.id != card.id
@@ -12,7 +12,7 @@ class Card
12
12
  @items = []
13
13
  instance_exec(&block)
14
14
 
15
- @html.div class: "carousel slide", id: id, "data-ride" => "carousel" do
15
+ @html.div class: "carousel slide", id: id, "data-bs-ride" => "true" do
16
16
  indicators
17
17
  items
18
18
  control_prev
@@ -25,7 +25,7 @@ class Card
25
25
  end
26
26
 
27
27
  def items
28
- @html.div class: "carousel-inner", role: "listbox" do
28
+ @html.div class: "carousel-inner" do
29
29
  @items.each_with_index do |item, index|
30
30
  carousel_item item, carousel_item_opts(index)
31
31
  end
@@ -46,31 +46,35 @@ class Card
46
46
  end
47
47
 
48
48
  def control_prev
49
- @html.a class: "carousel-control-prev", href: "##{@id}", role: "button",
50
- "data-slide" => "prev" do
51
- @html.span class: "carousel-control-prev-icon", "aria-hidden" => "true"
52
- @html.span "Previous", class: "sr-only"
53
- end
49
+ control_button :prev, "Previous"
54
50
  end
55
51
 
56
52
  def control_next
57
- @html.a class: "carousel-control-next", href: "##{@id}", role: "button",
58
- "data-slide": "next" do
59
- @html.span class: "carousel-control-next-icon", "aria-hidden" => "true"
60
- @html.span "Next", class: "sr-only"
53
+ control_button :next, "Next"
54
+ end
55
+
56
+ def control_button direction, description
57
+ @html.button class: "carousel-control-#{direction}",
58
+ "data-bs-target": "##{@id}", type: "button" do
59
+ @html.span class: "carousel-control-#{direction}-icon",
60
+ "aria-hidden": "true" do
61
+ ""
62
+ end
63
+ @html.span description, class: "visually-hidden"
61
64
  end
62
65
  end
63
66
 
64
67
  def indicators
65
- @html.ol class: "carousel-indicators" do
68
+ @html.div class: "carousel-indicators" do
66
69
  @items.size.times { |i| indicator i }
67
70
  end
68
71
  end
69
72
 
70
73
  def indicator index
71
- html_opts = { "data-slide-to" => index, "data-bs-target": "##{@id}" }
74
+ html_opts = { "data-bs-slide-to": index, "data-bs-target": "##{@id}",
75
+ type: "button", "aria-label": "Slide #{index + 1}" }
72
76
  add_class html_opts, "active" if index == @active_item_index
73
- @html.li html_opts
77
+ @html.button html_opts
74
78
  end
75
79
  end
76
80
  end
@@ -24,11 +24,11 @@ class Card
24
24
  # { class: "col-sm-#{right_col_width}" }
25
25
  # end
26
26
 
27
- def label_col label, id:
27
+ def label_col label, id: nil
28
28
  @html.label label, for: id, class: "col-sm-#{left_col_width} control-label"
29
29
  end
30
30
 
31
- def input type, label:, id:
31
+ def input type, label: nil, id: nil
32
32
  label_col label, id: id
33
33
  @html.div class: "col-sm-#{right_col_width}" do
34
34
  @html.input type: type, id: id, class: "form-control"
@@ -1,4 +1,4 @@
1
- %span.labeled-badge{ class: klass, title: title }
1
+ %span.labeled-badge{ class: klass, title: title, "data-bs-toggle": "tooltip", "data-bs-placement": "bottom" }
2
2
  %label
3
3
  = label
4
4
  %span.badge{ class: "bg-#{color}" }
@@ -25,13 +25,14 @@ format :html do
25
25
  content_tag(:h6, text, class: "dropdown-header")
26
26
  end
27
27
 
28
- def split_dropdown_button_toggle
29
- wrap_with :a,
30
- href: "#",
31
- class: "dropdown-toggle #{classy 'dropdown-toggle-split'}",
32
- "data-bs-toggle" => "dropdown",
33
- "aria-haspopup" => "true",
34
- "aria-expanded" => "false" do
28
+ def split_dropdown_button_toggle div_attributes={}
29
+ wrap_with :a, div_attributes.reverse_merge(
30
+ href: "#",
31
+ class: "dropdown-toggle #{classy 'dropdown-toggle-split'}",
32
+ "data-bs-toggle" => "dropdown",
33
+ "aria-haspopup" => "true",
34
+ "aria-expanded" => "false"
35
+ ) do
35
36
  '<span class="sr-only">Toggle Dropdown</span>'
36
37
  end
37
38
  end
@@ -3,7 +3,8 @@ basket[:icons] = {
3
3
  plus: :add,
4
4
  pencil: :edit,
5
5
  trash: :delete,
6
- new_window: :open_in_new,
6
+ full_page: :open_in_full,
7
+ new_window: :close_fullscreen,
7
8
  history: :history,
8
9
  collapse: :expand_less,
9
10
  expand: :expand_more,
@@ -20,8 +21,8 @@ basket[:icons] = {
20
21
  update_action: :edit,
21
22
  delete_action: :remove_circle,
22
23
  draft: :build,
23
- next: :chevron_right,
24
- previous: :chevron_left,
24
+ next: :arrow_forward_ios,
25
+ previous: :arrow_back_ios,
25
26
  forward: :arrow_forward,
26
27
  back: :arrow_back,
27
28
  list: :list,
@@ -30,7 +31,10 @@ basket[:icons] = {
30
31
  quick_filter: :bolt,
31
32
  reset: :restart_alt,
32
33
  more: :more_horiz,
33
- menu: :more_vert
34
+ menu: :more_vert,
35
+ bar_menu: :more_horiz,
36
+ show_password: :visibility,
37
+ hide_password: :visibility_off
34
38
  },
35
39
  #
36
40
  font_awesome: {
@@ -60,7 +64,9 @@ basket[:icons] = {
60
64
  draft: :wrench,
61
65
  filter: :filter,
62
66
  reset: "sync-alt",
63
- quick_filter: :bolt
67
+ quick_filter: :bolt,
68
+ show_password: "eye",
69
+ hide_password: "eye-slash"
64
70
  },
65
71
  #
66
72
  bootstrap: {
@@ -79,6 +85,17 @@ basket[:icons] = {
79
85
  format :html do
80
86
  view :icons, template: :haml
81
87
 
88
+ # Generates an HTML tag for an icon with optional parameters.
89
+ #
90
+ # @param [String] icon_key The key representing the desired icon.
91
+ # @param [Hash] opts The options for the icon tag.
92
+ # @option opts [String] :class Additional CSS classes for the icon tag.
93
+ # @option opts [String] :style Additional inline styles for the icon tag.
94
+ #
95
+ # @return [String] The HTML code for the icon tag.
96
+ #
97
+ # @example
98
+ # icon_tag(:heart, class: 'favorite-icon', style: 'color: red')
82
99
  def icon_tag icon_key, opts={}
83
100
  return "" unless icon_key.present?
84
101
 
@@ -40,6 +40,9 @@ format :html do
40
40
  end
41
41
  end
42
42
 
43
+ # Generates HTML markup for a breadcrumb trail.
44
+ # @param items [list]: A list of items representing the breadcrumb trail.
45
+ # @return [String] HTML markup for the breadcrumb trail.
43
46
  def breadcrumb items
44
47
  wrap_with :ol, class: "breadcrumb" do
45
48
  items.map do |item|
@@ -63,11 +63,11 @@ def virtual?
63
63
  new?
64
64
  end
65
65
 
66
- def ok_to_create
66
+ def ok_to_create?
67
67
  left.parent? && super
68
68
  end
69
69
 
70
- def ok_to_update
70
+ def ok_to_update?
71
71
  left.parent? && super
72
72
  end
73
73
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.6
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-05-02 00:00:00.000000000 Z
13
+ date: 2024-06-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,70 +18,70 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.6
21
+ version: 1.107.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.105.6
28
+ version: 1.107.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-edit
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.15.6
35
+ version: 0.17.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.15.6
42
+ version: 0.17.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-bar_and_box
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.15.6
49
+ version: 0.17.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.15.6
56
+ version: 0.17.0
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-style
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.15.6
63
+ version: 0.17.0
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.15.6
70
+ version: 0.17.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: card-mod-script
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.15.6
77
+ version: 0.17.0
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.15.6
84
+ version: 0.17.0
85
85
  description: ''
86
86
  email:
87
87
  - info@decko.org
@@ -89,6 +89,8 @@ executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
+ - LICENSE
93
+ - README.md
92
94
  - assets/script/decko_modal.js.coffee
93
95
  - assets/script/decko_popover.js.coffee
94
96
  - assets/script/manifest.yml
@@ -100,6 +102,7 @@ files:
100
102
  - assets/style/font_awesome.css
101
103
  - assets/style/manifest.yml
102
104
  - assets/style/material_icons.css
105
+ - config/admin.yml
103
106
  - config/locales/de.yml
104
107
  - config/locales/en.yml
105
108
  - data/files/cerulean_skin_image/image-icon.png
@@ -220,18 +223,18 @@ files:
220
223
  - data/files/yeti_skin_image/image-small.png
221
224
  - data/real.yml
222
225
  - data/test.yml
223
- - db/migrate_core_cards/20170719163733_update_bootswatch_themes_to_4_beta.rb
224
- - db/migrate_core_cards/20171110164934_customizable_skin.rb
225
- - db/migrate_core_cards/20180423143147_add_type_customized_bootswatch_skin.rb
226
- - db/migrate_core_cards/20180423160231_migrate_customized_bootstrap_skin.rb
227
- - db/migrate_core_cards/20180423170283_add_type_bootswatch_skin.rb
228
- - db/migrate_core_cards/20180425174433_delete_deprecated_skin_cards.rb
229
- - db/migrate_core_cards/20180509090433_bootstrap_cleanup.rb
230
- - db/migrate_core_cards/20180516153037_add_style_select2_card.rb
231
- - db/migrate_core_cards/20180601133753_migrate_skins.rb
232
- - db/migrate_core_cards/20201129140917_remove_script_cards.rb
233
- - db/migrate_core_cards/20220514141025_remove_customized_bootswatch_skins.rb
234
- - db/migrate_core_cards/lib/skin.rb
226
+ - data/transform/20170719163733_update_bootswatch_themes_to_4_beta.rb
227
+ - data/transform/20171110164934_customizable_skin.rb
228
+ - data/transform/20180423143147_add_type_customized_bootswatch_skin.rb
229
+ - data/transform/20180423160231_migrate_customized_bootstrap_skin.rb
230
+ - data/transform/20180423170283_add_type_bootswatch_skin.rb
231
+ - data/transform/20180425174433_delete_deprecated_skin_cards.rb
232
+ - data/transform/20180509090433_bootstrap_cleanup.rb
233
+ - data/transform/20180516153037_add_style_select2_card.rb
234
+ - data/transform/20180601133753_migrate_skins.rb
235
+ - data/transform/20201129140917_remove_script_cards.rb
236
+ - data/transform/20220514141025_remove_customized_bootswatch_skins.rb
237
+ - data/transform/lib/skin.rb
235
238
  - lib/card/bootstrap.rb
236
239
  - lib/card/bootstrap/basic_tags.rb
237
240
  - lib/card/bootstrap/component.rb
@@ -3950,14 +3953,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
3950
3953
  requirements:
3951
3954
  - - ">="
3952
3955
  - !ruby/object:Gem::Version
3953
- version: '2.5'
3956
+ version: '3.0'
3954
3957
  required_rubygems_version: !ruby/object:Gem::Requirement
3955
3958
  requirements:
3956
3959
  - - ">="
3957
3960
  - !ruby/object:Gem::Version
3958
3961
  version: '0'
3959
3962
  requirements: []
3960
- rubygems_version: 3.2.33
3963
+ rubygems_version: 3.5.10
3961
3964
  signing_key:
3962
3965
  specification_version: 4
3963
3966
  summary: Bootstrap