Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration for dashboards to (not) display in navigation
+ Introduces configuration for Dashboards. (Easily extendedable for further configuration options) + By default every Dashboard is configured to be displayed in the navigation. How to remove a Dashboard from navigation: ``` class LineItemDashboard < Administrate::BaseDashboard configure do |config| config.navigation = false end end ```
- Loading branch information
1 parent
b53e691
commit 540d098
Showing
7 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Administrate | ||
class Navigation | ||
attr_reader :resources | ||
|
||
def initialize(namespace) | ||
namespace = Administrate::Namespace.new(namespace) | ||
@resources = namespace.resources.select(&:display_in_navigation?) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters