Skip to content

Commit

Permalink
Merge pull request consuldemocracy#55 from democrateam/backport
Browse files Browse the repository at this point in the history
Fixes after update to 1.4.1
  • Loading branch information
decabeza committed Feb 22, 2022
2 parents 11274d2 + 1420a60 commit c0aa57c
Show file tree
Hide file tree
Showing 17 changed files with 173 additions and 51 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/_consul_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ $black: #222 !default;
$white: #fdfdfd !default;

$body-font-family: "Source Sans Pro", "Helvetica", "Arial", sans-serif !important !default;
$body-background: #fff;

$global-radius: rem-calc(3) !default;
$global-width: rem-calc(1200) !default;
Expand Down
37 changes: 33 additions & 4 deletions app/assets/stylesheets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ aside {
@include breakpoint(medium) {

img {
border-bottom-left-radius: rem-calc(10);
border-top-left-radius: rem-calc(10);
border-bottom-left-radius: rem-calc(12);
border-top-left-radius: rem-calc(12);
max-width: none;
height: 100%;
}
Expand Down Expand Up @@ -738,7 +738,6 @@ body > header,
}

&.header-card-full {
margin-left: calc(#{$global-width / 2} - 50vw);
margin-right: calc(#{$global-width / 2} - 50vw);
overflow-x: hidden;
}
Expand Down Expand Up @@ -883,7 +882,6 @@ body > header,
color: $text;
padding: 0;
text-align: left;
text-decoration: none;
}
}
}
Expand Down Expand Up @@ -1048,6 +1046,7 @@ footer {
}

