Skip to content

Commit ecf2cf3

Browse files
committed
icon register
1 parent 97e73ff commit ecf2cf3

File tree

6 files changed

+323
-225
lines changed

6 files changed

+323
-225
lines changed

app/cells/decidim/budgets/project_vote_button/show.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%= action_authorized_button_to "vote",
2-
budget_order_line_item_path(model.budget, project_id: model),
2+
budget_order_line_item_path(model.budget, project_id: model, show_only_added: options[:show_only_added]),
33
method: vote_button_method,
44
remote: true,
55
class: "button w-full #{vote_button_classes} getxo-budget-vote-button",

app/views/decidim/budgets/line_items/update_budget.js.erb

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
var $orderTotalBudget = $('#order-total-budget');
2-
var $orderSelectedProjects = $('#order-selected-projects');
3-
var $orderProgress = $('#order-progress');
4-
var $budgetConfirm = $('#budget-confirm');
1+
const $orderTotalBudget = $('#order-total-budget');
2+
const $orderSelectedProjects = $('#order-selected-projects');
3+
const $orderProgress = $('#order-progress');
4+
const $budgetConfirm = $('#budget-confirm');
55

66
morphdom($orderTotalBudget[0], '<%= j(render partial: "decidim/budgets/projects/order_total_budget").strip.html_safe %>');
77
morphdom($orderSelectedProjects[0], '<%= j(render partial: "decidim/budgets/projects/order_selected_projects").strip.html_safe %>');
@@ -12,13 +12,13 @@ $("#order-progress").foundation();
1212
$(".budget-summary__selected").foundation();
1313

1414
<% project.budget.projects.each_with_index do |p| %>
15-
var $projectItem = $('#project-<%= p.id %>-item');
16-
if ($projectItem.length > 0) {
15+
const $projectItem = $('#project-<%= p.id %>-item');
16+
if ($projectItem.length > 0) {
1717
morphdom($projectItem[0], '<%= j(render partial: "decidim/budgets/projects/project", locals: { project: p }).strip.html_safe %>');
1818
}
1919

20-
var $projectBudgetButton = $('#project-<%= p.id %>-budget-button');
21-
if ($projectBudgetButton.length > 0) {
20+
const $projectBudgetButton = $('#project-<%= p.id %>-budget-button');
21+
if ($projectBudgetButton.length > 0) {
2222
morphdom($projectBudgetButton[0], '<%= j(render partial: "decidim/budgets/projects/project_budget_button", locals: { project: p }).strip.html_safe %>');
2323
}
2424
<% end %>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
Rails.application.config.to_prepare do
4+
Decidim.icons.register(
5+
name: "dashboard-2-line",
6+
icon: "dashboard-2-line",
7+
category: "system",
8+
description: "",
9+
engine: :admin_getxo
10+
)
11+
end

config/initializers/getxo_customizations.rb

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
# Admin menu
44
Decidim.menu :admin_menu do |menu|
5-
menu.item "Censo Getxo",
6-
"/admin/getxo",
7-
icon_name: "dial",
8-
position: 1.2,
9-
active: :inclusive
5+
menu.add_item :getxo,
6+
"Censo Getxo",
7+
"/admin/getxo",
8+
icon_name: "dashboard-2-line",
9+
position: 1.2,
10+
active: :inclusive
1011
end
1112

1213
# Multiselect for street verificator

0 commit comments

Comments
 (0)