mensa 0.1.10 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/mensa/table/component.html.slim +1 -1
- data/app/components/mensa/table/component.rb +2 -0
- data/app/components/mensa/views/component.html.slim +4 -4
- data/app/controllers/mensa/tables_controller.rb +2 -1
- data/app/jobs/mensa/application_job.rb +1 -2
- data/app/tables/mensa/base.rb +1 -0
- data/app/tables/mensa/config/table_dsl.rb +1 -0
- data/lib/mensa/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d241173fd2c405deaa9f1f04016026486383fe40cb87e7e1151014791424fb63
|
4
|
+
data.tar.gz: 0bf71f0777403f5aad311c1217b4509bd2fbe0f70e9e29446ff3899950d6d249
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ed7f0c69955ac60050e226b8e5ab13ac270a037d30b4119faa211c3ee13a132ef1bc8d30d4133430a26b888e840bfd4e2d683d00a5c8dd5ffaffdf9839fabbe
|
7
|
+
data.tar.gz: 9f103e8cf817a7f9fdb6a30d92f3331246aab6114fa16187aecc07b75ed33782f41997a3cc0826885d7cd7865794c903a3a3bb15696ba5eb4e596e6c86b73b1c
|
@@ -4,4 +4,4 @@
|
|
4
4
|
= render Mensa::Filters::Component.new(table: table)
|
5
5
|
- if table.supports_views? && table.show_header?
|
6
6
|
= render Mensa::Views::Component.new(table: table)
|
7
|
-
turbo-frame id=table.table_id src=helpers.mensa.table_path(table.name, turbo_frame_id: table.table_id) target="_top" loading="lazy" data-mensa-table-target="turboFrame"
|
7
|
+
turbo-frame id=table.table_id src=helpers.mensa.table_path(table.name, {turbo_frame_id: table.table_id}.merge(params)) target="_top" loading="lazy" data-mensa-table-target="turboFrame"
|
@@ -6,10 +6,12 @@ module Mensa
|
|
6
6
|
include TablesHelper
|
7
7
|
|
8
8
|
attr_reader :table
|
9
|
+
attr_reader :params
|
9
10
|
|
10
11
|
def initialize(table_name, config = {}, **options)
|
11
12
|
@table = Mensa.for_name(table_name, config)
|
12
13
|
@table.component = self
|
14
|
+
@params = options[:params] || {}
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
@@ -12,7 +12,7 @@
|
|
12
12
|
= link_to(table.path(table_view_id: view.id, turbo_frame_id: table.table_id), "data-turbo-frame": table.table_id, class: "view #{(view == table.table_view) || (!view.persisted? && table.table_view.blank?) ? 'selected' : ''}") do
|
13
13
|
= view.name
|
14
14
|
|
15
|
-
|
16
|
-
.
|
17
|
-
|
18
|
-
|
15
|
+
- if table.supports_custom_views?
|
16
|
+
a.text-gray-600.dark:text-gray-400.hover:text-gray-800.hover:bg-gray-200.rounded-md.px-3.py-1.5.text-sm[href="#" title=t("new_view", default: "New view")]
|
17
|
+
.fal.fa-plus
|
18
|
+
= render Mensa::ControlBar::Component.new(table: table)
|
@@ -14,6 +14,7 @@ module Mensa
|
|
14
14
|
{}
|
15
15
|
end
|
16
16
|
|
17
|
+
config = config.merge(params.permit!.to_h)
|
17
18
|
config = config.merge(params.permit(:format, :query, :id, :page, :table_view_id, :turbo_frame_id, order: {}, filters: {}).to_h)
|
18
19
|
|
19
20
|
@table = Mensa.for_name(params[:id], config)
|
@@ -24,7 +25,7 @@ module Mensa
|
|
24
25
|
format.turbo_stream
|
25
26
|
format.html
|
26
27
|
format.xlsx do
|
27
|
-
Mensa::ExportJob.
|
28
|
+
Mensa::ExportJob.perform_later(current_user.id, params[:id])
|
28
29
|
head 200
|
29
30
|
end
|
30
31
|
end
|
data/app/tables/mensa/base.rb
CHANGED
@@ -64,6 +64,7 @@ module Mensa::Config
|
|
64
64
|
dsl_option :render, Mensa::Config::RenderDsl
|
65
65
|
|
66
66
|
option :supports_views, default: false
|
67
|
+
option :supports_custom_views, default: false
|
67
68
|
option :supports_filters, default: true
|
68
69
|
option :show_header, default: true
|
69
70
|
option :view_columns_sorting, default: true
|
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.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Grunt
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caxlsx_rails
|
@@ -275,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
277
|
rubygems_version: 3.4.10
|
278
|
-
signing_key:
|
278
|
+
signing_key:
|
279
279
|
specification_version: 4
|
280
280
|
summary: Fast and awesome tables
|
281
281
|
test_files: []
|