Skip to content

Commit

Permalink
Merge pull request codeforjapan#592 from ayuki-joto/feat/add-decidim-…
Browse files Browse the repository at this point in the history
…navigation-maps

feat: add decidim-navigation-maps
  • Loading branch information
ayuki-joto authored Feb 20, 2024
2 parents 184db3d + 55c318b commit 53252ff
Show file tree
Hide file tree
Showing 13 changed files with 880 additions and 479 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gem "decidim-decidim_awesome", git: "https://github.com/codeforjapan/decidim-mod

gem "decidim-term_customizer", git: "https://github.com/codeforjapan/decidim-module-term_customizer.git", branch: "027-ja"

gem "decidim-navigation_maps", git: "https://github.com/codeforjapan/decidim-module-navigation_maps.git", branch: "v1.3.4-2024-01-28"
gem "decidim-polis", git: "https://github.com/codeforjapan/decidim-polis.git", branch: "update-0-27-4"

gem "bootsnap"
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ GIT
decidim-core (>= 0.26.0, < 0.28)
sassc (~> 2.3)

GIT
remote: https://github.com/codeforjapan/decidim-module-navigation_maps.git
revision: 52c7f017ea5e3b3e817b411a6bb445800c45dda7
branch: v1.3.4-2024-01-28
specs:
decidim-navigation_maps (1.4.0)
decidim-admin (>= 0.27, < 0.28)
decidim-core (>= 0.27, < 0.28)

GIT
remote: https://github.com/codeforjapan/decidim-module-term_customizer.git
revision: b54c2f2daeab5b371717f706515982629b3cd0dd
Expand Down Expand Up @@ -908,6 +917,7 @@ DEPENDENCIES
decidim (= 0.27.4)
decidim-decidim_awesome!
decidim-dev (= 0.27.4)
decidim-navigation_maps!
decidim-polis!
decidim-term_customizer!
decidim-user_extension!
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20191022092624)

class CreateDecidimNavigationMapsBlueprints < ActiveRecord::Migration[5.2]
def change
create_table :decidim_navigation_maps_blueprints do |t|
t.jsonb :blueprint
t.string :image
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_navigation_maps_constraint_organization" }

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20191120185739)

class AddTitleToNavigationMapsBlueprints < ActiveRecord::Migration[5.2]
def change
change_table :decidim_navigation_maps_blueprints do |t|
t.jsonb :title, default: {}
t.jsonb :description, default: {}
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20191125142751)

class CreateDecidimNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2]
def change
create_table :decidim_navigation_maps_blueprint_areas do |t|
t.jsonb :area
t.references :decidim_navigation_maps_blueprint, null: false, foreign_key: true, index: { name: "decidim_navigation_maps_constraint_blueprint_id" }
t.jsonb :title, default: {}
t.jsonb :description, default: {}
t.string :area_type
t.string :url

t.timestamps
end

remove_column :decidim_navigation_maps_blueprints, :blueprint, :jsonb
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20191126045831)

class AddLinkTypeToDecidimNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2]
def change
rename_column :decidim_navigation_maps_blueprint_areas, :url, :link
add_column :decidim_navigation_maps_blueprint_areas, :link_type, :string
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20191126154019)

class AddAreaIdToDecidimNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2]
class Area < ApplicationRecord
self.table_name = "decidim_navigation_maps_blueprint_areas"
end

def change
add_column :decidim_navigation_maps_blueprint_areas, :area_id, :string

Area.find_each do |area|
area.area_id = area.id
area.save!
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20191127093746)

class AddColorToNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2]
def change
add_column :decidim_navigation_maps_blueprint_areas, :color, :string
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20201105130724)

class AddReferenceToContentBlockToBlueprintsTable < ActiveRecord::Migration[5.2]
def change
add_reference(
:decidim_navigation_maps_blueprints,
:decidim_content_block,
foreign_key: true,
index: { name: "decidim_navigation_maps_constraint_content_block" }
)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_navigation_maps (originally 20210112135817)

class AddHeightToNavigationMapsBlueprints < ActiveRecord::Migration[5.2]
def change
add_column :decidim_navigation_maps_blueprints, :height, :integer, null: false, default: 475
end
end
33 changes: 32 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2023_08_08_035643) do
ActiveRecord::Schema.define(version: 2024_01_28_143444) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -939,6 +939,34 @@
t.index ["report_count"], name: "decidim_moderations_report_count"
end

create_table "decidim_navigation_maps_blueprint_areas", force: :cascade do |t|
t.jsonb "area"
t.bigint "decidim_navigation_maps_blueprint_id", null: false
t.jsonb "title", default: {}
t.jsonb "description", default: {}
t.string "area_type"
t.string "link"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "link_type"
t.string "area_id"
t.string "color"
t.index ["decidim_navigation_maps_blueprint_id"], name: "decidim_navigation_maps_constraint_blueprint_id"
end

create_table "decidim_navigation_maps_blueprints", force: :cascade do |t|
t.string "image"
t.bigint "decidim_organization_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.jsonb "title", default: {}
t.jsonb "description", default: {}
t.bigint "decidim_content_block_id"
t.integer "height", default: 475, null: false
t.index ["decidim_content_block_id"], name: "decidim_navigation_maps_constraint_content_block"
t.index ["decidim_organization_id"], name: "decidim_navigation_maps_constraint_organization"
end

create_table "decidim_newsletters", id: :serial, force: :cascade do |t|
t.jsonb "subject"
t.integer "organization_id"
Expand Down Expand Up @@ -1732,6 +1760,9 @@
add_foreign_key "decidim_editor_images", "decidim_organizations"
add_foreign_key "decidim_editor_images", "decidim_users", column: "decidim_author_id"
add_foreign_key "decidim_identities", "decidim_organizations"
add_foreign_key "decidim_navigation_maps_blueprint_areas", "decidim_navigation_maps_blueprints"
add_foreign_key "decidim_navigation_maps_blueprints", "decidim_content_blocks"
add_foreign_key "decidim_navigation_maps_blueprints", "decidim_organizations"
add_foreign_key "decidim_newsletters", "decidim_users", column: "author_id"
add_foreign_key "decidim_participatory_process_steps", "decidim_participatory_processes"
add_foreign_key "decidim_participatory_process_types", "decidim_organizations"
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@decidim/core": "^0.27.4",
"@decidim/elections": "^0.27.4",
"@decidim/webpacker": "^0.27.4",
"@geoman-io/leaflet-geoman-free": "^2.15.0",
"@rails/webpacker": "^6.0.0-rc.6",
"codemirror": "^5.65.9",
"europa": "^4.0.0",
Expand All @@ -14,8 +15,10 @@
"highlight.js": "^11.6.0",
"inline-attachment": "^2.0.3",
"inscrybmde": "^1.11.6",
"jquery-form": "^4.3.0",
"jquery-ui": "^1.13.2",
"jsrender": "^1.0.12",
"jsviews": "^1.0.13",
"leaflet.featuregroup.subgroup": "^1.0.2",
"select2": "^4.1.0-rc.0"
},
Expand All @@ -33,9 +36,9 @@
"@decidim/eslint-config": "^0.27.4",
"@decidim/stylelint-config": "^0.27.4",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.29.1",
"stylelint": "^13.11.0"
}
}
Loading

0 comments on commit 53252ff

Please sign in to comment.