headmin 0.5.3 → 0.5.4

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/assets/javascripts/headmin/controllers/media_controller.js +14 -14
  4. data/app/assets/javascripts/headmin/controllers/media_modal_controller.js +5 -5
  5. data/app/assets/javascripts/headmin/controllers/remote_modal_controller.js +1 -2
  6. data/app/assets/javascripts/headmin/controllers/textarea_controller.js +3 -3
  7. data/app/assets/javascripts/headmin.js +11 -11
  8. data/app/assets/stylesheets/headmin/forms/repeater.scss +0 -4
  9. data/app/assets/stylesheets/headmin/forms.scss +0 -6
  10. data/app/assets/stylesheets/headmin/overrides/redactorx.scss +1 -1
  11. data/app/assets/stylesheets/headmin/vendor/{tom-select-bootstrap.css → tom-select-bootstrap.scss} +0 -1
  12. data/app/assets/stylesheets/headmin.css +5 -9
  13. data/app/models/concerns/headmin/field.rb +1 -1
  14. data/app/models/headmin/filter/association.rb +86 -0
  15. data/app/models/headmin/filter/association_view.rb +74 -0
  16. data/app/models/headmin/filter/base.rb +5 -2
  17. data/app/models/headmin/filter/boolean_view.rb +1 -0
  18. data/app/models/headmin/filter/date_view.rb +1 -0
  19. data/app/models/headmin/filter/flatpickr_view.rb +1 -0
  20. data/app/models/headmin/filter/number_view.rb +1 -0
  21. data/app/models/headmin/filter/operator_view.rb +3 -1
  22. data/app/models/headmin/filter/options_view.rb +1 -0
  23. data/app/models/headmin/filter/text_view.rb +1 -0
  24. data/app/models/headmin/form/association_view.rb +102 -0
  25. data/app/models/headmin/form/blocks_view.rb +4 -1
  26. data/app/models/headmin/form/file_view.rb +0 -8
  27. data/app/models/headmin/form/flatpickr_view.rb +2 -1
  28. data/app/models/headmin/form/media_item_view.rb +39 -0
  29. data/app/models/headmin/form/media_view.rb +27 -3
  30. data/app/models/headmin/form/select_view.rb +2 -1
  31. data/app/models/headmin/thumbnail_view.rb +40 -19
  32. data/app/models/view_model.rb +4 -0
  33. data/app/views/headmin/_filters.html.erb +7 -2
  34. data/app/views/headmin/_thumbnail.html.erb +32 -8
  35. data/app/views/headmin/filters/_association.html.erb +24 -0
  36. data/app/views/headmin/filters/_options.html.erb +1 -1
  37. data/app/views/headmin/forms/_association.html.erb +30 -0
  38. data/app/views/headmin/forms/_file.html.erb +4 -5
  39. data/app/views/headmin/forms/_media.html.erb +7 -5
  40. data/app/views/headmin/forms/_repeater.html.erb +10 -8
  41. data/app/views/headmin/forms/_wrapper.html.erb +0 -1
  42. data/app/views/headmin/forms/fields/_list.html.erb +6 -4
  43. data/app/views/headmin/forms/media/_item.html.erb +18 -12
  44. data/app/views/headmin/forms/repeater/_row.html.erb +2 -1
  45. data/app/views/headmin/media/_item.html.erb +1 -2
  46. data/app/views/headmin/media/_media_item_modal.html.erb +2 -2
  47. data/app/views/headmin/table/body/_association.html.erb +17 -3
  48. data/app/views/headmin/views/devise/shared/_links.html.erb +14 -20
  49. data/config/locales/activerecord/en.yml +1 -0
  50. data/config/locales/activerecord/nl.yml +1 -0
  51. data/config/locales/headmin/filters/en.yml +3 -1
  52. data/config/locales/headmin/filters/nl.yml +2 -0
  53. data/config/locales/headmin/media/en.yml +2 -2
  54. data/config/locales/headmin/media/nl.yml +2 -1
  55. data/lib/headmin/version.rb +1 -1
  56. data/package.json +1 -1
  57. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '085821452a1ab6c16440f422dd5db566a3bb78a230496c15251d273264870c2f'
