decidim-decidim_awesome 0.11.4 → 0.12.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -6
- data/README.md +9 -25
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +1 -1
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +3 -5
- data/app/commands/concerns/decidim/decidim_awesome/system/{register_organization_override.rb → create_organization_override.rb} +1 -1
- data/app/commands/concerns/decidim/decidim_awesome/update_account_override.rb +4 -4
- data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
- data/app/commands/decidim/decidim_awesome/create_editor_image.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +0 -6
- data/app/forms/concerns/decidim/decidim_awesome/proposals/{proposal_wizard_create_step_form_override.rb → proposal_form_customizations.rb} +1 -1
- data/app/forms/concerns/decidim/decidim_awesome/system/organization_form_override.rb +2 -2
- data/app/packs/entrypoints/decidim_admin_decidim_awesome_search_form.scss +1 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/admin_accountability.scss +67 -0
- data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -2
- data/app/uploaders/decidim/decidim_awesome/image_uploader.rb +12 -0
- data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +1 -0
- data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +41 -32
- data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +1 -1
- data/config/assets.rb +2 -1
- data/lib/decidim/decidim_awesome/awesome.rb +20 -20
- data/lib/decidim/decidim_awesome/checksums.yml +32 -2
- data/lib/decidim/decidim_awesome/context_analyzers/request_analyzer.rb +2 -2
- data/lib/decidim/decidim_awesome/engine.rb +5 -4
- data/lib/decidim/decidim_awesome/test/shared_examples/box_label_editor_examples.rb +14 -14
- data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +1 -1
- data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +8 -8
- data/lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb +6 -6
- data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +3 -3
- data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +5 -5
- data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +8 -8
- data/lib/decidim/decidim_awesome/version.rb +2 -2
- data/lib/decidim/decidim_awesome.rb +0 -1
- data/lib/tasks/decidim_awesome_upgrade_tasks.rake +0 -4
- data/package.json +8 -16
- metadata +15 -17
- data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +0 -107
- data/app/uploaders/decidim/cw/decidim_awesome/image_uploader.rb +0 -26
- data/lib/decidim/decidim_awesome/content_parsers/editor_images_parser.rb +0 -39
- data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +0 -35
- /data/{app/middleware/decidim/decidim_awesome → lib/decidim/decidim_awesome/middleware}/current_config.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29689a9ea7f9c930c3683f13c34ecf797b125dc8241ed704ca44174085d59a00
|
4
|
+
data.tar.gz: f3552ebb84814f2f854f7a9b9bb1f80a0d8b3739cd1fd9626c3cbc4f6a7c7a6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a521a9f071f71436ad251a7ce20c9a7d6202fe83518e291927ce4d9affdbc138238b2e5b618b505db66882beb3af2775f90993ca501c290b7f4152990a38d456
|
7
|
+
data.tar.gz: 28c137dced1adb31664299f427b55257877f56b4d06041de46a0194fb14b976adf6375dad4a17063ff155031ab4ba6ff6345b4bf2066bcfa9102a3f00a7a482a
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
v0.12.0
|
5
|
+
-------
|
6
|
+
Compatibility:
|
7
|
+
- Decidim 0.29.x
|
8
|
+
|
9
|
+
Features:
|
10
|
+
- Upgrade to Decidim v0.29
|
11
|
+
|
4
12
|
v0.11.4
|
5
13
|
-------
|
6
14
|
Compatibility:
|
@@ -88,8 +96,8 @@ Compatibility:
|
|
88
96
|
|
89
97
|
Features:
|
90
98
|
- Migrate to [Deface](https://github.com/spree/deface) for overrides
|
91
|
-
- Introduce Weighted Voting with configurable manifests for different types of
|
92
|
-
- Fix wrong
|
99
|
+
- Introduce Weighted Voting with configurable manifests for different types of voting with grades
|
100
|
+
- Fix wrong behavior showing proposals on map
|
93
101
|
- Introduced new sorting options for proposals. Added alphabetical sorting, reverse sorting, sorting by votes first and last.
|
94
102
|
|
95
103
|
v0.9.3
|
@@ -111,7 +119,7 @@ Compatibility:
|
|
111
119
|
|
112
120
|
Features:
|
113
121
|
- Fixes for the menu hacker
|
114
|
-
|
122
|
+
|
115
123
|
v0.9.1
|
116
124
|
------
|
117
125
|
|
@@ -187,7 +195,7 @@ Features:
|
|
187
195
|
- Now awesome components can be disabled using the `disabled_components` configuration var.
|
188
196
|
- Feature: Custom redirections editor: Create shorter URL redirections to other places, inside or outside Decidim.
|
189
197
|
- Update to webpacker compatiblity and Decidim 0.25
|
190
|
-
- Added tasks `bin/rails decidim_awesome:active_storage_migrations:check_migration_from_carrierwave` and `bin/rails decidim_awesome:active_storage_migrations:migrate_from_carrierwave` (also accessible as a
|
198
|
+
- Added tasks `bin/rails decidim_awesome:active_storage_migrations:check_migration_from_carrierwave` and `bin/rails decidim_awesome:active_storage_migrations:migrate_from_carrierwave` (also accessible as a background job from the awesome admin checks)
|
191
199
|
- REMOVED: SCSS themes are not available anymore (the alternative is to use custom styles). This is mostly because of webpacker.
|
192
200
|
|
193
201
|
v0.7.2
|
@@ -199,7 +207,7 @@ Compatibility:
|
|
199
207
|
|
200
208
|
Features:
|
201
209
|
- Added custom fields (with admin interface and scopable) to replace normal body in proposals.
|
202
|
-
- Change Markdown editor
|
210
|
+
- Change Markdown editor behavior: now it is converted to HTML before storing in the database. This makes the editor compatible with all Rich Text editors.
|
203
211
|
- Added icons in the awesome config menu
|
204
212
|
- Fixes scoped admins accessing process groups
|
205
213
|
|
@@ -215,7 +223,7 @@ Features:
|
|
215
223
|
- Add Awesome Map content block for the homepage
|
216
224
|
- Added processes groups constraint for different scoped tweaks
|
217
225
|
- Added "Never" constraint to deactivated scoped tweaks temporarily
|
218
|
-
- Change Markdown editor
|
226
|
+
- Change Markdown editor behavior: now it is converted to HTML before storing in the database. This makes the editor compatible with all Rich Text editors. This also takes this feature out the the "experimental" zone as the resulting edited text is fully compatible with standard Decidim.
|
219
227
|
- Added scoped admins feature: Any user can be turned into a limited admin and scoped to one or more participatory spaces.
|
220
228
|
- Fix allowing access to participatory space admins (only full admins can access the module).
|
221
229
|
- Added `participatory_spaces_routes_context` config variable to specify additional routes correspondences to participatory spaces.
|
data/README.md
CHANGED
@@ -317,7 +317,7 @@ When building a new view for the vote button ([see the original](https://github.
|
|
317
317
|
- If votes are blocked `if current_settings.votes_blocked?`
|
318
318
|
- If the user has already voted `if @voted_proposals ? @voted_proposals.include?(proposal.id) : proposal.voted_by?(current_user)`
|
319
319
|
- If maximum votes have already reached `if proposal.maximum_votes_reached?`
|
320
|
-
- If the proposal can accumulate supports beyond maximum `if proposal.
|
320
|
+
- If the proposal can accumulate supports beyond maximum `if proposal.can_accumulate_votes_beyond_threshold`
|
321
321
|
- If the current component allows the user to participate `if current_component.participatory_space.can_participate?(current_user)`
|
322
322
|
- Note that the [original view](https://github.com/decidim/decidim/blob/release/0.28-stable/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb) is overridden only inside the tag `<div id="proposal-<%= proposal.id %>-vote-button" class="button--vote-button">`. You only need to substitute the part inside.
|
323
323
|
|
@@ -413,7 +413,7 @@ Decidim::DecidimAwesome.configure do |config|
|
|
413
413
|
#### 21. Manual verifications
|
414
414
|
|
415
415
|
The admin will be allowed to manually authorize users using the methods specified in the `/system` admin section.
|
416
|
-
Currently, only form based handlers are supported (Direct methods).
|
416
|
+
Currently, only form based handlers are supported (Direct methods).
|
417
417
|
Admins can manually override or verify users in the participants list but they still have to fulfill the requirements of the verifier (although they will be allowed to force the authorization even if some of them fails).
|
418
418
|
|
419
419
|
Admin logs are also created in each action for accountability.
|
@@ -464,29 +464,14 @@ Go to `yourdomain/admin/decidim_awesome` and start tweaking things!
|
|
464
464
|
> bin/rails decidim_decidim_awesome:webpacker:install
|
465
465
|
> ```
|
466
466
|
|
467
|
-
|
468
|
-
If you are upgrading from a version prior to 0.8, make sure to visit the URL `/admin/decidim_awesome/checks` and run image migrations for the old images:
|
469
|
-
|
470
|
-

|
471
|
-
|
472
|
-
If you are a system admin, you can also perform this task by executing this rake task in the console:
|
473
|
-
|
474
|
-
```
|
475
|
-
RAILS_ENV=production bin/rails decidim_awesome:active_storage_migrations:migrate_from_carrierwave
|
476
|
-
```
|
477
|
-
|
478
|
-
Or check your migration status with:
|
479
|
-
```
|
480
|
-
RAILS_ENV=production bin/rails decidim_awesome:active_storage_migrations:check_migration_from_carrierwave
|
481
|
-
```
|
482
|
-
|
483
467
|
The correct version of Decidim Awesome should resolved automatically by the Bundler.
|
484
|
-
However you can force some specific version using `gem "decidim-decidim_awesome", "~> 0.
|
468
|
+
However you can force some specific version using `gem "decidim-decidim_awesome", "~> 0.12.0"` in the Gemfile.
|
485
469
|
|
486
470
|
Depending on your Decidim version, choose the corresponding Awesome version to ensure compatibility:
|
487
471
|
|
488
472
|
| Awesome version | Compatible Decidim versions |
|
489
473
|
|---|---|
|
474
|
+
| 0.12.x | 0.29.x |
|
490
475
|
| 0.11.x | 0.28.x |
|
491
476
|
| 0.10.x | >= 0.26.7, >= 0.27.x |
|
492
477
|
| 0.9.2 | >= 0.26.7, >= 0.27.3 |
|
@@ -600,7 +585,6 @@ bundle exec rubocop
|
|
600
585
|
To ease up following the style guide, you should install the plugin to your
|
601
586
|
favorite editor, such as:
|
602
587
|
|
603
|
-
- Atom - [linter-rubocop](https://atom.io/packages/linter-rubocop)
|
604
588
|
- Sublime Text - [Sublime RuboCop](https://github.com/pderichs/sublime_rubocop)
|
605
589
|
- Visual Studio Code - [Rubocop for Visual Studio Code](https://github.com/misogi/vscode-ruby-rubocop)
|
606
590
|
|
@@ -614,8 +598,8 @@ DATABASE_USERNAME=<username> DATABASE_PASSWORD=<password> bundle exec rake test_
|
|
614
598
|
DATABASE_USERNAME=<username> DATABASE_PASSWORD=<password> bundle exec rspec
|
615
599
|
```
|
616
600
|
|
617
|
-
> Note: the following is not currently applicable as version v0.11 is
|
618
|
-
>
|
601
|
+
> Note: the following is not currently applicable as from version v0.11 this plugin is compatible one version at the time.
|
602
|
+
> This is left here for future reference.
|
619
603
|
|
620
604
|
However, this project works with different versions of Decidim. In order to test them all, we maintain two different Gemfiles: `Gemfile` and `Gemfile.legacy`. The first one is used for development and testing the latest Decidim version supported, the second one is used for testing against the old Decidim version.
|
621
605
|
|
@@ -624,9 +608,9 @@ You can run run tests against the legacy Decidim versions by using:
|
|
624
608
|
```bash
|
625
609
|
export DATABASE_USERNAME=<username>
|
626
610
|
export DATABASE_PASSWORD=<password>
|
627
|
-
RBENV_VERSION=3.
|
628
|
-
RBENV_VERSION=3.
|
629
|
-
RBENV_VERSION=3.
|
611
|
+
RBENV_VERSION=3.2.2 BUNDLE_GEMFILE=Gemfile.legacy bundle
|
612
|
+
RBENV_VERSION=3.2.2 BUNDLE_GEMFILE=Gemfile.legacy bundle exec rake test_app
|
613
|
+
RBENV_VERSION=3.2.2 BUNDLE_GEMFILE=Gemfile.legacy bundle exec rspec
|
630
614
|
```
|
631
615
|
|
632
616
|
For convenience, you can use the scripts `bin/test` and `bin/test-legacy` to run tests against one or the other version:
|
@@ -27,7 +27,7 @@
|
|
27
27
|
id: "change-vote",
|
28
28
|
class: "change-vote-button vote-action font-semibold" %>
|
29
29
|
</p>
|
30
|
-
<% elsif proposal.maximum_votes_reached? && !proposal.
|
30
|
+
<% elsif proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
|
31
31
|
<p class="text-center"><%= t("decidim.proposals.proposals.vote_button.maximum_votes_reached") %></p>
|
32
32
|
<% elsif vote_limit_enabled? && remaining_votes_count_for(current_user) <= 0 %>
|
33
33
|
<p class="text-center"><%= t("decidim.proposals.proposals.vote_button.no_votes_remaining") %></p>
|
@@ -18,8 +18,8 @@ module Decidim
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def vote_instructions
|
21
|
-
translated_attribute(current_component.settings.voting_cards_instructions).presence ||
|
22
|
-
|
21
|
+
translated_attribute(current_component.settings.voting_cards_instructions).presence ||
|
22
|
+
t("decidim.decidim_awesome.voting.voting_cards.default_instructions_html", organization: translated_attribute(current_organization.name))
|
23
23
|
end
|
24
24
|
|
25
25
|
def proposal_votes(weight)
|
@@ -69,9 +69,7 @@ module Decidim
|
|
69
69
|
def disabled?
|
70
70
|
return true if voted_for_any? || current_settings.votes_blocked?
|
71
71
|
|
72
|
-
if proposal.maximum_votes_reached? && !proposal.
|
73
|
-
return true
|
74
|
-
end
|
72
|
+
return true if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user)
|
75
73
|
|
76
74
|
true if vote_limit_enabled? && remaining_votes_count_for(current_user) <= 0
|
77
75
|
end
|
@@ -13,11 +13,11 @@ module Decidim
|
|
13
13
|
decidim_update_personal_data
|
14
14
|
return if @form.user_time_zone.blank?
|
15
15
|
|
16
|
-
|
17
|
-
if @form.user_time_zone ==
|
18
|
-
|
16
|
+
current_user.extended_data ||= {}
|
17
|
+
if @form.user_time_zone == current_user.organization.time_zone
|
18
|
+
current_user.extended_data.delete("time_zone")
|
19
19
|
else
|
20
|
-
|
20
|
+
current_user.extended_data["time_zone"] = @form.user_time_zone
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module DecidimAwesome
|
5
|
-
class CreateEditorImage < Command
|
5
|
+
class CreateEditorImage < Decidim::Command
|
6
6
|
# Creates a blueprint.
|
7
7
|
#
|
8
8
|
# form - The form with the data.
|
@@ -13,7 +13,7 @@ module Decidim
|
|
13
13
|
# Executes the command. Broadcasts these events:
|
14
14
|
#
|
15
15
|
# - :ok when everything is valid
|
16
|
-
# - :invalid if the form wasn't valid and we couldn't proceed.
|
16
|
+
# - :invalid if the form wasn't valid, and we couldn't proceed.
|
17
17
|
#
|
18
18
|
# Returns nothing.
|
19
19
|
def call
|
@@ -15,12 +15,6 @@ module Decidim
|
|
15
15
|
|
16
16
|
helper_method :head, :admin_head, :head_addons, :admin_addons
|
17
17
|
|
18
|
-
def migrate_images
|
19
|
-
Decidim::DecidimAwesome::MigrateLegacyImagesJob.perform_later(current_organization.id)
|
20
|
-
flash[:notice] = I18n.t("image_migrations_started", scope: "decidim.decidim_awesome.admin.checks.index")
|
21
|
-
redirect_to checks_maintenance_index_path
|
22
|
-
end
|
23
|
-
|
24
18
|
private
|
25
19
|
|
26
20
|
def head
|
@@ -9,7 +9,7 @@ module Decidim
|
|
9
9
|
included do
|
10
10
|
alias_method :decidim_original_map_model, :map_model
|
11
11
|
|
12
|
-
attribute :awesome_admins_available_authorizations,
|
12
|
+
attribute :awesome_admins_available_authorizations, [String]
|
13
13
|
|
14
14
|
def map_model(model)
|
15
15
|
decidim_original_map_model(model)
|
@@ -19,7 +19,7 @@ module Decidim
|
|
19
19
|
def clean_awesome_admins_available_authorizations
|
20
20
|
return unless awesome_admins_available_authorizations
|
21
21
|
|
22
|
-
awesome_admins_available_authorizations.
|
22
|
+
awesome_admins_available_authorizations.compact_blank
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "stylesheets/decidim/decidim_awesome/admin/admin_accountability";
|
@@ -0,0 +1,67 @@
|
|
1
|
+
.filters__section {
|
2
|
+
@apply flex gap-4 items-start;
|
3
|
+
|
4
|
+
input {
|
5
|
+
@apply h-9;
|
6
|
+
}
|
7
|
+
|
8
|
+
.form-label {
|
9
|
+
@apply block;
|
10
|
+
}
|
11
|
+
|
12
|
+
.dropdown__container {
|
13
|
+
@apply flex flex-col items-start gap-0 py-0;
|
14
|
+
|
15
|
+
.form-label {
|
16
|
+
@apply block text-sm p-0;
|
17
|
+
}
|
18
|
+
|
19
|
+
.dropdown {
|
20
|
+
@apply flex items-center h-9;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.grid {
|
25
|
+
@apply flex gap-4 items-start;
|
26
|
+
}
|
27
|
+
|
28
|
+
.datepicker_field {
|
29
|
+
@apply flex flex-col;
|
30
|
+
|
31
|
+
.datepicker__datepicker-row {
|
32
|
+
@apply flex items-center gap-2 order-1;
|
33
|
+
}
|
34
|
+
|
35
|
+
.datepicker__help-text-container {
|
36
|
+
@apply order-2 w-full;
|
37
|
+
}
|
38
|
+
|
39
|
+
.help-text.datepicker__help-date {
|
40
|
+
@apply w-full;
|
41
|
+
}
|
42
|
+
|
43
|
+
.input-group-field {
|
44
|
+
@apply h-9 px-2;
|
45
|
+
}
|
46
|
+
|
47
|
+
.search-button-container button {
|
48
|
+
@apply h-9 w-9 flex items-center justify-center;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
.row.column:last-child {
|
53
|
+
@apply flex items-center justify-center;
|
54
|
+
}
|
55
|
+
|
56
|
+
.search-button-container {
|
57
|
+
@apply flex flex-col items-start;
|
58
|
+
|
59
|
+
button {
|
60
|
+
@apply h-9 px-4 flex items-center justify-center;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
.row.column.search-field {
|
65
|
+
@apply flex-grow;
|
66
|
+
}
|
67
|
+
}
|
@@ -22,13 +22,14 @@ module Decidim
|
|
22
22
|
return allow! if user.admin?
|
23
23
|
return allow! if config[:allow_images_in_proposals]
|
24
24
|
return allow! if config[:allow_images_in_editors]
|
25
|
-
|
25
|
+
|
26
|
+
allow! if config[:allow_videos_in_editors]
|
26
27
|
end
|
27
28
|
|
28
29
|
def required_authorizations_action?
|
29
30
|
return false unless permission_action.subject == :required_authorizations
|
30
31
|
|
31
|
-
|
32
|
+
allow! unless context[:user_is_authorized]
|
32
33
|
end
|
33
34
|
end
|
34
35
|
end
|
@@ -9,6 +9,18 @@ module Decidim
|
|
9
9
|
thumbnail: { resize_to_fit: [nil, 237] }
|
10
10
|
}
|
11
11
|
end
|
12
|
+
|
13
|
+
def extension_allowlist
|
14
|
+
%w(jpg jpeg png)
|
15
|
+
end
|
16
|
+
|
17
|
+
def content_type_allowlist
|
18
|
+
%w(image/jpeg image/png)
|
19
|
+
end
|
20
|
+
|
21
|
+
def max_image_height_or_width
|
22
|
+
8000
|
23
|
+
end
|
12
24
|
end
|
13
25
|
end
|
14
26
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<div class="filters__section p-4 flex mb-0">
|
2
|
-
<div class="fcell filter
|
2
|
+
<div class="fcell filter dropdown__container">
|
3
|
+
<!-- Label added to align the button vertically with other inputs -->
|
4
|
+
<label class="form-label"> </label>
|
3
5
|
<ul class="dropdown menu" data-dropdown-menu data-close-on-click-inside="false">
|
4
6
|
<li>
|
5
7
|
<a href="#" class="dropdown button button__sm button__secondary">
|
@@ -10,38 +12,45 @@
|
|
10
12
|
</li>
|
11
13
|
</ul>
|
12
14
|
</div>
|
15
|
+
|
13
16
|
<div class="fcell search">
|
14
|
-
<%= search_form_for(query, url: url_for, html: { class: "form-defaults
|
15
|
-
<%=
|
16
|
-
<div class="
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
17
|
+
<%= search_form_for(query, url: url_for, html: { class: "form form-defaults" }) do |form| %>
|
18
|
+
<%= hidden_field_tag :admins, params[:admins] %>
|
19
|
+
<div class="form__wrapper">
|
20
|
+
<div class="card">
|
21
|
+
<div class="card-section">
|
22
|
+
<div class="grid grid-cols-4 gap-x-4">
|
23
|
+
<div class="row column search-field">
|
24
|
+
<%= form.label search_field_predicate, t("decidim.search.term_input_placeholder"), class: "form-label" %>
|
25
|
+
<%= form.search_field(
|
26
|
+
search_field_predicate,
|
27
|
+
class: "input-group-field",
|
28
|
+
placeholder: t("decidim.search.term_input_placeholder"),
|
29
|
+
label: false
|
30
|
+
) %>
|
31
|
+
</div>
|
32
|
+
<div class="row column datepicker_field">
|
33
|
+
<%= form.label :created_at_gteq, t("search_field_start_date", scope: "decidim.admin.filters.label"), class: "form-label" %>
|
34
|
+
<%= form.date_field(:created_at_gteq,
|
35
|
+
class: "input-group-field",
|
36
|
+
label: false) %>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="row column datepicker_field">
|
40
|
+
<%= form.label :created_at_lteq, t("search_field_end_date", scope: "decidim.admin.filters.label"), class: "form-label" %>
|
41
|
+
<%= form.date_field(:created_at_lteq,
|
42
|
+
class: "input-group-field",
|
43
|
+
label: false) %>
|
44
|
+
</div>
|
45
|
+
<div class="row column search-button-container">
|
46
|
+
<!-- Label added to align the button vertically with other inputs -->
|
47
|
+
<label class="form-label"> </label>
|
48
|
+
<button type="submit" class="button button__sm button__secondary" aria-label="<%= t("decidim.search.term_input_placeholder") %>">
|
49
|
+
<%= icon "search-line", class: "!fill-white w-4 h-4" %>
|
50
|
+
</button>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
45
54
|
</div>
|
46
55
|
</div>
|
47
56
|
<% end %>
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<script>
|
79
79
|
window.AwesomeMap = window.AwesomeMap || {};
|
80
80
|
window.AwesomeMap.categories = <%= current_categories(categories).to_json.html_safe %>;
|
81
|
-
window.AwesomeMapProposalTexts = <%= Decidim::Proposals::
|
81
|
+
window.AwesomeMapProposalTexts = <%= Decidim::Proposals::ProposalState.pluck(:token).index_with { |state| t("decidim.proposals.answers.#{state}") }.to_json.html_safe %>;
|
82
82
|
window.AwesomeMapMeetingTypes = <%= Decidim::Meetings::Meeting::TYPE_OF_MEETING.to_h { |type, _| [type, Decidim.icons.all[type.to_s]["icon"]] }.to_json.html_safe %>;
|
83
83
|
window.AwesomeMapMeetingTexts = <%= Decidim::Meetings::Meeting::TYPE_OF_MEETING.to_h { |type, _| [type, t("decidim.meetings.meetings.filters.type_values.#{type}")] }.to_json.html_safe %>;
|
84
84
|
</script>
|
data/config/assets.rb
CHANGED
@@ -12,5 +12,6 @@ Decidim::Webpacker.register_entrypoints(
|
|
12
12
|
decidim_admin_decidim_awesome_global: "#{base_path}/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js",
|
13
13
|
decidim_decidim_awesome_map: "#{base_path}/app/packs/entrypoints/decidim_decidim_awesome_map.js",
|
14
14
|
decidim_decidim_awesome_custom_fields: "#{base_path}/app/packs/entrypoints/decidim_decidim_awesome_custom_fields.js",
|
15
|
-
decidim_decidim_awesome_iframe: "#{base_path}/app/packs/entrypoints/decidim_decidim_awesome_iframe.scss"
|
15
|
+
decidim_decidim_awesome_iframe: "#{base_path}/app/packs/entrypoints/decidim_decidim_awesome_iframe.scss",
|
16
|
+
decidim_admin_decidim_awesome_search_form: "#{base_path}/app/packs/entrypoints/decidim_admin_decidim_awesome_search_form.scss"
|
16
17
|
)
|