headmin 0.5.2 → 0.5.3

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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/.lock-487e157d270f3062a98b7b2a012753708-1272821827 +0 -0
  3. data/Gemfile.lock +2 -2
  4. data/app/helpers/headmin/form_helper.rb +2 -2
  5. data/app/models/concerns/headmin/field.rb +2 -1
  6. data/app/models/concerns/headmin/fieldable.rb +10 -10
  7. data/app/views/examples/admin.html.erb +18 -18
  8. data/app/views/examples/auth.html.erb +3 -3
  9. data/app/views/headmin/_blocks.html.erb +2 -2
  10. data/app/views/headmin/_breadcrumbs.html.erb +3 -3
  11. data/app/views/headmin/_dropdown.html.erb +2 -2
  12. data/app/views/headmin/_filters.html.erb +7 -7
  13. data/app/views/headmin/_form.html.erb +2 -2
  14. data/app/views/headmin/_heading.html.erb +1 -1
  15. data/app/views/headmin/_index.html.erb +1 -1
  16. data/app/views/headmin/_notifications.html.erb +1 -1
  17. data/app/views/headmin/_pagination.html.erb +3 -3
  18. data/app/views/headmin/_popup.html.erb +4 -4
  19. data/app/views/headmin/_table.html.erb +2 -2
  20. data/app/views/headmin/_thumbnail.html.erb +1 -1
  21. data/app/views/headmin/dropdown/_button.html.erb +2 -2
  22. data/app/views/headmin/dropdown/_devise.html.erb +8 -8
  23. data/app/views/headmin/dropdown/_item.html.erb +2 -2
  24. data/app/views/headmin/dropdown/_list.html.erb +3 -3
  25. data/app/views/headmin/dropdown/_locale.html.erb +6 -6
  26. data/app/views/headmin/filters/_base.html.erb +20 -20
  27. data/app/views/headmin/filters/_boolean.html.erb +4 -4
  28. data/app/views/headmin/filters/_date.html.erb +4 -4
  29. data/app/views/headmin/filters/_flatpickr.html.erb +4 -4
  30. data/app/views/headmin/filters/_number.html.erb +4 -4
  31. data/app/views/headmin/filters/_options.html.erb +4 -4
  32. data/app/views/headmin/filters/_search.html.erb +3 -3
  33. data/app/views/headmin/filters/_text.html.erb +4 -4
  34. data/app/views/headmin/filters/filter/_button.html.erb +2 -2
  35. data/app/views/headmin/filters/filter/_null_select.html.erb +2 -2
  36. data/app/views/headmin/forms/_autocomplete.html.erb +2 -2
  37. data/app/views/headmin/forms/_blocks.html.erb +4 -4
  38. data/app/views/headmin/forms/_checkbox.html.erb +5 -5
  39. data/app/views/headmin/forms/_color.html.erb +5 -5
  40. data/app/views/headmin/forms/_date.html.erb +8 -8
  41. data/app/views/headmin/forms/_date_range.html.erb +3 -3
  42. data/app/views/headmin/forms/_datetime.html.erb +8 -8
  43. data/app/views/headmin/forms/_datetime_range.html.erb +3 -3
  44. data/app/views/headmin/forms/_email.html.erb +9 -9
  45. data/app/views/headmin/forms/_errors.html.erb +1 -1
  46. data/app/views/headmin/forms/_file.html.erb +16 -16
  47. data/app/views/headmin/forms/_flatpickr.html.erb +2 -2
  48. data/app/views/headmin/forms/_flatpickr_range.html.erb +8 -8
  49. data/app/views/headmin/forms/_hidden.html.erb +1 -1
  50. data/app/views/headmin/forms/_hint.html.erb +1 -1
  51. data/app/views/headmin/forms/_label.html.erb +1 -1
  52. data/app/views/headmin/forms/_media.html.erb +11 -11
  53. data/app/views/headmin/forms/_number.html.erb +8 -8
  54. data/app/views/headmin/forms/_password.html.erb +7 -7
  55. data/app/views/headmin/forms/_redactorx.html.erb +2 -2
  56. data/app/views/headmin/forms/_repeater.html.erb +20 -20
  57. data/app/views/headmin/forms/_search.html.erb +9 -9
  58. data/app/views/headmin/forms/_select.html.erb +8 -8
  59. data/app/views/headmin/forms/_switch.html.erb +2 -2
  60. data/app/views/headmin/forms/_text.html.erb +9 -9
  61. data/app/views/headmin/forms/_textarea.html.erb +7 -7
  62. data/app/views/headmin/forms/_url.html.erb +9 -9
  63. data/app/views/headmin/forms/_validation.html.erb +1 -1
  64. data/app/views/headmin/forms/_wysiwyg.html.erb +2 -2
  65. data/app/views/headmin/forms/fields/_base.html.erb +2 -2
  66. data/app/views/headmin/forms/fields/_file.html.erb +3 -3
  67. data/app/views/headmin/forms/fields/_files.html.erb +3 -3
  68. data/app/views/headmin/forms/fields/_group.html.erb +7 -7
  69. data/app/views/headmin/forms/fields/_list.html.erb +5 -5
  70. data/app/views/headmin/forms/fields/_text.html.erb +3 -3
  71. data/app/views/headmin/forms/media/_item.html.erb +4 -4
  72. data/app/views/headmin/forms/media/_validation.html.erb +4 -4
  73. data/app/views/headmin/forms/repeater/_row.html.erb +5 -5
  74. data/app/views/headmin/heading/_title.html.erb +2 -2
  75. data/app/views/headmin/layout/_main.html.erb +1 -1
  76. data/app/views/headmin/media/_item.html.erb +1 -1
  77. data/app/views/headmin/media/_media_item_modal.html.erb +12 -12
  78. data/app/views/headmin/media/_modal.html.erb +10 -10
  79. data/app/views/headmin/media/create.turbo_stream.erb +2 -2
  80. data/app/views/headmin/media/index.html.erb +1 -1
  81. data/app/views/headmin/media/update.turbo_stream.erb +1 -1
  82. data/app/views/headmin/nav/_dropdown.html.erb +7 -7
  83. data/app/views/headmin/nav/_item.html.erb +5 -5
  84. data/app/views/headmin/nav/item/_devise.html.erb +6 -6
  85. data/app/views/headmin/nav/item/_locale.html.erb +6 -6
  86. data/app/views/headmin/pagination/_per_page.html.erb +7 -7
  87. data/app/views/headmin/pagination/kaminari/_first_page.html.erb +2 -2
  88. data/app/views/headmin/pagination/kaminari/_gap.html.erb +1 -1
  89. data/app/views/headmin/pagination/kaminari/_last_page.html.erb +2 -2
  90. data/app/views/headmin/pagination/kaminari/_next_page.html.erb +3 -3
  91. data/app/views/headmin/pagination/kaminari/_page.html.erb +2 -2
  92. data/app/views/headmin/pagination/kaminari/_paginator.html.erb +1 -1
  93. data/app/views/headmin/pagination/kaminari/_prev_page.html.erb +2 -2
  94. data/app/views/headmin/table/_actions.html.erb +11 -11
  95. data/app/views/headmin/table/_body.html.erb +1 -1
  96. data/app/views/headmin/table/actions/_action.html.erb +4 -4
  97. data/app/views/headmin/table/actions/_delete.html.erb +2 -2
  98. data/app/views/headmin/table/actions/_export.html.erb +2 -2
  99. data/app/views/headmin/table/body/_association.html.erb +1 -1
  100. data/app/views/headmin/table/body/_boolean.erb +4 -4
  101. data/app/views/headmin/table/body/_date.html.erb +2 -2
  102. data/app/views/headmin/table/body/_row.html.erb +3 -3
  103. data/app/views/headmin/table/body/_string.html.erb +1 -1
  104. data/app/views/headmin/table/foot/_cell.html.erb +1 -1
  105. data/app/views/headmin/table/head/_cell.html.erb +1 -1
  106. data/app/views/headmin/table/head/cell/_asc.html.erb +2 -2
  107. data/app/views/headmin/table/head/cell/_default.html.erb +1 -1
  108. data/app/views/headmin/table/head/cell/_desc.html.erb +1 -1
  109. data/app/views/headmin/views/devise/confirmations/_new.html.erb +4 -4
  110. data/app/views/headmin/views/devise/passwords/_edit.html.erb +5 -5
  111. data/app/views/headmin/views/devise/passwords/_new.html.erb +4 -4
  112. data/app/views/headmin/views/devise/registrations/_edit.html.erb +10 -10
  113. data/app/views/headmin/views/devise/registrations/_new.html.erb +6 -6
  114. data/app/views/headmin/views/devise/sessions/_new.html.erb +5 -5
  115. data/app/views/headmin/views/devise/shared/_links.html.erb +11 -11
  116. data/app/views/headmin/views/devise/unlocks/_new.html.erb +4 -4
  117. data/lib/generators/templates/views/auth/confirmations/new.html.erb +1 -1
  118. data/lib/generators/templates/views/auth/mailer/confirmation_instructions.html.erb +1 -1
  119. data/lib/generators/templates/views/auth/mailer/email_changed.html.erb +1 -1
  120. data/lib/generators/templates/views/auth/mailer/password_change.html.erb +1 -1
  121. data/lib/generators/templates/views/auth/mailer/reset_password_instructions.html.erb +1 -1
  122. data/lib/generators/templates/views/auth/mailer/unlock_instructions.html.erb +1 -1
  123. data/lib/generators/templates/views/auth/passwords/edit.html.erb +1 -1
  124. data/lib/generators/templates/views/auth/passwords/new.html.erb +1 -1
  125. data/lib/generators/templates/views/auth/registrations/edit.html.erb +1 -1
  126. data/lib/generators/templates/views/auth/registrations/new.html.erb +1 -1
  127. data/lib/generators/templates/views/auth/sessions/new.html.erb +1 -1
  128. data/lib/generators/templates/views/auth/unlocks/new.html.erb +1 -1
  129. data/lib/generators/templates/views/layouts/auth.html.erb +3 -3
  130. data/lib/headmin/version.rb +1 -1
  131. data/package.json +1 -1
  132. metadata +3 -2
@@ -22,18 +22,18 @@
22
22
  # ==== Examples
23
23
  # Basic version
24
24
  # <%= form_with do |form| %#>
25
- # <%= render 'headmin/forms/password', form: form, attribute: :password %#>
25
+ # <%= render "headmin/forms/password", form: form, attribute: :password %#>
26
26
  # <% end %#>
27
27
 
28
28
  password = Headmin::Form::PasswordView.new(local_assigns)
29
29
  %>
30
30
 
31
- <%= render 'headmin/forms/wrapper', password.wrapper_options do %>
32
- <%= render 'headmin/forms/label', password.label_options if password.prepend_label? %>
33
- <%= render 'headmin/forms/input_group', password.input_group_options do %>
31
+ <%= render "headmin/forms/wrapper", password.wrapper_options do %>
32
+ <%= render "headmin/forms/label", password.label_options if password.prepend_label? %>
33
+ <%= render "headmin/forms/input_group", password.input_group_options do %>
34
34
  <%= form.password_field(password.attribute, password.input_options) %>
35
35
  <% end %>
36
- <%= render 'headmin/forms/validation', password.validation_options if password.validate? %>
37
- <%= render 'headmin/forms/hint', password.hint_options if password.hint? %>
38
- <%= render 'headmin/forms/label', password.label_options if password.append_label? %>
36
+ <%= render "headmin/forms/validation", password.validation_options if password.validate? %>
37
+ <%= render "headmin/forms/hint", password.hint_options if password.hint? %>
38
+ <%= render "headmin/forms/label", password.label_options if password.append_label? %>
39
39
  <% end %>
@@ -22,10 +22,10 @@
22
22
  # ==== Examples
23
23
  # Basic version
24
24
  # <%= form_with do |form| %#>
25
- # <%= render 'headmin/forms/redactorx', form: form, attribute: :text %#>
25
+ # <%= render "headmin/forms/redactorx", form: form, attribute: :text %#>
26
26
  # <% end %#>
27
27
 
28
28
  redactor = Headmin::Form::RedactorxView.new(local_assigns)
29
29
  %>
30
30
 
31
- <%= render 'headmin/forms/textarea', redactor.options %>
31
+ <%= render "headmin/forms/textarea", redactor.options %>
@@ -11,24 +11,24 @@
11
11
  #
12
12
  # ==== Examples
13
13
  # # Basic version
14
- # <% render 'headmin/forms/repeater', form: form, attribute: :questions do |question| %#>
15
- # <% render 'admin/questions/fields, form: :question' %#>
14
+ # <% render "headmin/forms/repeater", form: form, attribute: :questions do |question| %#>
15
+ # <% render "admin/questions/fields, form: :question" %#>
16
16
  # <% end %#>
17
17
  #
18
18
  # # Let list group sit flush within its container
19
- # <% render 'headmin/forms/repeater', form: form, attribute: :questions, flush: true do |question| %#>
20
- # <% render 'admin/questions/fields, form: :question' %#>
19
+ # <% render "headmin/forms/repeater", form: form, attribute: :questions, flush: true do |question| %#>
20
+ # <% render "admin/questions/fields, form: :question" %#>
21
21
  # <% end %#>
22
22
  #
23
23
  # # With fixed header row. A header row can be used to show the labels, so you can omit them in the repeated fields
24
- # <% render 'headmin/forms/repeater', form: form, attribute: :questions, header: 'admin/questions/header' do |question| %#>
25
- # <% render 'admin/questions/fields, form: :question' %#>
24
+ # <% render "headmin/forms/repeater", form: form, attribute: :questions, header: "admin/questions/header" do |question| %#>
25
+ # <% render "admin/questions/fields, form: :question" %#>
26
26
  # <% end %#>
27
27
  #
28
28
  # # Allow more than one type of fields to be inserted. You must specify the templates as an array of view paths
29
- # <% templates = ['admin/questions/fields/type_1', 'admin/questions/fields/type_2'] %#>
30
- # <% render 'headmin/forms/repeater', form: form, attribute: :questions, templates: templates do |question| %#>
31
- # <% render 'admin/questions/fields, form: :question' %#>
29
+ # <% templates = ["admin/questions/fields/type_1", "admin/questions/fields/type_2"] %#>
30
+ # <% render "headmin/forms/repeater", form: form, attribute: :questions, templates: templates do |question| %#>
31
+ # <% render "admin/questions/fields, form: :question" %#>
32
32
  # <% end %#>
33
33
 
34
34
  label = local_assigns.has_key?(:label) ? label : nil
@@ -37,12 +37,12 @@
37
37
  templates = local_assigns.has_key?(:templates) ? templates : []
38
38
  flush = local_assigns.has_key?(:flush) ? flush : true
39
39
 
40
- template_names = templates.map { |template| File.basename(template, '.html.erb') }
41
- template_names = template_names.any? ? template_names : ['new']
40
+ template_names = templates.map { |template| File.basename(template, ".html.erb") }
41
+ template_names = template_names.any? ? template_names : ["new"]
42
42
  object_model = form.object.class
43
43
  association_model = object_model.reflect_on_association(attribute).class_name.constantize
44
44
  association_object = association_model.new
45
- with_positions = association_object.attributes.keys.include?('position')
45
+ with_positions = association_object.attributes.keys.include?("position")
46
46
  associations = form.object.send(attribute)
47
47
  associations = with_positions ? associations.order(:position) : associations
48
48
  repeater_id = form.object_id
@@ -52,10 +52,10 @@
52
52
 
53
53
  <!-- Label -->
54
54
  <% if show_label %>
55
- <%= render 'headmin/forms/label', form: form, attribute: attribute, text: label, required: required %>
55
+ <%= render "headmin/forms/label", form: form, attribute: attribute, text: label, required: required %>
56
56
  <% end %>
57
57
 
58
- <ul class="repeater list-group <%= 'list-group-flush' if flush %>" data-controller="repeater" data-repeater-target="list" data-repeater-id-value="<%= repeater_id %>">
58
+ <ul class="repeater list-group <%= "list-group-flush" if flush %>" data-controller="repeater" data-repeater-target="list" data-repeater-id-value="<%= repeater_id %>">
59
59
 
60
60
  <!-- Header -->
61
61
  <% if header %>
@@ -66,7 +66,7 @@
66
66
 
67
67
  <!-- Rows -->
68
68
  <%= form.fields_for attribute, associations do |ff| %>
69
- <%= render 'headmin/forms/repeater/row', pass_thru: pass_thru, form: ff, repeater_id: repeater_id do %>
69
+ <%= render "headmin/forms/repeater/row", pass_thru: pass_thru, form: ff, repeater_id: repeater_id do %>
70
70
  <%= yield(ff) %>
71
71
  <% end %>
72
72
  <% end %>
@@ -76,7 +76,7 @@
76
76
 
77
77
  <!-- Empty notice -->
78
78
  <div class="text-secondary invisible" data-repeater-target="empty">
79
- <%= t('.empty') %>
79
+ <%= t(".empty") %>
80
80
  </div>
81
81
 
82
82
  <!-- Button -->
@@ -88,12 +88,12 @@
88
88
  data-popup-pass-thru="<%= pass_thru %>"
89
89
  data-action="click->repeater#resetButtonIndices click->popup#open"
90
90
  >
91
- <%= bootstrap_icon('plus') %>
92
- <%= t('.add', name: association_model.model_name.human) %>
91
+ <%= bootstrap_icon("plus") %>
92
+ <%= t(".add", name: association_model.model_name.human) %>
93
93
  </div>
94
94
 
95
95
  <!-- Popup -->
96
- <%= render 'headmin/popup', id: "repeater-buttons-#{repeater_id}" do %>
96
+ <%= render "headmin/popup", id: "repeater-buttons-#{repeater_id}" do %>
97
97
  <div class="d-grid gap-2">
98
98
  <% template_names.each do |name| %>
99
99
  <div
@@ -114,7 +114,7 @@
114
114
  <% template_names.each do |name| %>
115
115
  <template data-repeater-target="template" data-template-name="<%= name %>" data-template-id-regex="<%= association_object.object_id %>">
116
116
  <%= form.fields_for attribute, association_object, child_index: association_object.object_id do |ff| %>
117
- <%= render 'headmin/forms/repeater/row', form: ff, pass_thru: pass_thru, repeater_id: repeater_id do %>
117
+ <%= render "headmin/forms/repeater/row", form: ff, pass_thru: pass_thru, repeater_id: repeater_id do %>
118
118
  <% yield(ff, name) %>
119
119
  <% end %>
120
120
  <% end %>
@@ -24,20 +24,20 @@
24
24
  # ==== Examples
25
25
  # Basic version
26
26
  # <%= form_with do |form| %#>
27
- # <%= render 'headmin/forms/search', form: form, attribute: "basic_example" %#>
27
+ # <%= render "headmin/forms/search", form: form, attribute: "basic_example" %#>
28
28
  # <% end %#>
29
29
 
30
30
  search = Headmin::Form::SearchView.new(local_assigns)
31
31
  %>
32
32
 
33
- <%= render 'headmin/forms/wrapper', search.wrapper_options do %>
34
- <%= render 'headmin/forms/label', search.label_options if search.prepend_label? %>
35
- <%= render 'headmin/forms/input_group', search.input_group_options do %>
33
+ <%= render "headmin/forms/wrapper", search.wrapper_options do %>
34
+ <%= render "headmin/forms/label", search.label_options if search.prepend_label? %>
35
+ <%= render "headmin/forms/input_group", search.input_group_options do %>
36
36
  <%= form.search_field(search.attribute, search.input_options) %>
37
- <%= render 'headmin/forms/datalist', search.datalist_options if search.datalist? %>
38
- <%= render 'headmin/forms/autocomplete', search.autocomplete_options if search.autocomplete? %>
37
+ <%= render "headmin/forms/datalist", search.datalist_options if search.datalist? %>
38
+ <%= render "headmin/forms/autocomplete", search.autocomplete_options if search.autocomplete? %>
39
39
  <% end %>
40
- <%= render 'headmin/forms/validation', search.validation_options if search.validate? %>
41
- <%= render 'headmin/forms/hint', search.hint_options if search.hint? %>
42
- <%= render 'headmin/forms/label', search.label_options if search.append_label? %>
40
+ <%= render "headmin/forms/validation", search.validation_options if search.validate? %>
41
+ <%= render "headmin/forms/hint", search.hint_options if search.hint? %>
42
+ <%= render "headmin/forms/label", search.label_options if search.append_label? %>
43
43
  <% end %>
@@ -25,19 +25,19 @@
25
25
  # ==== Examples