4
- data.tar.gz: 0e826df821082477c7f4a5d975f22e621abf55cdf19670cac74e005f8bab8913
3
+ metadata.gz: c163e16eb068c93256e3a73a0ac3b58f569cc72c36da590f084ecb13873b8866
4
+ data.tar.gz: 9297b7bfd0194980aa843c45e59f9180349bc17e571cfe8f9c75678738de7def
5
5
  SHA512:
6
- metadata.gz: b4697f00acea6b4b874168997aedee42032154deb32fdec90c61e676b22f4902337867651880c31c02fa1fbff673dbd7eddf4e0cb4bbc80b0b0f4f5ff565fdae
7
- data.tar.gz: bcb2d2c203bf82f642cb65c5444b8bd412a30072f7a78b90b2416fbc00b244eed4864b539fcd506eec5a28177aa3684b851b4210633eb90131c784b36b947147
6
+ metadata.gz: b72bc6a71c864837e78619f8bfc7b0d455d4f57d108790f6d6619fbb3fe2acb882d2be87236b8a2d87204b55995fd4234c8617ee93be5a587b6eafa2616aaac4
7
+ data.tar.gz: 819ec0caa24dbfa82ac02dec7909d6c888550f87c71bf5eadae0b86b03a179c57b599c5a3af3b418e4435dfc569373a1b744ed5621380382bdf7cff4cb6d229d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- headmin (0.5.2)
4
+ headmin (0.5.3)
5
5
  closure_tree (~> 7.4)
6
6
  inline_svg (~> 1.7)
7
7
  redcarpet (~> 3.5)
@@ -14,7 +14,7 @@ export default class extends Controller {
14
14
  })
15
15
 
16
16
  // Init sorting
