trestle 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -6
  3. data/Gemfile +0 -1
  4. data/README.md +3 -1
  5. data/app/assets/bundle/trestle/bundle.css +0 -0
  6. data/app/assets/bundle/trestle/bundle.js +0 -0
  7. data/app/assets/bundle/trestle/fa-brands-400.eot +0 -0
  8. data/app/assets/bundle/trestle/fa-brands-400.svg +0 -0
  9. data/app/assets/bundle/trestle/fa-brands-400.ttf +0 -0
  10. data/app/assets/bundle/trestle/fa-brands-400.woff +0 -0
  11. data/app/assets/bundle/trestle/fa-brands-400.woff2 +0 -0
  12. data/app/assets/bundle/trestle/fa-regular-400.eot +0 -0
  13. data/app/assets/bundle/trestle/fa-regular-400.svg +0 -0
  14. data/app/assets/bundle/trestle/fa-regular-400.ttf +0 -0
  15. data/app/assets/bundle/trestle/fa-regular-400.woff +0 -0
  16. data/app/assets/bundle/trestle/fa-regular-400.woff2 +0 -0
  17. data/app/assets/bundle/trestle/fa-solid-900.eot +0 -0
  18. data/app/assets/bundle/trestle/fa-solid-900.svg +0 -0
  19. data/app/assets/bundle/trestle/fa-solid-900.ttf +0 -0
  20. data/app/assets/bundle/trestle/fa-solid-900.woff +0 -0
  21. data/app/assets/bundle/trestle/fa-solid-900.woff2 +0 -0
  22. data/{lib → app/controllers/concerns}/trestle/controller/breadcrumbs.rb +0 -0
  23. data/{lib → app/controllers/concerns}/trestle/controller/callbacks.rb +0 -0
  24. data/{lib → app/controllers/concerns}/trestle/controller/dialog.rb +0 -0
  25. data/{lib → app/controllers/concerns}/trestle/controller/helpers.rb +0 -0
  26. data/{lib → app/controllers/concerns}/trestle/controller/layout.rb +0 -0
  27. data/{lib → app/controllers/concerns}/trestle/controller/location.rb +0 -0
  28. data/{lib → app/controllers/concerns}/trestle/controller/title.rb +0 -0
  29. data/{lib → app/controllers/concerns}/trestle/controller/toolbars.rb +0 -0
  30. data/{lib → app/controllers/concerns}/trestle/resource/controller/actions.rb +1 -1
  31. data/{lib → app/controllers/concerns}/trestle/resource/controller/data_methods.rb +1 -1
  32. data/{lib → app/controllers/concerns}/trestle/resource/controller/redirection.rb +1 -1
  33. data/{lib → app/controllers/concerns}/trestle/resource/controller/toolbar.rb +1 -1
  34. data/app/controllers/trestle/admin_controller.rb +33 -0
  35. data/{lib → app/controllers}/trestle/application_controller.rb +0 -0
  36. data/app/controllers/trestle/dashboard_controller.rb +13 -11
  37. data/app/controllers/trestle/resource_controller.rb +8 -0
  38. data/app/helpers/trestle/grid_helper.rb +7 -3
  39. data/app/helpers/trestle/hook_helper.rb +8 -6
  40. data/app/views/trestle/resource/edit.html.erb +2 -2
  41. data/app/views/trestle/resource/index.html.erb +1 -1
  42. data/app/views/trestle/resource/new.html.erb +1 -1
  43. data/app/views/trestle/resource/show.html.erb +2 -2
  44. data/frontend/css/components/_table.scss +16 -0
  45. data/frontend/css/layout/_sidebar.scss +6 -1
  46. data/frontend/js/components/confirmation.js +4 -2
  47. data/frontend/js/components/dialog.js +3 -0
  48. data/frontend/js/components/form.js +9 -0
  49. data/frontend/js/components/sidebar.js +5 -5
  50. data/frontend/js/components/table.js +33 -2
  51. data/frontend/theme/trestle/theme/bootstrap/_buttons.scss +3 -0
  52. data/lib/trestle.rb +22 -38
  53. data/lib/trestle/adapters.rb +1 -1
  54. data/lib/trestle/admin.rb +1 -4
  55. data/lib/trestle/admin/builder.rb +2 -2
  56. data/lib/trestle/configurable.rb +10 -0
  57. data/lib/trestle/configuration.rb +2 -2
  58. data/lib/trestle/engine.rb +1 -5
  59. data/lib/trestle/form.rb +5 -7
  60. data/lib/trestle/form/builder.rb +2 -3
  61. data/lib/trestle/form/field.rb +13 -3
  62. data/lib/trestle/form/fields.rb +6 -38
  63. data/lib/trestle/form/fields/tag_select.rb +2 -0
  64. data/lib/trestle/form/renderer.rb +4 -2
  65. data/lib/trestle/hook.rb +2 -2
  66. data/lib/trestle/navigation.rb +3 -6
  67. data/lib/trestle/reloader.rb +0 -8
  68. data/lib/trestle/resource.rb +4 -7
  69. data/lib/trestle/resource/builder.rb +1 -1
  70. data/lib/trestle/resource/toolbar.rb +16 -3
  71. data/lib/trestle/scopes.rb +2 -4
  72. data/lib/trestle/tab.rb +2 -0
  73. data/lib/trestle/table.rb +12 -13
  74. data/lib/trestle/table/actions_column.rb +6 -6
  75. data/lib/trestle/table/automatic.rb +3 -3
  76. data/lib/trestle/table/builder.rb +4 -4
  77. data/lib/trestle/table/column.rb +29 -24
  78. data/lib/trestle/table/row.rb +13 -13
  79. data/lib/trestle/table/select_column.rb +19 -7
  80. data/lib/trestle/toolbar.rb +4 -11
  81. data/lib/trestle/version.rb +1 -1
  82. data/trestle.gemspec +5 -6
  83. data/yarn.lock +1226 -1144
  84. metadata +24 -24
  85. data/lib/trestle/admin/controller.rb +0 -35
  86. data/lib/trestle/resource/controller.rb +0 -17
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trestle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-27 00:00:00.000000000 Z
11
+ date: 2020-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: kaminari
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.1.0
69
69
  - !ruby/object:Gem::Dependency
