Skip to content

Commit a09917b

Browse files
authored
Fix meeting view when maps are disabled (decidim#13666)
1 parent 51c0700 commit a09917b

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

decidim-meetings/app/cells/decidim/meetings/dates_and_map/show.erb

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
</div>
1616
</div>
1717

18-
<%= static_map %>
19-
20-
<% if online? %>
18+
<% if display_map? %>
19+
<%= static_map %>
20+
<% elsif online? %>
2121
<%= cell("decidim/address", meeting, online: true) %>
22+
<% else %>
23+
<%= cell("decidim/address", meeting) %>
2224
<% end %>
2325
</div>

decidim-meetings/app/cells/decidim/meetings/dates_and_map_cell.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class DatesAndMapCell < Decidim::ViewModel
1414
delegate :snippets, to: :controller
1515

1616
def static_map
17-
return render :static_map if display_map?
17+
return render :static_map
1818
end
1919

2020
def year

decidim-meetings/spec/system/meeting_spec.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ def visit_meeting
107107
context "and meeting is in_person" do
108108
let(:meeting) { create(:meeting, :published, :with_services, component:) }
109109

110-
it "hides the map section" do
110+
it "hides the map section but displays address" do
111111
visit_meeting
112112

113113
expect(page).to have_no_css("div.meeting__calendar-container .static-map")
114+
expect(page).to have_css("div.meeting__calendar-container .address__container")
114115
end
115116
end
116117

0 commit comments

Comments
 (0)