Skip to content

Commit

Permalink
Merge branch 'main' of github.com:PEMB2030/decidim-capitalofdemocracy…
Browse files Browse the repository at this point in the history
…-barcelona
  • Loading branch information
microstudi committed May 22, 2024
2 parents 1e7653f + 0b17eec commit 3a9f3f9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion app/helpers/concerns/conference_helper_override.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ module ConferenceHelperOverride
included do
alias_method :decidim_conference_nav_items, :conference_nav_items

# rubocop:disable Style/SingleArgumentDig
def conference_nav_items(participatory_space)
@conference_nav_items ||= begin
divisor = Rails.application.secrets.speakers_divisor[participatory_space.slug.to_sym]
divisor = Rails.application.secrets.speakers_divisor.dig(participatory_space.slug.to_sym)
items = decidim_conference_nav_items(participatory_space)
items.first[:name] = I18n.t("capital.speakers_divisor.#{divisor.first[:name]}") if participatory_space.speakers.exists? && divisor && divisor&.first&.[](:name)
items
end
end
# rubocop:enable Style/SingleArgumentDig
end
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- replace "#conference_speakers-grid" -->

<% divisor = Rails.application.secrets.speakers_divisor.dig(conference.slug.to_sym) %>

<section id="conference_speakers-grid">
<% if divisor && divisor.respond_to?(:each) %>
<% all_filters = divisor.pluck(:position_filter).flatten.filter(&:presence) %>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- replace "erb[loud]:contains('layouts/decidim/shared/layout_two_col')" -->

<%
lay = if conference_nav_items(current_participatory_space).empty?
"layouts/decidim/shared/layout_center"
else
"layouts/decidim/shared/layout_two_col"
end
%>
<%= render layout: lay, locals: { reverse: true, main_enabled: false, columns: 10 } do %>
2 changes: 1 addition & 1 deletion app/packs/stylesheets/partials/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.main-footer__language {
z-index: 20;
z-index: 21;
background-color: white;
outline: none !important;
width: 10rem;
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/overrides_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
files: {
"/app/controllers/decidim/conferences/conferences_controller.rb" => "4e1bd7427cfd12c79391b451e07a2e2a",
"/app/models/decidim/conference.rb" => "095732cb2451adfb9db7a46078dc3a51",
"/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb" => "7f24462f802a2c277697205511103d90"
"/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb" => "7f24462f802a2c277697205511103d90",
"/app/views/decidim/conferences/conferences/show.html.erb" => "93fa0d48a6117d3b1cb210ad1f17da7e"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion spec/system/conferences_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
allow(Rails.application.secrets.speakers_divisor).to receive(:dig).with(conference_city.slug.to_sym).and_return(divisor)
end

context "when main page" do |_variable|
context "when main page" do
before do
visit decidim_conferences.conference_path(slug: conference.slug)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/system/homepage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
it "includes the organization logo as its content" do
expect(page).to have_css(".main-footer__down")

within ".main-footer__down" do
within ".main-footer__top" do
expect(page).to have_css(".footer-logo")
expect(page).to have_css(".logos")
end
Expand Down

0 comments on commit 3a9f3f9

Please sign in to comment.