## mako

<%page expression_filter="h"/>
<%namespace name='static' file='../static_content.html'/>

<%!
from django.utils.translation import ugettext as _

from openedx.core.djangolib.markup import HTML
%>

<%block name="content">
<div class="course-updates container" id="course-container">
    <header class="page-header has-secondary">
        ## Breadcrumb navigation
        <div class="page-header-main">
            <nav aria-label="${_('Course Updates')}" class="sr-is-focusable" tabindex="-1">
                <div class="has-breadcrumbs">
                    <div class="breadcrumbs">
                        <span class="nav-item">
                            <a href="${course_url}">Course</a>
                        </span>
                        <span class="icon fa fa-angle-right" aria-hidden="true"></span>
                        <span class="nav-item">${_('Course Updates')}</span>
                    </div>
                </div>
            </nav>
        </div>
    </header>
    <div class="page-content">
        % if len(plain_html_updates) > 0:
            ${HTML(plain_html_updates)}
        % else:
            <div class="all-updates">
                % for index, update in enumerate(updates):
                <article class="updates-article">
                    % if not update.get("is_error"):
                    <div class="date">${update.get("date")}</div>
                    % endif
                    <div class="article-content">
                        ${HTML(update.get("content"))}
                    </div>
                </article>
              % endfor
            </div>
        % endif
    </div>
</div>
</%block>
