Add processes to goal view

Note the link to see all processes does not filter by goal because the
legislation section does not have any search filters.
This commit is contained in:
Javi Martín
2020-12-20 23:08:24 +01:00
parent 13fbf4e4b3
commit cc9ab70fbb
6 changed files with 43 additions and 1 deletions

View File

@@ -10,4 +10,10 @@
</article>
<%= render Widgets::Feeds::ParticipationComponent.new(feeds) %>
<% if processes_feed %>
<div class="feeds-list">
<%= render Widgets::Feeds::FeedComponent.new(processes_feed) %>
</div>
<% end %>
</div>

View File

@@ -9,4 +9,10 @@ class SDG::Goals::ShowComponent < ApplicationComponent
def feeds
SDG::Widget::Feed.for_goal(goal)
end
private
def processes_feed
feeds.find { |feed| feed.kind == "processes" }
end
end