{% extends "base.html" %} 
{% load i18n %} 
{% load title_lang %} 

{% block content %}

<h2>{% trans 'courses' %}</h2>
{% if course_list %}
	<div class="tableheader">
		<div class='tabletitle'>{% trans 'table_header_course' %}</a></div>
		<div class='tabletitle'>{% trans 'table_header_course_downloads' %}</div>
		<div class='tablecell'>{% trans 'table_header_course_activity_today' %}</div>
		<div class='tablecell'>{% trans 'table_header_course_activity_week' %}</div>
		<div style='clear:both'></div>
	</div>
	{% for course in course_list %}
		<div class="tablelist"> 	
			<div class='tabletitle'><a href="{% url 'oppia_recent_activity' course.id %}">
				{{ course.title|title_lang:LANGUAGE_CODE }}</a></a></div>
			<div class='tabletitle'>{{course.no_downloads}} downloads by {{course.no_distinct_downloads}} users</div>
			<div class='tablecell'>{{course.get_activity_today}}</div>
			<div class='tablecell'>{{course.get_activity_week}}</div>
			<div style='clear:both'></div>
		</div>
	{% endfor %}
{% else %}
	{% url 'oppia_upload' as url_upload %}
	{% blocktrans %}
		<p>You don't yet have any courses uploaded, why not <a href="{{ url_upload }}">upload one now</a>?</p>
	{% endblocktrans %}
{% endif %}

{% endblock %}
