diff --git a/Gemfile b/Gemfile
index 5f4e8f4c5..21b81808b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -18,7 +18,6 @@ gem "decidim-stats", path: "decidim-stats"
gem "decidim-decidim_awesome", git: "https://github.com/decidim-ice/decidim-module-decidim_awesome"
gem "decidim-internal_evaluation", git: "https://github.com/AjuntamentdeBarcelona/decidim-internal-evaluation-module", branch: "release/0.28-stable"
-gem "decidim-kids", git: "https://github.com/AjuntamentdeBarcelona/decidim-module-kids"
gem "decidim-navigation_maps", git: "https://github.com/Platoniq/decidim-module-navigation_maps"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer"
gem "decidim-vocdoni", git: "https://github.com/decidim-vocdoni/decidim-module-vocdoni"
@@ -62,7 +61,6 @@ group :production do
gem "dalli"
gem "lograge"
gem "matrix"
- gem "puma_worker_killer" # Used to restart puma workers every 6h and free memory
gem "rack_password"
gem "rack-ssl-enforcer"
gem "rack-timeout" # Let's kill long-running requests after the Heroku router has responded to
diff --git a/Gemfile.lock b/Gemfile.lock
index becf9677d..fee4baafb 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -181,7 +181,7 @@ GIT
GIT
remote: https://github.com/AjuntamentdeBarcelona/decidim-internal-evaluation-module
- revision: cf5eb7f00f957881ade8360a69655e92d95ceff0
+ revision: 9c656bb021c5e2ee055c9686e43c880566d4cef1
branch: release/0.28-stable
specs:
decidim-internal_evaluation (0.0.1)
@@ -190,16 +190,6 @@ GIT
decidim-templates (~> 0.28.0)
deface (~> 1.9)
-GIT
- remote: https://github.com/AjuntamentdeBarcelona/decidim-module-kids
- revision: df16cf4de13c306348761d850d19815c8221874e
- specs:
- decidim-kids (0.2.0)
- decidim-core (>= 0.28, < 0.29)
- decidim-system (>= 0.28, < 0.29)
- decidim-verifications (>= 0.28, < 0.29)
- deface (>= 1.5)
-
GIT
remote: https://github.com/Platoniq/decidim-module-navigation_maps
revision: 7fd50e1368bae4c7955c0ba8ec5ee395273a5329
@@ -540,8 +530,6 @@ GEM
base64 (>= 0.1.0)
csv (>= 3.0.0)
geom2d (0.4.1)
- get_process_mem (0.2.7)
- ffi (~> 1.0)
globalid (1.2.1)
activesupport (>= 6.1)
graphql (2.0.31)
@@ -752,9 +740,6 @@ GEM
public_suffix (6.0.1)
puma (6.4.2)
nio4r (~> 2.0)
- puma_worker_killer (0.3.1)
- get_process_mem (~> 0.2)
- puma (>= 2.7)
racc (1.8.1)
rack (2.2.10)
rack-attack (6.7.0)
@@ -1050,7 +1035,6 @@ DEPENDENCIES
decidim-ephemeral_participation!
decidim-initiatives!
decidim-internal_evaluation!
- decidim-kids!
decidim-navigation_maps!
decidim-sortitions!
decidim-stats!
@@ -1069,7 +1053,6 @@ DEPENDENCIES
origami
progressbar
puma
- puma_worker_killer
rack-ssl-enforcer
rack-timeout
rack_password
diff --git a/app/cells/decidim/author/show.erb b/app/cells/decidim/author/show.erb
new file mode 100644
index 000000000..ae7ffe7b3
--- /dev/null
+++ b/app/cells/decidim/author/show.erb
@@ -0,0 +1,26 @@
+
+ <%= content_tag :span, class: "author__container#{" is-compact" if layout == :compact}" do %>
+ <% if layout == :compact %>
+ <%= render :avatar %>
+
+
+ <%= render :name %>
+
+ <% context_actions.each do |action| %>
+ <%= render action %>
+ <% end %>
+
+ <% elsif layout == :avatar %>
+ <%= render :avatar %>
+ <% else %>
+ <%= render :avatar %>
+ <%= render :name %>
+ <% end %>
+ <% end %>
+
+ <% if layout == :default %>
+ <% context_actions.each do |action| %>
+ <%= render action %>
+ <% end %>
+ <% end %>
+
diff --git a/app/cells/decidim/participatory_space_dropdown_metadata/show.erb b/app/cells/decidim/participatory_space_dropdown_metadata/show.erb
new file mode 100644
index 000000000..fe402f151
--- /dev/null
+++ b/app/cells/decidim/participatory_space_dropdown_metadata/show.erb
@@ -0,0 +1,8 @@
+
diff --git a/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb b/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb
new file mode 100644
index 000000000..08d6ce00e
--- /dev/null
+++ b/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb
@@ -0,0 +1,44 @@
+# frozen_string_literal: true
+
+module Decidim
+ module Proposals
+ module ProposalsControllerOverride
+ extend ActiveSupport::Concern
+
+ included do
+ def index
+ if component_settings.participatory_texts_enabled?
+ @proposals = Decidim::Proposals::Proposal
+ .where(component: current_component)
+ .published
+ .not_hidden
+ .only_amendables
+ .includes(:category, :scope, :attachments, :coauthorships)
+ .order(position: :asc)
+ render "decidim/proposals/proposals/participatory_texts/participatory_text"
+ else
+ @proposals = search
+ .result
+ .published
+ .not_hidden
+
+ @all_geocoded_proposals = @proposals.geocoded
+
+ @proposals = reorder(@proposals)
+ @proposals = paginate(@proposals)
+ @proposals = @proposals.includes(:component, :coauthorships, :attachments)
+
+ @voted_proposals = if current_user
+ ProposalVote.where(
+ author: current_user,
+ proposal: @proposals.pluck(:id)
+ ).pluck(:decidim_proposal_id)
+ else
+ []
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/app/views/decidim/proposals/index.html.erb b/app/views/decidim/proposals/index.html.erb
new file mode 100644
index 000000000..ae692e0cf
--- /dev/null
+++ b/app/views/decidim/proposals/index.html.erb
@@ -0,0 +1,44 @@
+<% add_decidim_page_title(t("name", scope: "decidim.components.proposals")) %>
+
+<% append_stylesheet_pack_tag "decidim_proposals", media: "all" %>
+<% append_javascript_pack_tag "decidim_proposals" %>
+
+<% content_for :aside do %>
+ <%= component_name %>
+
+
+ <% if current_settings.creation_enabled && current_component.participatory_space.can_participate?(current_user) %>
+ <%= action_authorized_link_to :create, new_proposal_path, class: "button button__xl button__secondary w-full", data: { "redirect_url" => new_proposal_path } do %>
+ <%= t("new_proposal", scope: "decidim.proposals.proposals.index") %>
+ <%= icon "add-line" %>
+ <% end %>
+ <% end %>
+
+ <% if component_settings.collaborative_drafts_enabled? %>
+ <%= link_to collaborative_drafts_path, class: "button button__sm button__transparent-secondary" do %>
+ <%= t("collaborative_drafts_list", scope: "decidim.proposals.proposals.index") %>
+ <%= icon "edit-2-line" %>
+ <% end %>
+ <% end %>
+
+
+ <%= render layout: "decidim/shared/filters", locals: { filter_sections: , search_variable: :search_text_cont, skip_to_id: "proposals" } do %>
+ <%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
+ <% end %>
+<% end %>
+
+<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
+
+ <%= render partial: "decidim/shared/component_announcement" %>
+
+ <% if show_voting_rules? %>
+
+ <%= render partial: "voting_rules" %>
+
+ <% end %>
+
+
+ <%= render partial: "proposals" %>
+
+
+<% end %>
diff --git a/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown.html.erb b/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown.html.erb
new file mode 100644
index 000000000..c504e03e0
--- /dev/null
+++ b/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown.html.erb
@@ -0,0 +1,13 @@
+
+
+
+ <%= render partial: "layouts/decidim/header/menu_breadcrumb_main_dropdown_top_left" %>
+
+ <%= breadcrumb_root_menu.render %>
+
+
+
+ <%= cell("decidim/highlighted_participatory_process", menu_highlighted_participatory_process) %>
+
+
+
diff --git a/config/initializers/decidim_overrides.rb b/config/initializers/decidim_overrides.rb
index 3df4c8b2c..f7a46792e 100644
--- a/config/initializers/decidim_overrides.rb
+++ b/config/initializers/decidim_overrides.rb
@@ -1,6 +1,10 @@
# frozen_string_literal: true
Rails.application.config.to_prepare do
+ default_options = Decidim::Paginable::OPTIONS
+ Decidim::Paginable.send(:remove_const, :OPTIONS)
+ Decidim::Paginable::OPTIONS = (default_options + [10]).uniq.sort.freeze
+
Decidim::PaginateHelper.include(Decidim::PaginateHelperOverride)
Decidim::Initiatives::Admin::Permissions.prepend(Decidim::Initiatives::Admin::PermissionsOverride)
Decidim::SearchResourceFieldsMapper.prepend(Decidim::Overrides::SearchResourceFieldsMapper)
@@ -22,4 +26,5 @@
Decidim::Forms::QuestionnaireUserAnswers.include(Decidim::Forms::QuestionnaireUserAnswersOverride)
Decidim::Proposals::ApplicationHelper.include(Decidim::Proposals::ApplicationHelperOverride)
Decidim::Assemblies::AssembliesController.include(Decidim::Assemblies::AssembliesControllerOverride)
+ Decidim::Proposals::ProposalsController.include(Decidim::Proposals::ProposalsControllerOverride)
end
diff --git a/config/puma.rb b/config/puma.rb
index 6ce5169b9..e49936482 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -9,9 +9,3 @@
port ENV.fetch("PORT", nil) || 3000
environment ENV.fetch("RACK_ENV", nil) || "development"
-
-before_fork do
- require "puma_worker_killer"
-
- PumaWorkerKiller.enable_rolling_restart
-end
diff --git a/spec/lib/overrides_spec.rb b/spec/lib/overrides_spec.rb
index 26b3da048..6d53ba854 100644
--- a/spec/lib/overrides_spec.rb
+++ b/spec/lib/overrides_spec.rb
@@ -11,7 +11,7 @@
files: {
"/app/helpers/decidim/paginate_helper.rb" => "6fd69359386319d678c7a17cf64de4d9",
"/app/controllers/decidim/application_controller.rb" => "e86fe37834b061828536f9417fe56cd1", # ephemeral participation overrides
- "/app/controllers/concerns/decidim/paginable.rb" => "a42381a0883c92df189ac61cebea3047", # update per_page method in assemblies_controller_override.rb
+ "/app/controllers/concerns/decidim/paginable.rb" => "a42381a0883c92df189ac61cebea3047", # update per_page method in assemblies_controller_override.rb and include 10 in OPTIONS constant
"/app/helpers/decidim/decidim_form_helper.rb" => "c534a1faa8da83aab5b2190f9d7534c3", # ephemeral participation overrides
"/app/models/decidim/component.rb" => "ec2a03817027336392f1e9e0893309ab", # ephemeral participation overrides
"/app/models/decidim/organization.rb" => "04eaf4467a1e0d891251c5cedf71f5e4", # ephemeral participation overrides
@@ -28,7 +28,10 @@
"/app/cells/decidim/activities_cell.rb" => "dd17416a8d1efe7f26b1e759613e4db4",
"/app/cells/decidim/user_profile_cell.rb" => "71216a17c7eea8dd8ebc1ea3907efaef",
"/lib/decidim/search_resource_fields_mapper.rb" => "ff2cc476eb72c2942cf2e69ae21b84fa",
- "/app/views/layouts/decidim/header/_main.html.erb" => "a6496ec11e073062743a927ee3c8bd3c"
+ "/app/views/layouts/decidim/header/_main.html.erb" => "a6496ec11e073062743a927ee3c8bd3c",
+ "/app/cells/decidim/participatory_space_dropdown_metadata/show.erb" => "e1546b7776a0e1fffdbef705094c189d", # delete last activity
+ "/app/cells/decidim/author/show.erb" => "20bdef8a694a2dcb70202ac7f017060d", # remove tooltip
+ "/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown.html.erb" => "494b33a9fc70f859f766962815399445" # delete last activity
}
},
{
@@ -114,8 +117,10 @@
{
package: "decidim-proposals",
files: {
+ "/app/controllers/decidim/proposals/proposals_controller.rb" => "69420e7f27e1e7cb2688dadcc91017b3",
"/app/helpers/decidim/proposals/application_helper.rb" => "c17dd875a166cd0cd3c09b0e596ebef5",
- "/app/presenters/decidim/proposals/proposal_presenter.rb" => "bbc7cee02125c1f8cf909219e48af337"
+ "/app/presenters/decidim/proposals/proposal_presenter.rb" => "bbc7cee02125c1f8cf909219e48af337",
+ "/app/views/decidim/proposals/proposals/index.html.erb" => "48b62ae409b6ed736375772946ef2aa9" # remove map from index page
}
},
{
diff --git a/spec/system/assemblies_spec.rb b/spec/system/assemblies_spec.rb
index ddb269857..432fe4a19 100644
--- a/spec/system/assemblies_spec.rb
+++ b/spec/system/assemblies_spec.rb
@@ -20,7 +20,6 @@
it "lists 25 assemblies per page" do
within "#assemblies-grid" do
- expect(page).to have_content("Results per page:\n25")
expect(page).to have_css("[id^=assembly_]", count: 25)
end
end