.social {
width: auto;

[class^="fa"] {
color: $footer;
Expand Down Expand Up @@ -1748,6 +1747,7 @@ footer {
}

.legislation-process-list {
border-bottom: 0;

h3 {
color: $label;
Expand Down Expand Up @@ -1887,6 +1887,18 @@ footer {
position: relative;
}

.draft-panels .draft-allegation .calc-comments {

.comments-box-container {
top: rem-calc(100) !important;
}

.comment-box .comment-input {
border-bottom: 0;
padding-bottom: 0;
}
}

.comments-box-container .comment-meta .comment-votes {
position: relative;
width: 100%;
Expand Down Expand Up @@ -2550,6 +2562,13 @@ footer {
}
}

.proposal-dashboard .button {

&.expanded {
word-break: break-word;
}
}

// 11. Polls
// --------------------

Expand Down Expand Up @@ -3245,6 +3264,12 @@ footer {
}
}

.budget-phase {
@include breakpoint(medium) {
width: auto;
}
}

.budget-prev-phase,
.budget-next-phase,
.budget-prev-phase-disabled,
Expand Down Expand Up @@ -3430,6 +3455,10 @@ footer {
}
}

.orbit-bullets button {
min-height: 0;
}

.sdg-related-list-selector {

.help-text,
Expand Down
6 changes: 6 additions & 0 deletions app/components/admin/budgets/form_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
</div>
</div>

<div id="hide_money" class="small-12 column <%= "hide" if @budget.voting_style == "knapsack" %>">
<p class="form-label"><%= t("admin.budgets.edit.hide_money") %></p>
<p class="help-text"><%= t("admin.budgets.edit.hide_money_help_text") %></p>
<%= f.check_box :hide_money, id: "hide_money_checkbox" %>
</div>

<% unless wizard? %>
<div class="small-12 medium-6 column">
<%= f.select :phase, phases_select_options %>
Expand Down
2 changes: 1 addition & 1 deletion app/components/budgets/investment_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% if investment.image.present? %>
<%= image_tag investment.image_url(:large), alt: investment.image.title.unicode_normalize %>
<% else %>
<%= image_tag "budget_investment_no_image.jpg", alt: investment.title %>
<%= image_tag(image_path_for("budget_investment_no_image.jpg"), alt: investment.title) %>
<% end %>
<% if investment.should_show_vote_count? || investment.should_show_price? %>
Expand Down
2 changes: 1 addition & 1 deletion app/components/budgets/investment_component.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Budgets::InvestmentComponent < ApplicationComponent
delegate :locale_and_user_status, :namespaced_budget_investment_path, to: :helpers
delegate :locale_and_user_status, :namespaced_budget_investment_path, :image_path_for, to: :helpers
attr_reader :investment

def initialize(investment)
Expand Down
12 changes: 7 additions & 5 deletions app/components/budgets/supports_info_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@

<p><%= t("budgets.supports_info.share") %></p>

<p>
<a href="#investments_list" class="keep-scrolling" data-smooth-scroll>
<%= t("budgets.supports_info.scrolling") %><br>
</a>
</p>
<% if budget.investments.any? %>
<p>
<a href="#investments_list" class="keep-scrolling" data-smooth-scroll>
<%= t("budgets.supports_info.scrolling") %><br>
</a>
</p>
<% end %>
</section>
</aside>
6 changes: 1 addition & 5 deletions app/models/image.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
class Image < ApplicationRecord
include Attachable

has_attachment :attachment, styles: {
large: "x#{Setting["uploads.images.min_height"]}",
medium: "300x300#",
thumb: "140x245#"
},
has_attachment :attachment, styles: { large: "x475", medium: "300x300#", thumb: "140x245#" },
url: "/system/:class/:prefix/:style/:hash.:extension",
hash_data: ":class/:style",
use_timestamp: false,
Expand Down
10 changes: 6 additions & 4 deletions app/views/budgets/investments/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div class="budget-investment-new">
<div>
<h1><%= t("management.budget_investments.edit") %></h1>
<main class="budget-investment-new no-margin-top">
<div class="small-12 column light expand padding-top">
<header>
<h1><%= t("management.budget_investments.edit") %></h1>
</header>
</div>

<%= render "/budgets/investments/form", form_url: budget_investment_path(@budget, @investment) %>
</div>
</main>
2 changes: 1 addition & 1 deletion app/views/dashboard/polls/_question_answer_fields.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="nested-fields nested-answers small-12 medium-6 column">
<div class="nested-fields nested-answers small-12 medium-10 column">
<div class="answer-fields">
<%= f.hidden_field :given_order %>
<div class="row expanded">
Expand Down
5 changes: 3 additions & 2 deletions app/views/legislation/proposals/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<%= f.hidden_field(:legislation_process_id, value: params[:process_id]) %>

<div class="row">
<div class="small-12 column">
<div class="small-12 column required">
<%= f.text_field :title, maxlength: Legislation::Proposal.title_max_length %>
</div>

<%= f.invisible_captcha :subtitle %>

<div class="small-12 column">
<div class="small-12 column required">
<%= f.text_area :summary, rows: 4, maxlength: 200,
hint: t("proposals.form.proposal_summary_note") %>
</div>
Expand Down Expand Up @@ -65,6 +65,7 @@
</div>

<div class="actions small-12 column">
<p class="form-label"><%= t("shared.required_fields") %></p>
<%= f.submit(class: "button", value: t("proposals.#{action_name}.form.submit_button")) %>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions app/views/legislation/proposals/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
<div class="small-12 column">
<%= back_link_to %>

<h1><%= t("proposals.new.start_new") %></h1>
<h1 class="margin-top"><%= t("proposals.new.start_new") %></h1>

<%= render "legislation/proposals/form", form_url: legislation_process_proposals_path, id: @proposal.id %>
<div class="margin-top">
<%= render "legislation/proposals/form", form_url: legislation_process_proposals_path, id: @proposal.id %>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/proposals/summary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="panel">
<div class="row">
<div class="small-12 medium-9 column">
<div class="proposal-contenta">
<div class="proposal-content">
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>

<p class="proposal-info">
Expand Down
11 changes: 8 additions & 3 deletions config/locales/nl/activerecord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ nl:
phase: "Fase"
currency_symbol: "Valuta"
budget/translation:
name: "Name"
name: "Titel"
main_link_text: "Tekst knop"
main_link_url: "Link knop"
budget/investment:
heading_id: "Kop"
title: "Titel"
Expand Down Expand Up @@ -203,9 +205,11 @@ nl:
ends_at: "Einddatum"
starts_at: "Startdatum"
budget/phase/translation:
name: "Name"
description: "Beschrijving"
name: "Naam fase"
description: "Omschrijving"
summary: "Samenvatting"
main_link_text: "Tekst knop"
main_link_url: "Link knop"
comment:
body: "Reactie"
user: "Gebruiker"
Expand Down Expand Up @@ -433,6 +437,7 @@ nl:
link_text: Tekst link
link_url: URL link
columns: Aantal kolommen
background_image: "Stel afbeelding in als achtergrond"
widget/card/translation:
label: Term (optioneel)
title: Titel
Expand Down
84 changes: 67 additions & 17 deletions config/locales/nl/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,44 +61,68 @@ nl:
no_activity: Er is geen moderator activiteit.
budgets:
actions:
edit: "Edit budget"
edit: "Bewerk begroting"
preview: "Preview"
preview_results: "Preview resultaten"
ballots: "Maak stemhok"
confirm:
ballots: "Weet je het zeker? Dit is alleen relevant wanneer je fysieke (papieren) stemmen gaat inzamelen, in de stemfase. Inwoners kunnen altijd online hun stem uitbrengen, ook mét de aanwezigheid van een fysiek stemhokje."
destroy: "Weet je het zeker? Je verwijdert dan de begroting en alle bijbehorende groepen en rubrieken. Deze actie kan je niet ongedaan maken."
descriptions:
ballots: "Hiermee kan je fysieke stemmen beheren. Activeer deze optie alleen als je fysieke stemhokjes gebruikt om fysieke (papieren) te verzamelen in de stemfase."
calculate_winners: "Nadat de uitslag is berekend kunnen alleen admins de uitslag zien. De uitslag is openbaar zodra de \"%{phase}\" fase actief is en de optie \"Show results\" is aangezet bij het bewerken van de beroting."
destroy: "Je verwijdert de begroting en alle bijbehorende groepen en rubrieken. Deze actie kan je niet ongedaan maken."
index:
title: Participatory budgets
new_link: Create new budget
title: "Ideeën"
new_link: "Creëer nieuwe begroting"
filter: Filter
filters:
all: All
open: Open
finished: Finished
all: "Alle"
open: "Actief"
finished: "Afgesloten"
budget_investments: Zie begrotingsvoorstellen
table_budget_type: "Type"
table_draft: "Concept"
table_name: Name
table_phase: Phase
admin_ballots: Stembiljetten
table_name: "Titel"
table_phase: "Fase"
admin_ballots: "Papieren stemmen"
no_budgets: "Er zijn geen budgetten."
create:
notice: New participatory budget created successfully!
notice: "Nieuwe burgerbegroting gemaakt!"
update:
notice: Participatory budget updated successfully
notice: "Burgerbegroting is bewerkt!"
publish:
notice: "Burgerbegroting succesvol gepubliceerd!"
edit:
title: Edit Participatory budget
title: "Bewerk begroting"
delete: Verwijder begroting
phase: Phase
phase: "Fase"
enabled: Actief
actions: Activiteiten
active: Actieve
blank_dates: Datums zijn leeg
phases_caption: "Instellingen fases"
destroy:
success_notice: Begroting verwijderd
unable_notice: U kunt een begroting met voorstellen niet verwijderen
show:
add_heading: "Voeg kop toe"
add_group: "Groep toevoegen"
add_heading: "Rubriek toevoegen"
groups_and_headings: "Instellingen voor groepen en rubrieken"
headings_caption: "Rubieken in %{group}"
winners:
calculate: Bereken gewonnen bestemmingen
calculated: Bestemmingen worden berekend, kan even duren.
recalculate: Herbereken gewonnen investeringen
help:
budgets: "Bij een burgerbegroting kunnen inwoners direct beslissen wat er met geld van de gemeente gebeurt. De gemeente monitort en evalueert de ideeën."
groups:
multiple: "Groepen organiseren rubrieken. Nadat een groep is aangemaakt en deze verschillende rubrieken bevat, kan bepaalt worden in hoeveel rubrieken een gebruiker per groep kan stemmen."
single: "Groepen organiseren rubrieken. Dit budget heeft slechts één rubriek en hier kan dezelfde naam worden gebruikt als voor de groep. Deze naam van de rubriek verschijnt nergens op de website. Je kunt daarom gewoon doorgaan naar de volgende stap."
headings:
multiple: "Rubrieken verdelen het geld van de burgerbegroting. Hier kun je rubrieken voor de groep toevoegen en het te besteden bedrag voor elke rubriek toewijzen."
single: "Rubrieken verdelen het geld van de burgerbegroting. Dit budget heeft slechts één rubriek . Daarom is vooraf al bepaalt waar het geld in deze begroting aan wordt uitgegeven."
phases: "Een burgerbegroting bestaat uit verschillende fasen. Hieronder kun je fases aan- of uitzetten en vullen met content."
budget_groups:
name: "Name"
headings_name: "Rubrieken"
Expand Down Expand Up @@ -238,9 +262,35 @@ nl:
search_unfeasible: Search unfeasible
budgets_wizard:
creation_timeline:
budget: Budget
groups: Groepen
headings: Rubrieken
budget: "Budget"
groups: "Groepen"
headings: "Rubrieken"
phases: "Fases"
budgets:
continue: "Door naar groepen"
groups:
back: "Ga terug"
continue: "Door naar rubrieken"
headings:
continue: "Door naar fases"
single:
back: "Ga terug"
heading_mode:
multiple:
description: "Hier creëer je een proces met meerdere groepen, wijken of thema's. Je hebt als het ware meerdere zakken geld. Bijvoorbeeld 25.000 voor \"Oosterparkwijk\", 30.000 voor het \"Centrum\", 28.000 voor de \"Westerparkwijk\" en de hele stad. Of voor verschillende thema's zoals sport, cultuur of gezondheid."
link: "Creeër meervoudig budget"
title: "<strong>Meervoudig</strong> budget"
single:
description: "Hier creëer je een proces met één groep, wijk of thema. Je hebt als het ware één zak geld. Bijvoorbeeld 25.000 euro voor de \"Oosterparkwijk\", of 10.000 voor cultuur."
link: "Creëer enkelvoudig budget"
title: "<strong>Enkelvoudig</strong> budget"
title: "Type burgerbegroting"
phases:
continue: "Voltooien"
multiple:
back: "Ga terug"
single:
back: "Ga terug"
milestones:
index:
table_id: "ID"
Expand Down
Loading

0 comments on commit c0aa57c

Please sign in to comment.