Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Map not displaying when refreshing #638

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 18 additions & 20 deletions app/views/decidim/proposals/proposals/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
<%= render partial: "decidim/shared/component_announcement" %>

<% if component_settings.geocoding_enabled? %>
<% cache @all_geocoded_proposals do %>
<%= dynamic_map_for proposals_data_for_map(@all_geocoded_proposals) do %>
<template id="marker-popup">
<div class="map-info__content">
<h3>${title}</h3>
<div id="bodyContent">
<p>{{html body}}</p>
<div class="map__date-address">
<div class="address card__extra">
<div class="address__icon">{{html icon}}</div>
<div class="address__details">
<span>${address}</span><br>
</div>
<%= dynamic_map_for proposals_data_for_map(@all_geocoded_proposals) do %>
<template id="marker-popup">
<div class="map-info__content">
<h3>${title}</h3>
<div id="bodyContent">
<p>{{html body}}</p>
<div class="map__date-address">
<div class="address card__extra">
<div class="address__icon">{{html icon}}</div>
<div class="address__details">
<span>${address}</span><br>
</div>
</div>
<div class="map-info__button">
<a href="${link}" class="button button--sc">
<%= t(".view_proposal") %>
</a>
</div>
</div>
<div class="map-info__button">
<a href="${link}" class="button button--sc">
<%= t(".view_proposal") %>
</a>
</div>
</div>
</template>
<% end %>
</div>
</template>
<% end %>
<% end %>
<%= render partial: "voting_rules" %>
Expand Down
Loading