diff --git a/app/assets/stylesheets/legislation.scss b/app/assets/stylesheets/legislation.scss
index 130d99ada..a3d46a88d 100644
--- a/app/assets/stylesheets/legislation.scss
+++ b/app/assets/stylesheets/legislation.scss
@@ -86,7 +86,8 @@
background: #e5ecf2;
padding-top: 1rem;
- h5 {
+ h4 {
+ font-size: rem-calc(16);
margin-left: 0.25rem;
margin-bottom: 0;
color: #61686e;
diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss
index 3bcf666ba..aa1259bb3 100644
--- a/app/assets/stylesheets/participation.scss
+++ b/app/assets/stylesheets/participation.scss
@@ -753,6 +753,11 @@
.tags {
display: block;
+ margin-bottom: 0;
+
+ a {
+ font-size: $tiny-font-size;
+ }
}
.icon-debates,
@@ -1174,26 +1179,6 @@
}
}
- &.welcome {
- background: $budget image-url('spending_proposals_bg.jpg');
- background-position: 50% 50%;
- background-repeat: no-repeat;
- background-size: cover;
-
- .spending-proposal-timeline {
- padding-top: $line-height;
- }
-
- ul li {
- margin-right: $line-height;
- padding-top: $line-height / 2;
-
- .icon-calendar {
- display: none;
- }
- }
- }
-
a {
text-decoration: underline;
}
diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb
index e999c7f34..87b3dcc6b 100644
--- a/app/views/budgets/investments/_investment.html.erb
+++ b/app/views/budgets/investments/_investment.html.erb
@@ -45,7 +45,7 @@
<%= investment.heading.name %>
-
<%= investment.description %>
+ <%= investment.description %>
<%= render "shared/tags", taggable: investment, limit: 5 %>
diff --git a/app/views/budgets/investments/_milestones.html.erb b/app/views/budgets/investments/_milestones.html.erb
index a9de80429..eb151a9ab 100644
--- a/app/views/budgets/investments/_milestones.html.erb
+++ b/app/views/budgets/investments/_milestones.html.erb
@@ -18,7 +18,7 @@
<% end %>
<%= image_tag(milestone.image_url(:large), { alt: milestone.image.title, class: "margin", id: "image_#{milestone.id}" }) if milestone.image.present? %>
- <%= milestone.description %>
+ <%= text_with_links milestone.description %>
<% if milestone.documents.present? %>
diff --git a/app/views/legislation/processes/_process.html.erb b/app/views/legislation/processes/_process.html.erb
index a41fdbe4a..02954030f 100644
--- a/app/views/legislation/processes/_process.html.erb
+++ b/app/views/legislation/processes/_process.html.erb
@@ -7,8 +7,8 @@
- <%= link_to process, class: "button hollow big expanded", title: t('.see_latest_comments_title') do %>
- <%= t('.see_latest_comments') %>
+ <%= link_to process, class: "button hollow big expanded", title: t(".see_latest_comments_title") do %>
+ <%= t(".see_latest_comments") %>
<% end %>
@@ -21,43 +21,43 @@
<% column_width = 12 / process.enabled_phases_and_publications_count %>
-
<%= t('legislation.processes.shared.key_dates') %>
+
<%= t("legislation.processes.shared.key_dates") %>
<% if process.debate_phase.enabled? %>
-
<%= t('legislation.processes.shared.debate_dates') %>
-
<%= format_date(process.debate_start_date) %> - <%= format_date(process.debate_end_date) %>
+
<%= t("legislation.processes.shared.debate_dates") %>
+
<%= format_date(process.debate_start_date) %> - <%= format_date(process.debate_end_date) %>
<% end %>
<% if process.draft_publication.enabled? %>
-
<%= t('legislation.processes.shared.draft_publication_date') %>
-
<%= format_date(process.draft_publication_date) %>
+
<%= t("legislation.processes.shared.draft_publication_date") %>
+
<%= format_date(process.draft_publication_date) %>
<% end %>
<% if process.proposals_phase.enabled? %>
-
<%= t('legislation.processes.shared.proposals_dates') %>
-
<%= format_date(process.proposals_phase_start_date) %> - <%= format_date(process.proposals_phase_end_date) %>
+
<%= t("legislation.processes.shared.proposals_dates") %>
+
<%= format_date(process.proposals_phase_start_date) %> - <%= format_date(process.proposals_phase_end_date) %>
<% end %>
<% if process.allegations_phase.enabled? %>
-
<%= t('legislation.processes.shared.allegations_dates') %>
-
<%= format_date(process.allegations_start_date) %> - <%= format_date(process.allegations_end_date) %>
+
<%= t("legislation.processes.shared.allegations_dates") %>
+
<%= format_date(process.allegations_start_date) %> - <%= format_date(process.allegations_end_date) %>
<% end %>
<% if process.result_publication.enabled? %>
-
<%= t('legislation.processes.shared.result_publication_date') %>
-
<%= format_date(process.result_publication_date) %>
+
<%= t("legislation.processes.shared.result_publication_date") %>
+
<%= format_date(process.result_publication_date) %>
<% end %>
diff --git a/app/views/pages/custom_page.html.erb b/app/views/pages/custom_page.html.erb
index f14eba7d9..bdd85ab30 100644
--- a/app/views/pages/custom_page.html.erb
+++ b/app/views/pages/custom_page.html.erb
@@ -4,12 +4,16 @@
<%= @custom_page.title %>
- <%= @custom_page.subtitle %>
+ <% if @custom_page.subtitle.present? %>
+ <%= @custom_page.subtitle%>
+ <% end %>
- <%= raw @custom_page.content %>
+ <%= text_with_links @custom_page.content %>
-
- <%= render '/shared/print' if @custom_page.print_content_flag %>
-
+ <% if @custom_page.print_content_flag %>
+
+ <%= render '/shared/print' %>
+
+ <% end %>
diff --git a/app/views/pages/help/how_to_use/index.html.erb b/app/views/pages/help/how_to_use/index.html.erb
index 8da48d35d..a37920563 100644
--- a/app/views/pages/help/how_to_use/index.html.erb
+++ b/app/views/pages/help/how_to_use/index.html.erb
@@ -4,7 +4,7 @@
- <%= back_link_to %>
+ <%= back_link_to help_path %>
<%= t('pages.help.titles.how_to_use') %>
diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb
index a606721db..845fda155 100644
--- a/spec/features/budgets/investments_spec.rb
+++ b/spec/features/budgets/investments_spec.rb
@@ -931,7 +931,7 @@ feature 'Budget Investments' do
user = create(:user)
investment = create(:budget_investment)
create(:budget_investment_milestone, investment: investment,
- description: "Last milestone",
+ description: "Last milestone with a link to https://consul.dev",
publication_date: Date.tomorrow)
first_milestone = create(:budget_investment_milestone, investment: investment,
description: "First milestone",
@@ -945,12 +945,13 @@ feature 'Budget Investments' do
find("#tab-milestones-label").trigger('click')
within("#tab-milestones") do
- expect(first_milestone.description).to appear_before('Last milestone')
+ expect(first_milestone.description).to appear_before('Last milestone with a link to https://consul.dev')
expect(page).to have_content(Date.tomorrow)
expect(page).to have_content(Date.yesterday)
expect(page).not_to have_content(Date.current)
expect(page.find("#image_#{first_milestone.id}")['alt']).to have_content(image.title)
expect(page).to have_link(document.title)
+ expect(page).to have_link("https://consul.dev")
end
end
diff --git a/spec/features/site_customization/custom_pages_spec.rb b/spec/features/site_customization/custom_pages_spec.rb
index 09ad797dc..85e50841d 100644
--- a/spec/features/site_customization/custom_pages_spec.rb
+++ b/spec/features/site_customization/custom_pages_spec.rb
@@ -72,6 +72,45 @@ feature "Custom Pages" do
expect(page).not_to have_content("Print this info")
end
+ scenario "Show all fields and text with links" do
+ custom_page = create(:site_customization_page, :published,
+ slug: "slug-with-all-fields-filled",
+ title: "Custom page",
+ subtitle: "This is my new custom page",
+ content: "Text for new custom page with a link to https://consul.dev",
+ print_content_flag: true,
+ locale: "en"
+ )
+
+ visit custom_page.url
+
+ expect(page).to have_title("Custom page")
+ expect(page).to have_selector("h1", text: "Custom page")
+ expect(page).to have_selector("h2", text: "This is my new custom page")
+ expect(page).to have_content("Text for new custom page with a link to https://consul.dev")
+ expect(page).to have_link("https://consul.dev")
+ expect(page).to have_content("Print this info")
+ end
+
+ scenario "Don't show subtitle if its blank" do
+ custom_page = create(:site_customization_page, :published,
+ slug: "slug-without-subtitle",
+ title: "Custom page",
+ subtitle: "",
+ content: "Text for new custom page",
+ print_content_flag: false,
+ locale: "en"
+ )
+
+ visit custom_page.url
+
+ expect(page).to have_title("Custom page")
+ expect(page).to have_selector("h1", text: "Custom page")
+ expect(page).to have_content("Text for new custom page")
+ expect(page).not_to have_selector("h2")
+ expect(page).not_to have_content("Print this info")
+ end
+
scenario "Listed in more information page" do
custom_page = create(:site_customization_page, :published,
slug: "another-slug", title: "Another custom page",