decidim-budgets 0.28.3 → 0.29.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/budgets/base_cell.rb +0 -2
  3. data/app/cells/decidim/budgets/budget_list_item_cell.rb +0 -3
  4. data/app/cells/decidim/budgets/order_activity_cell.rb +1 -1
  5. data/app/cells/decidim/budgets/project_l_cell.rb +0 -1
  6. data/app/cells/decidim/budgets/project_vote_button_cell.rb +0 -1
  7. data/app/cells/decidim/budgets/project_voted_hint_cell.rb +0 -2
  8. data/app/cells/decidim/budgets/project_votes_count_cell.rb +0 -2
  9. data/app/commands/decidim/budgets/admin/create_budget.rb +4 -33
  10. data/app/commands/decidim/budgets/admin/create_order_reminders.rb +5 -19
  11. data/app/commands/decidim/budgets/admin/create_project.rb +19 -45
  12. data/app/commands/decidim/budgets/admin/destroy_budget.rb +3 -28
  13. data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +1 -2
  14. data/app/commands/decidim/budgets/admin/update_budget.rb +4 -35
  15. data/app/commands/decidim/budgets/admin/update_project.rb +17 -43
  16. data/app/controllers/decidim/budgets/admin/application_controller.rb +5 -1
  17. data/app/controllers/decidim/budgets/admin/projects_controller.rb +1 -1
  18. data/app/forms/decidim/budgets/admin/budget_form.rb +1 -1
  19. data/app/helpers/decidim/budgets/projects_helper.rb +2 -2
  20. data/app/packs/src/decidim/budgets/admin/projects.js +1 -1
  21. data/app/packs/stylesheets/budgets.scss +30 -18
  22. data/app/views/decidim/budgets/admin/budgets/index.html.erb +1 -1
  23. data/app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb +3 -5
  24. data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +5 -0
  25. data/app/views/decidim/budgets/admin/projects/bulk_actions/_budget-change.html.erb +2 -2
  26. data/app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb +2 -2
  27. data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +2 -2
  28. data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +2 -2
  29. data/app/views/decidim/budgets/admin/projects/index.html.erb +5 -2
  30. data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +3 -3
  31. data/app/views/decidim/budgets/projects/_budget_confirm.html.erb +3 -3
  32. data/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb +1 -1
  33. data/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb +21 -12
  34. data/app/views/decidim/budgets/projects/_projects.html.erb +1 -1
  35. data/app/views/decidim/budgets/projects/index.js.erb +1 -1
  36. data/config/locales/ar.yml +0 -1
  37. data/config/locales/bg.yml +2 -1
  38. data/config/locales/ca.yml +2 -1
  39. data/config/locales/cs.yml +2 -1
  40. data/config/locales/de.yml +2 -1
  41. data/config/locales/el.yml +0 -1
  42. data/config/locales/en.yml +2 -1
  43. data/config/locales/es-MX.yml +2 -1
  44. data/config/locales/es-PY.yml +2 -1
  45. data/config/locales/es.yml +2 -1
  46. data/config/locales/eu.yml +2 -1
  47. data/config/locales/fi-plain.yml +3 -2
  48. data/config/locales/fi.yml +5 -4
  49. data/config/locales/fr-CA.yml +2 -1
  50. data/config/locales/fr.yml +2 -1
  51. data/config/locales/gl.yml +0 -1
  52. data/config/locales/hu.yml +1 -1
  53. data/config/locales/it.yml +0 -1
  54. data/config/locales/ja.yml +2 -1
  55. data/config/locales/lb.yml +0 -1
  56. data/config/locales/lt.yml +0 -1
  57. data/config/locales/nl.yml +0 -1
  58. data/config/locales/no.yml +0 -1
  59. data/config/locales/pl.yml +2 -1
  60. data/config/locales/pt-BR.yml +0 -1
  61. data/config/locales/pt.yml +0 -1
  62. data/config/locales/ro-RO.yml +0 -1
  63. data/config/locales/sv.yml +35 -145
  64. data/config/locales/tr-TR.yml +0 -1
  65. data/config/locales/zh-CN.yml +0 -1
  66. data/config/locales/zh-TW.yml +0 -1
  67. data/decidim-budgets.gemspec +1 -1
  68. data/lib/decidim/budgets/project_serializer.rb +1 -0
  69. data/lib/decidim/budgets/seeds.rb +62 -21
  70. data/lib/decidim/budgets/version.rb +1 -1
  71. data/lib/decidim/budgets/workflows/base.rb +1 -1
  72. metadata +16 -17
  73. data/app/commands/decidim/budgets/admin/destroy_project.rb +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aac359f916ac5cadc2e72ba36ce01126bb5fb7c27a06c42a2464224a93fb678