26
26
  # Basic version
27
27
  # <%= form_with do |form| %#>
28
- # <%= render 'headmin/forms/select', form: form, attribute: :color, collection: %w[red green blue] %#>
28
+ # <%= render "headmin/forms/select", form: form, attribute: :color, collection: %w[red green blue] %#>
29
29
  # <% end %#>
30
30
 
31
31
  select = Headmin::Form::SelectView.new(local_assigns)
32
32
  %>
33
33
 
34
- <%= render 'headmin/forms/wrapper', select.wrapper_options do %>
35
- <%= render 'headmin/forms/label', select.label_options if select.prepend_label? %>
36
- <%= render 'headmin/forms/input_group', select.input_group_options do %>
34
+ <%= render "headmin/forms/wrapper", select.wrapper_options do %>
35
+ <%= render "headmin/forms/label", select.label_options if select.prepend_label? %>
36
+ <%= render "headmin/forms/input_group", select.input_group_options do %>
37
37
  <%= form.select(select.attribute, select.collection, select.select_options, select.input_options) %>
38
38
  <% end %>
39
- <%= render 'headmin/forms/validation', select.validation_options if select.validate? %>
40
- <%= render 'headmin/forms/hint', select.hint_options if select.hint? %>
41
- <%= render 'headmin/forms/datalist', select.datalist_options if select.datalist? %>
42
- <%= render 'headmin/forms/label', select.label_options if select.append_label? %>
39
+ <%= render "headmin/forms/validation", select.validation_options if select.validate? %>
40
+ <%= render "headmin/forms/hint", select.hint_options if select.hint? %>
41
+ <%= render "headmin/forms/datalist", select.datalist_options if select.datalist? %>
42
+ <%= render "headmin/forms/label", select.label_options if select.append_label? %>
43
43
  <% end %>
@@ -20,10 +20,10 @@
20
20
  # ==== Examples
21
21
  # Basic version
22
22
  # <%= form_with do |form| %#>
23
- # <%= render 'headmin/forms/switch', form: form, attribute: :active %#>
23
+ # <%= render "headmin/forms/switch", form: form, attribute: :active %#>
24
24
  # <% end %#>
25
25
 
26
26
  switch = Headmin::Form::SwitchView.new(local_assigns)
27
27
  %>
28
28
 
29
- <%= render 'headmin/forms/checkbox', switch.options %>
29
+ <%= render "headmin/forms/checkbox", switch.options %>
@@ -24,20 +24,20 @@
24
24
  # ==== Examples
25
25
  # Basic version
26
26
  # <%= form_with do |form| %#>
27
- # <%= render 'headmin/forms/text', form: form, attribute: :title %#>
27
+ # <%= render "headmin/forms/text", form: form, attribute: :title %#>
28
28
  # <% end %#>
29
29
 
30
30
  text = Headmin::Form::TextView.new(local_assigns)
31
31
  %>
32
32
 
33
- <%= render 'headmin/forms/wrapper', text.wrapper_options do %>
34
- <%= render 'headmin/forms/label', text.label_options if text.prepend_label? %>
35
- <%= render 'headmin/forms/input_group', text.input_group_options do %>
33
+ <%= render "headmin/forms/wrapper", text.wrapper_options do %>
34
+ <%= render "headmin/forms/label", text.label_options if text.prepend_label? %>
35
+ <%= render "headmin/forms/input_group", text.input_group_options do %>
36
36
  <%= form.text_field(text.attribute, text.input_options) %>
37
- <%= render 'headmin/forms/datalist', text.datalist_options if text.datalist? %>
38
- <%= render 'headmin/forms/autocomplete', text.autocomplete_options if text.autocomplete? %>
37
+ <%= render "headmin/forms/datalist", text.datalist_options if text.datalist? %>
38
+ <%= render "headmin/forms/autocomplete", text.autocomplete_options if text.autocomplete? %>
39
39
  <% end %>
40
- <%= render 'headmin/forms/validation', text.validation_options if text.validate? %>
41
- <%= render 'headmin/forms/hint', text.hint_options if text.hint? %>
42
- <%= render 'headmin/forms/label', text.label_options if text.append_label? %>
40
+ <%= render "headmin/forms/validation", text.validation_options if text.validate? %>
41
+ <%= render "headmin/forms/hint", text.hint_options if text.hint? %>
42
+ <%= render "headmin/forms/label", text.label_options if text.append_label? %>
43
43
  <% end %>
@@ -22,18 +22,18 @@
22
22
  # ==== Examples
23
23
  # Basic version
24
24
  # <%= form_with do |form| %#>
25
- # <%= render 'headmin/forms/textarea', form: form, attribute: :text %#>
25
+ # <%= render "headmin/forms/textarea", form: form, attribute: :text %#>
26
26
  # <% end %#>
27
27
 
28
28
  textarea = Headmin::Form::TextareaView.new(local_assigns)
29
29
  %>
30
30
 
31
- <%= render 'headmin/forms/wrapper', textarea.wrapper_options do %>
32
- <%= render 'headmin/forms/label', textarea.label_options if textarea.prepend_label? %>
33
- <%= render 'headmin/forms/input_group', textarea.input_group_options do %>
31
+ <%= render "headmin/forms/wrapper", textarea.wrapper_options do %>
32
+ <%= render "headmin/forms/label", textarea.label_options if textarea.prepend_label? %>
33
+ <%= render "headmin/forms/input_group", textarea.input_group_options do %>
34
34
  <%= form.text_area(textarea.attribute, textarea.input_options) %>
