Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dashboard configuration to (not) be displayed in navigation
+ Introduces general configuration for Dashboards. + 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 3961851
Showing
7 changed files
with
81 additions
and
3 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