4
- data.tar.gz: 20d57613164ce76a6d9a84470d7c9f17ee3e26dccbae486706c6810da2ec8cd9
3
+ metadata.gz: 240b6ab72430080143780dd027d5835db4014f03099e6c824fadb6b1efd75946
4
+ data.tar.gz: c21175ea1e8a905957bb74c6b9e964b0caac9c9b17400bc6c73ef37b39abbe18
5
5
  SHA512:
6
- metadata.gz: 6819234f06d41d5c562b4a1a904e6d9382cea910b11033c195eecd4e216c65c14d1cb41beeeccefe63c54433242c741dabf5e9d4f01e13414d4810aa4cd09eb2
7
- data.tar.gz: 0e166dd444bcd08a844c9f020ee0a0f2e073319a70d4249f1187070604798094c3253f88d183ddc86ec65a70302775d163e7c24db7b69bd38d07195cd3409aeb
6
+ metadata.gz: f6e289beaf9d39920f70a1860bc5b73da56acf017d70367143fc95b4a4bab42884c7dde260ae056f74fbd2aa981c8baf66febe5a4b8ba17ce7936d2e9a05e705
7
+ data.tar.gz: 1f5557dd4c8a82dc39ce66e8e3c5238536a69d2a84aeaa45b46fac7a07f8dd5518faca25a8c63191c900000ddd7d90220155c2f9f396511dc09228b235b7c922
@@ -4,8 +4,6 @@ module Decidim
4
4
  module Budgets
5
5
  # This cell has the commons for the budgets cells
6
6
  class BaseCell < Decidim::ViewModel
7
- include Decidim::LayoutHelper
8
- include Decidim::SanitizeHelper
9
7
  include Decidim::ComponentPathHelper
10
8
  include Decidim::Budgets::Engine.routes.url_helpers
11
9
 
@@ -4,9 +4,6 @@ module Decidim
4
4
  module Budgets
5
5
  # This cell renders the budget item list in the budgets list
6
6
  class BudgetListItemCell < BaseCell
7
- include Decidim::SanitizeHelper
8
- include Decidim::ApplicationHelper
9
- include ActiveSupport::NumberHelper
10
7
  include Decidim::Budgets::ProjectsHelper
11
8
 
12
9
  delegate :highlighted, to: :current_workflow
@@ -13,7 +13,7 @@ module Decidim
13
13
  end
14
14
 
15
15
  def resource_link_text
16
- decidim_html_escape(translated_attribute(budget.title))
16
+ decidim_escape_translated(budget.title)
17
17
  end
18
18
 
19
19
  private
@@ -7,7 +7,6 @@ module Decidim
7
7
  # This cell renders the List (:l) project card
8
8
  # for an instance of a Project
9
9
  class ProjectLCell < Decidim::CardLCell
10
- include ActiveSupport::NumberHelper
11
10
  include Decidim::Budgets::ProjectsHelper
12
11
 
13
12
  alias project model
@@ -5,7 +5,6 @@ module Decidim
5
5
  # This cell renders an authorized_action button
6
6
  # to vote a given instance of a Project in a budget list
7
7
  class ProjectVoteButtonCell < Decidim::ViewModel
8
- include Decidim::ActionAuthorizationHelper
9
8
  include Decidim::Budgets::ProjectsHelper
10
9
  include Decidim::Budgets::Engine.routes.url_helpers
11
10
 
@@ -4,8 +4,6 @@ module Decidim
4
4
  module Budgets
5
5
  # This cell renders a checkmark with a text.
6
6
  class ProjectVotedHintCell < BaseCell
7
- include Decidim::IconHelper
8
-
9
7
  delegate :voted_for?, :current_order, to: :controller
10
8
 
11
9
  def show
@@ -5,8 +5,6 @@ module Decidim
5
5
  # This cell renders the vote count.
6
6
  # Two possible layouts: One or two lines
7
7
  class ProjectVotesCountCell < Decidim::ViewModel
8
- include Decidim::IconHelper
9
-
10
8
  def show
11
9
  return unless show_votes_count?
12
10
 
@@ -5,43 +5,14 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user creates an Budget
7
7
  # from the admin panel.
8
- class CreateBudget < Decidim::Command
9
- def initialize(form)
10
- @form = form
11
- end
12
-
13
- # Creates the budget if valid.
14
- #
15
- # Broadcasts :ok if successful, :invalid otherwise.
16
- def call
17
- return broadcast(:invalid) if form.invalid?
18
-
19
- create_budget!
20
-
21
- broadcast(:ok, budget)
22
- end
8
+ class CreateBudget < Decidim::Commands::CreateResource
9
+ fetch_form_attributes :component, :scope, :title, :weight, :description, :total_budget
23
10
 
24
11
  private
25
12
 
26
- attr_reader :form, :budget
27
-
28
- def create_budget!
29
- attributes = {
30
- component: form.current_component,
31
- scope: form.scope,
32
- title: form.title,
33
- weight: form.weight,
34
- description: form.description,
35
- total_budget: form.total_budget
36
- }
13
+ def extra_params = { visibility: "all" }
37
14
 
38
- @budget = Decidim.traceability.create!(
39
- Budget,
40
- form.current_user,
41
- attributes,
42
- visibility: "all"
43
- )
44
- end
15
+ def resource_class = Decidim::Budgets::Budget
45
16
  end
46
17
  end
47
18
  end
@@ -3,8 +3,10 @@
3
3
  module Decidim
4
4
  module Budgets
5
5
  module Admin
6
- # This command is executed when admin sends vote reminders.
6
+ # This command is executed when an admin sends vote reminders.
7
7
  class CreateOrderReminders < Decidim::Command
8
+ delegate :current_component, :voting_enabled?, :voting_ends_soon?, :minimum_interval_between_reminders, to: :form
9
+
8
10
  def initialize(form)
9
11
  @form = form
10
12
  end
@@ -29,8 +31,8 @@ module Decidim
29
31
  next if %w(active pending).exclude? record.state
30
32
 
31
33
  record.state = begin
32
- if record.remindable.created_at > minimum_time_between_reminders ||
33
- (reminder.deliveries.present? && reminder.deliveries.last.created_at > minimum_time_between_reminders)
34
+ if record.remindable.created_at > minimum_interval_between_reminders.ago ||
35
+ (reminder.deliveries.present? && reminder.deliveries.last.created_at > minimum_interval_between_reminders.ago)
34
36
  "pending"
35
37
  else
36
38
  "active"
@@ -41,25 +43,9 @@ module Decidim
41
43
  end
42
44
  end
43
45
 
44
- def minimum_time_between_reminders
45
- form.minimum_interval_between_reminders.ago
46
- end
47
-
48
46
  def generator
49
47
  @generator ||= Decidim::Budgets::OrderReminderGenerator.new
50
48
  end
51
-
52
- def current_component
53
- form.current_component
54
- end
55
-
56
- def voting_enabled?
57
- form.voting_enabled?
58
- end
59
-
60
- def voting_ends_soon?
61
- form.voting_ends_soon?
62
- end
63
49
  end
64
50
  end
65
51
  end
@@ -5,65 +5,39 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user creates a Project from the admin
7
7
  # panel.
8
- class CreateProject < Decidim::Command
8
+ class CreateProject < Decidim::Commands::CreateResource
9
9
  include ::Decidim::GalleryMethods
10
+ fetch_form_attributes :budget, :scope, :category, :title, :description, :budget_amount, :address, :latitude, :longitude
10
11
 
