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 // 16. Pages
// - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -19,8 +19,8 @@
<div class="in-favor"> <div class="in-favor">
<% if voted_for?(@proposal_votes, proposal) %> <% if voted_for?(@proposal_votes, proposal) %>
<div class="supported"> <div class="supported">
<%= t("proposals.proposal.already_supported") %> <%= t("proposals.proposal.already_supported") %>
</div> </div>
<% else %> <% else %>
<%= link_to vote_proposal_path(proposal, value: 'yes'), <%= link_to vote_proposal_path(proposal, value: 'yes'),
class: "button button-support tiny radius expand", class: "button button-support tiny radius expand",
@@ -50,4 +50,10 @@
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %> signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
</div> </div>
<% end %> <% end %>
<% if voted_for?(@proposal_votes, proposal) %>
<div class="share-supported">
<%= social_share_button_tag(proposal.title) %>
</div>
<% end %>
</div> </div>

View File

@@ -179,7 +179,7 @@ en:
supports_necessary: "53.726 necessary supports" supports_necessary: "53.726 necessary supports"
census_percent: "2% of census" census_percent: "2% of census"
total_percent: "100%" total_percent: "100%"
already_supported: "You already supported this proposal!" already_supported: "You already supported this proposal, share it!"
form: form:
proposal_title: Proposal title proposal_title: Proposal title
proposal_question: Proposal question proposal_question: Proposal question

View File

@@ -179,7 +179,7 @@ es:
supports_necessary: "53.726 apoyos necesarios" supports_necessary: "53.726 apoyos necesarios"
census_percent: "2% del Censo" census_percent: "2% del Censo"
total_percent: "100%" total_percent: "100%"
already_supported: "¡Ya has apoyado esta propuesta!" already_supported: "¡Ya has apoyado esta propuesta, compártela!"
form: form:
proposal_title: Título de la propuesta proposal_title: Título de la propuesta
proposal_question: Pregunta de la propuesta proposal_question: Pregunta de la propuesta