manage 1.3.14 → 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +17 -1
- data/app/controllers/manage/resource_controller.rb +8 -1
- data/app/views/manage/resource/index/_collection_actions.html.slim +3 -0
- data/app/views/manage/resource/index/_table.html.slim +6 -0
- data/app/views/manage/resource/index.html.slim +6 -4
- data/lib/manage/version.rb +1 -1
- metadata +3 -3
- data/lib/manage/version.rb.orig +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cec92e307ceacab9b65fe73377016eedd2fa648
|
4
|
+
data.tar.gz: 2088baa08c6fda99e4460a23c7c898070f030719
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f0ba9ee1af704654d7b19052dcf8bbe46ed8ed40a7a236d60fc406792e9c74927c0c09e8ed4baf3ab0860c88e0e00a76750a5c3a914c5eb0a98af3a44d99e5e
|
7
|
+
data.tar.gz: 350b0f9fb298048ed5d55a9618ee355fcf5e727bb9c3ecf81a1b99a7aefd810a06ead84cd67b1dbab2e998db6c31ea1ee95fa47f1015c4d1b07cc08e4bb7ed38
|
data/README.rdoc
CHANGED
@@ -37,7 +37,23 @@ Add the resource to your app routes.rb yourapp/config/routes.rb:
|
|
37
37
|
Create controller in your application yourapp/app/controllers/manage/cities_controller.rb
|
38
38
|
|
39
39
|
class Manage::CitiesController < Manage::ResourceController
|
40
|
-
|
40
|
+
@@per_page = 10 # optional
|
41
|
+
|
42
|
+
# optional
|
43
|
+
def collection_actions collection
|
44
|
+
[
|
45
|
+
view_context.link_to(t('manage.views.winners.export_as_bank_file'), [:export_as_bank_file, resource_class], method: :post, class: 'button')
|
46
|
+
].join('').html_safe
|
47
|
+
end
|
48
|
+
|
49
|
+
# optional
|
50
|
+
def resource_actions resource
|
51
|
+
[
|
52
|
+
'',
|
53
|
+
view_context.link_to('Login as', login_as_user_path(resource.id)),
|
54
|
+
].join(' '.html_safe).html_safe
|
55
|
+
end
|
56
|
+
|
41
57
|
end
|
42
58
|
|
43
59
|
|
@@ -12,7 +12,7 @@ class Manage::ResourceController < Manage::ApplicationController
|
|
12
12
|
|
13
13
|
respond_to :html
|
14
14
|
|
15
|
-
helper_method :list_index_fields, :list_edit_fields, :list_search_fields, :list_action_links, :resource_actions
|
15
|
+
helper_method :list_index_fields, :list_edit_fields, :list_search_fields, :list_action_links, :resource_actions, :collection_actions
|
16
16
|
|
17
17
|
def end_of_association_chain
|
18
18
|
if self.resources_configuration[:self][:search_fields].blank?
|
@@ -93,6 +93,13 @@ class Manage::ResourceController < Manage::ApplicationController
|
|
93
93
|
nil
|
94
94
|
end
|
95
95
|
|
96
|
+
# This method provides links on which to submit all collection / selected items
|
97
|
+
# Example:
|
98
|
+
#
|
99
|
+
def collection_actions resource
|
100
|
+
nil
|
101
|
+
end
|
102
|
+
|
96
103
|
private
|
97
104
|
def self.setup_fields(key, *fields)
|
98
105
|
# :all means all the fields - default
|
@@ -1,12 +1,18 @@
|
|
1
1
|
table
|
2
2
|
thead
|
3
3
|
tr
|
4
|
+
- if collection_actions(collection)
|
5
|
+
th = check_box_tag 'select_all', '1', false, class: 'check_all'
|
6
|
+
|
4
7
|
- index_fields.each do |field_data|
|
5
8
|
th = field_title(resource_class, field_data)
|
6
9
|
th = t('.actions')
|
7
10
|
tbody
|
8
11
|
- collection.each do |resource|
|
9
12
|
tr
|
13
|
+
- if collection_actions(collection)
|
14
|
+
td = check_box_tag "selected_ids[]", resource.id, false, class: 'check_all'
|
15
|
+
|
10
16
|
- index_fields.each do |field_data|
|
11
17
|
td = field_value(resource, field_data)
|
12
18
|
td
|
@@ -4,13 +4,15 @@
|
|
4
4
|
nav
|
5
5
|
= link_to t('manage.actions.new', model: resource_class.model_name.human), [:new, resource_class.name.tableize.singularize], class: 'button small secondary'
|
6
6
|
|
7
|
-
= render
|
7
|
+
= render 'manage/resource/index/scopes'
|
8
|
+
|
8
9
|
|
9
10
|
.row
|
10
11
|
.columns.large-9
|
11
|
-
= render
|
12
|
+
= render 'manage/resource/index/table', index_fields: index_fields
|
12
13
|
.columns.large-3
|
13
|
-
= render
|
14
|
+
= render 'manage/resource/index/filters'
|
14
15
|
|
15
16
|
= paginate collection
|
16
|
-
= render
|
17
|
+
= render 'manage/resource/index/collection_actions', collection: collection
|
18
|
+
= render 'manage/resource/index/count'
|
data/lib/manage/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Empower United
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -263,6 +263,7 @@ files:
|
|
263
263
|
- app/views/manage/resource/_form.html.slim
|
264
264
|
- app/views/manage/resource/show.html.slim
|
265
265
|
- app/views/manage/resource/index/_count.html.slim
|
266
|
+
- app/views/manage/resource/index/_collection_actions.html.slim
|
266
267
|
- app/views/manage/resource/index/_table.html.slim
|
267
268
|
- app/views/manage/resource/index/_filters.html.slim
|
268
269
|
- app/views/manage/resource/index/_scopes.html.slim
|
@@ -300,7 +301,6 @@ files:
|
|
300
301
|
- lib/manage/engine.rb
|
301
302
|
- lib/manage/fields/searcher.rb
|
302
303
|
- lib/manage/fields/reader.rb
|
303
|
-
- lib/manage/version.rb.orig
|
304
304
|
- lib/manage.rb
|
305
305
|
- lib/tasks/manage_tasks.rake
|
306
306
|
- lib/templates/erb/scaffold/_form.html.erb
|