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.
bcn-budget-v0.24 to 0.24-stable-bcn (#12)
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]>
- Loading branch information
1 parent
3593e3f
commit 824f3c4
Showing
53 changed files
with
970 additions
and
226 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
17 changes: 17 additions & 0 deletions
17
decidim-budgets/app/assets/stylesheets/decidim/budgets/budget/_budget-meter.scss
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
36 changes: 36 additions & 0 deletions
36
decidim-budgets/app/assets/stylesheets/decidim/budgets/budget/_budget-vote-button.scss
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,36 @@ | ||
.budget-vote-button.expanded { | ||
display: flex; | ||
text-align: left; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
.icon-wrapper { | ||
@extend .budget-list__action; | ||
} | ||
|
||
&.added { | ||
@extend .budget-list__data--added; | ||
color: $body-font-color; | ||
|
||
.icon-wrapper { | ||
background: var(--success); | ||
border-color: $body-font-color; | ||
color: $body-font-color; | ||
} | ||
} | ||
|
||
&.hollow { | ||
.icon-wrapper { | ||
border: $button-hollow-border-width solid var(--primary); | ||
color: var(--primary); | ||
} | ||
|
||
&:hover, | ||
&:focus { | ||
.icon-wrapper { | ||
border-color: white; | ||
color: white; | ||
} | ||
} | ||
} | ||
} |
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
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" %> | ||
</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" %> | ||
</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" %> | ||
</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" %> | ||
</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 %> |
Oops, something went wrong.