diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss
index 6946ea478..edcad4875 100644
--- a/app/assets/stylesheets/participacion.scss
+++ b/app/assets/stylesheets/participacion.scss
@@ -1393,6 +1393,37 @@ table {
}
}
+.share-supported {
+
+ .social-share-button {
+ display: inline-block;
+ }
+
+ .social-share-button-twitter {
+ @extend .social-share-button-twitter;
+ background: none;
+ color: white;
+ height: rem-calc(24);
+ width: rem-calc(48);
+ }
+
+ .social-share-button-facebook {
+ @extend .social-share-button-facebook;
+ background: none;
+ color: white;
+ height: rem-calc(24);
+ width: rem-calc(48);
+ }
+
+ .social-share-button-google_plus {
+ @extend .social-share-button-google_plus;
+ background: none;
+ color: white;
+ height: rem-calc(24);
+ width: rem-calc(48);
+ }
+}
+
// 16. Pages
// - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/app/views/proposals/_votes.html.erb b/app/views/proposals/_votes.html.erb
index 9443e548b..0689e43b8 100644
--- a/app/views/proposals/_votes.html.erb
+++ b/app/views/proposals/_votes.html.erb
@@ -19,8 +19,8 @@
<% if voted_for?(@proposal_votes, proposal) %>
- <%= t("proposals.proposal.already_supported") %>
-
+ <%= t("proposals.proposal.already_supported") %>
+
<% else %>
<%= link_to vote_proposal_path(proposal, value: 'yes'),
class: "button button-support tiny radius expand",
@@ -50,4 +50,10 @@
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
<% end %>
+
+ <% if voted_for?(@proposal_votes, proposal) %>
+
+ <%= social_share_button_tag(proposal.title) %>
+
+ <% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index e42ab14c0..95a40fa0d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -179,7 +179,7 @@ en:
supports_necessary: "53.726 necessary supports"
census_percent: "2% of census"
total_percent: "100%"
- already_supported: "You already supported this proposal!"
+ already_supported: "You already supported this proposal, share it!"
form:
proposal_title: Proposal title
proposal_question: Proposal question
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 961f29969..c196d080c 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -179,7 +179,7 @@ es:
supports_necessary: "53.726 apoyos necesarios"
census_percent: "2% del Censo"
total_percent: "100%"
- already_supported: "¡Ya has apoyado esta propuesta!"
+ already_supported: "¡Ya has apoyado esta propuesta, compártela!"
form:
proposal_title: Título de la propuesta
proposal_question: Pregunta de la propuesta
diff --git a/spec/features/votes_spec.rb b/spec/features/votes_spec.rb
index 81995397d..f340dedd6 100644
--- a/spec/features/votes_spec.rb
+++ b/spec/features/votes_spec.rb
@@ -232,15 +232,15 @@ feature 'Votes' do
within("#proposals") do
within("#proposal_#{proposal1.id}_votes") do
- expect(page).to have_content "You already supported this proposal!"
+ expect(page).to have_content "You already supported this proposal, share it!"
end
within("#proposal_#{proposal2.id}_votes") do
- expect(page).to_not have_content "You already supported this proposal!"
+ expect(page).to_not have_content "You already supported this proposal, share it!"
end
within("#proposal_#{proposal3.id}_votes") do
- expect(page).to_not have_content "You already supported this proposal!"
+ expect(page).to_not have_content "You already supported this proposal, share it!"
end
end
end
@@ -284,7 +284,7 @@ feature 'Votes' do
find('.in-favor a').click
expect(page).to have_content "1 support"
- expect(page).to have_content "You already supported this proposal!"
+ expect(page).to have_content "You already supported this proposal, share it!"
end
end
@@ -295,7 +295,7 @@ feature 'Votes' do
find('.in-favor a').click
expect(page).to have_content "1 support"
- expect(page).to have_content "You already supported this proposal!"
+ expect(page).to have_content "You already supported this proposal, share it!"
end
expect(URI.parse(current_url).path).to eq(proposals_path)
end