activeadmin_custom_layout 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/app/assets/javascripts/activeadmin_custom_layout.js +1 -0
- data/app/assets/stylesheets/activeadmin_custom_layout.css +1 -0
- data/lib/activeadmin_custom_layout/version.rb +1 -1
- data/lib/generators/activeadmin_custom_layout/install/files/custom_base_controller.rb +11 -0
- data/lib/generators/activeadmin_custom_layout/install/install_generator.rb +37 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 318c760b61ca2f0c45ea1ed0b9cc3c28b45a5cb8
|
4
|
+
data.tar.gz: 532a31e390b14fc3bd0082c129e2a0c62ab7f108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d3447560a46aece7ad2cdcb5d3fa05a2ebc528bed6c9d10e596145dfca1c13a12fa49e594ff8c8422a27110670fe88effc0687e19af09022ba72bbb93487a5
|
7
|
+
data.tar.gz: 6b7decd9d7e3de57fed96394ac1c8a8b01795bd4310b58ea8fa2d90240f33645758b2bd574a52c0672e2a2c23b020ea6ebb0e9628579a770ddecf7ef74feaeb2
|
data/README.md
CHANGED
@@ -72,11 +72,13 @@ And then execute:
|
|
72
72
|
$ bundle
|
73
73
|
```
|
74
74
|
|
75
|
-
|
75
|
+
Execute installer:
|
76
76
|
```bash
|
77
|
-
|
77
|
+
rails g activeadmin_custom_layout:install
|
78
78
|
```
|
79
79
|
|
80
|
+
You can override the default gem layout by creating your own using the structure shown above and then modify `/app/admin/custom_base_controller.rb` file to reference the new layout.
|
81
|
+
|
80
82
|
## Contributing
|
81
83
|
Contribution directions go here.
|
82
84
|
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require activeadmin_custom_layout/application
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require activeadmin_custom_layout/application
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'rails/generators/active_record'
|
2
|
+
|
3
|
+
module ActiveadminCustomLayout
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
desc "Configures ActiveAdmin to use custom layout in your app"
|
7
|
+
|
8
|
+
source_root File.expand_path('../', __FILE__)
|
9
|
+
ASSET_BASE_PATH = 'app/assets'
|
10
|
+
JS_BASE_PATH = "#{ASSET_BASE_PATH}/javascripts"
|
11
|
+
CSS_BASE_PATH = "#{ASSET_BASE_PATH}/stylesheets"
|
12
|
+
|
13
|
+
def add_javascripts
|
14
|
+
if File.exist?("#{JS_BASE_PATH}/active_admin.js")
|
15
|
+
append_file "#{JS_BASE_PATH}/active_admin.js", "\n//= require activeadmin_custom_layout\n"
|
16
|
+
elsif File.exist?("#{JS_BASE_PATH}/active_admin.js.coffee")
|
17
|
+
append_file "#{JS_BASE_PATH}/active_admin.js.coffee", "\n#= require activeadmin_custom_layout\n"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def add_stylesheets
|
22
|
+
if File.exist?("#{CSS_BASE_PATH}/active_admin.css")
|
23
|
+
append_file "#{CSS_BASE_PATH}/active_admin.css", "\n//= require activeadmin_custom_layout\n"
|
24
|
+
elsif File.exist?("#{CSS_BASE_PATH}/active_admin.css.scss")
|
25
|
+
append_file "#{CSS_BASE_PATH}/active_admin.css.scss", "\n//= require activeadmin_custom_layout\n"
|
26
|
+
elsif File.exist?("#{CSS_BASE_PATH}/active_admin.scss")
|
27
|
+
append_file "#{CSS_BASE_PATH}/active_admin.scss", "\n//= require activeadmin_custom_layout\n"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def copy_files
|
32
|
+
copy_file "./files/custom_base_controller.rb", "app/admin/custom_base_controller.rb"
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_custom_layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ByS Sistemas de Control
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|
@@ -227,7 +227,9 @@ files:
|
|
227
227
|
- activeadmin_custom_layout.gemspec
|
228
228
|
- app/assets/config/activeadmin_custom_layout_manifest.js
|
229
229
|
- app/assets/images/activeadmin_custom_layout/.keep
|
230
|
+
- app/assets/javascripts/activeadmin_custom_layout.js
|
230
231
|
- app/assets/javascripts/activeadmin_custom_layout/application.js
|
232
|
+
- app/assets/stylesheets/activeadmin_custom_layout.css
|
231
233
|
- app/assets/stylesheets/activeadmin_custom_layout/application.css
|
232
234
|
- app/controllers/activeadmin_custom_layout/application_controller.rb
|
233
235
|
- app/helpers/activeadmin_custom_layout/application_helper.rb
|
@@ -250,6 +252,8 @@ files:
|
|
250
252
|
- lib/activeadmin_custom_layout/layout/pages/index.rb
|
251
253
|
- lib/activeadmin_custom_layout/layout/title_bar.rb
|
252
254
|
- lib/activeadmin_custom_layout/version.rb
|
255
|
+
- lib/generators/activeadmin_custom_layout/install/files/custom_base_controller.rb
|
256
|
+
- lib/generators/activeadmin_custom_layout/install/install_generator.rb
|
253
257
|
- lib/tasks/activeadmin_custom_layout_tasks.rake
|
254
258
|
- test/activeadmin_custom_layout_test.rb
|
255
259
|
- test/dummy/Rakefile
|