rails_admin_acts_as_list 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0e2c4a92ef64542422936b003a82dbacf5fbbeb2
4
+ data.tar.gz: c0fe0120c331275cc383a4ac5c0a043507a143df
5
+ SHA512:
6
+ metadata.gz: 5b77cb7048cfdc02ee684ae0337ed3f86e500624b8470ea4f1de49f39045230d5fa060bdeca3445d4a6c0558cc212fd1e18c89fb3529fe535b52c092f3372781
7
+ data.tar.gz: 5c78faa36a838470039ecd5563e66830b37e41818c9b9e833f29cd5690b5c86d952558226ae9c864535c060c6aba1333f281c331721697c977f037e8a0ece9ac
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2015 ankion
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = RailsAdminActsAsList
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,24 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'RailsAdminActsAsList'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+
19
+ load 'rails/tasks/statistics.rake'
20
+
21
+
22
+
23
+ Bundler::GemHelper.install_tasks
24
+
@@ -0,0 +1,18 @@
1
+
2
+ en:
3
+ admin:
4
+ actions:
5
+ move_higher:
6
+ title: "Move Higher"
7
+ menu: "Move Higher for %{model_label} '%{object_label}'"
8
+ breadcrumb: "Move Higher"
9
+ link: "Move Higher"
10
+ bulk_link: "Move Higher selected %{model_label_plural}"
11
+ done: "Move higher"
12
+ move_lower:
13
+ title: "Move Lower"
14
+ menu: "Move Lower for %{model_label} '%{object_label}'"
15
+ breadcrumb: "Move Lower"
16
+ link: "Move Lower"
17
+ bulk_link: "Move Lower selected %{model_label_plural}"
18
+ done: "Move Lower"
@@ -0,0 +1,6 @@
1
+ require "rails_admin_acts_as_list/engine"
2
+
3
+ module RailsAdminActsAsList
4
+ end
5
+
6
+ require "rails_admin_acts_as_list/action"
@@ -0,0 +1,47 @@
1
+ require 'rails_admin/config/actions'
2
+ require 'rails_admin/config/actions/base'
3
+
4
+ module RailsAdmin
5
+ module Config
6
+ module Actions
7
+ class MoveLower < Base
8
+ RailsAdmin::Config::Actions.register(self)
9
+
10
+ register_instance_option :visible? do
11
+ authorized? and defined? bindings[:object].move_lower
12
+ end
13
+ register_instance_option :link_icon do
14
+ 'icon-arrow-down fa fa-arrow-down'
15
+ end
16
+ register_instance_option :member do
17
+ true
18
+ end
19
+ register_instance_option :controller do
20
+ Proc.new do
21
+ @object.move_lower
22
+ redirect_to back_or_index
23
+ end
24
+ end
25
+ end
26
+ class MoveHigher < Base
27
+ RailsAdmin::Config::Actions.register(self)
28
+
29
+ register_instance_option :visible? do
30
+ authorized? and defined? bindings[:object].move_higher
31
+ end
32
+ register_instance_option :link_icon do
33
+ 'icon-arrow-up fa fa-arrow-up'
34
+ end
35
+ register_instance_option :member do
36
+ true
37
+ end
38
+ register_instance_option :controller do
39
+ Proc.new do
40
+ @object.move_higher
41
+ redirect_to back_or_index
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,4 @@
1
+ module RailsAdminActsAsList
2
+ class Engine < ::Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module RailsAdminActsAsList
2
+ VERSION = "0.0.3"
3
+ end
metadata ADDED
@@ -0,0 +1,94 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails_admin_acts_as_list
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - ankion
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails_admin
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: acts_as_list
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0.7'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0.7'
55
+ description: Rails Admin custom action to sorting records
56
+ email:
57
+ - ankion@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - MIT-LICENSE
63
+ - README.rdoc
64
+ - Rakefile
65
+ - config/locales/acts_as_list.en.yml
66
+ - lib/rails_admin_acts_as_list.rb
67
+ - lib/rails_admin_acts_as_list/action.rb
68
+ - lib/rails_admin_acts_as_list/engine.rb
69
+ - lib/rails_admin_acts_as_list/version.rb
70
+ homepage: https://github.com/ankion/rails_admin_acts_as_list
71
+ licenses:
72
+ - MIT
73
+ metadata: {}
74
+ post_install_message:
75
+ rdoc_options: []
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubyforge_project:
90
+ rubygems_version: 2.4.5
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: Rails Admin plugin to sorting records
94
+ test_files: []