Commit 2ca5809f authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Modify template files to use the method added in previous commit. This

is an easier way to switch between username and full name, as it puts
the logic in actual python instead of the templating logic.
parent 5c90508e
{% extends 'layouts/base.html' %}
{% block title %}
{% if student.user.get_full_name == "" %}
SRCT Bookshare • {{ student.user.username }}
{% else %}
SRCT Bookshare • {{ student.user.get_full_name }}
{% endif %}
SRCT Bookshare • {{ student.get_full_name }}
{% endblock title %}
{% block content %}
......@@ -21,14 +17,10 @@
<img class="img-circle img-responsive" src="{% gravatar_url student.user.email 75 %}">
</div>
<div class="col-md-6">
{% if student.user.get_full_name == "" %}
<h2><strong>{{ student.user.username }}</strong>
{% else %}
<h2><strong>{{ student.user.get_full_name }}</strong>
<h2><strong>{{ student.get_full_name }}</strong>
{% if student.user == request.user %}
<small><a href="{% url 'name_change' %}">(Edit)</a></small>
{% endif %}
{% if student.user == request.user %}
<small><a href="{% url 'name_change' %}">(Edit)</a></small>
{% endif %}
</h2>
</div>
<div class="col-md-3 text-right">
......
{% extends 'layouts/base.html' %}
{% block title %}
SRCT Bookshare &bull; {{ student.user.first_name }} {{ student.user.last_name }}
SRCT Bookshare &bull; {{ student.get_full_name }}
{% endblock title %}
{% block content %}
......@@ -16,7 +16,7 @@ SRCT Bookshare &bull; {{ student.user.first_name }} {{ student.user.last_name }}
<img class="img-circle img-responsive" src="{% gravatar_url student.user.email 75 %}">
</div>
<div class="col-md-6">
<h2><strong><a href="{{ student.get_absolute_url }}">{{ student.user.get_full_name }}'s</a> Ratings</strong></h2>
<h2><strong><a href="{{ student.get_absolute_url }}">{{ student.get_full_name }}'s</a> Ratings</strong></h2>
</div>
<div class="col-md-5 text-right">
<h3><strong>{{ student_ratings_num }}</strong> reviews,
......
{% extends 'layouts/base.html' %}
{% block title %}
SRCT Bookshare &bull; Mod
SRCT Bookshare &bull; {{ student.get_full_name }}
{% endblock title %}
{% block content %}
......
Markdown is supported
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