forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
26,505 additions
and
1,931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
.mini-title{ | ||
display: block; | ||
|
||
&__strong{ | ||
line-height: 1rem; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 73 additions & 52 deletions
125
decidim-budgets/app/views/decidim/budgets/projects/_budget_summary.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,97 @@ | ||
<div class="row column voting-rules"> | ||
<div class="callout warning"> | ||
<div class="row"> | ||
<div class="columns medium-8 large-9"> | ||
<h2 class="heading3"> | ||
<%= t(".rules.title") %> | ||
</h2> | ||
<ul> | ||
<%= raw current_rule_explanation %> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card budget-summary" data-progress-reference data-safe-url="<%= budget_url(budget) %>"> | ||
<div class="card__content"> | ||
<% if include_heading %> | ||
<%= focus_mode( | ||
title: translated_attribute(current_component.participatory_space.title), | ||
url: Decidim::EngineRouter.main_proxy(current_component).root_path, | ||
opener_button: false | ||
) do %> | ||
|
||
<% unless current_workflow.single? %> | ||
<% project_detail = action_name == "show" %> | ||
<% back_path = project_detail ? budget_path(budget) : Decidim::EngineRouter.main_proxy(current_component).root_path %> | ||
<% back_title = project_detail ? t(".back_to_projects", budget_name: translated_attribute(budget.title)) : t(".back_to_budgets", component_name: translated_attribute(current_component.name)) %> | ||
|
||
<p> | ||
<%= link_to back_path, class: "muted-link" do %> | ||
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %> | ||
<%= back_title %> | ||
<% end %> | ||
</p> | ||
<% end %> | ||
|
||
<div class="card budget-summary" data-progress-reference data-safe-url="<%= budget_url(budget) %>"> | ||
<div class="card__content"> | ||
<% if current_order_checked_out? %> | ||
<h2 class="heading3"> | ||
<h3 class="heading3"> | ||
<%= t(".checked_out.title") %> | ||
<% unless current_workflow.single? %> | ||
<small><%= translated_attribute(budget.title) %></small> | ||
<% end %> | ||
</h2> | ||
</h3> | ||
<p> | ||
<%= raw t(".checked_out.description", cancel_link: link_to(t(".cancel_order"), budget_order_path(return_to: "budget"), method: :delete, class: "cancel-order", data: { confirm: t(".are_you_sure") })) %> | ||
</p> | ||
<% else %> | ||
<h2 class="heading3"> | ||
<h3 class="heading3"> | ||
<% if current_workflow.single? %> | ||
<%= t(".title") %> | ||
<% else %> | ||
<%= translated_attribute(budget.title) %> | ||
<% end %> | ||
</h2> | ||
<p> | ||
<%= raw current_rule_description %> | ||
</p> | ||
</h3> | ||
<% end %> | ||
<% end %> | ||
|
||
<% if current_order.projects_rule? %> | ||
<div class="budget-summary__total" data-total-allocation="<%= current_order.available_allocation %>"> | ||
<span class="mini-title"><%= t(".total_projects") %> | ||
<strong class="mini-title__strong mini-title__strong--highlight"> | ||
<%= current_order.maximum_projects %> | ||
</strong> | ||
</span> | ||
<div class="row column voting-rules"> | ||
<div class="callout warning"> | ||
<div class="row"> | ||
<div class="columns medium-8 large-9"> | ||
<h3 class="heading3"> | ||
<%= t(".rules.title") %> | ||
</h3> | ||
<ul> | ||
<%= raw current_rule_explanation %> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% else %> | ||
<div class="budget-summary__total" data-total-allocation="<%= current_order.available_allocation %>" data-total-budget="<%= budget.total_budget %>"> | ||
<span class="mini-title"><%= t(".total_budget") %> | ||
<strong class="mini-title__strong mini-title__strong--highlight"> | ||
<%= budget_to_currency(budget.total_budget) %> | ||
</strong> | ||
|
||
<%= cell("decidim/budgets/budget_information_modal", budget) %> | ||
|
||
<% if current_order.projects_rule? %> | ||
<div class="budget-summary__total" data-total-allocation="<%= current_order.available_allocation %>"> | ||
<span class="mini-title"><%= t(".total_projects") %> | ||
<strong class="mini-title__strong mini-title__strong--highlight"> | ||
<%= current_order.maximum_projects %> | ||
</strong> | ||
</span> | ||
</div> | ||
<% else %> | ||
<div class="budget-summary__total" data-total-allocation="<%= current_order.available_allocation %>" data-total-budget="<%= budget.total_budget %>"> | ||
<span class="mini-title"><%= t(".total_budget") %> | ||
<strong class="mini-title__strong mini-title__strong--highlight"> | ||
<%= budget_to_currency(budget.total_budget) %> | ||
</strong> | ||
</span> | ||
</div> | ||
<% end %> | ||
|
||
<div> | ||
<span class="mini-title mr-s"> | ||
<%= t(".assigned") %> | ||
<%= render partial: "order_total_budget" %> | ||
</span> | ||
</div> | ||
<% end %> | ||
|
||
<%= render partial: "order_progress" %> | ||
<span class="mini-title"> | ||
<%= t(".remaining") %> | ||
<%= render partial: "order_remaining_budget" %> | ||
</span> | ||
</div> | ||
|
||
<div> | ||
<span class="mini-title"> | ||
<%= t(".assigned") %> | ||
<%= render partial: "order_total_budget" %> | ||
</span> | ||
<%= render partial: "order_progress" %> | ||
</div> | ||
|
||
<%= cell("decidim/budgets/budget_information_modal", budget) %> | ||
<%= render partial: "order_selected_projects" %> | ||
</div> | ||
|
||
<%= render partial: "order_selected_projects" %> | ||
</div> | ||
|
||
<%= render partial: "budget_excess" %> | ||
<%= render partial: "budget_confirm" %> | ||
<%= render partial: "budget_excess" %> | ||
<%= render partial: "budget_confirm" %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,4 +63,4 @@ | |
"react-test-renderer": "^16.0.0", | ||
"yaml-jest": "^1.0.5" | ||
} | ||
} | ||
} |
Oops, something went wrong.