Skip to content

Commit

Permalink
added minister pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
prsnca committed Apr 27, 2014
1 parent 8038872 commit 0085f8d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
1 change: 1 addition & 0 deletions committeeVotes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __unicode__(self):

class Minister(models.Model):
name = models.CharField(max_length=30)
photo = models.CharField(max_length=100)
def __unicode__(self):
return self.name

Expand Down
8 changes: 8 additions & 0 deletions committeeVotes/static/site.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.voteType {
text-align: center;
}

.minister-photo {
position: relative;
height: 120px;
width: 90px;
display: inline-block;
margin: 9px;
}
40 changes: 13 additions & 27 deletions committeeVotes/templates/committeeVotes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,48 @@
<div class="container">

<div class="row">
<div class="col-md-9">
<div class="col-md-6">
<h3>
הצעות אחרונות
</h3>
</div>

<div class="col-md-3">
<div class="col-md-6">
<h3>
שרים
</h3>
</div>
</div>

<div class="row">
<div class="col-md-9">
<div class="col-md-6">
<table class="table table-hover">
<thead>
<tr>
<th class="text-right">
שם ההצעה
</th>
<th class="text-right">
תוכן ההצעה
</th>

</tr>
</thead>
{% for b in bills %}

<tr>

<td><a href="{% url 'detail' b.id %}">{{b.name}}</a></td>

<td>{{b.description}}</td>


</tr>
{% endfor %}
</table>

</div>
<div class="col-md-3">

<table class="table table-hover">
<thead>
<th>
שם השר
</th>
</thead>
{% for m in ministers %}
<tr>
<td><a href="{% url 'minister' m.id %}">{{m.name}}</a></td>
</tr>
{% endfor %}
</table>
</div>

<div class="col-md-6">
{% for m in ministers %}
<div class="minister-photo">
<a href="{% url 'minister' m.id %}">
<img src="{{ MEDIA_URL }}{{ m.photo }}-s.jpg">
{{ m.name }}
</a>
</div>
{% endfor %}
</div>

{% endblock %}
12 changes: 7 additions & 5 deletions committeeVotes/templates/committeeVotes/minister_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@


<div class="row">
<div class="col-md-6">
<div class="col-md-8">
<h2>
{{ minister.name }}
</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">

<h3>
הצבעות
</h3>
Expand All @@ -36,6 +33,11 @@ <h3>
{% endfor %}
</table>
</div>
<div class="col-md-4">
<div class="pull-left">
<img src="{{ MEDIA_URL }}{{ minister.photo }}.jpg">
</div>
</div>
</div>
</div>

Expand Down
3 changes: 3 additions & 0 deletions openCommittee/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_ROOT = ''

STATIC_URL = '/static/'

MEDIA_URL = "http://www.knesset.gov.il/mk/images/members/"

if os.environ.get('DATABASE_URL'): # Heroku
import dj_database_url
DATABASES['default'] = dj_database_url.config()
Expand Down

0 comments on commit 0085f8d

Please sign in to comment.