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

Add term-customizer gem #14

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gem "decidim", DECIDIM_VERSION
gem "decidim-templates", DECIDIM_VERSION

gem "decidim-decidim_awesome"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer.git", branch: "main"
gem "decidim-ub"

gem "bootsnap", "~> 1.3"
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/mainio/decidim-module-term_customizer.git
revision: 9133eea57ebfc4164b640efd1ac6b9ca1628c793
branch: main
specs:
decidim-term_customizer (0.28.0)
decidim-admin (~> 0.28.0)
decidim-core (~> 0.28.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -887,6 +896,7 @@ DEPENDENCIES
decidim-decidim_awesome
decidim-dev (= 0.28.2)
decidim-templates (= 0.28.2)
decidim-term_customizer!
decidim-ub
figaro (~> 1.2)
letter_opener_web (~> 2.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true
# This migration comes from decidim_term_customizer (originally 20190217132503)

class CreateDecidimTermCustomizerTranslationSets < ActiveRecord::Migration[5.2]
def change
create_table :decidim_term_customizer_translation_sets do |t|
t.jsonb :name
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_term_customizer (originally 20190217132654)

class CreateDecidimTermCustomizerTranslations < ActiveRecord::Migration[5.2]
def change
create_table :decidim_term_customizer_translations do |t|
t.string :locale
t.string :key
t.text :value

t.references(
:translation_set,
null: false,
foreign_key: { to_table: :decidim_term_customizer_translation_sets },
index: { name: "decidim_term_customizer_translation_translation_set" }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true
# This migration comes from decidim_term_customizer (originally 20190217132726)

class CreateDecidimTermCustomizerConstraints < ActiveRecord::Migration[5.2]
def change
create_table :decidim_term_customizer_constraints do |t|
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_term_customizer_constraint_organization" }
t.references :subject, polymorphic: true, index: { name: "decidim_term_customizer_constraint_subject" }

t.references(
:translation_set,
null: false,
foreign_key: { to_table: :decidim_term_customizer_translation_sets },
index: { name: "decidim_term_customizer_constraint_translation_set" }
)
end
end
end
27 changes: 26 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/system/decidim_awesome/custom_styles_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
expect(page.body).to have_no_content("body {background: red;}")
end

it "css is not applyied" do
it "css is not applied" do
expect(page.execute_script("return window.getComputedStyle($('body')[0]).backgroundColor")).to eq("rgba(0, 0, 0, 0)")
end
end
Expand Down
Loading