File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [ ![ Gem Version] ( https://badge.fury.io/rb/active_admin_sidebar.svg )] ( https://badge.fury.io/rb/active_admin_sidebar )
2+ [ ![ NPM Version] ( https://badge.fury.io/js/@activeadmin-plugins%2Factive_admin_sidebar.svg )] ( https://badge.fury.io/js/@activeadmin-plugins%2Factive_admin_sidebar )
3+ ![ npm] ( https://img.shields.io/npm/dm/@activeadmin-plugins/active_admin_sidebar )
4+
15# ActiveAdmin Sidebar
26
37Provides ability to manipulate sidebar position for ActiveAdmin (tested with ActiveAdmin ~ > 1.0.0)
@@ -10,6 +14,7 @@ Add following line to the `Gemfile`
1014gem ' active_admin_sidebar'
1115```
1216
17+ ##### Using assets via Sprockets
1318Add following line to the ` app/assets/stylesheets/active_admin.css.scss `
1419
1520``` scss
@@ -24,6 +29,39 @@ If you want to use collapsing feature, add following line
2429
2530to the ` app/assets/javascripts/active_admin.js `
2631
32+ ##### Using assets via Webpacker (or any other assets bundler) as a NPM module (Yarn package)
33+
34+ Execute:
35+
36+ $ npm i @activeadmin-plugins/active_admin_sidebar
37+
38+ Or
39+
40+ $ yarn add @activeadmin-plugins/active_admin_sidebar
41+
42+ Or add manually to ` package.json ` :
43+
44+ ``` json
45+ "dependencies" : {
46+ "@activeadmin-plugins/active_admin_sidebar" : " 2.0.0"
47+ }
48+ ```
49+ and execute:
50+
51+ $ yarn
52+
53+ Add the following line into ` app/assets/javascripts/active_admin.js ` :
54+
55+ ``` javascript
56+ import ' @activeadmin-plugins/active_admin_sidebar' ;
57+ ```
58+
59+ Add the following line into ` app/assets/stylesheets/active_admin.scss ` :
60+
61+ ``` css
62+ @import ' @activeadmin-plugins/active_admin_sidebar' ;
63+ ```
64+
2765# Configuration per resource
2866
2967Changing sidebar position dynamically with before_action
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @activeadmin-plugins/active_admin_sidebar" ,
3+ "version" : " 2.0.0" ,
4+ "description" : " Extension for ActiveAdmin gem to manage sidebar" ,
5+ "main" : " src/active_admin_sidebar.js" ,
6+ "style" : " src/active_admin_sidebar.scss" ,
7+ "repository" : " git@github.com:activeadmin-plugins/active_admin_sidebar.git" ,
8+ "author" : " Igor Fedoronchuk <fedoronchuk@gmail.com>" ,
9+ "license" : " MIT" ,
10+ "private" : false ,
11+ "repository" : {
12+ "type" : " git" ,
13+ "url" : " git+https://github.com/activeadmin-plugins/active_admin_sidebar.git"
14+ },
15+ "bugs" : {
16+ "url" : " https://github.com/activeadmin-plugins/active_admin_sidebar/issues"
17+ },
18+ "homepage" : " https://github.com/activeadmin-plugins/active_admin_sidebar#readme" ,
19+ "keywords" : [
20+ " active" ,
21+ " admin" ,
22+ " sidebar"
23+ ],
24+ "files" : [
25+ " src/**/*"
26+ ],
27+ "scripts" : {
28+ "prepublishOnly" : " rm -rf src && cp -R app/assets/javascripts/ src && cp -R app/assets/stylesheets/ src"
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments