decidim-core 0.29.2 → 0.29.3

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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/participatory_space_dropdown_metadata/show.erb +5 -3
  3. data/app/cells/decidim/profile_actions/show.erb +1 -1
  4. data/app/cells/decidim/report_button/already_reported_modal.erb +2 -2
  5. data/app/cells/decidim/report_button/flag_modal.erb +13 -27
  6. data/app/cells/decidim/report_button_cell.rb +2 -8
  7. data/app/cells/decidim/report_user_button/already_reported_modal.erb +11 -0
  8. data/app/cells/decidim/report_user_button/flag_modal.erb +46 -0
  9. data/app/cells/decidim/report_user_button/show.erb +2 -0
  10. data/app/cells/decidim/report_user_button_cell.rb +59 -0
  11. data/app/cells/decidim/resource_types_filter/show.erb +1 -1
  12. data/app/cells/decidim/resource_types_filter_cell.rb +6 -6
  13. data/app/cells/decidim/user_activity/show.erb +1 -1
  14. data/app/commands/decidim/create_omniauth_registration.rb +14 -8
  15. data/app/commands/decidim/create_report.rb +1 -6
  16. data/app/commands/decidim/search.rb +14 -0
  17. data/app/controllers/decidim/profiles_controller.rb +2 -2
  18. data/app/controllers/decidim/reports_controller.rb +1 -1
  19. data/app/controllers/decidim/user_activities_controller.rb +1 -1
  20. data/app/forms/decidim/account_form.rb +5 -2
  21. data/app/helpers/decidim/orders_helper.rb +2 -1
  22. data/app/helpers/decidim/participatory_space_helpers.rb +1 -1
  23. data/app/jobs/decidim/hide_child_resources_job.rb +24 -0
  24. data/app/mailers/decidim/reported_mailer.rb +1 -0
  25. data/app/models/decidim/action_log.rb +1 -9
  26. data/app/models/decidim/report.rb +1 -1
  27. data/app/models/decidim/user.rb +0 -4
  28. data/app/models/decidim/user_base_entity.rb +4 -0
  29. data/app/packs/src/decidim/datepicker/datepicker_functions.js +3 -3
  30. data/app/packs/src/decidim/index.js +4 -2
  31. data/app/packs/src/decidim/map/provider/here.js +1 -1
  32. data/app/packs/stylesheets/decidim/_content_blocks.scss +4 -0
  33. data/app/packs/stylesheets/decidim/_hashtags.scss +5 -0
  34. data/app/packs/stylesheets/decidim/_header.scss +11 -5
  35. data/app/packs/stylesheets/decidim/application.scss +1 -0
  36. data/app/presenters/decidim/log/user_presenter.rb +1 -0
  37. data/app/presenters/decidim/user_presenter.rb +1 -1
  38. data/app/services/decidim/base_diff_renderer.rb +2 -0
  39. data/app/services/decidim/static_map_generator.rb +1 -1
  40. data/app/views/decidim/last_activities/index.html.erb +1 -1
  41. data/app/views/decidim/reported_mailer/hide.html.erb +17 -1
  42. data/app/views/decidim/reported_mailer/report.html.erb +1 -1
  43. data/app/views/decidim/searches/_count.html.erb +1 -1
  44. data/app/views/decidim/searches/_filters.html.erb +40 -38
  45. data/app/views/decidim/shared/_orders.html.erb +2 -2
  46. data/app/views/layouts/decidim/footer/_main_legal.html.erb +1 -1
  47. data/config/locales/ar.yml +41 -28
  48. data/config/locales/bg.yml +10 -24
  49. data/config/locales/bs-BA.yml +2 -0
  50. data/config/locales/ca-IT.yml +2111 -0
  51. data/config/locales/ca.yml +57 -29
  52. data/config/locales/cs.yml +55 -32
  53. data/config/locales/de.yml +48 -24
  54. data/config/locales/el.yml +10 -15
  55. data/config/locales/en.yml +44 -16
  56. data/config/locales/eo.yml +2 -0
  57. data/config/locales/es-MX.yml +56 -28
  58. data/config/locales/es-PY.yml +61 -33
  59. data/config/locales/es.yml +60 -32
  60. data/config/locales/eu.yml +112 -87
  61. data/config/locales/fi-plain.yml +44 -28
  62. data/config/locales/fi.yml +46 -30
  63. data/config/locales/fr-CA.yml +58 -25
  64. data/config/locales/fr.yml +57 -24
  65. data/config/locales/ga-IE.yml +4 -4
  66. data/config/locales/gl.yml +25 -15
  67. data/config/locales/hu.yml +9 -23
  68. data/config/locales/id-ID.yml +24 -16
  69. data/config/locales/is-IS.yml +10 -1
  70. data/config/locales/it.yml +35 -27
  71. data/config/locales/ja.yml +55 -25
  72. data/config/locales/lb.yml +24 -22
  73. data/config/locales/lt.yml +5 -17
  74. data/config/locales/lv.yml +18 -15
  75. data/config/locales/nl.yml +23 -18
  76. data/config/locales/no.yml +18 -16
  77. data/config/locales/pl.yml +7 -21
  78. data/config/locales/pt-BR.yml +11 -24
  79. data/config/locales/pt.yml +18 -16
  80. data/config/locales/ro-RO.yml +243 -86
  81. data/config/locales/ru.yml +23 -8
  82. data/config/locales/sk.yml +29 -18
  83. data/config/locales/sl.yml +4 -0
  84. data/config/locales/sr-CS.yml +2 -0
  85. data/config/locales/sv.yml +22 -26
  86. data/config/locales/tr-TR.yml +24 -23
  87. data/config/locales/uk.yml +12 -2
  88. data/config/locales/zh-CN.yml +18 -15
  89. data/config/locales/zh-TW.yml +8 -16
  90. data/lib/decidim/asset_router/storage.rb +7 -2
  91. data/lib/decidim/attributes/time_with_zone.rb +5 -1
  92. data/lib/decidim/content_parsers/blob_parser.rb +10 -8
  93. data/lib/decidim/content_parsers/user_parser.rb +1 -1
  94. data/lib/decidim/core/test/shared_examples/reports_examples.rb +48 -6
  95. data/lib/decidim/core/test/shared_examples/social_share_examples.rb +32 -0
  96. data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +26 -0
  97. data/lib/decidim/core/test/shared_examples/versions_controller_examples.rb +26 -0
  98. data/lib/decidim/core/version.rb +1 -1
  99. data/lib/decidim/map/provider/dynamic_map/here.rb +1 -40
  100. data/lib/decidim/map/provider/static_map/here.rb +34 -0
  101. data/lib/decidim/moderation_tools.rb +16 -2
  102. data/lib/decidim/nicknamizable.rb +1 -1
  103. data/lib/decidim/reportable.rb +6 -2
  104. data/lib/decidim/translatable_attributes.rb +5 -1
  105. data/lib/tasks/upgrade/clean_hidden_resources.rake +33 -0
  106. data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +23 -20
  107. metadata +15 -14
  108. data/app/cells/decidim/author/flag.erb +0 -6
  109. data/app/cells/decidim/author/flag_user.erb +0 -14
  110. data/app/cells/decidim/flag_modal/flag_user.erb +0 -34
  111. data/app/cells/decidim/flag_modal/show.erb +0 -52
  112. data/app/cells/decidim/flag_modal_cell.rb +0 -56
  113. data/app/cells/decidim/profile_sidebar/show.erb +0 -167
  114. data/app/cells/decidim/profile_sidebar_cell.rb +0 -68
  115. data/app/packs/src/decidim/vendor/leaflet-tilelayer-here.js +0 -212
