tramway 0.5.1.3 → 0.5.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 168f2a63e4483ba637e614eff3f2e3b2fcd61c52a61da934a6a13883017bbe37
4
- data.tar.gz: 904bb0981692516905f77867ba1ca878ba9d26f0e1a5bfb6e85718b4210e96d3
3
+ metadata.gz: 838aba970de3f300933609c6072917a9583fa49a2609d10597146d8fe6c70812
4
+ data.tar.gz: 3d95247267309c650eee9ceb5168a04c809f723f35700214831e4df6b167c543
5
5
  SHA512:
6
- metadata.gz: f907d004a4177faa23953d355c4cd081985c83f4187080ac2195833317fc3ab49178d5e504628789aab1de76731339e23883c6e201c97c3b87ffcc717add61a6
7
- data.tar.gz: 26332774327abca66e8a45f89bc42feea4fbb5cf4c7fd8102448dd996e0b374d80f74188fa81a0666a74431fab6f97686c37ad6921eeffcbb526bc8803bceba7
6
+ metadata.gz: c57384901f20fead3a987b16d302ca328fcdd3ac2a4d431dba709bcc110bc4d8665a435f705437e01f3fd983583e471f52e4b7627ebd13c5bd1900e76f096ea3
7
+ data.tar.gz: c6b3ac59a4f1d02eac8bbdf4bafa5c289e563d3955a169410df6ca12f245df5c3513145bb1f9c375110464265972e4256b3936a947e77996b139851c47f1d40f
@@ -1,2 +1,3 @@
1
1
  - decorator = decorator_class(entity)
2
- = component 'tailwinds/table/row', cells: decorator.list_attributes.reduce({}) { |hash, attribute| hash.merge! attribute => entity.public_send(attribute) }, href: decorator.decorate(entity).show_path
2
+ - decorated_object = decorator.decorate(entity)
3
+ = component 'tailwinds/table/row', cells: decorator.list_attributes.reduce({}) { |hash, attribute| hash.merge! attribute => decorated_object.public_send(attribute) }, href: decorated_object.show_path
@@ -0,0 +1,25 @@
1
+ - decorator = Tramway::Decorators::NameBuilder.default_decorator_class_name(@model_class)
2
+ - list_attributes = decorator.constantize.list_attributes
3
+
4
+ .mt-8.w-full
5
+ - content_for :title, page_title
6
+
7
+ .flex.justify-between.items-center.md:mt-4.mt-2
8
+ %h1.font-bold.text-4xl.dark:text-white
9
+ = content_for(:title)
10
+
11
+ - if Tramway.config.pagination[:enabled]
12
+ = paginate @entities
13
+
14
+ - if list_attributes.empty?
15
+ %p.text-center.mt-10
16
+ You should fill class-level method `self.list_attributes` inside your
17
+ = decorator
18
+
19
+ = component 'tailwinds/table' do
20
+ = component 'tailwinds/table/header', headers: list_attributes.map { |attribute| @model_class.human_attribute_name(attribute) }
21
+ - @entities.each do |item|
22
+ = render 'tramway/entities/entity', entity: item
23
+
24
+ .flex.mt-4
25
+ = paginate @entities
@@ -1,25 +1 @@
1
- - decorator = Tramway::Decorators::NameBuilder.default_decorator_class_name(@model_class)
2
- - list_attributes = decorator.constantize.list_attributes
3
-
4
- .mt-8{ class: 'w-2/3' }
5
- - content_for :title, page_title
6
-
7
- .flex.justify-between.items-center.md:mt-4.mt-2
8
- %h1.font-bold.text-4xl.dark:text-white
9
- = page_title
10
-
11
- - if Tramway.config.pagination[:enabled]
12
- = paginate @entities
13
-
14
- - if list_attributes.empty?
15
- %p.text-center.mt-10
16
- You should fill class-level method `self.list_attributes` inside your
17
- = decorator
18
-
19
- = component 'tailwinds/table' do
20
- = component 'tailwinds/table/header', headers: list_attributes.map { |attribute| @model_class.human_attribute_name(attribute) }
21
- - @entities.each do |item|
22
- = render 'entity', entity: item
23
-
24
- .flex.mt-4
25
- = paginate @entities
1
+ = render 'tramway/entities/list'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '0.5.1.3'
4
+ VERSION = '0.5.1.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1.3
4
+ version: 0.5.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-01-21 00:00:00.000000000 Z
12
+ date: 2025-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: anyway_config
@@ -190,6 +190,7 @@ files:
190
190
  - app/views/kaminari/_paginator.html.haml
191
191
  - app/views/kaminari/_prev_page.html.haml
192
192
  - app/views/tramway/entities/_entity.html.haml
193
+ - app/views/tramway/entities/_list.html.haml
193
194
  - app/views/tramway/entities/index.html.haml
194
195
  - app/views/tramway/layouts/application.html.haml
195
196
  - config/routes.rb