decidim-budgets 0.28.2 → 0.29.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/budgets/base_cell.rb +0 -2
- data/app/cells/decidim/budgets/budget_list_item_cell.rb +0 -3
- data/app/cells/decidim/budgets/order_activity_cell.rb +1 -1
- data/app/cells/decidim/budgets/project_l_cell.rb +0 -1
- data/app/cells/decidim/budgets/project_vote_button_cell.rb +0 -1
- data/app/cells/decidim/budgets/project_voted_hint_cell.rb +0 -2
- data/app/cells/decidim/budgets/project_votes_count_cell.rb +0 -2
- data/app/commands/decidim/budgets/admin/create_budget.rb +4 -33
- data/app/commands/decidim/budgets/admin/create_order_reminders.rb +5 -19
- data/app/commands/decidim/budgets/admin/create_project.rb +19 -45
- data/app/commands/decidim/budgets/admin/destroy_budget.rb +3 -28
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +1 -2
- data/app/commands/decidim/budgets/admin/update_budget.rb +4 -35
- data/app/commands/decidim/budgets/admin/update_project.rb +17 -43
- data/app/controllers/decidim/budgets/admin/application_controller.rb +5 -1
- data/app/controllers/decidim/budgets/admin/projects_controller.rb +1 -1
- data/app/forms/decidim/budgets/admin/budget_form.rb +1 -1
- data/app/helpers/decidim/budgets/projects_helper.rb +2 -2
- data/app/packs/src/decidim/budgets/admin/projects.js +1 -1
- data/app/packs/stylesheets/budgets.scss +30 -18
- data/app/views/decidim/budgets/admin/budgets/index.html.erb +1 -1
- data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +5 -0
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_budget-change.html.erb +2 -2
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb +2 -2
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +2 -2
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +2 -2
- data/app/views/decidim/budgets/admin/projects/index.html.erb +5 -2
- data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +3 -3
- data/app/views/decidim/budgets/projects/_budget_confirm.html.erb +3 -3
- data/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb +1 -1
- data/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb +21 -12
- data/app/views/decidim/budgets/projects/_projects.html.erb +1 -1
- data/app/views/decidim/budgets/projects/index.js.erb +1 -1
- data/config/locales/ar.yml +0 -1
- data/config/locales/bg.yml +2 -1
- data/config/locales/ca.yml +2 -1
- data/config/locales/cs.yml +2 -1
- data/config/locales/de.yml +2 -1
- data/config/locales/el.yml +0 -1
- data/config/locales/en.yml +2 -1
- data/config/locales/es-MX.yml +2 -1
- data/config/locales/es-PY.yml +2 -1
- data/config/locales/es.yml +2 -1
- data/config/locales/eu.yml +2 -1
- data/config/locales/fi-plain.yml +2 -1
- data/config/locales/fi.yml +2 -1
- data/config/locales/fr-CA.yml +2 -1
- data/config/locales/fr.yml +2 -1
- data/config/locales/gl.yml +0 -1
- data/config/locales/hu.yml +1 -1
- data/config/locales/it.yml +0 -1
- data/config/locales/ja.yml +2 -1
- data/config/locales/lb.yml +0 -1
- data/config/locales/lt.yml +0 -1
- data/config/locales/nl.yml +0 -1
- data/config/locales/no.yml +0 -1
- data/config/locales/pl.yml +2 -1
- data/config/locales/pt-BR.yml +0 -1
- data/config/locales/pt.yml +0 -1
- data/config/locales/ro-RO.yml +0 -1
- data/config/locales/sv.yml +1 -1
- data/config/locales/tr-TR.yml +0 -1
- data/config/locales/zh-CN.yml +0 -1
- data/config/locales/zh-TW.yml +0 -1
- data/decidim-budgets.gemspec +1 -1
- data/lib/decidim/budgets/project_serializer.rb +1 -0
- data/lib/decidim/budgets/seeds.rb +62 -21
- data/lib/decidim/budgets/version.rb +1 -1
- data/lib/decidim/budgets/workflows/base.rb +1 -1
- metadata +15 -16
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 225ace3bc6f603780dbf4abba753bf9242ae9311cdfcc68def43c2a618b98a0a
|
4
|
+
data.tar.gz: a539c2fa675fd1e54ba0e6f0dd301fcb9dde44071bb4911df0c72e2bca2922e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8340689e190f0157094b55cab27f9ad66c7e3697ec9245f0d5ef53674a31ce2411250e8228524fa9ee67d5b32f84cedf08d4f8dd74685c8ffecf4176ee03dcc1
|
7
|
+
data.tar.gz: f7275ad3daf0ba87ab6b6f8b2d3539d23636538e20ad896ec3dc329c43352f689e2e2b7aff7c02f7bdfc03263a12be55abe45b352e9f348ac4094695ff2fccdb
|
@@ -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
|
@@ -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
|
|
@@ -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::
|
9
|
-
|
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
|
-
|
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
|
-
|
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 >
|
33
|
-
(reminder.deliveries.present? && reminder.deliveries.last.created_at >
|
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::
|
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
|
-
|
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
|
-
|
27
|
-
create_project!
|
28
|
-
link_proposals
|
29
|
-
create_gallery if process_gallery?
|
30
|
-
end
|
14
|
+
attr_reader :gallery
|
31
15
|
|
32
|
-
|
16
|
+
def run_after_hooks
|
17
|
+
@attached_to = resource
|
18
|
+
link_proposals
|
19
|
+
create_gallery if process_gallery?
|
33
20
|
end
|
34
21
|
|
35
|
-
|
36
|
-
|
37
|
-
attr_reader :form, :project, :gallery
|
22
|
+
def run_before_hooks
|
23
|
+
return unless process_gallery?
|
38
24
|
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|
-
|
53
|
-
|
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 ||=
|
36
|
+
@proposals ||= resource.sibling_scope(:proposals).where(id: form.proposal_ids)
|
63
37
|
end
|
64
38
|
|
65
39
|
def link_proposals
|
66
|
-
|
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::
|
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
|
-
|
11
|
+
def invalid? = resource.projects.present?
|
28
12
|
|
29
|
-
def
|
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
|
@@ -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::
|
9
|
-
|
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
|
-
|
15
|
-
#
|
16
|
-
# Broadcasts :ok if successful, :invalid otherwise.
|
17
|
-
def call
|
18
|
-
return broadcast(:invalid) if form.invalid?
|
11
|
+
protected
|
19
12
|
|
20
|
-
|
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::
|
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
|
-
|
17
|
-
@project = project
|
13
|
+
super(form, project)
|
18
14
|
@attached_to = project
|
19
15
|
end
|
20
16
|
|
21
|
-
|
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
|
-
|
19
|
+
def run_after_hooks
|
20
|
+
link_proposals
|
21
|
+
create_gallery if process_gallery?
|
22
|
+
photo_cleanup!
|
40
23
|
end
|
41
24
|
|
42
|
-
|
25
|
+
def run_before_hooks
|
26
|
+
return unless process_gallery?
|
43
27
|
|
44
|
-
|
28
|
+
build_gallery
|
29
|
+
raise Decidim::Commands::HookError if gallery_invalid?
|
30
|
+
end
|
45
31
|
|
46
|
-
def
|
47
|
-
|
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 ||=
|
37
|
+
@proposals ||= resource.sibling_scope(:proposals).where(id: form.proposal_ids)
|
64
38
|
end
|
65
39
|
|
66
40
|
def link_proposals
|
67
|
-
|
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
|
-
|
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
|
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
|
-
#
|
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:
|
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
|
)
|
@@ -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-
|
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-
|
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
|
28
|
+
<th><%= t("actions.title", scope: "decidim.budgets") %></th>
|
29
29
|
</tr>
|
30
30
|
</thead>
|
31
31
|
<tbody>
|
@@ -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" %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div id="js-budget-change-projects-actions" class="hide js-bulk-action-form">
|
2
2
|
<%= form_tag(update_budget_budget_projects_path, method: :post, remote: true, id: "js-form-budget-change-projects", class: "form form-defaults flex items-center gap-x-2") do %>
|
3
3
|
|
4
|
-
<div class="
|
4
|
+
<div class="hide">
|
5
5
|
<% projects.each do |project| %>
|
6
6
|
<%= check_box_tag "project_ids[]", project.id, false, class: "js-check-all-resources js-resource-id-#{project.id}" %>
|
7
7
|
<% end %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
class: "button button__sm button__secondary small button--simple float-left"
|
16
16
|
) %>
|
17
17
|
|
18
|
-
<button id="js-cancel-budget-change-projects" class="button button__sm button__secondary
|
18
|
+
<button id="js-cancel-budget-change-projects" class="button button__sm button__secondary js-cancel-bulk-action" type="button">
|
19
19
|
<%= t("decidim.budgets.admin.projects.index.cancel") %>
|
20
20
|
</button>
|
21
21
|
<% end %>
|