11
- def initialize(form)
12
- @form = form
13
- end
14
-
15
- # Creates the project if valid.
16
- #
17
- # Broadcasts :ok if successful, :invalid otherwise.
18
- def call
19
- return broadcast(:invalid) if @form.invalid?
20
-
21
- if process_gallery?
22
- build_gallery
23
- return broadcast(:invalid) if gallery_invalid?
24
- end
12
+ private
25
13
 
26
- transaction do
27
- create_project!
28
- link_proposals
29
- create_gallery if process_gallery?
30
- end
14
+ attr_reader :gallery
31
15
 
32
- broadcast(:ok)
16
+ def run_after_hooks
17
+ @attached_to = resource
18
+ link_proposals
19
+ create_gallery if process_gallery?
33
20
  end
34
21
 
35
- private
36
-
37
- attr_reader :form, :project, :gallery
22
+ def run_before_hooks
23
+ return unless process_gallery?
38
24
 
39
- def create_project!
40
- attributes = {
41
- budget: form.budget,
42
- scope: form.scope,
43
- category: form.category,
44
- title: form.title,
45
- description: form.description,
46
- budget_amount: form.budget_amount,
47
- address: form.address,
48
- latitude: form.latitude,
49
- longitude: form.longitude
50
- }
25
+ build_gallery
26
+ raise Decidim::Commands::HookError if gallery_invalid?
27
+ end
51
28
 
52
- @project = Decidim.traceability.create!(
53
- Project,
54
- form.current_user,
55
- attributes,
56
- visibility: "all"
57
- )
58
- @attached_to = @project
29
+ def extra_params
30
+ { visibility: "all" }
59
31
  end
60
32
 
33
+ def resource_class = Decidim::Budgets::Project
34
+
61
35
  def proposals
62
- @proposals ||= project.sibling_scope(:proposals).where(id: form.proposal_ids)
36
+ @proposals ||= resource.sibling_scope(:proposals).where(id: form.proposal_ids)
63
37
  end
64
38
 
65
39
  def link_proposals
66
- project.link_resources(proposals, "included_proposals")
40
+ resource.link_resources(proposals, "included_proposals")
67
41
  end
68
42
  end
69
43
  end
@@ -5,37 +5,12 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user destroys a Budget
7
7
  # from the admin panel.
8
- class DestroyBudget < Decidim::Command
9
- def initialize(budget, current_user)
10
- @budget = budget
11
- @current_user = current_user
12
- end
13
-
14
- # Destroys the budget if valid.
15
- #
16
- # Broadcasts :ok if successful, :invalid otherwise.
17
- def call
18
- return broadcast(:invalid) if budget.projects.present?
19
-
20
- destroy_budget!
21
-
22
- broadcast(:ok, budget)
23
- end
24
-
8
+ class DestroyBudget < Decidim::Commands::DestroyResource
25
9
  private
26
10
 
27
- attr_reader :budget, :current_user
11
+ def invalid? = resource.projects.present?
28
12
 
29
- def destroy_budget!
30
- Decidim.traceability.perform_action!(
31
- :delete,
32
- budget,
33
- current_user,
34
- visibility: "all"
35
- ) do
36
- budget.destroy!
37
- end
38
- end
13
+ def extra_params = { visibility: "all" }
39
14
  end
40
15
  end
41
16
  end
@@ -75,8 +75,7 @@ module Decidim
75
75
  end
76
76
 
77
77
  def all_proposals
78
- Decidim::Proposals::Proposal.where(component: origin_component)
79
- .where(state: :accepted)
78
+ Decidim::Proposals::Proposal.where(component: origin_component).accepted
80
79
  end
81
80
 
82
81
  def origin_component
@@ -5,43 +5,12 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user updates a Budget
7
7
  # from the admin panel.
8
- class UpdateBudget < Decidim::Command
9
- def initialize(form, budget)
10
- @form = form
11
- @budget = budget
12
- end
8
+ class UpdateBudget < Decidim::Commands::UpdateResource
9
+ fetch_form_attributes :scope, :title, :weight, :description, :total_budget
13
10
 
