Skip to content

Commit

Permalink
Fix meeting view when maps are disabled (decidim#13666)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrlpz authored Dec 1, 2024
1 parent 51c0700 commit a09917b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
</div>
</div>

<%= static_map %>

<% if online? %>
<% if display_map? %>
<%= static_map %>
<% elsif online? %>
<%= cell("decidim/address", meeting, online: true) %>
<% else %>
<%= cell("decidim/address", meeting) %>
<% end %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DatesAndMapCell < Decidim::ViewModel
delegate :snippets, to: :controller

def static_map
return render :static_map if display_map?
return render :static_map
end

def year
Expand Down
3 changes: 2 additions & 1 deletion decidim-meetings/spec/system/meeting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ def visit_meeting
context "and meeting is in_person" do
let(:meeting) { create(:meeting, :published, :with_services, component:) }

it "hides the map section" do
it "hides the map section but displays address" do
visit_meeting

expect(page).to have_no_css("div.meeting__calendar-container .static-map")
expect(page).to have_css("div.meeting__calendar-container .address__container")
end
end

Expand Down

0 comments on commit a09917b

Please sign in to comment.