diff --git a/Gemfile b/Gemfile index 21b81808b..c299c1c6b 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -DECIDIM_VERSION = { git: "https://github.com/AjuntamentdeBarcelona/decidim", branch: "release/0.28-stable-bcn" }.freeze +DECIDIM_VERSION = { git: "https://github.com/AjuntamentdeBarcelona/decidim", branch: "release/0.28-stable-bcn-proposal-optimization" }.freeze ruby RUBY_VERSION diff --git a/Gemfile.lock b/Gemfile.lock index fee4baafb..9ab46af0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/AjuntamentdeBarcelona/decidim - revision: f3b125243e409476b07c75a7438eafc529dd96c8 - branch: release/0.28-stable-bcn + revision: 408d2943a858edc2c333bed2e3c1bfe9c9f2b3f4 + branch: release/0.28-stable-bcn-proposal-optimization specs: decidim (0.28.4) decidim-accountability (= 0.28.4) diff --git a/app/cells/decidim/author/show.erb b/app/cells/decidim/author/show.erb deleted file mode 100644 index ae7ffe7b3..000000000 --- a/app/cells/decidim/author/show.erb +++ /dev/null @@ -1,26 +0,0 @@ - - <%= 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/controllers/concerns/decidim/proposals/proposals_controller_override.rb b/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb deleted file mode 100644 index 08d6ce00e..000000000 --- a/app/controllers/concerns/decidim/proposals/proposals_controller_override.rb +++ /dev/null @@ -1,44 +0,0 @@ -# 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/config/initializers/decidim_awesome.rb b/config/initializers/decidim_awesome.rb new file mode 100644 index 000000000..7bf5291f4 --- /dev/null +++ b/config/initializers/decidim_awesome.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +Decidim::DecidimAwesome.configure do |config| + config.weighted_proposal_voting = :disabled +end diff --git a/config/initializers/decidim_overrides.rb b/config/initializers/decidim_overrides.rb index f7a46792e..715baea53 100644 --- a/config/initializers/decidim_overrides.rb +++ b/config/initializers/decidim_overrides.rb @@ -26,5 +26,4 @@ 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/spec/lib/overrides_spec.rb b/spec/lib/overrides_spec.rb index 6d53ba854..0c7f4cf74 100644 --- a/spec/lib/overrides_spec.rb +++ b/spec/lib/overrides_spec.rb @@ -30,7 +30,6 @@ "/lib/decidim/search_resource_fields_mapper.rb" => "ff2cc476eb72c2942cf2e69ae21b84fa", "/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 } }, @@ -117,7 +116,6 @@ { 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/views/decidim/proposals/proposals/index.html.erb" => "48b62ae409b6ed736375772946ef2aa9" # remove map from index page