rao-component 0.0.49.pre → 0.0.51.pre
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/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: a1915f0837604520a6f488ac97370e9470ddd423f8418799d6781cb258a6a4d3
|
4
|
+
data.tar.gz: c59ff2dd3090293f436ed16c7ef41d5c513de9a5d3621025f443add587b34732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c355081354e2ea9a2329ce688c19df2958515a31b688c971ae307cdb79907c7d78c9434e42e173f72a3bfbc3fe2fe53cd53c05320d7590051df1d263b09a3418
|
7
|
+
data.tar.gz: c167915645cd76eeae8871b52456ca5e8f97f8fd87fb4fc1876202cb1b41ee57f2c7f009cc24d03cc1f9f6016d068a5e01904a2725957395fec82c456ceac6ed
|
@@ -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.51.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-28 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.21
|
246
249
|
signing_key:
|
247
250
|
specification_version: 4
|
248
251
|
summary: View Components for Ruby on Rails.
|