Commit 223e6773 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Remove example code, change to cohort

parent f9a404a8
{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block title %}{% trans "Members" %} - {{ block.super }}{% endblock %}
......@@ -52,16 +54,12 @@
<a href="{% url 'members:profile' pk=member.pk %}">
<div class="post-inner">
<div class="inner-img">
<img src="{% if not member.photo %}/static/images/gravatarmissing.png{% else %}{{ member.photo.url }}{% endif %}" />
<img src="{% if not member.photo %}{% static "members/images/default-avatar.jpg" %}{% else %}{{ member.photo.url }}{% endif %}" alt="{{ member.username }}" />
</div>
<div class="post-overlay">
<div class="post-overlay-meta">
<h2>{{ member.display_name }}</h2>
{% if member.current_membership %}
<p>{% trans "Member since" %}: {{ member.earliest_membership.since.year }}</p>
{% else %}
<p>{% trans "Member till" %}: {{ member.latest_membership.since.year }}</p>
{% endif %}
<p>{% trans "Cohort" %}: {{ member.starting_year }}</p>
</div>
</div>
<div class="post-body avatar-subtitle">
......
{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block title %}{% trans "Profile" %} - {% trans "Members" %} - {{ block.super }}{% endblock %}
......@@ -17,7 +19,7 @@
<div class="type-portfolio type-portfolio-half clearfix user-page">
<div class="row">
<div class="span8">
<img src="{% if not member.photo %}/static/images/gravatarmissing.png{% else %}{{ member.photo.url }}{% endif %}" alt="{{ member.username }}" />
<img src="{% if not member.photo %}{% static "members/images/default-avatar.jpg" %}{% else %}{{ member.photo.url }}{% endif %}" alt="{{ member.username }}" />
</div>
<div class="span4 row">
<h4>{% trans "About" %} {{ member.short_display_name }}</h4>
......@@ -31,14 +33,7 @@
<hr class="separator">
<h4>{% trans "Personal information" %}</h4>
<ul class="post-meta">
<li><span>{% trans "Starting year" %}: </span> {{ member.starting_year }}<br></li>
{% if member.is_active %}
<li><span>{% trans "Member since" %}: </span> {{ member.earliest_membership.since.year }}</li>
<li><span>{% trans "Membership type" %}: </span> {{ member.current_membership.get_type_display }}</li>
{% else %}
<li><span>{% trans "Member till" %}: </span> {{ member.latest_membership.since.year }}</li>
{% endif %}
<li><span>{% trans "Cohort" %}: </span> {{ member.starting_year }}<br></li>
<li><span>{% trans "Study programme" %}: </span> {{ member.get_programme_display }}<br></li>
......@@ -68,30 +63,6 @@
{% endfor %}
</li>
{% endfor %}
{% comment "As example for future possible types of achievements" %}
<li style="margin-bottom:10px;">
<span>Huisstijlcommissie</span>
<br>
<i>2014-10-01 - 2016-02-01</i>
<ul>
<li><span style="text-transform:inherit;">Voorzitter: </span><i>2015-06-18 - 2016-02-10</i>
</li>
</ul>
</li>
<li style="margin-bottom:10px;">
<span>Mediacommissie</span>
<br>
<i>2014-09-17 - heden</i>
<ul>
<li><span style="text-transform:inherit;">Voorzitter: </span><i>2015-09-14 - 2015-09-14</i>
</li>
</ul>
</li>
<li style="margin-bottom:10px;">
<span>Mentor introductie 2016</span>
</li>
{% endcomment %}
</ul>
</div>
</div>
......
......@@ -71,9 +71,10 @@ def index(request):
page_range = range(1, paginator.num_pages + 1)
if paginator.num_pages > 7:
if page > 3:
page_range_end = paginator.num_pages if page + 3 > \
paginator.num_pages else\
page + 3
page_range_end = paginator.num_pages
if page + 3 <= paginator.num_pages:
page_range_end = page + 3
page_range = range(page - 2, page_range_end)
while page_range.stop - page_range.start < 5:
page_range = range(page_range.start - 1, page_range.stop)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment