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.
Co-authored-by: Vera Rojman <[email protected]> Co-authored-by: Vera Rojman <[email protected]> Co-authored-by: Ivan Vergés <[email protected]> Co-authored-by: decidim-bot <[email protected]> bcn-budget-v0.24 to 0.24-stable-bcn (#12) Fix modal pop up when project exceeds budget amount (#13) Check amount in add to order command (#14) Fix 'Add line command' (#15) Restyle project vote button (#16) Change literal of button when budget is voted (#17) show loading spinner only if no modals will open Fix voted budgets and title bar hidden by focus mode (#18)
- Loading branch information
Showing
58 changed files
with
979 additions
and
264 deletions.
There are no files selected for viewing
36 changes: 9 additions & 27 deletions
36
decidim-budgets/app/cells/decidim/budgets/budget_information_modal/show.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,28 +1,10 @@ | ||
<button class="link" data-open="budget-modal-info" aria-controls="budget-modal-info" aria-haspopup="true" tabindex="0"> | ||
<%= t(:more_information, scope: i18n_scope) %> | ||
</button> | ||
|
||
<div class="reveal" data-reveal id="budget-modal-info"> | ||
<div class="reveal__header"> | ||
<h3 class="reveal__title"><%= decidim_sanitize(component_name) %></h3> | ||
<button class="close-button" data-close aria-label="<%= t(:close_modal, scope: i18n_scope) %>" type="button"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
|
||
<%= content_tag(:p, more_information) if more_information %> | ||
|
||
<% unless current_workflow.single? %> | ||
<p> | ||
<%= link_to t(:back_to, scope: i18n_scope, component_name: component_name), budgets_path %> | ||
</p> | ||
<% end %> | ||
|
||
<div class="row"> | ||
<div class="columns medium-8 medium-offset-2"> | ||
<button class="button expanded" data-close> | ||
<%= t(:continue, scope: i18n_scope) %> | ||
</button> | ||
</div> | ||
<% if more_information %> | ||
<button data-toggle="budget-modal-info"> | ||
<%= t("more_information", scope: i18n_scope) %> | ||
<%= icon("caret-bottom", class:"icon--small", aria_label: t("more_information", scope: i18n_scope), role: "img") %> | ||
</button> | ||
|
||
<div class="hide" data-toggler=".hide" id="budget-modal-info"> | ||
<%= content_tag(:p, more_information) %> | ||
</div> | ||
</div> | ||
<% 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
46 changes: 31 additions & 15 deletions
46
decidim-budgets/app/cells/decidim/budgets/budget_list_item/show.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,22 +1,38 @@ | ||
<div class="<%= card_class %>"> | ||
<div class="card--list__text"> | ||
<div class="<%= card_class %> budget-list__item budget-list__item-cell"> | ||
<div class="budget-list__text flex-horizontal"> | ||
<%= link_to budget_path(budget), class: link_class do %> | ||
<% if voted? && !voting_finished? %> | ||
<strong> | ||
<%= translated_attribute(title) %> | ||
</strong> | ||
<span class="button tiny success card--list__check card--list__check--disabled"> | ||
<%= icon "check", class: "icon--small", role: "img", aria_label: t("decidim.budgets.budget_list_item.voting_finished") %> | ||
</span> | ||
<% else %> | ||
<h5 class="card--list__heading"> | ||
<%= translated_attribute(title) %> | ||
</h5> | ||
<% end %> | ||
|
||
<h5> | ||
<strong> | ||
<%= budget_to_currency(total_budget) %> | ||
</strong> | ||
</h5> | ||
|
||
<%= decidim_sanitize html_truncate(translated_attribute(description), length: 140) %> | ||
</div> | ||
|
||
<% if progress? && !voting_finished? %> | ||
<span class="button tiny hollow secondary card--list__check card--list__check--disabled"> | ||
<%= icon "bookmark", class: "icon--small", role: "img", aria_label: t("decidim.budgets.budget_list_item.voting_started") %> | ||
</span> | ||
<% end %> | ||
<% if !voting_finished? %> | ||
<div class="budget-list__icon mr-s"> | ||
<% if voted? %> | ||
<span class="button tiny success card--list__check card--list__check--disabled card--list__check--inline"> | ||
<%= icon "check", class: "icon--small", role: "img", aria_label: t("decidim.budgets.budget_list_item.voting_finished") %> | ||
</span> | ||
<% elsif progress? %> | ||
<span class="button tiny warning card--list__check card--list__check--disabled card--list__check--inline"> | ||
<%= icon "bookmark", class: "icon--small", role: "img", aria_label: t("decidim.budgets.budget_list_item.voting_started") %> | ||
</span> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="budget-list__data"> | ||
<%= link_to budget_path(budget), class: "button button--sc expanded #{button_class} mb-none" do %> | ||
<span><%= button_text %></span> | ||
<%= icon "chevron-right", class: "icon--small", role: "img" %> | ||
<% end %> | ||
</div> | ||
</div> |
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
8 changes: 2 additions & 6 deletions
8
decidim-budgets/app/cells/decidim/budgets/budgets_header/show.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,7 +1,3 @@ | ||
<div class="row"> | ||
<div class="columns medium-7 mediumlarge-8"> | ||
<div class="section"> | ||
<%= decidim_sanitize(landing_page_content) %> | ||
</div> | ||
</div> | ||
<div class="section"> | ||
<%= decidim_sanitize(landing_page_content) %> | ||
</div> |
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
23 changes: 17 additions & 6 deletions
23
decidim-budgets/app/cells/decidim/budgets/budgets_list/card_list.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,7 +1,18 @@ | ||
<div id="budgets" class="card card--list card--list--mini"> | ||
<% budgets.each do |budget| %> | ||
<% next if highlighted.include?(budget) && !voting_finished? %> | ||
<%# show highlighted budgets first %> | ||
<% if highlighted.any? %> | ||
<div id="highlighted-budgets" class="card card--list budget-list"> | ||
<% highlighted.each do |budget| %> | ||
<%= cell("decidim/budgets/budget_list_item", budget) %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<%= cell("decidim/budgets/budget_list_item", budget) %> | ||
<% end %> | ||
</div> | ||
<% non_highlighted = (budgets - highlighted - voted) %> | ||
|
||
<% if non_highlighted.any? %> | ||
<div id="budgets" class="card card--list budget-list"> | ||
<% non_highlighted.each do |budget| %> | ||
<%= cell("decidim/budgets/budget_list_item", budget) %> | ||
<% end %> | ||
</div> | ||
<% end %> |
11 changes: 0 additions & 11 deletions
11
decidim-budgets/app/cells/decidim/budgets/budgets_list/highlighted.erb
This file was deleted.
Oops, something went wrong.
27 changes: 11 additions & 16 deletions
27
decidim-budgets/app/cells/decidim/budgets/budgets_list/show.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,20 +1,15 @@ | ||
<div class="row"> | ||
<div class="columns medium-7 mediumlarge-8"> | ||
<% if !voting_finished? && (highlighted? || voted?) %> | ||
<div class="section"> | ||
<h3 class="section-heading"> | ||
<%= t(:my_budgets, scope: i18n_scope) %> | ||
</h3> | ||
<% if voted? %> | ||
<div class="section"> | ||
<h3 class="section-heading"> | ||
<%= t(:my_budgets, scope: i18n_scope) %> | ||
</h3> | ||
|
||
<%= render :highlighted %> | ||
<%= render :voted %> | ||
</div> | ||
<% end %> | ||
<%= render :voted %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="row"> | ||
<div class="columns mediumlarge-6"> | ||
<%= render :card_list %> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="columns mediumlarge-12"> | ||
<%= render :card_list %> | ||
</div> | ||
</div> |
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
10 changes: 10 additions & 0 deletions
10
decidim-budgets/app/cells/decidim/budgets/project_vote_button_cell.rb
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
module Decidim | ||
module Budgets | ||
# This cell renders an authorized_action button | ||
# to vote a given instance of a Project in a budget list | ||
class ProjectVoteButtonCell < ProjectListItemCell | ||
end | ||
end | ||
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
Oops, something went wrong.