17
- if(this.hasSorting()) {
17
+ if (this.hasSorting()) {
18
18
  this.initSortable()
19
19
  }
20
20
 
@@ -46,7 +46,7 @@ export default class extends Controller {
46
46
  }
47
47
 
48
48
  // Methods
49
- initSortable() {
49
+ initSortable () {
50
50
  Sortable.create(this.thumbnailsTarget, {
51
51
  handle: '.media-drag-sort-handle',
52
52
  onEnd: (event) => {
@@ -55,8 +55,8 @@ export default class extends Controller {
55
55
  })
56
56
  }
57
57
 
58
- hasSorting() {
59
- return this.element.dataset.sort === "true"
58
+ hasSorting () {
59
+ return this.element.dataset.sort === 'true'
60
60
  }
61
61
 
62
62
  destroyItem (item) {
@@ -90,7 +90,7 @@ export default class extends Controller {
90
90
 
91
91
  validate () {
92
92
  this.clearValidation()
93
- if (this.element.dataset.required === "0") return
93
+ if (this.element.dataset.required === '0') return
94
94
  this.validateMinimum()
95
95
  this.validateMaximum()
96
96
  }
@@ -162,7 +162,7 @@ export default class extends Controller {
162
162
  }
163
163
 
164
164
  enableItem (item) {
165
- item.querySelector(`input[name*='_destroy']`).value = false
165
+ item.querySelector('input[name*=\'_destroy\']').value = false
166
166
  item.classList.remove('d-none')
167
167
  }
168
168
 
@@ -174,11 +174,11 @@ export default class extends Controller {
174
174
 
175
175
  // Set new values
176
176
  const newItem = this.itemTargets.pop()
177
- newItem.querySelector(`input[name*="[blob_id]"]`).value = item.blobId
178
- newItem.querySelector(`input[name*="[_destroy]"]`).value = false
177
+ newItem.querySelector('input[name*="[blob_id]"]').value = item.blobId
178
+ newItem.querySelector('input[name*="[_destroy]"]').value = false
179
179
 
180
180
  // Update edit button url
181
- const editButton = newItem.querySelector(`[data-media-target="editButton"]`)
181
+ const editButton = newItem.querySelector('[data-media-target="editButton"]')
182
182
  editButton.setAttribute('href', editButton.getAttribute('href').replace('$1', item.blobId))
183
183
 
184
184
  // Copy thumbnail
@@ -204,7 +204,7 @@ export default class extends Controller {
204
204
  }
205
205
 
206
206
  removeItem (item) {
207
- item.querySelector(`input[name*='_destroy']`).value = 1
207
+ item.querySelector('input[name*=\'_destroy\']').value = 1
208
208
  item.classList.add('d-none')
209
209
 
210
210
  // Reset positions
@@ -219,19 +219,19 @@ export default class extends Controller {
219
219
 
220
220
  itemByBlobId (blobId) {
221
221
  return this.itemTargets.find((item) => {
222
- return item.querySelector(`input[name*='blob_id']`).value === blobId
222
+ return item.querySelector('input[name*=\'blob_id\']').value === blobId
223
223
  })
224
224
  }
225
225
 
226
226
  activeItems () {
227
227
  return this.itemTargets.filter((item) => {
228
- return item.querySelector(`input[name$='[_destroy]']`).value === 'false'
228
+ return item.querySelector('input[name$=\'[_destroy]\']').value === 'false'
229
229
  })
230
230
  }
231
231
 
232
232
  activeIds () {
233
233
  return this.activeItems().map((item) => {
234
- return item.querySelector(`input[name$='[blob_id]']`).value
234
+ return item.querySelector('input[name$=\'[blob_id]\']').value
235
235
  })
236
236
  }
237
- }
237
+ }
@@ -27,11 +27,11 @@ export default class extends Controller {
27
27
  }
28
28
 
29
29
  // Methods
30
- hidePlaceholder() {
30
+ hidePlaceholder () {
31
31
  this.placeholderTarget.classList.add('d-none')
32
32
  }
33
33
 
34
- handleInputChange() {
34
+ handleInputChange () {
35
35
  this.validate()
36
36
  }
37
37
 
@@ -104,7 +104,7 @@ export default class extends Controller {
104
104
  return count >= this.minSelectedItems() && count <= this.maxSelectedItems()
105
105
  }
106
106
 
107
- updateCount() {
108
- this.countTarget.innerHTML = this.idCheckboxTargets.filter(checkbox => checkbox.checked).length;
107
+ updateCount () {
108
+ this.countTarget.innerHTML = this.idCheckboxTargets.filter(checkbox => checkbox.checked).length
109
109
  }
110
- }
110
+ }
@@ -2,9 +2,8 @@ import { Controller } from '@hotwired/stimulus'
2
2
  import { Modal } from 'bootstrap'
3
3
 
4
4
  export default class extends Controller {
5
-
6
5
  connect () {
7
6
  this.modal = new Modal(this.element)
8
7
  this.modal.show()
9
8
  }
10
- }
9
+ }
@@ -26,9 +26,9 @@ export default class extends Controller {
26
26
  }
27
27
 
28
28
  updateCountLength () {
29
- const current_length = this.textareaTarget.value.length
30
- const maximum_length = this.textareaTarget.getAttribute('maxlength')
29
+ const currentLength = this.textareaTarget.value.length
30
+ const maximumLength = this.textareaTarget.getAttribute('maxlength')
31
31
 
32
- this.countTarget.textContent = `${current_length}/${maximum_length}`
32
+ this.countTarget.textContent = `${currentLength}/${maximumLength}`
33
33
  }
34
34
  }
@@ -10211,7 +10211,7 @@ var media_controller_default = class extends Controller {
10211
10211
  this.placeholderTarget.classList.add("d-none");
10212
10212
  }
10213
10213
  enableItem(item) {
10214
- item.querySelector(`input[name*='_destroy']`).value = false;
10214
+ item.querySelector("input[name*='_destroy']").value = false;
10215
10215
  item.classList.remove("d-none");
10216
10216
  }
10217
10217
  createItem(item) {
@@ -10219,9 +10219,9 @@ var media_controller_default = class extends Controller {
10219
10219
  const html = this.randomizeIds(template);
10220
10220
  this.thumbnailsTarget.insertAdjacentHTML("beforeend", html);
10221
10221
  const newItem = this.itemTargets.pop();
10222
- newItem.querySelector(`input[name*="[blob_id]"]`).value = item.blobId;
10223
- newItem.querySelector(`input[name*="[_destroy]"]`).value = false;
10224
- const editButton = newItem.querySelector(`[data-media-target="editButton"]`);
10222
+ newItem.querySelector('input[name*="[blob_id]"]').value = item.blobId;
10223
+ newItem.querySelector('input[name*="[_destroy]"]').value = false;
10224
+ const editButton = newItem.querySelector('[data-media-target="editButton"]');
10225
10225
  editButton.setAttribute("href", editButton.getAttribute("href").replace("$1", item.blobId));
10226
10226
  const oldThumbnail = newItem.querySelector(".h-thumbnail");
10227
10227
  const newThumbnail = item.thumbnail.cloneNode(true);
@@ -10241,7 +10241,7 @@ var media_controller_default = class extends Controller {
10241
10241
  });
10242
10242
  }
10243
10243
  removeItem(item) {
10244
- item.querySelector(`input[name*='_destroy']`).value = 1;
10244
+ item.querySelector("input[name*='_destroy']").value = 1;
10245
10245
  item.classList.add("d-none");
10246
10246
  this.resetPositions();
10247
10247
  this.syncIds();
@@ -10249,17 +10249,17 @@ var media_controller_default = class extends Controller {
10249
10249
  }
10250
10250
  itemByBlobId(blobId) {
10251
10251
  return this.itemTargets.find((item) => {
10252
- return item.querySelector(`input[name*='blob_id']`).value === blobId;
10252
+ return item.querySelector("input[name*='blob_id']").value === blobId;
10253
10253
  });
10254
10254
  }
10255
10255
  activeItems() {
10256
10256
  return this.itemTargets.filter((item) => {
10257
- return item.querySelector(`input[name$='[_destroy]']`).value === "false";
10257
+ return item.querySelector("input[name$='[_destroy]']").value === "false";
10258
10258
  });
10259
10259
  }
10260
10260
  activeIds() {
10261
10261
  return this.activeItems().map((item) => {
10262
- return item.querySelector(`input[name$='[blob_id]']`).value;
10262
+ return item.querySelector("input[name$='[blob_id]']").value;
10263
10263
  });
10264
10264
  }
10265
10265
  };
@@ -15864,9 +15864,9 @@ var textarea_controller_default = class extends Controller {
15864
15864
  }
15865
15865
  }
15866
15866
  updateCountLength() {
15867
- const current_length = this.textareaTarget.value.length;
15868
- const maximum_length = this.textareaTarget.getAttribute("maxlength");
15869
- this.countTarget.textContent = `${current_length}/${maximum_length}`;
15867
+ const currentLength = this.textareaTarget.value.length;
15868
+ const maximumLength = this.textareaTarget.getAttribute("maxlength");
15869
+ this.countTarget.textContent = `${currentLength}/${maximumLength}`;
15870
15870
  }
15871
15871
  };
15872
15872
 
@@ -18,10 +18,6 @@
18
18
  visibility: visible;
19
19
  }
20
20
  }
21
-
22
- .mb-3:last-of-type {
23
- margin-bottom: 0 !important;
24
- }
25
21
  }
26
22
 
27
23
  .repeater-row-remove {
@@ -5,12 +5,6 @@
5
5
  }
6
6
  }
7
7
 
8
- .card-body {
9
- .mb-3:last-child {
10
- margin-bottom: 0 !important;
11
- }
12
- }
13
-
14
8
  @import "forms/autocomplete";
15
9
  @import "forms/file";
16
10
  @import "forms/media";
@@ -40,7 +40,7 @@
40
40
  padding: $input-padding-y $input-padding-x !important;
41
41
  position: relative;
42
42
 
43
- p {
43
+ p, ul li, ol li, td {
44
44
  @include font-size($input-font-size);
45
45
  line-height: $input-line-height;
46
46
  color: $input-color;
@@ -516,7 +516,6 @@
516
516
  .ts-wrapper.form-select {
517
517
  padding: 0;
518
518
  height: auto;
519
- box-shadow: none;
520
519
  }
521
520
  .ts-wrapper.form-select .ts-control, .ts-wrapper.form-select.single.input-active .ts-control {
522
521
  border: none !important;
@@ -1,7 +1,7 @@
1
1
  @charset "UTF-8";
2
2
  @import "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css";
3
3
 
4
- /* sass-plugin-0:/usr/local/var/www/headmin/src/scss/headmin.scss */
4
+ /* sass-plugin-0:/opt/homebrew/var/www/headmin/src/scss/headmin.scss */
5
5
  :root {
6
6
  --bs-blue: #0d6efd;
7
7
  --bs-indigo: #6610f2;
@@ -10180,7 +10180,6 @@ fieldset:disabled .btn {
10180
10180
  .ts-wrapper.form-select {
10181
10181
  padding: 0;
10182
10182
  height: auto;
10183
- box-shadow: none;
10184
10183
  }
10185
10184
  .ts-wrapper.form-select .ts-control,
10186
10185
  .ts-wrapper.form-select.single.input-active .ts-control {
@@ -12944,7 +12943,10 @@ span.flatpickr-weekday {
12944
12943
  padding: 0.375rem 0.75rem !important;
12945
12944
  position: relative;
12946
12945
  }
12947
- .rx-content p {
12946
+ .rx-content p,
12947
+ .rx-content ul li,
12948
+ .rx-content ol li,
12949
+ .rx-content td {
12948
12950
  font-size: 0.9rem;
12949
12951
  line-height: 1.5;
12950
12952
  color: #212529;
@@ -12971,9 +12973,6 @@ span.flatpickr-weekday {
12971
12973
  content: " *";
12972
12974
  color: #dc3545;
12973
12975
  }
12974
- .card-body .mb-3:last-child {
12975
- margin-bottom: 0 !important;
12976
- }
12977
12976
  .h-autocomplete {
12978
12977
  position: absolute;
12979
12978
  top: calc(100% + 2px);
@@ -13100,9 +13099,6 @@ span.flatpickr-weekday {
13100
13099
  .repeater-row:hover .repeater-row-handle {
13101
13100
  visibility: visible;
13102
13101
  }
13103
- .repeater-row .mb-3:last-of-type {
13104
- margin-bottom: 0 !important;
13105
- }
13106
13102
  .repeater-row-remove {
13107
13103
  position: absolute;
13108
13104
  top: calc(50% - 17px);
@@ -13,7 +13,7 @@ module Headmin
13
13
  accepts_nested_attributes_for :fields, allow_destroy: true
14
14
 
15
15
  # field_type: :files, :file
16
- has_many_attached :files
16
+ has_many_attached :files, dependent: :detach
17
17
  accepts_nested_attributes_for :files_attachments, allow_destroy: true
18
18
  end
19
19
  end
@@ -0,0 +1,86 @@
1
+ module Headmin
2
+ module Filter
3
+ class Association < Headmin::Filter::Base
4
+ OPERATORS = %w[in not_in]
5
+
6
+ def cast_value(value)
7
+ is_i?(value) ? value.to_i : 0
8
+ end
9
+
10
+ def query(collection)
11
+ return collection unless @instructions.any?
12
+
13
+ # Store the collections' class for later use
14
+ @parent_class = collection.is_a?(Class) ? collection : collection.klass
15
+
16
+ # Join table if necessary
17
+ collection = collection.joins(attribute) if has_many?
18
+
19
+ # Build query and execute
20
+ query = nil
21
+ @instructions.each do |instruction|
22
+ query = build_query(query, collection, instruction)
23
+ end
24
+ collection.where(query)
25
+ end
26
+
27
+ def build_query(query, collection, instruction)
28
+ query_operator = convert_to_query_operator(instruction[:operator])
29
+ query_value = convert_to_query_value(instruction[:value], instruction[:operator])
30
+ query_operator, query_value = process_null_operators(query_operator, query_value)
31
+
32
+ new_query = association_column.send(query_operator, query_value)
33
+
34
+ query ? query.send(instruction[:conditional], new_query) : new_query
35
+ end
36
+
37
+ def display_value(value)
38
+ if value.is_a? Array
39
+ value.first.to_s
40
+ else
41
+ value
42
+ end
43
+ end
44
+
45
+ def reflection
46
+ @parent_class.reflect_on_association(attribute)
47
+ end
48
+
49
+ def macro
50
+ reflection.macro
51
+ end
52
+
53
+ def association_class
54
+ reflection.klass
55
+ end
56
+
57
+ def foreign_key
58
+ reflection.foreign_key
59
+ end
60
+
61
+ def association_column
62
+ if has_many?
63
+ association_class.arel_table[:id]
64
+ else
65
+ @parent_class.arel_table[foreign_key]
66
+ end
67
+ end
68
+
69
+ def has_many?
70
+ macro == :has_many
71
+ end
72
+
73
+ private
74
+
75
+ def is_i?(value)
76
+ # Regex: this selects signed digits (\d) only, it is then checked to the value, e.g.:
77
+ # is_i?("3") = true
78
+ # is_i?("-3") = true
79
+ # is_i?("3a") = false
80
+ # is_i?("3.2") = false
81
+
82
+ /\A[-+]?\d+\z/.match(value)
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,74 @@
1
+ module Headmin
2
+ module Filter
3
+ class AssociationView < ViewModel
4
+ def base_options
5
+ keys = %i[name label form]
6
+ options = to_h.slice(*keys)
7
+ default_base_options.merge(options)
8
+ end
9
+
10
+ def input_options
11
+ keys = %i[form]
12
+ options = to_h.slice(*keys)
13
+ default_input_options.merge(options)
14
+ end
15
+
16
+ def collection
17
+ @collection || association_model.all.map { |record| [record.to_s, record.id] }
18
+ end
19
+
20
+ def association_model
21
+ reflection.klass
22
+ end
23
+
24
+ private
25
+
26
+ def id
27
+ "#{name}_value"
28
+ end
29
+
30
+ def name
31
+ @name || attribute
32
+ end
33
+
34
+ def label
35
+ @label || I18n.t("attributes.#{attribute}", default: association_model.model_name.human(count: collection? ? 2 : 1))
36
+ end
37
+
38
+ def reflection
39
+ form.object.class.reflect_on_association(attribute)
40
+ end
41
+
42
+ def collection?
43
+ reflection.collection?
44
+ end
45
+
46
+ def default_base_options
47
+ {
48
+ label: label,
49
+ name: attribute,
50
+ display_values: collection,
51
+ filter: Headmin::Filter::Association.new(name, @params),
52
+ allowed_operators: Headmin::Filter::Association::OPERATORS
53
+ }
54
+ end
55
+
56
+ def default_input_options
57
+ {
58
+ label: false,
59
+ wrapper: false,
60
+ name: nil,
61
+ id: id,
62
+ data: {
63
+ action: "change->filter#updateHiddenValue",
64
+ filter_target: "value",
65
+ filter_row_target: "original"
66
+ },
67
+ collection: collection,
68
+ selected: selected,
69
+ class: "form-select"
70
+ }
71
+ end
72
+ end
73
+ end
74
+ end
@@ -6,7 +6,7 @@ module Headmin
6
6
 
7
7
  OPERATORS_CONVERT_TO = {
8
8
  convert_to_range: %w[between not_between],
9
- convert_to_array: %w[in not_in],
9
+ convert_to_array: %w[in not_in in_all in_any],
10
10
  convert_to_value: %w[eq not_eq gt gteq lt lteq matches does_not_match is_null is_not_null starts_with ends_with]
11
11
  }
12
12
 
@@ -215,7 +215,10 @@ module Headmin
215
215
  def build_instruction_string(instruction, display_values)
216
216
  conditional = instruction[:conditional].present? ? "#{I18n.t("headmin.filters.conditionals.#{instruction[:conditional]}")} " : nil
217
217
  operator = I18n.t("headmin.filters.operators.#{instruction[:operator]}")
218
- value = display_values[:display_values].find { |item| item.second == instruction[:value] }
218
+
219
+ display_value = instruction[:value].is_a?(Array) ? instruction[:value].first.to_s : instruction[:value]
220
+
221
+ value = display_values[:display_values].find { |item| item.second.to_s == display_value }
219
222
  value = value.present? ? value.first : instruction[:value]
220
223
 
221
224
  value = if instruction[:operator] == "is_null" || instruction[:operator] == "is_not_null"
@@ -47,6 +47,7 @@ module Headmin
47
47
  label: false,
48
48
  wrapper: false,
49
49
  id: id,
50
+ name: nil,
50
51
  collection: [[I18n.t("headmin.filters.values.true"), 1], [I18n.t("headmin.filters.values.false"), 0]],
51
52
  selected: value ? 1 : 0,
52
53
  data: {
@@ -41,6 +41,7 @@ module Headmin
41
41
  label: false,
42
42
  wrapper: false,
43
43
  id: id,
44
+ name: nil,
44
45
  data: {action: "change->filter#updateHiddenValue",
45
46
  filter_target: "value",
46
47
  filter_row_target: "original"},
@@ -40,6 +40,7 @@ module Headmin
40
40
  {
41
41
  label: false,
42
42
  wrapper: false,
43
+ name: nil,
43
44
  id: id,
44
45
  data: {
45
46
  action: "change->filter#updateHiddenValue",
@@ -41,6 +41,7 @@ module Headmin
41
41
  label: false,
42
42
  wrapper: false,
43
43
  id: id,
44
+ name: nil,
44
45
  data: {
45
46
  action: "change->filter#updateHiddenValue",
46
47
  filter_target: "value",
@@ -22,7 +22,9 @@ module Headmin
22
22
  matches: "&approx; #{I18n.t("headmin.filters.operators.matches")}",
23
23
  does_not_match: "&napprox; #{I18n.t("headmin.filters.operators.does_not_match")}",
24
24
  is_null: "&#9675; #{I18n.t("headmin.filters.operators.is_null")}",
25
- is_not_null: "&#9679; #{I18n.t("headmin.filters.operators.is_not_null")}"
25
+ is_not_null: "&#9679; #{I18n.t("headmin.filters.operators.is_not_null")}",
26
+ in: "&ni; #{I18n.t("headmin.filters.operators.in")}",
27
+ not_in: "&notni; #{I18n.t("headmin.filters.operators.not_in")}"
26
28
  }
27
29
  end
28
30
  end
@@ -46,6 +46,7 @@ module Headmin
46
46
  label: false,
47
47
  wrapper: false,
48
48
  id: id,
49
+ name: nil,
49
50
  data: {
50
51
  action: "change->filter#updateHiddenValue",
51
52
  filter_target: "value",
@@ -41,6 +41,7 @@ module Headmin
41
41
  label: false,
42
42
  wrapper: false,
43
43
  id: id,
44
+ name: nil,
44
45
  data: {
45
46
  action: "change->filter#updateHiddenValue",
46
47
  filter_target: "value",