## mako
<%! import json %>
<%! from django.utils.translation import ugettext as _ %>
<%! from openedx.core.lib.json_utils import EscapedEdxJSONEncoder %>
<%namespace name='static' file='/static_content.html'/>
<%inherit file="/main.html" />

<%block name="bodyclass">view-teams view-in-course course js</%block>
<%block name="pagetitle">${_("Teams")}</%block>

<%block name="headextra">
<%static:css group='style-course-vendor'/>
<%static:css group='style-course'/>
<%include file="../discussion/_js_head_dependencies.html" />
</%block>

<%include file="/courseware/course_navigation.html" args="active_page='teams'" />

<div class="container">
    <div class="teams-wrapper">
        <section class="teams-content">
        </section>
    </div>
</div>

<%block name="js_extra">

<%include file="../discussion/_js_body_dependencies.html" />
<%static:js group='discussion'/>
<script type="text/javascript">
    RequireJS.define('DiscussionModuleView', [], function() {return window['DiscussionModuleView'];});
</script>

<%static:require_module module_name="teams/js/teams_tab_factory" class_name="TeamsTabFactory">
    TeamsTabFactory({
        courseID: '${ unicode(course.id) }',
        topics: ${ json.dumps(topics, cls=EscapedEdxJSONEncoder) },
        userInfo: ${ json.dumps(user_info, cls=EscapedEdxJSONEncoder) },
        topicUrl: '${ topic_url }',
        topicsUrl: '${ topics_url }',
        teamsUrl: '${ teams_url }',
        teamsDetailUrl: '${ teams_detail_url }',
        teamMembershipsUrl: '${ team_memberships_url }',
        teamMembershipDetailUrl: '${ team_membership_detail_url }',
        maxTeamSize: ${ course.teams_max_size },
        languages: ${ json.dumps(languages, cls=EscapedEdxJSONEncoder) },
        countries: ${ json.dumps(countries, cls=EscapedEdxJSONEncoder) },
        teamsBaseUrl: '${ teams_base_url }'
    });
</%static:require_module>
</%block>

<%include file="../discussion/_underscore_templates.html" />
