diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index d6c688100..0faa8ecc1 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -1139,6 +1139,8 @@ .budget-header { background: $budget; margin-top: -$line-height; + padding-bottom: $line-height; + padding-top: $line-height; h1, h2, @@ -1154,19 +1156,6 @@ text-decoration: underline; } - .callout { - - &.primary a { - color: $link; - } - } - - .button { - background: #fff; - color: $budget; - text-decoration: none; - } - .confirmed { font-size: rem-calc(24); font-weight: bold; @@ -1182,6 +1171,24 @@ } } +.budget-subheader { + @include grid-row; + margin-bottom: $line-height; + margin-top: $line-height; + + .current-phase { + text-transform: uppercase; + } + + .button { + margin-top: $line-height / 2; + } + + .callout { + margin-bottom: 0; + } +} + .jumbo-budget { background: $budget; border-bottom: 1px solid $budget; diff --git a/app/views/budgets/ballot/_ballot.html.erb b/app/views/budgets/ballot/_ballot.html.erb index fcd2c9cd8..c320a1652 100644 --- a/app/views/budgets/ballot/_ballot.html.erb +++ b/app/views/budgets/ballot/_ballot.html.erb @@ -1,4 +1,4 @@ -
+
<%= back_link_to @ballot_referer %> diff --git a/app/views/budgets/groups/show.html.erb b/app/views/budgets/groups/show.html.erb index c778825dc..b7565a265 100644 --- a/app/views/budgets/groups/show.html.erb +++ b/app/views/budgets/groups/show.html.erb @@ -4,7 +4,7 @@
-
+
<%= back_link_to budgets_path %>

<%= t("budgets.groups.show.title") %>

diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index 3a8e86d97..091fa5486 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -8,51 +8,55 @@ <% if current_budget.present? %>
-
-
- -

<%= current_budget.name %>

-
- <%= auto_link_already_sanitized_html wysiwyg(current_budget.description) %> -
-

- <%= link_to t("budgets.index.section_header.help"), "#section_help" %> -

+
+
+

<%= current_budget.name %>

+
+ <%= auto_link_already_sanitized_html wysiwyg(current_budget.description) %>
-
-

- <%= t("budgets.show.phase") %> -

-

<%= current_budget.current_phase.name %>

+

+ <%= link_to t("budgets.index.section_header.help"), "#section_help" %> +

+
+
+
- <%= link_to t("budgets.index.section_header.all_phases"), "#all_phases" %> +
+
+ <%= t("budgets.show.phase") %> +

<%= current_budget.current_phase.name %>

+
- <% if current_budget.accepting? %> - <% if current_user %> - <% if current_user.level_two_or_three_verified? %> - <%= link_to t("budgets.investments.index.sidebar.create"), - new_budget_investment_path(current_budget), - class: "button margin-top expanded" %> - <% else %> -
- <%= sanitize(t("budgets.investments.index.sidebar.verified_only", - verify: link_to_verify_account)) %> -
- <% end %> - <% else %> -
- <%= sanitize(t("budgets.investments.index.sidebar.not_logged_in", - sign_in: link_to_signin, sign_up: link_to_signup)) %> -
- <% end %> +
+ <% if current_budget.accepting? %> + <% if current_user %> + <% if current_user.level_two_or_three_verified? %> +
+ <%= link_to t("budgets.investments.index.sidebar.create"), + new_budget_investment_path(current_budget), + class: "button" %> +
+ <% else %> +
+ <%= sanitize(t("budgets.investments.index.sidebar.verified_only", + verify: link_to_verify_account)) %> +
<% end %> + <% else %> +
+ <%= sanitize(t("budgets.investments.index.sidebar.not_logged_in", + sign_in: link_to_signin, sign_up: link_to_signup)) %> +
+ <% end %> + <% end %> - <% if can?(:read_results, current_budget) %> + <% if can?(:read_results, current_budget) %> +
<%= link_to t("budgets.show.see_results"), budget_results_path(current_budget, heading_id: current_budget.headings.first), - class: "button margin-top expanded" %> - <% end %> -
+ class: "button expanded" %> +
+ <% end %>
@@ -123,7 +127,7 @@ <% else %>
-
+

<%= t("budgets.index.title") %>

diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index 70daf8989..f9971c9e0 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -4,14 +4,14 @@
-
+
<%= back_link_to budgets_path %>

<%= @budget.name %>

<%= auto_link_already_sanitized_html wysiwyg(@budget.description) %>
-
+

<%= t("budgets.show.phase") %>

diff --git a/spec/system/budgets/budgets_spec.rb b/spec/system/budgets/budgets_spec.rb index 354ada7b0..f8e89a62a 100644 --- a/spec/system/budgets/budgets_spec.rb +++ b/spec/system/budgets/budgets_spec.rb @@ -42,7 +42,6 @@ describe "Budgets" do expect(page).to have_content(budget.name) expect(page).to have_content(budget.description) expect(page).to have_link("Help with participatory budgets") - expect(page).to have_link("See all phases") end expect(page).to have_content("Actual phase") @@ -51,7 +50,7 @@ describe "Budgets" do budget.update!(phase: "publishing_prices") visit budgets_path - within(".budget-header") do + within(".budget-subheader") do expect(page).to have_content("Publishing projects prices") end