decidim-navigation_maps 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/Rakefile +10 -0
- data/app/assets/javascripts/decidim/navigation_maps/map_view.js +11 -11
- data/app/cells/decidim/navigation_maps/content_blocks/groups_navigation_map_cell.rb +21 -0
- data/app/cells/decidim/navigation_maps/content_blocks/navigation_map/show.erb +4 -4
- data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_cell.rb +26 -0
- data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form/show.erb +3 -1
- data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form_cell.rb +1 -1
- data/app/commands/decidim/navigation_maps/save_blueprints.rb +7 -1
- data/app/controllers/decidim/navigation_maps/admin/blueprints_controller.rb +2 -2
- data/app/forms/decidim/navigation_maps/area_form.rb +1 -1
- data/app/forms/decidim/navigation_maps/blueprint_form.rb +1 -0
- data/app/forms/decidim/navigation_maps/blueprint_forms.rb +1 -0
- data/app/models/decidim/navigation_maps/blueprint.rb +1 -0
- data/app/queries/decidim/navigation_maps/content_block_blueprints.rb +20 -0
- data/config/locales/ca.yml +1 -0
- data/config/locales/cs.yml +2 -1
- data/config/locales/en.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/db/migrate/20201105130724_add_reference_to_content_block_to_blueprints_table.rb +12 -0
- data/db/seeds.rb +57 -7
- data/db/seeds/pla-cerda.jpg +0 -0
- data/lib/decidim/navigation_maps/engine.rb +12 -0
- data/lib/decidim/navigation_maps/navigation_map_cell_helpers.rb +4 -4
- data/lib/decidim/navigation_maps/test/factories.rb +1 -0
- data/lib/decidim/navigation_maps/version.rb +2 -2
- data/lib/tasks/custom_seeds.rake +8 -0
- metadata +21 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e99886ba8f12f6602904f174d2d82542def72cc7e6eb2dcdaa07861876d7eed
|
4
|
+
data.tar.gz: d57eef525c3197b6dcd5645cb1f5ed433762558223ee80895f78b34af4216230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4a1b325b560400a2ee97b8ebd1d2e67e40a5472922e3cf631630233f8552576f54574c453ca4c73d6093410059cb154d3062861b8e6f29729a40db4f62cb6f7
|
7
|
+
data.tar.gz: 71a153f0cc0c8e4675c5292e0a40248cd7510c39052e1b83856006bf3798340a9489078a0bfc23f02f68bc4087d377a8a9f724a5e5a52e1a8f14a2266d6e6a31
|
data/README.md
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
[](https://codeclimate.com/github/Platoniq/decidim-module-navigation_maps/maintainability)
|
5
5
|
[](https://codecov.io/gh/Platoniq/decidim-module-navigation_maps)
|
6
6
|
|
7
|
-
|
7
|
+
This module allows admins to upload any arbitrary image and draw sensible zones over it with direct links to other places (ie: a specific participatory process) or display a popup explaining something.
|
8
8
|
|
9
|
-
|
9
|
+
Maps can be displayed in the homepage or as part of a process group landing.
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
@@ -24,10 +24,10 @@ homepage only).
|
|
24
24
|
Add this line to your application's Gemfile:
|
25
25
|
|
26
26
|
```ruby
|
27
|
-
gem "decidim-navigation_maps", "~> 1.
|
27
|
+
gem "decidim-navigation_maps", "~> 1.2.0"
|
28
28
|
```
|
29
29
|
|
30
|
-
And then execute:
|
30
|
+
And then execute (remember to repeat this if you are upgrading from version 1.1):
|
31
31
|
|
32
32
|
```bash
|
33
33
|
bundle
|
@@ -41,6 +41,7 @@ Depending on your Decidim version, choose the corresponding Plugin version to en
|
|
41
41
|
|---|---|
|
42
42
|
| 1.0.x | 0.18.x - 0.21.x |
|
43
43
|
| 1.1.x | 0.22.x, 0.23.x |
|
44
|
+
| 1.2.x | 0.24.x |
|
44
45
|
|
45
46
|
## Contributing
|
46
47
|
|
data/Rakefile
CHANGED
@@ -15,6 +15,12 @@ def seed_db(path)
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
+
def seed_module_db(path)
|
19
|
+
Dir.chdir(path) do
|
20
|
+
system("bundle exec rake decidim_navigation_maps:seed")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
18
24
|
desc "Generates a dummy app for testing"
|
19
25
|
task test_app: "decidim:generate_external_test_app" do
|
20
26
|
ENV["RAILS_ENV"] = "test"
|
@@ -36,5 +42,9 @@ task :development_app do
|
|
36
42
|
end
|
37
43
|
|
38
44
|
install_module("development_app")
|
45
|
+
ENV["SKIP_MODULE_SEEDS"] = "1"
|
39
46
|
seed_db("development_app")
|
47
|
+
# manually seed navigation maps to ensure participatory process groups are created
|
48
|
+
ENV.delete "SKIP_MODULE_SEEDS"
|
49
|
+
seed_module_db("development_app")
|
40
50
|
end
|
@@ -27,18 +27,18 @@ function NavigationMapView(map_object, callback) {
|
|
27
27
|
|
28
28
|
NavigationMapView.prototype.createMap = function() {
|
29
29
|
var bounds = [[0,0], [this.image.height,this.image.width]];
|
30
|
-
|
31
30
|
this.map = L.map(this.map_object, {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
minZoom: -1,
|
32
|
+
maxZoom: 2,
|
33
|
+
crs: L.CRS.Simple,
|
34
|
+
noWrap: true,
|
35
|
+
zoomSnap: 0,
|
36
|
+
// zoomDelta: 0.1,
|
37
|
+
maxBounds: [[0,0], [this.image.height,this.image.width]],
|
38
|
+
center: [this.image.height/2, this.image.width/2],
|
39
|
+
zoom: -1,
|
40
|
+
scrollWheelZoom: false,
|
41
|
+
attributionControl: false
|
42
42
|
});
|
43
43
|
|
44
44
|
L.imageOverlay(this.image.src, bounds).addTo(this.map);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module NavigationMaps
|
5
|
+
module ContentBlocks
|
6
|
+
class GroupsNavigationMapCell < NavigationMapCell
|
7
|
+
def section_classes
|
8
|
+
"section"
|
9
|
+
end
|
10
|
+
|
11
|
+
def wrapper_classes
|
12
|
+
nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def row_classes
|
16
|
+
"row column"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,16 +1,16 @@
|
|
1
1
|
<%= stylesheet_link_tag "decidim/navigation_maps/navigation_maps" %>
|
2
2
|
<%= render partial: "styles", locals: { blueprints: valid_blueprints } %>
|
3
3
|
|
4
|
-
<section
|
5
|
-
<div
|
6
|
-
<div
|
4
|
+
<section<%= class_tag(section_classes) %>>
|
5
|
+
<div<%= class_tag(wrapper_classes) %>>
|
6
|
+
<div<%= class_tag(row_classes) %>>
|
7
7
|
|
8
8
|
<% if translated_title.present? %>
|
9
9
|
<h3 class="heading3"><%= decidim_sanitize translated_title %></h3>
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
<div class="navigation_maps">
|
13
|
-
<%=
|
13
|
+
<%= tabs %>
|
14
14
|
<%= render partial: "tabs_content", locals: { tabs: valid_blueprints } %>
|
15
15
|
</div>
|
16
16
|
</div>
|
@@ -7,15 +7,41 @@ module Decidim
|
|
7
7
|
include NavigationMaps::NavigationMapCellHelpers
|
8
8
|
include Decidim::SanitizeHelper
|
9
9
|
|
10
|
+
alias content_block model
|
11
|
+
|
10
12
|
view_paths << "#{Decidim::NavigationMaps::Engine.root}/app/cells/decidim/navigation_maps/content_blocks/navigation_map"
|
11
13
|
|
12
14
|
def show
|
13
15
|
render if valid_blueprints?
|
14
16
|
end
|
15
17
|
|
18
|
+
def tabs
|
19
|
+
return if model.settings.autohide_tabs? && valid_blueprints.count < 2
|
20
|
+
|
21
|
+
render partial: "tabs", locals: { tabs: valid_blueprints }
|
22
|
+
end
|
23
|
+
|
16
24
|
def translated_title
|
17
25
|
translated_attribute(model.settings.title)
|
18
26
|
end
|
27
|
+
|
28
|
+
def section_classes
|
29
|
+
"extended home-section"
|
30
|
+
end
|
31
|
+
|
32
|
+
def wrapper_classes
|
33
|
+
"wrapper-home"
|
34
|
+
end
|
35
|
+
|
36
|
+
def row_classes
|
37
|
+
"row column text-center"
|
38
|
+
end
|
39
|
+
|
40
|
+
def class_tag(class_string)
|
41
|
+
return if class_string.blank?
|
42
|
+
|
43
|
+
" class=\"#{class_string}\""
|
44
|
+
end
|
19
45
|
end
|
20
46
|
end
|
21
47
|
end
|
@@ -1,11 +1,13 @@
|
|
1
1
|
<!-- Original settings -->
|
2
2
|
<% form.fields_for :settings, form.object.settings do |settings_fields| %>
|
3
|
-
<%= settings_fields.translated :text_field, :title %>
|
3
|
+
<%= settings_fields.translated :text_field, :title, label: t("content_blocks.navigation_map_settings_form.title", scope: "decidim.navigation_maps") %>
|
4
|
+
<%= settings_fields.check_box :autohide_tabs, label: t("content_blocks.navigation_map_settings_form.autohide_tabs", scope: "decidim.navigation_maps") %>
|
4
5
|
<% end %>
|
5
6
|
|
6
7
|
<!-- Override rails default patch (using post via ajax) -->
|
7
8
|
<%= hidden_field_tag :_method, "post" %>
|
8
9
|
<%= hidden_field_tag :action, blueprints_path %>
|
10
|
+
<%= hidden_field_tag :content_block_id, content_block.id %>
|
9
11
|
|
10
12
|
<div class="navigation_maps admin">
|
11
13
|
<div class="callout" style="display:none" data-closable>
|
@@ -10,7 +10,7 @@ module Decidim
|
|
10
10
|
view_paths << "#{Decidim::NavigationMaps::Engine.root}/app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form"
|
11
11
|
|
12
12
|
def blueprint_form(blueprint = nil)
|
13
|
-
blueprint ||= Blueprint.new
|
13
|
+
blueprint ||= Blueprint.new(content_block: content_block)
|
14
14
|
BlueprintForm.from_model(blueprint).with_context(organization: current_organization)
|
15
15
|
end
|
16
16
|
|
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module NavigationMaps
|
5
|
-
# This command creates or updates the blueprints for the organization
|
5
|
+
# This command creates or updates the blueprints for the organization and
|
6
|
+
# content block.
|
6
7
|
class SaveBlueprints < Rectify::Command
|
7
8
|
# Creates a blueprint.
|
8
9
|
#
|
@@ -42,6 +43,7 @@ module Decidim
|
|
42
43
|
def initialize_blueprint(form)
|
43
44
|
@blueprint = Blueprint.find_or_initialize_by(id: form.id) do |blueprint|
|
44
45
|
blueprint.organization = @forms.current_organization
|
46
|
+
blueprint.content_block = content_block
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
@@ -61,6 +63,10 @@ module Decidim
|
|
61
63
|
@blueprint.areas.where.not(area_id: except).destroy_all
|
62
64
|
end
|
63
65
|
|
66
|
+
def content_block
|
67
|
+
Decidim::ContentBlock.where(organization: @forms.current_organization, manifest_name: :navigation_map).find_by(id: @forms.content_block_id)
|
68
|
+
end
|
69
|
+
|
64
70
|
def create_areas(blueprint)
|
65
71
|
blueprint.each do |key, area|
|
66
72
|
a = BlueprintArea.find_or_initialize_by(area_id: key, blueprint: @blueprint)
|
@@ -39,11 +39,11 @@ module Decidim
|
|
39
39
|
return unless params[:content_block][:settings]
|
40
40
|
|
41
41
|
@form = form(Decidim::Admin::ContentBlockForm).from_params(params)
|
42
|
-
Decidim::Admin::UpdateContentBlock.call(@form, content_block,
|
42
|
+
Decidim::Admin::UpdateContentBlock.call(@form, content_block, content_block.scope_name&.to_sym)
|
43
43
|
end
|
44
44
|
|
45
45
|
def content_block
|
46
|
-
@content_block ||= Decidim::ContentBlock.
|
46
|
+
@content_block ||= Decidim::ContentBlock.where(organization: current_organization, manifest_name: :navigation_map).find(params[:content_block_id])
|
47
47
|
end
|
48
48
|
|
49
49
|
# Convert blueprint data to an object
|
@@ -9,6 +9,7 @@ module Decidim
|
|
9
9
|
attribute :height, :integer, default: 475
|
10
10
|
|
11
11
|
belongs_to :organization, foreign_key: :decidim_organization_id, class_name: "Decidim::Organization"
|
12
|
+
belongs_to :content_block, foreign_key: :decidim_content_block_id, class_name: "Decidim::ContentBlock"
|
12
13
|
has_many :areas,
|
13
14
|
foreign_key: "decidim_navigation_maps_blueprint_id",
|
14
15
|
class_name: "Decidim::NavigationMaps::BlueprintArea",
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module NavigationMaps
|
5
|
+
# This query finds the published blueprints for a content block
|
6
|
+
class ContentBlockBlueprints < Rectify::Query
|
7
|
+
def initialize(content_block)
|
8
|
+
@content_block = content_block
|
9
|
+
end
|
10
|
+
|
11
|
+
def query
|
12
|
+
Decidim::NavigationMaps::Blueprint.where(content_block: @content_block)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
attr_reader :content_block
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/config/locales/ca.yml
CHANGED
data/config/locales/cs.yml
CHANGED
@@ -29,10 +29,11 @@ cs:
|
|
29
29
|
view: Zapojte se
|
30
30
|
navigation_map_settings_form:
|
31
31
|
add: Přidat
|
32
|
+
autohide_tabs: Hide tabs navigation if there's only one map
|
32
33
|
blueprint_image: Obrázek plánu
|
33
34
|
description: Popis
|
34
35
|
editor: Editor mapy
|
35
|
-
height:
|
36
|
+
height: Výška (px)
|
36
37
|
id: Id
|
37
38
|
image_missing: Pro začátek přidejte obrázek plánu
|
38
39
|
info: Obecné informace
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddReferenceToContentBlockToBlueprintsTable < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
add_reference(
|
6
|
+
:decidim_navigation_maps_blueprints,
|
7
|
+
:decidim_content_block,
|
8
|
+
foreign_key: true,
|
9
|
+
index: { name: "decidim_navigation_maps_constraint_content_block" }
|
10
|
+
)
|
11
|
+
end
|
12
|
+
end
|
data/db/seeds.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
print "Skipping seeds for decidim_navigation maps as required by SKIP_MODULE_SEEDS\n" if ENV["SKIP_MODULE_SEEDS"]
|
4
|
+
|
5
|
+
if !ENV["SKIP_MODULE_SEEDS"] && (!Rails.env.production? || ENV["SEED"])
|
6
|
+
|
4
7
|
print "Creating seeds for decidim_navigation maps...\n" unless Rails.env.test?
|
5
8
|
|
6
9
|
require "decidim/faker/localized"
|
@@ -8,27 +11,29 @@ if !Rails.env.production? || ENV["SEED"]
|
|
8
11
|
|
9
12
|
organization = Decidim::Organization.first
|
10
13
|
|
11
|
-
|
14
|
+
# homepage blueprint
|
15
|
+
content_block = Decidim::ContentBlock.create(
|
12
16
|
decidim_organization_id: organization.id,
|
13
17
|
weight: 1,
|
14
18
|
scope_name: :homepage,
|
15
19
|
manifest_name: :navigation_map,
|
16
20
|
published_at: Time.current,
|
17
|
-
settings: { title: Decidim::Faker::Localized.sentence(5) }
|
21
|
+
settings: { title: Decidim::Faker::Localized.sentence(word_count: 5) }
|
18
22
|
)
|
19
23
|
|
20
24
|
blueprint1 = Decidim::NavigationMaps::Blueprint.create(
|
21
25
|
organization: organization,
|
26
|
+
content_block: content_block,
|
22
27
|
image: File.new(File.join(seeds_root, "antarctica.png")),
|
23
|
-
title: Decidim::Faker::Localized.sentence(2),
|
24
|
-
description: Decidim::Faker::Localized.sentence(10)
|
28
|
+
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
29
|
+
description: Decidim::Faker::Localized.sentence(word_count: 10)
|
25
30
|
)
|
26
31
|
|
27
32
|
Decidim::NavigationMaps::Blueprint.create(
|
28
33
|
organization: organization,
|
29
34
|
image: File.new(File.join(seeds_root, "penguins.jpg")),
|
30
|
-
title: Decidim::Faker::Localized.sentence(2),
|
31
|
-
description: Decidim::Faker::Localized.sentence(10)
|
35
|
+
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
36
|
+
description: Decidim::Faker::Localized.sentence(word_count: 10)
|
32
37
|
)
|
33
38
|
|
34
39
|
Decidim::NavigationMaps::BlueprintArea.create(
|
@@ -100,4 +105,49 @@ if !Rails.env.production? || ENV["SEED"]
|
|
100
105
|
link: "#map1",
|
101
106
|
link_type: "direct"
|
102
107
|
)
|
108
|
+
|
109
|
+
# participatory process groups blueprint
|
110
|
+
Decidim::ParticipatoryProcessGroup.find_each do |group|
|
111
|
+
content_block = Decidim::ContentBlock.create(
|
112
|
+
decidim_organization_id: organization.id,
|
113
|
+
weight: 1,
|
114
|
+
scope_name: :participatory_process_group_homepage,
|
115
|
+
scoped_resource_id: group.id,
|
116
|
+
manifest_name: :navigation_map,
|
117
|
+
published_at: Time.current,
|
118
|
+
settings: { title: Decidim::Faker::Localized.sentence(word_count: 5), autohide_tabs: true }
|
119
|
+
)
|
120
|
+
|
121
|
+
blueprint = Decidim::NavigationMaps::Blueprint.create(
|
122
|
+
organization: organization,
|
123
|
+
content_block: content_block,
|
124
|
+
image: File.new(File.join(seeds_root, "pla-cerda.jpg")),
|
125
|
+
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
126
|
+
description: Decidim::Faker::Localized.sentence(word_count: 10)
|
127
|
+
)
|
128
|
+
|
129
|
+
Decidim::NavigationMaps::BlueprintArea.create(
|
130
|
+
blueprint: blueprint,
|
131
|
+
area_id: "10",
|
132
|
+
area_type: "Feature",
|
133
|
+
area: {
|
134
|
+
type: "Polygon",
|
135
|
+
coordinates: [[
|
136
|
+
[286.211699, 216.817532],
|
137
|
+
[342.618384, 252.332852],
|
138
|
+
[449.164345, 210.550122],
|
139
|
+
[447.075209, 191.747894],
|
140
|
+
[429.665738, 147.179649],
|
141
|
+
[323.816156, 126.288284],
|
142
|
+
[285.51532, 170.856529],
|
143
|
+
[286.211699, 216.817532]
|
144
|
+
]]
|
145
|
+
},
|
146
|
+
link: "https://en.wikipedia.org/wiki/Centelles",
|
147
|
+
link_type: "link",
|
148
|
+
color: "#ff4700",
|
149
|
+
title: { en: "Pla Cerdà" },
|
150
|
+
description: { en: "Cerdà was from the town of Centelles" }
|
151
|
+
)
|
152
|
+
end
|
103
153
|
end
|
Binary file
|
@@ -21,6 +21,18 @@ module Decidim
|
|
21
21
|
|
22
22
|
content_block.settings do |settings|
|
23
23
|
settings.attribute :title, type: :text, translated: true
|
24
|
+
settings.attribute :autohide_tabs, type: :boolean, default: false
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
Decidim.content_blocks.register(:participatory_process_group_homepage, :navigation_map) do |content_block|
|
29
|
+
content_block.cell = "decidim/navigation_maps/content_blocks/groups_navigation_map"
|
30
|
+
content_block.public_name_key = "decidim.navigation_maps.content_blocks.name"
|
31
|
+
content_block.settings_form_cell = "decidim/navigation_maps/content_blocks/navigation_map_settings_form"
|
32
|
+
|
33
|
+
content_block.settings do |settings|
|
34
|
+
settings.attribute :title, type: :text, translated: true
|
35
|
+
settings.attribute :autohide_tabs, type: :boolean, default: false
|
24
36
|
end
|
25
37
|
end
|
26
38
|
end
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
delegate :available_locales, to: :current_organization
|
8
8
|
|
9
9
|
def valid_blueprints
|
10
|
-
|
10
|
+
content_block_blueprints.where.not(image: [nil, ""]).order(:created_at)
|
11
11
|
end
|
12
12
|
|
13
13
|
def valid_blueprints?
|
@@ -15,13 +15,13 @@ module Decidim
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def blueprints
|
18
|
-
|
18
|
+
content_block_blueprints.order(:created_at)
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
|
-
def
|
24
|
-
@
|
23
|
+
def content_block_blueprints
|
24
|
+
@content_block_blueprints ||= (OrganizationBlueprints.new(current_organization) | ContentBlockBlueprints.new(content_block)).query
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -8,6 +8,7 @@ FactoryBot.define do
|
|
8
8
|
image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
9
9
|
title { Decidim::Faker::Localized.word }
|
10
10
|
description { generate_localized_title }
|
11
|
+
content_block { create(:content_block, organization: organization) }
|
11
12
|
end
|
12
13
|
|
13
14
|
factory :blueprint_area, class: "Decidim::NavigationMaps::BlueprintArea" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-navigation_maps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Vergés
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,61 +16,61 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.24'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '0.
|
22
|
+
version: '0.25'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.24'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '0.
|
32
|
+
version: '0.25'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: decidim-core
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.24'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
42
|
+
version: '0.25'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '0.
|
49
|
+
version: '0.24'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
52
|
+
version: '0.25'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: decidim-dev
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '0.
|
59
|
+
version: '0.24'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0.
|
62
|
+
version: '0.25'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0.
|
69
|
+
version: '0.24'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0.
|
73
|
-
description: Allows to
|
72
|
+
version: '0.25'
|
73
|
+
description: Allows to create visual guiding maps in content blocks for Decidim.
|
74
74
|
email:
|
75
75
|
- ivan@platoniq.net
|
76
76
|
executables: []
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- app/assets/stylesheets/decidim/navigation_maps/_variables.scss
|
93
93
|
- app/assets/stylesheets/decidim/navigation_maps/admin/navigation_maps.scss
|
94
94
|
- app/assets/stylesheets/decidim/navigation_maps/navigation_maps.scss
|
95
|
+
- app/cells/decidim/navigation_maps/content_blocks/groups_navigation_map_cell.rb
|
95
96
|
- app/cells/decidim/navigation_maps/content_blocks/navigation_map/_styles.erb
|
96
97
|
- app/cells/decidim/navigation_maps/content_blocks/navigation_map/_tabs.erb
|
97
98
|
- app/cells/decidim/navigation_maps/content_blocks/navigation_map/_tabs_content.erb
|
@@ -115,6 +116,7 @@ files:
|
|
115
116
|
- app/models/decidim/navigation_maps/application_record.rb
|
116
117
|
- app/models/decidim/navigation_maps/blueprint.rb
|
117
118
|
- app/models/decidim/navigation_maps/blueprint_area.rb
|
119
|
+
- app/queries/decidim/navigation_maps/content_block_blueprints.rb
|
118
120
|
- app/queries/decidim/navigation_maps/organization_blueprints.rb
|
119
121
|
- app/uploaders/decidim/navigation_maps/blueprint_uploader.rb
|
120
122
|
- app/views/decidim/navigation_maps/admin/areas/_form.html.erb
|
@@ -131,10 +133,12 @@ files:
|
|
131
133
|
- db/migrate/20191126045831_add_link_type_to_decidim_navigation_maps_blueprint_areas.rb
|
132
134
|
- db/migrate/20191126154019_add_area_id_to_decidim_navigation_maps_blueprint_areas.rb
|
133
135
|
- db/migrate/20191127093746_add_color_to_navigation_maps_blueprint_areas.rb
|
136
|
+
- db/migrate/20201105130724_add_reference_to_content_block_to_blueprints_table.rb
|
134
137
|
- db/migrate/20210112135817_add_height_to_navigation_maps_blueprints.rb
|
135
138
|
- db/seeds.rb
|
136
139
|
- db/seeds/antarctica.png
|
137
140
|
- db/seeds/penguins.jpg
|
141
|
+
- db/seeds/pla-cerda.jpg
|
138
142
|
- lib/decidim/navigation_maps.rb
|
139
143
|
- lib/decidim/navigation_maps/admin.rb
|
140
144
|
- lib/decidim/navigation_maps/admin_engine.rb
|
@@ -142,6 +146,7 @@ files:
|
|
142
146
|
- lib/decidim/navigation_maps/navigation_map_cell_helpers.rb
|
143
147
|
- lib/decidim/navigation_maps/test/factories.rb
|
144
148
|
- lib/decidim/navigation_maps/version.rb
|
149
|
+
- lib/tasks/custom_seeds.rake
|
145
150
|
- vendor/assets/images/draw/layers-2x.png
|
146
151
|
- vendor/assets/images/draw/layers.png
|
147
152
|
- vendor/assets/images/draw/marker-icon-2x.png
|
@@ -173,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
178
|
requirements:
|
174
179
|
- - ">="
|
175
180
|
- !ruby/object:Gem::Version
|
176
|
-
version: '2.
|
181
|
+
version: '2.7'
|
177
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
183
|
requirements:
|
179
184
|
- - ">="
|