Skip to content

Commit

Permalink
Merge pull request #78 from WISVCH/fb-master_detail-templates
Browse files Browse the repository at this point in the history
Improvements to detail pages
  • Loading branch information
praseodym committed Jul 29, 2015
2 parents d56afa5 + 32b08b2 commit 595b80c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 22 deletions.
4 changes: 4 additions & 0 deletions dienst2/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
width: 200px;
font-size: 20px;
}

.committees {
font-size: 12px;
}
10 changes: 7 additions & 3 deletions ldb/templates/ldb/organization_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
<div id="entity_detail" class="form-horizontal form-condensed">
<h2 class="page-header">{{ organization }}
<div class="pull-right btn-group">
<a href="./edit/" class="btn btn-primary"><span class="fa fa-pencil"></span> Edit</a>
<a href="./delete/" class="btn btn-danger"><span class="fa fa-trash-o"></span> Delete</a>
<a href="./edit/" class="btn btn-primary">
<i class="fa fa-pencil"></i><span class="visible-lg-inline visible-md-inline"> Edit</span>
</a>
<a href="./delete/" class="btn btn-danger">
<i class="fa fa-trash-o"></i><span class="visible-lg-inline visible-md-inline"> Delete</span>
</a>
<a href="{% url 'admin:ldb_organization_change' organization.id %}" class="btn btn-success">
<span class="fa fa-wrench"></span> Admin
<i class="fa fa-wrench"></i><span class="visible-lg-inline visible-md-inline"> Admin</span>
</a>
</div>
</h2>
Expand Down
43 changes: 24 additions & 19 deletions ldb/templates/ldb/person_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@

{% block content %}
<div id="entity_detail" class="form-horizontal form-condensed">

<h2 class="page-header">
{% if person.facebook_id %}
<a href="https://graph.facebook.com/{{person.facebook_id}}/picture?type=large">
<img class="pull-left img-circle"
src="https://graph.facebook.com/{{person.facebook_id}}/picture?type=square"/>
</a>
{% endif %}
{{ person }} &mdash; {{ person.get__membership_status_display }}

{{ person }} <br class="visible-xs-block visible-sm-block" />
<small>{{ person.get__membership_status_display }}</small>

<div class="pull-right btn-group">
<a href="./edit/" class="btn btn-primary"><span class="fa fa-pencil"></span> Edit</a>
<a href="./delete/" class="btn btn-danger"><span class="fa fa-trash-o"></span> Delete</a>
<a href="./edit/" class="btn btn-primary">
<i class="fa fa-pencil"></i><span class="visible-lg-inline visible-md-inline"> Edit</span>
</a>
<a href="./delete/" class="btn btn-danger">
<i class="fa fa-trash-o"></i><span class="visible-lg-inline visible-md-inline"> Delete</span>
</a>
<a href="{% url 'admin:ldb_person_change' person.id %}" class="btn btn-success">
<span class="fa fa-wrench"></span> Admin
<i class="fa fa-wrench"></i><span class="visible-lg-inline visible-md-inline"> Admin</span>
</a>
</div>
</h2>
Expand Down Expand Up @@ -100,12 +106,11 @@ <h2 class="page-header">
</fieldset>
{% endif %}

{% if person.member %}
<fieldset>
<legend>
Lidmaatschap
</legend>

{% if person.member %}
{% stcontrol person.member 'date_from' %}
{% stcontrol person.member 'date_to' %}
{% stcontrol person.member 'date_paid' %}
Expand All @@ -118,24 +123,24 @@ <h2 class="page-header">
{% endif %}
{% stcontrol person.member 'honorary_date_from' %}
</fieldset>
{% endif %}

{% if person.committee_memberships %}
<fieldset>
{% if person.committee_memberships %}
<legend>Commissies ({{ person.committee_memberships.count }})</legend>

<ul class="committees">
{% for c in person.committee_memberships.all %}
<div class="form-group">
<label class="col-sm-4 control-label">{{ c.committee.name }} &ndash; {{ c.board }}</label>
<div class="col-sm-8">
<p class="form-control-static">
{% if c.position %}{{ c.position }}{% endif %}
{% if c.ras_months %}({{ c.ras_months }} RAS){% endif %}
</p>
</div>
</div>
<li>
{{ c.board }}:
<strong>{{ c.committee.name }}</strong>
{% if c.position %}{{ c.position }}{% endif %}
{% if c.ras_months %}({{ c.ras_months }} RAS){% endif %}
</li>
{% endfor %}
{% endif %}
{% endif %}
</ul>
</fieldset>
{% endif %}
</div>

<div class="col-md-6">
Expand Down

0 comments on commit 595b80c

Please sign in to comment.