decidim-core 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/images/decidim/decidim-logo.svg +69 -60
- data/app/assets/javascripts/decidim.js.es6 +1 -0
- data/app/assets/javascripts/decidim/core/bundle.js +2 -0
- data/app/assets/javascripts/decidim/core/bundle.js.map +1 -0
- data/app/assets/javascripts/decidim/data_picker.js.es6 +6 -0
- data/app/assets/stylesheets/decidim/_variables.scss +17 -0
- data/app/assets/stylesheets/decidim/extras/_leaflet.scss +2 -2
- data/app/assets/stylesheets/decidim/layouts/_highlighted_banner.scss +0 -4
- data/app/assets/stylesheets/decidim/layouts/_home.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_address.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +3 -2
- data/app/assets/stylesheets/decidim/modules/_badges.scss +7 -7
- data/app/assets/stylesheets/decidim/modules/_buttons.scss +52 -14
- data/app/assets/stylesheets/decidim/modules/_callout.scss +5 -5
- data/app/assets/stylesheets/decidim/modules/_cards.scss +9 -23
- data/app/assets/stylesheets/decidim/modules/_conference-nav.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_filters.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_horizontal-tabs.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_loading-spinner.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_main-container.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_map.scss +3 -3
- data/app/assets/stylesheets/decidim/modules/_navbar.scss +3 -3
- data/app/assets/stylesheets/decidim/modules/_omnipresent_banner.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_order-by.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_process-header.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_process-nav.scss +8 -8
- data/app/assets/stylesheets/decidim/modules/_process-phase.scss +4 -4
- data/app/assets/stylesheets/decidim/modules/_status-labels.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_timeline.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_typography.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_wizard-steps.scss +3 -3
- data/app/assets/stylesheets/decidim/utils/_mixins.scss +7 -1
- data/app/assets/stylesheets/decidim/vizzs/_areachart.scss +3 -7
- data/app/cells/decidim/activities_cell.rb +0 -2
- data/app/cells/decidim/card_m_cell.rb +3 -1
- data/app/cells/decidim/content_blocks/footer_sub_hero_cell.rb +0 -1
- data/app/cells/decidim/content_blocks/hero_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/last_activity_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/metrics_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/stats_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +0 -2
- data/app/cells/decidim/follow_button_cell.rb +0 -4
- data/app/cells/decidim/pad_iframe_cell.rb +0 -4
- data/app/commands/decidim/create_omniauth_registration.rb +1 -1
- data/app/commands/decidim/create_report.rb +1 -1
- data/app/controllers/concerns/decidim/action_authorization.rb +6 -4
- data/app/controllers/concerns/decidim/locale_switcher.rb +14 -0
- data/app/controllers/concerns/decidim/participatory_space_context.rb +5 -6
- data/app/controllers/decidim/application_controller.rb +1 -1
- data/app/controllers/decidim/authorization_modals_controller.rb +5 -5
- data/app/controllers/decidim/static_map_controller.rb +2 -0
- data/app/frontend/entry.ts +1 -0
- data/app/helpers/decidim/cells_helper.rb +0 -1
- data/app/helpers/decidim/filters_helper.rb +10 -1
- data/app/helpers/decidim/layout_helper.rb +5 -0
- data/app/mailers/concerns/decidim/localised_mailer.rb +1 -1
- data/app/models/decidim/user.rb +1 -1
- data/app/permissions/decidim/permissions.rb +11 -11
- data/app/presenters/decidim/resource_locator_presenter.rb +13 -0
- data/app/queries/decidim/metrics/users_metric_manage.rb +2 -2
- data/app/services/decidim/action_authorizer.rb +51 -26
- data/app/services/decidim/email_notification_generator.rb +11 -0
- data/app/views/decidim/account/show.html.erb +2 -1
- data/app/views/decidim/authorization_modals/_content.html.erb +45 -0
- data/app/views/decidim/authorization_modals/show.html.erb +1 -41
- data/app/views/decidim/notification_mailer/event_received.html.erb +1 -1
- data/app/views/layouts/decidim/_application.html.erb +1 -0
- data/app/views/layouts/decidim/_organization_colors.html.erb +5 -0
- data/app/views/layouts/decidim/_wrapper.html.erb +3 -1
- data/config/locales/ar-SA.yml +180 -10
- data/config/locales/ca.yml +118 -120
- data/config/locales/cs-CZ.yml +3 -3
- data/config/locales/cs.yml +1282 -0
- data/config/locales/de.yml +29 -31
- data/config/locales/en.yml +148 -149
- data/config/locales/es-MX.yml +28 -30
- data/config/locales/es-PY.yml +28 -30
- data/config/locales/es.yml +124 -126
- data/config/locales/eu.yml +28 -30
- data/config/locales/fi-pl.yml +1 -1
- data/config/locales/fi-plain.yml +1260 -0
- data/config/locales/fi.yml +95 -97
- data/config/locales/fr.yml +28 -30
- data/config/locales/gl.yml +28 -30
- data/config/locales/hu.yml +44 -46
- data/config/locales/id-ID.yml +28 -30
- data/config/locales/it.yml +32 -34
- data/config/locales/nl.yml +29 -31
- data/config/locales/pl.yml +28 -30
- data/config/locales/pt-BR.yml +28 -30
- data/config/locales/pt.yml +28 -30
- data/config/locales/ru.yml +1 -2
- data/config/locales/sv.yml +29 -31
- data/config/locales/tr-TR.yml +28 -30
- data/config/locales/uk.yml +1 -2
- data/db/migrate/20190220023422_add_colors_to_decidim_organization.rb +7 -0
- data/lib/decidim/content_renderers/user_renderer.rb +4 -6
- data/lib/decidim/core.rb +10 -1
- data/lib/decidim/core/test.rb +1 -0
- data/lib/decidim/core/test/shared_examples/amendable/amendment_accepted_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/amendable/amendment_rejected_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +21 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/data_portability_file_zipper.rb +12 -3
- data/lib/decidim/form_builder.rb +3 -9
- data/lib/decidim/has_resource_permission.rb +43 -0
- data/lib/decidim/settings_manifest.rb +5 -0
- data/lib/decidim/view_model.rb +2 -0
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.ca.js +6 -6
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.cs.js +14 -0
- data/vendor/assets/javascripts/foundation-datepicker.js +2 -10
- metadata +18 -7
@@ -14,13 +14,13 @@ $card-margin-bottom: map-get($grid-column-gutter, medium);
|
|
14
14
|
|
15
15
|
$card-footer-bg: $light-gray-dark;
|
16
16
|
|
17
|
-
$card-proposal:
|
18
|
-
$card-action:
|
19
|
-
$card-debate:
|
20
|
-
$card-meeting:
|
21
|
-
$card-spaces:
|
17
|
+
$card-proposal: var(--proposals);
|
18
|
+
$card-action: var(--actions);
|
19
|
+
$card-debate: var(--debates);
|
20
|
+
$card-meeting: var(--meetings);
|
21
|
+
$card-spaces: var(--meetings);
|
22
22
|
|
23
|
-
$datetime-bg:
|
23
|
+
$datetime-bg: var(--primary);
|
24
24
|
|
25
25
|
/* Cards */
|
26
26
|
.card{
|
@@ -77,11 +77,6 @@ $datetime-bg: $primary;
|
|
77
77
|
@extend .heading5;
|
78
78
|
}
|
79
79
|
|
80
|
-
.card__title--strong{
|
81
|
-
font-weight: bold;
|
82
|
-
text-transform: uppercase;
|
83
|
-
}
|
84
|
-
|
85
80
|
.card__header{
|
86
81
|
margin-bottom: $card-padding / 2;
|
87
82
|
|
@@ -175,7 +170,7 @@ $datetime-bg: $primary;
|
|
175
170
|
font-weight: 600;
|
176
171
|
display: flex;
|
177
172
|
align-items: baseline;
|
178
|
-
border-left: 4px solid
|
173
|
+
border-left: 4px solid var(--primary);
|
179
174
|
background: $card-secondary-bg;
|
180
175
|
line-height: 1;
|
181
176
|
}
|
@@ -205,12 +200,6 @@ $datetime-bg: $primary;
|
|
205
200
|
.card__content{
|
206
201
|
display: flex;
|
207
202
|
}
|
208
|
-
|
209
|
-
&.card__footer--spaces{
|
210
|
-
background: rgba($card-spaces, .2);
|
211
|
-
border-top-color: rgba($card-spaces, .6);
|
212
|
-
border-top-width: .25rem;
|
213
|
-
}
|
214
203
|
}
|
215
204
|
|
216
205
|
.card__footer--transparent{
|
@@ -413,10 +402,6 @@ $datetime-bg: $primary;
|
|
413
402
|
.card__link{
|
414
403
|
color: $anchor-color;
|
415
404
|
|
416
|
-
@include breakpoint(small only){
|
417
|
-
word-break: break-all;
|
418
|
-
}
|
419
|
-
|
420
405
|
&:hover{
|
421
406
|
color: $anchor-color;
|
422
407
|
}
|
@@ -516,6 +501,7 @@ $datetime-bg: $primary;
|
|
516
501
|
text-align: center;
|
517
502
|
text-transform: uppercase;
|
518
503
|
font-size: 85%;
|
504
|
+
min-width: 7rem;
|
519
505
|
line-height: 1;
|
520
506
|
color: $muted;
|
521
507
|
padding: $card-padding-small;
|
@@ -815,7 +801,7 @@ $datetime-bg: $primary;
|
|
815
801
|
}
|
816
802
|
|
817
803
|
li:first-child{
|
818
|
-
color:
|
804
|
+
color: var(--primary);
|
819
805
|
flex: 0;
|
820
806
|
}
|
821
807
|
|
@@ -10,12 +10,12 @@
|
|
10
10
|
}
|
11
11
|
|
12
12
|
.map-info{
|
13
|
-
background:
|
13
|
+
background: var(--primary);
|
14
14
|
border-radius: $global-radius;
|
15
15
|
|
16
16
|
> div:first-child{ //Map styles container
|
17
17
|
> div:first-child{ //Triangle
|
18
|
-
border-top-color:
|
18
|
+
border-top-color: var(--primary) !important;
|
19
19
|
}
|
20
20
|
|
21
21
|
> div:nth-child(2){
|
@@ -43,7 +43,7 @@
|
|
43
43
|
|
44
44
|
.card__datetime{
|
45
45
|
float: none;
|
46
|
-
border-color:
|
46
|
+
border-color: var(--primary);
|
47
47
|
display: flex;
|
48
48
|
flex-direction: column;
|
49
49
|
justify-content: center;
|
@@ -6,8 +6,8 @@ $navbar-color: rgba(white, .5);
|
|
6
6
|
$navbar-color-hover: $white;
|
7
7
|
$navbar-active-color: $white;
|
8
8
|
$navbar-active-bg: $navbar-bg-hover;
|
9
|
-
$navbar-active-shadow-small: inset 4px 0 0 0
|
10
|
-
$navbar-active-shadow-medium: inset 0 4px 0 0
|
9
|
+
$navbar-active-shadow-small: inset 4px 0 0 0 var(--primary);
|
10
|
+
$navbar-active-shadow-medium: inset 0 4px 0 0 var(--primary);
|
11
11
|
|
12
12
|
/* Navigation */
|
13
13
|
|
@@ -170,7 +170,7 @@ $navbar-active-shadow-medium: inset 0 4px 0 0 $primary;
|
|
170
170
|
|
171
171
|
&:hover{
|
172
172
|
cursor: pointer;
|
173
|
-
background-color: rgba(
|
173
|
+
background-color: rgba(var(--secondary), .05);
|
174
174
|
}
|
175
175
|
}
|
176
176
|
}
|
@@ -84,7 +84,7 @@ $nav-border-width: 3px;
|
|
84
84
|
}
|
85
85
|
|
86
86
|
&.is-active{
|
87
|
-
box-shadow: inset 0 (-1 * ($nav-border-width + 1px)) 0 0
|
87
|
+
box-shadow: inset 0 (-1 * ($nav-border-width + 1px)) 0 0 var(--primary);
|
88
88
|
|
89
89
|
@include breakpoint(smallmedium down){
|
90
90
|
display: none;
|
@@ -94,8 +94,8 @@ $nav-border-width: 3px;
|
|
94
94
|
|
95
95
|
.process-nav__more{
|
96
96
|
margin: 0;
|
97
|
-
color:
|
98
|
-
background-color: rgba(
|
97
|
+
color: var(--primary);
|
98
|
+
background-color: rgba(var(--primary), .1);
|
99
99
|
text-transform: uppercase;
|
100
100
|
font-weight: $global-weight-bold;
|
101
101
|
font-size: rem-calc(14);
|
@@ -104,7 +104,7 @@ $nav-border-width: 3px;
|
|
104
104
|
@include square(5px);
|
105
105
|
|
106
106
|
border-radius: 100%;
|
107
|
-
background-color:
|
107
|
+
background-color: var(--primary);
|
108
108
|
display: inline-block;
|
109
109
|
vertical-align: middle;
|
110
110
|
margin-bottom: .1rem;
|
@@ -140,7 +140,7 @@ $nav-border-width: 3px;
|
|
140
140
|
}
|
141
141
|
|
142
142
|
.process-nav__link{
|
143
|
-
color:
|
143
|
+
color: var(--primary);
|
144
144
|
text-transform: uppercase;
|
145
145
|
font-weight: $global-weight-bold;
|
146
146
|
display: flex;
|
@@ -166,13 +166,13 @@ $nav-border-width: 3px;
|
|
166
166
|
|
167
167
|
@include breakpoint(medium){
|
168
168
|
.process-nav__link.is-active{
|
169
|
-
color:
|
169
|
+
color: var(--primary);
|
170
170
|
|
171
171
|
svg{
|
172
|
-
fill:
|
172
|
+
fill: var(--primary);
|
173
173
|
|
174
174
|
.stroked-shape{
|
175
|
-
stroke:
|
175
|
+
stroke: var(--primary);
|
176
176
|
}
|
177
177
|
}
|
178
178
|
}
|
@@ -88,11 +88,11 @@
|
|
88
88
|
|
89
89
|
.phase-item--past{
|
90
90
|
&::after{
|
91
|
-
background-color:
|
91
|
+
background-color: var(--primary);
|
92
92
|
}
|
93
93
|
|
94
94
|
span{
|
95
|
-
background-color:
|
95
|
+
background-color: var(--primary);
|
96
96
|
opacity: 1;
|
97
97
|
}
|
98
98
|
}
|
@@ -105,7 +105,7 @@
|
|
105
105
|
position: absolute;
|
106
106
|
width: 0;
|
107
107
|
border: 4px solid transparent;
|
108
|
-
border-top-color:
|
108
|
+
border-top-color: var(--primary);
|
109
109
|
top: -8px;
|
110
110
|
left: calc(50% - 1px);
|
111
111
|
z-index: 2;
|
@@ -156,7 +156,7 @@
|
|
156
156
|
|
157
157
|
.process-header__button{
|
158
158
|
.button{
|
159
|
-
border-color:
|
159
|
+
border-color: var(--primary);
|
160
160
|
text-transform: uppercase;
|
161
161
|
}
|
162
162
|
}
|
@@ -83,7 +83,7 @@ hr{
|
|
83
83
|
display: inline-block;
|
84
84
|
width: 4px;
|
85
85
|
height: .8em;
|
86
|
-
background-color:
|
86
|
+
background-color: var(--primary);
|
87
87
|
margin-right: .5rem;
|
88
88
|
margin-bottom: -.1rem;
|
89
89
|
}
|
@@ -133,7 +133,7 @@ hr{
|
|
133
133
|
color: inherit;
|
134
134
|
|
135
135
|
&:hover{
|
136
|
-
color:
|
136
|
+
color: var(--primary);
|
137
137
|
}
|
138
138
|
}
|
139
139
|
}
|
@@ -8,8 +8,8 @@
|
|
8
8
|
|
9
9
|
li{
|
10
10
|
border: none;
|
11
|
-
color:
|
12
|
-
border-left: 2px solid
|
11
|
+
color: var(--primary);
|
12
|
+
border-left: 2px solid var(--primary);
|
13
13
|
box-sizing: border-box;
|
14
14
|
border-radius: 0;
|
15
15
|
padding: 1rem 0;
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
li::before{
|
21
21
|
border-radius: 50%;
|
22
|
-
background-color:
|
22
|
+
background-color: var(--primary);
|
23
23
|
content: "";
|
24
24
|
display: inline-block;
|
25
25
|
float: left;
|
@@ -41,7 +41,13 @@
|
|
41
41
|
}
|
42
42
|
|
43
43
|
// Status modifier mixin
|
44
|
-
$palette:
|
44
|
+
$palette: (
|
45
|
+
primary: var(--primary),
|
46
|
+
secondary: var(--secondary),
|
47
|
+
success: var(--success),
|
48
|
+
warning: var(--warning),
|
49
|
+
alert: var(--alert),
|
50
|
+
);
|
45
51
|
|
46
52
|
@mixin modifiers($vars, $colors: $palette){
|
47
53
|
$map: map-merge($palette, $colors);
|
@@ -13,17 +13,17 @@
|
|
13
13
|
}
|
14
14
|
|
15
15
|
.area{
|
16
|
-
fill: rgba(
|
16
|
+
fill: rgba(var(--primary), .05);
|
17
17
|
}
|
18
18
|
|
19
19
|
.line{
|
20
20
|
fill: none;
|
21
|
-
stroke: rgba(
|
21
|
+
stroke: rgba(var(--primary), .2);
|
22
22
|
stroke-width: 4px;
|
23
23
|
}
|
24
24
|
|
25
25
|
.circle{
|
26
|
-
fill: rgba(
|
26
|
+
fill: rgba(var(--primary), .2);
|
27
27
|
}
|
28
28
|
|
29
29
|
.tick{
|
@@ -62,10 +62,6 @@
|
|
62
62
|
&.small{
|
63
63
|
.sum{
|
64
64
|
font-size: rem-calc(map-get(map-get(map-get($header-styles, medium), 'h3'), 'font-size'));
|
65
|
-
|
66
|
-
@include breakpoint(medium down){
|
67
|
-
font-size: rem-calc(map-get(map-get(map-get($header-styles, medium), 'h1'), 'font-size')) * 1.5;
|
68
|
-
}
|
69
65
|
}
|
70
66
|
}
|
71
67
|
}
|
@@ -8,8 +8,6 @@ module Decidim
|
|
8
8
|
include Decidim::IconHelper
|
9
9
|
include Decidim::Core::Engine.routes.url_helpers
|
10
10
|
|
11
|
-
delegate :current_organization, to: :controller
|
12
|
-
|
13
11
|
# Since we're rendering each activity separatedly we need to trigger
|
14
12
|
# BatchLoader in order to accumulate all the ids to be found later.
|
15
13
|
def show
|
@@ -97,13 +97,15 @@ module Decidim
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def comments_count
|
100
|
+
return model.comments.not_hidden.count if model.comments.respond_to? :not_hidden
|
101
|
+
|
100
102
|
model.comments.count
|
101
103
|
end
|
102
104
|
|
103
105
|
def statuses
|
104
106
|
collection = [:creation_date]
|
105
107
|
collection << :follow if model.is_a?(Decidim::Followable) && model != try(:current_user)
|
106
|
-
collection << :comments_count if model.is_a?(Decidim::Comments::Commentable)
|
108
|
+
collection << :comments_count if model.is_a?(Decidim::Comments::Commentable) && model.commentable?
|
107
109
|
collection
|
108
110
|
end
|
109
111
|
|
@@ -6,8 +6,6 @@ module Decidim
|
|
6
6
|
include Decidim::CtaButtonHelper
|
7
7
|
include Decidim::SanitizeHelper
|
8
8
|
|
9
|
-
delegate :current_organization, to: :controller
|
10
|
-
|
11
9
|
# Needed so that the `CtaButtonHelper` can work.
|
12
10
|
def decidim_participatory_processes
|
13
11
|
Decidim::ParticipatoryProcesses::Engine.routes.url_helpers
|