@@ -86,28 +86,28 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.7.1
89
+ version: 0.9.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.7.1
96
+ version: 0.9.2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: database_cleaner
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.6.2
103
+ version: 1.8.3
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.6.2
110
+ version: 1.8.3
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: ammeter
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -280,7 +280,22 @@ files:
280
280
  - app/assets/stylesheets/trestle/admin.css
281
281
  - app/assets/stylesheets/trestle/custom.css
282
282
  - app/assets/stylesheets/trestle/icons/_font-awesome.css.erb
283
+ - app/controllers/concerns/trestle/controller/breadcrumbs.rb
284
+ - app/controllers/concerns/trestle/controller/callbacks.rb
285
+ - app/controllers/concerns/trestle/controller/dialog.rb
286
+ - app/controllers/concerns/trestle/controller/helpers.rb
287
+ - app/controllers/concerns/trestle/controller/layout.rb
288
+ - app/controllers/concerns/trestle/controller/location.rb
289
+ - app/controllers/concerns/trestle/controller/title.rb
290
+ - app/controllers/concerns/trestle/controller/toolbars.rb
291
+ - app/controllers/concerns/trestle/resource/controller/actions.rb
292
+ - app/controllers/concerns/trestle/resource/controller/data_methods.rb
293
+ - app/controllers/concerns/trestle/resource/controller/redirection.rb
294
+ - app/controllers/concerns/trestle/resource/controller/toolbar.rb
295
+ - app/controllers/trestle/admin_controller.rb
296
+ - app/controllers/trestle/application_controller.rb
283
297
  - app/controllers/trestle/dashboard_controller.rb
