-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
340 additions
and
179 deletions.
There are no files selected for viewing
22 changes: 11 additions & 11 deletions
22
app/cells/decidim/navigation_maps/content_blocks/navigation_map/_styles.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<style type="text/css"> | ||
<% blueprints.each do |blueprint| %> | ||
<% next unless blueprint.areas %> | ||
<% blueprint.areas.each do |area| %> | ||
.map-info-<%= blueprint.id %>-<%= area.area_id %> { | ||
border-color: <%= area.color %> !important; | ||
} | ||
.map-info-<%= blueprint.id %>-<%= area.area_id %> .leaflet-popup-tip { | ||
border-color: <%= area.color %> !important; | ||
} | ||
.map-info-<%= blueprint.id %>-<%= area.area_id %> .button { | ||
background-color: <%= area.color %>; | ||
color: #fff; | ||
} | ||
|
||
<% blueprint.areas.each do |area| %> | ||
.map-info-<%= blueprint.id %>-<%= area.area_id %> { | ||
border-color: <%= area.color %> !important; | ||
} | ||
.map-info-<%= blueprint.id %>-<%= area.area_id %> .leaflet-popup-tip { | ||
border-color: <%= area.color %> !important; | ||
} | ||
.map-info-<%= blueprint.id %>-<%= area.area_id %> .button { | ||
background-color: <%= area.color %>; | ||
color: #fff; | ||
} | ||
<% end %> | ||
<% end %> | ||
</style> |
14 changes: 9 additions & 5 deletions
14
app/cells/decidim/navigation_maps/content_blocks/navigation_map/_tabs.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<ul class="tabs" data-deep-link="true" data-update-history="true" data-deep-link-smudge="true" data-deep-link-smudge-delay="500" data-tabs id="navigation_maps-tabs"> | ||
<% tabs.each_with_index do |item, index| %> | ||
<li class="tabs-title<%= " is-active" if index.zero? %>"><a data-tabs-target="map<%= index %>" href="#map<%= index %>"><%= translated_attribute(item.title).presence || "Tab #{index + 1}" %></a></li> | ||
<% end %> | ||
</ul> | ||
<nav> | ||
<ul id="dropdown-menu-pages" class="vertical-tabs__list nav-tabs" id="navigation_maps-tabs"> | ||
<% tabs.each_with_index do |item, index| %> | ||
<li class="<%= " is-active" if index.zero? %>"> | ||
<a href="#map<%= index %>"><%= translated_attribute(item.title).presence || "Tab #{index + 1}" %></a> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</nav> |
5 changes: 2 additions & 3 deletions
5
app/cells/decidim/navigation_maps/content_blocks/navigation_map/_tabs_content.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
app/cells/decidim/navigation_maps/content_blocks/navigation_map/_template.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 16 additions & 15 deletions
31
app/cells/decidim/navigation_maps/content_blocks/navigation_map/show.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
<%= append_stylesheet_pack_tag "decidim_navigation_maps" %> | ||
<%= render partial: "styles", locals: { blueprints: valid_blueprints } %> | ||
|
||
<section<%= class_tag(section_classes) %>> | ||
<div<%= class_tag(wrapper_classes) %>> | ||
<div<%= class_tag(row_classes) %>> | ||
|
||
<% if translated_title.present? %> | ||
<h3 class="heading3"><%= decidim_sanitize translated_title %></h3> | ||
<% end %> | ||
<section class="home__section" id="navigation_maps-<%= model.id %>"> | ||
<% if translated_title.present? %> | ||
<div class="home__section-header"> | ||
<h2 class="home__section-title"><%= decidim_sanitize translated_title %></h2> | ||
</div> | ||
<% end %> | ||
|
||
<div class="navigation_maps"> | ||
<%= tabs %> | ||
<%= render partial: "tabs_content", locals: { tabs: valid_blueprints } %> | ||
</div> | ||
<% if autohide_tabs? %> | ||
<div class="navigation_maps"> | ||
<%= render partial: "tabs_content", locals: { tabs: valid_blueprints } %> | ||
</div> | ||
<% else %> | ||
<div class="vertical-tabs navigation_maps" id="tabs__navigation_maps"> | ||
<%= tabs %> | ||
<%= render partial: "tabs_content", locals: { tabs: valid_blueprints } %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</section> | ||
|
||
<%= render partial: "template" %> | ||
<% unless %w[here].include?(Decidim.config.maps&.fetch(:provider)) %> | ||
<%= append_javascript_pack_tag "decidim_leaflet" %> | ||
<% end %> | ||
<%= append_javascript_pack_tag "decidim_leaflet" %> | ||
<%= append_javascript_pack_tag "decidim_navigation_maps" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 6 additions & 10 deletions
16
app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form/_modal.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
|
||
<div class="reveal navigation_maps modal loading" id="mapEditModal" data-reveal> | ||
<div class="modal-content"> | ||
|
||
<div id="map-edit-modal" data-dialog="map-edit-modal" role="dialog" tabindex="-1" aria-hidden="true" aria-labelledby="dialog-title-map-edit-modal" aria-describedby="dialog-desc-map-edit-modal" aria-modal="true"> | ||
<div id="map-edit-modal-content"> | ||
<button type="button" data-dialog-close="map-edit-modal" data-dialog-closable="" aria-label="Close modal">×</button> | ||
<div data-dialog-container=""> | ||
<div class="modal-content"></div> | ||
</div> | ||
</div> | ||
|
||
<div class="spinner"></div> | ||
|
||
<button class="close-button" data-close aria-label="Close modal" type="button"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> |
10 changes: 7 additions & 3 deletions
10
app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form/_tabs.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<ul class="tabs" data-deep-link="true" data-update-history="true" data-deep-link-smudge="true" data-deep-link-smudge-delay="500" data-tabs id="navigation_maps-tabs"> | ||
<ul class="nav-tabs" id="navigation_maps-tabs"> | ||
<% tabs.each_with_index do |item, index| %> | ||
<li class="tabs-title<%= " is-active" if index.zero? %>"><a data-tabs-target="map<%= index %>" href="#map<%= index %>"><%= translated_attribute(item.title).presence || "Tab #{index + 1}" %></a></li> | ||
<li class="<%= " is-active" if index.zero? %>"> | ||
<a href="#map<%= index %>"><%= translated_attribute(item.title).presence || "Tab #{index + 1}" %></a> | ||
</li> | ||
<% end %> | ||
<li class="tabs-title"><a href="#map-new">+ <%= t("navigation_map_settings_form.add", scope: "decidim.navigation_maps.content_blocks") %></a></li> | ||
<li> | ||
<a href="#map-new">+ <%= t("navigation_map_settings_form.add", scope: "decidim.navigation_maps.content_blocks") %></a> | ||
</li> | ||
</ul> |
6 changes: 3 additions & 3 deletions
6
...lls/decidim/navigation_maps/content_blocks/navigation_map_settings_form/_tabs_content.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<div class="tabs-content" data-tabs-content="navigation_maps-tabs"> | ||
<div class="tab-content"> | ||
<% tabs.each_with_index do |item, index| %> | ||
<div class="tabs-panel<%= " is-active" if index.zero? %>" id="map<%= index %>"> | ||
<div class="tab-pane<%= " is-active" if index.zero? %>" id="map<%= index %>"> | ||
<%= render partial: "form", locals: { form: blueprint_form(item) } %> | ||
</div> | ||
<% end %> | ||
<div class="tabs-panel" id="map-new"> | ||
<div class="tab-pane" id="map-new"> | ||
<%= render partial: "form", locals: { form: blueprint_form } %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.