From 01ba8f7ea924caac0f554dcfd72924a08ac7093b Mon Sep 17 00:00:00 2001
From: Alberto Garcia Cabeza
Date: Thu, 5 Jan 2017 12:56:46 +0100
Subject: [PATCH 1/2] improves styles on budgets groups show
---
app/views/budgets/groups/show.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/budgets/groups/show.html.erb b/app/views/budgets/groups/show.html.erb
index 9a1976ff2..6c2cf8e18 100644
--- a/app/views/budgets/groups/show.html.erb
+++ b/app/views/budgets/groups/show.html.erb
@@ -29,7 +29,7 @@
-
+
<%= image_tag "map.jpg" %>
From e8dafde39f68a3edaff821e474331453afc4891f Mon Sep 17 00:00:00 2001
From: Alberto Garcia Cabeza
Date: Thu, 5 Jan 2017 13:03:11 +0100
Subject: [PATCH 2/2] adds message for not logged users
---
app/assets/stylesheets/layout.scss | 11 +++++------
app/views/budgets/show.html.erb | 18 +++++++++++++-----
config/locales/budgets.en.yml | 3 +++
config/locales/budgets.es.yml | 3 +++
4 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss
index 0ef13f01a..9de8a2ebf 100644
--- a/app/assets/stylesheets/layout.scss
+++ b/app/assets/stylesheets/layout.scss
@@ -805,6 +805,11 @@ form {
.callout {
font-size: $small-font-size;
+ a {
+ font-weight: bold;
+ text-decoration: underline;
+ }
+
&.success, &.notice {
background-color: $success-bg;
border-color: $success-border;
@@ -821,12 +826,6 @@ form {
background-color: $warning-bg;
border-color: $warning-border;
color: $color-warning;
-
- a {
- color: $color-warning;
- font-weight: bold;
- text-decoration: underline;
- }
}
&.alert, &.error {
diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb
index 22096a526..6798b329a 100644
--- a/app/views/budgets/show.html.erb
+++ b/app/views/budgets/show.html.erb
@@ -18,12 +18,20 @@
<% if @budget.accepting? %>
- <% if current_user && current_user.level_two_or_three_verified? %>
- <%= link_to t("budget.investments.index.sidebar.create"), new_budget_investment_path(@budget), class: "button margin-top" %>
+ <% if current_user %>
+ <% if current_user.level_two_or_three_verified? %>
+ <%= link_to t("budget.investments.index.sidebar.create"), new_budget_investment_path(@budget), class: "button margin-top expanded" %>
+ <% else %>
+
+ <%= t("budget.investments.index.sidebar.verified_only",
+ verify: link_to(t("budget.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
+
+ <% end %>
<% else %>
-
- <%= t("budget.investments.index.sidebar.verified_only",
- verify: link_to(t("budget.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
+
+ <%= t("budget.investments.index.sidebar.not_logged_in",
+ sign_in: link_to(t("budget.investments.index.sidebar.sign_in"), new_user_session_path),
+ sign_up: link_to(t("budget.investments.index.sidebar.sign_up"), new_user_registration_path)).html_safe %>
<% end %>
<% end %>
diff --git a/config/locales/budgets.en.yml b/config/locales/budgets.en.yml
index 0a87c818f..37a61b6f1 100644
--- a/config/locales/budgets.en.yml
+++ b/config/locales/budgets.en.yml
@@ -85,6 +85,9 @@ en:
verified_only: "To create a new budget investment %{verify}."
verify_account: "verify your account"
create: "Create budget investment"
+ not_logged_in: "To create a new budget investment you must %{sign_in} or %{sign_up}."
+ sign_in: "sign in"
+ sign_up: "sign up"
orders:
random: random
confidence_score: highest rated
diff --git a/config/locales/budgets.es.yml b/config/locales/budgets.es.yml
index f98940f43..e132f7438 100644
--- a/config/locales/budgets.es.yml
+++ b/config/locales/budgets.es.yml
@@ -85,6 +85,9 @@ es:
verified_only: "Para crear una nueva propuesta de inversión %{verify}."
verify_account: "verifica tu cuenta"
create: "Crear propuesta de inversión"
+ not_logged_in: "Para crear una nueva propuesta de inversión debes %{sign_in} o %{sign_up}."
+ sign_in: "iniciar sesión"
+ sign_up: "registrarte"
orders:
random: Aleatorias
confidence_score: Mejor valoradas