trestle 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -6
- data/Gemfile +0 -1
- data/README.md +3 -1
- data/app/assets/bundle/trestle/bundle.css +0 -0
- data/app/assets/bundle/trestle/bundle.js +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.eot +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.svg +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.ttf +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.woff +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.woff2 +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.eot +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.svg +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.ttf +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.woff +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.woff2 +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.eot +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.svg +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.ttf +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.woff +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.woff2 +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/breadcrumbs.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/callbacks.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/dialog.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/helpers.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/layout.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/location.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/title.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/controller/toolbars.rb +0 -0
- data/{lib → app/controllers/concerns}/trestle/resource/controller/actions.rb +1 -1
- data/{lib → app/controllers/concerns}/trestle/resource/controller/data_methods.rb +1 -1
- data/{lib → app/controllers/concerns}/trestle/resource/controller/redirection.rb +1 -1
- data/{lib → app/controllers/concerns}/trestle/resource/controller/toolbar.rb +1 -1
- data/app/controllers/trestle/admin_controller.rb +33 -0
- data/{lib → app/controllers}/trestle/application_controller.rb +0 -0
- data/app/controllers/trestle/dashboard_controller.rb +13 -11
- data/app/controllers/trestle/resource_controller.rb +8 -0
- data/app/helpers/trestle/grid_helper.rb +7 -3
- data/app/helpers/trestle/hook_helper.rb +8 -6
- data/app/views/trestle/resource/edit.html.erb +2 -2
- data/app/views/trestle/resource/index.html.erb +1 -1
- data/app/views/trestle/resource/new.html.erb +1 -1
- data/app/views/trestle/resource/show.html.erb +2 -2
- data/frontend/css/components/_table.scss +16 -0
- data/frontend/css/layout/_sidebar.scss +6 -1
- data/frontend/js/components/confirmation.js +4 -2
- data/frontend/js/components/dialog.js +3 -0
- data/frontend/js/components/form.js +9 -0
- data/frontend/js/components/sidebar.js +5 -5
- data/frontend/js/components/table.js +33 -2
- data/frontend/theme/trestle/theme/bootstrap/_buttons.scss +3 -0
- data/lib/trestle.rb +22 -38
- data/lib/trestle/adapters.rb +1 -1
- data/lib/trestle/admin.rb +1 -4
- data/lib/trestle/admin/builder.rb +2 -2
- data/lib/trestle/configurable.rb +10 -0
- data/lib/trestle/configuration.rb +2 -2
- data/lib/trestle/engine.rb +1 -5
- data/lib/trestle/form.rb +5 -7
- data/lib/trestle/form/builder.rb +2 -3
- data/lib/trestle/form/field.rb +13 -3
- data/lib/trestle/form/fields.rb +6 -38
- data/lib/trestle/form/fields/tag_select.rb +2 -0
- data/lib/trestle/form/renderer.rb +4 -2
- data/lib/trestle/hook.rb +2 -2
- data/lib/trestle/navigation.rb +3 -6
- data/lib/trestle/reloader.rb +0 -8
- data/lib/trestle/resource.rb +4 -7
- data/lib/trestle/resource/builder.rb +1 -1
- data/lib/trestle/resource/toolbar.rb +16 -3
- data/lib/trestle/scopes.rb +2 -4
- data/lib/trestle/tab.rb +2 -0
- data/lib/trestle/table.rb +12 -13
- data/lib/trestle/table/actions_column.rb +6 -6
- data/lib/trestle/table/automatic.rb +3 -3
- data/lib/trestle/table/builder.rb +4 -4
- data/lib/trestle/table/column.rb +29 -24
- data/lib/trestle/table/row.rb +13 -13
- data/lib/trestle/table/select_column.rb +19 -7
- data/lib/trestle/toolbar.rb +4 -11
- data/lib/trestle/version.rb +1 -1
- data/trestle.gemspec +5 -6
- data/yarn.lock +1226 -1144
- metadata +24 -24
- data/lib/trestle/admin/controller.rb +0 -35
- 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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|