This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Metatavu/develop
New release
- Loading branch information
Showing
11 changed files
with
259 additions
and
24 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
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
32 changes: 32 additions & 0 deletions
32
app/views/decidim/participatory_processes/participatory_processes/_promoted_process.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<article class="card card--full card--process"> | ||
<div class="row collapse card--process__row"> | ||
<div class="columns mediumlarge-8 large-6 card--process__column"> | ||
<div class="card__content"> | ||
<%= link_to participatory_process_path(promoted_process), class: "card__link" do %> | ||
<h2 class="card__title"><%= translated_attribute promoted_process.title %></h2> | ||
<% end %> | ||
<%= decidim_sanitize html_truncate(translated_attribute(promoted_process.short_description), length: 630, separator: "...") %> | ||
<%= link_to participatory_process_path(promoted_process), class: "button secondary small hollow card__button" do %> | ||
<%= t("participatory_processes.promoted_process.more_info", scope: "layouts.decidim") %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="columns mediumlarge-8 large-6 card--process__column custom-process_card" | ||
style="background-image:url(<%= promoted_process.hero_image.url %>)"> | ||
<div class="card--full__image"> | ||
<div class="card__content row collapse"> | ||
<div class="large-6 large-offset-6 columns"> | ||
<%= link_to participatory_process_path(promoted_process), class: "button expanded button--sc custom-button-margin" do %> | ||
<%= t(promoted_process.cta_button_text_key, scope: "layouts.decidim.participatory_processes.promoted_process") %> | ||
<% if promoted_process.active_step %> | ||
<span class="button__info"> | ||
<%= t("participatory_processes.promoted_process.active_step", scope: "layouts.decidim") %> <%= translated_attribute promoted_process.active_step.title %> | ||
</span> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</article> |
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,20 @@ | ||
<% | ||
components = participatory_space.components.published.or(Decidim::Component.where(id: self.try(:current_component))) | ||
%> | ||
<%= | ||
extended_navigation_bar([ | ||
{ | ||
name: t(".process_menu_item"), | ||
url: decidim_participatory_processes.participatory_process_path(participatory_space), | ||
active: is_active_link?(decidim_participatory_processes.participatory_process_path(participatory_space), :exclusive) || | ||
is_active_link?(decidim_participatory_processes.all_metrics_participatory_process_path(participatory_space), :exclusive) | ||
} | ||
] + components.map do |component| | ||
{ | ||
name: translated_attribute(component.name), | ||
url: main_component_path(component), | ||
active: is_active_link?(main_component_path(component), :inclusive) | ||
} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<% add_decidim_page_title(translated_attribute(current_component.name)) if try(:current_component) %> | ||
<% add_decidim_page_title(translated_attribute(current_participatory_space.title)) %> | ||
<% add_decidim_meta_tags( | ||
image_url: current_participatory_space.banner_image.url, | ||
description: translated_attribute(current_participatory_space.short_description), | ||
) %> | ||
<%= render "layouts/decidim/application" do %> | ||
<%= render partial: "layouts/decidim/process_header" %> | ||
<div class="wrapper"> | ||
<%= yield %> | ||
</div> | ||
<% if content_for? :expanded %> | ||
<div class="expanded"> | ||
<div class="wrapper wrapper--inner"> | ||
<div class="row"> | ||
<%= yield :expanded %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<% provide :meta_image_url, current_participatory_space.banner_image.url %> |
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,4 +1,34 @@ | ||
fi: | ||
layouts: | ||
decidim: | ||
process_header: | ||
process_menu_item: Tietoa | ||
participatory_process_groups: | ||
participatory_process_group: | ||
processes_count: 'Osiot:' | ||
participatory_processes: | ||
index: | ||
promoted_processes: Korostettu nyt | ||
footer: | ||
feedback: 'Lähetä palautetta' | ||
feedback: 'Lähetä palautetta' | ||
pages: | ||
home: | ||
hero: | ||
participate: Osallistu | ||
extended: | ||
debates: Keskustelut | ||
debates_explanation: Jaa henkilökohtaiset mielipiteesi ja näkemyksesi keskusteluiden kautta. | ||
meetings_explanation: Tavataan ja osallistutaan kaupunkimme puolesta. | ||
proposals: Ideat | ||
proposals_explanation: Avoin tila asukkaiden ideoille siitä, millaisessa kaupungissa haluaisimme asua. | ||
how_to_participate: Kuinka osallistun | ||
statistics: | ||
headline: Tämänhetkiset tilastot | ||
footer_sub_hero: | ||
footer_sub_hero_headline: Yhteisöllinen osallistumispalvelu | ||
highlighted_processes: | ||
active_processes: Käynnissä nyt | ||
see_all_processes: Näytä kaikki | ||
highlighted_process_groups: | ||
active_processes: Käynnissä nyt | ||
see_all_processes: Näytä kaikki |
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 |
---|---|---|
@@ -1,28 +1,25 @@ | ||
version: '3' | ||
version: '3.1' | ||
services: | ||
app: | ||
image: decidim/decidim:0.21.0 | ||
image: "platoniq/decidim-hacks:latest" | ||
volumes: | ||
- .:/app | ||
- bundle:/usr/local/bundle | ||
- node_modules:/app/node_modules | ||
- .:/code | ||
environment: | ||
- PORT=3000 | ||
- DATABASE_HOST=pg | ||
- DATABASE_USERNAME=postgres | ||
- RAILS_ENV=development | ||
- RAILS_LOG_TO_STDOUT=1 | ||
ports: | ||
- 3000:3000 | ||
links: | ||
- pg | ||
command: bundle exec puma | ||
command: /code/docker/init.sh | ||
pg: | ||
image: postgres | ||
volumes: | ||
- pg-data:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_HOST_AUTH_METHOD=trust | ||
volumes: | ||
node_modules: {} | ||
bundle: {} | ||
pg-data: {} | ||
pg-data: {} |
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,31 @@ | ||
#!/bin/bash | ||
|
||
# Temp files created by the container will be erasable by external user | ||
umask 0000 | ||
bundle install | ||
echo -e "\e[33mUpgrading Decidim..." | ||
bin/rails decidim:upgrade | ||
|
||
echo -e "\e[33mTrying to execute migrations..." | ||
if bin/rails db:migrate; then | ||
echo -e "\e[32mDatabase already created. No need for seeding." | ||
else | ||
echo -e "\e[31mMigration failed. Installing database" | ||
bin/rails db:create | ||
echo -e "\e[33mExecuting migrations..." | ||
bin/rails db:migrate | ||
echo -e "\e[32mDatabase just created so let's seed some data..." | ||
bin/rails db:seed | ||
fi | ||
echo -e "\e[33mSeeding hacks content..." | ||
bin/rails db:seed:hacks | ||
|
||
echo | ||
echo -e "\e[32mGreat! Please use this user/password to login:" | ||
echo | ||
echo -e "\e[31madmin@example.org" | ||
echo -e "\e[31mdecidim123456" | ||
echo | ||
echo -e "\e[33mStarting rails server..." | ||
bundle exec puma | ||
# bundle exec rails server |