five-two-nw-olivander 0.1.2.14 → 0.1.2.16

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: '05099f9c49667c865027fd2291a2c87caa0b4067d1a5a42bf486717f02076980'
4
- data.tar.gz: 7846c476cf57f4a5016208c8776c8dc77fd676a3ddfa8396560f16273e396602
3
+ metadata.gz: ca705fdadd65b24ed0d39bdf729ad757aa2f7e0764c0d385963ae0c77144a9e6
4
+ data.tar.gz: b7ede6c6d6fc597db514b9c3117f72eee6bf834686fe4329db7e10b35dbdb92a
5
5
  SHA512:
6
- metadata.gz: 89997456c2a356285ff8d4b5574ca4efe865773a627962620052533be21e7bd086807ae8472c9af2ba5a7e8a4baedfc425d0e55ac9733c7ccdccf516e5251d3b
7
- data.tar.gz: '028cb6fa2eda1c411230cc227fe6eaa252885ce88bea190095fe6c5cd80b46379d4bf880b1f6e03d6e9122171ea8bfd6697b0a98dc3ec1467fe2a55b4c52efa7'
6
+ metadata.gz: 5e1d731c04b0ff1d86dea82e792c502c7719560e38f2e3ed3be97db851897c290d89ec8b7a751159232c0368c85329eb6f0d6c34159936ad49fced1107b6bbd1
7
+ data.tar.gz: a74487154d84ddf468651d19893864315e0669ba9b799da0f7c8aba653e8f6a8e41e33a5a9b21fc03ec5ab6eda17c98813738e982da4465da1991e1a1eef4925
@@ -25,4 +25,6 @@
25
25
 
26
26
  .table td, .table th {
27
27
  padding: 0.25rem !important;
28
- }
28
+ }
29
+
30
+ .card-secondary:not(.card-outline) > .card-header a.page-link { color: blue }
@@ -90,6 +90,10 @@ module Olivander
90
90
  end
91
91
 
92
92
  class_methods do
93
+ def resource_action(model, action)
94
+ resources[model].actions.select{ |x| x.sym == action }.first
95
+ end
96
+
93
97
  def resource(model, only: DEFAULT_CRUD_ACTIONS, except: [], &block)
94
98
  self.current_resource = RoutedResource.new(model, DEFAULT_CRUD_ACTIONS & (only - except))
95
99
  yield if block_given?
@@ -32,7 +32,7 @@ module Olivander
32
32
  def resource_form_actions(route_builder, resource, for_action: :show)
33
33
  [].tap do |output|
34
34
  authorized_resource_actions(route_builder, resource, for_action: for_action).select{ |x| x.show_in_form }.each do |a|
35
- output << link_to(a.sym, {controller: a.controller, action: a.action}, method: a.verb, class: 'btn btn-primary', data: { turbo: true })
35
+ output << link_to(a.sym, {controller: a.controller, action: a.action}, method: a.verb, class: 'btn btn-tool', data: { turbo: true })
36
36
  end
37
37
  end.join('&nbsp;').html_safe
38
38
  end
@@ -1,6 +1,6 @@
1
1
  - read_only = action_name != 'edit'
2
2
  = simple_form_for(@resource) do |f|
3
- .card
3
+ .card.card-primary
4
4
  .card-header
5
5
  .card-tools
6
6
  = resource_form_actions(@context.route_builder, @resource, for_action: action_name.to_sym)
@@ -24,7 +24,7 @@
24
24
 
25
25
  .row
26
26
  .col-12
27
- .card
27
+ .card.card-primary
28
28
  .card-header
29
29
  %h3.card-title= @page_title
30
30
  .card-tools
@@ -48,4 +48,4 @@
48
48
  - begin
49
49
  = render partial: 'index_additional'
50
50
  - rescue ActionView::MissingTemplate
51
- - Rails.logger.debug "did not find additional index partial"
51
+ - Rails.logger.debug "did not find additional index partial"
@@ -6,3 +6,7 @@
6
6
  .col-12
7
7
  = render_resource_form(@resource)
8
8
 
9
+ - begin
10
+ = render partial: 'show_additional'
11
+ - rescue ActionView::MissingTemplate
12
+ - Rails.logger.debug "did not find additional show partial"
@@ -12,6 +12,7 @@
12
12
  = render partial: 'layouts/olivander/adminlte/sidebar'
13
13
  -# = render partial: 'layouts/olivander/adminlte/content'
14
14
  = render partial: @content_partial || 'layouts/olivander/adminlte/content', locals: { content: yield }
15
+ = turbo_frame_tag 'modal'
15
16
  = render partial: 'layouts/olivander/adminlte/flashes'
16
17
  = render partial: 'layouts/olivander/adminlte/footer'
17
18
  = render partial: 'layouts/olivander/adminlte/control_sidebar'
@@ -1,3 +1,3 @@
1
1
  module Olivander
2
- VERSION = "0.1.2.14"
2
+ VERSION = "0.1.2.16"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: five-two-nw-olivander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.14
4
+ version: 0.1.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dennis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-07 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick