Files
edx-platform/lms/templates/page_banner.html
Harry Rein 08df53e110 Adding in course messaging to the home page.
LEARNER-1894

This commit adds in course messaging for three use cases. First,
when the user is not signed in, the user is shown a message that
provides a link to sign in or register. If the user is signed in
but not enrolled, they are given a link to do so. If the user is
enrolled but the course has not yet started, they are shown a
message explaining when the course starts and shown a link (not
yet enabled) to add a reminder to their calendar.

The implementation defines a base message class and extends it
for the course home messages as well as the previously implemented
page level messages.
2017-07-24 15:17:12 -04:00

29 lines
880 B
HTML

## mako
<%page expression_filter="h"/>
<%namespace name='static' file='static_content.html'/>
<% online_help_token = self.online_help_token() if hasattr(self, 'online_help_token') else None %>
<%!
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import HTML
from openedx.core.djangoapps.util.user_messages import PageLevelMessages
%>
<%
banner_messages = list(PageLevelMessages.user_messages(request))
%>
% if banner_messages:
<div class="page-banner">
<div class="user-messages">
% for message in banner_messages:
<div class="alert ${message.css_class}" role="alert">
<span class="icon icon-alert fa ${message.icon_class}" aria-hidden="true"></span>
${HTML(message.message_html)}
</div>
% endfor
</div>
</div>
% endif