diff --git a/app/assets/stylesheets/decidim.scss b/app/assets/stylesheets/decidim.scss index 89801da9..0c1b59e8 100755 --- a/app/assets/stylesheets/decidim.scss +++ b/app/assets/stylesheets/decidim.scss @@ -11,7 +11,7 @@ $primary-rgb: 82,172,170; // $alert: #ec5840; // $alert-rgb: 236,88,64; // -// $proposals: #238ff7; +$proposals: #238ff7; // $actions: #57d685; // $debates: #fa6c96; // $meetings: #fabc6c; @@ -27,8 +27,8 @@ $primary-rgb: 82,172,170; // // Define custom properties as css color variables // :root{ - --primary: #{$primary}; - --primary-rgb: #{$primary-rgb}; + --primary: #{$primary}; + --primary-rgb: #{$primary-rgb}; // --secondary: #{$secondary}; // --secondary-rgb: #{$secondary-rgb}; // --success: #{$success}; @@ -37,7 +37,7 @@ $primary-rgb: 82,172,170; // --warning-rgb: #{$warning-rgb}; // --alert: #{$alert}; // --alert-rgb: #{$alert-rgb}; -// --proposals: #{$proposals}; + --proposals: #{$proposals}; // --actions: #{$actions}; // --debates: #{$debates}; // --meetings: #{$meetings}; @@ -250,11 +250,6 @@ $primary-rgb: 82,172,170; margin-bottom: 110px; } } - @media screen and (min-width: 1024px) { - .button.expanded { - margin-left: 15px; - } - } .footer-separator{ flex-grow: 0; } @@ -270,4 +265,4 @@ $primary-rgb: 82,172,170; } } -@import "decidim/application"; \ No newline at end of file +@import "decidim/application"; diff --git a/app/cells/decidim/progress_bar/show.erb b/app/cells/decidim/progress_bar/show.erb new file mode 100644 index 00000000..25f4e569 --- /dev/null +++ b/app/cells/decidim/progress_bar/show.erb @@ -0,0 +1,16 @@ +
"> +
+ <%= t('.votes_count', count: progress) %> +
+ <% if total != 0 %> +
+
+
+
+ <% if subtitle_text.present? %> +
+ <%= subtitle_text %> +
+ <% end %> + <% end %> +
diff --git a/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb b/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb new file mode 100644 index 00000000..2c691716 --- /dev/null +++ b/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb @@ -0,0 +1,81 @@ +
+ <%= form.text_field :title, class: "js-hashtags", hashtaggable: true, value: form_presenter.title %> +
+ +
+ <%= text_editor_for_proposal_body(form) %> +
+ +<% if @form.component_automatic_hashtags.any? %> +
+ <%= form.label :automatic_hashtags %> +
+ <% @form.component_automatic_hashtags.each do |hashtag| %> + + <% end %> +
+
+<% end %> + +<% if @form.component_suggested_hashtags.any? %> +
+ <%= form.label :suggested_hashtags %> +
+ <%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map {|hashtag| [hashtag.downcase, "##{hashtag}"]}, :first, :last do |option| + option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text } + end %> +
+
+<% end %> + +<% if component_settings.geocoding_enabled? %> +
+ <%= form.check_box :has_address, checked: form_has_address? %> +
+ +
+ <%= form.text_field :address %> +
+<% end %> + +<% if @form.categories&.any? %> +
+ <%= form.categories_select :category_id, @form.categories, prompt: t("decidim.proposals.proposals.edit.select_a_category") %> +
+<% end %> + +<% if current_participatory_space.has_subscopes? %> +
+ <%= scopes_picker_field form, :scope_id %> +
+<% end %> + +<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %> +
+ <%= user_group_select_field form, :user_group_id %> +
+<% end %> + +<% if component_settings.attachments_allowed? && @proposal %> +
+ <%= form.fields_for :attachment, @form.attachment do |nested_form| %> +
+ <%= nested_form.hidden_field :title, value: "Untitled" %> +
+ +
+ <%= nested_form.upload :file, optional: false %> + <% if @form.errors[:attachment].present? %> + <% @form.errors[:attachment].each do |message| %> + + <%= message %> + + <% end %> + <% end %> +
+ <% end %> +
+ +<% end %> diff --git a/app/views/decidim/proposals/proposals/_proposal_similar.html.erb b/app/views/decidim/proposals/proposals/_proposal_similar.html.erb new file mode 100644 index 00000000..45f1c021 --- /dev/null +++ b/app/views/decidim/proposals/proposals/_proposal_similar.html.erb @@ -0,0 +1,22 @@ +
+
+
+
+ <%= link_to proposal, target: "_blank" do %> +
<%= decidim_html_escape(present(proposal).title).html_safe %>
+ <% end %> + <%= cell("decidim/coauthorships", proposal, has_actions: false, context: { current_user: current_user }) %> + +
+ <%= t("decidim.proposals.proposals.proposal.creation_date", date: l(proposal.created_at, format: :decidim_short)) %> +
+ <%= resource_reference(proposal, class: "tech-info--text-left") %> +
+ + <%== cell("decidim/proposals/proposal_m", proposal).badge %> + +