14
- # Updates the budget if valid.
15
- #
16
- # Broadcasts :ok if successful, :invalid otherwise.
17
- def call
18
- return broadcast(:invalid) if form.invalid?
11
+ protected
19
12
 
20
- update_budget!
21
-
22
- broadcast(:ok, budget)
23
- end
24
-
25
- private
26
-
27
- attr_reader :form, :budget
28
-
29
- def update_budget!
30
- attributes = {
31
- scope: form.scope,
32
- title: form.title,
33
- weight: form.weight,
34
- description: form.description,
35
- total_budget: form.total_budget
36
- }
37
-
38
- Decidim.traceability.update!(
39
- budget,
40
- form.current_user,
41
- attributes,
42
- visibility: "all"
43
- )
44
- end
13
+ def extra_params = { visibility: "all" }
45
14
  end
46
15
  end
47
16
  end
@@ -5,66 +5,40 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user changes a Project from the admin
7
7
  # panel.
8
- class UpdateProject < Decidim::Command
8
+ class UpdateProject < Decidim::Commands::UpdateResource
9
9
  include ::Decidim::GalleryMethods
10
+ fetch_form_attributes :scope, :category, :title, :description, :budget_amount, :address, :latitude, :longitude
10
11
 
11
- # Initializes an UpdateProject Command.
12
- #
13
- # form - The form from which to get the data.
14
- # project - The current instance of the project to be updated.
15
12
  def initialize(form, project)
16
- @form = form
17
- @project = project
13
+ super(form, project)
18
14
  @attached_to = project
19
15
  end
20
16
 
21
- # Updates the project if valid.
22
- #
23
- # Broadcasts :ok if successful, :invalid otherwise.
24
- def call
25
- return broadcast(:invalid) if form.invalid?
26
-
27
- if process_gallery?
28
- build_gallery
29
- return broadcast(:invalid) if gallery_invalid?
30
- end
31
-
32
- transaction do
33
- update_project
34
- link_proposals
35
- create_gallery if process_gallery?
36
- photo_cleanup!
37
- end
17
+ private
38
18
 
39
- broadcast(:ok)
19
+ def run_after_hooks
20
+ link_proposals
21
+ create_gallery if process_gallery?
22
+ photo_cleanup!
40
23
  end
41
24
 
42
- private
25
+ def run_before_hooks
26
+ return unless process_gallery?
43
27
 
44
- attr_reader :project, :form, :gallery
28
+ build_gallery
29
+ raise Decidim::Commands::HookError if gallery_invalid?
30
+ end
45
31
 
46
- def update_project
47
- Decidim.traceability.update!(
48
- project,
49
- form.current_user,
50
- scope: form.scope,
51
- category: form.category,
52
- title: form.title,
53
- description: form.description,
54
- budget_amount: form.budget_amount,
55
- selected_at:,
56
- address: form.address,
57
- latitude: form.latitude,
58
- longitude: form.longitude
59
- )
32
+ def attributes
33
+ super.merge({ selected_at: })
60
34
  end
61
35
 
62
36
  def proposals
63
- @proposals ||= project.sibling_scope(:proposals).where(id: form.proposal_ids)
37
+ @proposals ||= resource.sibling_scope(:proposals).where(id: form.proposal_ids)
64
38
  end
65
39
 
66
40
  def link_proposals
67
- project.link_resources(proposals, "included_proposals")
41
+ resource.link_resources(proposals, "included_proposals")
68
42
  end
69
43
 
70
44
  def selected_at
@@ -9,7 +9,7 @@ module Decidim
9
9
  # Note that it inherits from `Decidim::Components::BaseController`, which
10
10
  # override its layout and provide all kinds of useful methods.
11
11
  class ApplicationController < Decidim::Admin::Components::BaseController
12
- helper_method :budget, :projects, :project
12
+ helper_method :budget, :projects, :project, :maps_enabled?
13
13
 
14
14
  def budget
15
15
  @budget ||= Budget.where(component: current_component).includes(:projects).find_by(id: params[:budget_id])
@@ -24,6 +24,10 @@ module Decidim
24
24
  def project
