rao-component 0.0.49.pre → 0.0.50.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/rao/component/collection_table.rb +4 -3
- data/app/components/rao/component/resource_table.rb +1 -0
- data/app/concerns/rao/component/collection_table/aasm_concern.rb +2 -1
- data/app/concerns/rao/component/collection_table/money_concern.rb +12 -0
- data/app/concerns/rao/component/resource_table/money_concern.rb +12 -0
- data/app/views/rao/component/_resource_table.html.haml +9 -1
- data/app/views/rao/component/table/body_cells/_attachment.html.haml +1 -1
- data/app/views/rao/component/table/body_cells/_money.html.haml +3 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15a9292069f01adcac406f38d05fa59b1901d0f39f01d767d7bf7da21ac4e3e2
|
4
|
+
data.tar.gz: c2ec28c9799f9aa56cce9d2f00c7cffe52bba1a8cab72a8d3b87f229987d0e0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3a0e7f21fcd9d15615a6a2fe398c7783e031102ef1d30c6dbcf94644daee4168076cc6fc61711b7e4364e1e9543699fc9d14d8ebada7f0003e2e58e8b264817
|
7
|
+
data.tar.gz: f6b06c9f9a0f8bf7db4943a794804d5cb7a7f8a0cb5009b5f3ec1eb26cc6719432848e87bf0f172264cfd7f827cbfddda0cf3c267d9ac1d689e6325727f03738
|
@@ -12,13 +12,14 @@ module Rao
|
|
12
12
|
class CollectionTable < Base
|
13
13
|
include AasmConcern
|
14
14
|
include ActiveStorageConcern
|
15
|
-
include AwesomeNestedSetConcern
|
16
|
-
include ActsAsPublishedConcern
|
17
15
|
include ActsAsListConcern
|
16
|
+
include ActsAsPublishedConcern
|
17
|
+
include AwesomeNestedSetConcern
|
18
18
|
include BatchActionsConcern
|
19
19
|
include BooleanConcern
|
20
|
-
include EmailConcern
|
21
20
|
include DateConcern
|
21
|
+
include EmailConcern
|
22
|
+
include MoneyConcern
|
22
23
|
include ThumbnailConcern
|
23
24
|
|
24
25
|
attr_reader :collection
|
@@ -13,7 +13,8 @@ module Rao
|
|
13
13
|
#
|
14
14
|
# # app/carts/index.html.haml
|
15
15
|
# = collection_table(collection: @carts) do |table|
|
16
|
-
# = table.
|
16
|
+
# = table.aasm_state :default
|
17
|
+
# = table.aasm_actions :default
|
17
18
|
#
|
18
19
|
# You will have to add a event triggering route to your resource:
|
19
20
|
#
|
@@ -6,10 +6,18 @@
|
|
6
6
|
end
|
7
7
|
%table{ class: table_css_classes, id: "#{tr_prefix}-resource-table" }
|
8
8
|
- rows.each do |name, options|
|
9
|
+
- title = options.delete(:title)
|
10
|
+
- if title.nil?
|
11
|
+
- if resource_class.respond_to?(:human_attribute_name)
|
12
|
+
- title = resource_class.human_attribute_name(name)
|
13
|
+
- else
|
14
|
+
- title = name
|
15
|
+
- elsif title === false
|
16
|
+
- title = nil
|
9
17
|
%tr{ class: "attribute-#{name}", id: "#{tr_prefix}-#{name}"}
|
10
18
|
- if resource_class.respond_to? :human_attribute_name
|
11
19
|
%th{ class: 'attribute-name' }
|
12
|
-
=
|
20
|
+
= title
|
13
21
|
- else
|
14
22
|
%th{ class: 'attribute-name' }
|
15
23
|
= name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.50.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -188,12 +188,14 @@ files:
|
|
188
188
|
- app/concerns/rao/component/collection_table/boolean_concern.rb
|
189
189
|
- app/concerns/rao/component/collection_table/date_concern.rb
|
190
190
|
- app/concerns/rao/component/collection_table/email_concern.rb
|
191
|
+
- app/concerns/rao/component/collection_table/money_concern.rb
|
191
192
|
- app/concerns/rao/component/collection_table/thumbnail_concern.rb
|
192
193
|
- app/concerns/rao/component/resource_table/aasm_concern.rb
|
193
194
|
- app/concerns/rao/component/resource_table/active_storage_concern.rb
|
194
195
|
- app/concerns/rao/component/resource_table/boolean_concern.rb
|
195
196
|
- app/concerns/rao/component/resource_table/date_concern.rb
|
196
197
|
- app/concerns/rao/component/resource_table/email_concern.rb
|
198
|
+
- app/concerns/rao/component/resource_table/money_concern.rb
|
197
199
|
- app/concerns/rao/component/resource_table/thumbnail_concern.rb
|
198
200
|
- app/helpers/rao/component/application_helper.rb
|
199
201
|
- app/views/rao/component/_collection_table.html.haml
|
@@ -210,6 +212,7 @@ files:
|
|
210
212
|
- app/views/rao/component/table/body_cells/_date.html.haml
|
211
213
|
- app/views/rao/component/table/body_cells/_default.html.haml
|
212
214
|
- app/views/rao/component/table/body_cells/_email.html.haml
|
215
|
+
- app/views/rao/component/table/body_cells/_money.html.haml
|
213
216
|
- app/views/rao/component/table/body_cells/_thumbnail.html.haml
|
214
217
|
- app/views/rao/component/table/body_cells/_timestamp.html.haml
|
215
218
|
- app/views/rao/component/table/header_cells/_batch_actions.html.haml
|
@@ -242,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
245
|
- !ruby/object:Gem::Version
|
243
246
|
version: 1.3.1
|
244
247
|
requirements: []
|
245
|
-
rubygems_version: 3.4.
|
248
|
+
rubygems_version: 3.4.20
|
246
249
|
signing_key:
|
247
250
|
specification_version: 4
|
248
251
|
summary: View Components for Ruby on Rails.
|