<%= truncate(present(proposal).body(strip_tags: true), length: 100) %>

+ <%= cell "decidim/tags", proposal, context: { extra_classes: ["tags--proposal"] } %> +
+
+
diff --git a/app/views/decidim/proposals/proposals/_proposals.html.erb b/app/views/decidim/proposals/proposals/_proposals.html.erb new file mode 100644 index 00000000..a52ed4c1 --- /dev/null +++ b/app/views/decidim/proposals/proposals/_proposals.html.erb @@ -0,0 +1,18 @@ + +
+ <%= render @proposals %> +
+<%= decidim_paginate @proposals %> \ No newline at end of file diff --git a/app/views/decidim/proposals/proposals/compare.html.erb b/app/views/decidim/proposals/proposals/compare.html.erb new file mode 100644 index 00000000..9189c922 --- /dev/null +++ b/app/views/decidim/proposals/proposals/compare.html.erb @@ -0,0 +1,23 @@ +
+ +
+ <%= render partial: "wizard_header", locals: { callout_step_help_text_class: "warning" } %> + + <% if @similar_proposals.presence %> +
+ <% @similar_proposals.each do |proposal| %> + <%= render partial: "proposal_similar", locals: { proposal: proposal } %> + <% end %> +
+ <% end %> + +
+ <%= link_to t(".continue"), complete_proposal_path(@proposal), class: "button small" %> +
+
+ +
diff --git a/app/views/decidim/proposals/proposals/complete.html.erb b/app/views/decidim/proposals/proposals/complete.html.erb new file mode 100644 index 00000000..fb681a38 --- /dev/null +++ b/app/views/decidim/proposals/proposals/complete.html.erb @@ -0,0 +1,25 @@ +
+ +
+ <%= render partial: "wizard_header" %> + +
+
+ <%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %> + <%= render partial: "edit_form_fields", locals: { form: form } %> + +
+ <%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %> +
+ <% end %> +
+
+
+ +
+ +<%= javascript_include_tag "decidim/proposals/add_proposal" %> diff --git a/app/views/decidim/proposals/proposals/edit_draft.html.erb b/app/views/decidim/proposals/proposals/edit_draft.html.erb new file mode 100644 index 00000000..1dd418ee --- /dev/null +++ b/app/views/decidim/proposals/proposals/edit_draft.html.erb @@ -0,0 +1,27 @@ +
+ +
+ <%= render partial: "wizard_header" %> + +
+
+ <%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %> + <%= render partial: "edit_form_fields", locals: { form: form } %> + +
+ <%= link_to t(".discard"), destroy_draft_proposal_path(@proposal), method: :delete, data: { confirm: t(".discard_confirmation") } %> + + <%= form.submit t(".send"), class: "button button--nomargin small", data: { disable: true } %> +
+ <% end %> +
+
+
+ +
+ +<%= javascript_include_tag "decidim/proposals/add_proposal" %> diff --git a/app/views/decidim/proposals/proposals/index.html.erb b/app/views/decidim/proposals/proposals/index.html.erb new file mode 100644 index 00000000..edeebd84 --- /dev/null +++ b/app/views/decidim/proposals/proposals/index.html.erb @@ -0,0 +1,80 @@ +<%= render partial: "decidim/shared/component_announcement" %> + +<% if component_settings.geocoding_enabled? %> + <%= dynamic_map_for proposals_data_for_map(@proposals.select(&:geocoded?)) do %> + + <%= stylesheet_link_tag "decidim/map" %> + <%= javascript_include_tag "decidim/map" %> + <% end %> +<% end %> +
+ <% if current_settings.creation_enabled && current_component.participatory_space.can_participate?(current_user) %> + <%= action_authorized_link_to :create, new_proposal_path, class: "title-action__action button large", data: { "redirect_url" => new_proposal_path } do %> + <%= t(".new_proposal") %> + <%= icon "plus" %> + <% end %> + <% else %> + + <%= t(".new_proposal") %> + <%= icon "plus" %> + + <% end %> +
+
+
+

