decidim-decidim_awesome 0.9.3 → 0.10.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-decidim_awesome might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +121 -8
- data/Rakefile +1 -0
- data/app/cells/concerns/decidim/decidim_awesome/proposal_m_cell_override.rb +38 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_base_cell.rb +40 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +15 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +15 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +21 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +35 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/vote_block_for.erb +16 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +87 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +16 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +20 -0
- data/app/cells/decidim/proposals/proposal_m/footer.erb +13 -0
- data/app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb +2 -2
- data/app/controllers/concerns/decidim/decidim_awesome/proposals/orderable_override.rb +100 -0
- data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +64 -0
- data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +2 -6
- data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +1 -1
- data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +1 -1
- data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +1 -1
- data/app/forms/decidim/decidim_awesome/admin/config_form.rb +7 -0
- data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +1 -1
- data/app/forms/decidim/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +1 -1
- data/app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb +4 -0
- data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +51 -0
- data/app/models/concerns/decidim/decidim_awesome/has_vote_weight.rb +30 -0
- data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +11 -0
- data/app/models/decidim/decidim_awesome/vote_weight.rb +30 -0
- data/app/overrides/decidim/proposals/admin/proposals/_form/replace_editor.html.erb.deface +3 -0
- data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +7 -0
- data/app/overrides/decidim/proposals/proposals/_votes_count/replace_counter.html.erb.deface +10 -0
- data/app/{views/layouts/decidim/_head.html.erb → overrides/layouts/decidim/_application/add_intergram.html.erb.deface} +1 -1
- data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +11 -0
- data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +11 -0
- data/app/{views/layouts/decidim/admin/_header.html.erb → overrides/layouts/decidim/admin/_application/add_intergram.html.erb.deface} +1 -1
- data/app/{views/v0.26/layouts/decidim/admin/_header.html.erb → overrides/layouts/decidim/admin/_header/replace_scripts.html.erb.deface} +1 -6
- data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +3 -0
- data/app/packs/images/decidim/decidim_awesome/handcard.svg +14 -0
- data/app/packs/images/decidim/decidim_awesome/handcheck.svg +17 -0
- data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +13 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +1 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_application.js +1 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +1 -7
- data/app/packs/src/decidim/decidim_awesome/editors/editor.js +10 -4
- data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +1 -1
- data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +63 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +1 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +223 -0
- data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +64 -0
- data/app/types/concerns/decidim/decidim_awesome/proposal_type_override.rb +18 -0
- data/app/views/decidim/decidim_awesome/admin/checks/_assets_tester.html.erb +1 -1
- data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +1 -0
- data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +19 -1
- data/app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb +15 -0
- data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +6 -0
- data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_votes_count.html.erb +1 -0
- data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +1 -0
- data/app/views/layouts/decidim/{admin/decidim_awesome.html.erb → decidim_awesome/admin/application.html.erb} +1 -1
- data/config/locales/ca.yml +64 -1
- data/config/locales/cs.yml +46 -1
- data/config/locales/de.yml +63 -0
- data/config/locales/en.yml +73 -1
- data/config/locales/es.yml +65 -1
- data/config/locales/eu.yml +5 -0
- data/config/locales/fr.yml +58 -1
- data/config/locales/hu.yml +227 -0
- data/config/locales/it.yml +133 -4
- data/config/locales/ja.yml +64 -1
- data/config/locales/lt.yml +102 -0
- data/config/locales/nl.yml +5 -1
- data/config/locales/pt-BR.yml +5 -1
- data/config/locales/pt-PT.yml +1 -0
- data/config/locales/ro-RO.yml +148 -0
- data/config/locales/sv.yml +5 -0
- data/db/migrate/20231006113837_create_decidim_awesome_vote_weights.rb +13 -0
- data/db/migrate/20231006113841_create_decidim_awesome_proposal_extra_fields.rb +14 -0
- data/lib/decidim/decidim_awesome/awesome.rb +43 -4
- data/lib/decidim/decidim_awesome/awesome_helpers.rb +7 -0
- data/lib/decidim/decidim_awesome/checksums.yml +17 -0
- data/lib/decidim/decidim_awesome/config.rb +10 -2
- data/lib/decidim/decidim_awesome/engine.rb +80 -2
- data/lib/decidim/decidim_awesome/system_checker.rb +4 -0
- data/lib/decidim/decidim_awesome/test/factories.rb +18 -0
- data/lib/decidim/decidim_awesome/test/initializer.rb +10 -1
- data/lib/decidim/decidim_awesome/version.rb +1 -1
- data/lib/decidim/decidim_awesome/voting_manifest.rb +60 -0
- data/lib/tasks/decidim_awesome_upgrade_tasks.rake +9 -0
- data/package.json +5 -4
- metadata +61 -11
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +0 -101
- data/app/views/v0.26/layouts/decidim/_head.html.erb +0 -45
- data/app/views/v0.27/layouts/decidim/_head.html.erb +0 -49
- data/app/views/v0.27/layouts/decidim/admin/_header.html.erb +0 -11
- /data/app/models/{decidim → concerns/decidim}/decidim_awesome/user_override.rb +0 -0
@@ -1,101 +0,0 @@
|
|
1
|
-
<div class="card">
|
2
|
-
<div class="card-divider">
|
3
|
-
<h2 class="card-title"><%= title %></h2>
|
4
|
-
</div>
|
5
|
-
|
6
|
-
<div class="card-section">
|
7
|
-
<div class="row column hashtags__container">
|
8
|
-
<%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="row column hashtags__container">
|
12
|
-
<%= render partial: "decidim/decidim_awesome/admin/proposals/editor", locals: { form: form } %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<% if @form.component_automatic_hashtags.any? %>
|
16
|
-
<div class="field">
|
17
|
-
<%= form.label :automatic_hashtags %>
|
18
|
-
<div class="checkboxes hashtags">
|
19
|
-
<% @form.component_automatic_hashtags.each do |hashtag| %>
|
20
|
-
<label>
|
21
|
-
<%= check_box_tag "", "", { checked: true }, { disabled: true } %>#<%= hashtag %>
|
22
|
-
</label>
|
23
|
-
<% end %>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
<% end %>
|
27
|
-
|
28
|
-
<% if @form.component_suggested_hashtags.any? %>
|
29
|
-
<div class="field">
|
30
|
-
<%= form.label :suggested_hashtags %>
|
31
|
-
<div class="checkboxes hashtags">
|
32
|
-
<%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map {|hashtag| [hashtag.downcase, "##{hashtag}"]}, :first, :last do |option|
|
33
|
-
option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text }
|
34
|
-
end %>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
<% end %>
|
38
|
-
|
39
|
-
<% if @form.meetings %>
|
40
|
-
<div class="meeting-fields">
|
41
|
-
<div class="row column">
|
42
|
-
<%= form.check_box :created_in_meeting, label: t(".created_in_meeting") %>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div class="row column" id="proposal_meeting">
|
46
|
-
<%= form.select :meeting_id,
|
47
|
-
options_for_select(@form.meetings&.map { |meeting| [present(meeting).title, meeting.id] }, selected: meetings_as_authors_selected ),
|
48
|
-
{ include_blank: true, label: t(".select_a_meeting") },
|
49
|
-
{ multiple: false, class: "chosen-select" } %>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
<% end %>
|
53
|
-
|
54
|
-
<% if @form.geocoding_enabled? %>
|
55
|
-
<div class="row column">
|
56
|
-
<%= form.geocoding_field :address %>
|
57
|
-
</div>
|
58
|
-
<% end %>
|
59
|
-
|
60
|
-
<% if @form.categories&.any? %>
|
61
|
-
<div class="row column">
|
62
|
-
<%= form.categories_select :category_id, @form.categories, include_blank: t(".select_a_category") %>
|
63
|
-
</div>
|
64
|
-
<% end %>
|
65
|
-
|
66
|
-
<% if current_component.has_subscopes? %>
|
67
|
-
<div class="row column">
|
68
|
-
<%= scopes_picker_field form, :scope_id, root: current_component.scope %>
|
69
|
-
</div>
|
70
|
-
<% end %>
|
71
|
-
|
72
|
-
<% if component_settings.attachments_allowed? %>
|
73
|
-
<%= render partial: "decidim/admin/shared/gallery", locals: { form: form } %>
|
74
|
-
<% end %>
|
75
|
-
|
76
|
-
<% if component_settings.attachments_allowed? %>
|
77
|
-
<div class="row column">
|
78
|
-
<fieldset>
|
79
|
-
<legend><%= t(".attachment_legend") %></legend>
|
80
|
-
<%= form.fields_for :attachment, @form.attachment do |form| %>
|
81
|
-
<div class="row column">
|
82
|
-
<%= form.text_field :title %>
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div class="row column">
|
86
|
-
<%= form.upload :file %>
|
87
|
-
<% if params[:id].present? %>
|
88
|
-
<% if proposal.documents.present? %>
|
89
|
-
<%= form.hidden_field :id, value: proposal.documents.first.id %>
|
90
|
-
<%= form.check_box :delete_file, label: t(".delete_attachment"), value: proposal.documents.first.id %>
|
91
|
-
<% end %>
|
92
|
-
<% end %>
|
93
|
-
</div>
|
94
|
-
<% end %>
|
95
|
-
</fieldset>
|
96
|
-
</div>
|
97
|
-
<% end %>
|
98
|
-
</div>
|
99
|
-
</div>
|
100
|
-
|
101
|
-
<%= javascript_pack_tag "decidim_proposals_admin" %>
|
@@ -1,45 +0,0 @@
|
|
1
|
-
<%= csrf_meta_tags %>
|
2
|
-
|
3
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
4
|
-
<% available_locales.each do |locale| %>
|
5
|
-
<link rel="alternate" href="<%= url_for(request.parameters.merge(locale: locale)) %>" hreflang="<%= locale %>">
|
6
|
-
<% end %>
|
7
|
-
|
8
|
-
<meta name="twitter:card" content="summary_large_image">
|
9
|
-
<meta name="twitter:site" content="@<%= decidim_meta_twitter_handler %>">
|
10
|
-
<meta name="twitter:title" content="<%= decidim_page_title %>">
|
11
|
-
<meta name="twitter:description" content="<%= decidim_meta_description %>">
|
12
|
-
<meta name="twitter:image" content="<%= decidim_meta_image_url %>">
|
13
|
-
|
14
|
-
<meta property="og:url" content="<%= decidim_meta_url %>">
|
15
|
-
<meta property="og:type" content="article">
|
16
|
-
<meta property="og:title" content="<%= decidim_page_title %>">
|
17
|
-
<meta property="og:description" content="<%= decidim_meta_description %>">
|
18
|
-
<meta property="og:image" content="<%= decidim_meta_image_url %>">
|
19
|
-
|
20
|
-
<% if current_organization.colors["theme"] %>
|
21
|
-
<meta name="theme-color" content="<%= current_organization.colors["theme"] %>">
|
22
|
-
<% end %>
|
23
|
-
|
24
|
-
<%= favicon %>
|
25
|
-
<%= stylesheet_pack_tag "decidim_core", media: "all" %>
|
26
|
-
<%= invisible_captcha_styles %>
|
27
|
-
|
28
|
-
<%# awesome styles before custom colors %>
|
29
|
-
<%= stylesheet_pack_tag "decidim_decidim_awesome", media: "all" %>
|
30
|
-
<%= render(partial: "layouts/decidim/decidim_awesome/custom_styles") if awesome_custom_styles.present? %>
|
31
|
-
<%# end awesome %>
|
32
|
-
|
33
|
-
<%= organization_colors %>
|
34
|
-
<%= javascript_pack_tag "decidim_core", defer: false %>
|
35
|
-
|
36
|
-
<%# awesome javascript after app %>
|
37
|
-
<%= render partial: "layouts/decidim/decidim_awesome/awesome_config" %>
|
38
|
-
<%= javascript_pack_tag "decidim_decidim_awesome", defer: false %>
|
39
|
-
<%= javascript_pack_tag("decidim_decidim_awesome_custom_fields") if Decidim::DecidimAwesome.enabled?(:proposal_custom_fields) %>
|
40
|
-
<%# end awesome %>
|
41
|
-
|
42
|
-
<%= render partial: "layouts/decidim/head_extra" %>
|
43
|
-
<%== current_organization.header_snippets if Decidim.enable_html_header_snippets %>
|
44
|
-
<%= snippets.display(:head) %>
|
45
|
-
<%= content_for :header_snippets %>
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<%= csrf_meta_tags %>
|
2
|
-
|
3
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
4
|
-
<% available_locales.each do |locale| %>
|
5
|
-
<link rel="alternate" href="<%= url_for(request.parameters.merge(locale: locale)) %>" hreflang="<%= locale %>">
|
6
|
-
<% end %>
|
7
|
-
|
8
|
-
<meta name="twitter:card" content="summary_large_image">
|
9
|
-
<meta name="twitter:site" content="@<%= decidim_meta_twitter_handler %>">
|
10
|
-
<meta name="twitter:title" content="<%= decidim_page_title %>">
|
11
|
-
<meta name="twitter:description" content="<%= decidim_meta_description %>">
|
12
|
-
<meta name="twitter:image" content="<%= decidim_meta_image_url %>">
|
13
|
-
|
14
|
-
<meta property="og:url" content="<%= decidim_meta_url %>">
|
15
|
-
<meta property="og:type" content="article">
|
16
|
-
<meta property="og:title" content="<%= decidim_page_title %>">
|
17
|
-
<meta property="og:description" content="<%= decidim_meta_description %>">
|
18
|
-
<meta property="og:image" content="<%= decidim_meta_image_url %>">
|
19
|
-
|
20
|
-
<% if current_organization.colors["theme"] %>
|
21
|
-
<meta name="theme-color" content="<%= current_organization.colors["theme"] %>">
|
22
|
-
<% end %>
|
23
|
-
|
24
|
-
<%= legacy_favicon %>
|
25
|
-
<%= favicon %>
|
26
|
-
<%= apple_favicon %>
|
27
|
-
<link rel="manifest" href="/manifest.webmanifest">
|
28
|
-
|
29
|
-
<%= stylesheet_pack_tag "decidim_core", media: "all" %>
|
30
|
-
<%= invisible_captcha_styles %>
|
31
|
-
|
32
|
-
<%# awesome styles before custom colors %>
|
33
|
-
<%= stylesheet_pack_tag "decidim_decidim_awesome", media: "all" %>
|
34
|
-
<%= render(partial: "layouts/decidim/decidim_awesome/custom_styles") if awesome_custom_styles.present? %>
|
35
|
-
<%# end awesome %>
|
36
|
-
|
37
|
-
<%= organization_colors %>
|
38
|
-
|
39
|
-
<%# awesome javascript after app %>
|
40
|
-
<%= render partial: "layouts/decidim/decidim_awesome/awesome_config" %>
|
41
|
-
<% content_for :js_content do %>
|
42
|
-
<%= javascript_pack_tag "decidim_decidim_awesome", defer: false %>
|
43
|
-
<%= javascript_pack_tag("decidim_decidim_awesome_custom_fields") if Decidim::DecidimAwesome.enabled?(:proposal_custom_fields) %>
|
44
|
-
<% end %>
|
45
|
-
<%# end awesome %>
|
46
|
-
|
47
|
-
<%= render partial: "layouts/decidim/head_extra" %>
|
48
|
-
<%== current_organization.header_snippets if Decidim.enable_html_header_snippets %>
|
49
|
-
<%= snippets.display(:head) %>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2
|
-
<%= csrf_meta_tags %>
|
3
|
-
<%= organization_colors %>
|
4
|
-
|
5
|
-
<%= render partial: "layouts/decidim/decidim_awesome/awesome_config" %>
|
6
|
-
|
7
|
-
<%= stylesheet_pack_tag "decidim_admin_decidim_awesome", media: "all" %>
|
8
|
-
<%= javascript_pack_tag "decidim_admin_decidim_awesome", defer: false %>
|
9
|
-
<%= javascript_pack_tag("decidim_admin_decidim_awesome_custom_fields") if Decidim::DecidimAwesome.enabled?(:proposal_custom_fields) %>
|
10
|
-
|
11
|
-
<%= snippets.display(:head) %>
|
File without changes
|