Module: Decidim::Feeds::FeedsHelper
- Includes:
- IconHelper, ResourceHelper, ResourceReferenceHelper, SanitizeHelper
- Defined in:
- app/helpers/decidim/feeds/feeds_helper.rb
Overview
Helpers related to the Feeds layout.
Instance Method Summary collapse
-
#feed_nav_items(participatory_space) ⇒ Object
Items to display in the navigation of an feed.
Instance Method Details
#feed_nav_items(participatory_space) ⇒ Object
Items to display in the navigation of an feed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/helpers/decidim/feeds/feeds_helper.rb', line 16 def feed_nav_items(participatory_space) components = participatory_space.components.published.or(Decidim::Component.where(id: try(:current_component))) [ # *(if participatory_space.members.not_ceased.any? # [{ # name: t("feed_member_menu_item", scope: "layouts.decidim.feed_navigation"), # url: decidim_feeds.feed_feed_members_path(participatory_space), # active: is_active_link?(decidim_feeds.feed_feed_members_path(participatory_space), :inclusive) # }] # end # ) ] + components.map do |component| { name: decidim_escape_translated(component.name), url: main_component_path(component), active: is_active_link?(main_component_path(component), :inclusive) } end end |