+ <%= render partial: "count" %> +

+ <% if component_settings.collaborative_drafts_enabled? %> + <%= link_to t(".collaborative_drafts_list"), collaborative_drafts_path, class: "title-action__action button small hollow ml-s" %> + <% end %> +
+
+ +
+
+ <%= render partial: "proposals" %> +
+
+ +<%= javascript_include_tag("decidim/filters") %> +<%= javascript_include_tag "decidim/orders" %> diff --git a/app/views/decidim/proposals/proposals/new.html.erb b/app/views/decidim/proposals/proposals/new.html.erb new file mode 100644 index 00000000..7585f866 --- /dev/null +++ b/app/views/decidim/proposals/proposals/new.html.erb @@ -0,0 +1,37 @@ +
+ +
+ <%= render partial: "decidim/proposals/proposals/wizard_header" %> + +
+
+ <%= decidim_form_for(@form) do |form| %> +
+ <%= form.text_field :title, class: "js-hashtags", hashtaggable: true %> +
+ +
+ <%= text_editor_for_proposal_body(form) %> +
+ + <% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %> +
+ <%= user_group_select_field form, :user_group_id %> +
+ <% end %> + +
+ <%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %> +
+ <% end %> +
+
+
+ +
+ +<%= javascript_include_tag "decidim/proposals/add_proposal" %> diff --git a/app/views/decidim/proposals/proposals/preview.html.erb b/app/views/decidim/proposals/proposals/preview.html.erb new file mode 100644 index 00000000..7ec23948 --- /dev/null +++ b/app/views/decidim/proposals/proposals/preview.html.erb @@ -0,0 +1,21 @@ +
+ +
+ <%= render partial: "wizard_header", locals: { callout_help_text_class: "warning" } %> +
+
+ <%= render partial: "proposal_preview", locals: { proposal: @proposal } %> +
+ <%= link_to t(".modify"), edit_draft_proposal_path(@proposal) %> + + <%= button_to t(".publish"), publish_proposal_path(@proposal), method: :post, class: "button button--nomargin small" %> +
+
+
+
+ +
diff --git a/config/locales/overrides/decidim.fi.yml b/config/locales/overrides/decidim.fi.yml index af63db60..34b86e50 100644 --- a/config/locales/overrides/decidim.fi.yml +++ b/config/locales/overrides/decidim.fi.yml @@ -1,5 +1,126 @@ fi: decidim: + devise: + registrations: + new: + sign_up_service_account: 'Luo oma tunnus palveluun' + email_help: Sähköpostin tulee olla aito ja se tarkastetaan vahvistusviestillä. + sign_up: Rekisteröidy + sessions: + new: + sign_in: Kirjaudu sisään + sign_in_service_account: 'Kirjaudu palvelun omalla tunnuksella' + are_you_new?: Uusi käyttäjä? + register: Rekisteröidy + participatory_spaces: + proposal_categories: + ideas_count_phrase: + one: 'Idea' + other: 'Ideaa' + highlighted_proposals: + proposals: 'Katso mitä ideoita on jo ehdotettu' + ideas_total: 'Ideoita yhteensä %{count} kpl' + see_all_proposals: 'Katso kaikki ideat' + components: + proposals: + actions: + vote: Kannata + name: 'Ideat' + name_all: 'Kaikki ideat' + proposals: + actions: + new: 'Uusi idea' + create: + error: Idean tallennuksessa tapahtui virhe. + success: Idea tallennettu luonnoksena. + destroy_draft: + error: Idealuonnoksen poistamisessa tapahtui virheistä. + success: Idealuonnos poistettiin onnistuneesti. + publish: + error: Idean julkaisemisessa on tapahtunut virheitä. + success: Kiitos ideastasi! + update: + error: Idean tallentamisessa tapahtui virheitä. + success: Idea on päivitetty onnistuneesti. + update_draft: + error: Idealuonnoksen tallentamisessa tapahtui virheitä. + success: Idealuonnos päivitetty onnistuneesti. + proposals: + compare: + mine_is_different: Ideani on erilainen + no_similars_found: Hyvin tehty! Vastaavia ideoita ei löytynyt + title: Samankaltaiset ideat + complete: + send: Lähetä + title: Viimeistele ideasi lisäämällä kuva + count: + proposals_count: 'Yhteensä %{count} ideaa' + index: + all_proposals: 'Kaikki ideat' + new_proposal: 'Lisää oma ideasi' + orders: + label: 'Järjestä ideat:' + most_voted: 'Suosituin' + category_selector: + choose_category: 'Valitse aihepiiri' + show_all: 'Näytä kaikki' + proposal: + see_proposal: 'Katso idea' + vote_button: + vote: 'Tykkää' + already_voted: 'Tykätty' + flag_button: + report: 'Raportoi' + new: + title: 'Luo ideasi' + your_idea: 'Oma ideasi' + create_new_idea: 'Luo uusi idea' + edit: + title: 'Muokkaa ideaa' + select_a_category: 'Valitse aihepiiri' + edit_draft: + discard: Hylkää tämä luonnos + discard_confirmation: Haluatko varmasti hylätä tämän luonnoksen? + title: Muokkaa idealuonnosta + edit_form_fields: + write_your_proposal: 'Kirjoita oma ideasi' + address: 'Osoite' + add_address: 'Lisää osoite' + add_photo: 'Lisää kuva' + marker_popup: + address: 'Osoite' + view_proposal: 'Näytä idea' + preview: + modify: Muokkaa ideaa + proposal_edit_before_minutes: + one: Voit muokata tätä ideaa ensimmäisen minuutin kuluttua ehdotuksen julkaisemisesta. Kun tämä aikaikkuna sulkeutuu, et pysty muokkaamaan ideaa. + other: Voit muokata tätä ideaa ensimmäisten %{count} minuutin aikana idean julkaisemisesta. Kun tämä aikaikkuna sulkeutuu, et pysty muokkaamaan ideaa. + title: Julkaise ideasi + dont_want_name_visible: Etkö halua, että nimesi näkyy idean yhteydessä? + edit_profile: Muokkaa profiiliasi + after_edit_profile: Profiilin muokkauksen jälkeen päivitä tämä sivu uudestaan. + show: + edit_proposal: Muokkaa ideaa + withdraw_btn_hint: Jos muutat mieltäsi, voit perua ideasi, mikäli se ei ole saanut kannatusta. Ideaa ei poisteta kokonaan, se näkyy peruutettujen ideoiden luettelossa. + withdraw_confirmation: Haluatko varmasti peruuttaa tämän idean? + withdraw_proposal: Peruuta idea + show_on_map: Näytä karttanäkymässä + progress_bar: + votes_count: + one: '%{count} tykkäys' + other: '%{count} tykkäystä' + follows: + destroy: + button: 'Seurattu' + shared: + flag_modal: + does_not_belong: Sisältää lain vastaista toimintaa, itsemurhauhkauksia, henkilökohtaisia tietoja tai jotain muuta, jonka et usko kuuluvan tälle sivustolle. + offensive: Sisältää rasismia, seksismiä, loukkauksia, henkilöihin kohdistuneita hyökkäyksiä, tappouhkauksia tai mitä tahansa vihapuhetta. + spam: Sisältää klikkihoukutteita, mainostusta, huijauksia tai bottiskriptejä. + title: Ilmoita ongelmasta + share_modal: + copy: Kopioi + copied: Kopioitu participatory_process_steps: index: process_steps: Tapahtuman vaiheet