Skip to content

Commit

Permalink
Merge pull request #873 from /issues/853/apoyo
Browse files Browse the repository at this point in the history
Issues/853/apoyo
  • Loading branch information
lissteilor authored Aug 25, 2017
2 parents f6719c6 + 29ee64d commit f322ca6
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 25 deletions.
10 changes: 9 additions & 1 deletion votai_general_theme/static/sass/_2017sitio1.scss
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ input[type=file]{
border-radius: 8px;
}

.modal-body{
text-align: left;
}

/*Detalle*/
.nav-detalle-propuesta{
border: none;
Expand Down Expand Up @@ -411,6 +415,10 @@ input[type=file]{
}
}

.fa-stack{
top: 8px;
}

.share-detail .fa-inverse {
color: white;
}
Expand Down Expand Up @@ -482,7 +490,7 @@ input[type=file]{

.share-card a .fa-stack {
color: white;
margin-left: -5px;
margin-left: -10px;
}

.share-card a .fa-stack:hover {
Expand Down
3 changes: 3 additions & 0 deletions votai_general_theme/static/sass/_media-2017sitio1.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
}

@media screen and (max-width: 991px) {
.fa-stack{
top: 0;
}
.presidents{
bottom: -20px;
}
Expand Down
2 changes: 1 addition & 1 deletion votai_general_theme/templates/modal_like_proposal.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h4 class="modal-title" id="myModalLabel">{{ title }}</h4>
{% endif %}
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-info"><i class="fa fa-thumbs-o-up"></i> {% trans 'Apoyar' %}</button>
<button type="submit" class="btn btn-info">{% trans 'Apoyar' %} <i class="fa fa-heart" aria-hidden="true"></i></button>
</div>
</div>
</form>
Expand Down
12 changes: 8 additions & 4 deletions votai_general_theme/templates/popular_proposal/_likers.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@
<p class="nota">Esta propuesta tiene <span id='likers_count_{{proposal.id}}' class="conteo">{{proposal.likers.count}}</span> apoyo(s)</p>
</div>
{% endif %}
<span class="corazon-{{proposal.id}} btn btn-no-apoyo text-center {{support_button_extra_class}}" style="cursor:auto;">
Estoy apoyando <i class="fa fa-heart" aria-hidden="true"></i>
</span>
{% if support_button_extra_class %}
<div class="col-md-6">
<div class="share pull-left">
{% include 'popular_proposal/_share.html' with popular_proposal=proposal %}
</div>
</div>
{% endif %}
<!-- eoapoyando -->
{% endwith %}
{% endif %}
Expand All @@ -91,4 +95,4 @@
{% if not avoid_counter %}
</div>
{% endif %}
<!-- end of _likers.html -->
<!-- end of _likers.html -->
10 changes: 6 additions & 4 deletions votai_general_theme/templates/popular_proposal/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<p class="text-light small">Propuesta nº{{popular_proposal.id}}</p>

{% if popular_proposal.is_local_meeting %}
<img src="{% static 'img/local-meeting.svg' %}" class="img-responsive" alt="Generada desde un encuentro ciudadano">
<img src="{% static 'img/local-meeting.svg' %}" alt="Generada desde un encuentro ciudadano">
{% endif %}

<h1>{{popular_proposal.title}}</h1>
Expand Down Expand Up @@ -206,17 +206,19 @@ <h4 class="modal-title">Términos y Condiciones</h4>
</div><!-- col-md-9 -->

<div class="col-md-3 hidden-sm hidden-xs text-center print_hidden">
<h4>Apoya esta propuesta</h4>
<label>Apoya esta propuesta</label>
<p class="apoyo-ciudadano">Esta propuesta tiene <span id='likers_count_{{popular_proposal.id}}' class="conteo">{{popular_proposal.likers.count}} <i class="fa fa-heart blue-light-txt" aria-hidden="true"></i></span> apoyo(s)</p>
<div class="share-detail">
{% include 'popular_proposal/_likers.html' with proposal=popular_proposal next_url=request.path avoid_counter=True %}
</div>
<h4>Comparte esta propuesta</h4>
<hr>
<label>Comparte esta propuesta</label>
<div class="share-detail">
{% include 'popular_proposal/_share.html' with proposal=popular_proposal next_url=request.path %}
</div>
{% if popular_proposal.sponsoring_orgs.all %}
<h4>Organizaciones que apoyan esta propuesta</h4>
<hr>
<label>Organizaciones que apoyan esta propuesta</label>
<ul class="list-inline">
{% for org in popular_proposal.sponsoring_orgs %}
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h4><a href="{% url 'popular_proposals:detail' slug=proposal.slug %}">{{proposal
{% include 'popular_proposal/_share.html' with popular_proposal=proposal %}
</div>
{% endcomment %}
<a href="{% url 'popular_proposals:detail' slug=proposal.slug %}" class="btn btn-blue">Leer más</a>
<a href="{% url 'popular_proposals:detail' slug=proposal.slug %}" class="btn btn-blue pull-right">Leer más</a>
</div>
{% endif %}
</div>
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
{% load static %}
$('#likers_count_{{proposal.id}}').text('{{proposal.likers.count}}')
$('.modal').modal('hide');
$('.corazon-{{proposal.id}} a').attr('id', "unlike_proposal_{{proposal.id}}");
$('.corazon-{{proposal.id}} a').attr('href', "{% url 'popular_proposals:unlike_proposal' pk=like.id %}");
$('.corazon-{{proposal.id}} a').attr("title", "Ya no quiero apoyar esta propuesta");
$('.corazon-{{proposal.id}} a').html('Estoy apoyando <i class="fa fa-heart" aria-hidden="true"></i>');
$('.corazon-{{proposal.id}} a').removeClass('btn-apoyo');
$('.corazon-{{proposal.id}} a').addClass('unlike_proposal');
$('.corazon-{{proposal.id}} a').addClass('btn-no-apoyo');

$("#unlike_proposal_{{proposal.id}}").click(function(event){
event.preventDefault();
var target = $(event.target);
var url = target.parent().attr('href');
unlike_proposal(url);
})
$('.corazon-{{proposal.id}}').html({% include 'popular_proposal/_share.html' with popular_proposal=proposal %});

0 comments on commit f322ca6

Please sign in to comment.