Adds social share for supported proposals

This commit is contained in:
Alberto Garcia Cabeza
2015-09-22 16:04:14 +02:00
parent e097e800ea
commit 34c8dd0b8a
4 changed files with 41 additions and 4 deletions

View File

@@ -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
// - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -19,8 +19,8 @@
<div class="in-favor">
<% if voted_for?(@proposal_votes, proposal) %>
<div class="supported">
<%= t("proposals.proposal.already_supported") %>
</div>
<%= t("proposals.proposal.already_supported") %>
</div>
<% 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 %>
</div>
<% end %>
<% if voted_for?(@proposal_votes, proposal) %>
<div class="share-supported">
<%= social_share_button_tag(proposal.title) %>
</div>
<% end %>
</div>

View File

@@ -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

View File

@@ -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