All Projects → zorab47 → active_admin-subnav

zorab47 / active_admin-subnav

Licence: MIT license
Enhanced sub-navigation for nested ActiveAdmin resources

Programming Languages

ruby
36898 projects - #4 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to active admin-subnav

navigation array
Helper function for building navigations for REDAXO cms
Stars: ✭ 22 (+10%)
Mutual labels:  navigation
react-native-weather
This project is to explore React Navigation (Drawer, Tab, and Stack Navigators). And explore best practices around styling, design, and collaborating with designers for better UX for building great apps.
Stars: ✭ 51 (+155%)
Mutual labels:  navigation
UT Framework
Various advanced tools built for Unreal Engine 4
Stars: ✭ 45 (+125%)
Mutual labels:  navigation
diractions
👨‍💻 Doing Anything, Anywhere, from Here [zsh] 🚏
Stars: ✭ 30 (+50%)
Mutual labels:  navigation
pygac
A python package to read and calibrate NOAA and Metop AVHRR GAC and LAC data
Stars: ✭ 14 (-30%)
Mutual labels:  navigation
timelens
Timelens command-line client
Stars: ✭ 39 (+95%)
Mutual labels:  navigation
vue-bottom-navigation
Vue bottom navigation
Stars: ✭ 56 (+180%)
Mutual labels:  navigation
SidebarOverlay
Yet another implementation of sidebar menu, but here your menu appears over the top view controller.
Stars: ✭ 66 (+230%)
Mutual labels:  navigation
active admin role
Role based authorization with CanCanCan for Active Admin
Stars: ✭ 53 (+165%)
Mutual labels:  activeadmin
NavigationRouter
A router implementation designed for complex modular apps, written in Swift
Stars: ✭ 89 (+345%)
Mutual labels:  navigation
jquery-scrollwatch
jQuery plugin for determining active sections on the page based on scrolling
Stars: ✭ 18 (-10%)
Mutual labels:  navigation
navdatareader
Navdatareader is a command line tool that uses the atools fs/bgl and fs/writer to store a full flight simulator scenery database into a relational database like Sqlite or MySql.
Stars: ✭ 35 (+75%)
Mutual labels:  navigation
shortcuts-for-chrome
Chrome navigation menu for technical users.
Stars: ✭ 28 (+40%)
Mutual labels:  navigation
vox nav
A project to develop/adapt a navigation system for outdoor robotics in rough uneven terrains
Stars: ✭ 101 (+405%)
Mutual labels:  navigation
graphhopper-ios
iOS Port of the GraphHopper road routing engine
Stars: ✭ 67 (+235%)
Mutual labels:  navigation
bottom-nav
Material Design bottom-nav https://material.io/guidelines/components/bottom-navigation.html
Stars: ✭ 25 (+25%)
Mutual labels:  navigation
easyRNRoute
https://medium.com/@kevinle/comprehensive-routing-and-navigation-in-react-native-made-easy-6383e6cdc293#.nttfeeq3p
Stars: ✭ 25 (+25%)
Mutual labels:  navigation
leaflet-layer-tree-plugin
No description or website provided.
Stars: ✭ 31 (+55%)
Mutual labels:  navigation
shortcut
Quickly make and use shortcuts in your shell for easy navigation
Stars: ✭ 17 (-15%)
Mutual labels:  navigation
AI
使用深度强化学习解决视觉跟踪和视觉导航问题
Stars: ✭ 16 (-20%)
Mutual labels:  navigation

ActiveAdmin::Subnav

Gem Version

Enhanced sub-navigation for nested ActiveAdmin resources.

Currently, the base ActiveAdmin resets the top navigation menu to display the nested navigation menu, but it can be confusing to lose the main navigation context. This project keeps the main navigation visible and displays a secondary navigation bar for nested resources.

ActiveAdmin::Subnav Example

Supports both ActiveAdmin v1.0.0+ and older v0.6.4+ versions.

Note: Optional belongs_to configurations are not supported!

Usage

Resource belongs_to configuration does not require any extra configuration beyond the default. Below the Post resource belongs to Site.

# admin/site.rb
ActiveAdmin.register Site

# admin/post.rb
ActiveAdmin.register Post do
  belongs_to :site
end

Registering belongs_to pages requires more setup to properly access the parent record. This is a side effect of how Arbre references parent HTML nodes. Below a new method, #site, is created to provide access to the parent record.

# admin/site_statistics.rb
ActiveAdmin.register_page "Statistics" do
  belongs_to :site

  content do
    statistics = site.statistics
    # ...
  end

  controller do

    # Provide access to the parent resource record: Site.
    #
    # Without this extra setup the parent record will not be accessible. Any
    # calls to `#parent` will return the Arbre parent element and not the
    # ActiveAdmin resource.
    alias_method :site, :parent

    # Expose the method as a helper making it available to the view
    helper_method :site

  end
end

Installation

Add this line to your application's Gemfile:

gem 'active_admin-subnav'

And then execute:

$ bundle

Add the subnav's styles to your active_admin.css.scss stylesheet:

//= require active_admin/subnav

// Align subnav with main navigation by padding the width of the site's
// title.
#header div.subnav {
  padding-left: 8.333em;
}

Contributing

  1. Fork it ( https://github.com/zorab47/active_admin-subnav/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Versioning

Follows Semantic Versioning 2.0.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].