298
+ - app/controllers/trestle/resource_controller.rb
284
299
  - app/helpers/trestle/avatar_helper.rb
285
300
  - app/helpers/trestle/card_helper.rb
286
301
  - app/helpers/trestle/container_helper.rb
@@ -465,21 +480,11 @@ files:
465
480
  - lib/trestle/adapters/sequel_adapter.rb
466
481
  - lib/trestle/admin.rb
467
482
  - lib/trestle/admin/builder.rb
468
- - lib/trestle/admin/controller.rb
469
- - lib/trestle/application_controller.rb
470
483
  - lib/trestle/attribute.rb
471
484
  - lib/trestle/breadcrumb.rb
472
485
  - lib/trestle/builder.rb
473
486
  - lib/trestle/configurable.rb
474
487
  - lib/trestle/configuration.rb
475
- - lib/trestle/controller/breadcrumbs.rb
476
- - lib/trestle/controller/callbacks.rb
477
- - lib/trestle/controller/dialog.rb
478
- - lib/trestle/controller/helpers.rb
479
- - lib/trestle/controller/layout.rb
480
- - lib/trestle/controller/location.rb
481
- - lib/trestle/controller/title.rb
482
- - lib/trestle/controller/toolbars.rb
483
488
  - lib/trestle/display.rb
484
489
  - lib/trestle/engine.rb
485
490
  - lib/trestle/evaluation_context.rb
@@ -535,11 +540,6 @@ files:
535
540
  - lib/trestle/resource/adapter_methods.rb
536
541
  - lib/trestle/resource/builder.rb
537
542
  - lib/trestle/resource/collection.rb
538
- - lib/trestle/resource/controller.rb
539
- - lib/trestle/resource/controller/actions.rb
540
- - lib/trestle/resource/controller/data_methods.rb
541
- - lib/trestle/resource/controller/redirection.rb
542
- - lib/trestle/resource/controller/toolbar.rb
543
543
  - lib/trestle/resource/toolbar.rb
544
544
  - lib/trestle/scopes.rb
545
545
  - lib/trestle/scopes/block.rb
@@ -581,7 +581,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
581
581
  - !ruby/object:Gem::Version
582
582
  version: '0'
583
583
  requirements: []
584
- rubygems_version: 3.0.6
584
+ rubygems_version: 3.0.8
585
585
  signing_key:
586
586
  specification_version: 4
587
587
  summary: A modern, responsive admin framework for Ruby on Rails
@@ -1,35 +0,0 @@
1
- module Trestle
2
- class Admin
3
- class Controller < Trestle::ApplicationController
4
- def index
5
- end
6
-
7
- class << self
8
- attr_reader :admin
9
-
10
- private
11
- def local_prefixes
12
- return admin.view_path_prefixes if admin
13
- [controller_path.sub(/\/$/, "")]
14
- end
15
- end
16
-
17
- def admin
18
- @_admin ||= self.class.admin.new(self)
19
- end
20
- helper_method :admin
21
-
22
- protected
23
- def breadcrumbs
24
- @_breadcrumbs ||= admin.breadcrumbs.dup
25
- end
26
-
27
- def flash_message(type, title:, message:)
28
- {
29
- title: admin.t("flash.#{type}.title", default: title),
30
- message: admin.t("flash.#{type}.message", default: message)
31
- }
32
- end
33
- end
34
- end
35
- end
@@ -1,17 +0,0 @@
1
- module Trestle
2
- class Resource
3
- class Controller < Admin::Controller
4
- extend ActiveSupport::Autoload
5
-
6
- autoload :Actions
7
- autoload :DataMethods
8
- autoload :Redirection
9
- autoload :Toolbar
10
-
11
- include Actions
12
- include DataMethods
13
- include Redirection
14
- include Toolbar
15
- end
16
- end
17
- end