mensa 0.6.3 → 0.6.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/components/mensa/view/component.html.erb +46 -43
- data/app/tables/mensa/column.rb +1 -1
- data/app/tables/mensa/filter.rb +4 -4
- data/lib/mensa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43d7fc2be92ed19588de7ea2ea168ae560e8ac5c5b09fd5e13600a561ad8dc0a
|
|
4
|
+
data.tar.gz: bb86cb4e8403f99dfbd9aa1ea2acfe596c2764430be5bc64a0951795c14a7059
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c6abafca7fd4e75772c146277e1623ad2acc4947914d6cf7158232500dc6f07480e2a8b725ac1e041b896ebfbd60fde468392b6ebfa7892eb74a593b1af2d57
|
|
7
|
+
data.tar.gz: ad3b6c8c7d2e9844e51959f7bc2365094d17a07cdf996945fc002569a134f64382c5cd136cea1306d61f3b9697fb9fa4377a763367935f62a69e1b8a7afbe8a4
|
data/Gemfile.lock
CHANGED
|
@@ -1,48 +1,51 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<% end %>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<% end %>
|
|
18
|
-
<table class="w-full">
|
|
19
|
-
<% if table.show_header? %>
|
|
20
|
-
<thead>
|
|
21
|
-
<tr>
|
|
22
|
-
<% if table.batch_actions? %>
|
|
23
|
-
<th class="mensa-table__checkbox-col">
|
|
24
|
-
<div class="container">
|
|
25
|
-
<input class="mensa-table__select-all" type="checkbox" data-action="change->mensa-selection#toggleAll" data-mensa-selection-target="headerCheckbox">
|
|
26
|
-
</div>
|
|
27
|
-
</th>
|
|
28
|
-
<% end %>
|
|
29
|
-
<% if table.actions? && Mensa.config.row_actions_position == :front %>
|
|
30
|
-
<th class="actions" aria-label="Actions"><i class="<%= Mensa.config.icons[:action_column_header] %>" aria-hidden="true"></i></th>
|
|
1
|
+
<div data-mensa-table-target="view">
|
|
2
|
+
<div class="overflow-y-auto relative"
|
|
3
|
+
data-controller="mensa-selection"
|
|
4
|
+
data-mensa-selection-batch-url-value="<%= table.batch_actions? ? helpers.mensa.table_batch_actions_path(table.name) : "" %>">
|
|
5
|
+
<% if table.batch_actions? %>
|
|
6
|
+
<div class="mensa-batch-bar hidden" data-mensa-selection-target="batchBar">
|
|
7
|
+
<div class="mensa-batch-bar__content">
|
|
8
|
+
<input class="mensa-table__select-all" type="checkbox" data-action="click->mensa-selection#deselectAll" data-mensa-selection-target="batchAllCheckbox">
|
|
9
|
+
<span class="mensa-batch-bar__count" data-mensa-selection-target="selectedCount"></span>
|
|
10
|
+
<% table.batch_actions.each do |batch_action| %>
|
|
11
|
+
<button class="mensa-batch-bar__button" type="button" data-action="click->mensa-selection#executeBatch" data-mensa-selection-batch-action-param="<%= batch_action.name %>">
|
|
12
|
+
<%= batch_action.title %>
|
|
13
|
+
</button>
|
|
31
14
|
<% end %>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<% end %>
|
|
18
|
+
<table class="w-full">
|
|
19
|
+
<% if table.show_header? %>
|
|
20
|
+
<thead>
|
|
21
|
+
<tr>
|
|
22
|
+
<% if table.batch_actions? %>
|
|
23
|
+
<th class="mensa-table__checkbox-col">
|
|
24
|
+
<div class="container">
|
|
25
|
+
<input class="mensa-table__select-all" type="checkbox" data-action="change->mensa-selection#toggleAll" data-mensa-selection-target="headerCheckbox">
|
|
26
|
+
</div>
|
|
27
|
+
</th>
|
|
28
|
+
<% end %>
|
|
29
|
+
<% if table.actions? && Mensa.config.row_actions_position == :front %>
|
|
30
|
+
<th class="actions" aria-label="Actions"><i class="<%= Mensa.config.icons[:action_column_header] %>" aria-hidden="true"></i></th>
|
|
31
|
+
<% end %>
|
|
32
|
+
<%= render(Mensa::Header::Component.with_collection(table.display_columns, table: table)) %>
|
|
33
|
+
<% if table.actions? && Mensa.config.row_actions_position == :back %>
|
|
34
|
+
<th class="actions" aria-label="Actions"><i class="<%= Mensa.config.icons[:action_column_header] %>" aria-hidden="true"></i></th>
|
|
35
|
+
<% end %>
|
|
36
|
+
</tr>
|
|
37
|
+
</thead>
|
|
38
|
+
<% end %>
|
|
39
|
+
<tbody>
|
|
40
|
+
<%= render(Mensa::TableRow::Component.with_collection(table.rows, table: table)) %>
|
|
41
|
+
</tbody>
|
|
42
|
+
</table>
|
|
43
|
+
<% if table.pagy_details&.count == 0 %>
|
|
44
|
+
<%= render Mensa::EmptyState::Component.new(table: table) %>
|
|
38
45
|
<% end %>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</table>
|
|
43
|
-
<% if table.pagy_details&.count == 0 %>
|
|
44
|
-
<%= render Mensa::EmptyState::Component.new(table: table) %>
|
|
45
|
-
<% elsif table.pagy_details&.last > 1 %>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<% if table.pagy_details&.count != 0 && table.pagy_details&.last > 1 %>
|
|
46
49
|
<div class="paging">
|
|
47
50
|
<span><%= t("mensa.paging.info", model: model_name_plural, from: table.pagy_details.from, to: table.pagy_details.to, count: table.pagy_details.count) %></span>
|
|
48
51
|
<%== table.pagy_details.series_nav(anchor_string: 'data-turbo-frame="_self"') %>
|
data/app/tables/mensa/column.rb
CHANGED
data/app/tables/mensa/filter.rb
CHANGED
|
@@ -105,13 +105,13 @@ module Mensa
|
|
|
105
105
|
val = value.is_a?(Array) ? value : normalize(value)
|
|
106
106
|
record_scope.where.not(column.attribute_for_condition => val)
|
|
107
107
|
when :gt
|
|
108
|
-
record_scope.where(column
|
|
108
|
+
record_scope.where(":column > :value", column: column.attribute_for_condition, value: normalize(value))
|
|
109
109
|
when :lt
|
|
110
|
-
record_scope.where(column
|
|
110
|
+
record_scope.where(":column < :value", column: column.attribute_for_condition, value: normalize(value))
|
|
111
111
|
when :gteq
|
|
112
|
-
record_scope.where(column
|
|
112
|
+
record_scope.where(":column >= :value", column: column.attribute_for_condition, value: normalize(value))
|
|
113
113
|
when :lteq
|
|
114
|
-
record_scope.where(column
|
|
114
|
+
record_scope.where(":column <= :value", column: column.attribute_for_condition, value: normalize(value))
|
|
115
115
|
else
|
|
116
116
|
# Ignore unknown operators
|
|
117
117
|
record_scope
|
data/lib/mensa/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mensa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom de Grunt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|