trestle 0.10.0.pre → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +26 -0
- data/.github/workflows/rspec.yml +6 -2
- data/Gemfile +14 -5
- data/README.md +1 -1
- data/app/assets/bundle/trestle/admin.css +9 -9
- data/app/assets/bundle/trestle/admin.js +13 -13
- data/app/assets/bundle/trestle/fa-brands-400.ttf +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.woff2 +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.ttf +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.woff2 +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.ttf +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.woff2 +0 -0
- data/app/assets/bundle/trestle/photoswipe-063ce7be40e10b3e6848.digested.js +6 -0
- data/app/assets/sprockets/trestle/icons/font-awesome.css.erb +1 -1
- data/app/controllers/concerns/trestle/controller/modal.rb +3 -1
- data/app/controllers/concerns/trestle/controller/turbo_stream.rb +12 -0
- data/app/controllers/concerns/trestle/resource/controller/actions.rb +3 -3
- data/app/controllers/trestle/application_controller.rb +1 -1
- data/app/helpers/trestle/modal_helper.rb +0 -5
- data/app/helpers/trestle/turbo/frame_helper.rb +29 -0
- data/app/helpers/trestle/turbo/stream_helper.rb +9 -0
- data/app/helpers/trestle/turbo/tag_builder.rb +21 -0
- data/app/helpers/trestle/url_helper.rb +2 -2
- data/app/views/layouts/trestle/admin.html.erb +1 -1
- data/app/views/layouts/trestle/admin.turbo_stream.erb +2 -9
- data/app/views/trestle/application/_header.html.erb +12 -10
- data/app/views/trestle/resource/create.turbo_stream.erb +1 -5
- data/app/views/trestle/resource/destroy.turbo_stream.erb +1 -1
- data/app/views/trestle/resource/edit.html.erb +2 -0
- data/app/views/trestle/resource/index.html.erb +5 -0
- data/app/views/trestle/resource/new.html.erb +5 -0
- data/app/views/trestle/resource/show.html.erb +2 -0
- data/app/views/trestle/resource/update.turbo_stream.erb +1 -5
- data/app/views/trestle/shared/_sidebar.html.erb +2 -2
- data/frontend/css/components/_alerts.scss +22 -20
- data/frontend/css/components/_avatar.scss +12 -12
- data/frontend/css/components/_background.scss +1 -1
- data/frontend/css/components/_breadcrumbs.scss +8 -29
- data/frontend/css/components/_buttons.scss +3 -3
- data/frontend/css/components/_datepicker.scss +3 -3
- data/frontend/css/components/_dropdown.scss +18 -26
- data/frontend/css/components/_forms.scss +4 -4
- data/frontend/css/components/_grid.scss +29 -0
- data/frontend/css/components/_media-grid.scss +1 -1
- data/frontend/css/components/_modal.scss +4 -4
- data/frontend/css/components/_pagination.scss +4 -8
- data/frontend/css/components/_popover.scss +1 -1
- data/frontend/css/components/_scopes.scss +4 -10
- data/frontend/css/components/_select.scss +8 -9
- data/frontend/css/components/_sort.scss +1 -1
- data/frontend/css/components/_table.scss +5 -5
- data/frontend/css/components/_tabs.scss +11 -18
- data/frontend/css/components/_tags.scss +16 -6
- data/frontend/css/components/_toolbars.scss +9 -9
- data/frontend/css/core/_functions.scss +0 -8
- data/frontend/css/core/_theme.scss +3 -0
- data/frontend/css/core/_typography.scss +12 -19
- data/frontend/css/index.scss +3 -1
- data/frontend/css/layout/_base.scss +4 -2
- data/frontend/css/layout/_content-header.scss +71 -0
- data/frontend/css/layout/_footer.scss +5 -7
- data/frontend/css/layout/_main-content.scss +107 -0
- data/frontend/css/layout/_navigation.scss +111 -49
- data/frontend/css/layout/_sidebar.scss +60 -34
- data/frontend/css/variables/_bootstrap.scss +30 -21
- data/frontend/css/variables/_trestle.scss +20 -17
- data/frontend/js/controllers/batch_action_controller.js +59 -0
- data/frontend/js/controllers/checkbox_select_controller.js +3 -0
- data/frontend/js/controllers/confirm_delete_controller.js +4 -4
- data/frontend/js/controllers/gallery_controller.js +2 -0
- data/frontend/js/controllers/lightbox_controller.js +0 -2
- data/lib/trestle/engine.rb +18 -16
- data/lib/trestle/form/renderer.rb +1 -1
- data/lib/trestle/resource/toolbar.rb +18 -8
- data/lib/trestle/sprockets_compressor.rb +16 -0
- data/lib/trestle/toolbar/context.rb +7 -4
- data/lib/trestle/toolbar/menu.rb +8 -5
- data/lib/trestle/version.rb +1 -1
- data/package.json +1 -1
- data/trestle.gemspec +5 -9
- data/yarn.lock +350 -363
- metadata +35 -70
- data/app/assets/bundle/trestle/photoswipe-7aa1aec9c3c1fd65c382.digested.js +0 -6
- data/app/controllers/concerns/trestle/controller/turbo.rb +0 -21
- data/app/helpers/trestle/turbo_frame_helper.rb +0 -34
- data/frontend/css/layout/_content.scss +0 -173
data/lib/trestle/toolbar/menu.rb
CHANGED
@@ -28,13 +28,17 @@ module Trestle
|
|
28
28
|
end
|
29
29
|
|
30
30
|
class Builder
|
31
|
-
delegate :admin_link_to, :content_tag, to: :@template
|
31
|
+
delegate :admin_link_to, :content_tag, :tag, to: :@template
|
32
32
|
|
33
33
|
def initialize(menu, template)
|
34
34
|
@menu, @template = menu, template
|
35
35
|
end
|
36
36
|
|
37
37
|
def link(content, instance_or_url=nil, options={}, &block)
|
38
|
+
if instance_or_url.is_a?(Hash)
|
39
|
+
instance_or_url, options = nil, instance_or_url
|
40
|
+
end
|
41
|
+
|
38
42
|
options[:class] = Array(options[:class])
|
39
43
|
options[:class] << "dropdown-item"
|
40
44
|
|
@@ -42,16 +46,15 @@ module Trestle
|
|
42
46
|
end
|
43
47
|
|
44
48
|
def header(text)
|
45
|
-
item(class: "dropdown-header")
|
49
|
+
item { content_tag(:h6, text, class: "dropdown-header") }
|
46
50
|
end
|
47
51
|
|
48
52
|
def divider
|
49
|
-
item(class: "divider")
|
53
|
+
item { tag(:hr, class: "dropdown-divider") }
|
50
54
|
end
|
51
55
|
|
52
56
|
def item(options={}, &block)
|
53
|
-
|
54
|
-
item = block_given? ? content_tag(:li, opts, &block) : content_tag(:li, "", opts)
|
57
|
+
item = block_given? ? content_tag(:li, options, &block) : content_tag(:li, "", options)
|
55
58
|
|
56
59
|
@menu.items << item
|
57
60
|
|
data/lib/trestle/version.rb
CHANGED
data/package.json
CHANGED
data/trestle.gemspec
CHANGED
@@ -18,19 +18,15 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = ">= 2.
|
21
|
+
spec.required_ruby_version = ">= 2.6.0"
|
22
22
|
|
23
|
-
spec.add_dependency "railties",
|
24
|
-
spec.add_dependency "activemodel",
|
25
|
-
spec.add_dependency "
|
23
|
+
spec.add_dependency "railties", ">= 6.0.0"
|
24
|
+
spec.add_dependency "activemodel", ">= 6.0.0"
|
25
|
+
spec.add_dependency "turbo-rails", ">= 2.0.6"
|
26
|
+
spec.add_dependency "kaminari", ">= 1.1.0"
|
26
27
|
|
27
28
|
spec.add_development_dependency "rspec-rails", ">= 5.1.2"
|
28
29
|
spec.add_development_dependency "rspec-html-matchers", "~> 0.10.0"
|
29
30
|
spec.add_development_dependency "database_cleaner", "~> 2.0.2"
|
30
31
|
spec.add_development_dependency "ammeter", "~> 1.1.5"
|
31
|
-
spec.add_development_dependency "i18n-js", "~> 4.2.3"
|
32
|
-
|
33
|
-
spec.add_development_dependency "bundler"
|
34
|
-
spec.add_development_dependency "rake"
|
35
|
-
spec.add_development_dependency "sqlite3"
|
36
32
|
end
|