25
25
  @project ||= projects.find(params[:id])
26
26
  end
27
+
28
+ def maps_enabled?
29
+ @maps_enabled ||= current_component.settings.geocoding_enabled?
30
+ end
27
31
  end
28
32
  end
29
33
  end
@@ -68,7 +68,7 @@ module Decidim
68
68
  def destroy
69
69
  enforce_permission_to(:destroy, :project, project:)
70
70
 
71
- DestroyProject.call(project, current_user) do
71
+ Decidim::Commands::DestroyResource.call(project, current_user) do
72
72
  on(:ok) do
73
73
  flash[:notice] = I18n.t("projects.destroy.success", scope: "decidim.budgets.admin")
74
74
  redirect_to budget_projects_path(budget)
@@ -21,7 +21,7 @@ module Decidim
21
21
  validates :scope, presence: true, if: ->(form) { form.decidim_scope_id.present? }
22
22
  validates :decidim_scope_id, scope_belongs_to_component: true, if: ->(form) { form.decidim_scope_id.present? }
23
23
 
24
- # Finds the Scope from the given decidim_scope_id, uses the compoenent scope if missing.
24
+ # Finds the Scope from the given decidim_scope_id, uses the component scope if missing.
25
25
  #
26
26
  # Returns a Decidim::Scope
27
27
  def scope
@@ -46,7 +46,7 @@ module Decidim
46
46
 
47
47
  # Returns false if the current order does not have a rule for minimum budget
48
48
  # Returns false if the current order has not reached the minimum budget
49
- # Otherwhise returns true
49
+ # Otherwise returns true
50
50
  def current_order_minimum_reached?
51
51
  return false if current_order.minimum_budget.zero?
52
52
 
@@ -114,7 +114,7 @@ module Decidim
114
114
  project
115
115
  .slice(:latitude, :longitude, :address)
116
116
  .merge(
117
- title: decidim_html_escape(translated_attribute(project.title)),
117
+ title: decidim_escape_translated(project.title),
118
118
  link: ::Decidim::ResourceLocatorPresenter.new([project.budget, project]).path,
119
119
  items: cell("decidim/budgets/project_metadata", project).send(:project_items_for_map).to_json
120
120
  )
