<%!
from django.utils.translation import ugettext as _
%>
<%page args="course_date" expression_filter="h"/>
<div class="date-summary-container">
    <div class="date-summary date-summary-${course_date.css_class}">
        % if course_date.title:
            % if course_date.title == 'current_datetime':
                <span class="hd hd-6 heading localized-datetime" data-datetime="${course_date.date}" data-string="${_(u'Today is {date}')}" data-timezone="${user_timezone}" data-language="${user_language}"></span>
            % else:
                <span class="hd hd-6 heading">${course_date.title}</span>
            % endif
        % endif
        % if course_date.date and course_date.title != 'current_datetime':
            <p class="hd hd-6 date localized-datetime" data-format="shortDate" data-datetime="${course_date.date}" data-timezone="${user_timezone}" data-language="${user_language}" data-string="${_(course_date.relative_datestring)}"></p>
        % endif
        % if course_date.description:
            <p class="description">${course_date.description}</p>
        % endif
        % if course_date.link and course_date.link_text:
            <span class="date-summary-link">
                <a href="${course_date.link}">${course_date.link_text}</a>
            </span>
        % endif
    </div>
</div>
