forked from apluslms/a-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve notifications and separate them from profile.
- Loading branch information
1 parent
1d4c116
commit 864f57c
Showing
24 changed files
with
388 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,57 @@ | ||
{% extends "course/course_base.html" %} | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% load course %} | ||
{% load exercise %} | ||
{% load notification %} | ||
|
||
{% block title %}{{ block.super }}: {% trans "Profile" %}{% endblock %} | ||
{% block title %}A+ {% trans "Profile" %}{% endblock %} | ||
{% block view_tag %}profile{% endblock %} | ||
|
||
{% block breadcrumblist %} | ||
{{ block.super }} | ||
<li class="active">{% trans "Profile" %}</li> | ||
{% endblock %} | ||
|
||
{% block columns %} | ||
<div class="col-md-2"> | ||
<div class="thumbnail"> | ||
<img src="{{ profile.avatar_url }}" alt="avatar" /> | ||
</div> | ||
<dl> | ||
{% trans "[Missing]" as miss %} | ||
<dt>{% trans "Student ID" %}</dt> | ||
<dd>{% firstof profile.student_id miss %}</dd> | ||
<dt>{% trans "E-mail" %}</dt> | ||
<dd>{% firstof user.email miss %}</dd> | ||
<dt>{% trans "Username" %}</dt> | ||
<dd>{% firstof user.username miss %}</dd> | ||
</dl> | ||
{# TODO: check the user type and show editing options/help #} | ||
<div class="alert alert-info"> | ||
{% blocktrans %} | ||
To change your settings, such as <strong>e-mail</strong> | ||
address or <strong>password</strong>, you must update | ||
them on your identity provider. | ||
{% endblocktrans %} | ||
</div> | ||
<div class="alert alert-info"> | ||
{% blocktrans with email=user.email %} | ||
You can change your avatar icon | ||
at <a href="http://gravatar.com">gravatar.com</a>. | ||
Use your e-mail address <strong>{{ email }}</strong> | ||
when registering your account. | ||
{% endblocktrans %} | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="page-header"> | ||
<h1> | ||
{% if user.first_name or user.last_name %} | ||
{{ user.first_name }} {{ user.last_name }} | ||
{% else %} | ||
{% trans "[Unknown name]" %} | ||
{% endif %} | ||
</h1> | ||
</div> | ||
<div> | ||
{% old_course_notifications instance user as read %} | ||
{% new_course_notifications instance user as unread %} | ||
<h3>{% trans "Unread notifications" %}</h3> | ||
{% if unread.count > 0 %} | ||
<ul> | ||
{% for notification in unread.notifications %} | ||
<li> | ||
<strong>{% trans "Sent by:" %}</strong> | ||
{{ notification.sender.user.get_full_name }} ({{ notification.timestamp }})<br/> | ||
<strong>{{ notification.subject }}</strong><br/> | ||
{{ notification.notification|safe }} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% block content %} | ||
<div class="page-header"> | ||
<h1> | ||
{% if user.first_name or user.last_name %} | ||
{{ user.first_name }} {{ user.last_name }} | ||
{% else %} | ||
<p>{% trans "No unread notifications." %}</p> | ||
{% trans "[Unknown name]" %} | ||
{% endif %} | ||
</h1> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-2"> | ||
<div class="thumbnail"> | ||
<img src="{{ profile.avatar_url }}" alt="avatar" /> | ||
</div> | ||
<dl> | ||
{% trans "[Missing]" as miss %} | ||
<dt>{% trans "Student ID" %}</dt> | ||
<dd>{% firstof profile.student_id miss %}</dd> | ||
<dt>{% trans "E-mail" %}</dt> | ||
<dd>{% firstof user.email miss %}</dd> | ||
<dt>{% trans "Username" %}</dt> | ||
<dd>{% firstof user.username miss %}</dd> | ||
</dl> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="alert alert-info"> | ||
{% blocktrans with email=user.email %} | ||
You can change your avatar icon | ||
at <a href="http://gravatar.com">gravatar.com</a>. | ||
Use your e-mail address <strong>{{ email }}</strong> | ||
when registering your account. | ||
{% endblocktrans %} | ||
</div> | ||
|
||
<h3>{% trans "Older notifications" %}</h3> | ||
{% if read.count > 0 %} | ||
<ul> | ||
{% for notification in read.notifications %} | ||
<li> | ||
<strong>{% trans "Sent by:" %}</strong> | ||
{{ notification.sender.user.get_full_name }} ({{ notification.timestamp }})<br/> | ||
<strong>{{ notification.subject }}</strong><br/> | ||
{{ notification.notification|safe }} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<p>{% trans "No older notifications." %}</p> | ||
{% endif %} | ||
{# TODO: check the user type and show editing options/help #} | ||
<div class="alert alert-info"> | ||
{% blocktrans %} | ||
To change your settings, such as <strong>e-mail</strong> | ||
address or <strong>password</strong>, you must update | ||
them on your identity provider. | ||
{% endblocktrans %} | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
|
||
{# TODO: list enrolled courses #} | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
{% latest_submissions %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.