decidim-term_customizer 0.16.1 → 0.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb +2 -2
- data/config/locales/en.yml +12 -1
- data/config/locales/fi.yml +12 -1
- data/config/locales/sv.yml +12 -1
- data/db/migrate/20190217132503_create_decidim_term_customizer_translation_sets.rb +9 -0
- data/db/migrate/20190217132654_create_decidim_term_customizer_translations.rb +18 -0
- data/db/migrate/20190217132726_create_decidim_term_customizer_constraints.rb +17 -0
- data/lib/decidim/term_customizer/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27b03f1b6e89c49590b0dd6f2e1249345840dfcce3ee28207222076f9913960b
|
4
|
+
data.tar.gz: 2ec7693099979699e50afc5c07c7dcab103e2baef08b26fa0e1d34a07cf06d43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81aec8dcf529a1dc7168633f431923499b0bc7bd40dd194b465fac5c9aab1d07ad552ccd36a025430ef42ba907feb85142567d3c6af7daec937c6b4477edd086
|
7
|
+
data.tar.gz: 6146ac4df2e01822ca8b2d1b94faae3bcd02c91f3e8a44fdf6c6154202b9144c5f92fe8439f3d002eaec18612a3bb18344e64dbf1ca1b07cf984bd2e6d6c2f25
|
@@ -34,14 +34,14 @@ end
|
|
34
34
|
<div class="manifest-container" data-manifest="<%= manifest.name %>">
|
35
35
|
<% models = manifest.model_class_name.constantize.where(organization: current_organization) %>
|
36
36
|
|
37
|
-
<%= fields_for "constraints[#{index}][subject_model][#{manifest.name}]" do |subject_fields| %>
|
37
|
+
<%= fields_for "constraints[#{index}][subject_model][#{manifest.name}]", constraint do |subject_fields| %>
|
38
38
|
<div class="row column">
|
39
39
|
<%= subject_fields.hidden_field :subject_manifest, value: manifest.name.to_s %>
|
40
40
|
<%= subject_fields.select :subject_id, models.map { |m| [translated_attribute(m.title), m.id] }, { selected: selected_space, include_blank: true }, class: "constraint-subject-model-selector" %>
|
41
41
|
</div>
|
42
42
|
|
43
43
|
<% models.each do |model| %>
|
44
|
-
<%= fields_for "constraints[#{index}][subject_model][#{manifest.name}][component_model][#{model.id}]" do |component_fields| %>
|
44
|
+
<%= fields_for "constraints[#{index}][subject_model][#{manifest.name}][component_model][#{model.id}]", constraint do |component_fields| %>
|
45
45
|
<div class="row column component-container" data-components="<%= model.id %>">
|
46
46
|
<%= component_fields.hidden_field :subject_id, value: model.id %>
|
47
47
|
<%= component_fields.select :component_id, model.components.map { |c| [translated_attribute(c.name), c.id] }, selected: selected_component, include_blank: true %>
|
data/config/locales/en.yml
CHANGED
@@ -1,4 +1,15 @@
|
|
1
1
|
en:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
constraint:
|
5
|
+
component_id: Component
|
6
|
+
subject_id: Participatory space
|
7
|
+
subject_manifest: Participatory space type
|
8
|
+
translation:
|
9
|
+
key: Translation key
|
10
|
+
value: Customized term
|
11
|
+
translation_set:
|
12
|
+
name: Name
|
2
13
|
decidim:
|
3
14
|
admin:
|
4
15
|
actions:
|
@@ -12,7 +23,7 @@ en:
|
|
12
23
|
name: Name
|
13
24
|
translations:
|
14
25
|
fields:
|
15
|
-
key:
|
26
|
+
key: Translation key
|
16
27
|
original_term: Original term
|
17
28
|
term: Customized term
|
18
29
|
titles:
|
data/config/locales/fi.yml
CHANGED
@@ -1,4 +1,15 @@
|
|
1
1
|
fi:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
constraint:
|
5
|
+
component_id: Komponentti
|
6
|
+
subject_id: Osallisuustila
|
7
|
+
subject_manifest: Osallisuustilan tyyppi
|
8
|
+
translation:
|
9
|
+
key: Käännösavain
|
10
|
+
value: Kustomoitu termi
|
11
|
+
translation_set:
|
12
|
+
name: Nimi
|
2
13
|
decidim:
|
3
14
|
admin:
|
4
15
|
actions:
|
@@ -12,7 +23,7 @@ fi:
|
|
12
23
|
name: Nimi
|
13
24
|
translations:
|
14
25
|
fields:
|
15
|
-
key:
|
26
|
+
key: Käännösavain
|
16
27
|
original_term: Alkuperäinen termi
|
17
28
|
term: Kustomoitu termi
|
18
29
|
titles:
|
data/config/locales/sv.yml
CHANGED
@@ -1,4 +1,15 @@
|
|
1
1
|
sv:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
constraint:
|
5
|
+
component_id: Component
|
6
|
+
subject_id: Participatory space
|
7
|
+
subject_manifest: Participatory space type
|
8
|
+
translation:
|
9
|
+
key: Translation key
|
10
|
+
value: Customized term
|
11
|
+
translation_set:
|
12
|
+
name: Name
|
2
13
|
decidim:
|
3
14
|
admin:
|
4
15
|
actions:
|
@@ -12,7 +23,7 @@ sv:
|
|
12
23
|
name: Name
|
13
24
|
translations:
|
14
25
|
fields:
|
15
|
-
key:
|
26
|
+
key: Translation key
|
16
27
|
original_term: Original term
|
17
28
|
term: Customized term
|
18
29
|
titles:
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimTermCustomizerTranslations < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_term_customizer_translations do |t|
|
6
|
+
t.string :locale
|
7
|
+
t.string :key
|
8
|
+
t.text :value
|
9
|
+
|
10
|
+
t.references(
|
11
|
+
:translation_set,
|
12
|
+
null: false,
|
13
|
+
foreign_key: { to_table: :decidim_term_customizer_translation_sets },
|
14
|
+
index: { name: "decidim_term_customizer_translation_translation_set" }
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimTermCustomizerConstraints < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_term_customizer_constraints do |t|
|
6
|
+
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_term_customizer_constraint_organization" }
|
7
|
+
t.references :subject, polymorphic: true, index: { name: "decidim_term_customizer_constraint_subject" }
|
8
|
+
|
9
|
+
t.references(
|
10
|
+
:translation_set,
|
11
|
+
null: false,
|
12
|
+
foreign_key: { to_table: :decidim_term_customizer_translation_sets },
|
13
|
+
index: { name: "decidim_term_customizer_constraint_translation_set" }
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-term_customizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antti Hukkanen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -133,6 +133,9 @@ files:
|
|
133
133
|
- config/locales/en.yml
|
134
134
|
- config/locales/fi.yml
|
135
135
|
- config/locales/sv.yml
|
136
|
+
- db/migrate/20190217132503_create_decidim_term_customizer_translation_sets.rb
|
137
|
+
- db/migrate/20190217132654_create_decidim_term_customizer_translations.rb
|
138
|
+
- db/migrate/20190217132726_create_decidim_term_customizer_constraints.rb
|
136
139
|
- lib/decidim/term_customizer.rb
|
137
140
|
- lib/decidim/term_customizer/admin.rb
|
138
141
|
- lib/decidim/term_customizer/admin_engine.rb
|