@@ -78,7 +78,7 @@ $(() => {
78
78
 
79
79
  if (action) {
80
80
  $(`#js-form-${action}`).on("submit", () => {
81
- $(".layout-content > .callout-wrapper").html("");
81
+ $(".layout-content > div[data-callout-wrapper]").html("");
82
82
  })
83
83
 
84
84
  $(`#js-${action}-actions`).removeClass("hide");
@@ -4,12 +4,8 @@
4
4
  }
5
5
 
6
6
  &-summary {
7
- @apply bg-tertiary;
8
-
9
- box-shadow: 0 4px 6px 0 rgba(211, 211, 211, 0.25);
10
-
11
7
  &__content {
12
- @apply p-4 md:p-0;
8
+ @apply bg-tertiary p-4 md:h-full md:p-0;
13
9
  }
14
10
 
15
11
  &__container {
@@ -21,7 +17,7 @@
21
17
  }
22
18
 
23
19
  &__content__header {
24
- @apply col-span-2 text-2xl mb-2;
20
+ @apply col-span-2 text-2xl pb-2 mb-2;
25
21
 
26
22
  .ql-editor {
27
23
  @apply inline-block text-2xl;
@@ -37,24 +33,20 @@
37
33
  }
38
34
 
39
35
  &__progressbar {
40
- @apply my-4 relative;
36
+ @apply my-0 lg:my-4 relative;
41
37
 
42
38
  .budget-progress {
43
- @apply bg-white rounded;
39
+ @apply bg-white rounded h-2;
44
40
  }
45
41
 
46
42
  &--minimum {
47
- @apply absolute;
48
-
49
- .progress-meter--minimum-mark {
50
- @apply h-[20px] ml-auto w-[2px] bg-black block;
51
- }
43
+ @apply absolute h-2 bg-gray-3 rounded-s;
52
44
  }
53
45
 
54
46
  &--meter {
55
47
  background-color: var(--success);
56
48
 
57
- @apply h-[20px] rounded;
49
+ @apply h-2 rounded-s absolute;
58
50
  }
59
51
  }
60
52
 
@@ -71,11 +63,11 @@
71
63
  }
72
64
 
73
65
  &__progressbar-legend {
74
- @apply text-sm block;
66
+ @apply text-xs md:text-sm block;
75
67
  }
76
68
 
77
69
  &__progressbar-legend-strong {
78
- @apply font-bold block;
70
+ @apply font-semibold block text-[10px] md:text-sm text-nowrap;
79
71
  }
80
72
  }
81
73
 
@@ -231,7 +223,23 @@
231
223
  }
232
224
 
233
225
  .budget-summary__button-modal {
234
- @apply col-span-12 mb-4 pb-4;
226
+ @apply hidden lg:text-secondary lg:block lg:col-span-12 lg:mb-4 lg:pb-4;
227
+ }
228
+
229
+ .budget-summary__button-dropdown {
230
+ @apply col-span-12 text-secondary lg:hidden;
231
+
232
+ &_text {
233
+ @apply flex gap-4 justify-start;
234
+
235
+ svg {
236
+ @apply w-5 h-5;
237
+ }
238
+ }
239
+
240
+ p {
241
+ @apply text-gray-4 font-normal text-[13px];
242
+ }
235
243
  }
236
244
 
237
245
  .progressbox-fixed-wrapper {
@@ -262,7 +270,11 @@
262
270
  }
263
271
 
264
272
  .budget-summary__button-modal {
265
- @apply col-span-10 col-start-2 justify-start;
273
+ @apply hidden lg:text-secondary lg:block lg:col-span-10 lg:col-start-2 lg:justify-start;
274
+ }
275
+
276
+ .budget-summary__button-dropdown {
277
+ @apply block text-secondary col-span-10 col-start-2 justify-start lg:hidden;
266
278
  }
267
279
 
268
280
  .progressbox-fixed-wrapper {
@@ -25,7 +25,7 @@
25
25
  <% if current_component.has_subscopes? %>
26
26
  <%= th_resource_scope_label %>
27
27
  <% end %>
28
- <th class="actions"><%= t("actions.title", scope: "decidim.budgets") %></th>
28
+ <th><%= t("actions.title", scope: "decidim.budgets") %></th>
29
29
  </tr>
30
30
  </thead>
31
31
  <tbody>
@@ -12,11 +12,9 @@
12
12
  <% end %>
13
13
  <% if allowed_to? :import_proposals, :project %>
14
14
  <%= import_dropdown do %>
15
- <%= link_to new_budget_proposals_import_path(budget) do %>
16
- <li class="imports--component">
17
- <%= t("actions.import", scope: "decidim.budgets", name: t("models.project.name", scope: "decidim.budgets.admin")) %>
18
- </li>
19
- <% end %>
15
+ <li class="imports--component">
16
+ <%= link_to t("actions.import", scope: "decidim.budgets", name: t("models.project.name", scope: "decidim.budgets.admin")), new_budget_proposals_import_path(budget) %>
17
+ </li>
20
18
  <% end %>
21
19
  <% end %>
22
20
  <%= link_to t("actions.new_project", scope: "decidim.budgets"), new_budget_project_path, class: "button button__sm button__secondary new" if allowed_to? :create, :project %>
@@ -30,6 +30,11 @@
30
30
  <%= content_tag :strong, t("no", scope: "decidim.budgets.admin.projects.index.selected_options"), class: "label" %>
31
31
  <% end %>
32
32
  </td>
33
+ <% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
34
+ <td>
35
+ <%= static_map_link(project, {}, { class: "static-map__admin" }) %>
36
+ </td>
37
+ <% end %>
33
38
  <td class="table-list__actions">
34
39
  <% if allowed_to? :update, :project, project: project %>
35
40
  <%= icon_link_to "pencil-line", resource_locator([budget, project]).edit, t("actions.edit", scope: "decidim.budgets"), class: "action-icon--edit" %>