@@ -1,212 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // 🍂class TileLayer.HERE
4
- // Tile layer for HERE maps tiles.
5
- L.TileLayer.HERE = L.TileLayer.extend({
6
-
7
- options: {
8
- subdomains: '1234',
9
- minZoom: 2,
10
- maxZoom: 18,
11
-
12
- // 🍂option scheme: String = 'normal.day'
13
- // The "map scheme", as documented in the HERE API.
14
- scheme: 'normal.day',
15
-
16
- // 🍂option resource: String = 'maptile'
17
- // The "map resource", as documented in the HERE API.
18
- resource: 'maptile',
19
-
20
- // 🍂option mapId: String = 'newest'
21
- // Version of the map tiles to be used, or a hash of an unique map
22
- mapId: 'newest',
23
-
24
- // 🍂option format: String = 'png8'
25
- // Image format to be used (`png8`, `png`, or `jpg`)
26
- format: 'png8',
27
-
28
- // 🍂option appId: String = ''
29
- // Required option. The `app_id` provided as part of the HERE credentials
30
- appId: '',
31
-
32
- // 🍂option appCode: String = ''
33
- // Required option. The `app_code` provided as part of the HERE credentials
34
- appCode: '',
35
-
36
- // 🍂option useCIT: boolean = false
37
- // Whether to use the CIT when loading the here-maptiles
38
- useCIT: false,
39
-
40
- // 🍂option useHTTPS: boolean = true
41
- // Whether to use HTTPS when loading the here-maptiles
42
- useHTTPS: true,
43
-
44
- // 🍂option language: String = ''
45
- // The language of the descriptions on the maps that are loaded
46
- language: '',
47
-
48
- // 🍂option language: String = ''
49
- // The second language of the descriptions on the maps that are loaded
50
- language2: '',
51
- },
52
-
53
-
54
- initialize: function initialize(options) {
55
- options = L.setOptions(this, options);
56
-
57
- // Decide if this scheme uses the aerial servers or the basemap servers
58
- var schemeStart = options.scheme.split('.')[0];
59
- options.tileResolution = 256;
60
-
61
- // {Base URL}{Path}/{resource (tile type)}/{map id}/{scheme}/{zoom}/{column}/{row}/{size}/{format}
62
- // ?apiKey={YOUR_API_KEY}
63
- // &{param}={value}
64
-
65
- var params = [
66
- 'apiKey=' + encodeURIComponent(options.apiKey)
67
- ];
68
- // Fallback to old app_id,app_code if no apiKey passed
69
- if(!options.apiKey) {
70
- params = [
71
- 'app_id=' + encodeURIComponent(options.appId),
72
- 'app_code=' + encodeURIComponent(options.appCode),
73
- ];
74
- }
75
- if(options.language) {
76
- params.push('lg=' + encodeURIComponent(options.language));
77
- }
78
- if(options.language2) {
79
- params.push('lg2=' + encodeURIComponent(options.language2));
80
- }
81
- var urlQuery = '?' + params.join('&');
82
-
83
- var path = '/maptile/2.1/{resource}/{mapId}/{scheme}/{z}/{x}/{y}/{tileResolution}/{format}' + urlQuery;
84
- var attributionPath = '/maptile/2.1/copyright/{mapId}?apiKey={apiKey}';
85
-
86
- var baseUrl = 'maps.ls.hereapi.com';
87
-
88
- // Old style with apiId/apiCode for compatibility
89
- if(!options.apiKey) {
90
- // make sure the CIT-url can be used
91
- baseUrl = 'maps' + (options.useCIT ? '.cit' : '') + '.api.here.com';
92
- attributionPath = '/maptile/2.1/copyright/{mapId}?app_id={appId}&app_code={appCode}';
93
- }
94
-
95
- var tileServer = 'base.' + baseUrl;
96
- if (schemeStart == 'satellite' || schemeStart == 'terrain' || schemeStart == 'hybrid') {
97
- tileServer = 'aerial.' + baseUrl;
98
- }
99
- if (options.scheme.indexOf('.traffic.') !== -1) {
100
- tileServer = 'traffic' + baseUrl;
101
- }
102
-
103
- var protocol = 'http' + (options.useHTTPS ? 's' : '');
104
- var tileUrl = protocol + '://{s}.' + tileServer + path;
105
-
106
- this._attributionUrl = L.Util.template(protocol + '://1.' + tileServer + attributionPath, this.options);
107
-
108
- L.TileLayer.prototype.initialize.call(this, tileUrl, options);
109
-
110
- this._attributionText = '';
111
-
112
- },
113
-
114
- onAdd: function onAdd(map) {
115
- L.TileLayer.prototype.onAdd.call(this, map);
116
-
117
- if (!this._attributionBBoxes) {
118
- this._fetchAttributionBBoxes();
119
- }
120
- },
121
-
122
- onRemove: function onRemove(map) {
123
- //
124
- // Remove the attribution text, and clear the cached text so it will be recalculated
125
- // if/when we are shown again.
126
- //
127
- this._map.attributionControl.removeAttribution(this._attributionText);
128
- this._attributionText = '';
129
-
130
- this._map.off('moveend zoomend resetview', this._findCopyrightBBox, this);
131
-
132
- //
133
- // Call the prototype last, once we have tidied up our own changes
134
- //
135
- L.TileLayer.prototype.onRemove.call(this, map);
136
- },
137
-
138
- _fetchAttributionBBoxes: function _onMapMove() {
139
- var xmlhttp = new XMLHttpRequest();
140
- xmlhttp.onreadystatechange = L.bind(function(){
141
- if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
142
- this._parseAttributionBBoxes(JSON.parse(xmlhttp.responseText));
143
- }
144
- }, this);
145
- xmlhttp.open("GET", this._attributionUrl, true);
146
- xmlhttp.send();
147
- },
148
-
149
- _parseAttributionBBoxes: function _parseAttributionBBoxes(json) {
150
- if (!this._map) { return; }
151
- var providers = json[this.options.scheme.split('.')[0]] || json.normal;
152
- for (var i=0; i<providers.length; i++) {
153
- if (providers[i].boxes) {
154
- for (var j=0; j<providers[i].boxes.length; j++) {
155
- var box = providers[i].boxes[j];
156
- providers[i].boxes[j] = L.latLngBounds( [ [box[0], box[1]], [box[2], box[3]] ]);
157
- }
158
- }
159
- }
160
-
161
- this._map.on('moveend zoomend resetview', this._findCopyrightBBox, this);
162
-
163
- this._attributionProviders = providers;
164
-
165
- this._findCopyrightBBox();
166
- },
167
-
168
- _findCopyrightBBox: function _findCopyrightBBox() {
169
- if (!this._map) { return; }
170
- var providers = this._attributionProviders;
171
- var visibleProviders = [];
172
- var zoom = this._map.getZoom();
173
- var visibleBounds = this._map.getBounds();
174
-
175
- for (var i=0; i<providers.length; i++) {
176
- if (providers[i].minLevel <= zoom && providers[i].maxLevel >= zoom) {
177
-
178
- if (!providers[i].boxes) {
179
- // No boxes = attribution always visible
180
- visibleProviders.push(providers[i]);
181
- } else {
182
- for (var j=0; j<providers[i].boxes.length; j++) {
183
- var box = providers[i].boxes[j];
184
- if (visibleBounds.intersects(box)) {
185
- visibleProviders.push(providers[i]);
186
- break;
187
- }
188
- }
189
- }
190
- }
191
- }
192
-
193
- var attributions = ['<a href="https://legal.here.com/en-gb/terms" target="_blank" rel="noopener noreferrer">HERE maps</a>'];
194
- for (var i=0; i<visibleProviders.length; i++) {
195
- var provider = visibleProviders[i];
196
- attributions.push('<abbr title="' + provider.alt + '">' + provider.label + '</abbr>');
197
- }
198
-
199
- var attributionText = '© ' + attributions.join(', ') + '. ';
200
-
201
- if (attributionText !== this._attributionText) {
202
- this._map.attributionControl.removeAttribution(this._attributionText);
203
- this._map.attributionControl.addAttribution(this._attributionText = attributionText);
204
- }
205
- },
206
-
207
- });
208
-
209
-
210
- L.tileLayer.here = function(opts){
211
- return new L.TileLayer.HERE(opts);
212
- }