-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36322c7
commit d738441
Showing
2 changed files
with
18 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
module LayoutHelperOverride | ||
def extended_navigation_bar(items, max_items: 6) | ||
return unless items.any? | ||
|
||
extra_items = items.slice((max_items + 1)..-1) || [] | ||
active_item = items.find { |item| item[:active] } | ||
|
||
controller.view_context.render partial: "decidim/shared/extended_navigation_bar", locals: { | ||
items: items, | ||
extra_items: extra_items, | ||
active_item: active_item, | ||
max_items: max_items | ||
} | ||
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