35
35
  <% end %>
36
- <%= render 'headmin/forms/validation', textarea.validation_options if textarea.validate? %>
37
- <%= render 'headmin/forms/hint', textarea.hint_options if textarea.hint? || textarea.maxlength? %>
38
- <%= render 'headmin/forms/label', textarea.label_options if textarea.append_label? %>
36
+ <%= render "headmin/forms/validation", textarea.validation_options if textarea.validate? %>
37
+ <%= render "headmin/forms/hint", textarea.hint_options if textarea.hint? || textarea.maxlength? %>
38
+ <%= render "headmin/forms/label", textarea.label_options if textarea.append_label? %>
39
39
  <% end %>
@@ -24,20 +24,20 @@
24
24
  # ==== Examples
25
25
  # Basic version
26
26
  # <%= form_with do |form| %#>
27
- # <%= render 'headmin/forms/url', form: form, attribute: :website_url %#>
27
+ # <%= render "headmin/forms/url", form: form, attribute: :website_url %#>
28
28
  # <% end %#>
29
29
 
30
30
  url = Headmin::Form::UrlView.new(local_assigns)
31
31
  %>
32
32
 
33
- <%= render 'headmin/forms/wrapper', url.wrapper_options do %>
34
- <%= render 'headmin/forms/label', url.label_options if url.prepend_label? %>
35
- <%= render 'headmin/forms/input_group', url.input_group_options do %>
33
+ <%= render "headmin/forms/wrapper", url.wrapper_options do %>
34
+ <%= render "headmin/forms/label", url.label_options if url.prepend_label? %>
35
+ <%= render "headmin/forms/input_group", url.input_group_options do %>
36
36
  <%= form.url_field(url.attribute, url.input_options) %>
37
- <%= render 'headmin/forms/datalist', url.datalist_options if url.datalist? %>
38
- <%= render 'headmin/forms/autocomplete', url.autocomplete_options if url.autocomplete? %>
37
+ <%= render "headmin/forms/datalist", url.datalist_options if url.datalist? %>
38
+ <%= render "headmin/forms/autocomplete", url.autocomplete_options if url.autocomplete? %>
39
39
  <% end %>
40
- <%= render 'headmin/forms/validation', url.validation_options if url.validate? %>
41
- <%= render 'headmin/forms/hint', url.hint_options if url.hint? %>
42
- <%= render 'headmin/forms/label', url.label_options if url.append_label? %>
40
+ <%= render "headmin/forms/validation", url.validation_options if url.validate? %>
41
+ <%= render "headmin/forms/hint", url.hint_options if url.hint? %>
42
+ <%= render "headmin/forms/label", url.label_options if url.append_label? %>
43
43
  <% end %>
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # ==== Examples
12
12
  # Basic version
13
- # <%= render 'headmin/forms/validation', id: id, message: message %#>
13
+ # <%= render "headmin/forms/validation", id: id, message: message %#>
14
14
  %>
15
15
 
16
16
  <div class="<%= valid ? "valid-feedback" : "invalid-feedback" %>" id="<%= id %>">
@@ -19,10 +19,10 @@
19
19
  # ==== Examples
20
20
  # Basic version
21
21
  # <%= form_with do |form| %#>
22
- # <%= render 'headmin/forms/redactorx', form: form, attribute: :text %#>
22
+ # <%= render "headmin/forms/redactorx", form: form, attribute: :text %#>
23
23
  # <% end %#>
24
24
 
25
25
  wysiwyg = Headmin::Form::WysiwygView.new(local_assigns)
26
26
  %>
27
27
 
28
- <%= render 'headmin/forms/redactorx', wysiwyg.options %>
28
+ <%= render "headmin/forms/redactorx", wysiwyg.options %>
@@ -8,8 +8,8 @@
8
8
  #
9
9
  # ==== Examples
10
10
  # Basic version
11
- # <%= render 'headmin/forms/fields/base', form: form, field_type: :text, name: name do |field, label| %#>
12
- # <%= render 'headmin/forms/text', form: field, attribute: :value, label: label %#>
11
+ # <%= render "headmin/forms/fields/base", form: form, field_type: :text, name: name do |field, label| %#>
12
+ # <%= render "headmin/forms/text", form: field, attribute: :value, label: label %#>
13
13
  # <% end %#>
14
14
 
15
15
  field = form.object.fields.detect { |field| field.name.to_s == name.to_s }
@@ -7,11 +7,11 @@
7
7
  #
8
8
  # ==== Examples
9
9
  # Basic version
10
- # <%= render 'headmin/forms/fields/file', form: group, name: :file do |field, attribute, label| %#>
11
- # <%= render 'headmin/forms/file', form: field, attribute: attribute, label: label %#>
10
+ # <%= render "headmin/forms/fields/file", form: group, name: :file do |field, attribute, label| %#>
11
+ # <%= render "headmin/forms/file", form: field, attribute: attribute, label: label %#>
12
12
  # <% end %#>
13
13
  %>
14
14
 
15
- <%= render 'headmin/forms/fields/base', form: form, field_type: :file, name: name do |field, label| %>
15
+ <%= render "headmin/forms/fields/base", form: form, field_type: :file, name: name do |field, label| %>
16
16
  <% yield field, :files, label %>
17
17
  <% end %>
@@ -7,11 +7,11 @@
7
7
  #
8
8
  # ==== Examples
9
9
  # Basic version
10
- # <%= render 'headmin/forms/fields/file', form: group, name: :file do |field, attribute, label| %#>
11
- # <%= render 'headmin/forms/file', form: field, attribute: attribute, label: label %#>
10
+ # <%= render "headmin/forms/fields/file", form: group, name: :file do |field, attribute, label| %#>
11
+ # <%= render "headmin/forms/file", form: field, attribute: attribute, label: label %#>
12
12
  # <% end %#>
13
13
  %>
14
14
 
15
- <%= render 'headmin/forms/fields/base', form: form, field_type: :files, name: name do |field, label| %>
15
+ <%= render "headmin/forms/fields/base", form: form, field_type: :files, name: name do |field, label| %>
16
16
  <% yield field, :files, label %>
17
17
  <% end %>
@@ -8,16 +8,16 @@
8
8
  #
9
9
  # ==== Examples
10
10
  # Basic version
11
- # <%= render 'headmin/forms/fields/group', form: form, name: :button do |group| %#>
11
+ # <%= render "headmin/forms/fields/group", form: form, name: :button do |group| %#>
12
12
  # <div class="row">
13
13
  # <div class="col-md-6">
14
- # <%= render 'headmin/forms/fields/text', form: group, name: :name do |field, attribute, label| %#>
15
- # <%= render 'headmin/forms/text', form: field, attribute: attribute, label: label %#>
14
+ # <%= render "headmin/forms/fields/text", form: group, name: :name do |field, attribute, label| %#>
15
+ # <%= render "headmin/forms/text", form: field, attribute: attribute, label: label %#>
16
16
  # <% end %#>
17
17
  # </div>
18
18
  # <div class="col-md-6">
19
- # <%= render 'headmin/forms/fields/text', form: group, name: :url do |field, attribute, label| %#>
20
- # <%= render 'headmin/forms/text', form: field, attribute: attribute, label: label %#>
19
+ # <%= render "headmin/forms/fields/text", form: group, name: :url do |field, attribute, label| %#>
20
+ # <%= render "headmin/forms/text", form: field, attribute: attribute, label: label %#>
21
21
  # <% end %#>
22
22
  # </div>
23
23
  # </div>
@@ -28,9 +28,9 @@
28
28
  show_label = label != false
29
29
  %>
30
30
 
31
- <%= render 'headmin/forms/fields/base', form: form, name: name, field_type: :group do |group, field_label| %>
31
+ <%= render "headmin/forms/fields/base", form: form, name: name, field_type: :group do |group, field_label| %>
32
32
  <% if show_label %>
33
- <%= render 'headmin/forms/label', form: form, attribute: :value, text: label || field_label %>
33
+ <%= render "headmin/forms/label", form: form, attribute: :value, text: label || field_label %>
34
34
  <% end %>
35
35
 
36
36
  <% if wrapper %>
@@ -8,9 +8,9 @@
8
8
  #
9
9
  # ==== Examples
10
10
  # Basic version
11
- # <%= render 'headmin/forms/fields/list', form: form, name: :websites do |list| %#>
12
- # <%= render 'headmin/forms/fields/text', form: list, name: :url do |field, attribute, label| %#>
13
- # <%= render 'headmin/forms/text', form: field, attribute: attribute, label: label %#>
11
+ # <%= render "headmin/forms/fields/list", form: form, name: :websites do |list| %#>
12
+ # <%= render "headmin/forms/fields/text", form: list, name: :url do |field, attribute, label| %#>
13
+ # <%= render "headmin/forms/text", form: field, attribute: attribute, label: label %#>
14
14
  # <% end %#>
15
15
  # <% end %#>
16
16
 
@@ -18,8 +18,8 @@
18
18
  show_label = label != false
19
19
  %>
20
20
 
21
- <%= render 'headmin/forms/fields/base', form: form, name: name, field_type: :list do |list, field_label| %>
22
- <%= render 'headmin/forms/repeater', form: list, attribute: :fields, label: show_label ? label || field_label : false, flush: false do |field| %>
21
+ <%= render "headmin/forms/fields/base", form: form, name: name, field_type: :list do |list, field_label| %>
22
+ <%= render "headmin/forms/repeater", form: list, attribute: :fields, label: show_label ? label || field_label : false, flush: false do |field| %>
23
23
  <%= field.hidden_field :field_type, value: :group %>
24
24
  <%= yield field %>
25
25
  <% end %>
@@ -7,11 +7,11 @@
7
7
  #
8
8
  # ==== Examples
9
9
  # Basic version
10
- # <%= render 'headmin/forms/fields/text', form: group, name: :name do |field, attribute, label| %#>
11
- # <%= render 'headmin/forms/text', form: field, attribute: attribute, label: label %#>
10
+ # <%= render "headmin/forms/fields/text", form: group, name: :name do |field, attribute, label| %#>
11
+ # <%= render "headmin/forms/text", form: field, attribute: attribute, label: label %#>
12
12
  # <% end %#>
13
13
  %>
14
14
 
15
- <%= render 'headmin/forms/fields/base', form: form, field_type: :text, name: name do |field, label| %>
15
+ <%= render "headmin/forms/fields/base", form: form, field_type: :text, name: name do |field, label| %>
16
16
  <% yield field, :value, label %>
17
17
  <% end %>
@@ -15,18 +15,18 @@
15
15
  <%= form.hidden_field(:_destroy) %>
16
16
 
17
17
  <a href="<%= url %>" data-turbo-frame="remote_modal" data-media-target="modalButton">
18
- <%= render 'headmin/thumbnail', src: src, width: 100, height: 100 %>
18
+ <%= render "headmin/thumbnail", src: src, width: 100, height: 100 %>
19
19
  </a>
20
20
 
21
21
  <div class="h-form-file-thumbnail-actions">
22
22
  <!-- Edit -->
23
- <a href="<%= headmin_media_item_url(id: attachment.blob ? attachment.blob.id : '$1') %>" class="h-form-file-thumbnail-edit" data-turbo-frame="remote_modal" data-media-target="editButton">
24
- <%= bootstrap_icon('pencil') %>
23
+ <a href="<%= headmin_media_item_url(id: attachment.blob ? attachment.blob.id : "$1") %>" class="h-form-file-thumbnail-edit" data-turbo-frame="remote_modal" data-media-target="editButton">
24
+ <%= bootstrap_icon("pencil") %>
25
25
  </a>
26
26
 
27
27
  <!-- Remove -->
28
28
  <div class="h-form-file-thumbnail-remove" data-action="click->media#destroy">
29
- <%= bootstrap_icon('x') %>
29
+ <%= bootstrap_icon("x") %>
30
30
  </div>
31
31
  </div>
32
32
  </div>
@@ -2,9 +2,9 @@
2
2
  <%= form.text_field :"validation_#{attribute}",
3
3
  name: nil,
4
4
  value: nil,
5
- class: 'h-form-media-validation',
5
+ class: "h-form-media-validation",
6
6
  data: {
7
- 'media-target': 'validationInput',
8
- 'min-message': t('.min', count: min),
9
- 'max-message': t('.max', count: max),
7
+ "media-target": "validationInput",
8
+ "min-message": t(".min", count: min),
9
+ "max-message": t(".max", count: max),
10
10
  } %>
@@ -22,30 +22,30 @@
22
22
  <!-- Drag handle -->
23
23
  <% if draggable %>
24
24
  <div class="repeater-row-handle">
25
- <%= bootstrap_icon('grip-vertical') %>
25
+ <%= bootstrap_icon("grip-vertical") %>
26
26
  </div>
27
27
  <% end %>
28
28
 
29
29
  <!-- Add button-->
30
30
  <div
31
31
  class="repeater-row-add btn btn-link"
32
- title="<%= t('.add') %>"
32
+ title="<%= t(".add") %>"
33
33
  data-repeater-target="addButton"
34
34
  data-popup-target="button"
35
35
  data-popup-id="<%= "repeater-buttons-#{repeater_id}" %>"
36
36
  data-popup-pass-thru="<%= pass_thru %>"
37
37
  data-action="click->repeater#resetButtonIndices click->popup#open"
38
38
  >
39
- <%= bootstrap_icon('plus-circle') %>
39
+ <%= bootstrap_icon("plus-circle") %>
40
40
  </div>
41
41
 
42
42
  <!-- Remove button-->
43
43
  <div
44
44
  class="repeater-row-remove btn btn-link"
45
- title="<%= t('.remove') %>"
45
+ title="<%= t(".remove") %>"
46
46
  data-action="click->repeater#removeRow"
47
47
  >
48
- <%= bootstrap_icon('dash-circle') %>
48
+ <%= bootstrap_icon("dash-circle") %>
49
49
  </div>
50
50
 
51
51
  <%= yield %>
@@ -13,11 +13,11 @@
13
13
  <div class="h-heading-title">
14
14
  <div class="d-flex align-items-center">
15
15
  <h1 class="me-2">
16
- <%= title ? title : t('.new') %>
16
+ <%= title ? title : t(".new") %>
17
17
  </h1>
18
18
  <% if new_link %>
19
19
  <a href="<%= new_link %>" class="btn btn-outline-primary btn-sm">
20
- <%= t('.new') %>
20
+ <%= t(".new") %>
21
21
  </a>
22
22
  <% end %>
23
23
  </div>
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # ==== Examples
5
5
  # Basic version
6
- # <%= render 'headmin/layout/main' do %#>
6
+ # <%= render "headmin/layout/main" do %#>
7
7
  # ...
8
8
  # <% end %#>
9
9
 
@@ -12,6 +12,6 @@
12
12
  <!-- Label -->
13
13
  <label for="media-item-<%= blob.id %>">
14
14
  <% src = blob.image? ? url_for(blob.variant(resize_to_fill: [100, 100])) : url_for(blob) %>
15
- <%= render 'headmin/thumbnail', src: src, width: 100, height: 100 %>
15
+ <%= render "headmin/thumbnail", src: src, width: 100, height: 100 %>
16
16
  </label>
17
17
  </div>