Skip to content

Commit

Permalink
added opacity for non-voting ministers
Browse files Browse the repository at this point in the history
  • Loading branch information
prsnca committed Jun 11, 2014
1 parent 9c12385 commit b581270
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion committeeVotes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Vote(models.Model):
vote = models.ForeignKey(VoteType)
meeting = models.ForeignKey(Meeting)
bill = models.ForeignKey(Bill)
minister = models.ForeignKey(Minister)
minister = models.ForeignKey(Minister, related_name="votes")

class Meta:
unique_together = ("bill","minister")
Expand Down
7 changes: 5 additions & 2 deletions committeeVotes/templates/committeeVotes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ <h3>
שרים
</h3>
{% for m in ministers %}
<div class="minister-photo">
<div class="minister-photo" {% if m.votes.count == 0 %}
style="opacity:0.3"
{% endif %}>
<a href="{% url 'minister' m.id %}">
<img src="{{ MEDIA_URL }}{{ m.photo }}-s.jpg">
<img src="{{ MEDIA_URL }}{{ m.photo }}-s.jpg"
>
{{ m.name }}
</a>
</div>
Expand Down
4 changes: 3 additions & 1 deletion committeeVotes/templates/committeeVotes/ministers.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ <h2>
<div class="row">
<div class="col-md-12">
{% for m in ministers %}
<div class="minister-big-photo">
<div class="minister-big-photo" {% if m.votes.count == 0 %}
style="opacity:0.3"
{% endif %}>
<a href="{% url 'minister' m.id %}">
<img src="{{ MEDIA_URL }}{{ m.photo }}.jpg">
<h3 style="text-align: center">{{ m.name }}</h3>
Expand Down

0 comments on commit b581270

Please sign in to comment.