adminsite 3.2.0 → 3.2.1

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
  SHA1:
3
- metadata.gz: d94fdef568c79b7bcf4bbd483d17b44459ef266c
4
- data.tar.gz: 40eabefb8e62f71f42225bec10e965f994940f62
3
+ metadata.gz: 754b4b138ee03318ea3d2155e709ae477127aef1
4
+ data.tar.gz: 1f440edada2614f81df6c50146429f49f72d254b
5
5
  SHA512:
6
- metadata.gz: dc45991fcde7d78b295285661130598397aafd04f14463d296feef9d79e5ba5a7826b66466379f980863cb1090ef62f4f3ea8d5ff2243998d5e2f92557c079b0
7
- data.tar.gz: 757cc09d1ae378fa23c9e03d8438e7361301dd5e2c4331867f438034ae7856a2a59a7a4adb937637a29dc2509b7337eda59a3369ab3a4d87cbca14dc967c907e
6
+ metadata.gz: 3c12d04ab8543ec31da0890a29cb9369b9ea12c5f98296a5c37a8d79b6f2a2ed8adfa42d52a25aee2d46091e0c7332dd68a5af464d0f4f264cdf09de36b46c6f
7
+ data.tar.gz: 19685da4087543c4fbed9d34e5e23e4cf16d9db4b277f0110db8d6aa5c27d9128ceec4e7632bf0626c104e063ee43beadc243d9a4fd2dd625710e3a587f50df9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adminsite (3.2.0)
4
+ adminsite (3.2.1)
5
5
  actionpack-page_caching
6
6
  cancancan (~> 1.10)
7
7
  codemirror-rails (>= 4.8)
@@ -99,7 +99,7 @@ class Adminsite::Admin::ResourcesController < Adminsite::Admin::CrudController
99
99
  end
100
100
 
101
101
  def find_resource
102
- @resource ||= resources.find(params[:id])
102
+ @resource ||= scope_resources.find(params[:id])
103
103
  end
104
104
 
105
105
  def scope_resources
@@ -4,6 +4,7 @@
4
4
  - content_for :header_left do
5
5
  = "Listing #{label_resource_class_plural}"
6
6
  - content_for :header_right do
7
- = link_to_new "New #{label_resource_class}"
7
+ #action_bar
8
+ = link_to_new "New #{label_resource_class}"
8
9
  There are no page layouts. Go ahead and
9
- #{link_to 'add the first one', new_admin_adminsite_page_layout_path}.
10
+ #{link_to 'add the first one', admin_resource_path(nil, :new)}.
@@ -4,13 +4,15 @@
4
4
  - content_for :header_left do
5
5
  = "Listing #{label_resource_class_plural}"
6
6
  - content_for :header_right do
7
- = link_to_new "New #{label_resource_class}"
7
+ #action_bar
8
+ = link_to_new "New #{label_resource_class}"
8
9
  There are no pages. Go ahead and
9
10
  #{link_to 'add the first one', new_admin_adminsite_page_path}.
10
11
  - else
11
12
  - content_for :header_left do
12
13
  = "Listing #{label_resource_class_plural}"
13
14
  - content_for :header_right do
14
- = link_to_new "New #{label_resource_class}"
15
+ #action_bar
16
+ = link_to_new "New #{label_resource_class}"
15
17
  You should #{link_to 'add a page layout', new_admin_adminsite_page_layout_path}
16
18
  before adding your first page.
@@ -1,8 +1,8 @@
1
1
  - content_for :header_left do
2
2
  = controller_name
3
3
  - content_for :header_right do
4
- #show_actions
5
- = link_to_back 'Back', url_for(controller: controller_name, action: :index )
4
+ #action_bar
5
+ = link_to_back
6
6
 
7
7
  - if Rails.env.development?
8
8
  please override in '/app/views/adminsite/admin/#{controller_name}/show.html.haml'
@@ -14,18 +14,13 @@
14
14
  - @resources.each do |resource|
15
15
  %tr{onclick: 'Adminsite.selectedRow(this);'}
16
16
  - if resource_admin_config.actions_placement == :left
17
- %td.actions.resource_actions
18
- %ul
19
- - resource_admin_config.default_member_actions(resource).each do |action|
20
- %li= send("link_to_#{action}", resource)
17
+ = render partial: 'list_actions', locals: {resource: resource }
21
18
  %td.resource_selection_cell
22
19
  = check_box_tag 'collection_selection[]', resource.id, false, :class => 'collection_selection'
23
20
  - resource_admin_config.attributes_index.each do |attr|
24
21
  = display_resource_value(resource, attr)
25
22
  - if resource_admin_config.actions_placement == :right
26
- %td.actions.resource_actions
27
- %ul
28
- - resource_admin_config.default_member_actions(resource).each do |action|
29
- %li= send("link_to_#{action}", resource)
23
+ = render partial: 'list_actions', locals: {resource: resource }
30
24
 
31
25
  = paginate(@resources, :window => 2)
26
+
@@ -0,0 +1,4 @@
1
+ %td.actions.resource_actions
2
+ %ul
3
+ - resource_admin_config.default_member_actions(resource).each do |action|
4
+ %li= send("link_to_#{action}", resource)
@@ -1,3 +1,3 @@
1
1
  module Adminsite
2
- VERSION = "3.2.0" unless defined?(Adminsite::VERSION)
2
+ VERSION = "3.2.1" unless defined?(Adminsite::VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adminsite
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Wunderlin
@@ -318,6 +318,7 @@ files:
318
318
  - app/views/adminsite/admin/resources/_filters.html.haml
319
319
  - app/views/adminsite/admin/resources/_form.haml
320
320
  - app/views/adminsite/admin/resources/_list.haml
321
+ - app/views/adminsite/admin/resources/_list_actions.html.haml
321
322
  - app/views/adminsite/admin/resources/_search_form.html.haml
322
323
  - app/views/adminsite/admin/resources/edit.haml
323
324
  - app/views/adminsite/admin/resources/index.haml